@microsoft/sp-adaptive-card-extension-base 1.13.0-beta.24 → 1.14.0-beta.4
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 +70 -70
- package/dist/index-internal-beta.d.ts +63 -7
- package/dist/index-internal-public.d.ts +3 -0
- package/dist/index-internal.d.ts +63 -7
- package/dist/sp-adaptive-card-extension-base_default_09bf52dcdf0550fa258c.js +1 -0
- package/dist/sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js +1 -0
- package/dist/sp-adaptive-card-extension-base_qps-ploc_09bf52dcdf0550fa258c.js +1 -0
- package/dist/sp-adaptive-card-extension-base_qps-ploca_09bf52dcdf0550fa258c.js +1 -0
- package/dist/test-api/AdaptiveCardExtensionTestWrapper.d.ts +2 -1
- package/dist/test-api/AdaptiveCardExtensionTestWrapper.js +6 -1
- 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 +19 -3
- package/lib-commonjs/common/Killswitches.js +7 -1
- package/lib-commonjs/interfaces/ILocation.js +1 -1
- package/lib-commonjs/test-api/AdaptiveCardExtensionTestWrapper.js +6 -1
- package/package.json +9 -8
- package/dist/sp-adaptive-card-extension-base_default_d28e29652990e5653468.js +0 -1
- package/dist/sp-adaptive-card-extension-base_en-us_d28e29652990e5653468.js +0 -1
- package/dist/sp-adaptive-card-extension-base_qps-ploc_d28e29652990e5653468.js +0 -1
- package/dist/sp-adaptive-card-extension-base_qps-ploca_d28e29652990e5653468.js +0 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "eeec822e-c28a-46b4-affc-7058e4c1aa80",
|
|
4
4
|
"alias": "SpAdaptiveCardBase",
|
|
5
5
|
"componentType": "Library",
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.14.0",
|
|
7
7
|
"loaderConfig": {
|
|
8
8
|
"internalModuleBaseUrls": [
|
|
9
9
|
"https://localhost:4321/dist/"
|
|
@@ -13,71 +13,71 @@
|
|
|
13
13
|
"sp-adaptive-card-extension-base": {
|
|
14
14
|
"type": "localizedPath",
|
|
15
15
|
"paths": {
|
|
16
|
-
"default": "sp-adaptive-card-extension-
|
|
17
|
-
"en-US": "sp-adaptive-card-extension-base_en-
|
|
18
|
-
"qps-ploca": "sp-adaptive-card-extension-base_qps-
|
|
19
|
-
"qps-ploc": "sp-adaptive-card-extension-base_qps-
|
|
20
|
-
"en-GB": "sp-adaptive-card-extension-base_en-
|
|
21
|
-
"en-NZ": "sp-adaptive-card-extension-base_en-
|
|
22
|
-
"en-IE": "sp-adaptive-card-extension-base_en-
|
|
23
|
-
"en-AU": "sp-adaptive-card-extension-base_en-
|
|
24
|
-
"bn": "sp-adaptive-card-extension-base_en-
|
|
25
|
-
"chr": "sp-adaptive-card-extension-base_en-
|
|
26
|
-
"dv": "sp-adaptive-card-extension-base_en-
|
|
27
|
-
"div": "sp-adaptive-card-extension-base_en-
|
|
28
|
-
"en": "sp-adaptive-card-extension-base_en-
|
|
29
|
-
"fil": "sp-adaptive-card-extension-base_en-
|
|
30
|
-
"haw": "sp-adaptive-card-extension-base_en-
|
|
31
|
-
"iu": "sp-adaptive-card-extension-base_en-
|
|
32
|
-
"lo": "sp-adaptive-card-extension-base_en-
|
|
33
|
-
"moh": "sp-adaptive-card-extension-base_en-
|
|
34
|
-
"sq": "sp-adaptive-card-extension-base_en-
|
|
35
|
-
"am": "sp-adaptive-card-extension-base_en-
|
|
36
|
-
"hy": "sp-adaptive-card-extension-base_en-
|
|
37
|
-
"mk": "sp-adaptive-card-extension-base_en-
|
|
38
|
-
"bs": "sp-adaptive-card-extension-base_en-
|
|
39
|
-
"my": "sp-adaptive-card-extension-base_en-
|
|
40
|
-
"dz": "sp-adaptive-card-extension-base_en-
|
|
41
|
-
"en-CY": "sp-adaptive-card-extension-base_en-
|
|
42
|
-
"en-EG": "sp-adaptive-card-extension-base_en-
|
|
43
|
-
"en-IL": "sp-adaptive-card-extension-base_en-
|
|
44
|
-
"en-IS": "sp-adaptive-card-extension-base_en-
|
|
45
|
-
"en-JO": "sp-adaptive-card-extension-base_en-
|
|
46
|
-
"en-KE": "sp-adaptive-card-extension-base_en-
|
|
47
|
-
"en-KW": "sp-adaptive-card-extension-base_en-
|
|
48
|
-
"en-MK": "sp-adaptive-card-extension-base_en-
|
|
49
|
-
"en-MT": "sp-adaptive-card-extension-base_en-
|
|
50
|
-
"en-PK": "sp-adaptive-card-extension-base_en-
|
|
51
|
-
"en-QA": "sp-adaptive-card-extension-base_en-
|
|
52
|
-
"en-SA": "sp-adaptive-card-extension-base_en-
|
|
53
|
-
"en-LK": "sp-adaptive-card-extension-base_en-
|
|
54
|
-
"en-AE": "sp-adaptive-card-extension-base_en-
|
|
55
|
-
"en-VN": "sp-adaptive-card-extension-base_en-
|
|
56
|
-
"is": "sp-adaptive-card-extension-base_en-
|
|
57
|
-
"km": "sp-adaptive-card-extension-base_en-
|
|
58
|
-
"kh": "sp-adaptive-card-extension-base_en-
|
|
59
|
-
"mt": "sp-adaptive-card-extension-base_en-
|
|
60
|
-
"fa": "sp-adaptive-card-extension-base_en-
|
|
61
|
-
"gd": "sp-adaptive-card-extension-base_en-
|
|
62
|
-
"sr-Cyrl-BA": "sp-adaptive-card-extension-base_en-
|
|
63
|
-
"sr-Latn-BA": "sp-adaptive-card-extension-base_en-
|
|
64
|
-
"sd": "sp-adaptive-card-extension-base_en-
|
|
65
|
-
"si": "sp-adaptive-card-extension-base_en-
|
|
66
|
-
"so": "sp-adaptive-card-extension-base_en-
|
|
67
|
-
"ti-ET": "sp-adaptive-card-extension-base_en-
|
|
68
|
-
"uz": "sp-adaptive-card-extension-base_en-
|
|
69
|
-
"en-SG": "sp-adaptive-card-extension-base_en-
|
|
70
|
-
"en-HK": "sp-adaptive-card-extension-base_en-
|
|
71
|
-
"en-MY": "sp-adaptive-card-extension-base_en-
|
|
72
|
-
"en-PH": "sp-adaptive-card-extension-base_en-
|
|
73
|
-
"en-TT": "sp-adaptive-card-extension-base_en-
|
|
74
|
-
"en-AZ": "sp-adaptive-card-extension-base_en-
|
|
75
|
-
"en-BH": "sp-adaptive-card-extension-base_en-
|
|
76
|
-
"en-BN": "sp-adaptive-card-extension-base_en-
|
|
77
|
-
"en-ID": "sp-adaptive-card-extension-base_en-
|
|
78
|
-
"mi": "sp-adaptive-card-extension-base_en-
|
|
16
|
+
"default": "sp-adaptive-card-extension-base_default_09bf52dcdf0550fa258c.js",
|
|
17
|
+
"en-US": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
18
|
+
"qps-ploca": "sp-adaptive-card-extension-base_qps-ploca_09bf52dcdf0550fa258c.js",
|
|
19
|
+
"qps-ploc": "sp-adaptive-card-extension-base_qps-ploc_09bf52dcdf0550fa258c.js",
|
|
20
|
+
"en-GB": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
21
|
+
"en-NZ": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
22
|
+
"en-IE": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
23
|
+
"en-AU": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
24
|
+
"bn": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
25
|
+
"chr": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
26
|
+
"dv": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
27
|
+
"div": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
28
|
+
"en": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
29
|
+
"fil": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
30
|
+
"haw": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
31
|
+
"iu": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
32
|
+
"lo": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
33
|
+
"moh": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
34
|
+
"sq": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
35
|
+
"am": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
36
|
+
"hy": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
37
|
+
"mk": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
38
|
+
"bs": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
39
|
+
"my": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
40
|
+
"dz": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
41
|
+
"en-CY": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
42
|
+
"en-EG": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
43
|
+
"en-IL": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
44
|
+
"en-IS": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
45
|
+
"en-JO": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
46
|
+
"en-KE": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
47
|
+
"en-KW": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
48
|
+
"en-MK": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
49
|
+
"en-MT": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
50
|
+
"en-PK": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
51
|
+
"en-QA": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
52
|
+
"en-SA": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
53
|
+
"en-LK": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
54
|
+
"en-AE": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
55
|
+
"en-VN": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
56
|
+
"is": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
57
|
+
"km": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
58
|
+
"kh": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
59
|
+
"mt": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
60
|
+
"fa": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
61
|
+
"gd": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
62
|
+
"sr-Cyrl-BA": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
63
|
+
"sr-Latn-BA": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
64
|
+
"sd": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
65
|
+
"si": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
66
|
+
"so": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
67
|
+
"ti-ET": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
68
|
+
"uz": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
69
|
+
"en-SG": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
70
|
+
"en-HK": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
71
|
+
"en-MY": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
72
|
+
"en-PH": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
73
|
+
"en-TT": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
74
|
+
"en-AZ": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
75
|
+
"en-BH": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
76
|
+
"en-BN": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
77
|
+
"en-ID": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js",
|
|
78
|
+
"mi": "sp-adaptive-card-extension-base_en-us_09bf52dcdf0550fa258c.js"
|
|
79
79
|
},
|
|
80
|
-
"defaultPath": "sp-adaptive-card-extension-
|
|
80
|
+
"defaultPath": "sp-adaptive-card-extension-base_default_09bf52dcdf0550fa258c.js"
|
|
81
81
|
},
|
|
82
82
|
"tslib": {
|
|
83
83
|
"type": "component",
|
|
@@ -87,27 +87,27 @@
|
|
|
87
87
|
"@microsoft/sp-component-base": {
|
|
88
88
|
"type": "component",
|
|
89
89
|
"id": "467dc675-7cc5-4709-8aac-78e3b71bd2f6",
|
|
90
|
-
"version": "1.
|
|
90
|
+
"version": "1.14.0"
|
|
91
91
|
},
|
|
92
92
|
"@microsoft/sp-loader": {
|
|
93
93
|
"type": "component",
|
|
94
94
|
"id": "1c6c9123-7aac-41f3-a376-3caea41ed83f",
|
|
95
|
-
"version": "1.
|
|
95
|
+
"version": "1.14.0"
|
|
96
96
|
},
|
|
97
97
|
"@microsoft/sp-lodash-subset": {
|
|
98
98
|
"type": "component",
|
|
99
99
|
"id": "73e1dc6c-8441-42cc-ad47-4bd3659f8a3a",
|
|
100
|
-
"version": "1.
|
|
100
|
+
"version": "1.14.0"
|
|
101
101
|
},
|
|
102
102
|
"@microsoft/sp-core-library": {
|
|
103
103
|
"type": "component",
|
|
104
104
|
"id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b",
|
|
105
|
-
"version": "1.
|
|
105
|
+
"version": "1.14.0"
|
|
106
106
|
},
|
|
107
107
|
"@microsoft/sp-diagnostics": {
|
|
108
108
|
"type": "component",
|
|
109
109
|
"id": "78359e4b-07c2-43c6-8d0b-d060b4d577e8",
|
|
110
|
-
"version": "1.
|
|
110
|
+
"version": "1.14.0"
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
}
|
|
@@ -44,6 +44,7 @@ export declare class AdaptiveCardExtensionContext extends BaseComponentContext {
|
|
|
44
44
|
readonly manifest: IAdaptiveCardExtensionManifest<unknown>;
|
|
45
45
|
private _aceHost;
|
|
46
46
|
private _deviceContext;
|
|
47
|
+
private _location;
|
|
47
48
|
/* Excluded from this release type: __constructor */
|
|
48
49
|
/* Excluded from this release type: _host */
|
|
49
50
|
/**
|
|
@@ -51,6 +52,7 @@ export declare class AdaptiveCardExtensionContext extends BaseComponentContext {
|
|
|
51
52
|
*/
|
|
52
53
|
get propertyPane(): IPropertyPaneAccessor | undefined;
|
|
53
54
|
get deviceContext(): DeviceContext;
|
|
55
|
+
/* Excluded from this release type: location */
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
/* Excluded from this release type: _AdaptiveCardExtensionHost */
|
|
@@ -215,8 +217,23 @@ export declare class BaseAdaptiveCardExtension<TProperties = {}, TState = Readon
|
|
|
215
217
|
* @virtual
|
|
216
218
|
*/
|
|
217
219
|
protected loadPropertyPaneResources(): Promise<void>;
|
|
218
|
-
|
|
219
|
-
|
|
220
|
+
/**
|
|
221
|
+
* Override the default cache settings.
|
|
222
|
+
*
|
|
223
|
+
* @beta
|
|
224
|
+
* @virtual
|
|
225
|
+
*/
|
|
226
|
+
protected getCacheSettings(): Partial<ICacheSettings>;
|
|
227
|
+
/**
|
|
228
|
+
* This virtual method returns a subset of the state object that will be cached by the client.
|
|
229
|
+
*
|
|
230
|
+
* @remarks If not overriden, this will return an empty object.
|
|
231
|
+
* @param state - A shallow clone of the AdaptiveCardExtension state object.
|
|
232
|
+
*
|
|
233
|
+
* @beta
|
|
234
|
+
* @virtual
|
|
235
|
+
*/
|
|
236
|
+
protected getCachedState(state: TState): Partial<TState>;
|
|
220
237
|
/* Excluded from this release type: _internalOnAction */
|
|
221
238
|
/**
|
|
222
239
|
* Lifecycle method called before serialization.
|
|
@@ -284,7 +301,19 @@ export declare class BaseAdaptiveCardExtension<TProperties = {}, TState = Readon
|
|
|
284
301
|
* @virtual
|
|
285
302
|
*/
|
|
286
303
|
onInit(): Promise<void>;
|
|
287
|
-
|
|
304
|
+
/**
|
|
305
|
+
* Lifecycle method called during initialization.
|
|
306
|
+
*
|
|
307
|
+
* @remarks Asynchronous data fetches should be started during this lifecycle. Rendering can either be dependent on the result
|
|
308
|
+
* or, if resolved immediately, a fetching data state can be rendered.
|
|
309
|
+
*
|
|
310
|
+
* @param cachedLoadParameters - Parameters containing the cached state object (see {@link BaseAdaptiveCardExtension.getCachedState}), which can be used to rehydrate the AdaptiveCardExtension.
|
|
311
|
+
* If undefined, the AdaptiveCardExtension was not cached or the cache expired.
|
|
312
|
+
*
|
|
313
|
+
* @beta
|
|
314
|
+
* @virtual
|
|
315
|
+
*/
|
|
316
|
+
onInit(cachedLoadParameters?: ICachedLoadParameters): Promise<void>;
|
|
288
317
|
/**
|
|
289
318
|
* Lifecycle method called when a Property Pane field is changed.
|
|
290
319
|
*
|
|
@@ -320,6 +349,7 @@ export declare class BaseAdaptiveCardExtension<TProperties = {}, TState = Readon
|
|
|
320
349
|
*/
|
|
321
350
|
protected renderCard(): string | undefined;
|
|
322
351
|
/* Excluded from this release type: _getPreFrameworkPropertyPaneConfiguration */
|
|
352
|
+
/* Excluded from this release type: _isFrameworkPropertyPaneEnabled */
|
|
323
353
|
/**
|
|
324
354
|
* Sets the visibility of the Adaptive Card Extension and re-render
|
|
325
355
|
*
|
|
@@ -708,9 +738,35 @@ export declare interface IBasicCardParameters extends IBaseCardParameters {
|
|
|
708
738
|
primaryText: string;
|
|
709
739
|
}
|
|
710
740
|
|
|
711
|
-
|
|
741
|
+
/**
|
|
742
|
+
* Parameters used to rehydrate the AdaptiveCardExtension during a cached load
|
|
743
|
+
*
|
|
744
|
+
* @beta
|
|
745
|
+
* @remarks API under active development and not ready for use.
|
|
746
|
+
*/
|
|
747
|
+
export declare interface ICachedLoadParameters {
|
|
748
|
+
state: any;
|
|
749
|
+
cardNavigatorState: string[];
|
|
750
|
+
}
|
|
712
751
|
|
|
713
|
-
|
|
752
|
+
/**
|
|
753
|
+
* @beta
|
|
754
|
+
*/
|
|
755
|
+
export declare interface ICacheSettings {
|
|
756
|
+
/**
|
|
757
|
+
* Whether cache is enabled. Default: true
|
|
758
|
+
*/
|
|
759
|
+
isEnabled: boolean;
|
|
760
|
+
/**
|
|
761
|
+
* Expiry time in seconds. Default: 86400 seconds (24 hours)
|
|
762
|
+
*/
|
|
763
|
+
expiryTimeInSeconds: number;
|
|
764
|
+
/**
|
|
765
|
+
* Returns the Card View used to generate the cached card.
|
|
766
|
+
* By default, the currently rendered Card View will be used to cache the card.
|
|
767
|
+
*/
|
|
768
|
+
cachedCardView?: () => BaseCardView;
|
|
769
|
+
}
|
|
714
770
|
|
|
715
771
|
/**
|
|
716
772
|
* Type of handler for when a button is pressed.
|
|
@@ -875,7 +931,7 @@ export declare interface IImageCardParameters extends IBaseCardParameters {
|
|
|
875
931
|
|
|
876
932
|
/**
|
|
877
933
|
* Interface for location coordinates
|
|
878
|
-
* @remarks API under active development and not ready for use.
|
|
934
|
+
* @remarks API under active development and is not ready for use.
|
|
879
935
|
* @beta
|
|
880
936
|
*/
|
|
881
937
|
export declare interface ILocation {
|
|
@@ -1028,7 +1084,7 @@ export declare interface ISelectMediaCardAction {
|
|
|
1028
1084
|
*/
|
|
1029
1085
|
type: 'VivaAction.SelectMedia';
|
|
1030
1086
|
/**
|
|
1031
|
-
* Parameters for the
|
|
1087
|
+
* Parameters for the Select Media Action
|
|
1032
1088
|
*/
|
|
1033
1089
|
parameters: ISelectMediaActionParameters;
|
|
1034
1090
|
}
|
|
@@ -43,6 +43,7 @@ export declare class AdaptiveCardExtensionContext extends BaseComponentContext {
|
|
|
43
43
|
readonly manifest: IAdaptiveCardExtensionManifest<unknown>;
|
|
44
44
|
private _aceHost;
|
|
45
45
|
private _deviceContext;
|
|
46
|
+
private _location;
|
|
46
47
|
/* Excluded from this release type: __constructor */
|
|
47
48
|
/* Excluded from this release type: _host */
|
|
48
49
|
/**
|
|
@@ -50,6 +51,7 @@ export declare class AdaptiveCardExtensionContext extends BaseComponentContext {
|
|
|
50
51
|
*/
|
|
51
52
|
get propertyPane(): IPropertyPaneAccessor | undefined;
|
|
52
53
|
get deviceContext(): DeviceContext;
|
|
54
|
+
/* Excluded from this release type: location */
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
/* Excluded from this release type: _AdaptiveCardExtensionHost */
|
|
@@ -319,6 +321,7 @@ export declare class BaseAdaptiveCardExtension<TProperties = {}, TState = Readon
|
|
|
319
321
|
*/
|
|
320
322
|
protected renderCard(): string | undefined;
|
|
321
323
|
/* Excluded from this release type: _getPreFrameworkPropertyPaneConfiguration */
|
|
324
|
+
/* Excluded from this release type: _isFrameworkPropertyPaneEnabled */
|
|
322
325
|
/**
|
|
323
326
|
* Sets the visibility of the Adaptive Card Extension and re-render
|
|
324
327
|
*
|
package/dist/index-internal.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export declare class AdaptiveCardExtensionContext extends BaseComponentContext {
|
|
|
44
44
|
readonly manifest: IAdaptiveCardExtensionManifest<unknown>;
|
|
45
45
|
private _aceHost;
|
|
46
46
|
private _deviceContext;
|
|
47
|
+
private _location;
|
|
47
48
|
/* Excluded from this release type: __constructor */
|
|
48
49
|
/* Excluded from this release type: _host */
|
|
49
50
|
/**
|
|
@@ -51,6 +52,7 @@ export declare class AdaptiveCardExtensionContext extends BaseComponentContext {
|
|
|
51
52
|
*/
|
|
52
53
|
get propertyPane(): IPropertyPaneAccessor | undefined;
|
|
53
54
|
get deviceContext(): DeviceContext;
|
|
55
|
+
/* Excluded from this release type: location */
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
/* Excluded from this release type: _AdaptiveCardExtensionHost */
|
|
@@ -215,8 +217,23 @@ export declare class BaseAdaptiveCardExtension<TProperties = {}, TState = Readon
|
|
|
215
217
|
* @virtual
|
|
216
218
|
*/
|
|
217
219
|
protected loadPropertyPaneResources(): Promise<void>;
|
|
218
|
-
|
|
219
|
-
|
|
220
|
+
/**
|
|
221
|
+
* Override the default cache settings.
|
|
222
|
+
*
|
|
223
|
+
* @beta
|
|
224
|
+
* @virtual
|
|
225
|
+
*/
|
|
226
|
+
protected getCacheSettings(): Partial<ICacheSettings>;
|
|
227
|
+
/**
|
|
228
|
+
* This virtual method returns a subset of the state object that will be cached by the client.
|
|
229
|
+
*
|
|
230
|
+
* @remarks If not overriden, this will return an empty object.
|
|
231
|
+
* @param state - A shallow clone of the AdaptiveCardExtension state object.
|
|
232
|
+
*
|
|
233
|
+
* @beta
|
|
234
|
+
* @virtual
|
|
235
|
+
*/
|
|
236
|
+
protected getCachedState(state: TState): Partial<TState>;
|
|
220
237
|
/* Excluded from this release type: _internalOnAction */
|
|
221
238
|
/**
|
|
222
239
|
* Lifecycle method called before serialization.
|
|
@@ -284,7 +301,19 @@ export declare class BaseAdaptiveCardExtension<TProperties = {}, TState = Readon
|
|
|
284
301
|
* @virtual
|
|
285
302
|
*/
|
|
286
303
|
onInit(): Promise<void>;
|
|
287
|
-
|
|
304
|
+
/**
|
|
305
|
+
* Lifecycle method called during initialization.
|
|
306
|
+
*
|
|
307
|
+
* @remarks Asynchronous data fetches should be started during this lifecycle. Rendering can either be dependent on the result
|
|
308
|
+
* or, if resolved immediately, a fetching data state can be rendered.
|
|
309
|
+
*
|
|
310
|
+
* @param cachedLoadParameters - Parameters containing the cached state object (see {@link BaseAdaptiveCardExtension.getCachedState}), which can be used to rehydrate the AdaptiveCardExtension.
|
|
311
|
+
* If undefined, the AdaptiveCardExtension was not cached or the cache expired.
|
|
312
|
+
*
|
|
313
|
+
* @beta
|
|
314
|
+
* @virtual
|
|
315
|
+
*/
|
|
316
|
+
onInit(cachedLoadParameters?: ICachedLoadParameters): Promise<void>;
|
|
288
317
|
/**
|
|
289
318
|
* Lifecycle method called when a Property Pane field is changed.
|
|
290
319
|
*
|
|
@@ -320,6 +349,7 @@ export declare class BaseAdaptiveCardExtension<TProperties = {}, TState = Readon
|
|
|
320
349
|
*/
|
|
321
350
|
protected renderCard(): string | undefined;
|
|
322
351
|
/* Excluded from this release type: _getPreFrameworkPropertyPaneConfiguration */
|
|
352
|
+
/* Excluded from this release type: _isFrameworkPropertyPaneEnabled */
|
|
323
353
|
/**
|
|
324
354
|
* Sets the visibility of the Adaptive Card Extension and re-render
|
|
325
355
|
*
|
|
@@ -708,9 +738,35 @@ export declare interface IBasicCardParameters extends IBaseCardParameters {
|
|
|
708
738
|
primaryText: string;
|
|
709
739
|
}
|
|
710
740
|
|
|
711
|
-
|
|
741
|
+
/**
|
|
742
|
+
* Parameters used to rehydrate the AdaptiveCardExtension during a cached load
|
|
743
|
+
*
|
|
744
|
+
* @beta
|
|
745
|
+
* @remarks API under active development and not ready for use.
|
|
746
|
+
*/
|
|
747
|
+
export declare interface ICachedLoadParameters {
|
|
748
|
+
state: any;
|
|
749
|
+
cardNavigatorState: string[];
|
|
750
|
+
}
|
|
712
751
|
|
|
713
|
-
|
|
752
|
+
/**
|
|
753
|
+
* @beta
|
|
754
|
+
*/
|
|
755
|
+
export declare interface ICacheSettings {
|
|
756
|
+
/**
|
|
757
|
+
* Whether cache is enabled. Default: true
|
|
758
|
+
*/
|
|
759
|
+
isEnabled: boolean;
|
|
760
|
+
/**
|
|
761
|
+
* Expiry time in seconds. Default: 86400 seconds (24 hours)
|
|
762
|
+
*/
|
|
763
|
+
expiryTimeInSeconds: number;
|
|
764
|
+
/**
|
|
765
|
+
* Returns the Card View used to generate the cached card.
|
|
766
|
+
* By default, the currently rendered Card View will be used to cache the card.
|
|
767
|
+
*/
|
|
768
|
+
cachedCardView?: () => BaseCardView;
|
|
769
|
+
}
|
|
714
770
|
|
|
715
771
|
/**
|
|
716
772
|
* Type of handler for when a button is pressed.
|
|
@@ -875,7 +931,7 @@ export declare interface IImageCardParameters extends IBaseCardParameters {
|
|
|
875
931
|
|
|
876
932
|
/**
|
|
877
933
|
* Interface for location coordinates
|
|
878
|
-
* @remarks API under active development and not ready for use.
|
|
934
|
+
* @remarks API under active development and is not ready for use.
|
|
879
935
|
* @beta
|
|
880
936
|
*/
|
|
881
937
|
export declare interface ILocation {
|
|
@@ -1028,7 +1084,7 @@ export declare interface ISelectMediaCardAction {
|
|
|
1028
1084
|
*/
|
|
1029
1085
|
type: 'VivaAction.SelectMedia';
|
|
1030
1086
|
/**
|
|
1031
|
-
* Parameters for the
|
|
1087
|
+
* Parameters for the Select Media Action
|
|
1032
1088
|
*/
|
|
1033
1089
|
parameters: ISelectMediaActionParameters;
|
|
1034
1090
|
}
|
|
@@ -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-diagnostics"],function(n,a,i,r,o,s){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},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 G}),n.d(t,"_BaseAdaptiveCardExtensionCache",function(){return I}),n.d(t,"_LocalStorageACECache",function(){return x}),n.d(t,"MediaType",function(){return D}),n.d(t,"BaseView",function(){return F}),n.d(t,"BaseBasicCardView",function(){return R}),n.d(t,"BaseCardView",function(){return H}),n.d(t,"BaseImageCardView",function(){return K}),n.d(t,"BasePrimaryTextCardView",function(){return W}),n.d(t,"QuickViewNavigator",function(){return z}),n.d(t,"ViewNavigator",function(){return V}),n.d(t,"BaseAdaptiveCardView",function(){return q});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&&"WebView"===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={type:"TextBlock",subType:"Primary",text:"${primaryText}",weight:"Bolder",maxLines:1,spacing:"none"},w={type:"TextBlock",subType:"BodySecondary",text:"${description}",spacing:"none",wrap:!0},E={type:"TextBlock",subType:"BodyPrimary",text:"${primaryText}",spacing:"none",wrap:!0},A={type:"TextBlock",subType:"Title",text:"${title}",wrap:!1,maxLines:1,spacing:"none"},L={$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:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},E]}]},k={$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:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},E]}]},M={$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:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},{type:"Container",spacing:"none",items:[O,w]}]}]},P={$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:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},E]}]},T={$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:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},E]}]},U={$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:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},{type:"Container",spacing:"none",items:[O,w]}]}]},F=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.setState=function(e){this._ace.setState(e)},e.prototype.setVisibility=function(e){this._ace.isVisible=e},e}(),H=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}(F),R=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(L,P)},enumerable:!1,configurable:!0}),t}(H),N=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}(R),B=/\{(\d+)\}/g,j=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(B,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}(),V=function(){function e(e,t){this._handleStackChangedCallback=e,this._handleInitializeCallback=t,this._viewStack=new Array,this._viewCache=new Map,this._viewRegistry=new j}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}(),z=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}(V),G=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 V(t._navigatorCallback,t._onViewInitialized),t._quickViewNavigator=new z(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){("Card"===this.renderType?this._cardNavigator:this._quickViewNavigator)._currentView.onAction(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 N(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()},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){switch(e){case"cardSize":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}}}},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 K=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(k,T)},enumerable:!1,configurable:!0}),t}(H),W=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(M,U)},enumerable:!1,configurable:!0}),t}(H),q=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}(F)},ut3N:function(e,t){e.exports=s}})});
|
|
@@ -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-diagnostics"],function(n,a,i,r,o,s){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},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 G}),n.d(t,"_BaseAdaptiveCardExtensionCache",function(){return I}),n.d(t,"_LocalStorageACECache",function(){return x}),n.d(t,"MediaType",function(){return D}),n.d(t,"BaseView",function(){return F}),n.d(t,"BaseBasicCardView",function(){return R}),n.d(t,"BaseCardView",function(){return H}),n.d(t,"BaseImageCardView",function(){return K}),n.d(t,"BasePrimaryTextCardView",function(){return W}),n.d(t,"QuickViewNavigator",function(){return z}),n.d(t,"ViewNavigator",function(){return V}),n.d(t,"BaseAdaptiveCardView",function(){return q});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&&"WebView"===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={type:"TextBlock",subType:"Primary",text:"${primaryText}",weight:"Bolder",maxLines:1,spacing:"none"},w={type:"TextBlock",subType:"BodySecondary",text:"${description}",spacing:"none",wrap:!0},E={type:"TextBlock",subType:"BodyPrimary",text:"${primaryText}",spacing:"none",wrap:!0},A={type:"TextBlock",subType:"Title",text:"${title}",wrap:!1,maxLines:1,spacing:"none"},L={$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:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},E]}]},k={$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:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},E]}]},M={$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:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},{type:"Container",spacing:"none",items:[O,w]}]}]},P={$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:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},E]}]},T={$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:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},E]}]},U={$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:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},{type:"Container",spacing:"none",items:[O,w]}]}]},F=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.setState=function(e){this._ace.setState(e)},e.prototype.setVisibility=function(e){this._ace.isVisible=e},e}(),H=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}(F),R=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(L,P)},enumerable:!1,configurable:!0}),t}(H),N=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}(R),B=/\{(\d+)\}/g,j=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(B,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}(),V=function(){function e(e,t){this._handleStackChangedCallback=e,this._handleInitializeCallback=t,this._viewStack=new Array,this._viewCache=new Map,this._viewRegistry=new j}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}(),z=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}(V),G=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 V(t._navigatorCallback,t._onViewInitialized),t._quickViewNavigator=new z(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){("Card"===this.renderType?this._cardNavigator:this._quickViewNavigator)._currentView.onAction(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 N(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()},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){switch(e){case"cardSize":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}}}},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 K=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(k,T)},enumerable:!1,configurable:!0}),t}(H),W=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(M,U)},enumerable:!1,configurable:!0}),t}(H),q=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}(F)},ut3N:function(e,t){e.exports=s}})});
|