File

libs/core/dynamic-form/phone-input/src/phone-input.model.ts

Extends

DfInteractiveBaseConfig

Index

Properties

Properties

areaCodeLabel (Optional)
Type string
Description

Set the text at the top of the dropdown and aria-label of area code field. The default value is 'Area Code'.

countryCode (Optional)
Type CountryCode
Description

The default country code for the phone input.

errorMessage (Optional)
Type string
Description

Custom error message for validation

label
Type string
Description

This field's label. It's translatable by default and supports string interpolation.

Example :
lineNumberLabel (Optional)
Type string
Description

The aria-label of line number field.

placeholder (Optional)
Type string
Description

Placeholder to be displayed in the field when the input is empty. It's translatable by default and supports string interpolation.

Example :
type
Type typeof DfPhoneInputTypeName
Description

Specifies the type of the field as PHONE_INPUT.

value (Optional)
Type string
Description

The field's initial value as a phone number string.

Example :
hint (Optional)
Type string
Description

The hint text to be displayed under the field. It's translatable by default and supports string interpolation.

Example :
note (Optional)
Type string
Description

The note text is displayed in an info message box below the field. It's translatable by default and supports string interpolation.

Example :
onBlurEvent (Optional)
Type DfInteractiveEventConfig
Description

Configure either a PFE action or service activator configuration handler for the field's blur event.

onValueChangesEvent (Optional)
Type DfInteractiveEventConfig
Description

Configure either a PFE action or service activator configuration handler for the field's valueChanges event.

validators (Optional)
Type DynamicFormValidationConfig[]
Description

Validators to set on this form field.

acl (Optional)
Type DfFieldAcl[]
Description

ACL rules to be applied to this field.

columnSpan (Optional)
Type number
Description

This field's custom size.

Number of column(s) the element should span. It's only applicable with the "CUSTOM_COLUMN" layout. The value can be 1-12, following the 12-column grid system. The default value is 12.

id
Type string
Description

This field's ID.

The ID will serve as the ACL resource name for the form field. If the field is a form element, it will also be used as a form control name within the FormGroup to which it is added. IDs must be unique within your form.

Example :
infoIcon (Optional)
Type DfInfoIconConfig
Description

Info icon with associated pop-over.

onInitEvent (Optional)
Type DfInteractiveEventConfig
Description

Configure either a PFE action or service activator configuration handler when the field's ngOnInit method is triggered.

renderName (Optional)
Type string
Description

The optional renderName is added as the attribute "data-render-name" to the df-formfield elements in the DOM. It can be used to find the rendered element of a specific field of a form.

spacing (Optional)
Type DfFormfieldSpacing
Description

This field's custom spacing.

If defined, it will be used to set the spacing between this field and the next one.

testId (Optional)
Type string
Description

The id used to select the element in the tests (unit test, e2e testing)

import { DfInteractiveBaseConfig } from '@allianz/taly-core/dynamic-form';
import { CountryCode } from 'libphonenumber-js';

export const DfPhoneInputTypeName = 'PHONE_INPUT';
export interface DfPhoneInputConfig extends DfInteractiveBaseConfig {
  /**
   * Specifies the type of the field as `PHONE_INPUT`.
   */
  type: typeof DfPhoneInputTypeName;

  /**
   * This field's label.
   * It's translatable by default and supports string interpolation.
   * @examples ["My label", "My label {$['bb-pgr-simple'].person.firstName}"]
   */
  label: string;

  /**
   * Placeholder to be displayed in the field when the input is empty.
   * It's translatable by default and supports string interpolation.
   * @examples ["Placeholder", "Placeholder with dynamic value {$['bb-pgr-simple'].date}"]
   */
  placeholder?: string;

  /**
   * Set the text at the top of the dropdown and aria-label of area code field. The default value is 'Area Code'.
   */
  areaCodeLabel?: string;

  /**
   * The aria-label of line number field.
   */
  lineNumberLabel?: string;

  /**
   * The default country code for the phone input.
   */
  countryCode?: CountryCode;

  /**
   * Custom error message for validation
   */
  errorMessage?: string;

  /**
   * The field's initial value as a phone number string.
   * @examples ["+49123456789"]
   */
  value?: string;
}

results matching ""

    No results matching ""