Options
All
  • Public
  • Public/Protected
  • All
Menu

Module commonControls/dateRangeControl/DateRangeControl

Type aliases

DateRange

DateRange: object

Type declaration

  • Optional endDate?: undefined | string

    The end date

  • Optional startDate?: undefined | string

    The start date

DateRangeControlTargetProps

DateRangeControlTargetProps: object

Type declaration

  • Optional endDate?: string[]

    Target-slot values associated with the end date in isolation.

    Targets associate utterances to a control. For example, if the user says "change the time", it is parsed as a GeneralControlIntent with slot values action = change and target = time. Only controls that are registered with the time target should offer to handle this intent.

    Default: ['builtin_end_date', 'builtin_date', 'builtin_it']

    Usage:

    • If this prop is defined, it replaces the default; it is not additive the defaults. To add an additional target to the defaults, copy the defaults and amend.
    • A control can be associated with many target-slot-values, eg ['date', 'startDate', 'eventStartDate', 'vacationStart']
    • It is a good idea to associate with general targets (e.g. date) and also with specific targets (e.g. vacationStart) so that the user can say either general or specific things. e.g. 'change the date to Tuesday', or 'I want my vacation to start on Tuesday'.
    • The association does not have to be exclusive, and general target slot values will often be associated with many controls. In situations where there is ambiguity about what the user is referring to, the parent controls must resolve the confusion.
    • The 'builtin_*' IDs are associated with default interaction model data (which can be extended as desired). Any other IDs will require a full definition of the allowed synonyms in the interaction model.

    Control behavior:

    • A control will not handle an input that mentions a target that is not registered by this prop.
  • Optional self?: string[]

    Target-slot values associated with the control as a whole, i.e. the date range.

    Targets associate utterances to a control. For example, if the user says "change the time", it is parsed as a GeneralControlIntent with slot values action = change and target = time. Only controls that are registered with the time target should offer to handle this intent.

    Default: ['builtin_date_range', 'builtin_date', 'builtin_it']

    Usage:

    • If this prop is defined, it replaces the default; it is not additive the defaults. To add an additional target to the defaults, copy the defaults and amend.
    • A control can be associated with many target-slot-values, eg ['date', 'startDate', 'eventStartDate', 'vacationStart']
    • It is a good idea to associate with general targets (e.g. date) and also with specific targets (e.g. vacationStart) so that the user can say either general or specific things. e.g. 'change the date to Tuesday', or 'I want my vacation to start on Tuesday'.
    • The association does not have to be exclusive, and general target slot values will often be associated with many controls. In situations where there is ambiguity about what the user is referring to, the parent controls must resolve the confusion.
    • The 'builtin_*' IDs are associated with default interaction model data (which can be extended as desired). Any other IDs will require a full definition of the allowed synonyms in the interaction model.

    Control behavior:

    • A control will not handle an input that mentions a target that is not registered by this prop.
  • Optional startDate?: string[]

    Target-slot values associated with the start date in isolation.

    Targets associate utterances to a control. For example, if the user says "change the time", it is parsed as a GeneralControlIntent with slot values action = change and target = time. Only controls that are registered with the time target should offer to handle this intent.

    Default: ['builtin_start_date', 'builtin_date', 'builtin_it']

    Usage:

    • If this prop is defined, it replaces the default; it is not additive the defaults. To add an additional target to the defaults, copy the defaults and amend.
    • A control can be associated with many target-slot-values, eg ['date', 'startDate', 'eventStartDate', 'vacationStart']
    • It is a good idea to associate with general targets (e.g. date) and also with specific targets (e.g. vacationStart) so that the user can say either general or specific things. e.g. 'change the date to Tuesday', or 'I want my vacation to start on Tuesday'.
    • The association does not have to be exclusive, and general target slot values will often be associated with many controls. In situations where there is ambiguity about what the user is referring to, the parent controls must resolve the confusion.
    • The 'builtin_*' IDs are associated with default interaction model data (which can be extended as desired). Any other IDs will require a full definition of the allowed synonyms in the interaction model.

    Control behavior:

    • A control will not handle an input that mentions a target that is not registered by this prop.