Type parameters

Hierarchy

Implements

Constructors

constructor

  • new ItemImplementation(factory: EntityFactory, namespace: string, code: string, _fields?: readonly Readonly<Field<dts.Type>>[], data?: dts.Based<T> | T): ItemImplementation
  • Parameters

    • factory: EntityFactory
    • namespace: string
    • code: string
    • Default value _fields: readonly Readonly<Field<dts.Type>>[] = []
    • Default value data: dts.Based<T> | T = {} as any

    Returns ItemImplementation

Properties

Protected _fields

_fields: readonly Readonly<Field<dts.Type>>[]

Private _fieldsDataDiff

_fieldsDataDiff: object

Type declaration

  • [key: string]: any

Readonly code

code: string

data

data: dts.Based<T> = {} as any

Protected factory

factory: EntityFactory

fields

fields: object = {} as any

Type declaration

Readonly namespace

namespace: string

Accessors

fieldsDataDiff

  • get fieldsDataDiff(): object
  • Returns object

    • [key: string]: any

id

  • get id(): string
  • Returns string

Methods

fetch

  • fetch(): Promise<this>
  • Returns Promise<this>

Protected fillData

  • fillData(data: any): void
  • Parameters

    • data: any

    Returns void

Protected fillFields

  • fillFields(): void
  • Returns void

getIds

  • Parameters

    Returns IdsResolver

json

  • json(): any
  • Returns any

normalize

  • normalize(): void
  • Returns void

Protected onFieldDataChanged

  • onFieldDataChanged(code: string, data: any): void
  • Parameters

    • code: string
    • data: any

    Returns void

Static Private getDateTimeData

  • Parameters

    Returns DatetimeField

Static Private getDateTimeValue

  • Parameters

    Returns function

      • (v: any): dts.Type | undefined
      • Parameters

        • v: any

        Returns dts.Type | undefined

Static getFieldCode

  • getFieldCode(field: Field<any>): string
  • Parameters

    Returns string

Static getFieldData

  • getFieldData<F>(factory: EntityFactory, namespace: string, code: string, field: Readonly<Field<FieldTypeToEnum<F>>>, data?: undefined | object): dts.FieldType<F> | undefined
  • Type parameters

    • F: dts.Type

    Parameters

    Returns dts.FieldType<F> | undefined

Static getFieldJSON

  • Type parameters

    • F: dts.Type

    Parameters

    Returns any

Static getFieldValue

  • Type parameters

    • F: dts.Type

    Parameters

    Returns F | undefined | (F | undefined)[]

Static isUserCollection

  • isUserCollection(namespace: string, code: string): boolean
  • Parameters

    • namespace: string
    • code: string

    Returns boolean