UNPKG

intentful

Version:

Create Custom Skills with less headache

58 lines (57 loc) 2.93 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AlexaPaginatedLists = void 0; const helpers_1 = require("../../../interfaces/helpers"); const component_1 = require("../../component"); class AlexaPaginatedLists extends component_1.APLComponent { constructor(props) { super('AlexaPaginatedLists', 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, headerDivider: this.props.headerDivider, 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) => { return { primaryText: item.primaryText, secondaryText: item.secondaryText, tertiaryText: item.tertiaryText, imageSource: item.imageSource, primaryAction: item.primaryAction }; }), primaryAction: this.props.primaryAction, speechItems: this.props.speechItems }; } componentSpecificRequestHandlers() { var _a; return [ ...(0, helpers_1.convertVideoSourcePropsToRequestHandlers)(this.props.backgroundVideoSource), ...(0, helpers_1.convertCommandListToRequestHandlers)([this.props.primaryAction]), ...(0, helpers_1.convertCommandListToRequestHandlers)((_a = this.props.listItems) === null || _a === void 0 ? void 0 : _a.map((item) => item.primaryAction)) ]; } } exports.AlexaPaginatedLists = AlexaPaginatedLists;