Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

Optional _data

_data?: DeepObject

Optional _uuid

_uuid?: string

config

config: FieldConfig

Readonly fieldType

fieldType: string

globalConfig

globalConfig: GlobalConfig

types

types: Types

usingAutoFields

usingAutoFields: boolean

Optional validation

validation?: Validation

Optional zones

zones?: Record<string, ZoneInfo>

Accessors

data

  • get data(): undefined | DeepObject
  • set data(data: undefined | DeepObject | Record<string, any>): void

fullKey

  • get fullKey(): string

isClean

  • get isClean(): boolean
  • Is the field clean?

    The field is considered clean if there are no changes from the original.

    This is used by the editor to determine if there are changes pending.

    Returns boolean

isDataFormatValid

  • get isDataFormatValid(): boolean
  • Check if the data format is invalid for what the field expects to edit.

    Returns boolean

isSimple

  • get isSimple(): boolean
  • Is the field simple?

    Complex fields usually have multiple inputs. This is used to determine how the field is shown in non-trivial view. For example, lists will not show a 'simple' view of list items if it uses a complex field.

    Returns boolean

isValid

  • get isValid(): boolean
  • Has the field passed all relative validation rules.

    Returns boolean

key

  • get key(): string
  • Key to use to retrieve and save the value in the data.

    Returns string

rules

  • get rules(): Rules

uid

  • get uid(): string
  • Unique id value for the field. Usually a shortened form of the UUID.

    Returns string

uuid

  • get uuid(): string
  • UUID value for the field.

    Returns string

value

  • get value(): any

Methods

classesForField

  • classesForField(): Record<string, boolean>

classesForInput

  • classesForInput(zoneKey?: string): Record<string, boolean>

classesForLabel

  • classesForLabel(zoneKey?: string): Record<string, boolean>

cleanOriginalValue

  • cleanOriginalValue(value: any): any

handleBlur

  • handleBlur(): void

handleInput

  • handleInput(evt: Event): void

hasLostFocus

  • hasLostFocus(zoneKey?: string): boolean
  • Determines if the field has lost focus before for a zone.

    This is used for UI to determine when to display validation messsages for a better UX when they have not interacted with the field.

    Parameters

    • zoneKey: string = DEFAULT_ZONE_KEY

    Returns boolean

lock

  • lock(): void
  • Certain cases require the field to be locked while updating to prevent bad data mixing. This allows for manually locking the fields.

    Returns void

lostFocus

  • lostFocus(zoneKey?: string): void
  • Mark that the field has lost focus for a zone.

    This is used for UI to determine when to display validation messsages for a better UX when they have not interacted with the field.

    Parameters

    • zoneKey: string = DEFAULT_ZONE_KEY

    Returns void

render

  • render(): void

template

  • Template for determining how to render the field.

    The default field template has several levels of templates to make it easier for individual fields to override parts of template without needing to replicate a lot of internal template features.

    Base field template structure:

    template
    └── templateWrapper
    └── templateStructure
    ├── templateHeaderStructure
    │ ├── templateHeader
    │ └── templateLabel
    ├── templateInputStructure
    │ └── templateInput
    └── templateFooterStructure
    └── templateFooter

    Parameters

    • editor: SelectiveEditor

      Selective editor used to render the template.

    • data: DeepObject

      Data provided to render the template.

    Returns TemplateResult<ResultType>

templateDataFormatInvalid

templateErrors

  • Template for rendering the errors.

    Parameters

    • editor: SelectiveEditor

      Selective editor used to render the template.

    • data: DeepObject

      Data provided to render the template.

    • Optional zoneKey: string

      Zone to provide the error messages for.

    Returns TemplateResult<ResultType>

templateFooter

templateFooterStructure

templateHeader

templateHeaderStructure

templateHelp

  • Template for rendering the field help.

    Parameters

    • editor: SelectiveEditor

      Selective editor used to render the template.

    • data: DeepObject

      Data provided to render the template.

    • Optional zoneKey: string

      Zone to provide the error messages for.

    Returns TemplateResult<ResultType>

templateIconDeepLink

templateIconValidation

templateInput

templateInputStructure

templateLabel

templateStructure

  • Template for rendering the field structure.

    Used for controlling the order that parts of the field are rendered.

    Parameters

    • editor: SelectiveEditor

      Selective editor used to render the template.

    • data: DeepObject

      Data provided to render the template.

    Returns TemplateResult<ResultType>

templateWrapper

unlock

  • unlock(): void
  • Certain cases require the field to be locked while updating to prevent bad data mixing. This allows for manually unlocking the fields.

    Returns void

updateOriginal

Generated using TypeDoc