Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DorfConfigService

It is used in all DORF HTML templates and field compoenents for modyfing fields behavior. Specifies CSS classes for all important elements. It can also disable forms and this is an entry point where additional fields needs to be specified.

stable

Hierarchy

  • DorfConfigService

Implements

Index

Constructors

constructor

Properties

columnsNumber

columnsNumber: number = 1

Form can be rendered with multiple columns. Number of fields within the section should be specified here.

css

css: IDorfGeneralWithButtonsCssClasses = new DorfCssClasses()

General and field-specific CSS classes.

dorfFields

dorfFields: DorfField<DorfDefinitionBase, AnyMetadata>[] = getBuiltInFields() as DorfField<typeof DorfDefinitionBase, typeof AnyMetadata>[]

List of supproted fields defined by DorfFieldDefinition, DorfFieldMetadata, css and tags.

isDisabled

isDisabled: boolean = false

Allows changing form state to disable. Should be set inside field component's constructor.

requiredWithStar

requiredWithStar: boolean

Forces required fields to have dorf-required CSS class, which defines :after pseudoelement with a red star.

Methods

getCssClassForNestedTag

  • Returns the css classes from the service perspective, when tag is nested in group. Priority of classes is always the same:

    1. direct css from metadata
    2. css from group
    3. css from field definition within the group in config service
    4. css from group in config service
    5. css from field definition in config service
    6. css from config service

    Parameters

    • tag: string
    • cssClass: string

    Returns undefined | string | IDorfCommonCssClasses

getCssClassForTag

  • Returns the css classes from the service perspective for a given tag. Priority of classes is always the same:

    1. direct css from metadata
    2. css from group
    3. css from field definition within the group in config service
    4. css from group in config service
    5. css from field definition in config service
    6. css from config service

    Parameters

    • tag: string
    • cssClass: string

    Returns undefined | string | IDorfCommonCssClasses

getFieldForTag

setField

Generated using TypeDoc