Options
All
  • Public
  • Public/Protected
  • All
Menu

Selective Fields

Hierarchy

Index

Constructors

constructor

Properties

Optional _data

_data?: DeepObject

Optional _uuid

_uuid?: string

config

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

isChecked

  • get isChecked(): boolean

isClean

  • get isClean(): 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

isValid

  • get isValid(): boolean

key

  • get key(): string

rules

  • get rules(): Rules

uid

  • get uid(): string

uuid

  • get uuid(): string

value

  • get value(): any

Methods

ariaLabelForOptionDot

classesForField

  • classesForField(): Record<string, boolean>
  • Generates a list of classes to apply to the field element.

    Returns Record<string, boolean>

classesForInput

  • classesForInput(zoneKey?: string): Record<string, boolean>
  • Generates a list of classes to apply to the input element.

    Parameters

    • zoneKey: string = DEFAULT_ZONE_KEY

    Returns Record<string, boolean>

classesForLabel

  • classesForLabel(zoneKey?: string): Record<string, boolean>
  • Generates a list of classes to apply to the label element.

    Parameters

    • zoneKey: string = DEFAULT_ZONE_KEY

    Returns Record<string, boolean>

classesForOption

classesForOptions

cleanOriginalValue

  • cleanOriginalValue(value: any): any
  • The format of the original value may need to be cleaned up to be used by the editor in a consistent format.

    Parameters

    • value: any

      Original value from the source.

    Returns any

handleBlur

  • handleBlur(): void
  • Handle when the input loses focus.

    Returns void

handleInput

  • handleInput(): void

hasColorHints

  • hasColorHints(options: Option[]): boolean
  • Are there color hints?

    Parameters

    Returns boolean

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
  • Signal for the editor to re-render.

    Returns void

stylesForOptionDot

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>

templateColorSwatch

templateDataFormatInvalid

  • Template for showing the invalid data format messaging.

    Parameters

    • editor: SelectiveEditor

      Selective editor used to render the template.

    • data: DeepObject

      Data provided to render the template.

    Returns TemplateResult<ResultType>

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

  • Template for rendering the field footer.

    Parameters

    • editor: SelectiveEditor

      Selective editor used to render the template.

    • data: DeepObject

      Data provided to render the template.

    Returns TemplateResult<ResultType>

templateFooterStructure

  • Template for rendering the field footer structure.

    Parameters

    • editor: SelectiveEditor

      Selective editor used to render the template.

    • data: DeepObject

      Data provided to render the template.

    Returns TemplateResult<ResultType>

templateHeader

  • Template for rendering the field header.

    Parameters

    • editor: SelectiveEditor

      Selective editor used to render the template.

    • data: DeepObject

      Data provided to render the template.

    Returns TemplateResult<ResultType>

templateHeaderStructure

  • Template for rendering the field header structure.

    Parameters

    • editor: SelectiveEditor

      Selective editor used to render the template.

    • data: DeepObject

      Data provided to render the template.

    Returns TemplateResult<ResultType>

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

  • Template for rendering the icon for deep linking.

    Parameters

    • editor: SelectiveEditor

      Selective editor used to render the template.

    • data: DeepObject

      Data provided to render the template.

    Returns TemplateResult<ResultType>

templateIconValidation

  • Template for rendering the icon for validation.

    Parameters

    • editor: SelectiveEditor

      Selective editor used to render the template.

    • data: DeepObject

      Data provided to render the template.

    Returns TemplateResult<ResultType>

templateInput

templateInputStructure

  • Template for rendering the field input structure.

    Parameters

    • editor: SelectiveEditor

      Selective editor used to render the template.

    • data: DeepObject

      Data provided to render the template.

    Returns TemplateResult<ResultType>

templateLabel

  • Label on the checkbox field is shown with the checkbox.

    Parameters

    • editor: SelectiveEditor

      Selective editor used to render the template.

    • data: DeepObject

      Data provided to render the template.

    Returns TemplateResult<ResultType>

templateOption

templateOptions

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

  • Template for rendering the field wrapper.

    Parameters

    • editor: SelectiveEditor

      Selective editor used to render the template.

    • data: DeepObject

      Data provided to render the template.

    Returns TemplateResult<ResultType>

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

  • Use the data passed to render to update the original value. Also update the clean value when applicable.

    Parameters

    • editor: SelectiveEditor

      Selective editor used to render the template.

    • data: DeepObject

      Data provided to render the template.

    Returns void

Generated using TypeDoc