import { ControlResponseBuilder } from '../..'; import { ControlInput } from '../../controls/ControlInput'; import { AplContent, MultiValueListAPLComponentProps, MultiValueListControl } from './MultiValueListControl'; export declare namespace MultiValueListControlAPLPropsBuiltIns { interface DefaultSelectValueAPLProps { /** * Default: 'Create your list' */ title?: string; /** * Default (en-*): 'Done;' */ submitButtonText?: string; /** * Default: 'Say an item or touch it to add it your list' */ subtitle?: string; /** * Default: 'YOUR SELECTIONS' */ selectionListTitle?: string; /** * Default: 'Swipe left to remove items' */ selectionListSubtitle?: string; /** * Whether debug information is displayed * * Default: false */ debug?: boolean; /** * Function that maps the MultiValueListControlState.value to rendered value that * will be presented to the user as a list. * * Default: returns the value unchanged. */ valueRenderer: (choice: string, input: ControlInput) => string; } function defaultSelectValueAPLContent(props: DefaultSelectValueAPLProps): (control: MultiValueListControl, input: ControlInput) => AplContent; /** * The APL dataSource to use when requesting a value * * Default: A TextListLayout data source to bind to an APL document. * See * https://developer.amazon.com/en-US/docs/alexa/alexa-presentation-language/apl-data-source.html */ function multiValueListDataSourceGenerator(control: MultiValueListControl, input: ControlInput, contentProps: DefaultSelectValueAPLProps): { general: { headerTitle: string | undefined; headerSubtitle: string | undefined; selectionListTitle: string | undefined; selectionListSubtitle: string | undefined; controlId: string; }; choices: { listItems: { primaryText: string; }[]; }; selections: { listItems: { primaryText: string; }[]; }; }; /** * The APL document to use when selecting a value * * Default: A dual-TextListLayout document one with scrollable and clickable list and another with swipeAction to remove items from list. * See * https://developer.amazon.com/en-US/docs/alexa/alexa-presentation-language/apl-alexa-text-list-layout.html */ function multiValueListDocumentGenerator(control: MultiValueListControl, input: ControlInput): { type: string; version: string; import: { name: string; version: string; }[]; layouts: {}; mainTemplate: { parameters: string[]; items: { type: string; width: string; id: string; bind: ({ name: string; type: string; value: string; } | { name: string; type: string; value: boolean; })[]; items: ({ type: string; headerDivider?: undefined; headerTitle?: undefined; headerSubtitle?: undefined; height?: undefined; buttonText?: undefined; id?: undefined; primaryAction?: undefined; right?: undefined; top?: undefined; position?: undefined; text?: undefined; display?: undefined; paddingRight?: undefined; paddingTop?: undefined; direction?: undefined; width?: undefined; shrink?: undefined; items?: undefined; } | { type: string; headerDivider: boolean; headerTitle: string; headerSubtitle: string; height: string; buttonText?: undefined; id?: undefined; primaryAction?: undefined; right?: undefined; top?: undefined; position?: undefined; text?: undefined; display?: undefined; paddingRight?: undefined; paddingTop?: undefined; direction?: undefined; width?: undefined; shrink?: undefined; items?: undefined; } | { type: string; buttonText: string; id: string; primaryAction: { type: string; commands: ({ type: string; arguments: string[]; componentId?: undefined; property?: undefined; value?: undefined; } | { type: string; componentId: string; property: string; value: boolean; arguments?: undefined; } | { type: string; componentId: string; property: string; value: string; arguments?: undefined; })[]; }; right: string; top: string; position: string; headerDivider?: undefined; headerTitle?: undefined; headerSubtitle?: undefined; height?: undefined; text?: undefined; display?: undefined; paddingRight?: undefined; paddingTop?: undefined; direction?: undefined; width?: undefined; shrink?: undefined; items?: undefined; } | { type: string; id: string; text: string; display: string; position: string; right: string; headerDivider?: undefined; headerTitle?: undefined; headerSubtitle?: undefined; height?: undefined; buttonText?: undefined; primaryAction?: undefined; top?: undefined; paddingRight?: undefined; paddingTop?: undefined; direction?: undefined; width?: undefined; shrink?: undefined; items?: undefined; } | { type: string; paddingRight: string; paddingTop: string; direction: string; width: string; shrink: number; items: ({ type: string; width: string; height: string; items: { type: string; scrollDirection: string; data: string; width: string; paddingLeft: string; numbered: boolean; grow: number; items: { type: string; items: { type: string; touchForward: boolean; disabled: string; primaryText: string; primaryAction: { type: string; commands: ({ type: string; arguments: string[]; componentId?: undefined; property?: undefined; value?: undefined; } | { type: string; componentId: string; property: string; value: boolean; arguments?: undefined; } | { type: string; componentId: string; property: string; value: string; arguments?: undefined; })[]; }; }[]; }[]; }[]; } | { type: string; width: string; height: string; items: ({ type: string; backgroundColor: string; style?: undefined; color?: undefined; textAlign?: undefined; textAlignVertical?: undefined; maxLines?: undefined; paddingTop?: undefined; text?: undefined; scrollDirection?: undefined; data?: undefined; width?: undefined; paddingLeft?: undefined; numbered?: undefined; grow?: undefined; items?: undefined; } | { type: string; style: string; color: string; textAlign: string; textAlignVertical: string; maxLines: number; paddingTop: string; text: string; backgroundColor?: undefined; scrollDirection?: undefined; data?: undefined; width?: undefined; paddingLeft?: undefined; numbered?: undefined; grow?: undefined; items?: undefined; } | { type: string; style: string; color: string; textAlign: string; textAlignVertical: string; maxLines: number; text: string; backgroundColor?: undefined; paddingTop?: undefined; scrollDirection?: undefined; data?: undefined; width?: undefined; paddingLeft?: undefined; numbered?: undefined; grow?: undefined; items?: undefined; } | { type: string; scrollDirection: string; data: string; width: string; paddingLeft: string; numbered: boolean; grow: number; items: { type: string; items: { type: string; touchForward: boolean; hideOrdinal: boolean; theme: string; actionIconType: string; actionIcon: string; actionIconBackground: string; disabled: string; primaryText: string; onSwipeDone: { type: string; commands: ({ type: string; arguments: string[]; componentId?: undefined; property?: undefined; value?: undefined; } | { type: string; componentId: string; property: string; value: boolean; arguments?: undefined; } | { type: string; componentId: string; property: string; value: string; arguments?: undefined; })[]; }; }[]; }[]; backgroundColor?: undefined; style?: undefined; color?: undefined; textAlign?: undefined; textAlignVertical?: undefined; maxLines?: undefined; paddingTop?: undefined; text?: undefined; })[]; })[]; headerDivider?: undefined; headerTitle?: undefined; headerSubtitle?: undefined; height?: undefined; buttonText?: undefined; id?: undefined; primaryAction?: undefined; right?: undefined; top?: undefined; position?: undefined; text?: undefined; display?: undefined; })[]; }[]; }; graphics: { cancel: { type: string; version: string; width: number; height: number; parameters: string[]; items: { type: string; fill: string; pathData: string; }[]; }; }; }; } /** * Namespace which define built-in renderers for APL Component Mode. */ export declare namespace MultiValueListControlComponentAPLBuiltIns { /** * Function which returns an APL component using AlexaCheckbox Layout. * * @param control - MultiValueListControl * @param props - Control context props e.g valueRenderer * @param input - Input * @param resultBuilder - Result builder */ function renderCheckBoxComponent(control: MultiValueListControl, props: MultiValueListAPLComponentProps, input: ControlInput, resultBuilder: ControlResponseBuilder): { type: string; controlId: string; listItems: { primaryText: string; checked: boolean; }[]; }; /** * Function which returns an APL component using dualTextList Layout. * * @param control - MultiValueListControl * @param props - Control context props e.g valueRenderer * @param input - Input * @param resultBuilder - Result builder */ function dualTextListComponent(control: MultiValueListControl, props: MultiValueListAPLComponentProps, input: ControlInput, resultBuilder: ControlResponseBuilder): { type: string; controlId: string; payload: { general: { headerTitle: string; headerSubtitle: string; selectionListTitle: string; selectionListSubtitle: string; controlId: string; }; choices: { listItems: { primaryText: string; }[]; }; selections: { listItems: { primaryText: string; }[]; }; }; }; /** * Function which returns an APL component using AlexaIconButton Layout * providing increment/decrement buttons for listItems. * * @param control - MultiValueListControl * @param props - Control context props e.g valueRenderer * @param input - Input * @param resultBuilder - Result builder */ function aggregateDuplicatesComponent(control: MultiValueListControl, props: MultiValueListAPLComponentProps, input: ControlInput, resultBuilder: ControlResponseBuilder): { type: string; controlId: string; listItems: { primaryText: string; value: number; }[]; }; /** * Defines DualTextListRenderer for APLComponentMode. */ class DualTextListRender { /** * Provides a default implementation of dualTextList with default props. * * @param control - ListControl * @param defaultProps - props * @param input - Input * @param resultBuilder - Result builder */ static default: (control: MultiValueListControl, defaultProps: MultiValueListAPLComponentProps, input: ControlInput, resultBuilder: ControlResponseBuilder) => { type: string; controlId: string; payload: { general: { headerTitle: string; headerSubtitle: string; selectionListTitle: string; selectionListSubtitle: string; controlId: string; }; choices: { listItems: { primaryText: string; }[]; }; selections: { listItems: { primaryText: string; }[]; }; }; }; /** * Provides customization over `dualTextListComponent()` arguments where the input * props overrides the defaults. * * @param props - props */ static of(props: MultiValueListAPLComponentProps): (control: MultiValueListControl, defaultProps: MultiValueListAPLComponentProps, input: ControlInput, resultBuilder: ControlResponseBuilder) => { type: string; controlId: string; payload: { general: { headerTitle: string; headerSubtitle: string; selectionListTitle: string; selectionListSubtitle: string; controlId: string; }; choices: { listItems: { primaryText: string; }[]; }; selections: { listItems: { primaryText: string; }[]; }; }; }; } /** * Defines CheckBoxRenderer for APLComponentMode. * * Provides methods to render APL components using AlexaCheckbox layouts. */ class CheckBoxRenderer { /** * Provides a default implementation of CheckBox-textList with default props. * * @param control - ListControl * @param defaultProps - props * @param input - Input * @param resultBuilder - Result builder */ static default: (control: MultiValueListControl, defaultProps: MultiValueListAPLComponentProps, input: ControlInput, resultBuilder: ControlResponseBuilder) => { type: string; controlId: string; listItems: { primaryText: string; checked: boolean; }[]; }; /** * Provides customization over `renderCheckBoxComponent()` arguments where the input * props overrides the defaults. * * @param props - props */ static of(props: MultiValueListAPLComponentProps): (control: MultiValueListControl, defaultProps: MultiValueListAPLComponentProps, input: ControlInput, resultBuilder: ControlResponseBuilder) => { type: string; controlId: string; listItems: { primaryText: string; checked: boolean; }[]; }; } /** * Defines AggregateDuplicatesRenderer for APLComponentMode. * * Provides methods to render APL components using AlexaIconButton layouts. */ class AggregateDuplicatesRenderer { /** * Provides a default implementation of aggregateDuplicates-textList with default props. * * Usage: * - This is used to render list items where duplicates counts of item selections * are allowed. * - Returns a textList layout with increment and decrement alexaIcons on each listItem. * * @param control - ListControl * @param defaultProps - props * @param input - Input * @param resultBuilder - Result builder */ static default: (control: MultiValueListControl, defaultProps: MultiValueListAPLComponentProps, input: ControlInput, resultBuilder: ControlResponseBuilder) => { type: string; controlId: string; listItems: { primaryText: string; value: number; }[]; }; /** * Provides customization over `aggregateDuplicatesComponent()` arguments where the input * props overrides the defaults. * * @param props - props */ static of(props: MultiValueListAPLComponentProps): (control: MultiValueListControl, defaultProps: MultiValueListAPLComponentProps, input: ControlInput, resultBuilder: ControlResponseBuilder) => { type: string; controlId: string; listItems: { primaryText: string; value: number; }[]; }; } } //# sourceMappingURL=MultiValueListControlAPL.d.ts.map