@microsoft/sp-adaptive-card-extension-base 1.23.2 → 1.24.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eeec822e-c28a-46b4-affc-7058e4c1aa80.manifest.json +137 -142
- package/dist/index-internal-beta.d.ts +2 -6
- package/dist/index-internal-public.d.ts +2 -6
- package/dist/index-internal.d.ts +193 -28
- package/dist/index.d.ts +2 -2
- package/dist/sp-adaptive-card-extension-base_default_be5d2a76104ab20a7df3.js +1 -0
- package/dist/sp-adaptive-card-extension-base_en-us_daf5e5154e82492eea26.js +1 -0
- package/dist/sp-adaptive-card-extension-base_qps-ploc_3f63afdd6f59d8592622.js +1 -0
- package/dist/sp-adaptive-card-extension-base_qps-ploca_0bc9525a6a1a759b7d4f.js +1 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/lib-commonjs/AdaptiveCardExtensionContext.js +66 -99
- package/lib-commonjs/AdaptiveCardExtensionHost.js +52 -60
- package/lib-commonjs/AdaptiveCardExtensionLoader.js +90 -97
- package/lib-commonjs/BaseAdaptiveCardExtension.js +941 -1138
- package/lib-commonjs/ac-template/basicL1Template.js +19 -14
- package/lib-commonjs/ac-template/basicL1TemplateSelectAction.js +19 -14
- package/lib-commonjs/ac-template/common/Constants.js +13 -5
- package/lib-commonjs/ac-template/common/CustomElements.js +63 -51
- package/lib-commonjs/ac-template/imageL1Template.js +19 -14
- package/lib-commonjs/ac-template/imageL1TemplateSelectAction.js +19 -14
- package/lib-commonjs/ac-template/index.js +37 -15
- package/lib-commonjs/ac-template/primaryTextL1Template.js +22 -15
- package/lib-commonjs/ac-template/primaryTextL1TemplateSelectAction.js +22 -15
- package/lib-commonjs/ac-template/searchL1Template.js +21 -20
- package/lib-commonjs/ac-template/textInputL1Template.js +38 -39
- package/lib-commonjs/ac-template/util/actionButtonHelper.js +76 -78
- package/lib-commonjs/ac-template/util/getCardRenderParameters.js +109 -119
- package/lib-commonjs/actionShim/AdaptiveCardExtensionActionShim.js +86 -100
- package/lib-commonjs/actionShim/IActionShimProvider.js +5 -2
- package/lib-commonjs/actionShim/getOnBeforeActionArguments.js +30 -29
- package/lib-commonjs/caching/CacheManager.js +40 -35
- package/lib-commonjs/caching/IAdaptiveCardExtensionCacheObject.js +5 -2
- package/lib-commonjs/caching/ICacheSettings.js +5 -2
- package/lib-commonjs/caching/ICachedLoadParameters.js +11 -4
- package/lib-commonjs/caching/cache/ACEMySiteCacheManager.js +88 -90
- package/lib-commonjs/caching/cache/BaseAdaptiveCardExtensionCache.js +21 -24
- package/lib-commonjs/caching/cache/IAdaptiveCardExtensionCache.js +5 -2
- package/lib-commonjs/caching/cache/LocalStorageACECache.js +56 -64
- package/lib-commonjs/common/Flights.js +27 -16
- package/lib-commonjs/common/Killswitches.js +143 -150
- package/lib-commonjs/components/BarChartComponent.js +68 -72
- package/lib-commonjs/components/BaseComponent.js +15 -15
- package/lib-commonjs/components/CardBarComponent.js +15 -9
- package/lib-commonjs/components/CardButtonComponent.js +26 -23
- package/lib-commonjs/components/DataVisualizationComponent.js +30 -19
- package/lib-commonjs/components/ICardButtonBase.js +5 -2
- package/lib-commonjs/components/LineChartComponent.js +28 -22
- package/lib-commonjs/components/PieChartComponent.js +69 -44
- package/lib-commonjs/components/PoweredByComponent.js +15 -9
- package/lib-commonjs/components/PromptsSetComponent.js +15 -9
- package/lib-commonjs/components/SearchBoxComponent.js +15 -9
- package/lib-commonjs/components/SearchFooterComponent.js +15 -6
- package/lib-commonjs/components/TextComponent.js +15 -9
- package/lib-commonjs/components/TextInputComponent.js +15 -9
- package/lib-commonjs/index.js +201 -91
- package/lib-commonjs/interfaces/CardActionType.js +5 -2
- package/lib-commonjs/interfaces/IActionArguments.js +5 -2
- package/lib-commonjs/interfaces/IAdaptiveCardExtension.js +5 -2
- package/lib-commonjs/interfaces/IAdaptiveCardExtensionData.js +5 -2
- package/lib-commonjs/interfaces/IAdaptiveCardExtensionImage.js +12 -3
- package/lib-commonjs/interfaces/IAdaptiveCardExtensionLoadContext.js +5 -2
- package/lib-commonjs/interfaces/IAdaptiveCardExtensionPropertiesMetadata.js +5 -2
- package/lib-commonjs/interfaces/IAdaptiveCardRenderParameters.js +5 -2
- package/lib-commonjs/interfaces/IBaseCardParameters.js +10 -3
- package/lib-commonjs/interfaces/ICardButton.js +5 -2
- package/lib-commonjs/interfaces/ICardRenderParameters.js +5 -2
- package/lib-commonjs/interfaces/IFocusParameters.js +6 -4
- package/lib-commonjs/interfaces/IGetLocationActionTypes.js +5 -2
- package/lib-commonjs/interfaces/IHostContext.js +13 -3
- package/lib-commonjs/interfaces/ILocation.js +6 -4
- package/lib-commonjs/interfaces/INotificationTypes.js +5 -2
- package/lib-commonjs/interfaces/IOnBeforeActionArguments.js +5 -2
- package/lib-commonjs/interfaces/IQuickViewRenderParameters.js +5 -2
- package/lib-commonjs/interfaces/ISPFxAdaptiveCard.js +5 -2
- package/lib-commonjs/interfaces/ISelectMediaActionTypes.js +13 -10
- package/lib-commonjs/interfaces/ISelectionActionTemplateAdaptiveCard.js +5 -2
- package/lib-commonjs/interfaces/IShowLocationActionTypes.js +5 -2
- package/lib-commonjs/interfaces/InternalTypes.js +9 -3
- package/lib-commonjs/isolation/IsolatedAdaptiveCardExtensionService.js +396 -399
- package/lib-commonjs/isolation/RenderArgumentsUtils.js +99 -86
- package/lib-commonjs/isolation/interfaces/IBot.js +6 -4
- package/lib-commonjs/isolation/interfaces/IIsolatedAction.js +5 -2
- package/lib-commonjs/isolation/interfaces/IIsolatedListener.js +5 -2
- package/lib-commonjs/isolation/interfaces/IIsolatedServiceCallbackParameters.js +5 -2
- package/lib-commonjs/isolation/interfaces/ILoadIsolatedAdaptiveCardExtensionParameters.js +5 -2
- package/lib-commonjs/isolation/interfaces/IRenderIsolatedQuickViewParameters.js +13 -3
- package/lib-commonjs/isolation/interfaces/IsolatedAdaptiveCardExtensionApplicationMessageEvent.js +5 -2
- package/lib-commonjs/isolation/interfaces/IsolatedServiceMessageEvent.js +5 -2
- package/lib-commonjs/test-api/AdaptiveCardExtensionTestWrapper.js +95 -123
- package/lib-commonjs/test-api/MockAdaptiveCardExtensionManifestInstance.js +22 -11
- package/lib-commonjs/test-api/index.js +12 -5
- package/lib-commonjs/utilities/StringHelper.js +13 -10
- package/lib-commonjs/views/base/BaseView.js +46 -76
- package/lib-commonjs/views/card/BaseBasicCardView.js +37 -52
- package/lib-commonjs/views/card/BaseCardView.js +56 -81
- package/lib-commonjs/views/card/BaseComponentsCardView.js +41 -39
- package/lib-commonjs/views/card/BaseImageCardView.js +38 -54
- package/lib-commonjs/views/card/BasePrimaryTextCardView.js +37 -54
- package/lib-commonjs/views/card/BaseTemplateCardView.js +47 -67
- package/lib-commonjs/views/card/DefaultCardView.js +24 -29
- package/lib-commonjs/views/card/parameters/BaseParameters.js +5 -2
- package/lib-commonjs/views/card/parameters/CardViewParametersProcessors.js +26 -31
- package/lib-commonjs/views/card/parameters/DataVisualizationParameters.js +75 -76
- package/lib-commonjs/views/card/parameters/FocusedParameters.js +53 -35
- package/lib-commonjs/views/card/parameters/GenericTemplates.js +87 -70
- package/lib-commonjs/views/interfaces/IAdaptiveCardExtensionActionView.js +5 -2
- package/lib-commonjs/views/interfaces/IAdaptiveCardExtensionDataView.js +5 -2
- package/lib-commonjs/views/interfaces/INavigationBarProperties.js +5 -2
- package/lib-commonjs/views/interfaces/IViewNavigator.js +5 -2
- package/lib-commonjs/views/navigator/QuickViewNavigator.js +22 -28
- package/lib-commonjs/views/navigator/ViewNavigator.js +138 -193
- package/lib-commonjs/views/navigator/ViewRegistry.js +25 -26
- package/lib-commonjs/views/quickView/BaseAdaptiveCardQuickView.js +64 -88
- package/lib-commonjs/views/quickView/BaseQuickView.js +32 -46
- package/lib-commonjs/views/quickView/BaseWebQuickView.js +47 -59
- package/{lib → lib-dts}/AdaptiveCardExtensionContext.d.ts +1 -5
- package/{lib → lib-dts}/BaseAdaptiveCardExtension.d.ts +2 -1
- package/lib-esm/AdaptiveCardExtensionContext.js +67 -0
- package/lib-esm/AdaptiveCardExtensionHost.js +65 -0
- package/{lib → lib-esm}/AdaptiveCardExtensionLoader.js +56 -74
- package/lib-esm/BaseAdaptiveCardExtension.js +1237 -0
- package/{lib → lib-esm}/ac-template/basicL1Template.js +6 -4
- package/{lib → lib-esm}/ac-template/basicL1TemplateSelectAction.js +6 -4
- package/{lib → lib-esm}/ac-template/common/Constants.js +3 -2
- package/{lib → lib-esm}/ac-template/common/CustomElements.js +26 -30
- package/{lib → lib-esm}/ac-template/imageL1Template.js +6 -4
- package/{lib → lib-esm}/ac-template/imageL1TemplateSelectAction.js +6 -4
- package/{lib → lib-esm}/ac-template/index.js +2 -1
- package/{lib → lib-esm}/ac-template/primaryTextL1Template.js +10 -5
- package/{lib → lib-esm}/ac-template/primaryTextL1TemplateSelectAction.js +10 -5
- package/{lib → lib-esm}/ac-template/searchL1Template.js +7 -7
- package/{lib → lib-esm}/ac-template/textInputL1Template.js +10 -13
- package/{lib → lib-esm}/ac-template/util/actionButtonHelper.js +45 -57
- package/{lib → lib-esm}/ac-template/util/getCardRenderParameters.js +75 -92
- package/{lib → lib-esm}/actionShim/AdaptiveCardExtensionActionShim.js +74 -87
- package/lib-esm/actionShim/IActionShimProvider.js +7 -0
- package/{lib → lib-esm}/actionShim/getOnBeforeActionArguments.js +22 -25
- package/lib-esm/caching/CacheManager.js +55 -0
- package/lib-esm/caching/IAdaptiveCardExtensionCacheObject.js +7 -0
- package/lib-esm/caching/ICacheSettings.js +5 -0
- package/{lib → lib-esm}/caching/ICachedLoadParameters.js +2 -1
- package/lib-esm/caching/cache/ACEMySiteCacheManager.js +130 -0
- package/{lib → lib-esm}/caching/cache/BaseAdaptiveCardExtensionCache.js +10 -16
- package/lib-esm/caching/cache/IAdaptiveCardExtensionCache.js +7 -0
- package/lib-esm/caching/cache/LocalStorageACECache.js +73 -0
- package/{lib → lib-esm}/common/Flights.js +6 -8
- package/{lib → lib-esm}/common/Killswitches.js +37 -105
- package/lib-esm/components/BarChartComponent.js +112 -0
- package/{lib → lib-esm}/components/BaseComponent.js +8 -4
- package/lib-esm/components/CardBarComponent.js +10 -0
- package/{lib → lib-esm}/components/CardButtonComponent.js +9 -9
- package/lib-esm/components/DataVisualizationComponent.js +26 -0
- package/lib-esm/components/ICardButtonBase.js +7 -0
- package/lib-esm/components/LineChartComponent.js +29 -0
- package/lib-esm/components/PieChartComponent.js +115 -0
- package/lib-esm/components/PoweredByComponent.js +10 -0
- package/lib-esm/components/PromptsSetComponent.js +10 -0
- package/lib-esm/components/SearchBoxComponent.js +10 -0
- package/lib-esm/components/SearchFooterComponent.js +8 -0
- package/lib-esm/components/TextComponent.js +10 -0
- package/lib-esm/components/TextInputComponent.js +10 -0
- package/{lib → lib-esm}/index.js +3 -3
- package/lib-esm/interfaces/CardActionType.js +5 -0
- package/lib-esm/interfaces/IActionArguments.js +7 -0
- package/lib-esm/interfaces/IAdaptiveCardExtension.js +7 -0
- package/lib-esm/interfaces/IAdaptiveCardExtensionData.js +5 -0
- package/lib-esm/interfaces/IAdaptiveCardExtensionImage.js +15 -0
- package/lib-esm/interfaces/IAdaptiveCardExtensionLoadContext.js +5 -0
- package/lib-esm/interfaces/IAdaptiveCardExtensionPropertiesMetadata.js +7 -0
- package/lib-esm/interfaces/IAdaptiveCardRenderParameters.js +5 -0
- package/lib-esm/interfaces/IBaseCardParameters.js +11 -0
- package/lib-esm/interfaces/ICardButton.js +6 -0
- package/lib-esm/interfaces/ICardRenderParameters.js +6 -0
- package/{lib → lib-esm}/interfaces/IFocusParameters.js +3 -3
- package/lib-esm/interfaces/IGetLocationActionTypes.js +7 -0
- package/lib-esm/interfaces/IHostContext.js +15 -0
- package/lib-esm/interfaces/ILocation.js +6 -0
- package/lib-esm/interfaces/INotificationTypes.js +9 -0
- package/lib-esm/interfaces/IOnBeforeActionArguments.js +7 -0
- package/lib-esm/interfaces/IQuickViewRenderParameters.js +5 -0
- package/lib-esm/interfaces/ISPFxAdaptiveCard.js +7 -0
- package/{lib → lib-esm}/interfaces/ISelectMediaActionTypes.js +3 -7
- package/lib-esm/interfaces/ISelectionActionTemplateAdaptiveCard.js +5 -0
- package/lib-esm/interfaces/IShowLocationActionTypes.js +9 -0
- package/lib-esm/interfaces/InternalTypes.js +6 -0
- package/lib-esm/isolation/IsolatedAdaptiveCardExtensionService.js +505 -0
- package/{lib → lib-esm}/isolation/RenderArgumentsUtils.js +79 -71
- package/{lib → lib-esm}/isolation/interfaces/IBot.js +3 -3
- package/lib-esm/isolation/interfaces/IIsolatedAction.js +5 -0
- package/lib-esm/isolation/interfaces/IIsolatedListener.js +7 -0
- package/lib-esm/isolation/interfaces/IIsolatedServiceCallbackParameters.js +5 -0
- package/lib-esm/isolation/interfaces/ILoadIsolatedAdaptiveCardExtensionParameters.js +7 -0
- package/lib-esm/isolation/interfaces/IRenderIsolatedQuickViewParameters.js +10 -0
- package/lib-esm/isolation/interfaces/IsolatedAdaptiveCardExtensionApplicationMessageEvent.js +5 -0
- package/lib-esm/isolation/interfaces/IsolatedServiceMessageEvent.js +5 -0
- package/lib-esm/test-api/AdaptiveCardExtensionTestWrapper.js +125 -0
- package/{lib → lib-esm}/test-api/MockAdaptiveCardExtensionManifestInstance.js +12 -8
- package/{lib → lib-esm}/test-api/index.js +2 -1
- package/lib-esm/utilities/StringHelper.js +8 -0
- package/lib-esm/views/base/BaseView.js +47 -0
- package/lib-esm/views/card/BaseBasicCardView.js +51 -0
- package/lib-esm/views/card/BaseCardView.js +59 -0
- package/lib-esm/views/card/BaseComponentsCardView.js +43 -0
- package/{lib → lib-esm}/views/card/BaseImageCardView.js +24 -36
- package/{lib → lib-esm}/views/card/BasePrimaryTextCardView.js +23 -35
- package/lib-esm/views/card/BaseTemplateCardView.js +65 -0
- package/lib-esm/views/card/DefaultCardView.js +19 -0
- package/lib-esm/views/card/parameters/BaseParameters.js +7 -0
- package/lib-esm/views/card/parameters/CardViewParametersProcessors.js +30 -0
- package/{lib → lib-esm}/views/card/parameters/DataVisualizationParameters.js +41 -35
- package/lib-esm/views/card/parameters/FocusedParameters.js +58 -0
- package/{lib → lib-esm}/views/card/parameters/GenericTemplates.js +59 -34
- package/lib-esm/views/interfaces/IAdaptiveCardExtensionActionView.js +7 -0
- package/lib-esm/views/interfaces/IAdaptiveCardExtensionDataView.js +7 -0
- package/lib-esm/views/interfaces/INavigationBarProperties.js +5 -0
- package/lib-esm/views/interfaces/IViewNavigator.js +5 -0
- package/lib-esm/views/navigator/QuickViewNavigator.js +22 -0
- package/lib-esm/views/navigator/ViewNavigator.js +174 -0
- package/lib-esm/views/navigator/ViewRegistry.js +26 -0
- package/lib-esm/views/quickView/BaseAdaptiveCardQuickView.js +65 -0
- package/lib-esm/views/quickView/BaseQuickView.js +28 -0
- package/lib-esm/views/quickView/BaseWebQuickView.js +49 -0
- package/package.json +53 -18
- package/dist/index.js +0 -8
- package/dist/sp-adaptive-card-extension-base_default_80cb284b0ce5185f01a3.js +0 -1
- package/dist/sp-adaptive-card-extension-base_en-us_f42ce38c47d8423e6856.js +0 -1
- package/dist/sp-adaptive-card-extension-base_qps-ploc_256d38b669b67722cc35.js +0 -1
- package/dist/sp-adaptive-card-extension-base_qps-ploca_d709c1c8a8609f16e251.js +0 -1
- package/dist/test-api/AdaptiveCardExtensionTestWrapper.js +0 -155
- package/dist/test-api/MockAdaptiveCardExtensionManifestInstance.js +0 -23
- package/dist/test-api/index.js +0 -6
- package/lib/AdaptiveCardExtensionContext.d.ts.map +0 -1
- package/lib/AdaptiveCardExtensionContext.js +0 -103
- package/lib/AdaptiveCardExtensionHost.d.ts.map +0 -1
- package/lib/AdaptiveCardExtensionHost.js +0 -76
- package/lib/AdaptiveCardExtensionLoader.d.ts.map +0 -1
- package/lib/BaseAdaptiveCardExtension.d.ts.map +0 -1
- package/lib/BaseAdaptiveCardExtension.js +0 -1433
- package/lib/ac-template/basicL1Template.d.ts.map +0 -1
- package/lib/ac-template/basicL1TemplateSelectAction.d.ts.map +0 -1
- package/lib/ac-template/common/Constants.d.ts.map +0 -1
- package/lib/ac-template/common/CustomElements.d.ts.map +0 -1
- package/lib/ac-template/imageL1Template.d.ts.map +0 -1
- package/lib/ac-template/imageL1TemplateSelectAction.d.ts.map +0 -1
- package/lib/ac-template/index.d.ts.map +0 -1
- package/lib/ac-template/primaryTextL1Template.d.ts.map +0 -1
- package/lib/ac-template/primaryTextL1TemplateSelectAction.d.ts.map +0 -1
- package/lib/ac-template/searchL1Template.d.ts.map +0 -1
- package/lib/ac-template/textInputL1Template.d.ts.map +0 -1
- package/lib/ac-template/util/actionButtonHelper.d.ts.map +0 -1
- package/lib/ac-template/util/getCardRenderParameters.d.ts.map +0 -1
- package/lib/actionShim/AdaptiveCardExtensionActionShim.d.ts.map +0 -1
- package/lib/actionShim/IActionShimProvider.d.ts.map +0 -1
- package/lib/actionShim/IActionShimProvider.js +0 -2
- package/lib/actionShim/getOnBeforeActionArguments.d.ts.map +0 -1
- package/lib/caching/CacheManager.d.ts.map +0 -1
- package/lib/caching/CacheManager.js +0 -57
- package/lib/caching/IAdaptiveCardExtensionCacheObject.d.ts.map +0 -1
- package/lib/caching/IAdaptiveCardExtensionCacheObject.js +0 -2
- package/lib/caching/ICacheSettings.d.ts.map +0 -1
- package/lib/caching/ICacheSettings.js +0 -2
- package/lib/caching/ICachedLoadParameters.d.ts.map +0 -1
- package/lib/caching/cache/ACEMySiteCacheManager.d.ts.map +0 -1
- package/lib/caching/cache/ACEMySiteCacheManager.js +0 -135
- package/lib/caching/cache/BaseAdaptiveCardExtensionCache.d.ts.map +0 -1
- package/lib/caching/cache/IAdaptiveCardExtensionCache.d.ts.map +0 -1
- package/lib/caching/cache/IAdaptiveCardExtensionCache.js +0 -2
- package/lib/caching/cache/LocalStorageACECache.d.ts.map +0 -1
- package/lib/caching/cache/LocalStorageACECache.js +0 -84
- package/lib/common/Flights.d.ts.map +0 -1
- package/lib/common/Killswitches.d.ts.map +0 -1
- package/lib/components/BarChartComponent.d.ts.map +0 -1
- package/lib/components/BarChartComponent.js +0 -125
- package/lib/components/BaseComponent.d.ts.map +0 -1
- package/lib/components/CardBarComponent.d.ts.map +0 -1
- package/lib/components/CardBarComponent.js +0 -8
- package/lib/components/CardButtonComponent.d.ts.map +0 -1
- package/lib/components/DataVisualizationComponent.d.ts.map +0 -1
- package/lib/components/DataVisualizationComponent.js +0 -24
- package/lib/components/ICardButtonBase.d.ts.map +0 -1
- package/lib/components/ICardButtonBase.js +0 -2
- package/lib/components/LineChartComponent.d.ts.map +0 -1
- package/lib/components/LineChartComponent.js +0 -32
- package/lib/components/PieChartComponent.d.ts.map +0 -1
- package/lib/components/PieChartComponent.js +0 -99
- package/lib/components/PoweredByComponent.d.ts.map +0 -1
- package/lib/components/PoweredByComponent.js +0 -8
- package/lib/components/PromptsSetComponent.d.ts.map +0 -1
- package/lib/components/PromptsSetComponent.js +0 -8
- package/lib/components/SearchBoxComponent.d.ts.map +0 -1
- package/lib/components/SearchBoxComponent.js +0 -8
- package/lib/components/SearchFooterComponent.d.ts.map +0 -1
- package/lib/components/SearchFooterComponent.js +0 -5
- package/lib/components/TextComponent.d.ts.map +0 -1
- package/lib/components/TextComponent.js +0 -8
- package/lib/components/TextInputComponent.d.ts.map +0 -1
- package/lib/components/TextInputComponent.js +0 -8
- package/lib/index.d.ts.map +0 -1
- package/lib/interfaces/CardActionType.d.ts.map +0 -1
- package/lib/interfaces/CardActionType.js +0 -2
- package/lib/interfaces/IActionArguments.d.ts.map +0 -1
- package/lib/interfaces/IActionArguments.js +0 -2
- package/lib/interfaces/IAdaptiveCardExtension.d.ts.map +0 -1
- package/lib/interfaces/IAdaptiveCardExtension.js +0 -2
- package/lib/interfaces/IAdaptiveCardExtensionData.d.ts.map +0 -1
- package/lib/interfaces/IAdaptiveCardExtensionData.js +0 -2
- package/lib/interfaces/IAdaptiveCardExtensionImage.d.ts.map +0 -1
- package/lib/interfaces/IAdaptiveCardExtensionImage.js +0 -2
- package/lib/interfaces/IAdaptiveCardExtensionLoadContext.d.ts.map +0 -1
- package/lib/interfaces/IAdaptiveCardExtensionLoadContext.js +0 -2
- package/lib/interfaces/IAdaptiveCardExtensionPropertiesMetadata.d.ts.map +0 -1
- package/lib/interfaces/IAdaptiveCardExtensionPropertiesMetadata.js +0 -2
- package/lib/interfaces/IAdaptiveCardRenderParameters.d.ts.map +0 -1
- package/lib/interfaces/IAdaptiveCardRenderParameters.js +0 -2
- package/lib/interfaces/IBaseCardParameters.d.ts.map +0 -1
- package/lib/interfaces/IBaseCardParameters.js +0 -2
- package/lib/interfaces/ICardButton.d.ts.map +0 -1
- package/lib/interfaces/ICardButton.js +0 -2
- package/lib/interfaces/ICardRenderParameters.d.ts.map +0 -1
- package/lib/interfaces/ICardRenderParameters.js +0 -2
- package/lib/interfaces/IFocusParameters.d.ts.map +0 -1
- package/lib/interfaces/IGetLocationActionTypes.d.ts.map +0 -1
- package/lib/interfaces/IGetLocationActionTypes.js +0 -2
- package/lib/interfaces/IHostContext.d.ts.map +0 -1
- package/lib/interfaces/IHostContext.js +0 -2
- package/lib/interfaces/ILocation.d.ts.map +0 -1
- package/lib/interfaces/ILocation.js +0 -6
- package/lib/interfaces/INotificationTypes.d.ts.map +0 -1
- package/lib/interfaces/INotificationTypes.js +0 -2
- package/lib/interfaces/IOnBeforeActionArguments.d.ts.map +0 -1
- package/lib/interfaces/IOnBeforeActionArguments.js +0 -2
- package/lib/interfaces/IQuickViewRenderParameters.d.ts.map +0 -1
- package/lib/interfaces/IQuickViewRenderParameters.js +0 -2
- package/lib/interfaces/ISPFxAdaptiveCard.d.ts.map +0 -1
- package/lib/interfaces/ISPFxAdaptiveCard.js +0 -2
- package/lib/interfaces/ISelectMediaActionTypes.d.ts.map +0 -1
- package/lib/interfaces/ISelectionActionTemplateAdaptiveCard.d.ts.map +0 -1
- package/lib/interfaces/ISelectionActionTemplateAdaptiveCard.js +0 -2
- package/lib/interfaces/IShowLocationActionTypes.d.ts.map +0 -1
- package/lib/interfaces/IShowLocationActionTypes.js +0 -2
- package/lib/interfaces/InternalTypes.d.ts.map +0 -1
- package/lib/interfaces/InternalTypes.js +0 -2
- package/lib/isolation/IsolatedAdaptiveCardExtensionService.d.ts.map +0 -1
- package/lib/isolation/IsolatedAdaptiveCardExtensionService.js +0 -513
- package/lib/isolation/RenderArgumentsUtils.d.ts.map +0 -1
- package/lib/isolation/interfaces/IBot.d.ts.map +0 -1
- package/lib/isolation/interfaces/IIsolatedAction.d.ts.map +0 -1
- package/lib/isolation/interfaces/IIsolatedAction.js +0 -2
- package/lib/isolation/interfaces/IIsolatedListener.d.ts.map +0 -1
- package/lib/isolation/interfaces/IIsolatedListener.js +0 -2
- package/lib/isolation/interfaces/IIsolatedServiceCallbackParameters.d.ts.map +0 -1
- package/lib/isolation/interfaces/IIsolatedServiceCallbackParameters.js +0 -2
- package/lib/isolation/interfaces/ILoadIsolatedAdaptiveCardExtensionParameters.d.ts.map +0 -1
- package/lib/isolation/interfaces/ILoadIsolatedAdaptiveCardExtensionParameters.js +0 -2
- package/lib/isolation/interfaces/IRenderIsolatedQuickViewParameters.d.ts.map +0 -1
- package/lib/isolation/interfaces/IRenderIsolatedQuickViewParameters.js +0 -2
- package/lib/isolation/interfaces/IsolatedAdaptiveCardExtensionApplicationMessageEvent.d.ts.map +0 -1
- package/lib/isolation/interfaces/IsolatedAdaptiveCardExtensionApplicationMessageEvent.js +0 -2
- package/lib/isolation/interfaces/IsolatedServiceMessageEvent.d.ts.map +0 -1
- package/lib/isolation/interfaces/IsolatedServiceMessageEvent.js +0 -2
- package/lib/test-api/AdaptiveCardExtensionTestWrapper.d.ts.map +0 -1
- package/lib/test-api/AdaptiveCardExtensionTestWrapper.js +0 -152
- package/lib/test-api/MockAdaptiveCardExtensionManifestInstance.d.ts.map +0 -1
- package/lib/test-api/index.d.ts.map +0 -1
- package/lib/utilities/StringHelper.d.ts.map +0 -1
- package/lib/utilities/StringHelper.js +0 -11
- package/lib/views/base/BaseView.d.ts.map +0 -1
- package/lib/views/base/BaseView.js +0 -77
- package/lib/views/card/BaseBasicCardView.d.ts.map +0 -1
- package/lib/views/card/BaseBasicCardView.js +0 -63
- package/lib/views/card/BaseCardView.d.ts.map +0 -1
- package/lib/views/card/BaseCardView.js +0 -84
- package/lib/views/card/BaseComponentsCardView.d.ts.map +0 -1
- package/lib/views/card/BaseComponentsCardView.js +0 -44
- package/lib/views/card/BaseImageCardView.d.ts.map +0 -1
- package/lib/views/card/BasePrimaryTextCardView.d.ts.map +0 -1
- package/lib/views/card/BaseTemplateCardView.d.ts.map +0 -1
- package/lib/views/card/BaseTemplateCardView.js +0 -85
- package/lib/views/card/DefaultCardView.d.ts.map +0 -1
- package/lib/views/card/DefaultCardView.js +0 -29
- package/lib/views/card/parameters/BaseParameters.d.ts.map +0 -1
- package/lib/views/card/parameters/BaseParameters.js +0 -2
- package/lib/views/card/parameters/CardViewParametersProcessors.d.ts.map +0 -1
- package/lib/views/card/parameters/CardViewParametersProcessors.js +0 -37
- package/lib/views/card/parameters/DataVisualizationParameters.d.ts.map +0 -1
- package/lib/views/card/parameters/FocusedParameters.d.ts.map +0 -1
- package/lib/views/card/parameters/FocusedParameters.js +0 -43
- package/lib/views/card/parameters/GenericTemplates.d.ts.map +0 -1
- package/lib/views/interfaces/IAdaptiveCardExtensionActionView.d.ts.map +0 -1
- package/lib/views/interfaces/IAdaptiveCardExtensionActionView.js +0 -2
- package/lib/views/interfaces/IAdaptiveCardExtensionDataView.d.ts.map +0 -1
- package/lib/views/interfaces/IAdaptiveCardExtensionDataView.js +0 -2
- package/lib/views/interfaces/INavigationBarProperties.d.ts.map +0 -1
- package/lib/views/interfaces/INavigationBarProperties.js +0 -2
- package/lib/views/interfaces/IViewNavigator.d.ts.map +0 -1
- package/lib/views/interfaces/IViewNavigator.js +0 -2
- package/lib/views/navigator/QuickViewNavigator.d.ts.map +0 -1
- package/lib/views/navigator/QuickViewNavigator.js +0 -29
- package/lib/views/navigator/ViewNavigator.d.ts.map +0 -1
- package/lib/views/navigator/ViewNavigator.js +0 -233
- package/lib/views/navigator/ViewRegistry.d.ts.map +0 -1
- package/lib/views/navigator/ViewRegistry.js +0 -32
- package/lib/views/quickView/BaseAdaptiveCardQuickView.d.ts.map +0 -1
- package/lib/views/quickView/BaseAdaptiveCardQuickView.js +0 -90
- package/lib/views/quickView/BaseQuickView.d.ts.map +0 -1
- package/lib/views/quickView/BaseQuickView.js +0 -45
- package/lib/views/quickView/BaseWebQuickView.d.ts.map +0 -1
- package/lib/views/quickView/BaseWebQuickView.js +0 -64
- /package/{lib → lib-dts}/AdaptiveCardExtensionHost.d.ts +0 -0
- /package/{lib → lib-dts}/AdaptiveCardExtensionLoader.d.ts +0 -0
- /package/{lib → lib-dts}/ac-template/basicL1Template.d.ts +0 -0
- /package/{lib → lib-dts}/ac-template/basicL1TemplateSelectAction.d.ts +0 -0
- /package/{lib → lib-dts}/ac-template/common/Constants.d.ts +0 -0
- /package/{lib → lib-dts}/ac-template/common/CustomElements.d.ts +0 -0
- /package/{lib → lib-dts}/ac-template/imageL1Template.d.ts +0 -0
- /package/{lib → lib-dts}/ac-template/imageL1TemplateSelectAction.d.ts +0 -0
- /package/{lib → lib-dts}/ac-template/index.d.ts +0 -0
- /package/{lib → lib-dts}/ac-template/primaryTextL1Template.d.ts +0 -0
- /package/{lib → lib-dts}/ac-template/primaryTextL1TemplateSelectAction.d.ts +0 -0
- /package/{lib → lib-dts}/ac-template/searchL1Template.d.ts +0 -0
- /package/{lib → lib-dts}/ac-template/textInputL1Template.d.ts +0 -0
- /package/{lib → lib-dts}/ac-template/util/actionButtonHelper.d.ts +0 -0
- /package/{lib → lib-dts}/ac-template/util/getCardRenderParameters.d.ts +0 -0
- /package/{lib → lib-dts}/actionShim/AdaptiveCardExtensionActionShim.d.ts +0 -0
- /package/{lib → lib-dts}/actionShim/IActionShimProvider.d.ts +0 -0
- /package/{lib → lib-dts}/actionShim/getOnBeforeActionArguments.d.ts +0 -0
- /package/{lib → lib-dts}/caching/CacheManager.d.ts +0 -0
- /package/{lib → lib-dts}/caching/IAdaptiveCardExtensionCacheObject.d.ts +0 -0
- /package/{lib → lib-dts}/caching/ICacheSettings.d.ts +0 -0
- /package/{lib → lib-dts}/caching/ICachedLoadParameters.d.ts +0 -0
- /package/{lib → lib-dts}/caching/cache/ACEMySiteCacheManager.d.ts +0 -0
- /package/{lib → lib-dts}/caching/cache/BaseAdaptiveCardExtensionCache.d.ts +0 -0
- /package/{lib → lib-dts}/caching/cache/IAdaptiveCardExtensionCache.d.ts +0 -0
- /package/{lib → lib-dts}/caching/cache/LocalStorageACECache.d.ts +0 -0
- /package/{lib → lib-dts}/common/Flights.d.ts +0 -0
- /package/{lib → lib-dts}/common/Killswitches.d.ts +0 -0
- /package/{lib → lib-dts}/components/BarChartComponent.d.ts +0 -0
- /package/{lib → lib-dts}/components/BaseComponent.d.ts +0 -0
- /package/{lib → lib-dts}/components/CardBarComponent.d.ts +0 -0
- /package/{lib → lib-dts}/components/CardButtonComponent.d.ts +0 -0
- /package/{lib → lib-dts}/components/DataVisualizationComponent.d.ts +0 -0
- /package/{lib → lib-dts}/components/ICardButtonBase.d.ts +0 -0
- /package/{lib → lib-dts}/components/LineChartComponent.d.ts +0 -0
- /package/{lib → lib-dts}/components/PieChartComponent.d.ts +0 -0
- /package/{lib → lib-dts}/components/PoweredByComponent.d.ts +0 -0
- /package/{lib → lib-dts}/components/PromptsSetComponent.d.ts +0 -0
- /package/{lib → lib-dts}/components/SearchBoxComponent.d.ts +0 -0
- /package/{lib → lib-dts}/components/SearchFooterComponent.d.ts +0 -0
- /package/{lib → lib-dts}/components/TextComponent.d.ts +0 -0
- /package/{lib → lib-dts}/components/TextInputComponent.d.ts +0 -0
- /package/{lib → lib-dts}/index.d.ts +0 -0
- /package/{lib → lib-dts}/interfaces/CardActionType.d.ts +0 -0
- /package/{lib → lib-dts}/interfaces/IActionArguments.d.ts +0 -0
- /package/{lib → lib-dts}/interfaces/IAdaptiveCardExtension.d.ts +0 -0
- /package/{lib → lib-dts}/interfaces/IAdaptiveCardExtensionData.d.ts +0 -0
- /package/{lib → lib-dts}/interfaces/IAdaptiveCardExtensionImage.d.ts +0 -0
- /package/{lib → lib-dts}/interfaces/IAdaptiveCardExtensionLoadContext.d.ts +0 -0
- /package/{lib → lib-dts}/interfaces/IAdaptiveCardExtensionPropertiesMetadata.d.ts +0 -0
- /package/{lib → lib-dts}/interfaces/IAdaptiveCardRenderParameters.d.ts +0 -0
- /package/{lib → lib-dts}/interfaces/IBaseCardParameters.d.ts +0 -0
- /package/{lib → lib-dts}/interfaces/ICardButton.d.ts +0 -0
- /package/{lib → lib-dts}/interfaces/ICardRenderParameters.d.ts +0 -0
- /package/{lib → lib-dts}/interfaces/IFocusParameters.d.ts +0 -0
- /package/{lib → lib-dts}/interfaces/IGetLocationActionTypes.d.ts +0 -0
- /package/{lib → lib-dts}/interfaces/IHostContext.d.ts +0 -0
- /package/{lib → lib-dts}/interfaces/ILocation.d.ts +0 -0
- /package/{lib → lib-dts}/interfaces/INotificationTypes.d.ts +0 -0
- /package/{lib → lib-dts}/interfaces/IOnBeforeActionArguments.d.ts +0 -0
- /package/{lib → lib-dts}/interfaces/IQuickViewRenderParameters.d.ts +0 -0
- /package/{lib → lib-dts}/interfaces/ISPFxAdaptiveCard.d.ts +0 -0
- /package/{lib → lib-dts}/interfaces/ISelectMediaActionTypes.d.ts +0 -0
- /package/{lib → lib-dts}/interfaces/ISelectionActionTemplateAdaptiveCard.d.ts +0 -0
- /package/{lib → lib-dts}/interfaces/IShowLocationActionTypes.d.ts +0 -0
- /package/{lib → lib-dts}/interfaces/InternalTypes.d.ts +0 -0
- /package/{lib → lib-dts}/isolation/IsolatedAdaptiveCardExtensionService.d.ts +0 -0
- /package/{lib → lib-dts}/isolation/RenderArgumentsUtils.d.ts +0 -0
- /package/{lib → lib-dts}/isolation/interfaces/IBot.d.ts +0 -0
- /package/{lib → lib-dts}/isolation/interfaces/IIsolatedAction.d.ts +0 -0
- /package/{lib → lib-dts}/isolation/interfaces/IIsolatedListener.d.ts +0 -0
- /package/{lib → lib-dts}/isolation/interfaces/IIsolatedServiceCallbackParameters.d.ts +0 -0
- /package/{lib → lib-dts}/isolation/interfaces/ILoadIsolatedAdaptiveCardExtensionParameters.d.ts +0 -0
- /package/{lib → lib-dts}/isolation/interfaces/IRenderIsolatedQuickViewParameters.d.ts +0 -0
- /package/{lib → lib-dts}/isolation/interfaces/IsolatedAdaptiveCardExtensionApplicationMessageEvent.d.ts +0 -0
- /package/{lib → lib-dts}/isolation/interfaces/IsolatedServiceMessageEvent.d.ts +0 -0
- /package/{lib → lib-dts}/loc/Strings.resx.d.ts +0 -0
- /package/{lib → lib-dts}/test-api/AdaptiveCardExtensionTestWrapper.d.ts +0 -0
- /package/{lib → lib-dts}/test-api/MockAdaptiveCardExtensionManifestInstance.d.ts +0 -0
- /package/{lib → lib-dts}/test-api/index.d.ts +0 -0
- /package/{lib → lib-dts}/utilities/StringHelper.d.ts +0 -0
- /package/{lib → lib-dts}/views/base/BaseView.d.ts +0 -0
- /package/{lib → lib-dts}/views/card/BaseBasicCardView.d.ts +0 -0
- /package/{lib → lib-dts}/views/card/BaseCardView.d.ts +0 -0
- /package/{lib → lib-dts}/views/card/BaseComponentsCardView.d.ts +0 -0
- /package/{lib → lib-dts}/views/card/BaseImageCardView.d.ts +0 -0
- /package/{lib → lib-dts}/views/card/BasePrimaryTextCardView.d.ts +0 -0
- /package/{lib → lib-dts}/views/card/BaseTemplateCardView.d.ts +0 -0
- /package/{lib → lib-dts}/views/card/DefaultCardView.d.ts +0 -0
- /package/{lib → lib-dts}/views/card/parameters/BaseParameters.d.ts +0 -0
- /package/{lib → lib-dts}/views/card/parameters/CardViewParametersProcessors.d.ts +0 -0
- /package/{lib → lib-dts}/views/card/parameters/DataVisualizationParameters.d.ts +0 -0
- /package/{lib → lib-dts}/views/card/parameters/FocusedParameters.d.ts +0 -0
- /package/{lib → lib-dts}/views/card/parameters/GenericTemplates.d.ts +0 -0
- /package/{lib → lib-dts}/views/interfaces/IAdaptiveCardExtensionActionView.d.ts +0 -0
- /package/{lib → lib-dts}/views/interfaces/IAdaptiveCardExtensionDataView.d.ts +0 -0
- /package/{lib → lib-dts}/views/interfaces/INavigationBarProperties.d.ts +0 -0
- /package/{lib → lib-dts}/views/interfaces/IViewNavigator.d.ts +0 -0
- /package/{lib → lib-dts}/views/navigator/QuickViewNavigator.d.ts +0 -0
- /package/{lib → lib-dts}/views/navigator/ViewNavigator.d.ts +0 -0
- /package/{lib → lib-dts}/views/navigator/ViewRegistry.d.ts +0 -0
- /package/{lib → lib-dts}/views/quickView/BaseAdaptiveCardQuickView.d.ts +0 -0
- /package/{lib → lib-dts}/views/quickView/BaseQuickView.d.ts +0 -0
- /package/{lib → lib-dts}/views/quickView/BaseWebQuickView.d.ts +0 -0
- /package/{lib → lib-esm}/loc/Strings.resx.json +0 -0
- /package/{lib → lib-esm}/sp-adaptive-card-base.manifest.json +0 -0
|
@@ -1,59 +1,57 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "getCardRenderParameters", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return getCardRenderParameters;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
12
|
+
const _spcorelibrary = require("@microsoft/sp-core-library");
|
|
13
|
+
const _splodashsubset = require("@microsoft/sp-lodash-subset");
|
|
14
|
+
const _Stringsresx = /*#__PURE__*/ _interop_require_default._(require("../../loc/Strings.resx"));
|
|
15
|
+
const _actionButtonHelper = require("./actionButtonHelper");
|
|
16
|
+
const _Killswitches = require("../../common/Killswitches");
|
|
17
|
+
const _BaseTemplateCardView = require("../../views/card/BaseTemplateCardView");
|
|
18
|
+
const _CardButtonComponent = require("../../components/CardButtonComponent");
|
|
19
|
+
const _BaseComponent = require("../../components/BaseComponent");
|
|
20
|
+
const _textInputL1Template = require("../textInputL1Template");
|
|
21
|
+
const _imageL1TemplateSelectAction = require("../imageL1TemplateSelectAction");
|
|
22
|
+
const _imageL1Template = require("../imageL1Template");
|
|
23
|
+
const _primaryTextL1TemplateSelectAction = require("../primaryTextL1TemplateSelectAction");
|
|
24
|
+
const _primaryTextL1Template = require("../primaryTextL1Template");
|
|
25
|
+
const _basicL1TemplateSelectAction = require("../basicL1TemplateSelectAction");
|
|
26
|
+
const _basicL1Template = require("../basicL1Template");
|
|
27
|
+
const _searchL1Template = require("../searchL1Template");
|
|
21
28
|
function getCardRenderParameters(cardView, cardSize, deviceContext, template, defaultIconProperty, defaultTitle, manifest, instanceId, cardViewId) {
|
|
22
|
-
var _a, _b;
|
|
23
29
|
//
|
|
24
30
|
// TODO: when implementing ACE components we need to add checks like if ('cardButtons' in cardView, etc.)
|
|
25
31
|
// ADO item: https://onedrive.visualstudio.com/DefaultCollection/WEX!/_workitems/edit/1642050
|
|
26
32
|
//
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
var templateType = 'Basic';
|
|
35
|
-
if (cardView instanceof BaseTemplateCardView_1.BaseTemplateCardView) {
|
|
33
|
+
const { onCardSelection } = cardView;
|
|
34
|
+
const cardViewParameters = !(0, _Killswitches.isGenerateComponentIdsKSActivated)() ? _generateComponentIds(instanceId, cardView._getCardViewParameters()) : cardView._getCardViewParameters();
|
|
35
|
+
let cardButtons;
|
|
36
|
+
let data;
|
|
37
|
+
let cardViewTemplate;
|
|
38
|
+
let templateType = 'Basic';
|
|
39
|
+
if (cardView instanceof _BaseTemplateCardView.BaseTemplateCardView) {
|
|
36
40
|
cardButtons = cardView.cardButtons;
|
|
37
41
|
data = cardView.data;
|
|
38
42
|
cardViewTemplate = cardView.template;
|
|
39
43
|
templateType = cardView._templateType;
|
|
40
|
-
}
|
|
41
|
-
else if (deviceContext === 'Mobile' || !!sessionStorage.getItem('spfx-debug')) {
|
|
44
|
+
} else if (deviceContext === 'Mobile' || !!sessionStorage.getItem('spfx-debug')) {
|
|
42
45
|
//
|
|
43
46
|
// This is TEMPORARY code and should be removed when IDC implements support for ACE Components
|
|
44
47
|
//
|
|
45
48
|
if (cardViewParameters.image) {
|
|
46
49
|
templateType = 'Image';
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
50
|
+
} else {
|
|
49
51
|
templateType = 'Basic';
|
|
50
52
|
}
|
|
51
|
-
if (cardViewParameters.footer &&
|
|
52
|
-
cardViewParameters.footer.
|
|
53
|
-
cardViewParameters.footer[0].componentName === 'cardButton') {
|
|
54
|
-
cardButtons = cardViewParameters.footer.map(function (button) {
|
|
55
|
-
return (0, CardButtonComponent_1._cardButtonParametersToCardButton)(button);
|
|
56
|
-
});
|
|
53
|
+
if (cardViewParameters.footer && cardViewParameters.footer.length && cardViewParameters.footer[0].componentName === 'cardButton') {
|
|
54
|
+
cardButtons = cardViewParameters.footer.map((button)=>(0, _CardButtonComponent._cardButtonParametersToCardButton)(button));
|
|
57
55
|
}
|
|
58
56
|
data = _getData(cardViewParameters);
|
|
59
57
|
if (!template) {
|
|
@@ -63,62 +61,53 @@ function getCardRenderParameters(cardView, cardSize, deviceContext, template, de
|
|
|
63
61
|
if (!template) {
|
|
64
62
|
template = cardViewTemplate;
|
|
65
63
|
}
|
|
66
|
-
|
|
64
|
+
let selectAction;
|
|
67
65
|
if (template) {
|
|
68
|
-
(0,
|
|
66
|
+
(0, _actionButtonHelper.appendActions)(template, cardButtons, cardSize, templateType, instanceId);
|
|
69
67
|
}
|
|
70
68
|
if (onCardSelection) {
|
|
71
69
|
// The ACE WebPart checks for this id to determine whether a card action was from a button or the card
|
|
72
|
-
|
|
73
|
-
if (
|
|
74
|
-
action.type === 'Action.OpenUrl' ||
|
|
75
|
-
action.type === 'Action.Submit' ||
|
|
76
|
-
action.type === 'VivaAction.GetLocation' ||
|
|
77
|
-
action.type === 'VivaAction.ShowLocation' ||
|
|
78
|
-
action.type === 'VivaAction.SelectMedia') {
|
|
70
|
+
const action = (0, _actionButtonHelper.createAction)(onCardSelection, !(0, _Killswitches.isUpdateSelectActionIdKSActivated)() ? _actionButtonHelper.CARD_VIEW_SELECT_ACTION_ID : 'select-action');
|
|
71
|
+
if (!(0, _Killswitches.isSupportActionExecuteKSActivated)() && action.type === 'Action.Execute' || action.type === 'Action.OpenUrl' || action.type === 'Action.Submit' || action.type === 'VivaAction.GetLocation' || action.type === 'VivaAction.ShowLocation' || action.type === 'VivaAction.SelectMedia') {
|
|
79
72
|
selectAction = action;
|
|
80
73
|
}
|
|
81
74
|
}
|
|
82
75
|
if (cardView._templateType === 'Image' && data.imageAltText === undefined) {
|
|
83
|
-
data.imageAltText = !(0,
|
|
84
|
-
? sp_core_library_1.Text.format(Strings_resx_1.default.ImageAltText, manifest.alias)
|
|
85
|
-
: '';
|
|
76
|
+
data.imageAltText = !(0, _Killswitches.isAddDefaultImageAltTextKSActivated)() ? _spcorelibrary.Text.format(_Stringsresx.default.ImageAltText, manifest.alias) : '';
|
|
86
77
|
}
|
|
87
78
|
// after KS grad replace this part with const cardViewTitle: string = cardViewParameters?.cardBar[0]?.title || data?.title || defaultTitle;
|
|
88
|
-
|
|
89
|
-
if (!(0,
|
|
90
|
-
cardViewTitle =
|
|
79
|
+
let cardViewTitle = data?.title || defaultTitle;
|
|
80
|
+
if (!(0, _Killswitches.isUseCardBarTitleKSActivated)() && cardViewParameters?.cardBar[0]?.title) {
|
|
81
|
+
cardViewTitle = cardViewParameters?.cardBar[0]?.title;
|
|
91
82
|
}
|
|
92
|
-
|
|
83
|
+
const cardData = {
|
|
84
|
+
selectAction: selectAction,
|
|
85
|
+
iconProperty: defaultIconProperty,
|
|
93
86
|
// after KS grad replace with cardViewParameters?.cardBar[0]?.title || defaultTitle
|
|
94
|
-
title: cardViewTitle,
|
|
95
|
-
|
|
96
|
-
|
|
87
|
+
title: cardViewTitle,
|
|
88
|
+
actionButtons: deviceContext !== 'Mobile' ? (0, _actionButtonHelper.parseButtonsToAction)(cardButtons, templateType, cardSize, instanceId) : undefined,
|
|
89
|
+
...data,
|
|
97
90
|
// defined iconAltText after spread operator to avoid value getting overridden.
|
|
98
|
-
iconAltText: !(0,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
iconProperty: (data === null || data === void 0 ? void 0 : data.iconProperty) || defaultIconProperty,
|
|
91
|
+
iconAltText: !(0, _Killswitches.isAddDefaultImageAltTextKSActivated)() ? data?.iconAltText || _spcorelibrary.Text.format(_Stringsresx.default.IconAltText, manifest.alias) : data?.iconAltText || _Stringsresx.default.DefaultIconAltText
|
|
92
|
+
};
|
|
93
|
+
const cardProperties = {
|
|
94
|
+
iconProperty: data?.iconProperty || defaultIconProperty,
|
|
103
95
|
size: cardSize,
|
|
104
96
|
title: cardViewTitle,
|
|
105
97
|
templateType: templateType,
|
|
106
|
-
cardViewId: !(0,
|
|
98
|
+
cardViewId: !(0, _Killswitches.isProvideCardViewIdKSActivated)() ? cardViewId : undefined
|
|
107
99
|
};
|
|
108
100
|
// at some point we will get rid of data property so we need to move important bits to cardProperties
|
|
109
|
-
cardProperties.defaultIconAltText =
|
|
101
|
+
cardProperties.defaultIconAltText = _spcorelibrary.Text.format(_Stringsresx.default.IconAltText, manifest.alias);
|
|
110
102
|
cardProperties.selectAction = selectAction;
|
|
111
|
-
cardProperties.defaultImageAltText = cardViewParameters.image
|
|
112
|
-
? sp_core_library_1.Text.format(Strings_resx_1.default.ImageAltText, manifest.alias)
|
|
113
|
-
: undefined;
|
|
103
|
+
cardProperties.defaultImageAltText = cardViewParameters.image ? _spcorelibrary.Text.format(_Stringsresx.default.ImageAltText, manifest.alias) : undefined;
|
|
114
104
|
return {
|
|
115
105
|
data: cardData,
|
|
116
|
-
template
|
|
106
|
+
template,
|
|
117
107
|
cardViewParameters: cardViewParameters,
|
|
118
|
-
cardProperties
|
|
108
|
+
cardProperties
|
|
119
109
|
};
|
|
120
110
|
}
|
|
121
|
-
exports.getCardRenderParameters = getCardRenderParameters;
|
|
122
111
|
function _generateComponentIds(instanceId, cardViewParameters) {
|
|
123
112
|
//
|
|
124
113
|
// Ideally, we don't want to modify the original parameters object provided by a developer.
|
|
@@ -136,64 +125,74 @@ function _generateComponentIdsForCardViewPart(instanceId, cardViewPart, componen
|
|
|
136
125
|
if (!components) {
|
|
137
126
|
return;
|
|
138
127
|
}
|
|
139
|
-
components.forEach(
|
|
140
|
-
component.id = (0,
|
|
128
|
+
components.forEach((component, index)=>{
|
|
129
|
+
component.id = (0, _BaseComponent.generateComponentId)(instanceId, cardViewPart, component, index);
|
|
141
130
|
if (component.componentName === 'searchBox' || component.componentName === 'textInput') {
|
|
142
131
|
// we also need to generate id for the button
|
|
143
|
-
|
|
132
|
+
const { button } = component;
|
|
144
133
|
if (button && !button.id) {
|
|
145
|
-
button.id =
|
|
134
|
+
button.id = `${component.id}-button`;
|
|
146
135
|
}
|
|
147
136
|
}
|
|
148
137
|
});
|
|
149
138
|
}
|
|
150
139
|
function _getData(cardViewParameters) {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
var data = {
|
|
140
|
+
const { cardBar, image, header, body, footer } = cardViewParameters;
|
|
141
|
+
let data = {
|
|
154
142
|
title: cardBar[0].title,
|
|
155
|
-
iconProperty:
|
|
156
|
-
iconAltText:
|
|
157
|
-
_iconPropertyFallback:
|
|
143
|
+
iconProperty: cardBar[0].icon?.url,
|
|
144
|
+
iconAltText: cardBar[0].icon?.altText,
|
|
145
|
+
_iconPropertyFallback: cardBar[0].icon?._urlFallback
|
|
158
146
|
};
|
|
159
147
|
if (header && header.length) {
|
|
160
148
|
data.primaryText = header[0].text;
|
|
161
149
|
}
|
|
162
150
|
if (image) {
|
|
163
|
-
|
|
151
|
+
const imageData = data;
|
|
164
152
|
imageData.imageUrl = image.url;
|
|
165
153
|
imageData.imageAltText = image.altText;
|
|
166
154
|
imageData._imageUrlFallback = image._urlFallback;
|
|
167
155
|
}
|
|
168
156
|
if (body && body.length) {
|
|
169
|
-
switch
|
|
157
|
+
switch(body[0].componentName){
|
|
170
158
|
case 'text':
|
|
171
|
-
|
|
159
|
+
const bodyText = body[0];
|
|
172
160
|
data.description = bodyText.text;
|
|
173
161
|
break;
|
|
174
162
|
case 'searchBox':
|
|
175
|
-
data =
|
|
163
|
+
data = {
|
|
164
|
+
...data,
|
|
165
|
+
..._getSearchBoxData(body[0])
|
|
166
|
+
};
|
|
176
167
|
break;
|
|
177
168
|
default:
|
|
178
|
-
data =
|
|
169
|
+
data = {
|
|
170
|
+
...data,
|
|
171
|
+
..._getTextInputData(body[0])
|
|
172
|
+
};
|
|
179
173
|
break;
|
|
180
174
|
}
|
|
181
175
|
}
|
|
182
176
|
if (footer && footer.length) {
|
|
183
|
-
switch
|
|
177
|
+
switch(footer[0].componentName){
|
|
184
178
|
case 'searchFooter':
|
|
185
|
-
data =
|
|
179
|
+
data = {
|
|
180
|
+
...data,
|
|
181
|
+
..._getSearchFooterData(footer[0])
|
|
182
|
+
};
|
|
186
183
|
break;
|
|
187
184
|
case 'textInput':
|
|
188
|
-
data =
|
|
185
|
+
data = {
|
|
186
|
+
...data,
|
|
187
|
+
..._getTextInputData(footer[0])
|
|
188
|
+
};
|
|
189
189
|
break;
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
return data;
|
|
193
193
|
}
|
|
194
194
|
function _getTextInputData(textInput) {
|
|
195
|
-
|
|
196
|
-
var textInputData = {
|
|
195
|
+
const textInputData = {
|
|
197
196
|
placeholder: textInput.placeholder || '',
|
|
198
197
|
defaultValue: textInput.defaultValue || ''
|
|
199
198
|
};
|
|
@@ -207,8 +206,8 @@ function _getTextInputData(textInput) {
|
|
|
207
206
|
textInputData.iconAfterAltText = textInput.iconAfter.altText;
|
|
208
207
|
textInputData._iconAfterUrlFallback = textInput.iconAfter._urlFallback;
|
|
209
208
|
}
|
|
210
|
-
if (textInput.button &&
|
|
211
|
-
|
|
209
|
+
if (textInput.button && textInput.button?.icon) {
|
|
210
|
+
const button = textInput.button;
|
|
212
211
|
textInputData.buttonIconProperty = button.icon.url;
|
|
213
212
|
textInputData.buttonIconAltText = button.icon.altText;
|
|
214
213
|
textInputData._buttonIconUrlFallback = button.icon._urlFallback;
|
|
@@ -222,7 +221,7 @@ function _getSearchBoxData(searchBox) {
|
|
|
222
221
|
};
|
|
223
222
|
}
|
|
224
223
|
function _getSearchFooterData(searcFooter) {
|
|
225
|
-
|
|
224
|
+
const { title, imageUrl, text } = searcFooter;
|
|
226
225
|
return {
|
|
227
226
|
footerImageUrl: imageUrl || '',
|
|
228
227
|
footerTitle: title,
|
|
@@ -230,40 +229,31 @@ function _getSearchFooterData(searcFooter) {
|
|
|
230
229
|
};
|
|
231
230
|
}
|
|
232
231
|
function _getTemplate(cardViewParameters, hasSelectionAction, cardSize, instanceId) {
|
|
233
|
-
|
|
232
|
+
const { body, footer, image } = cardViewParameters;
|
|
234
233
|
if (body && body.length) {
|
|
235
|
-
switch
|
|
234
|
+
switch(body[0].componentName){
|
|
236
235
|
case 'textInput':
|
|
237
|
-
return (0,
|
|
236
|
+
return (0, _textInputL1Template.textInputL1Template)(cardViewParameters, hasSelectionAction, cardSize, instanceId);
|
|
238
237
|
case 'searchBox':
|
|
239
|
-
return (0,
|
|
238
|
+
return (0, _searchL1Template.searchL1Template)(cardViewParameters, hasSelectionAction, instanceId);
|
|
240
239
|
}
|
|
241
240
|
}
|
|
242
241
|
if (footer && footer.length === 1 && footer[0].componentName === 'textInput') {
|
|
243
|
-
return (0,
|
|
242
|
+
return (0, _textInputL1Template.textInputFooterL1Template)(cardViewParameters, hasSelectionAction, instanceId);
|
|
244
243
|
}
|
|
245
244
|
if (image) {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
if ((0, Killswitches_1.isTemplateCloneKSActivated)())
|
|
250
|
-
return imageTemplate;
|
|
251
|
-
else
|
|
252
|
-
return (0, sp_lodash_subset_1.cloneDeep)(imageTemplate);
|
|
245
|
+
const imageTemplate = hasSelectionAction ? _imageL1TemplateSelectAction.imageL1TemplateSelectAction : _imageL1Template.imageL1Template;
|
|
246
|
+
if ((0, _Killswitches.isTemplateCloneKSActivated)()) return imageTemplate;
|
|
247
|
+
else return (0, _splodashsubset.cloneDeep)(imageTemplate);
|
|
253
248
|
}
|
|
254
249
|
if (body && body.length) {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
if ((0, Killswitches_1.isTemplateCloneKSActivated)())
|
|
259
|
-
return primaryTextTemplate;
|
|
260
|
-
else
|
|
261
|
-
return (0, sp_lodash_subset_1.cloneDeep)(primaryTextTemplate);
|
|
250
|
+
const primaryTextTemplate = hasSelectionAction ? _primaryTextL1TemplateSelectAction.primaryTextL1TemplateSelectAction : _primaryTextL1Template.primaryTextL1Template;
|
|
251
|
+
if ((0, _Killswitches.isTemplateCloneKSActivated)()) return primaryTextTemplate;
|
|
252
|
+
else return (0, _splodashsubset.cloneDeep)(primaryTextTemplate);
|
|
262
253
|
}
|
|
263
|
-
|
|
264
|
-
if ((0,
|
|
265
|
-
|
|
266
|
-
else
|
|
267
|
-
return (0, sp_lodash_subset_1.cloneDeep)(basicTemplate);
|
|
254
|
+
const basicTemplate = hasSelectionAction ? _basicL1TemplateSelectAction.basicL1TemplateSelectAction : _basicL1Template.basicL1Template;
|
|
255
|
+
if ((0, _Killswitches.isTemplateCloneKSActivated)()) return basicTemplate;
|
|
256
|
+
else return (0, _splodashsubset.cloneDeep)(basicTemplate);
|
|
268
257
|
}
|
|
269
|
-
|
|
258
|
+
|
|
259
|
+
//# sourceMappingURL=./getCardRenderParameters.js.map
|
|
@@ -1,138 +1,88 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* This removes redundant handling logic while also allowing for each handler renderer to behave differently at
|
|
10
|
-
* specific steps of action handling.
|
|
11
|
-
*
|
|
12
|
-
* TODO: Kill switch using this shim in `BaseAdaptiveCardExtensionWebPart._handleAction`.
|
|
13
|
-
*
|
|
14
|
-
* @internal
|
|
15
|
-
*/
|
|
16
|
-
var AdaptiveCardExtensionActionShim = /** @class */ (function () {
|
|
17
|
-
function AdaptiveCardExtensionActionShim(ace, provider, location) {
|
|
18
|
-
var _this = this;
|
|
19
|
-
this.handleAction = function (action) {
|
|
20
|
-
// action will be of type 'Action' as it is passed from QuickView
|
|
21
|
-
var acAction = action;
|
|
22
|
-
var actionType = acAction.getJsonTypeName();
|
|
23
|
-
var actionArguments = (0, getOnBeforeActionArguments_1.getOnBeforeActionArguments)(actionType, action);
|
|
24
|
-
if (!(0, Killswitches_1.isSurfaceOnBeforeActionKSActivated)() && actionArguments) {
|
|
25
|
-
_this._ace._onBeforeAction(actionArguments, _this._location);
|
|
26
|
-
}
|
|
27
|
-
switch (actionType) {
|
|
28
|
-
case 'Action.OpenUrl':
|
|
29
|
-
_this._handleOpenUrl(acAction);
|
|
30
|
-
break;
|
|
31
|
-
case 'Action.ShowCard':
|
|
32
|
-
_this._handleShowCard(acAction);
|
|
33
|
-
break;
|
|
34
|
-
case 'Action.Submit':
|
|
35
|
-
_this._handleSubmit(acAction);
|
|
36
|
-
break;
|
|
37
|
-
case 'Action.Execute':
|
|
38
|
-
_this._handleExecute(acAction);
|
|
39
|
-
break;
|
|
40
|
-
case 'VivaAction.GetLocation':
|
|
41
|
-
_this._handleGetLocation(acAction);
|
|
42
|
-
break;
|
|
43
|
-
case 'VivaAction.SelectMedia':
|
|
44
|
-
_this._handleSelectMedia(acAction);
|
|
45
|
-
break;
|
|
46
|
-
case 'VivaAction.ShowLocation':
|
|
47
|
-
_this._handleShowLocation(acAction);
|
|
48
|
-
break;
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
this._ace = ace;
|
|
52
|
-
this._provider = provider;
|
|
53
|
-
this._location = location;
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "AdaptiveCardExtensionActionShim", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return AdaptiveCardExtensionActionShim;
|
|
54
9
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
10
|
+
});
|
|
11
|
+
const _spdiagnostics = require("@microsoft/sp-diagnostics");
|
|
12
|
+
const _Killswitches = require("../common/Killswitches");
|
|
13
|
+
const _getOnBeforeActionArguments = require("./getOnBeforeActionArguments");
|
|
14
|
+
class AdaptiveCardExtensionActionShim {
|
|
15
|
+
_handleGetLocation(action) {
|
|
16
|
+
const monitor = new _spdiagnostics._QosMonitor('AdaptiveCardExtension._onExecuteAction.GetLocation', true);
|
|
58
17
|
try {
|
|
59
|
-
|
|
60
|
-
chooseLocationOnMap:
|
|
18
|
+
const params = {
|
|
19
|
+
chooseLocationOnMap: action.parameters?.chooseLocationOnMap
|
|
61
20
|
};
|
|
62
21
|
this._provider.getLocation(this._ace).getLocation(params);
|
|
63
22
|
monitor.writeSuccess();
|
|
64
23
|
this._provider.log(this._ace, 'VivaAction.GetLocation');
|
|
65
|
-
}
|
|
66
|
-
catch (error) {
|
|
24
|
+
} catch (error) {
|
|
67
25
|
monitor.writeUnexpectedFailure(undefined, error);
|
|
68
26
|
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
27
|
+
}
|
|
28
|
+
_handleOpenUrl(action) {
|
|
29
|
+
const url = action.url;
|
|
72
30
|
if (url) {
|
|
73
31
|
this._provider.openUrl(this._ace, url);
|
|
74
32
|
this._provider.log(this._ace, 'OpenUrl');
|
|
75
33
|
}
|
|
76
|
-
}
|
|
77
|
-
|
|
34
|
+
}
|
|
35
|
+
_handleSelectMedia(action) {
|
|
78
36
|
this._provider.selectMedia(this._ace, action).getMedia(action);
|
|
79
37
|
this._provider.log(this._ace, 'VivaAction.SelectMedia');
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
38
|
+
}
|
|
39
|
+
_handleShowCard(action) {
|
|
40
|
+
const actionArgs = {
|
|
83
41
|
id: action.id,
|
|
84
42
|
type: 'ShowCard'
|
|
85
43
|
};
|
|
86
44
|
this._provider.aceActionHandler(this._ace, actionArgs);
|
|
87
45
|
this._provider.log(this._ace, 'ShowCard');
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
var monitor = new sp_diagnostics_1._QosMonitor('AdaptiveCardExtension._onExecuteAction.ShowLocation', true);
|
|
46
|
+
}
|
|
47
|
+
_handleShowLocation(action) {
|
|
48
|
+
const monitor = new _spdiagnostics._QosMonitor('AdaptiveCardExtension._onExecuteAction.ShowLocation', true);
|
|
92
49
|
try {
|
|
93
|
-
|
|
94
|
-
locationCoordinates:
|
|
50
|
+
const params = {
|
|
51
|
+
locationCoordinates: action.parameters?.locationCoordinates
|
|
95
52
|
};
|
|
96
53
|
this._provider.showLocation(this._ace).showLocation(params);
|
|
97
54
|
monitor.writeSuccess();
|
|
98
55
|
this._provider.log(this._ace, 'VivaAction.ShowLocation');
|
|
99
|
-
}
|
|
100
|
-
catch (error) {
|
|
56
|
+
} catch (error) {
|
|
101
57
|
monitor.writeUnexpectedFailure(undefined, error);
|
|
102
58
|
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
var _a;
|
|
107
|
-
var monitor = new sp_diagnostics_1._QosMonitor('AdaptiveCardExtension._onExecuteAction.handleConfirmationDialog', true);
|
|
59
|
+
}
|
|
60
|
+
_handleSubmit(action) {
|
|
61
|
+
const monitor = new _spdiagnostics._QosMonitor('AdaptiveCardExtension._onExecuteAction.handleConfirmationDialog', true);
|
|
108
62
|
// Internally, a Submit action is used to open the quick view
|
|
109
|
-
|
|
63
|
+
const viewId = action.data?._internalQuickViewId;
|
|
110
64
|
if (viewId) {
|
|
111
65
|
this._provider.quickView(viewId);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
var actionArgs_1 = {
|
|
66
|
+
} else {
|
|
67
|
+
const actionArgs = {
|
|
115
68
|
data: action.data,
|
|
116
69
|
id: action.id,
|
|
117
70
|
type: 'Submit'
|
|
118
71
|
};
|
|
119
|
-
this._provider
|
|
120
|
-
.confirmationDialog(actionArgs_1)
|
|
121
|
-
.then(function (isCancelled) {
|
|
72
|
+
this._provider.confirmationDialog(actionArgs).then((isCancelled)=>{
|
|
122
73
|
monitor.writeSuccess();
|
|
123
74
|
if (!isCancelled) {
|
|
124
|
-
|
|
125
|
-
|
|
75
|
+
this._provider.aceActionHandler(this._ace, actionArgs);
|
|
76
|
+
this._provider.log(this._ace, 'Submit');
|
|
126
77
|
}
|
|
127
|
-
})
|
|
128
|
-
.catch(function () {
|
|
78
|
+
}).catch(()=>{
|
|
129
79
|
monitor.writeUnexpectedFailure();
|
|
130
80
|
});
|
|
131
81
|
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
if (!(0,
|
|
135
|
-
|
|
82
|
+
}
|
|
83
|
+
_handleExecute(action) {
|
|
84
|
+
if (!(0, _Killswitches.isSupportActionExecuteKSActivated)()) {
|
|
85
|
+
const actionArgs = {
|
|
136
86
|
id: action.id,
|
|
137
87
|
verb: action.verb,
|
|
138
88
|
data: action.data,
|
|
@@ -141,8 +91,44 @@ var AdaptiveCardExtensionActionShim = /** @class */ (function () {
|
|
|
141
91
|
this._provider.aceActionHandler(this._ace, actionArgs);
|
|
142
92
|
this._provider.log(this._ace, 'Execute');
|
|
143
93
|
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
94
|
+
}
|
|
95
|
+
constructor(ace, provider, location){
|
|
96
|
+
this.handleAction = (action)=>{
|
|
97
|
+
// action will be of type 'Action' as it is passed from QuickView
|
|
98
|
+
const acAction = action;
|
|
99
|
+
const actionType = acAction.getJsonTypeName();
|
|
100
|
+
const actionArguments = (0, _getOnBeforeActionArguments.getOnBeforeActionArguments)(actionType, action);
|
|
101
|
+
if (!(0, _Killswitches.isSurfaceOnBeforeActionKSActivated)() && actionArguments) {
|
|
102
|
+
this._ace._onBeforeAction(actionArguments, this._location);
|
|
103
|
+
}
|
|
104
|
+
switch(actionType){
|
|
105
|
+
case 'Action.OpenUrl':
|
|
106
|
+
this._handleOpenUrl(acAction);
|
|
107
|
+
break;
|
|
108
|
+
case 'Action.ShowCard':
|
|
109
|
+
this._handleShowCard(acAction);
|
|
110
|
+
break;
|
|
111
|
+
case 'Action.Submit':
|
|
112
|
+
this._handleSubmit(acAction);
|
|
113
|
+
break;
|
|
114
|
+
case 'Action.Execute':
|
|
115
|
+
this._handleExecute(acAction);
|
|
116
|
+
break;
|
|
117
|
+
case 'VivaAction.GetLocation':
|
|
118
|
+
this._handleGetLocation(acAction);
|
|
119
|
+
break;
|
|
120
|
+
case 'VivaAction.SelectMedia':
|
|
121
|
+
this._handleSelectMedia(acAction);
|
|
122
|
+
break;
|
|
123
|
+
case 'VivaAction.ShowLocation':
|
|
124
|
+
this._handleShowLocation(acAction);
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
this._ace = ace;
|
|
129
|
+
this._provider = provider;
|
|
130
|
+
this._location = location;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
//# sourceMappingURL=./AdaptiveCardExtensionActionShim.js.map
|