File

libs/core/dynamic-form/number-stepper/src/number-stepper.model.ts

Description

Configuration for a dynamic number stepper field.

Extends

Omit

Index

Properties

Properties

decrementAriaLabel (Optional)
Type string
Description

Sets the aria-label for the decrement button.

incrementAriaLabel (Optional)
Type string
Description

Sets the aria-label for the increment button.

inputAriaLabel (Optional)
Type string
Description

Sets the aria-label for the input of the number stepper.

invalidFormatErrorMessage (Optional)
Type string
Description

Custom error message to display when the value has an invalid format.

label
Type string
Description

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

Example :
max (Optional)
Type number
Description

Sets the maximum accepted number in the stepper. Default: 100

min (Optional)
Type number
Description

Sets the minimum accepted number in the stepper. Default: 0

prefix (Optional)
Type string
Description

Optional prefix displayed in the input area

size (Optional)
Type "big" | "normal"
Description

Defines the size of the number stepper ('big' or 'normal'). In retail, the default value is 'big' and in expert the default value is 'normal'

step (Optional)
Type number
Description

Sets the step size. Default: 1

suffix (Optional)
Type string
Description

Optional suffix displayed in the input area

type
Type unknown
Description

Specifies the type of the field as NUMBER_STEPPER.

value (Optional)
Type number
Description

The field's initial value.

valueOutsideRangeErrorMessage (Optional)
Type string
Description

Custom error message to display when the value is not within the allowed range.

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

/**
 * The value to use for the `type` attribute of the number stepper
 * formfield configs.
 */
export const DfNumberStepperTypeName = 'NUMBER_STEPPER';

/**
 * Configuration for a dynamic number stepper field.
 */
export interface DfNumberStepperConfig
  extends Omit<DfInteractiveBaseConfig, 'hint' | 'columnSpan'> {
  /**
   * Specifies the type of the field as `NUMBER_STEPPER`.
   */
  type: typeof DfNumberStepperTypeName;

  /**
   * 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;

  /**
   * Sets the maximum accepted number in the stepper. Default: `100`
   */
  max?: number;

  /**
   * Sets the minimum accepted number in the stepper. Default: `0`
   */
  min?: number;

  /**
   * Sets the step size. Default: `1`
   */
  step?: number;

  /**
   * Custom error message to display when the value is not within the allowed range.
   */
  valueOutsideRangeErrorMessage?: string;

  /**
   * Custom error message to display when the value has an invalid format.
   */
  invalidFormatErrorMessage?: string;

  /**
   * Optional suffix displayed in the input area
   */
  suffix?: string;

  /**
   * Optional prefix displayed in the input area
   */
  prefix?: string;

  /**
   * The field's initial value.
   */
  value?: number;

  /**
   * Sets the aria-label for the input of the number stepper.
   */
  inputAriaLabel?: string;

  /**
   * Sets the aria-label for the increment button.
   */
  incrementAriaLabel?: string;

  /**
   * Sets the aria-label for the decrement button.
   */
  decrementAriaLabel?: string;

  /**
   * Defines the size of the number stepper (`'big'` or `'normal'`).
   * In retail, the default value is `'big'` and in expert the default value is `'normal'`
   */
  size?: 'big' | 'normal';
}

results matching ""

    No results matching ""