@microsoft/sp-adaptive-card-extension-base 1.23.1 → 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 +52 -17
- package/dist/index.js +0 -8
- package/dist/sp-adaptive-card-extension-base_default_bb680b206988d853312e.js +0 -1
- package/dist/sp-adaptive-card-extension-base_en-us_9d6af508c1713a71b939.js +0 -1
- package/dist/sp-adaptive-card-extension-base_qps-ploc_4f70291b86b8b32dfb95.js +0 -1
- package/dist/sp-adaptive-card-extension-base_qps-ploca_ae8667091e2a4a4f5af7.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
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { _ES5CompatibleClass } from '@microsoft/sp-core-library';
|
|
2
|
+
import { BaseCardView } from './BaseCardView';
|
|
3
|
+
import { CardViewParametersProcessors } from './parameters/CardViewParametersProcessors';
|
|
4
|
+
/**
|
|
5
|
+
* Base class for an component-based Card views.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/ export class BaseComponentsCardView extends BaseCardView {
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
*/ _getCardViewParameters() {
|
|
12
|
+
let parameters = this.cardViewParameters;
|
|
13
|
+
if (!this.cardViewParameters.cardBar[0].title || !this.cardViewParameters.cardBar[0].icon) {
|
|
14
|
+
parameters = {
|
|
15
|
+
...parameters,
|
|
16
|
+
cardBar: [
|
|
17
|
+
this._ensureCardBarParameters(parameters.cardBar[0])
|
|
18
|
+
]
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
return CardViewParametersProcessors.execute(parameters.cardViewType, parameters, {
|
|
22
|
+
cardSize: this.cardSize
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Ensures that the card bar parameters are valid. If there is no title or icon, the title and icon from the ACE are used.
|
|
27
|
+
*
|
|
28
|
+
* @internal
|
|
29
|
+
*/ _ensureCardBarParameters(cardBar) {
|
|
30
|
+
return {
|
|
31
|
+
...cardBar,
|
|
32
|
+
title: cardBar.title || this._ace.title,
|
|
33
|
+
icon: {
|
|
34
|
+
url: cardBar.icon?.url || this._ace.iconProperty,
|
|
35
|
+
altText: cardBar.icon?.altText,
|
|
36
|
+
_urlFallback: cardBar.icon?._urlFallback
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
_ES5CompatibleClass(BaseComponentsCardView);
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=./BaseComponentsCardView.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { _ES5CompatibleClass } from '@microsoft/sp-core-library';
|
|
3
2
|
import { imageL1Template } from '../../ac-template/imageL1Template';
|
|
4
3
|
import { imageL1TemplateSelectAction } from '../../ac-template/imageL1TemplateSelectAction';
|
|
@@ -15,23 +14,12 @@ import { ImageCardView } from './parameters/GenericTemplates';
|
|
|
15
14
|
* - Zero buttons in the `Medium` Card size, up to two buttons in `Large` Card size
|
|
16
15
|
*
|
|
17
16
|
* @public
|
|
18
|
-
*/
|
|
19
|
-
var BaseImageCardView = /** @class */ (function (_super) {
|
|
20
|
-
__extends(BaseImageCardView, _super);
|
|
21
|
-
function BaseImageCardView() {
|
|
22
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
23
|
-
/**
|
|
24
|
-
* @internal
|
|
25
|
-
*/
|
|
26
|
-
_this._templateType = 'Image';
|
|
27
|
-
return _this;
|
|
28
|
-
}
|
|
17
|
+
*/ export class BaseImageCardView extends BaseTemplateCardView {
|
|
29
18
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
var parameters = ImageCardView({
|
|
19
|
+
* @internal
|
|
20
|
+
*/ _getCardViewParameters() {
|
|
21
|
+
const data = this.data;
|
|
22
|
+
const parameters = ImageCardView({
|
|
35
23
|
image: {
|
|
36
24
|
url: data.imageUrl,
|
|
37
25
|
altText: data.iconAltText,
|
|
@@ -47,24 +35,24 @@ var BaseImageCardView = /** @class */ (function (_super) {
|
|
|
47
35
|
// updating the cardViewType to track "old" templates
|
|
48
36
|
parameters.cardViewType = 'image-template';
|
|
49
37
|
return parameters;
|
|
50
|
-
}
|
|
51
|
-
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Returns the Adaptive Card template for the {@link BaseImageCardView}.
|
|
41
|
+
*
|
|
42
|
+
* @public
|
|
43
|
+
* @sealed
|
|
44
|
+
*
|
|
45
|
+
* @deprecated template property is deprecated for card views.
|
|
46
|
+
*/ get template() {
|
|
47
|
+
return this._getTemplate(imageL1Template, imageL1TemplateSelectAction);
|
|
48
|
+
}
|
|
49
|
+
constructor(...args){
|
|
50
|
+
super(...args);
|
|
52
51
|
/**
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
*
|
|
58
|
-
* @deprecated template property is deprecated for card views.
|
|
59
|
-
*/
|
|
60
|
-
get: function () {
|
|
61
|
-
return this._getTemplate(imageL1Template, imageL1TemplateSelectAction);
|
|
62
|
-
},
|
|
63
|
-
enumerable: false,
|
|
64
|
-
configurable: true
|
|
65
|
-
});
|
|
66
|
-
return BaseImageCardView;
|
|
67
|
-
}(BaseTemplateCardView));
|
|
68
|
-
export { BaseImageCardView };
|
|
52
|
+
* @internal
|
|
53
|
+
*/ this._templateType = 'Image';
|
|
54
|
+
}
|
|
55
|
+
}
|
|
69
56
|
_ES5CompatibleClass(BaseImageCardView);
|
|
70
|
-
|
|
57
|
+
|
|
58
|
+
//# sourceMappingURL=./BaseImageCardView.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { _ES5CompatibleClass } from '@microsoft/sp-core-library';
|
|
3
2
|
import { primaryTextL1Template } from '../../ac-template/primaryTextL1Template';
|
|
4
3
|
import { primaryTextL1TemplateSelectAction } from '../../ac-template/primaryTextL1TemplateSelectAction';
|
|
@@ -16,23 +15,12 @@ import { PrimaryTextCardView } from './parameters/GenericTemplates';
|
|
|
16
15
|
*
|
|
17
16
|
*
|
|
18
17
|
* @public
|
|
19
|
-
*/
|
|
20
|
-
var BasePrimaryTextCardView = /** @class */ (function (_super) {
|
|
21
|
-
__extends(BasePrimaryTextCardView, _super);
|
|
22
|
-
function BasePrimaryTextCardView() {
|
|
23
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
-
/**
|
|
25
|
-
* @internal
|
|
26
|
-
*/
|
|
27
|
-
_this._templateType = 'PrimaryText';
|
|
28
|
-
return _this;
|
|
29
|
-
}
|
|
18
|
+
*/ export class BasePrimaryTextCardView extends BaseTemplateCardView {
|
|
30
19
|
/**
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
var parameters = PrimaryTextCardView({
|
|
20
|
+
* @internal
|
|
21
|
+
*/ _getCardViewParameters() {
|
|
22
|
+
const data = this.data;
|
|
23
|
+
const parameters = PrimaryTextCardView({
|
|
36
24
|
cardBar: this._getCardBarConfiguration(),
|
|
37
25
|
header: {
|
|
38
26
|
componentName: 'text',
|
|
@@ -47,23 +35,23 @@ var BasePrimaryTextCardView = /** @class */ (function (_super) {
|
|
|
47
35
|
// updating the cardViewType to track "old" templates
|
|
48
36
|
parameters.cardViewType = 'primaryText-template';
|
|
49
37
|
return parameters;
|
|
50
|
-
}
|
|
51
|
-
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Returns the Adaptive Card template for the {@link BasePrimaryTextCardView}.
|
|
41
|
+
*
|
|
42
|
+
* @public
|
|
43
|
+
* @sealed
|
|
44
|
+
* @deprecated template property is deprecated for card views.
|
|
45
|
+
*/ get template() {
|
|
46
|
+
return this._getTemplate(primaryTextL1Template, primaryTextL1TemplateSelectAction);
|
|
47
|
+
}
|
|
48
|
+
constructor(...args){
|
|
49
|
+
super(...args);
|
|
52
50
|
/**
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
* @deprecated template property is deprecated for card views.
|
|
58
|
-
*/
|
|
59
|
-
get: function () {
|
|
60
|
-
return this._getTemplate(primaryTextL1Template, primaryTextL1TemplateSelectAction);
|
|
61
|
-
},
|
|
62
|
-
enumerable: false,
|
|
63
|
-
configurable: true
|
|
64
|
-
});
|
|
65
|
-
return BasePrimaryTextCardView;
|
|
66
|
-
}(BaseTemplateCardView));
|
|
67
|
-
export { BasePrimaryTextCardView };
|
|
51
|
+
* @internal
|
|
52
|
+
*/ this._templateType = 'PrimaryText';
|
|
53
|
+
}
|
|
54
|
+
}
|
|
68
55
|
_ES5CompatibleClass(BasePrimaryTextCardView);
|
|
69
|
-
|
|
56
|
+
|
|
57
|
+
//# sourceMappingURL=./BasePrimaryTextCardView.js.map
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { _ES5CompatibleClass } from '@microsoft/sp-core-library';
|
|
2
|
+
import { cloneDeep } from '@microsoft/sp-lodash-subset';
|
|
3
|
+
import { BaseCardView } from './BaseCardView';
|
|
4
|
+
import { _cardButtonToConfiguration } from '../../components/CardButtonComponent';
|
|
5
|
+
/**
|
|
6
|
+
* Primitive base class for template-based Card views.
|
|
7
|
+
*
|
|
8
|
+
* @remarks No third-party Card views should inherit from this class.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
* @sealed
|
|
12
|
+
*/ export class BaseTemplateCardView extends BaseCardView {
|
|
13
|
+
/**
|
|
14
|
+
* The buttons displayed on the Card.
|
|
15
|
+
*
|
|
16
|
+
* @remarks Some Card view templates will restrict how many buttons can be displayed depending on
|
|
17
|
+
* various factors. See the documentation for the respective base Card View class for specific details.
|
|
18
|
+
*
|
|
19
|
+
* @virtual
|
|
20
|
+
*/ get cardButtons() {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
*/ _getTemplate(template, cardSelectionTemplate) {
|
|
26
|
+
return cloneDeep(this.onCardSelection ? cardSelectionTemplate : template);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Transforms cardButtons to GenericCardViewFooterConfiguration
|
|
30
|
+
*
|
|
31
|
+
* @internal
|
|
32
|
+
*/ _getGenericCardViewFooterConfiguration() {
|
|
33
|
+
const cardButtons = this.cardButtons;
|
|
34
|
+
if (!cardButtons) {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
if (cardButtons.length === 1) {
|
|
38
|
+
return _cardButtonToConfiguration(cardButtons[0]);
|
|
39
|
+
}
|
|
40
|
+
if (cardButtons.length > 2) {
|
|
41
|
+
return cardButtons.splice(0, 2).map((button)=>_cardButtonToConfiguration(button));
|
|
42
|
+
} else {
|
|
43
|
+
return cardButtons.map((button)=>_cardButtonToConfiguration(button));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Gets the card bar configuration based on card parameters (data)
|
|
48
|
+
*
|
|
49
|
+
* @internal
|
|
50
|
+
*/ _getCardBarConfiguration() {
|
|
51
|
+
const { title, iconProperty, iconAltText, _iconPropertyFallback } = this.data;
|
|
52
|
+
return {
|
|
53
|
+
componentName: 'cardBar',
|
|
54
|
+
title: title || this._ace.title,
|
|
55
|
+
icon: {
|
|
56
|
+
url: iconProperty || this._ace.iconProperty,
|
|
57
|
+
altText: iconAltText,
|
|
58
|
+
_urlFallback: _iconPropertyFallback
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
_ES5CompatibleClass(BaseTemplateCardView);
|
|
64
|
+
|
|
65
|
+
//# sourceMappingURL=./BaseTemplateCardView.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseBasicCardView } from './BaseBasicCardView';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/ export class DefaultCardView extends BaseBasicCardView {
|
|
5
|
+
get data() {
|
|
6
|
+
return {
|
|
7
|
+
primaryText: this._primaryText
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
constructor(primaryText){
|
|
11
|
+
super();
|
|
12
|
+
/**
|
|
13
|
+
* @internal
|
|
14
|
+
*/ this._templateType = 'Basic';
|
|
15
|
+
this._primaryText = primaryText;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=./DefaultCardView.js.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The card view parameters processors.
|
|
3
|
+
* @remarks - The processors are used to process the card view parameters before rendering.
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
*/ export class CardViewParametersProcessors {
|
|
7
|
+
/**
|
|
8
|
+
* To register a processor for a key.
|
|
9
|
+
*/ static register(key, processor) {
|
|
10
|
+
this._processors.set(key, processor);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* To execute a processor for a key.
|
|
14
|
+
* @remarks - If no processor is registered for the key, the parameters are returned as is.
|
|
15
|
+
* @param key - The key.
|
|
16
|
+
* @param parameters - The card view parameters to process.
|
|
17
|
+
* @param context - The context for the processor.
|
|
18
|
+
*/ static execute(key, parameters, context) {
|
|
19
|
+
if (this._processors.has(key)) {
|
|
20
|
+
const processor = this._processors.get(key);
|
|
21
|
+
return processor(parameters, context);
|
|
22
|
+
}
|
|
23
|
+
return parameters;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The registered processors map.
|
|
28
|
+
*/ CardViewParametersProcessors._processors = new Map();
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=./CardViewParametersProcessors.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
1
|
import { _preProcessLineChartParameters, _lineConfigurationToParameters } from '../../../components/LineChartComponent';
|
|
3
2
|
import { CardViewParametersProcessors } from './CardViewParametersProcessors';
|
|
4
3
|
import { _textConfigurationToParameters } from '../../../components/TextComponent';
|
|
@@ -14,9 +13,8 @@ import { _preProcessBarChartParameters } from '../../../components/BarChartCompo
|
|
|
14
13
|
* @returns - line chart card view parameters.
|
|
15
14
|
*
|
|
16
15
|
* @public
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
return _DataVisualizationCardView(configuration, (_lineConfigurationToParameters));
|
|
16
|
+
*/ export function LineChartCardView(configuration) {
|
|
17
|
+
return _DataVisualizationCardView(configuration, _lineConfigurationToParameters);
|
|
20
18
|
}
|
|
21
19
|
/**
|
|
22
20
|
* Helper method to create a pie chart card view
|
|
@@ -25,8 +23,7 @@ export function LineChartCardView(configuration) {
|
|
|
25
23
|
* @returns - pie chart card view parameters.
|
|
26
24
|
*
|
|
27
25
|
* @public
|
|
28
|
-
*/
|
|
29
|
-
export function PieChartCardView(configuration) {
|
|
26
|
+
*/ export function PieChartCardView(configuration) {
|
|
30
27
|
return _DataVisualizationCardView(configuration, _pieConfigurationToParameters);
|
|
31
28
|
}
|
|
32
29
|
/**
|
|
@@ -36,8 +33,7 @@ export function PieChartCardView(configuration) {
|
|
|
36
33
|
* @returns - bar chart card view parameters.
|
|
37
34
|
*
|
|
38
35
|
* @public
|
|
39
|
-
*/
|
|
40
|
-
export function BarChartCardView(configuration) {
|
|
36
|
+
*/ export function BarChartCardView(configuration) {
|
|
41
37
|
return _DataVisualizationCardView(configuration, _barConfigurationToParameters);
|
|
42
38
|
}
|
|
43
39
|
/**
|
|
@@ -47,33 +43,40 @@ export function BarChartCardView(configuration) {
|
|
|
47
43
|
* @returns - card view parameters.
|
|
48
44
|
*
|
|
49
45
|
* @internal
|
|
50
|
-
*/
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
var bodyParameters;
|
|
46
|
+
*/ function _DataVisualizationCardView(configuration, componentConfigurationToParameters) {
|
|
47
|
+
const { cardBar, header, body, footer } = configuration;
|
|
48
|
+
let bodyParameters;
|
|
54
49
|
if (!Array.isArray(body)) {
|
|
55
|
-
bodyParameters = [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
50
|
+
bodyParameters = [
|
|
51
|
+
componentConfigurationToParameters(body)
|
|
52
|
+
];
|
|
53
|
+
} else if (body.length === 1) {
|
|
54
|
+
bodyParameters = [
|
|
55
|
+
componentConfigurationToParameters(body[0])
|
|
56
|
+
];
|
|
57
|
+
} else {
|
|
58
|
+
bodyParameters = [
|
|
59
|
+
_textConfigurationToParameters(body[0]),
|
|
60
|
+
componentConfigurationToParameters(body[1])
|
|
61
|
+
];
|
|
62
62
|
}
|
|
63
63
|
return {
|
|
64
64
|
cardViewType: 'dataVisualization',
|
|
65
65
|
image: undefined,
|
|
66
|
-
cardBar: [
|
|
67
|
-
|
|
66
|
+
cardBar: [
|
|
67
|
+
_cardViewBarConfigurationToParameters(cardBar)
|
|
68
|
+
],
|
|
69
|
+
header: header && [
|
|
70
|
+
_textConfigurationToParameters(header)
|
|
71
|
+
],
|
|
68
72
|
body: bodyParameters,
|
|
69
73
|
footer: footer && _footerConfigurationToFooterParameters(footer)
|
|
70
74
|
};
|
|
71
75
|
}
|
|
72
76
|
/**
|
|
73
77
|
* @internal
|
|
74
|
-
*/
|
|
75
|
-
|
|
76
|
-
switch (parameters.dataVisualizationKind) {
|
|
78
|
+
*/ function _dataVisualizationComponentProcessor(parameters, hasHeader, hasDescription, hasFooter, cardSize) {
|
|
79
|
+
switch(parameters.dataVisualizationKind){
|
|
77
80
|
case 'line':
|
|
78
81
|
return _preProcessLineChartParameters(parameters, hasHeader, hasDescription, hasFooter, cardSize);
|
|
79
82
|
case 'pie':
|
|
@@ -86,26 +89,28 @@ function _dataVisualizationComponentProcessor(parameters, hasHeader, hasDescript
|
|
|
86
89
|
}
|
|
87
90
|
/**
|
|
88
91
|
* @internal
|
|
89
|
-
*/
|
|
90
|
-
|
|
91
|
-
|
|
92
|
+
*/ export const _dataVisualizationCardViewParametersProcessor = (cardViewParameters, context)=>{
|
|
93
|
+
const params = {
|
|
94
|
+
...cardViewParameters
|
|
95
|
+
};
|
|
92
96
|
if (context.cardSize === 'Medium') {
|
|
93
97
|
params.header = undefined;
|
|
94
98
|
params.footer = undefined;
|
|
95
99
|
if (params.body.length === 2) {
|
|
96
|
-
params.body = [
|
|
100
|
+
params.body = [
|
|
101
|
+
params.body[1]
|
|
102
|
+
];
|
|
97
103
|
}
|
|
98
104
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
105
|
+
const { header, body, footer } = params;
|
|
106
|
+
const hasHeader = !!header?.length;
|
|
107
|
+
const hasDescription = params.body.length === 2;
|
|
108
|
+
const hasFooter = !!footer?.length;
|
|
103
109
|
if (body.length === 1) {
|
|
104
110
|
params.body = [
|
|
105
111
|
_dataVisualizationComponentProcessor(body[0], hasHeader, hasDescription, hasFooter, context.cardSize)
|
|
106
112
|
];
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
113
|
+
} else {
|
|
109
114
|
params.body = [
|
|
110
115
|
body[0],
|
|
111
116
|
_dataVisualizationComponentProcessor(body[1], hasHeader, hasDescription, hasFooter, context.cardSize)
|
|
@@ -114,4 +119,5 @@ export var _dataVisualizationCardViewParametersProcessor = function (cardViewPar
|
|
|
114
119
|
return params;
|
|
115
120
|
};
|
|
116
121
|
CardViewParametersProcessors.register('dataVisualization', _dataVisualizationCardViewParametersProcessor);
|
|
117
|
-
|
|
122
|
+
|
|
123
|
+
//# sourceMappingURL=./DataVisualizationParameters.js.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { _cardViewBarConfigurationToParameters } from '../../../components/CardBarComponent';
|
|
2
|
+
import { _cardViewPoweredByConfigurationToParameters } from '../../../components/PoweredByComponent';
|
|
3
|
+
import { _searchBoxConfigurationToParameters } from '../../../components/SearchBoxComponent';
|
|
4
|
+
import { _searchFooterConfigurationToParameters } from '../../../components/SearchFooterComponent';
|
|
5
|
+
import { _textConfigurationToParameters } from '../../../components/TextComponent';
|
|
6
|
+
import { _promptsSetConfigurationToParameters } from '../../../components/PromptsSetComponent';
|
|
7
|
+
/**
|
|
8
|
+
* Helper method to create a Search Card View.
|
|
9
|
+
* @param configuration - search card view configuration.
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
*/ export function SearchCardView(configuration) {
|
|
13
|
+
const { cardBar, header, body, footer } = configuration;
|
|
14
|
+
return {
|
|
15
|
+
cardViewType: 'search',
|
|
16
|
+
image: undefined,
|
|
17
|
+
cardBar: [
|
|
18
|
+
_cardViewBarConfigurationToParameters(cardBar)
|
|
19
|
+
],
|
|
20
|
+
header: [
|
|
21
|
+
_textConfigurationToParameters(header)
|
|
22
|
+
],
|
|
23
|
+
body: [
|
|
24
|
+
_searchBoxConfigurationToParameters(body)
|
|
25
|
+
],
|
|
26
|
+
footer: footer ? [
|
|
27
|
+
_searchFooterConfigurationToParameters(footer)
|
|
28
|
+
] : undefined
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Helper method to create a Copilot-powered Card View.
|
|
33
|
+
* @param configuration - copilot powered card view configuration.
|
|
34
|
+
*
|
|
35
|
+
* @internal
|
|
36
|
+
*/ export function CopilotCardView(configuration) {
|
|
37
|
+
const { cardBar, header, body, footer } = configuration;
|
|
38
|
+
return {
|
|
39
|
+
cardViewType: 'copilot',
|
|
40
|
+
cardBar: [
|
|
41
|
+
_cardViewBarConfigurationToParameters(cardBar)
|
|
42
|
+
],
|
|
43
|
+
image: undefined,
|
|
44
|
+
header: [
|
|
45
|
+
_textConfigurationToParameters(header)
|
|
46
|
+
],
|
|
47
|
+
body: body.componentName === 'promptsSet' ? [
|
|
48
|
+
_promptsSetConfigurationToParameters(body)
|
|
49
|
+
] : [
|
|
50
|
+
_textConfigurationToParameters(body)
|
|
51
|
+
],
|
|
52
|
+
footer: [
|
|
53
|
+
_cardViewPoweredByConfigurationToParameters(footer)
|
|
54
|
+
]
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
//# sourceMappingURL=./FocusedParameters.js.map
|