UNPKG

intentful

Version:

Create Custom Skills with less headache

68 lines (67 loc) 3.56 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AlexaTextList = void 0; const helpers_1 = require("../../../interfaces/helpers"); const component_1 = require("../../component"); class AlexaTextList extends component_1.APLComponent { constructor(props) { super('AlexaTextList', props); } componentSpecificModel() { var _a; return { backgroundAlign: this.props.backgroundAlign, backgroundBlur: this.props.backgroundBlur, backgroundColor: this.props.backgroundColor, backgroundColorOverlay: this.props.backgroundColorOverlay, backgroundImageSource: this.props.backgroundImageSource, backgroundScale: this.props.backgroundScale, backgroundOverlayGradient: this.props.backgroundOverlayGradient, backgroundVideoAudioTrack: this.props.backgroundVideoAudioTrack, backgroundVideoAutoPlay: this.props.backgroundVideoAutoPlay, backgroundVideoSource: this.props.backgroundVideoSource, headerAttributionImage: this.props.headerAttributionImage, headerAttributionOpacity: this.props.headerAttributionOpacity, headerAttributionPrimacy: this.props.headerAttributionPrimacy, headerAttributionText: this.props.headerAttributionText, headerBackButton: this.props.headerBackButton, headerBackButtonAccessibilityLabel: this.props.headerBackButtonAccessibilityLabel, headerBackButtonCommand: this.props.headerBackButtonCommand, headerBackgroundColor: this.props.headerBackgroundColor, hideDivider: this.props.hideDivider, hideOrdinal: this.props.hideOrdinal, headerSubtitle: this.props.headerSubtitle, headerTitle: this.props.headerTitle, listId: this.props.listId, listItems: (_a = this.props.listItems) === null || _a === void 0 ? void 0 : _a.map((item) => item.model()), onSwipeDone: this.props.onSwipeDone, optionsButton1Command: this.props.optionsButton1Command, optionsButton1Text: this.props.optionsButton1Text, optionsButton2Command: this.props.optionsButton2Command, optionsButton2Text: this.props.optionsButton2Text, primaryAction: this.props.primaryAction, speechItems: this.props.speechItems, swipeActionIcon: this.props.swipeActionIcon, swipeActionIconBackground: this.props.swipeActionIconBackground, swipeActionIconForeground: this.props.swipeActionIconForeground, swipeActionIconType: this.props.swipeActionIconType, swipeDirection: this.props.swipeDirection, touchForward: this.props.touchForward }; } componentSpecificRequestHandlers() { var _a; const itemRequestHandlers = (_a = this.props.listItems) === null || _a === void 0 ? void 0 : _a.flatMap((item) => item.getRequestHandlers()); return [ ...(0, helpers_1.convertVideoSourcePropsToRequestHandlers)(this.props.backgroundVideoSource), ...(0, helpers_1.convertCommandListToRequestHandlers)([ this.props.primaryAction, this.props.headerBackButtonCommand, this.props.optionsButton1Command, this.props.optionsButton2Command ]), ...(itemRequestHandlers ? itemRequestHandlers : []) ]; } } exports.AlexaTextList = AlexaTextList;