@microsoft/sp-adaptive-card-extension-base 1.13.1 → 1.14.0
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 +75 -70
- package/dist/index-internal-beta.d.ts +267 -16
- package/dist/index-internal-public.d.ts +171 -9
- package/dist/index-internal.d.ts +171 -9
- package/dist/sp-adaptive-card-extension-base_default_173ae32b19aec2e7570e.js +1 -0
- package/dist/sp-adaptive-card-extension-base_en-us_173ae32b19aec2e7570e.js +1 -0
- package/dist/sp-adaptive-card-extension-base_qps-ploc_173ae32b19aec2e7570e.js +1 -0
- package/dist/sp-adaptive-card-extension-base_qps-ploca_173ae32b19aec2e7570e.js +1 -0
- package/dist/test-api/AdaptiveCardExtensionTestWrapper.d.ts +2 -1
- package/dist/test-api/AdaptiveCardExtensionTestWrapper.js +7 -2
- package/dist/tsdoc-metadata.json +1 -1
- package/lib-commonjs/AdaptiveCardExtensionContext.js +12 -0
- package/lib-commonjs/AdaptiveCardExtensionLoader.js +2 -1
- package/lib-commonjs/BaseAdaptiveCardExtension.js +55 -6
- package/lib-commonjs/ac-template/util/actionButtonHelper.js +17 -1
- package/lib-commonjs/common/Flights.js +8 -1
- package/lib-commonjs/common/Killswitches.js +15 -1
- package/lib-commonjs/index.js +4 -0
- package/lib-commonjs/interfaces/ILocation.js +1 -1
- package/lib-commonjs/isolation/IsolatedAdaptiveCardExtensionService.js +217 -0
- package/lib-commonjs/isolation/interfaces/IIsolatedAction.js +3 -0
- package/lib-commonjs/isolation/interfaces/IIsolatedListener.js +3 -0
- package/lib-commonjs/isolation/interfaces/IIsolatedServiceCallbackParameters.js +3 -0
- package/lib-commonjs/isolation/interfaces/ILoadIsolatedAdaptiveCardExtensionParameters.js +3 -0
- package/lib-commonjs/isolation/interfaces/IRenderIsolatedQuickViewParameters.js +3 -0
- package/lib-commonjs/isolation/interfaces/IsolatedAdaptiveCardExtensionApplicationMessageEvent.js +3 -0
- package/lib-commonjs/isolation/interfaces/IsolatedServiceMessageEvent.js +3 -0
- package/lib-commonjs/test-api/AdaptiveCardExtensionTestWrapper.js +7 -2
- package/lib-commonjs/views/base/BaseView.js +10 -0
- package/package.json +8 -8
- package/dist/sp-adaptive-card-extension-base_default_e16b34147e78dbf0c04c.js +0 -1
- package/dist/sp-adaptive-card-extension-base_en-us_e16b34147e78dbf0c04c.js +0 -1
- package/dist/sp-adaptive-card-extension-base_qps-ploc_e16b34147e78dbf0c04c.js +0 -1
- package/dist/sp-adaptive-card-extension-base_qps-ploca_e16b34147e78dbf0c04c.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
define("eeec822e-c28a-46b4-affc-7058e4c1aa80_1.14.0",["tslib","@microsoft/sp-component-base","@microsoft/sp-loader","@microsoft/sp-lodash-subset","@microsoft/sp-core-library","@microsoft/sp-page-context","@microsoft/sp-diagnostics"],function(n,a,i,r,o,s,c){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="mwqp")}({"17wl":function(e,t){e.exports=n},"7Awa":function(e,t){e.exports=a},I6O9:function(e,t){e.exports=i},Pk8u:function(e,t){e.exports=r},UWqr:function(e,t){e.exports=o},"X+PM":function(e,t){e.exports=s},mGD9:function(e){e.exports=JSON.parse('{"t":"TargetUrlIsUndefinedOrEmpty","e":"DefaultIconAltText"}')},mwqp:function(e,t,n){"use strict";n.r(t),n.d(t,"AdaptiveCardExtensionContext",function(){return r}),n.d(t,"_AdaptiveCardExtensionHost",function(){return o}),n.d(t,"_AdaptiveCardExtensionLoader",function(){return f}),n.d(t,"BaseAdaptiveCardExtension",function(){return K}),n.d(t,"_BaseAdaptiveCardExtensionCache",function(){return I}),n.d(t,"_LocalStorageACECache",function(){return x}),n.d(t,"MediaType",function(){return D}),n.d(t,"_IsolatedAdaptiveCardExtensionService",function(){return q}),n.d(t,"BaseView",function(){return H}),n.d(t,"BaseBasicCardView",function(){return N}),n.d(t,"BaseCardView",function(){return R}),n.d(t,"BaseImageCardView",function(){return Q}),n.d(t,"BasePrimaryTextCardView",function(){return Y}),n.d(t,"QuickViewNavigator",function(){return G}),n.d(t,"ViewNavigator",function(){return z}),n.d(t,"BaseAdaptiveCardView",function(){return J}),n.d(t,"_isAdaptiveCardExtensionLKGCachingEnabled",function(){return _});var a=n("17wl"),i=n("7Awa"),r=function(e){function t(t){var n=e.call(this,t)||this;return n._aceHost=t.host,n.manifest=t.manifest,n._deviceContext=t.deviceContext,n._location=t.location,n}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"_host",{get:function(){return this._aceHost},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propertyPane",{get:function(){return this._host.propertyPane},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceContext",{get:function(){return this._deviceContext},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this._location()},enumerable:!1,configurable:!0}),t}(i.BaseComponentContext),o=function(){function e(e){this._onBeforeInitializedCallback=e.onBeforeInitializedCallback,this._onUpdateCallback=e.onUpdateCallback,this._onErrorCallback=e.onError,this._onRequestRenderTypeCallback=e.onRequestRenderTypeCallback,this._onVisibilityChanged=e.onVisibilityChanged,this._cache=e.cache,this.propertyPane=e.propertyPane}return e.prototype.update=function(e){this._onUpdateCallback(e)},e.prototype.onBeforeInitialized=function(e){this._onBeforeInitializedCallback&&this._onBeforeInitializedCallback(e)},e.prototype.onError=function(e){this._onErrorCallback&&this._onErrorCallback(e)},e.prototype.requestRenderTypeChange=function(e,t){this._onRequestRenderTypeCallback(e,t)},Object.defineProperty(e.prototype,"cache",{get:function(){return this._cache},enumerable:!1,configurable:!0}),e.prototype.onVisibilityChanged=function(e){this._onVisibilityChanged(e)},e}(),s=n("I6O9"),c=n("UWqr"),d=n("ut3N");function l(){return c._SPKillSwitch.isActivated("6ca4b572-5356-4763-87bb-1e80205bfa6b")}function u(){return c._SPKillSwitch.isActivated("00be0ead-6f25-4d07-8cef-9840d5522e49")}var f=function(){function e(){}return e._createQosExtraData=function(e,t){return{alias:e.alias,manifestId:e.id,mpnId:e.mpnId,isInternal:e.isInternal,teamsHosted:c._BrowserUtilities.isTeamsHosted(),deviceContext:t}},e.prototype.load=function(t){var n,a,i=this,r=new d._QosMonitor("AdaptiveCardExtension.Load",!0),o=e._createQosExtraData(t.manifest,t.deviceContext);return s.SPComponentLoader.loadComponent(t.manifest).then(function(e){return e.default&&(e=e.default),new e}).catch(function(e){throw r.writeUnexpectedFailure("AdaptiveCardExtensionLoadFailed",e,o),n=e,e}).then(function(e){(a=e)._internalInitialize(i._getContext(t),t.addedFromPersistedData,t.initialDisplayMode),a._internalDeserialize(t.aceData),t.host.onBeforeInitialized(a);var n,r=t.cacheObject?{state:(n=t.cacheObject).cachedState,cardNavigatorState:n.cardNavigatorState}:void 0;return a.onInit(r)}).then(function(){return r.writeSuccess(o),u()||a._internalOnAfterInit(),a}).catch(function(e){throw n||r.writeUnexpectedFailure("AdaptiveCardExtensionInitializationFailed",e,o),e})},e.prototype._getContext=function(e){return new r({host:e.host,manifest:e.manifest,instanceId:e.instanceId,parentServiceScope:e.serviceScope,loggingTag:"",deviceContext:e.deviceContext,location:e.location})},e}(),p=n("Pk8u");function m(){return c._SPFlight.isEnabled(60544)}function _(){return c._SPFlight.isEnabled(60456)}var h=n("mGD9"),b=new RegExp(/(?=.+)(\/l\/entity\/.+)/gi),g={Medium:1,Large:2};function v(e,t,n,a,i){var r,o;if("Submit"===t.type)(o=t).confirmationDialog&&(o.parameters||(o.parameters={}),o.parameters.__MSConfirmationDialog__=o.confirmationDialog),r={id:n,type:"Action.Submit",style:i,title:a,data:t.parameters||void 0};else if("ExternalLink"===t.type){y(t.parameters,e);var s=t.parameters.target;if(!s||""===s)throw new Error(c.Text.format(h.t,n));r={id:n,type:"Action.OpenUrl",style:i,title:a,url:s}}else"QuickView"===t.type?r={id:n,type:"Action.Submit",style:i,title:a,data:{_internalQuickViewId:t.parameters.view}}:c._SPFlight.isEnabled(60447)&&"VivaAction.SelectMedia"===t.type?r={id:n,type:"VivaAction.SelectMedia",style:i,title:a,parameters:t.parameters}:m()&&"VivaAction.GetLocation"===t.type?r={id:n,type:"VivaAction.GetLocation",style:i,title:a,parameters:t.parameters}:m()&&"VivaAction.ShowLocation"===t.type&&(r={id:n,type:"VivaAction.ShowLocation",style:i,title:a,parameters:t.parameters});return r}function y(e,t){if(e&&e.isTeamsDeepLink&&function(e){return c._SPKillSwitch.isActivated("cfe2dadf-9488-4409-b3d4-d3dd23a7970e")?"WebView"===e:"Mobile"!==e}(t)){var n=e.target.match(b);n&&n[0]&&(e.target="msteams:"+n[0])}}function S(e,t,n,i,r,o){var s,c=e.cardButtons,d=e.data,l=e.onCardSelection,u=e._templateType;if(i||(i=e.template),void 0===c||"Image"===u&&"Large"!==t||function(e,t,n,a){for(var i=[],r=Math.min(g[n],(null==t?void 0:t.length)||0),o=0;o<r;o++){var s=t[o],c=s.id?s.id:"ac-button-"+o;i.push(v(a,s.action,c,s.title,s.style))}e.actions=i}(i,c,t,n),l){var f=v(n,l,"select-action");"Action.OpenUrl"!==f.type&&"Action.Submit"!==f.type||(s=f)}return{data:Object(a.__assign)({selectAction:s,iconProperty:r,iconAltText:d.iconAltText||h.e,title:o},d),template:i,cardProperties:{iconProperty:d.iconProperty||r,size:t,title:d.title||o,templateType:u}}}var D,I=function(){function e(){}return e.prototype.get=function(e,t){var n=this.getFromSource(e,t);if(n)return(new Date).getTime()<n.expirationTime?n:void 0},e}(),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),t.getKey=function(e,t){return"AdaptiveCardExtension_LKG_"+e+"_"+t},Object.defineProperty(t,"instance",{get:function(){return void 0===this._instance&&(this._instance=new t),this._instance},enumerable:!1,configurable:!0}),t.prototype.save=function(e,t,n){var a=this._getLocalStorageEntry(e);a.set(t,n);var i=Array.from(a.entries());localStorage.setItem(e,JSON.stringify(i))},t.prototype.getFromSource=function(e,t){return this._getLocalStorageEntry(e).get(t)},t.prototype._getLocalStorageEntry=function(e){var t=localStorage.getItem(e);return t?new Map(JSON.parse(t)):new Map},t}(I),C=function(){function e(e,t,n,i,r,o){this._context=e,this._getCardSize=t,this._getIconProperty=n,this._getTitle=i,this._handleInitializeCallback=r,this._settings=Object(a.__assign)(Object(a.__assign)({},this._defaultCacheSettings()),o)}return e.prototype.save=function(e,t,n,a,i){var r,o,s;if(this._settings.isEnabled){var c=this._initializeCustomCardView();if(c&&c.isCacheEnabled||!c&&t.isCacheEnabled){var d=c?S(c,this._getCardSize(),this._context.deviceContext,void 0,this._getIconProperty(),this._getTitle()):n.card;s=this._createCacheObject(n,d,a,i),null===(r=this._context._host.cache)||void 0===r||r.save(x.getKey(this._context.pageContext.site.id.toString(),null===(o=this._context.pageContext.listItem)||void 0===o?void 0:o.uniqueId),e,s)}}return s},e.prototype._createCacheObject=function(e,t,n,a){return{cachedCard:t,cardNavigatorState:n,isVisible:e.isVisible,cachedState:a,expirationTime:(new Date).getTime()+1e3*this._settings.expiryTimeInSeconds}},e.prototype._initializeCustomCardView=function(){if(this._settings.cachedCardView){var e=this._settings.cachedCardView();return this._handleInitializeCallback(e),e}},e.prototype._defaultCacheSettings=function(){return{isEnabled:!0,expiryTimeInSeconds:86400,cachedCardView:void 0}},e}(),O="auto",w={type:"TextBlock",subType:"Primary",text:"${primaryText}",weight:"Bolder",maxLines:1,spacing:"none"},E={type:"TextBlock",subType:"BodySecondary",text:"${description}",spacing:"none",wrap:!0},A={type:"TextBlock",subType:"BodyPrimary",text:"${primaryText}",spacing:"none",wrap:!0},L={type:"TextBlock",subType:"Title",text:"${title}",wrap:!1,maxLines:1,spacing:"none"},k={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:O},{type:"Column",spacing:"none",items:[L],width:"stretch"}]},A]}]},M={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",items:[{type:"Image",url:"${imageUrl}"},{type:"ColumnSet",spacing:"none",columns:[{type:"Column",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:O},{type:"Column",spacing:"none",items:[L],width:"stretch"}]},A]}]},P={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:O},{type:"Column",spacing:"none",items:[L],width:"stretch"}]},{type:"Container",spacing:"none",items:[w,E]}]}]},T={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",selectAction:"${selectAction}",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:O},{type:"Column",spacing:"none",items:[L],width:"stretch"}]},A]}]},U={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",selectAction:"${selectAction}",items:[{type:"Image",url:"${imageUrl}"},{type:"ColumnSet",spacing:"none",columns:[{type:"Column",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:O},{type:"Column",spacing:"none",items:[L],width:"stretch"}]},A]}]},F={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",selectAction:"${selectAction}",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:O},{type:"Column",spacing:"none",items:[L],width:"stretch"}]},{type:"Container",spacing:"none",items:[w,E]}]}]},H=function(){function e(){}return Object.defineProperty(e.prototype,"cardNavigator",{get:function(){return this._ace.cardNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quickViewNavigator",{get:function(){return this._ace.quickViewNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){return this._properties},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cardSize",{get:function(){return this._getCardSize()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),e.prototype.onAction=function(e){},e.prototype.onActionError=function(e){},e.prototype.setState=function(e){this._ace.setState(e)},e.prototype.setVisibility=function(e){this._ace.isVisible=e},e}(),R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"cardButtons",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onCardSelection",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCacheEnabled",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype._getTemplate=function(e,t){return Object(p.cloneDeep)(this.onCardSelection?t:e)},t}(H),N=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._templateType="Basic",t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"template",{get:function(){return this._getTemplate(k,T)},enumerable:!1,configurable:!0}),t}(R),B=function(e){function t(t){var n=e.call(this)||this;return n._primaryText=t,n._templateType="Basic",n}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return{primaryText:this._primaryText}},enumerable:!1,configurable:!0}),t}(N),j=/\{(\d+)\}/g,V=function(){function e(){this._registeredCallbacks=new Map}return e.prototype.register=function(e,t){this._registeredCallbacks.has(e)||this._registeredCallbacks.set(e,t)},e.prototype.consume=function(e){var t=this._registeredCallbacks.get(e);if(!t)throw new Error(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e.replace(j,function(e,n){return null===t[n]?"":""+t[n]})}("View with id {0} must be registered before being used",e));return this._registeredCallbacks.delete(e),t},Object.defineProperty(e.prototype,"size",{get:function(){return this._registeredCallbacks.size},enumerable:!1,configurable:!0}),e}(),z=function(){function e(e,t){this._handleStackChangedCallback=e,this._handleInitializeCallback=t,this._viewStack=new Array,this._viewCache=new Map,this._viewRegistry=new V}return e.prototype.register=function(e,t){this._viewRegistry.register(e,t)},e.prototype.push=function(e,t){void 0===t&&(t=!1),this._push(e),this._handleStackChangedCallback(t)},e.prototype.replace=function(e,t){void 0===t&&(t=!1),this._pop(),this._push(e),this._handleStackChangedCallback(t)},e.prototype.pop=function(e){void 0===e&&(e=!1),this.size>1&&(this._pop(),this._handleStackChangedCallback(e))},Object.defineProperty(e.prototype,"size",{get:function(){return this._viewStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentId",{get:function(){var e=this.size;return e?this._viewStack[e-1]:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_currentView",{get:function(){return this._viewCache.get(this._viewStack[this.size-1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewStack",{get:function(){return this._viewStack},enumerable:!1,configurable:!0}),e.prototype._clear=function(){this._viewStack=[]},e.prototype._forEach=function(e){this._viewCache.forEach(e)},e.prototype._getRegistrySize=function(){return this._viewRegistry.size},e.prototype._push=function(e){if(void 0===this._viewCache.get(e)){var t=this._viewRegistry.consume(e)();this._handleInitializeCallback(t),this._viewCache.set(e,t)}this._viewStack.push(e)},e.prototype._pop=function(){this._viewStack.pop()},e}(),G=function(e){function t(t,n,a){var i=e.call(this,t,n)||this;return i._closeQuickViewCallback=a,i}return Object(a.__extends)(t,e),t.prototype.close=function(){this._closeQuickViewCallback()},t}(z),K=function(e){function t(){var t=e.call(this)||this;return t._isInitialized=!1,t._getCard=function(e){try{return S(t._cardNavigator._currentView,t.cardSize,t.context.deviceContext,e?t._ACRenderArgs.card.template:void 0,t.iconProperty,t.title)}catch(e){throw t.context._host.onError(e.toString()),e}},t._onViewInitialized=function(e){e._state=t.state,e._ace=t,e._properties=t.properties,e._getCardSize=function(){return t.cardSize},e._context=t.context},t._navigatorCallback=function(e){e||t.update(t._renderType)},t._closeQuickViewCallback=function(){t.context._host.requestRenderTypeChange("Card",t.instanceId)},t._cardSize="Medium",t._renderType="Card",t._isVisible=!0,t._cardNavigator=new z(t._navigatorCallback,t._onViewInitialized),t._quickViewNavigator=new G(t._navigatorCallback,t._onViewInitialized,t._closeQuickViewCallback),t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"cardNavigator",{get:function(){return this._cardNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cardSize",{get:function(){return this._cardSize},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataVersion",{get:function(){return c.Version.parse("1.0")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"description",{get:function(){return this._description},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayMode",{get:function(){return this._displayMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"properties",{get:function(){return this._properties},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"quickViewNavigator",{get:function(){return this._quickViewNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedFromPersistedData",{get:function(){return this._renderedFromPersistedData},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedOnce",{get:function(){return this._renderedOnce},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderType",{get:function(){return this._renderType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propertiesMetadata",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},set:function(e){if(this._state)throw new Error("state can only be initialized once");this._state=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this._title},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"iconProperty",{get:function(){return this._iconProperty},enumerable:!1,configurable:!0}),t.prototype.getPropertyPaneConfiguration=function(){return{pages:[]}},t.prototype.loadPropertyPaneResources=function(){return Promise.resolve()},t.prototype.getCacheSettings=function(){return{}},t.prototype.getCachedState=function(e){return{}},t.prototype._internalOnAction=function(e){c._SPKillSwitch.isActivated("5753b2a7-fd3a-47c3-b4b6-9d4ed88d2922")?("Card"===this.renderType?this._cardNavigator:this._quickViewNavigator)._currentView.onAction(e):this.navigator._currentView.onAction(e)},t.prototype._internalOnActionError=function(e){this.navigator._currentView.onActionError(e)},t.prototype.onBeforeSerialize=function(){},t.prototype.onAfterPropertiesUpdatedExternally=function(e){},t.prototype.onAfterDeserialize=function(e,t){return e},t.prototype.onDisplayModeChanged=function(e){},t.prototype.onDispose=function(){},t.prototype.onInit=function(e){return Promise.resolve()},t.prototype.onPropertyPaneFieldChanged=function(e,t,n){},t.prototype.onRenderTypeChanged=function(e){},t.prototype.renderCard=function(){},t.prototype._getPreFrameworkPropertyPaneConfiguration=function(){return[]},Object.defineProperty(t.prototype,"_isFrameworkPropertyPaneEnabled",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,(this.cardNavigator._getRegistrySize()>0||this.cardNavigator._currentView)&&this.context._host.onVisibilityChanged(this._getRenderArguments(this.renderType))},enumerable:!1,configurable:!0}),t.prototype.setState=function(e){if(!this._state)throw new Error("state must be initialized before calling setState");e&&(this._state=Object(a.__assign)(Object(a.__assign)({},this.state),Object(p.cloneDeep)(e)),this._cardNavigator._forEach(this._onViewInitialized),this._quickViewNavigator._forEach(this._onViewInitialized)),(u()||this._isInitialized)&&this.context._host.update(this._getRenderArguments(this._renderType))},t.prototype.update=function(e,t){void 0===t&&(t=!1);var n=this._getRenderArguments(e,t);this.context._host.update(n)},t.prototype._getRenderArguments=function(e,t,n){var i,r=this;if(void 0===t&&(t=!1),c._SPKillSwitch.isActivated("bb1ed3e2-2b35-4dd4-a016-bc0220dc829d")||this._setRenderType(e,n),"Card"===e&&0===this.cardNavigator.size){var o=this.renderCard();o||(o="_InternalDefaultCardView",this._cardNavigator.register(o,function(){return new B(r.description)})),this._cardNavigator.push(o,!0)}if(void 0===this._ACRenderArgs?this._ACRenderArgs={card:"Card"===e?this._getCard(t):void 0,isVisible:this._isVisible,instanceId:this.instanceId,lastUpdatedType:e,quickLook:"QuickView"===e?this._getQuickView(t):void 0}:this._updateRenderArgs(e,t),_()&&this.displayMode===c.DisplayMode.Read&&"Card"===e){var s=null===(i=this._cacheManager)||void 0===i?void 0:i.save(this.instanceId,this._cardNavigator._currentView,this._ACRenderArgs,this.cardNavigator.viewStack,this.getCachedState(Object(a.__assign)({},this._state)));this._ACRenderArgs.cacheObject=s}return this._ACRenderArgs},t.prototype._propertiesMetadata=function(){return l()?void 0:this.propertiesMetadata},t.prototype._getPropertyPaneConfiguration=function(){return this.getPropertyPaneConfiguration()},Object.defineProperty(t.prototype,"navigator",{get:function(){return"Card"===this.renderType?this._cardNavigator:this._quickViewNavigator},enumerable:!1,configurable:!0}),t.prototype._internalDeserialize=function(e){e.title&&(this._title=e.title),e.iconProperty&&(this._iconProperty=e.iconProperty),e.description&&(this._description=e.description),e.cardSize&&(this._cardSize=e.cardSize);var t=e.properties;!l()&&this.renderedFromPersistedData&&(i._PropertyMetadataProcessor.reInstateServerProcessedData(this.propertiesMetadata,t,e.serverProcessedContent),e.serverProcessedContent=void 0),this._properties?Object.assign(this._properties,t):this._properties=this.onAfterDeserialize(t,e.dataVersion?c.Version.parse(e.dataVersion):this.dataVersion)},t.prototype._internalInitialize=function(t,n,a){var i=this;e.prototype._initializeContext.call(this,t),this._displayMode=a,this._renderedOnce=!1,this._renderedFromPersistedData=n,_()&&(this._cacheManager=new C(this.context,function(){return i.cardSize},function(){return i.iconProperty},function(){return i.title},this._onViewInitialized,this.getCacheSettings()))},t.prototype._internalSetDisplayMode=function(e){if(this._displayMode!==e){var t=this._displayMode;this._displayMode=e,this.onDisplayModeChanged(t)}},t.prototype._loadPropertyPaneResources=function(){return this.loadPropertyPaneResources()},t.prototype._onPropertyPaneFieldChanged=function(e,t,n){Object(p.isEqual)(t,n)||(this._updateProperty(e,n),this.onPropertyPaneFieldChanged(e,t,n))},t.prototype._renderCompleted=function(){this._renderedOnce=!0},t.prototype._internalOnAfterInit=function(){this._isInitialized=!0},t.prototype._internalSerialize=function(){return this.onBeforeSerialize(),{dataVersion:this.dataVersion.toString(),id:this.componentId,instanceId:this.instanceId,properties:this.properties,title:this.title,description:this._description,iconProperty:this.iconProperty,cardSize:this._cardSize}},t.prototype._setRenderType=function(e,t){if(this._renderType!==e){var n=this._renderType;"QuickView"===n&&this._quickViewNavigator._clear(),"Card"===n&&(this._quickViewNavigator._clear(),void 0!==t&&this._quickViewNavigator.push(t,!0)),this._renderType=e,this.onRenderTypeChanged(n)}},t.prototype._updateConfigurableFields=function(e,t){"cardSize"===e&&(this._cardSize=t)},t.prototype._logCardActionEngagement=function(e,t,n,a,i){var r,o,s,c,l,u,f;d._EngagementLogger.log({name:"AdaptiveCardExtension.CardAction",isIntentional:!0,siteId:null===(o=null===(r=this.context.pageContext)||void 0===r?void 0:r.site)||void 0===o?void 0:o.id.toString(),webId:null===(c=null===(s=this.context.pageContext)||void 0===s?void 0:s.web)||void 0===c?void 0:c.id.toString(),extraData:{ActionType:e,Alias:this.manifest.alias,DeviceContext:n,IsInternal:this.manifest.isInternal,InstanceId:this.instanceId,ItemLocation:t,WorkLoad:t,TenantID:null===(f=null===(u=null===(l=this.context.pageContext)||void 0===l?void 0:l.aadInfo)||void 0===u?void 0:u.tenantId)||void 0===f?void 0:f.toString().toLowerCase(),EventSchemaVersion:10,ManifestId:this.manifest.id,MobileSessionId:a,MobileBootType:i,MPNId:this.manifest.mpnId}})},t.prototype._getQuickView=function(e){if(0!==this._quickViewNavigator.size){var t=this._quickViewNavigator._currentView;if(void 0!==t)return y(t.externalLink,this.context.deviceContext),{data:t.data,template:e?this._ACRenderArgs.quickLook.template:t.template,pageBarProperties:{externalLink:t.externalLink,leftNavigationButtonType:this._quickViewNavigator.size>1?"Back":"Close",title:t.title},viewId:this._quickViewNavigator.currentId,viewStackSize:this._quickViewNavigator.size}}},t.prototype._updateRenderArgs=function(e,t){this._ACRenderArgs.lastUpdatedType=e,this._ACRenderArgs.isVisible=this._isVisible,"Card"===e?this._ACRenderArgs.card=this._getCard(t):this._ACRenderArgs.quickLook=this._getQuickView(t)},t.prototype._updateProperty=function(e,t){Object(p.update)(this._properties,e,function(){return t})},t}(i.BaseComponent);!function(e){e[e.Image=1]="Image",e[e.Audio=4]="Audio"}(D||(D={}));var W=n("X+PM"),q=function(){function e(e){var t=this;this._serviceScope=e,this._callbackCache=new Map,this._isolatedFrames=new Map,this._isolatedListeners=new Map,this._handleIsolatedApplicationMessage=function(e){var n=e.data;if("applicationMessage"===n.messageType){var a=n.instanceId,i=n.kind;switch(i){case"Card":t._invokeCallback(a,{aceData:n.aceData,card:n.card,cacheObject:n.cacheObject,type:i});break;case"Error":t._invokeCallback(a,{error:n.error,type:i});break;case"Ready":var r=t._isolatedFrames.get(new URL(e.origin).hostname);if(r){r.isReady=!0;for(var o=0,s=r.messageQueue;o<s.length;o++){var c=s[o],d=c[0],l=c[1];t._sendMessage(d,l)}r.messageQueue=[]}break;default:t._logError("Unexpected message: "+JSON.stringify(e.data))}}},window.addEventListener("message",this._handleIsolatedApplicationMessage)}return Object.defineProperty(e.prototype,"_pageContext",{get:function(){return this._pContext||(this._pContext=this._serviceScope.consume(W.PageContext.serviceKey)),this._pContext},enumerable:!1,configurable:!0}),e.prototype.disposeEntry=function(e){this._isolatedListeners.delete(e)},e.prototype.load=function(e){var t=e.callback,n=e.dashboardListId,a=e.itemId,r=e.instanceId,o=e.listenerId,s=e.manifestId,d=e.isolatedDomain.toLowerCase(),l=this._isolatedFrames.get(d);if(!l){var u=document.createElement("iframe"),f=new URLSearchParams(window.location.search).toString(),p=this._pageContext.site.serverRelativeUrl,m="/"===p?"":p,_="/_layouts/15/adaptivecardextensions.aspx?dashboardListID="+n+"&id="+a+"&instanceId="+r+"&"+f,h=Object(i._ensureIsolatedDomainUrl)(d,this._pageContext.web.absoluteUrl);c._SPFlight.isEnabled(60128)?u.src=h+"/_layouts/15/framedteamslogon.aspx?spfx=true&dest="+encodeURIComponent(m+_):u.src=h+_,u.hidden=!0,u.style.position="absolute",document.body.appendChild(u),l={iframe:u,isReady:!1,messageQueue:[]},this._isolatedFrames.set(d.toLowerCase(),l)}var b=this._isolatedListeners.get(r);b?b.listeners.get(o)||b.listeners.set(o,{callback:t}):this._isolatedListeners.set(r,{isolatedDomain:d,iframe:l.iframe,listeners:new Map([[o,{callback:t}]])}),e.isRenderedFromPersistedData||this.sendInitialize(r,s);var g=this._callbackCache.get(r);g&&this._invokeCallback(r,g,o)},e.prototype.renderQuickView=function(e){var t=e.instanceId,n=e.listenerId;this._sendMessage(t,{serviceAction:"Action",action:{action:{type:"QuickView"},instanceId:t,listenerId:n}})},e.prototype.setDisplayMode=function(e){},e.prototype.setRenderType=function(e){},e.prototype.logCardActionEngagement=function(){},e.prototype.sendAction=function(e){var t=e.instanceId;this._sendMessage(t,{serviceAction:"Action",action:e})},e.prototype.sendInitialize=function(e,t){this._sendMessage(e,{serviceAction:"Initialize",newInstanceId:e,manifestId:t})},e.prototype._invokeCallback=function(e,t,n){var a,i=this._isolatedListeners.get(e);this._callbackCache.set(e,t),i?n?null===(a=i.listeners.get(n))||void 0===a||a.callback(t):i.listeners.forEach(function(e){return e.callback(t)}):this._logError("No entry for "+e)},e.prototype._logError=function(t){d._TraceLogger.logError(e._logSource,new Error(t))},e.prototype._sendMessage=function(e,t){var n=this._isolatedListeners.get(e);if(n){var a=this._isolatedFrames.get(n.isolatedDomain);a.isReady?(t.messageType="serviceMessage",n.iframe.contentWindow.postMessage(t,"*")):a.messageQueue.push([e,t])}else this._logError("No entry for "+e)},e.serviceKey=c.ServiceKey.create("sp-adaptive-card-extension-base::IsolatedAdaptiveCardExtensionService",e),e._logSource={id:"IsolatedAdaptiveCardExtensionService"},e}(),Q=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._templateType="Image",t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"template",{get:function(){return this._getTemplate(M,U)},enumerable:!1,configurable:!0}),t}(R),Y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._templateType="PrimaryText",t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"template",{get:function(){return this._getTemplate(P,F)},enumerable:!1,configurable:!0}),t}(R),J=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"externalLink",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return""},enumerable:!1,configurable:!0}),t}(H)},ut3N:function(e,t){e.exports=c}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
define("eeec822e-c28a-46b4-affc-7058e4c1aa80_1.14.0",["tslib","@microsoft/sp-component-base","@microsoft/sp-loader","@microsoft/sp-lodash-subset","@microsoft/sp-core-library","@microsoft/sp-page-context","@microsoft/sp-diagnostics"],function(n,a,i,r,o,s,c){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="mwqp")}({"17wl":function(e,t){e.exports=n},"7Awa":function(e,t){e.exports=a},I6O9:function(e,t){e.exports=i},Pk8u:function(e,t){e.exports=r},UWqr:function(e,t){e.exports=o},"X+PM":function(e,t){e.exports=s},mGD9:function(e){e.exports=JSON.parse('{"t":"Action Id: \\u0027{0}\\u0027 target URL should not be undefined or empty string. ","e":"Adaptive card extension icon."}')},mwqp:function(e,t,n){"use strict";n.r(t),n.d(t,"AdaptiveCardExtensionContext",function(){return r}),n.d(t,"_AdaptiveCardExtensionHost",function(){return o}),n.d(t,"_AdaptiveCardExtensionLoader",function(){return f}),n.d(t,"BaseAdaptiveCardExtension",function(){return K}),n.d(t,"_BaseAdaptiveCardExtensionCache",function(){return I}),n.d(t,"_LocalStorageACECache",function(){return x}),n.d(t,"MediaType",function(){return D}),n.d(t,"_IsolatedAdaptiveCardExtensionService",function(){return q}),n.d(t,"BaseView",function(){return H}),n.d(t,"BaseBasicCardView",function(){return N}),n.d(t,"BaseCardView",function(){return R}),n.d(t,"BaseImageCardView",function(){return Q}),n.d(t,"BasePrimaryTextCardView",function(){return Y}),n.d(t,"QuickViewNavigator",function(){return G}),n.d(t,"ViewNavigator",function(){return z}),n.d(t,"BaseAdaptiveCardView",function(){return J}),n.d(t,"_isAdaptiveCardExtensionLKGCachingEnabled",function(){return _});var a=n("17wl"),i=n("7Awa"),r=function(e){function t(t){var n=e.call(this,t)||this;return n._aceHost=t.host,n.manifest=t.manifest,n._deviceContext=t.deviceContext,n._location=t.location,n}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"_host",{get:function(){return this._aceHost},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propertyPane",{get:function(){return this._host.propertyPane},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceContext",{get:function(){return this._deviceContext},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this._location()},enumerable:!1,configurable:!0}),t}(i.BaseComponentContext),o=function(){function e(e){this._onBeforeInitializedCallback=e.onBeforeInitializedCallback,this._onUpdateCallback=e.onUpdateCallback,this._onErrorCallback=e.onError,this._onRequestRenderTypeCallback=e.onRequestRenderTypeCallback,this._onVisibilityChanged=e.onVisibilityChanged,this._cache=e.cache,this.propertyPane=e.propertyPane}return e.prototype.update=function(e){this._onUpdateCallback(e)},e.prototype.onBeforeInitialized=function(e){this._onBeforeInitializedCallback&&this._onBeforeInitializedCallback(e)},e.prototype.onError=function(e){this._onErrorCallback&&this._onErrorCallback(e)},e.prototype.requestRenderTypeChange=function(e,t){this._onRequestRenderTypeCallback(e,t)},Object.defineProperty(e.prototype,"cache",{get:function(){return this._cache},enumerable:!1,configurable:!0}),e.prototype.onVisibilityChanged=function(e){this._onVisibilityChanged(e)},e}(),s=n("I6O9"),c=n("UWqr"),d=n("ut3N");function l(){return c._SPKillSwitch.isActivated("6ca4b572-5356-4763-87bb-1e80205bfa6b")}function u(){return c._SPKillSwitch.isActivated("00be0ead-6f25-4d07-8cef-9840d5522e49")}var f=function(){function e(){}return e._createQosExtraData=function(e,t){return{alias:e.alias,manifestId:e.id,mpnId:e.mpnId,isInternal:e.isInternal,teamsHosted:c._BrowserUtilities.isTeamsHosted(),deviceContext:t}},e.prototype.load=function(t){var n,a,i=this,r=new d._QosMonitor("AdaptiveCardExtension.Load",!0),o=e._createQosExtraData(t.manifest,t.deviceContext);return s.SPComponentLoader.loadComponent(t.manifest).then(function(e){return e.default&&(e=e.default),new e}).catch(function(e){throw r.writeUnexpectedFailure("AdaptiveCardExtensionLoadFailed",e,o),n=e,e}).then(function(e){(a=e)._internalInitialize(i._getContext(t),t.addedFromPersistedData,t.initialDisplayMode),a._internalDeserialize(t.aceData),t.host.onBeforeInitialized(a);var n,r=t.cacheObject?{state:(n=t.cacheObject).cachedState,cardNavigatorState:n.cardNavigatorState}:void 0;return a.onInit(r)}).then(function(){return r.writeSuccess(o),u()||a._internalOnAfterInit(),a}).catch(function(e){throw n||r.writeUnexpectedFailure("AdaptiveCardExtensionInitializationFailed",e,o),e})},e.prototype._getContext=function(e){return new r({host:e.host,manifest:e.manifest,instanceId:e.instanceId,parentServiceScope:e.serviceScope,loggingTag:"",deviceContext:e.deviceContext,location:e.location})},e}(),p=n("Pk8u");function m(){return c._SPFlight.isEnabled(60544)}function _(){return c._SPFlight.isEnabled(60456)}var h=n("mGD9"),b=new RegExp(/(?=.+)(\/l\/entity\/.+)/gi),g={Medium:1,Large:2};function v(e,t,n,a,i){var r,o;if("Submit"===t.type)(o=t).confirmationDialog&&(o.parameters||(o.parameters={}),o.parameters.__MSConfirmationDialog__=o.confirmationDialog),r={id:n,type:"Action.Submit",style:i,title:a,data:t.parameters||void 0};else if("ExternalLink"===t.type){y(t.parameters,e);var s=t.parameters.target;if(!s||""===s)throw new Error(c.Text.format(h.t,n));r={id:n,type:"Action.OpenUrl",style:i,title:a,url:s}}else"QuickView"===t.type?r={id:n,type:"Action.Submit",style:i,title:a,data:{_internalQuickViewId:t.parameters.view}}:c._SPFlight.isEnabled(60447)&&"VivaAction.SelectMedia"===t.type?r={id:n,type:"VivaAction.SelectMedia",style:i,title:a,parameters:t.parameters}:m()&&"VivaAction.GetLocation"===t.type?r={id:n,type:"VivaAction.GetLocation",style:i,title:a,parameters:t.parameters}:m()&&"VivaAction.ShowLocation"===t.type&&(r={id:n,type:"VivaAction.ShowLocation",style:i,title:a,parameters:t.parameters});return r}function y(e,t){if(e&&e.isTeamsDeepLink&&function(e){return c._SPKillSwitch.isActivated("cfe2dadf-9488-4409-b3d4-d3dd23a7970e")?"WebView"===e:"Mobile"!==e}(t)){var n=e.target.match(b);n&&n[0]&&(e.target="msteams:"+n[0])}}function S(e,t,n,i,r,o){var s,c=e.cardButtons,d=e.data,l=e.onCardSelection,u=e._templateType;if(i||(i=e.template),void 0===c||"Image"===u&&"Large"!==t||function(e,t,n,a){for(var i=[],r=Math.min(g[n],(null==t?void 0:t.length)||0),o=0;o<r;o++){var s=t[o],c=s.id?s.id:"ac-button-"+o;i.push(v(a,s.action,c,s.title,s.style))}e.actions=i}(i,c,t,n),l){var f=v(n,l,"select-action");"Action.OpenUrl"!==f.type&&"Action.Submit"!==f.type||(s=f)}return{data:Object(a.__assign)({selectAction:s,iconProperty:r,iconAltText:d.iconAltText||h.e,title:o},d),template:i,cardProperties:{iconProperty:d.iconProperty||r,size:t,title:d.title||o,templateType:u}}}var D,I=function(){function e(){}return e.prototype.get=function(e,t){var n=this.getFromSource(e,t);if(n)return(new Date).getTime()<n.expirationTime?n:void 0},e}(),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),t.getKey=function(e,t){return"AdaptiveCardExtension_LKG_"+e+"_"+t},Object.defineProperty(t,"instance",{get:function(){return void 0===this._instance&&(this._instance=new t),this._instance},enumerable:!1,configurable:!0}),t.prototype.save=function(e,t,n){var a=this._getLocalStorageEntry(e);a.set(t,n);var i=Array.from(a.entries());localStorage.setItem(e,JSON.stringify(i))},t.prototype.getFromSource=function(e,t){return this._getLocalStorageEntry(e).get(t)},t.prototype._getLocalStorageEntry=function(e){var t=localStorage.getItem(e);return t?new Map(JSON.parse(t)):new Map},t}(I),C=function(){function e(e,t,n,i,r,o){this._context=e,this._getCardSize=t,this._getIconProperty=n,this._getTitle=i,this._handleInitializeCallback=r,this._settings=Object(a.__assign)(Object(a.__assign)({},this._defaultCacheSettings()),o)}return e.prototype.save=function(e,t,n,a,i){var r,o,s;if(this._settings.isEnabled){var c=this._initializeCustomCardView();if(c&&c.isCacheEnabled||!c&&t.isCacheEnabled){var d=c?S(c,this._getCardSize(),this._context.deviceContext,void 0,this._getIconProperty(),this._getTitle()):n.card;s=this._createCacheObject(n,d,a,i),null===(r=this._context._host.cache)||void 0===r||r.save(x.getKey(this._context.pageContext.site.id.toString(),null===(o=this._context.pageContext.listItem)||void 0===o?void 0:o.uniqueId),e,s)}}return s},e.prototype._createCacheObject=function(e,t,n,a){return{cachedCard:t,cardNavigatorState:n,isVisible:e.isVisible,cachedState:a,expirationTime:(new Date).getTime()+1e3*this._settings.expiryTimeInSeconds}},e.prototype._initializeCustomCardView=function(){if(this._settings.cachedCardView){var e=this._settings.cachedCardView();return this._handleInitializeCallback(e),e}},e.prototype._defaultCacheSettings=function(){return{isEnabled:!0,expiryTimeInSeconds:86400,cachedCardView:void 0}},e}(),O="auto",w={type:"TextBlock",subType:"Primary",text:"${primaryText}",weight:"Bolder",maxLines:1,spacing:"none"},E={type:"TextBlock",subType:"BodySecondary",text:"${description}",spacing:"none",wrap:!0},A={type:"TextBlock",subType:"BodyPrimary",text:"${primaryText}",spacing:"none",wrap:!0},L={type:"TextBlock",subType:"Title",text:"${title}",wrap:!1,maxLines:1,spacing:"none"},k={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:O},{type:"Column",spacing:"none",items:[L],width:"stretch"}]},A]}]},M={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",items:[{type:"Image",url:"${imageUrl}"},{type:"ColumnSet",spacing:"none",columns:[{type:"Column",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:O},{type:"Column",spacing:"none",items:[L],width:"stretch"}]},A]}]},P={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:O},{type:"Column",spacing:"none",items:[L],width:"stretch"}]},{type:"Container",spacing:"none",items:[w,E]}]}]},T={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",selectAction:"${selectAction}",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:O},{type:"Column",spacing:"none",items:[L],width:"stretch"}]},A]}]},U={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",selectAction:"${selectAction}",items:[{type:"Image",url:"${imageUrl}"},{type:"ColumnSet",spacing:"none",columns:[{type:"Column",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:O},{type:"Column",spacing:"none",items:[L],width:"stretch"}]},A]}]},F={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",selectAction:"${selectAction}",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:O},{type:"Column",spacing:"none",items:[L],width:"stretch"}]},{type:"Container",spacing:"none",items:[w,E]}]}]},H=function(){function e(){}return Object.defineProperty(e.prototype,"cardNavigator",{get:function(){return this._ace.cardNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quickViewNavigator",{get:function(){return this._ace.quickViewNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){return this._properties},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cardSize",{get:function(){return this._getCardSize()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),e.prototype.onAction=function(e){},e.prototype.onActionError=function(e){},e.prototype.setState=function(e){this._ace.setState(e)},e.prototype.setVisibility=function(e){this._ace.isVisible=e},e}(),R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"cardButtons",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onCardSelection",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCacheEnabled",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype._getTemplate=function(e,t){return Object(p.cloneDeep)(this.onCardSelection?t:e)},t}(H),N=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._templateType="Basic",t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"template",{get:function(){return this._getTemplate(k,T)},enumerable:!1,configurable:!0}),t}(R),B=function(e){function t(t){var n=e.call(this)||this;return n._primaryText=t,n._templateType="Basic",n}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return{primaryText:this._primaryText}},enumerable:!1,configurable:!0}),t}(N),j=/\{(\d+)\}/g,V=function(){function e(){this._registeredCallbacks=new Map}return e.prototype.register=function(e,t){this._registeredCallbacks.has(e)||this._registeredCallbacks.set(e,t)},e.prototype.consume=function(e){var t=this._registeredCallbacks.get(e);if(!t)throw new Error(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e.replace(j,function(e,n){return null===t[n]?"":""+t[n]})}("View with id {0} must be registered before being used",e));return this._registeredCallbacks.delete(e),t},Object.defineProperty(e.prototype,"size",{get:function(){return this._registeredCallbacks.size},enumerable:!1,configurable:!0}),e}(),z=function(){function e(e,t){this._handleStackChangedCallback=e,this._handleInitializeCallback=t,this._viewStack=new Array,this._viewCache=new Map,this._viewRegistry=new V}return e.prototype.register=function(e,t){this._viewRegistry.register(e,t)},e.prototype.push=function(e,t){void 0===t&&(t=!1),this._push(e),this._handleStackChangedCallback(t)},e.prototype.replace=function(e,t){void 0===t&&(t=!1),this._pop(),this._push(e),this._handleStackChangedCallback(t)},e.prototype.pop=function(e){void 0===e&&(e=!1),this.size>1&&(this._pop(),this._handleStackChangedCallback(e))},Object.defineProperty(e.prototype,"size",{get:function(){return this._viewStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentId",{get:function(){var e=this.size;return e?this._viewStack[e-1]:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_currentView",{get:function(){return this._viewCache.get(this._viewStack[this.size-1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewStack",{get:function(){return this._viewStack},enumerable:!1,configurable:!0}),e.prototype._clear=function(){this._viewStack=[]},e.prototype._forEach=function(e){this._viewCache.forEach(e)},e.prototype._getRegistrySize=function(){return this._viewRegistry.size},e.prototype._push=function(e){if(void 0===this._viewCache.get(e)){var t=this._viewRegistry.consume(e)();this._handleInitializeCallback(t),this._viewCache.set(e,t)}this._viewStack.push(e)},e.prototype._pop=function(){this._viewStack.pop()},e}(),G=function(e){function t(t,n,a){var i=e.call(this,t,n)||this;return i._closeQuickViewCallback=a,i}return Object(a.__extends)(t,e),t.prototype.close=function(){this._closeQuickViewCallback()},t}(z),K=function(e){function t(){var t=e.call(this)||this;return t._isInitialized=!1,t._getCard=function(e){try{return S(t._cardNavigator._currentView,t.cardSize,t.context.deviceContext,e?t._ACRenderArgs.card.template:void 0,t.iconProperty,t.title)}catch(e){throw t.context._host.onError(e.toString()),e}},t._onViewInitialized=function(e){e._state=t.state,e._ace=t,e._properties=t.properties,e._getCardSize=function(){return t.cardSize},e._context=t.context},t._navigatorCallback=function(e){e||t.update(t._renderType)},t._closeQuickViewCallback=function(){t.context._host.requestRenderTypeChange("Card",t.instanceId)},t._cardSize="Medium",t._renderType="Card",t._isVisible=!0,t._cardNavigator=new z(t._navigatorCallback,t._onViewInitialized),t._quickViewNavigator=new G(t._navigatorCallback,t._onViewInitialized,t._closeQuickViewCallback),t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"cardNavigator",{get:function(){return this._cardNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cardSize",{get:function(){return this._cardSize},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataVersion",{get:function(){return c.Version.parse("1.0")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"description",{get:function(){return this._description},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayMode",{get:function(){return this._displayMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"properties",{get:function(){return this._properties},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"quickViewNavigator",{get:function(){return this._quickViewNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedFromPersistedData",{get:function(){return this._renderedFromPersistedData},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedOnce",{get:function(){return this._renderedOnce},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderType",{get:function(){return this._renderType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propertiesMetadata",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},set:function(e){if(this._state)throw new Error("state can only be initialized once");this._state=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this._title},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"iconProperty",{get:function(){return this._iconProperty},enumerable:!1,configurable:!0}),t.prototype.getPropertyPaneConfiguration=function(){return{pages:[]}},t.prototype.loadPropertyPaneResources=function(){return Promise.resolve()},t.prototype.getCacheSettings=function(){return{}},t.prototype.getCachedState=function(e){return{}},t.prototype._internalOnAction=function(e){c._SPKillSwitch.isActivated("5753b2a7-fd3a-47c3-b4b6-9d4ed88d2922")?("Card"===this.renderType?this._cardNavigator:this._quickViewNavigator)._currentView.onAction(e):this.navigator._currentView.onAction(e)},t.prototype._internalOnActionError=function(e){this.navigator._currentView.onActionError(e)},t.prototype.onBeforeSerialize=function(){},t.prototype.onAfterPropertiesUpdatedExternally=function(e){},t.prototype.onAfterDeserialize=function(e,t){return e},t.prototype.onDisplayModeChanged=function(e){},t.prototype.onDispose=function(){},t.prototype.onInit=function(e){return Promise.resolve()},t.prototype.onPropertyPaneFieldChanged=function(e,t,n){},t.prototype.onRenderTypeChanged=function(e){},t.prototype.renderCard=function(){},t.prototype._getPreFrameworkPropertyPaneConfiguration=function(){return[]},Object.defineProperty(t.prototype,"_isFrameworkPropertyPaneEnabled",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,(this.cardNavigator._getRegistrySize()>0||this.cardNavigator._currentView)&&this.context._host.onVisibilityChanged(this._getRenderArguments(this.renderType))},enumerable:!1,configurable:!0}),t.prototype.setState=function(e){if(!this._state)throw new Error("state must be initialized before calling setState");e&&(this._state=Object(a.__assign)(Object(a.__assign)({},this.state),Object(p.cloneDeep)(e)),this._cardNavigator._forEach(this._onViewInitialized),this._quickViewNavigator._forEach(this._onViewInitialized)),(u()||this._isInitialized)&&this.context._host.update(this._getRenderArguments(this._renderType))},t.prototype.update=function(e,t){void 0===t&&(t=!1);var n=this._getRenderArguments(e,t);this.context._host.update(n)},t.prototype._getRenderArguments=function(e,t,n){var i,r=this;if(void 0===t&&(t=!1),c._SPKillSwitch.isActivated("bb1ed3e2-2b35-4dd4-a016-bc0220dc829d")||this._setRenderType(e,n),"Card"===e&&0===this.cardNavigator.size){var o=this.renderCard();o||(o="_InternalDefaultCardView",this._cardNavigator.register(o,function(){return new B(r.description)})),this._cardNavigator.push(o,!0)}if(void 0===this._ACRenderArgs?this._ACRenderArgs={card:"Card"===e?this._getCard(t):void 0,isVisible:this._isVisible,instanceId:this.instanceId,lastUpdatedType:e,quickLook:"QuickView"===e?this._getQuickView(t):void 0}:this._updateRenderArgs(e,t),_()&&this.displayMode===c.DisplayMode.Read&&"Card"===e){var s=null===(i=this._cacheManager)||void 0===i?void 0:i.save(this.instanceId,this._cardNavigator._currentView,this._ACRenderArgs,this.cardNavigator.viewStack,this.getCachedState(Object(a.__assign)({},this._state)));this._ACRenderArgs.cacheObject=s}return this._ACRenderArgs},t.prototype._propertiesMetadata=function(){return l()?void 0:this.propertiesMetadata},t.prototype._getPropertyPaneConfiguration=function(){return this.getPropertyPaneConfiguration()},Object.defineProperty(t.prototype,"navigator",{get:function(){return"Card"===this.renderType?this._cardNavigator:this._quickViewNavigator},enumerable:!1,configurable:!0}),t.prototype._internalDeserialize=function(e){e.title&&(this._title=e.title),e.iconProperty&&(this._iconProperty=e.iconProperty),e.description&&(this._description=e.description),e.cardSize&&(this._cardSize=e.cardSize);var t=e.properties;!l()&&this.renderedFromPersistedData&&(i._PropertyMetadataProcessor.reInstateServerProcessedData(this.propertiesMetadata,t,e.serverProcessedContent),e.serverProcessedContent=void 0),this._properties?Object.assign(this._properties,t):this._properties=this.onAfterDeserialize(t,e.dataVersion?c.Version.parse(e.dataVersion):this.dataVersion)},t.prototype._internalInitialize=function(t,n,a){var i=this;e.prototype._initializeContext.call(this,t),this._displayMode=a,this._renderedOnce=!1,this._renderedFromPersistedData=n,_()&&(this._cacheManager=new C(this.context,function(){return i.cardSize},function(){return i.iconProperty},function(){return i.title},this._onViewInitialized,this.getCacheSettings()))},t.prototype._internalSetDisplayMode=function(e){if(this._displayMode!==e){var t=this._displayMode;this._displayMode=e,this.onDisplayModeChanged(t)}},t.prototype._loadPropertyPaneResources=function(){return this.loadPropertyPaneResources()},t.prototype._onPropertyPaneFieldChanged=function(e,t,n){Object(p.isEqual)(t,n)||(this._updateProperty(e,n),this.onPropertyPaneFieldChanged(e,t,n))},t.prototype._renderCompleted=function(){this._renderedOnce=!0},t.prototype._internalOnAfterInit=function(){this._isInitialized=!0},t.prototype._internalSerialize=function(){return this.onBeforeSerialize(),{dataVersion:this.dataVersion.toString(),id:this.componentId,instanceId:this.instanceId,properties:this.properties,title:this.title,description:this._description,iconProperty:this.iconProperty,cardSize:this._cardSize}},t.prototype._setRenderType=function(e,t){if(this._renderType!==e){var n=this._renderType;"QuickView"===n&&this._quickViewNavigator._clear(),"Card"===n&&(this._quickViewNavigator._clear(),void 0!==t&&this._quickViewNavigator.push(t,!0)),this._renderType=e,this.onRenderTypeChanged(n)}},t.prototype._updateConfigurableFields=function(e,t){"cardSize"===e&&(this._cardSize=t)},t.prototype._logCardActionEngagement=function(e,t,n,a,i){var r,o,s,c,l,u,f;d._EngagementLogger.log({name:"AdaptiveCardExtension.CardAction",isIntentional:!0,siteId:null===(o=null===(r=this.context.pageContext)||void 0===r?void 0:r.site)||void 0===o?void 0:o.id.toString(),webId:null===(c=null===(s=this.context.pageContext)||void 0===s?void 0:s.web)||void 0===c?void 0:c.id.toString(),extraData:{ActionType:e,Alias:this.manifest.alias,DeviceContext:n,IsInternal:this.manifest.isInternal,InstanceId:this.instanceId,ItemLocation:t,WorkLoad:t,TenantID:null===(f=null===(u=null===(l=this.context.pageContext)||void 0===l?void 0:l.aadInfo)||void 0===u?void 0:u.tenantId)||void 0===f?void 0:f.toString().toLowerCase(),EventSchemaVersion:10,ManifestId:this.manifest.id,MobileSessionId:a,MobileBootType:i,MPNId:this.manifest.mpnId}})},t.prototype._getQuickView=function(e){if(0!==this._quickViewNavigator.size){var t=this._quickViewNavigator._currentView;if(void 0!==t)return y(t.externalLink,this.context.deviceContext),{data:t.data,template:e?this._ACRenderArgs.quickLook.template:t.template,pageBarProperties:{externalLink:t.externalLink,leftNavigationButtonType:this._quickViewNavigator.size>1?"Back":"Close",title:t.title},viewId:this._quickViewNavigator.currentId,viewStackSize:this._quickViewNavigator.size}}},t.prototype._updateRenderArgs=function(e,t){this._ACRenderArgs.lastUpdatedType=e,this._ACRenderArgs.isVisible=this._isVisible,"Card"===e?this._ACRenderArgs.card=this._getCard(t):this._ACRenderArgs.quickLook=this._getQuickView(t)},t.prototype._updateProperty=function(e,t){Object(p.update)(this._properties,e,function(){return t})},t}(i.BaseComponent);!function(e){e[e.Image=1]="Image",e[e.Audio=4]="Audio"}(D||(D={}));var W=n("X+PM"),q=function(){function e(e){var t=this;this._serviceScope=e,this._callbackCache=new Map,this._isolatedFrames=new Map,this._isolatedListeners=new Map,this._handleIsolatedApplicationMessage=function(e){var n=e.data;if("applicationMessage"===n.messageType){var a=n.instanceId,i=n.kind;switch(i){case"Card":t._invokeCallback(a,{aceData:n.aceData,card:n.card,cacheObject:n.cacheObject,type:i});break;case"Error":t._invokeCallback(a,{error:n.error,type:i});break;case"Ready":var r=t._isolatedFrames.get(new URL(e.origin).hostname);if(r){r.isReady=!0;for(var o=0,s=r.messageQueue;o<s.length;o++){var c=s[o],d=c[0],l=c[1];t._sendMessage(d,l)}r.messageQueue=[]}break;default:t._logError("Unexpected message: "+JSON.stringify(e.data))}}},window.addEventListener("message",this._handleIsolatedApplicationMessage)}return Object.defineProperty(e.prototype,"_pageContext",{get:function(){return this._pContext||(this._pContext=this._serviceScope.consume(W.PageContext.serviceKey)),this._pContext},enumerable:!1,configurable:!0}),e.prototype.disposeEntry=function(e){this._isolatedListeners.delete(e)},e.prototype.load=function(e){var t=e.callback,n=e.dashboardListId,a=e.itemId,r=e.instanceId,o=e.listenerId,s=e.manifestId,d=e.isolatedDomain.toLowerCase(),l=this._isolatedFrames.get(d);if(!l){var u=document.createElement("iframe"),f=new URLSearchParams(window.location.search).toString(),p=this._pageContext.site.serverRelativeUrl,m="/"===p?"":p,_="/_layouts/15/adaptivecardextensions.aspx?dashboardListID="+n+"&id="+a+"&instanceId="+r+"&"+f,h=Object(i._ensureIsolatedDomainUrl)(d,this._pageContext.web.absoluteUrl);c._SPFlight.isEnabled(60128)?u.src=h+"/_layouts/15/framedteamslogon.aspx?spfx=true&dest="+encodeURIComponent(m+_):u.src=h+_,u.hidden=!0,u.style.position="absolute",document.body.appendChild(u),l={iframe:u,isReady:!1,messageQueue:[]},this._isolatedFrames.set(d.toLowerCase(),l)}var b=this._isolatedListeners.get(r);b?b.listeners.get(o)||b.listeners.set(o,{callback:t}):this._isolatedListeners.set(r,{isolatedDomain:d,iframe:l.iframe,listeners:new Map([[o,{callback:t}]])}),e.isRenderedFromPersistedData||this.sendInitialize(r,s);var g=this._callbackCache.get(r);g&&this._invokeCallback(r,g,o)},e.prototype.renderQuickView=function(e){var t=e.instanceId,n=e.listenerId;this._sendMessage(t,{serviceAction:"Action",action:{action:{type:"QuickView"},instanceId:t,listenerId:n}})},e.prototype.setDisplayMode=function(e){},e.prototype.setRenderType=function(e){},e.prototype.logCardActionEngagement=function(){},e.prototype.sendAction=function(e){var t=e.instanceId;this._sendMessage(t,{serviceAction:"Action",action:e})},e.prototype.sendInitialize=function(e,t){this._sendMessage(e,{serviceAction:"Initialize",newInstanceId:e,manifestId:t})},e.prototype._invokeCallback=function(e,t,n){var a,i=this._isolatedListeners.get(e);this._callbackCache.set(e,t),i?n?null===(a=i.listeners.get(n))||void 0===a||a.callback(t):i.listeners.forEach(function(e){return e.callback(t)}):this._logError("No entry for "+e)},e.prototype._logError=function(t){d._TraceLogger.logError(e._logSource,new Error(t))},e.prototype._sendMessage=function(e,t){var n=this._isolatedListeners.get(e);if(n){var a=this._isolatedFrames.get(n.isolatedDomain);a.isReady?(t.messageType="serviceMessage",n.iframe.contentWindow.postMessage(t,"*")):a.messageQueue.push([e,t])}else this._logError("No entry for "+e)},e.serviceKey=c.ServiceKey.create("sp-adaptive-card-extension-base::IsolatedAdaptiveCardExtensionService",e),e._logSource={id:"IsolatedAdaptiveCardExtensionService"},e}(),Q=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._templateType="Image",t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"template",{get:function(){return this._getTemplate(M,U)},enumerable:!1,configurable:!0}),t}(R),Y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._templateType="PrimaryText",t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"template",{get:function(){return this._getTemplate(P,F)},enumerable:!1,configurable:!0}),t}(R),J=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"externalLink",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return""},enumerable:!1,configurable:!0}),t}(H)},ut3N:function(e,t){e.exports=c}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
define("eeec822e-c28a-46b4-affc-7058e4c1aa80_1.14.0",["tslib","@microsoft/sp-component-base","@microsoft/sp-loader","@microsoft/sp-lodash-subset","@microsoft/sp-core-library","@microsoft/sp-page-context","@microsoft/sp-diagnostics"],function(n,a,i,r,o,s,c){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="mwqp")}({"17wl":function(e,t){e.exports=n},"7Awa":function(e,t){e.exports=a},I6O9:function(e,t){e.exports=i},Pk8u:function(e,t){e.exports=r},UWqr:function(e,t){e.exports=o},"X+PM":function(e,t){e.exports=s},mGD9:function(e){e.exports=JSON.parse('{"t":"[!!--##Àćţĩōń Ĩď: \\u0027{0}\\u0027 ţàŕĝēţ ŨŔĹ śĥōũĺď ńōţ ƀē ũńďēƒĩńēď ōŕ ēmƥţŷ śţŕĩńĝ. ##--!!]","e":"[!!--##Àďàƥţĩvē ćàŕď ēxţēńśĩōń ĩćōń.##--!!]"}')},mwqp:function(e,t,n){"use strict";n.r(t),n.d(t,"AdaptiveCardExtensionContext",function(){return r}),n.d(t,"_AdaptiveCardExtensionHost",function(){return o}),n.d(t,"_AdaptiveCardExtensionLoader",function(){return f}),n.d(t,"BaseAdaptiveCardExtension",function(){return K}),n.d(t,"_BaseAdaptiveCardExtensionCache",function(){return I}),n.d(t,"_LocalStorageACECache",function(){return x}),n.d(t,"MediaType",function(){return D}),n.d(t,"_IsolatedAdaptiveCardExtensionService",function(){return q}),n.d(t,"BaseView",function(){return H}),n.d(t,"BaseBasicCardView",function(){return N}),n.d(t,"BaseCardView",function(){return R}),n.d(t,"BaseImageCardView",function(){return Q}),n.d(t,"BasePrimaryTextCardView",function(){return Y}),n.d(t,"QuickViewNavigator",function(){return G}),n.d(t,"ViewNavigator",function(){return z}),n.d(t,"BaseAdaptiveCardView",function(){return J}),n.d(t,"_isAdaptiveCardExtensionLKGCachingEnabled",function(){return _});var a=n("17wl"),i=n("7Awa"),r=function(e){function t(t){var n=e.call(this,t)||this;return n._aceHost=t.host,n.manifest=t.manifest,n._deviceContext=t.deviceContext,n._location=t.location,n}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"_host",{get:function(){return this._aceHost},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propertyPane",{get:function(){return this._host.propertyPane},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceContext",{get:function(){return this._deviceContext},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this._location()},enumerable:!1,configurable:!0}),t}(i.BaseComponentContext),o=function(){function e(e){this._onBeforeInitializedCallback=e.onBeforeInitializedCallback,this._onUpdateCallback=e.onUpdateCallback,this._onErrorCallback=e.onError,this._onRequestRenderTypeCallback=e.onRequestRenderTypeCallback,this._onVisibilityChanged=e.onVisibilityChanged,this._cache=e.cache,this.propertyPane=e.propertyPane}return e.prototype.update=function(e){this._onUpdateCallback(e)},e.prototype.onBeforeInitialized=function(e){this._onBeforeInitializedCallback&&this._onBeforeInitializedCallback(e)},e.prototype.onError=function(e){this._onErrorCallback&&this._onErrorCallback(e)},e.prototype.requestRenderTypeChange=function(e,t){this._onRequestRenderTypeCallback(e,t)},Object.defineProperty(e.prototype,"cache",{get:function(){return this._cache},enumerable:!1,configurable:!0}),e.prototype.onVisibilityChanged=function(e){this._onVisibilityChanged(e)},e}(),s=n("I6O9"),c=n("UWqr"),d=n("ut3N");function l(){return c._SPKillSwitch.isActivated("6ca4b572-5356-4763-87bb-1e80205bfa6b")}function u(){return c._SPKillSwitch.isActivated("00be0ead-6f25-4d07-8cef-9840d5522e49")}var f=function(){function e(){}return e._createQosExtraData=function(e,t){return{alias:e.alias,manifestId:e.id,mpnId:e.mpnId,isInternal:e.isInternal,teamsHosted:c._BrowserUtilities.isTeamsHosted(),deviceContext:t}},e.prototype.load=function(t){var n,a,i=this,r=new d._QosMonitor("AdaptiveCardExtension.Load",!0),o=e._createQosExtraData(t.manifest,t.deviceContext);return s.SPComponentLoader.loadComponent(t.manifest).then(function(e){return e.default&&(e=e.default),new e}).catch(function(e){throw r.writeUnexpectedFailure("AdaptiveCardExtensionLoadFailed",e,o),n=e,e}).then(function(e){(a=e)._internalInitialize(i._getContext(t),t.addedFromPersistedData,t.initialDisplayMode),a._internalDeserialize(t.aceData),t.host.onBeforeInitialized(a);var n,r=t.cacheObject?{state:(n=t.cacheObject).cachedState,cardNavigatorState:n.cardNavigatorState}:void 0;return a.onInit(r)}).then(function(){return r.writeSuccess(o),u()||a._internalOnAfterInit(),a}).catch(function(e){throw n||r.writeUnexpectedFailure("AdaptiveCardExtensionInitializationFailed",e,o),e})},e.prototype._getContext=function(e){return new r({host:e.host,manifest:e.manifest,instanceId:e.instanceId,parentServiceScope:e.serviceScope,loggingTag:"",deviceContext:e.deviceContext,location:e.location})},e}(),p=n("Pk8u");function m(){return c._SPFlight.isEnabled(60544)}function _(){return c._SPFlight.isEnabled(60456)}var h=n("mGD9"),b=new RegExp(/(?=.+)(\/l\/entity\/.+)/gi),g={Medium:1,Large:2};function v(e,t,n,a,i){var r,o;if("Submit"===t.type)(o=t).confirmationDialog&&(o.parameters||(o.parameters={}),o.parameters.__MSConfirmationDialog__=o.confirmationDialog),r={id:n,type:"Action.Submit",style:i,title:a,data:t.parameters||void 0};else if("ExternalLink"===t.type){y(t.parameters,e);var s=t.parameters.target;if(!s||""===s)throw new Error(c.Text.format(h.t,n));r={id:n,type:"Action.OpenUrl",style:i,title:a,url:s}}else"QuickView"===t.type?r={id:n,type:"Action.Submit",style:i,title:a,data:{_internalQuickViewId:t.parameters.view}}:c._SPFlight.isEnabled(60447)&&"VivaAction.SelectMedia"===t.type?r={id:n,type:"VivaAction.SelectMedia",style:i,title:a,parameters:t.parameters}:m()&&"VivaAction.GetLocation"===t.type?r={id:n,type:"VivaAction.GetLocation",style:i,title:a,parameters:t.parameters}:m()&&"VivaAction.ShowLocation"===t.type&&(r={id:n,type:"VivaAction.ShowLocation",style:i,title:a,parameters:t.parameters});return r}function y(e,t){if(e&&e.isTeamsDeepLink&&function(e){return c._SPKillSwitch.isActivated("cfe2dadf-9488-4409-b3d4-d3dd23a7970e")?"WebView"===e:"Mobile"!==e}(t)){var n=e.target.match(b);n&&n[0]&&(e.target="msteams:"+n[0])}}function S(e,t,n,i,r,o){var s,c=e.cardButtons,d=e.data,l=e.onCardSelection,u=e._templateType;if(i||(i=e.template),void 0===c||"Image"===u&&"Large"!==t||function(e,t,n,a){for(var i=[],r=Math.min(g[n],(null==t?void 0:t.length)||0),o=0;o<r;o++){var s=t[o],c=s.id?s.id:"ac-button-"+o;i.push(v(a,s.action,c,s.title,s.style))}e.actions=i}(i,c,t,n),l){var f=v(n,l,"select-action");"Action.OpenUrl"!==f.type&&"Action.Submit"!==f.type||(s=f)}return{data:Object(a.__assign)({selectAction:s,iconProperty:r,iconAltText:d.iconAltText||h.e,title:o},d),template:i,cardProperties:{iconProperty:d.iconProperty||r,size:t,title:d.title||o,templateType:u}}}var D,I=function(){function e(){}return e.prototype.get=function(e,t){var n=this.getFromSource(e,t);if(n)return(new Date).getTime()<n.expirationTime?n:void 0},e}(),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),t.getKey=function(e,t){return"AdaptiveCardExtension_LKG_"+e+"_"+t},Object.defineProperty(t,"instance",{get:function(){return void 0===this._instance&&(this._instance=new t),this._instance},enumerable:!1,configurable:!0}),t.prototype.save=function(e,t,n){var a=this._getLocalStorageEntry(e);a.set(t,n);var i=Array.from(a.entries());localStorage.setItem(e,JSON.stringify(i))},t.prototype.getFromSource=function(e,t){return this._getLocalStorageEntry(e).get(t)},t.prototype._getLocalStorageEntry=function(e){var t=localStorage.getItem(e);return t?new Map(JSON.parse(t)):new Map},t}(I),C=function(){function e(e,t,n,i,r,o){this._context=e,this._getCardSize=t,this._getIconProperty=n,this._getTitle=i,this._handleInitializeCallback=r,this._settings=Object(a.__assign)(Object(a.__assign)({},this._defaultCacheSettings()),o)}return e.prototype.save=function(e,t,n,a,i){var r,o,s;if(this._settings.isEnabled){var c=this._initializeCustomCardView();if(c&&c.isCacheEnabled||!c&&t.isCacheEnabled){var d=c?S(c,this._getCardSize(),this._context.deviceContext,void 0,this._getIconProperty(),this._getTitle()):n.card;s=this._createCacheObject(n,d,a,i),null===(r=this._context._host.cache)||void 0===r||r.save(x.getKey(this._context.pageContext.site.id.toString(),null===(o=this._context.pageContext.listItem)||void 0===o?void 0:o.uniqueId),e,s)}}return s},e.prototype._createCacheObject=function(e,t,n,a){return{cachedCard:t,cardNavigatorState:n,isVisible:e.isVisible,cachedState:a,expirationTime:(new Date).getTime()+1e3*this._settings.expiryTimeInSeconds}},e.prototype._initializeCustomCardView=function(){if(this._settings.cachedCardView){var e=this._settings.cachedCardView();return this._handleInitializeCallback(e),e}},e.prototype._defaultCacheSettings=function(){return{isEnabled:!0,expiryTimeInSeconds:86400,cachedCardView:void 0}},e}(),O="auto",w={type:"TextBlock",subType:"Primary",text:"${primaryText}",weight:"Bolder",maxLines:1,spacing:"none"},E={type:"TextBlock",subType:"BodySecondary",text:"${description}",spacing:"none",wrap:!0},A={type:"TextBlock",subType:"BodyPrimary",text:"${primaryText}",spacing:"none",wrap:!0},L={type:"TextBlock",subType:"Title",text:"${title}",wrap:!1,maxLines:1,spacing:"none"},k={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:O},{type:"Column",spacing:"none",items:[L],width:"stretch"}]},A]}]},M={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",items:[{type:"Image",url:"${imageUrl}"},{type:"ColumnSet",spacing:"none",columns:[{type:"Column",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:O},{type:"Column",spacing:"none",items:[L],width:"stretch"}]},A]}]},P={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:O},{type:"Column",spacing:"none",items:[L],width:"stretch"}]},{type:"Container",spacing:"none",items:[w,E]}]}]},T={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",selectAction:"${selectAction}",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:O},{type:"Column",spacing:"none",items:[L],width:"stretch"}]},A]}]},U={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",selectAction:"${selectAction}",items:[{type:"Image",url:"${imageUrl}"},{type:"ColumnSet",spacing:"none",columns:[{type:"Column",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:O},{type:"Column",spacing:"none",items:[L],width:"stretch"}]},A]}]},F={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",selectAction:"${selectAction}",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:O},{type:"Column",spacing:"none",items:[L],width:"stretch"}]},{type:"Container",spacing:"none",items:[w,E]}]}]},H=function(){function e(){}return Object.defineProperty(e.prototype,"cardNavigator",{get:function(){return this._ace.cardNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quickViewNavigator",{get:function(){return this._ace.quickViewNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){return this._properties},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cardSize",{get:function(){return this._getCardSize()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),e.prototype.onAction=function(e){},e.prototype.onActionError=function(e){},e.prototype.setState=function(e){this._ace.setState(e)},e.prototype.setVisibility=function(e){this._ace.isVisible=e},e}(),R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"cardButtons",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onCardSelection",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCacheEnabled",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype._getTemplate=function(e,t){return Object(p.cloneDeep)(this.onCardSelection?t:e)},t}(H),N=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._templateType="Basic",t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"template",{get:function(){return this._getTemplate(k,T)},enumerable:!1,configurable:!0}),t}(R),B=function(e){function t(t){var n=e.call(this)||this;return n._primaryText=t,n._templateType="Basic",n}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return{primaryText:this._primaryText}},enumerable:!1,configurable:!0}),t}(N),j=/\{(\d+)\}/g,V=function(){function e(){this._registeredCallbacks=new Map}return e.prototype.register=function(e,t){this._registeredCallbacks.has(e)||this._registeredCallbacks.set(e,t)},e.prototype.consume=function(e){var t=this._registeredCallbacks.get(e);if(!t)throw new Error(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e.replace(j,function(e,n){return null===t[n]?"":""+t[n]})}("View with id {0} must be registered before being used",e));return this._registeredCallbacks.delete(e),t},Object.defineProperty(e.prototype,"size",{get:function(){return this._registeredCallbacks.size},enumerable:!1,configurable:!0}),e}(),z=function(){function e(e,t){this._handleStackChangedCallback=e,this._handleInitializeCallback=t,this._viewStack=new Array,this._viewCache=new Map,this._viewRegistry=new V}return e.prototype.register=function(e,t){this._viewRegistry.register(e,t)},e.prototype.push=function(e,t){void 0===t&&(t=!1),this._push(e),this._handleStackChangedCallback(t)},e.prototype.replace=function(e,t){void 0===t&&(t=!1),this._pop(),this._push(e),this._handleStackChangedCallback(t)},e.prototype.pop=function(e){void 0===e&&(e=!1),this.size>1&&(this._pop(),this._handleStackChangedCallback(e))},Object.defineProperty(e.prototype,"size",{get:function(){return this._viewStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentId",{get:function(){var e=this.size;return e?this._viewStack[e-1]:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_currentView",{get:function(){return this._viewCache.get(this._viewStack[this.size-1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewStack",{get:function(){return this._viewStack},enumerable:!1,configurable:!0}),e.prototype._clear=function(){this._viewStack=[]},e.prototype._forEach=function(e){this._viewCache.forEach(e)},e.prototype._getRegistrySize=function(){return this._viewRegistry.size},e.prototype._push=function(e){if(void 0===this._viewCache.get(e)){var t=this._viewRegistry.consume(e)();this._handleInitializeCallback(t),this._viewCache.set(e,t)}this._viewStack.push(e)},e.prototype._pop=function(){this._viewStack.pop()},e}(),G=function(e){function t(t,n,a){var i=e.call(this,t,n)||this;return i._closeQuickViewCallback=a,i}return Object(a.__extends)(t,e),t.prototype.close=function(){this._closeQuickViewCallback()},t}(z),K=function(e){function t(){var t=e.call(this)||this;return t._isInitialized=!1,t._getCard=function(e){try{return S(t._cardNavigator._currentView,t.cardSize,t.context.deviceContext,e?t._ACRenderArgs.card.template:void 0,t.iconProperty,t.title)}catch(e){throw t.context._host.onError(e.toString()),e}},t._onViewInitialized=function(e){e._state=t.state,e._ace=t,e._properties=t.properties,e._getCardSize=function(){return t.cardSize},e._context=t.context},t._navigatorCallback=function(e){e||t.update(t._renderType)},t._closeQuickViewCallback=function(){t.context._host.requestRenderTypeChange("Card",t.instanceId)},t._cardSize="Medium",t._renderType="Card",t._isVisible=!0,t._cardNavigator=new z(t._navigatorCallback,t._onViewInitialized),t._quickViewNavigator=new G(t._navigatorCallback,t._onViewInitialized,t._closeQuickViewCallback),t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"cardNavigator",{get:function(){return this._cardNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cardSize",{get:function(){return this._cardSize},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataVersion",{get:function(){return c.Version.parse("1.0")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"description",{get:function(){return this._description},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayMode",{get:function(){return this._displayMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"properties",{get:function(){return this._properties},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"quickViewNavigator",{get:function(){return this._quickViewNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedFromPersistedData",{get:function(){return this._renderedFromPersistedData},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedOnce",{get:function(){return this._renderedOnce},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderType",{get:function(){return this._renderType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propertiesMetadata",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},set:function(e){if(this._state)throw new Error("state can only be initialized once");this._state=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this._title},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"iconProperty",{get:function(){return this._iconProperty},enumerable:!1,configurable:!0}),t.prototype.getPropertyPaneConfiguration=function(){return{pages:[]}},t.prototype.loadPropertyPaneResources=function(){return Promise.resolve()},t.prototype.getCacheSettings=function(){return{}},t.prototype.getCachedState=function(e){return{}},t.prototype._internalOnAction=function(e){c._SPKillSwitch.isActivated("5753b2a7-fd3a-47c3-b4b6-9d4ed88d2922")?("Card"===this.renderType?this._cardNavigator:this._quickViewNavigator)._currentView.onAction(e):this.navigator._currentView.onAction(e)},t.prototype._internalOnActionError=function(e){this.navigator._currentView.onActionError(e)},t.prototype.onBeforeSerialize=function(){},t.prototype.onAfterPropertiesUpdatedExternally=function(e){},t.prototype.onAfterDeserialize=function(e,t){return e},t.prototype.onDisplayModeChanged=function(e){},t.prototype.onDispose=function(){},t.prototype.onInit=function(e){return Promise.resolve()},t.prototype.onPropertyPaneFieldChanged=function(e,t,n){},t.prototype.onRenderTypeChanged=function(e){},t.prototype.renderCard=function(){},t.prototype._getPreFrameworkPropertyPaneConfiguration=function(){return[]},Object.defineProperty(t.prototype,"_isFrameworkPropertyPaneEnabled",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,(this.cardNavigator._getRegistrySize()>0||this.cardNavigator._currentView)&&this.context._host.onVisibilityChanged(this._getRenderArguments(this.renderType))},enumerable:!1,configurable:!0}),t.prototype.setState=function(e){if(!this._state)throw new Error("state must be initialized before calling setState");e&&(this._state=Object(a.__assign)(Object(a.__assign)({},this.state),Object(p.cloneDeep)(e)),this._cardNavigator._forEach(this._onViewInitialized),this._quickViewNavigator._forEach(this._onViewInitialized)),(u()||this._isInitialized)&&this.context._host.update(this._getRenderArguments(this._renderType))},t.prototype.update=function(e,t){void 0===t&&(t=!1);var n=this._getRenderArguments(e,t);this.context._host.update(n)},t.prototype._getRenderArguments=function(e,t,n){var i,r=this;if(void 0===t&&(t=!1),c._SPKillSwitch.isActivated("bb1ed3e2-2b35-4dd4-a016-bc0220dc829d")||this._setRenderType(e,n),"Card"===e&&0===this.cardNavigator.size){var o=this.renderCard();o||(o="_InternalDefaultCardView",this._cardNavigator.register(o,function(){return new B(r.description)})),this._cardNavigator.push(o,!0)}if(void 0===this._ACRenderArgs?this._ACRenderArgs={card:"Card"===e?this._getCard(t):void 0,isVisible:this._isVisible,instanceId:this.instanceId,lastUpdatedType:e,quickLook:"QuickView"===e?this._getQuickView(t):void 0}:this._updateRenderArgs(e,t),_()&&this.displayMode===c.DisplayMode.Read&&"Card"===e){var s=null===(i=this._cacheManager)||void 0===i?void 0:i.save(this.instanceId,this._cardNavigator._currentView,this._ACRenderArgs,this.cardNavigator.viewStack,this.getCachedState(Object(a.__assign)({},this._state)));this._ACRenderArgs.cacheObject=s}return this._ACRenderArgs},t.prototype._propertiesMetadata=function(){return l()?void 0:this.propertiesMetadata},t.prototype._getPropertyPaneConfiguration=function(){return this.getPropertyPaneConfiguration()},Object.defineProperty(t.prototype,"navigator",{get:function(){return"Card"===this.renderType?this._cardNavigator:this._quickViewNavigator},enumerable:!1,configurable:!0}),t.prototype._internalDeserialize=function(e){e.title&&(this._title=e.title),e.iconProperty&&(this._iconProperty=e.iconProperty),e.description&&(this._description=e.description),e.cardSize&&(this._cardSize=e.cardSize);var t=e.properties;!l()&&this.renderedFromPersistedData&&(i._PropertyMetadataProcessor.reInstateServerProcessedData(this.propertiesMetadata,t,e.serverProcessedContent),e.serverProcessedContent=void 0),this._properties?Object.assign(this._properties,t):this._properties=this.onAfterDeserialize(t,e.dataVersion?c.Version.parse(e.dataVersion):this.dataVersion)},t.prototype._internalInitialize=function(t,n,a){var i=this;e.prototype._initializeContext.call(this,t),this._displayMode=a,this._renderedOnce=!1,this._renderedFromPersistedData=n,_()&&(this._cacheManager=new C(this.context,function(){return i.cardSize},function(){return i.iconProperty},function(){return i.title},this._onViewInitialized,this.getCacheSettings()))},t.prototype._internalSetDisplayMode=function(e){if(this._displayMode!==e){var t=this._displayMode;this._displayMode=e,this.onDisplayModeChanged(t)}},t.prototype._loadPropertyPaneResources=function(){return this.loadPropertyPaneResources()},t.prototype._onPropertyPaneFieldChanged=function(e,t,n){Object(p.isEqual)(t,n)||(this._updateProperty(e,n),this.onPropertyPaneFieldChanged(e,t,n))},t.prototype._renderCompleted=function(){this._renderedOnce=!0},t.prototype._internalOnAfterInit=function(){this._isInitialized=!0},t.prototype._internalSerialize=function(){return this.onBeforeSerialize(),{dataVersion:this.dataVersion.toString(),id:this.componentId,instanceId:this.instanceId,properties:this.properties,title:this.title,description:this._description,iconProperty:this.iconProperty,cardSize:this._cardSize}},t.prototype._setRenderType=function(e,t){if(this._renderType!==e){var n=this._renderType;"QuickView"===n&&this._quickViewNavigator._clear(),"Card"===n&&(this._quickViewNavigator._clear(),void 0!==t&&this._quickViewNavigator.push(t,!0)),this._renderType=e,this.onRenderTypeChanged(n)}},t.prototype._updateConfigurableFields=function(e,t){"cardSize"===e&&(this._cardSize=t)},t.prototype._logCardActionEngagement=function(e,t,n,a,i){var r,o,s,c,l,u,f;d._EngagementLogger.log({name:"AdaptiveCardExtension.CardAction",isIntentional:!0,siteId:null===(o=null===(r=this.context.pageContext)||void 0===r?void 0:r.site)||void 0===o?void 0:o.id.toString(),webId:null===(c=null===(s=this.context.pageContext)||void 0===s?void 0:s.web)||void 0===c?void 0:c.id.toString(),extraData:{ActionType:e,Alias:this.manifest.alias,DeviceContext:n,IsInternal:this.manifest.isInternal,InstanceId:this.instanceId,ItemLocation:t,WorkLoad:t,TenantID:null===(f=null===(u=null===(l=this.context.pageContext)||void 0===l?void 0:l.aadInfo)||void 0===u?void 0:u.tenantId)||void 0===f?void 0:f.toString().toLowerCase(),EventSchemaVersion:10,ManifestId:this.manifest.id,MobileSessionId:a,MobileBootType:i,MPNId:this.manifest.mpnId}})},t.prototype._getQuickView=function(e){if(0!==this._quickViewNavigator.size){var t=this._quickViewNavigator._currentView;if(void 0!==t)return y(t.externalLink,this.context.deviceContext),{data:t.data,template:e?this._ACRenderArgs.quickLook.template:t.template,pageBarProperties:{externalLink:t.externalLink,leftNavigationButtonType:this._quickViewNavigator.size>1?"Back":"Close",title:t.title},viewId:this._quickViewNavigator.currentId,viewStackSize:this._quickViewNavigator.size}}},t.prototype._updateRenderArgs=function(e,t){this._ACRenderArgs.lastUpdatedType=e,this._ACRenderArgs.isVisible=this._isVisible,"Card"===e?this._ACRenderArgs.card=this._getCard(t):this._ACRenderArgs.quickLook=this._getQuickView(t)},t.prototype._updateProperty=function(e,t){Object(p.update)(this._properties,e,function(){return t})},t}(i.BaseComponent);!function(e){e[e.Image=1]="Image",e[e.Audio=4]="Audio"}(D||(D={}));var W=n("X+PM"),q=function(){function e(e){var t=this;this._serviceScope=e,this._callbackCache=new Map,this._isolatedFrames=new Map,this._isolatedListeners=new Map,this._handleIsolatedApplicationMessage=function(e){var n=e.data;if("applicationMessage"===n.messageType){var a=n.instanceId,i=n.kind;switch(i){case"Card":t._invokeCallback(a,{aceData:n.aceData,card:n.card,cacheObject:n.cacheObject,type:i});break;case"Error":t._invokeCallback(a,{error:n.error,type:i});break;case"Ready":var r=t._isolatedFrames.get(new URL(e.origin).hostname);if(r){r.isReady=!0;for(var o=0,s=r.messageQueue;o<s.length;o++){var c=s[o],d=c[0],l=c[1];t._sendMessage(d,l)}r.messageQueue=[]}break;default:t._logError("Unexpected message: "+JSON.stringify(e.data))}}},window.addEventListener("message",this._handleIsolatedApplicationMessage)}return Object.defineProperty(e.prototype,"_pageContext",{get:function(){return this._pContext||(this._pContext=this._serviceScope.consume(W.PageContext.serviceKey)),this._pContext},enumerable:!1,configurable:!0}),e.prototype.disposeEntry=function(e){this._isolatedListeners.delete(e)},e.prototype.load=function(e){var t=e.callback,n=e.dashboardListId,a=e.itemId,r=e.instanceId,o=e.listenerId,s=e.manifestId,d=e.isolatedDomain.toLowerCase(),l=this._isolatedFrames.get(d);if(!l){var u=document.createElement("iframe"),f=new URLSearchParams(window.location.search).toString(),p=this._pageContext.site.serverRelativeUrl,m="/"===p?"":p,_="/_layouts/15/adaptivecardextensions.aspx?dashboardListID="+n+"&id="+a+"&instanceId="+r+"&"+f,h=Object(i._ensureIsolatedDomainUrl)(d,this._pageContext.web.absoluteUrl);c._SPFlight.isEnabled(60128)?u.src=h+"/_layouts/15/framedteamslogon.aspx?spfx=true&dest="+encodeURIComponent(m+_):u.src=h+_,u.hidden=!0,u.style.position="absolute",document.body.appendChild(u),l={iframe:u,isReady:!1,messageQueue:[]},this._isolatedFrames.set(d.toLowerCase(),l)}var b=this._isolatedListeners.get(r);b?b.listeners.get(o)||b.listeners.set(o,{callback:t}):this._isolatedListeners.set(r,{isolatedDomain:d,iframe:l.iframe,listeners:new Map([[o,{callback:t}]])}),e.isRenderedFromPersistedData||this.sendInitialize(r,s);var g=this._callbackCache.get(r);g&&this._invokeCallback(r,g,o)},e.prototype.renderQuickView=function(e){var t=e.instanceId,n=e.listenerId;this._sendMessage(t,{serviceAction:"Action",action:{action:{type:"QuickView"},instanceId:t,listenerId:n}})},e.prototype.setDisplayMode=function(e){},e.prototype.setRenderType=function(e){},e.prototype.logCardActionEngagement=function(){},e.prototype.sendAction=function(e){var t=e.instanceId;this._sendMessage(t,{serviceAction:"Action",action:e})},e.prototype.sendInitialize=function(e,t){this._sendMessage(e,{serviceAction:"Initialize",newInstanceId:e,manifestId:t})},e.prototype._invokeCallback=function(e,t,n){var a,i=this._isolatedListeners.get(e);this._callbackCache.set(e,t),i?n?null===(a=i.listeners.get(n))||void 0===a||a.callback(t):i.listeners.forEach(function(e){return e.callback(t)}):this._logError("No entry for "+e)},e.prototype._logError=function(t){d._TraceLogger.logError(e._logSource,new Error(t))},e.prototype._sendMessage=function(e,t){var n=this._isolatedListeners.get(e);if(n){var a=this._isolatedFrames.get(n.isolatedDomain);a.isReady?(t.messageType="serviceMessage",n.iframe.contentWindow.postMessage(t,"*")):a.messageQueue.push([e,t])}else this._logError("No entry for "+e)},e.serviceKey=c.ServiceKey.create("sp-adaptive-card-extension-base::IsolatedAdaptiveCardExtensionService",e),e._logSource={id:"IsolatedAdaptiveCardExtensionService"},e}(),Q=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._templateType="Image",t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"template",{get:function(){return this._getTemplate(M,U)},enumerable:!1,configurable:!0}),t}(R),Y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._templateType="PrimaryText",t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"template",{get:function(){return this._getTemplate(P,F)},enumerable:!1,configurable:!0}),t}(R),J=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"externalLink",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return""},enumerable:!1,configurable:!0}),t}(H)},ut3N:function(e,t){e.exports=c}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
define("eeec822e-c28a-46b4-affc-7058e4c1aa80_1.14.0",["tslib","@microsoft/sp-component-base","@microsoft/sp-loader","@microsoft/sp-lodash-subset","@microsoft/sp-core-library","@microsoft/sp-page-context","@microsoft/sp-diagnostics"],function(n,a,i,r,o,s,c){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="mwqp")}({"17wl":function(e,t){e.exports=n},"7Awa":function(e,t){e.exports=a},I6O9:function(e,t){e.exports=i},Pk8u:function(e,t){e.exports=r},UWqr:function(e,t){e.exports=o},"X+PM":function(e,t){e.exports=s},mGD9:function(e){e.exports=JSON.parse('{"t":"Àćţĩōń Ĩď: \\u0027{0}\\u0027 ţàŕĝēţ ŨŔĹ śĥōũĺď ńōţ ƀē ũńďēƒĩńēď ōŕ ēmƥţŷ śţŕĩńĝ. ","e":"Àďàƥţĩvē ćàŕď ēxţēńśĩōń ĩćōń."}')},mwqp:function(e,t,n){"use strict";n.r(t),n.d(t,"AdaptiveCardExtensionContext",function(){return r}),n.d(t,"_AdaptiveCardExtensionHost",function(){return o}),n.d(t,"_AdaptiveCardExtensionLoader",function(){return f}),n.d(t,"BaseAdaptiveCardExtension",function(){return K}),n.d(t,"_BaseAdaptiveCardExtensionCache",function(){return I}),n.d(t,"_LocalStorageACECache",function(){return x}),n.d(t,"MediaType",function(){return D}),n.d(t,"_IsolatedAdaptiveCardExtensionService",function(){return q}),n.d(t,"BaseView",function(){return H}),n.d(t,"BaseBasicCardView",function(){return N}),n.d(t,"BaseCardView",function(){return R}),n.d(t,"BaseImageCardView",function(){return Q}),n.d(t,"BasePrimaryTextCardView",function(){return Y}),n.d(t,"QuickViewNavigator",function(){return G}),n.d(t,"ViewNavigator",function(){return z}),n.d(t,"BaseAdaptiveCardView",function(){return J}),n.d(t,"_isAdaptiveCardExtensionLKGCachingEnabled",function(){return _});var a=n("17wl"),i=n("7Awa"),r=function(e){function t(t){var n=e.call(this,t)||this;return n._aceHost=t.host,n.manifest=t.manifest,n._deviceContext=t.deviceContext,n._location=t.location,n}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"_host",{get:function(){return this._aceHost},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propertyPane",{get:function(){return this._host.propertyPane},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceContext",{get:function(){return this._deviceContext},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this._location()},enumerable:!1,configurable:!0}),t}(i.BaseComponentContext),o=function(){function e(e){this._onBeforeInitializedCallback=e.onBeforeInitializedCallback,this._onUpdateCallback=e.onUpdateCallback,this._onErrorCallback=e.onError,this._onRequestRenderTypeCallback=e.onRequestRenderTypeCallback,this._onVisibilityChanged=e.onVisibilityChanged,this._cache=e.cache,this.propertyPane=e.propertyPane}return e.prototype.update=function(e){this._onUpdateCallback(e)},e.prototype.onBeforeInitialized=function(e){this._onBeforeInitializedCallback&&this._onBeforeInitializedCallback(e)},e.prototype.onError=function(e){this._onErrorCallback&&this._onErrorCallback(e)},e.prototype.requestRenderTypeChange=function(e,t){this._onRequestRenderTypeCallback(e,t)},Object.defineProperty(e.prototype,"cache",{get:function(){return this._cache},enumerable:!1,configurable:!0}),e.prototype.onVisibilityChanged=function(e){this._onVisibilityChanged(e)},e}(),s=n("I6O9"),c=n("UWqr"),d=n("ut3N");function l(){return c._SPKillSwitch.isActivated("6ca4b572-5356-4763-87bb-1e80205bfa6b")}function u(){return c._SPKillSwitch.isActivated("00be0ead-6f25-4d07-8cef-9840d5522e49")}var f=function(){function e(){}return e._createQosExtraData=function(e,t){return{alias:e.alias,manifestId:e.id,mpnId:e.mpnId,isInternal:e.isInternal,teamsHosted:c._BrowserUtilities.isTeamsHosted(),deviceContext:t}},e.prototype.load=function(t){var n,a,i=this,r=new d._QosMonitor("AdaptiveCardExtension.Load",!0),o=e._createQosExtraData(t.manifest,t.deviceContext);return s.SPComponentLoader.loadComponent(t.manifest).then(function(e){return e.default&&(e=e.default),new e}).catch(function(e){throw r.writeUnexpectedFailure("AdaptiveCardExtensionLoadFailed",e,o),n=e,e}).then(function(e){(a=e)._internalInitialize(i._getContext(t),t.addedFromPersistedData,t.initialDisplayMode),a._internalDeserialize(t.aceData),t.host.onBeforeInitialized(a);var n,r=t.cacheObject?{state:(n=t.cacheObject).cachedState,cardNavigatorState:n.cardNavigatorState}:void 0;return a.onInit(r)}).then(function(){return r.writeSuccess(o),u()||a._internalOnAfterInit(),a}).catch(function(e){throw n||r.writeUnexpectedFailure("AdaptiveCardExtensionInitializationFailed",e,o),e})},e.prototype._getContext=function(e){return new r({host:e.host,manifest:e.manifest,instanceId:e.instanceId,parentServiceScope:e.serviceScope,loggingTag:"",deviceContext:e.deviceContext,location:e.location})},e}(),p=n("Pk8u");function m(){return c._SPFlight.isEnabled(60544)}function _(){return c._SPFlight.isEnabled(60456)}var h=n("mGD9"),b=new RegExp(/(?=.+)(\/l\/entity\/.+)/gi),g={Medium:1,Large:2};function v(e,t,n,a,i){var r,o;if("Submit"===t.type)(o=t).confirmationDialog&&(o.parameters||(o.parameters={}),o.parameters.__MSConfirmationDialog__=o.confirmationDialog),r={id:n,type:"Action.Submit",style:i,title:a,data:t.parameters||void 0};else if("ExternalLink"===t.type){y(t.parameters,e);var s=t.parameters.target;if(!s||""===s)throw new Error(c.Text.format(h.t,n));r={id:n,type:"Action.OpenUrl",style:i,title:a,url:s}}else"QuickView"===t.type?r={id:n,type:"Action.Submit",style:i,title:a,data:{_internalQuickViewId:t.parameters.view}}:c._SPFlight.isEnabled(60447)&&"VivaAction.SelectMedia"===t.type?r={id:n,type:"VivaAction.SelectMedia",style:i,title:a,parameters:t.parameters}:m()&&"VivaAction.GetLocation"===t.type?r={id:n,type:"VivaAction.GetLocation",style:i,title:a,parameters:t.parameters}:m()&&"VivaAction.ShowLocation"===t.type&&(r={id:n,type:"VivaAction.ShowLocation",style:i,title:a,parameters:t.parameters});return r}function y(e,t){if(e&&e.isTeamsDeepLink&&function(e){return c._SPKillSwitch.isActivated("cfe2dadf-9488-4409-b3d4-d3dd23a7970e")?"WebView"===e:"Mobile"!==e}(t)){var n=e.target.match(b);n&&n[0]&&(e.target="msteams:"+n[0])}}function S(e,t,n,i,r,o){var s,c=e.cardButtons,d=e.data,l=e.onCardSelection,u=e._templateType;if(i||(i=e.template),void 0===c||"Image"===u&&"Large"!==t||function(e,t,n,a){for(var i=[],r=Math.min(g[n],(null==t?void 0:t.length)||0),o=0;o<r;o++){var s=t[o],c=s.id?s.id:"ac-button-"+o;i.push(v(a,s.action,c,s.title,s.style))}e.actions=i}(i,c,t,n),l){var f=v(n,l,"select-action");"Action.OpenUrl"!==f.type&&"Action.Submit"!==f.type||(s=f)}return{data:Object(a.__assign)({selectAction:s,iconProperty:r,iconAltText:d.iconAltText||h.e,title:o},d),template:i,cardProperties:{iconProperty:d.iconProperty||r,size:t,title:d.title||o,templateType:u}}}var D,I=function(){function e(){}return e.prototype.get=function(e,t){var n=this.getFromSource(e,t);if(n)return(new Date).getTime()<n.expirationTime?n:void 0},e}(),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),t.getKey=function(e,t){return"AdaptiveCardExtension_LKG_"+e+"_"+t},Object.defineProperty(t,"instance",{get:function(){return void 0===this._instance&&(this._instance=new t),this._instance},enumerable:!1,configurable:!0}),t.prototype.save=function(e,t,n){var a=this._getLocalStorageEntry(e);a.set(t,n);var i=Array.from(a.entries());localStorage.setItem(e,JSON.stringify(i))},t.prototype.getFromSource=function(e,t){return this._getLocalStorageEntry(e).get(t)},t.prototype._getLocalStorageEntry=function(e){var t=localStorage.getItem(e);return t?new Map(JSON.parse(t)):new Map},t}(I),C=function(){function e(e,t,n,i,r,o){this._context=e,this._getCardSize=t,this._getIconProperty=n,this._getTitle=i,this._handleInitializeCallback=r,this._settings=Object(a.__assign)(Object(a.__assign)({},this._defaultCacheSettings()),o)}return e.prototype.save=function(e,t,n,a,i){var r,o,s;if(this._settings.isEnabled){var c=this._initializeCustomCardView();if(c&&c.isCacheEnabled||!c&&t.isCacheEnabled){var d=c?S(c,this._getCardSize(),this._context.deviceContext,void 0,this._getIconProperty(),this._getTitle()):n.card;s=this._createCacheObject(n,d,a,i),null===(r=this._context._host.cache)||void 0===r||r.save(x.getKey(this._context.pageContext.site.id.toString(),null===(o=this._context.pageContext.listItem)||void 0===o?void 0:o.uniqueId),e,s)}}return s},e.prototype._createCacheObject=function(e,t,n,a){return{cachedCard:t,cardNavigatorState:n,isVisible:e.isVisible,cachedState:a,expirationTime:(new Date).getTime()+1e3*this._settings.expiryTimeInSeconds}},e.prototype._initializeCustomCardView=function(){if(this._settings.cachedCardView){var e=this._settings.cachedCardView();return this._handleInitializeCallback(e),e}},e.prototype._defaultCacheSettings=function(){return{isEnabled:!0,expiryTimeInSeconds:86400,cachedCardView:void 0}},e}(),O="auto",w={type:"TextBlock",subType:"Primary",text:"${primaryText}",weight:"Bolder",maxLines:1,spacing:"none"},E={type:"TextBlock",subType:"BodySecondary",text:"${description}",spacing:"none",wrap:!0},A={type:"TextBlock",subType:"BodyPrimary",text:"${primaryText}",spacing:"none",wrap:!0},L={type:"TextBlock",subType:"Title",text:"${title}",wrap:!1,maxLines:1,spacing:"none"},k={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:O},{type:"Column",spacing:"none",items:[L],width:"stretch"}]},A]}]},M={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",items:[{type:"Image",url:"${imageUrl}"},{type:"ColumnSet",spacing:"none",columns:[{type:"Column",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:O},{type:"Column",spacing:"none",items:[L],width:"stretch"}]},A]}]},P={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:O},{type:"Column",spacing:"none",items:[L],width:"stretch"}]},{type:"Container",spacing:"none",items:[w,E]}]}]},T={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",selectAction:"${selectAction}",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:O},{type:"Column",spacing:"none",items:[L],width:"stretch"}]},A]}]},U={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",selectAction:"${selectAction}",items:[{type:"Image",url:"${imageUrl}"},{type:"ColumnSet",spacing:"none",columns:[{type:"Column",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:O},{type:"Column",spacing:"none",items:[L],width:"stretch"}]},A]}]},F={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",selectAction:"${selectAction}",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:O},{type:"Column",spacing:"none",items:[L],width:"stretch"}]},{type:"Container",spacing:"none",items:[w,E]}]}]},H=function(){function e(){}return Object.defineProperty(e.prototype,"cardNavigator",{get:function(){return this._ace.cardNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quickViewNavigator",{get:function(){return this._ace.quickViewNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){return this._properties},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cardSize",{get:function(){return this._getCardSize()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),e.prototype.onAction=function(e){},e.prototype.onActionError=function(e){},e.prototype.setState=function(e){this._ace.setState(e)},e.prototype.setVisibility=function(e){this._ace.isVisible=e},e}(),R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"cardButtons",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onCardSelection",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCacheEnabled",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype._getTemplate=function(e,t){return Object(p.cloneDeep)(this.onCardSelection?t:e)},t}(H),N=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._templateType="Basic",t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"template",{get:function(){return this._getTemplate(k,T)},enumerable:!1,configurable:!0}),t}(R),B=function(e){function t(t){var n=e.call(this)||this;return n._primaryText=t,n._templateType="Basic",n}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return{primaryText:this._primaryText}},enumerable:!1,configurable:!0}),t}(N),j=/\{(\d+)\}/g,V=function(){function e(){this._registeredCallbacks=new Map}return e.prototype.register=function(e,t){this._registeredCallbacks.has(e)||this._registeredCallbacks.set(e,t)},e.prototype.consume=function(e){var t=this._registeredCallbacks.get(e);if(!t)throw new Error(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e.replace(j,function(e,n){return null===t[n]?"":""+t[n]})}("View with id {0} must be registered before being used",e));return this._registeredCallbacks.delete(e),t},Object.defineProperty(e.prototype,"size",{get:function(){return this._registeredCallbacks.size},enumerable:!1,configurable:!0}),e}(),z=function(){function e(e,t){this._handleStackChangedCallback=e,this._handleInitializeCallback=t,this._viewStack=new Array,this._viewCache=new Map,this._viewRegistry=new V}return e.prototype.register=function(e,t){this._viewRegistry.register(e,t)},e.prototype.push=function(e,t){void 0===t&&(t=!1),this._push(e),this._handleStackChangedCallback(t)},e.prototype.replace=function(e,t){void 0===t&&(t=!1),this._pop(),this._push(e),this._handleStackChangedCallback(t)},e.prototype.pop=function(e){void 0===e&&(e=!1),this.size>1&&(this._pop(),this._handleStackChangedCallback(e))},Object.defineProperty(e.prototype,"size",{get:function(){return this._viewStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentId",{get:function(){var e=this.size;return e?this._viewStack[e-1]:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_currentView",{get:function(){return this._viewCache.get(this._viewStack[this.size-1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewStack",{get:function(){return this._viewStack},enumerable:!1,configurable:!0}),e.prototype._clear=function(){this._viewStack=[]},e.prototype._forEach=function(e){this._viewCache.forEach(e)},e.prototype._getRegistrySize=function(){return this._viewRegistry.size},e.prototype._push=function(e){if(void 0===this._viewCache.get(e)){var t=this._viewRegistry.consume(e)();this._handleInitializeCallback(t),this._viewCache.set(e,t)}this._viewStack.push(e)},e.prototype._pop=function(){this._viewStack.pop()},e}(),G=function(e){function t(t,n,a){var i=e.call(this,t,n)||this;return i._closeQuickViewCallback=a,i}return Object(a.__extends)(t,e),t.prototype.close=function(){this._closeQuickViewCallback()},t}(z),K=function(e){function t(){var t=e.call(this)||this;return t._isInitialized=!1,t._getCard=function(e){try{return S(t._cardNavigator._currentView,t.cardSize,t.context.deviceContext,e?t._ACRenderArgs.card.template:void 0,t.iconProperty,t.title)}catch(e){throw t.context._host.onError(e.toString()),e}},t._onViewInitialized=function(e){e._state=t.state,e._ace=t,e._properties=t.properties,e._getCardSize=function(){return t.cardSize},e._context=t.context},t._navigatorCallback=function(e){e||t.update(t._renderType)},t._closeQuickViewCallback=function(){t.context._host.requestRenderTypeChange("Card",t.instanceId)},t._cardSize="Medium",t._renderType="Card",t._isVisible=!0,t._cardNavigator=new z(t._navigatorCallback,t._onViewInitialized),t._quickViewNavigator=new G(t._navigatorCallback,t._onViewInitialized,t._closeQuickViewCallback),t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"cardNavigator",{get:function(){return this._cardNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cardSize",{get:function(){return this._cardSize},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataVersion",{get:function(){return c.Version.parse("1.0")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"description",{get:function(){return this._description},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayMode",{get:function(){return this._displayMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"properties",{get:function(){return this._properties},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"quickViewNavigator",{get:function(){return this._quickViewNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedFromPersistedData",{get:function(){return this._renderedFromPersistedData},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedOnce",{get:function(){return this._renderedOnce},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderType",{get:function(){return this._renderType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propertiesMetadata",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},set:function(e){if(this._state)throw new Error("state can only be initialized once");this._state=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this._title},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"iconProperty",{get:function(){return this._iconProperty},enumerable:!1,configurable:!0}),t.prototype.getPropertyPaneConfiguration=function(){return{pages:[]}},t.prototype.loadPropertyPaneResources=function(){return Promise.resolve()},t.prototype.getCacheSettings=function(){return{}},t.prototype.getCachedState=function(e){return{}},t.prototype._internalOnAction=function(e){c._SPKillSwitch.isActivated("5753b2a7-fd3a-47c3-b4b6-9d4ed88d2922")?("Card"===this.renderType?this._cardNavigator:this._quickViewNavigator)._currentView.onAction(e):this.navigator._currentView.onAction(e)},t.prototype._internalOnActionError=function(e){this.navigator._currentView.onActionError(e)},t.prototype.onBeforeSerialize=function(){},t.prototype.onAfterPropertiesUpdatedExternally=function(e){},t.prototype.onAfterDeserialize=function(e,t){return e},t.prototype.onDisplayModeChanged=function(e){},t.prototype.onDispose=function(){},t.prototype.onInit=function(e){return Promise.resolve()},t.prototype.onPropertyPaneFieldChanged=function(e,t,n){},t.prototype.onRenderTypeChanged=function(e){},t.prototype.renderCard=function(){},t.prototype._getPreFrameworkPropertyPaneConfiguration=function(){return[]},Object.defineProperty(t.prototype,"_isFrameworkPropertyPaneEnabled",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,(this.cardNavigator._getRegistrySize()>0||this.cardNavigator._currentView)&&this.context._host.onVisibilityChanged(this._getRenderArguments(this.renderType))},enumerable:!1,configurable:!0}),t.prototype.setState=function(e){if(!this._state)throw new Error("state must be initialized before calling setState");e&&(this._state=Object(a.__assign)(Object(a.__assign)({},this.state),Object(p.cloneDeep)(e)),this._cardNavigator._forEach(this._onViewInitialized),this._quickViewNavigator._forEach(this._onViewInitialized)),(u()||this._isInitialized)&&this.context._host.update(this._getRenderArguments(this._renderType))},t.prototype.update=function(e,t){void 0===t&&(t=!1);var n=this._getRenderArguments(e,t);this.context._host.update(n)},t.prototype._getRenderArguments=function(e,t,n){var i,r=this;if(void 0===t&&(t=!1),c._SPKillSwitch.isActivated("bb1ed3e2-2b35-4dd4-a016-bc0220dc829d")||this._setRenderType(e,n),"Card"===e&&0===this.cardNavigator.size){var o=this.renderCard();o||(o="_InternalDefaultCardView",this._cardNavigator.register(o,function(){return new B(r.description)})),this._cardNavigator.push(o,!0)}if(void 0===this._ACRenderArgs?this._ACRenderArgs={card:"Card"===e?this._getCard(t):void 0,isVisible:this._isVisible,instanceId:this.instanceId,lastUpdatedType:e,quickLook:"QuickView"===e?this._getQuickView(t):void 0}:this._updateRenderArgs(e,t),_()&&this.displayMode===c.DisplayMode.Read&&"Card"===e){var s=null===(i=this._cacheManager)||void 0===i?void 0:i.save(this.instanceId,this._cardNavigator._currentView,this._ACRenderArgs,this.cardNavigator.viewStack,this.getCachedState(Object(a.__assign)({},this._state)));this._ACRenderArgs.cacheObject=s}return this._ACRenderArgs},t.prototype._propertiesMetadata=function(){return l()?void 0:this.propertiesMetadata},t.prototype._getPropertyPaneConfiguration=function(){return this.getPropertyPaneConfiguration()},Object.defineProperty(t.prototype,"navigator",{get:function(){return"Card"===this.renderType?this._cardNavigator:this._quickViewNavigator},enumerable:!1,configurable:!0}),t.prototype._internalDeserialize=function(e){e.title&&(this._title=e.title),e.iconProperty&&(this._iconProperty=e.iconProperty),e.description&&(this._description=e.description),e.cardSize&&(this._cardSize=e.cardSize);var t=e.properties;!l()&&this.renderedFromPersistedData&&(i._PropertyMetadataProcessor.reInstateServerProcessedData(this.propertiesMetadata,t,e.serverProcessedContent),e.serverProcessedContent=void 0),this._properties?Object.assign(this._properties,t):this._properties=this.onAfterDeserialize(t,e.dataVersion?c.Version.parse(e.dataVersion):this.dataVersion)},t.prototype._internalInitialize=function(t,n,a){var i=this;e.prototype._initializeContext.call(this,t),this._displayMode=a,this._renderedOnce=!1,this._renderedFromPersistedData=n,_()&&(this._cacheManager=new C(this.context,function(){return i.cardSize},function(){return i.iconProperty},function(){return i.title},this._onViewInitialized,this.getCacheSettings()))},t.prototype._internalSetDisplayMode=function(e){if(this._displayMode!==e){var t=this._displayMode;this._displayMode=e,this.onDisplayModeChanged(t)}},t.prototype._loadPropertyPaneResources=function(){return this.loadPropertyPaneResources()},t.prototype._onPropertyPaneFieldChanged=function(e,t,n){Object(p.isEqual)(t,n)||(this._updateProperty(e,n),this.onPropertyPaneFieldChanged(e,t,n))},t.prototype._renderCompleted=function(){this._renderedOnce=!0},t.prototype._internalOnAfterInit=function(){this._isInitialized=!0},t.prototype._internalSerialize=function(){return this.onBeforeSerialize(),{dataVersion:this.dataVersion.toString(),id:this.componentId,instanceId:this.instanceId,properties:this.properties,title:this.title,description:this._description,iconProperty:this.iconProperty,cardSize:this._cardSize}},t.prototype._setRenderType=function(e,t){if(this._renderType!==e){var n=this._renderType;"QuickView"===n&&this._quickViewNavigator._clear(),"Card"===n&&(this._quickViewNavigator._clear(),void 0!==t&&this._quickViewNavigator.push(t,!0)),this._renderType=e,this.onRenderTypeChanged(n)}},t.prototype._updateConfigurableFields=function(e,t){"cardSize"===e&&(this._cardSize=t)},t.prototype._logCardActionEngagement=function(e,t,n,a,i){var r,o,s,c,l,u,f;d._EngagementLogger.log({name:"AdaptiveCardExtension.CardAction",isIntentional:!0,siteId:null===(o=null===(r=this.context.pageContext)||void 0===r?void 0:r.site)||void 0===o?void 0:o.id.toString(),webId:null===(c=null===(s=this.context.pageContext)||void 0===s?void 0:s.web)||void 0===c?void 0:c.id.toString(),extraData:{ActionType:e,Alias:this.manifest.alias,DeviceContext:n,IsInternal:this.manifest.isInternal,InstanceId:this.instanceId,ItemLocation:t,WorkLoad:t,TenantID:null===(f=null===(u=null===(l=this.context.pageContext)||void 0===l?void 0:l.aadInfo)||void 0===u?void 0:u.tenantId)||void 0===f?void 0:f.toString().toLowerCase(),EventSchemaVersion:10,ManifestId:this.manifest.id,MobileSessionId:a,MobileBootType:i,MPNId:this.manifest.mpnId}})},t.prototype._getQuickView=function(e){if(0!==this._quickViewNavigator.size){var t=this._quickViewNavigator._currentView;if(void 0!==t)return y(t.externalLink,this.context.deviceContext),{data:t.data,template:e?this._ACRenderArgs.quickLook.template:t.template,pageBarProperties:{externalLink:t.externalLink,leftNavigationButtonType:this._quickViewNavigator.size>1?"Back":"Close",title:t.title},viewId:this._quickViewNavigator.currentId,viewStackSize:this._quickViewNavigator.size}}},t.prototype._updateRenderArgs=function(e,t){this._ACRenderArgs.lastUpdatedType=e,this._ACRenderArgs.isVisible=this._isVisible,"Card"===e?this._ACRenderArgs.card=this._getCard(t):this._ACRenderArgs.quickLook=this._getQuickView(t)},t.prototype._updateProperty=function(e,t){Object(p.update)(this._properties,e,function(){return t})},t}(i.BaseComponent);!function(e){e[e.Image=1]="Image",e[e.Audio=4]="Audio"}(D||(D={}));var W=n("X+PM"),q=function(){function e(e){var t=this;this._serviceScope=e,this._callbackCache=new Map,this._isolatedFrames=new Map,this._isolatedListeners=new Map,this._handleIsolatedApplicationMessage=function(e){var n=e.data;if("applicationMessage"===n.messageType){var a=n.instanceId,i=n.kind;switch(i){case"Card":t._invokeCallback(a,{aceData:n.aceData,card:n.card,cacheObject:n.cacheObject,type:i});break;case"Error":t._invokeCallback(a,{error:n.error,type:i});break;case"Ready":var r=t._isolatedFrames.get(new URL(e.origin).hostname);if(r){r.isReady=!0;for(var o=0,s=r.messageQueue;o<s.length;o++){var c=s[o],d=c[0],l=c[1];t._sendMessage(d,l)}r.messageQueue=[]}break;default:t._logError("Unexpected message: "+JSON.stringify(e.data))}}},window.addEventListener("message",this._handleIsolatedApplicationMessage)}return Object.defineProperty(e.prototype,"_pageContext",{get:function(){return this._pContext||(this._pContext=this._serviceScope.consume(W.PageContext.serviceKey)),this._pContext},enumerable:!1,configurable:!0}),e.prototype.disposeEntry=function(e){this._isolatedListeners.delete(e)},e.prototype.load=function(e){var t=e.callback,n=e.dashboardListId,a=e.itemId,r=e.instanceId,o=e.listenerId,s=e.manifestId,d=e.isolatedDomain.toLowerCase(),l=this._isolatedFrames.get(d);if(!l){var u=document.createElement("iframe"),f=new URLSearchParams(window.location.search).toString(),p=this._pageContext.site.serverRelativeUrl,m="/"===p?"":p,_="/_layouts/15/adaptivecardextensions.aspx?dashboardListID="+n+"&id="+a+"&instanceId="+r+"&"+f,h=Object(i._ensureIsolatedDomainUrl)(d,this._pageContext.web.absoluteUrl);c._SPFlight.isEnabled(60128)?u.src=h+"/_layouts/15/framedteamslogon.aspx?spfx=true&dest="+encodeURIComponent(m+_):u.src=h+_,u.hidden=!0,u.style.position="absolute",document.body.appendChild(u),l={iframe:u,isReady:!1,messageQueue:[]},this._isolatedFrames.set(d.toLowerCase(),l)}var b=this._isolatedListeners.get(r);b?b.listeners.get(o)||b.listeners.set(o,{callback:t}):this._isolatedListeners.set(r,{isolatedDomain:d,iframe:l.iframe,listeners:new Map([[o,{callback:t}]])}),e.isRenderedFromPersistedData||this.sendInitialize(r,s);var g=this._callbackCache.get(r);g&&this._invokeCallback(r,g,o)},e.prototype.renderQuickView=function(e){var t=e.instanceId,n=e.listenerId;this._sendMessage(t,{serviceAction:"Action",action:{action:{type:"QuickView"},instanceId:t,listenerId:n}})},e.prototype.setDisplayMode=function(e){},e.prototype.setRenderType=function(e){},e.prototype.logCardActionEngagement=function(){},e.prototype.sendAction=function(e){var t=e.instanceId;this._sendMessage(t,{serviceAction:"Action",action:e})},e.prototype.sendInitialize=function(e,t){this._sendMessage(e,{serviceAction:"Initialize",newInstanceId:e,manifestId:t})},e.prototype._invokeCallback=function(e,t,n){var a,i=this._isolatedListeners.get(e);this._callbackCache.set(e,t),i?n?null===(a=i.listeners.get(n))||void 0===a||a.callback(t):i.listeners.forEach(function(e){return e.callback(t)}):this._logError("No entry for "+e)},e.prototype._logError=function(t){d._TraceLogger.logError(e._logSource,new Error(t))},e.prototype._sendMessage=function(e,t){var n=this._isolatedListeners.get(e);if(n){var a=this._isolatedFrames.get(n.isolatedDomain);a.isReady?(t.messageType="serviceMessage",n.iframe.contentWindow.postMessage(t,"*")):a.messageQueue.push([e,t])}else this._logError("No entry for "+e)},e.serviceKey=c.ServiceKey.create("sp-adaptive-card-extension-base::IsolatedAdaptiveCardExtensionService",e),e._logSource={id:"IsolatedAdaptiveCardExtensionService"},e}(),Q=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._templateType="Image",t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"template",{get:function(){return this._getTemplate(M,U)},enumerable:!1,configurable:!0}),t}(R),Y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._templateType="PrimaryText",t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"template",{get:function(){return this._getTemplate(P,F)},enumerable:!1,configurable:!0}),t}(R),J=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"externalLink",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return""},enumerable:!1,configurable:!0}),t}(H)},ut3N:function(e,t){e.exports=c}})});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IAdaptiveCardExtensionManifest } from '@microsoft/sp-module-interfaces';
|
|
2
2
|
import { ServiceScope } from '@microsoft/sp-core-library';
|
|
3
|
-
import { AdaptiveCardExtensionContext, BaseAdaptiveCardExtension, _IAdaptiveCardExtensionCache, BaseAdaptiveCardView, BaseCardView, CardSize } from '../index';
|
|
3
|
+
import { AdaptiveCardExtensionContext, BaseAdaptiveCardExtension, _IAdaptiveCardExtensionCache, BaseAdaptiveCardView, BaseCardView, CardSize, ILocation } from '../index';
|
|
4
4
|
export interface IAdaptiveCardExtensionTestData {
|
|
5
5
|
dataVersion?: string;
|
|
6
6
|
id?: string;
|
|
@@ -12,6 +12,7 @@ export interface IAdaptiveCardExtensionTestData {
|
|
|
12
12
|
cardSize?: CardSize;
|
|
13
13
|
manifest?: IAdaptiveCardExtensionManifest<unknown>;
|
|
14
14
|
cache?: _IAdaptiveCardExtensionCache;
|
|
15
|
+
locationPromise?: Promise<ILocation>;
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
17
18
|
* A wrapper class around ACEs that allows a developer to test the full lifecycle of an AdaptiveCardExtension in unit tests
|
|
@@ -102,7 +102,12 @@ var AdaptiveCardExtensionTestWrapper = /** @class */ (function () {
|
|
|
102
102
|
instanceId: testData.instanceId || 'aceInstanceId',
|
|
103
103
|
parentServiceScope: this._rootScope,
|
|
104
104
|
loggingTag: '',
|
|
105
|
-
deviceContext: 'WebView'
|
|
105
|
+
deviceContext: 'WebView',
|
|
106
|
+
location: function () {
|
|
107
|
+
return new Promise(function (resolve, reject) {
|
|
108
|
+
return resolve({ latitude: 10, longitude: 10 });
|
|
109
|
+
});
|
|
110
|
+
}
|
|
106
111
|
};
|
|
107
112
|
return new index_1.AdaptiveCardExtensionContext(contextParams);
|
|
108
113
|
};
|
|
@@ -115,7 +120,7 @@ var AdaptiveCardExtensionTestWrapper = /** @class */ (function () {
|
|
|
115
120
|
title: 'title',
|
|
116
121
|
description: 'description',
|
|
117
122
|
iconProperty: 'iconProperty',
|
|
118
|
-
cardSize: '
|
|
123
|
+
cardSize: 'Medium'
|
|
119
124
|
};
|
|
120
125
|
return tslib_1.__assign(tslib_1.__assign({}, defaultAdaptiveCardExtensionData), testData);
|
|
121
126
|
};
|
package/dist/tsdoc-metadata.json
CHANGED
|
@@ -18,6 +18,7 @@ var AdaptiveCardExtensionContext = /** @class */ (function (_super) {
|
|
|
18
18
|
_this._aceHost = parameters.host;
|
|
19
19
|
_this.manifest = parameters.manifest;
|
|
20
20
|
_this._deviceContext = parameters.deviceContext;
|
|
21
|
+
_this._location = parameters.location;
|
|
21
22
|
return _this;
|
|
22
23
|
}
|
|
23
24
|
Object.defineProperty(AdaptiveCardExtensionContext.prototype, "_host", {
|
|
@@ -49,6 +50,17 @@ var AdaptiveCardExtensionContext = /** @class */ (function (_super) {
|
|
|
49
50
|
enumerable: false,
|
|
50
51
|
configurable: true
|
|
51
52
|
});
|
|
53
|
+
Object.defineProperty(AdaptiveCardExtensionContext.prototype, "location", {
|
|
54
|
+
/**
|
|
55
|
+
* @alpha
|
|
56
|
+
* Provides a promise that gets current location of the device
|
|
57
|
+
*/
|
|
58
|
+
get: function () {
|
|
59
|
+
return this._location();
|
|
60
|
+
},
|
|
61
|
+
enumerable: false,
|
|
62
|
+
configurable: true
|
|
63
|
+
});
|
|
52
64
|
return AdaptiveCardExtensionContext;
|
|
53
65
|
}(sp_component_base_1.BaseComponentContext));
|
|
54
66
|
exports.AdaptiveCardExtensionContext = AdaptiveCardExtensionContext;
|
|
@@ -88,7 +88,8 @@ var AdaptiveCardExtensionLoader = /** @class */ (function () {
|
|
|
88
88
|
instanceId: loadContext.instanceId,
|
|
89
89
|
parentServiceScope: loadContext.serviceScope,
|
|
90
90
|
loggingTag: '',
|
|
91
|
-
deviceContext: loadContext.deviceContext
|
|
91
|
+
deviceContext: loadContext.deviceContext,
|
|
92
|
+
location: loadContext.location
|
|
92
93
|
});
|
|
93
94
|
};
|
|
94
95
|
return AdaptiveCardExtensionLoader;
|
|
@@ -287,7 +287,7 @@ var BaseAdaptiveCardExtension = /** @class */ (function (_super) {
|
|
|
287
287
|
/**
|
|
288
288
|
* Override the default cache settings.
|
|
289
289
|
*
|
|
290
|
-
* @
|
|
290
|
+
* @beta
|
|
291
291
|
* @virtual
|
|
292
292
|
*/
|
|
293
293
|
BaseAdaptiveCardExtension.prototype.getCacheSettings = function () {
|
|
@@ -299,7 +299,7 @@ var BaseAdaptiveCardExtension = /** @class */ (function (_super) {
|
|
|
299
299
|
* @remarks If not overriden, this will return an empty object.
|
|
300
300
|
* @param state - A shallow clone of the AdaptiveCardExtension state object.
|
|
301
301
|
*
|
|
302
|
-
* @
|
|
302
|
+
* @beta
|
|
303
303
|
* @virtual
|
|
304
304
|
*/
|
|
305
305
|
BaseAdaptiveCardExtension.prototype.getCachedState = function (state) {
|
|
@@ -313,8 +313,23 @@ var BaseAdaptiveCardExtension = /** @class */ (function (_super) {
|
|
|
313
313
|
* @internal
|
|
314
314
|
*/
|
|
315
315
|
BaseAdaptiveCardExtension.prototype._internalOnAction = function (action) {
|
|
316
|
-
|
|
317
|
-
|
|
316
|
+
if (Killswitches_1.useCommonGetterForNavigatorViewKSActivated()) {
|
|
317
|
+
var navigator_1 = this.renderType === 'Card' ? this._cardNavigator : this._quickViewNavigator;
|
|
318
|
+
navigator_1._currentView.onAction(action);
|
|
319
|
+
}
|
|
320
|
+
else {
|
|
321
|
+
this.navigator._currentView.onAction(action);
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
/**
|
|
325
|
+
* Pass the action error arguments onto the current view to handle.
|
|
326
|
+
*
|
|
327
|
+
* @param actionError - The {@link IBaseActionErrorArguments} for the current event.
|
|
328
|
+
*
|
|
329
|
+
* @internal
|
|
330
|
+
*/
|
|
331
|
+
BaseAdaptiveCardExtension.prototype._internalOnActionError = function (actionError) {
|
|
332
|
+
this.navigator._currentView.onActionError(actionError);
|
|
318
333
|
};
|
|
319
334
|
/**
|
|
320
335
|
* Lifecycle method called before serialization.
|
|
@@ -449,6 +464,19 @@ var BaseAdaptiveCardExtension = /** @class */ (function (_super) {
|
|
|
449
464
|
BaseAdaptiveCardExtension.prototype._getPreFrameworkPropertyPaneConfiguration = function () {
|
|
450
465
|
return [];
|
|
451
466
|
};
|
|
467
|
+
Object.defineProperty(BaseAdaptiveCardExtension.prototype, "_isFrameworkPropertyPaneEnabled", {
|
|
468
|
+
/**
|
|
469
|
+
* Whether the framework will add property pane groups (e.g., cardSize)
|
|
470
|
+
*
|
|
471
|
+
* @virtual
|
|
472
|
+
* @internal
|
|
473
|
+
*/
|
|
474
|
+
get: function () {
|
|
475
|
+
return true;
|
|
476
|
+
},
|
|
477
|
+
enumerable: false,
|
|
478
|
+
configurable: true
|
|
479
|
+
});
|
|
452
480
|
Object.defineProperty(BaseAdaptiveCardExtension.prototype, "isVisible", {
|
|
453
481
|
// #endregion
|
|
454
482
|
// #region Public APIs
|
|
@@ -517,10 +545,13 @@ var BaseAdaptiveCardExtension = /** @class */ (function (_super) {
|
|
|
517
545
|
*
|
|
518
546
|
* @internal
|
|
519
547
|
*/
|
|
520
|
-
BaseAdaptiveCardExtension.prototype._getRenderArguments = function (renderTypeToUpdate, updateOnlyData) {
|
|
548
|
+
BaseAdaptiveCardExtension.prototype._getRenderArguments = function (renderTypeToUpdate, updateOnlyData, initialViewId) {
|
|
521
549
|
var _this = this;
|
|
522
550
|
var _a;
|
|
523
551
|
if (updateOnlyData === void 0) { updateOnlyData = false; }
|
|
552
|
+
if (!Killswitches_1.isSetRenderTypeInGetRenderArgumentKSActivated()) {
|
|
553
|
+
this._setRenderType(renderTypeToUpdate, initialViewId);
|
|
554
|
+
}
|
|
524
555
|
if (renderTypeToUpdate === 'Card' && this.cardNavigator.size === 0) {
|
|
525
556
|
var initialCardId = this.renderCard();
|
|
526
557
|
if (!initialCardId) {
|
|
@@ -566,6 +597,22 @@ var BaseAdaptiveCardExtension = /** @class */ (function (_super) {
|
|
|
566
597
|
BaseAdaptiveCardExtension.prototype._getPropertyPaneConfiguration = function () {
|
|
567
598
|
return this.getPropertyPaneConfiguration();
|
|
568
599
|
};
|
|
600
|
+
Object.defineProperty(BaseAdaptiveCardExtension.prototype, "navigator", {
|
|
601
|
+
/**
|
|
602
|
+
* The current {@link ViewNavigator}.
|
|
603
|
+
*
|
|
604
|
+
* @remarks If the current {@link BaseAdaptiveCardExtension.renderType} is `Card`
|
|
605
|
+
* then returns {@link BaseAdaptiveCardExtension.cardNavigator}.
|
|
606
|
+
*
|
|
607
|
+
* @remarks If the current {@link BaseAdaptiveCardExtension.renderType} is `QuickView`
|
|
608
|
+
* then returns {@link BaseAdaptiveCardExtension.quickViewNavigator}.
|
|
609
|
+
*/
|
|
610
|
+
get: function () {
|
|
611
|
+
return this.renderType === 'Card' ? this._cardNavigator : this._quickViewNavigator;
|
|
612
|
+
},
|
|
613
|
+
enumerable: false,
|
|
614
|
+
configurable: true
|
|
615
|
+
});
|
|
569
616
|
/**
|
|
570
617
|
* @internal
|
|
571
618
|
*/
|
|
@@ -774,7 +821,9 @@ var BaseAdaptiveCardExtension = /** @class */ (function (_super) {
|
|
|
774
821
|
externalLink: currentView.externalLink,
|
|
775
822
|
leftNavigationButtonType: this._quickViewNavigator.size > 1 ? 'Back' : 'Close',
|
|
776
823
|
title: currentView.title
|
|
777
|
-
}
|
|
824
|
+
},
|
|
825
|
+
viewId: this._quickViewNavigator.currentId,
|
|
826
|
+
viewStackSize: this._quickViewNavigator.size
|
|
778
827
|
};
|
|
779
828
|
};
|
|
780
829
|
/**
|
|
@@ -5,6 +5,7 @@ var tslib_1 = require("tslib");
|
|
|
5
5
|
var sp_core_library_1 = require("@microsoft/sp-core-library");
|
|
6
6
|
var Flights_1 = require("../../common/Flights");
|
|
7
7
|
var strings = tslib_1.__importStar(require("../../loc/Strings.resx"));
|
|
8
|
+
var Killswitches_1 = require("../../common/Killswitches");
|
|
8
9
|
/**
|
|
9
10
|
* This regex is used to get URI that starts with `/l/entity/`.
|
|
10
11
|
* EX: `https://teams.microsoft.com/l/entity/abcd-01234/0` -> `/l/entity/abcd-01234/0`
|
|
@@ -119,7 +120,9 @@ exports.updateSubmitActionButtonType = updateSubmitActionButtonType;
|
|
|
119
120
|
*
|
|
120
121
|
*/
|
|
121
122
|
function updateExternalLinkTeamsDeepLinkTarget(externalLinkParameters, deviceContext) {
|
|
122
|
-
if (externalLinkParameters &&
|
|
123
|
+
if (externalLinkParameters &&
|
|
124
|
+
externalLinkParameters.isTeamsDeepLink &&
|
|
125
|
+
_isValidMSTeamsDeviceContext(deviceContext)) {
|
|
123
126
|
var result = externalLinkParameters.target.match(TEAMS_DEEP_LINK_REGEX);
|
|
124
127
|
if (result && result[0]) {
|
|
125
128
|
externalLinkParameters.target = "msteams:" + result[0];
|
|
@@ -127,4 +130,17 @@ function updateExternalLinkTeamsDeepLinkTarget(externalLinkParameters, deviceCon
|
|
|
127
130
|
}
|
|
128
131
|
}
|
|
129
132
|
exports.updateExternalLinkTeamsDeepLinkTarget = updateExternalLinkTeamsDeepLinkTarget;
|
|
133
|
+
/**
|
|
134
|
+
* Determines if device context is appropriate to generate msteams:// prefix deeplink
|
|
135
|
+
* @param deviceContext - DeviceContext
|
|
136
|
+
* @returns - boolean
|
|
137
|
+
*/
|
|
138
|
+
function _isValidMSTeamsDeviceContext(deviceContext) {
|
|
139
|
+
if (!Killswitches_1.isCreateMSTeamsDeepLinkForVCDKSActivated()) {
|
|
140
|
+
return deviceContext !== 'Mobile';
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
return deviceContext === 'WebView';
|
|
144
|
+
}
|
|
145
|
+
}
|
|
130
146
|
//# sourceMappingURL=actionButtonHelper.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isAdaptiveCardExtensionLKGCachingEnabled = exports.isWexVivaLocationSupportEnabled = exports.isWexVivaUploadActionEnabled = exports.isVivaDashboardImagePerfEnabled = void 0;
|
|
3
|
+
exports.isAdaptiveCardExtensionLKGCachingEnabled = exports.isFramedTeamsLogonEnabled = exports.isWexVivaLocationSupportEnabled = exports.isWexVivaUploadActionEnabled = exports.isVivaDashboardImagePerfEnabled = void 0;
|
|
4
4
|
var sp_core_library_1 = require("@microsoft/sp-core-library");
|
|
5
5
|
// tslint:disable:export-name
|
|
6
6
|
function isVivaDashboardImagePerfEnabled() {
|
|
@@ -15,6 +15,13 @@ function isWexVivaLocationSupportEnabled() {
|
|
|
15
15
|
return sp_core_library_1._SPFlight.isEnabled(60544 /* WexVivaLocationSupport */);
|
|
16
16
|
}
|
|
17
17
|
exports.isWexVivaLocationSupportEnabled = isWexVivaLocationSupportEnabled;
|
|
18
|
+
function isFramedTeamsLogonEnabled() {
|
|
19
|
+
return sp_core_library_1._SPFlight.isEnabled(60128 /* SPPPlatIsolatedACETeamsLogon */);
|
|
20
|
+
}
|
|
21
|
+
exports.isFramedTeamsLogonEnabled = isFramedTeamsLogonEnabled;
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
18
25
|
function isAdaptiveCardExtensionLKGCachingEnabled() {
|
|
19
26
|
return sp_core_library_1._SPFlight.isEnabled(60456 /* AdaptiveCardExtensionLKGCaching */);
|
|
20
27
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isPreventHostUpdatesBeforeInitCompletedKSActivated = exports.isACEPropertiesMetadataKSActivated = void 0;
|
|
3
|
+
exports.isCreateMSTeamsDeepLinkForVCDKSActivated = exports.useCommonGetterForNavigatorViewKSActivated = exports.isSetRenderTypeInGetRenderArgumentKSActivated = exports.isPreventHostUpdatesBeforeInitCompletedKSActivated = exports.isACEPropertiesMetadataKSActivated = void 0;
|
|
4
4
|
var sp_core_library_1 = require("@microsoft/sp-core-library");
|
|
5
5
|
function isACEPropertiesMetadataKSActivated() {
|
|
6
6
|
return sp_core_library_1._SPKillSwitch.isActivated('6ca4b572-5356-4763-87bb-1e80205bfa6b' /* '07/16/2021', 'BaseAdaptiveCardExtension propertiesMetadata' */);
|
|
@@ -10,4 +10,18 @@ function isPreventHostUpdatesBeforeInitCompletedKSActivated() {
|
|
|
10
10
|
return sp_core_library_1._SPKillSwitch.isActivated('00be0ead-6f25-4d07-8cef-9840d5522e49' /* '09/17/2021', 'Prevents telling host to re-render if setState called before onInit called by loader' */);
|
|
11
11
|
}
|
|
12
12
|
exports.isPreventHostUpdatesBeforeInitCompletedKSActivated = isPreventHostUpdatesBeforeInitCompletedKSActivated;
|
|
13
|
+
function isSetRenderTypeInGetRenderArgumentKSActivated() {
|
|
14
|
+
return sp_core_library_1._SPKillSwitch.isActivated('bb1ed3e2-2b35-4dd4-a016-bc0220dc829d'
|
|
15
|
+
/* '10/14/2021', 'Trigger onRenderTypeChange in bridge _onRequestRenderTypeCallback' */
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
exports.isSetRenderTypeInGetRenderArgumentKSActivated = isSetRenderTypeInGetRenderArgumentKSActivated;
|
|
19
|
+
function useCommonGetterForNavigatorViewKSActivated() {
|
|
20
|
+
return sp_core_library_1._SPKillSwitch.isActivated('5753b2a7-fd3a-47c3-b4b6-9d4ed88d2922' /* '10/21/2021', 'use common getter for navigator' */);
|
|
21
|
+
}
|
|
22
|
+
exports.useCommonGetterForNavigatorViewKSActivated = useCommonGetterForNavigatorViewKSActivated;
|
|
23
|
+
function isCreateMSTeamsDeepLinkForVCDKSActivated() {
|
|
24
|
+
return sp_core_library_1._SPKillSwitch.isActivated('cfe2dadf-9488-4409-b3d4-d3dd23a7970e' /* '12/08/2021', 'create msteams protocol deep link for VCD' */);
|
|
25
|
+
}
|
|
26
|
+
exports.isCreateMSTeamsDeepLinkForVCDKSActivated = isCreateMSTeamsDeepLinkForVCDKSActivated;
|
|
13
27
|
//# sourceMappingURL=Killswitches.js.map
|