@microsoft/sp-component-base 1.22.0-beta.2 → 1.22.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/467dc675-7cc5-4709-8aac-78e3b71bd2f6.manifest.json +1 -1
- package/lib/BaseComponent.d.ts +115 -0
- package/lib/BaseComponent.d.ts.map +1 -0
- package/lib/BaseComponent.js +162 -0
- package/lib/BaseComponentContext.d.ts +142 -0
- package/lib/BaseComponentContext.d.ts.map +1 -0
- package/lib/BaseComponentContext.js +221 -0
- package/lib/DynamicDataProvider.d.ts +166 -0
- package/lib/DynamicDataProvider.d.ts.map +1 -0
- package/lib/DynamicDataProvider.js +420 -0
- package/lib/DynamicDataSourceManager.d.ts +160 -0
- package/lib/DynamicDataSourceManager.d.ts.map +1 -0
- package/lib/DynamicDataSourceManager.js +382 -0
- package/lib/DynamicProperty.d.ts +204 -0
- package/lib/DynamicProperty.d.ts.map +1 -0
- package/lib/DynamicProperty.js +390 -0
- package/lib/EnsureIsolatedDomainUrl.d.ts +9 -0
- package/lib/EnsureIsolatedDomainUrl.d.ts.map +1 -0
- package/lib/EnsureIsolatedDomainUrl.js +26 -0
- package/lib/IComponentPosition.d.ts +28 -0
- package/lib/IComponentPosition.d.ts.map +1 -0
- package/lib/IComponentPosition.js +2 -0
- package/lib/IComponentPropertyMetadata.d.ts +100 -0
- package/lib/IComponentPropertyMetadata.d.ts.map +1 -0
- package/lib/IComponentPropertyMetadata.js +2 -0
- package/lib/ISerializedServerProcessedData.d.ts +166 -0
- package/lib/ISerializedServerProcessedData.d.ts.map +1 -0
- package/lib/ISerializedServerProcessedData.js +28 -0
- package/lib/LegacyThirdPartyFabricCoreLoader.d.ts +40 -0
- package/lib/LegacyThirdPartyFabricCoreLoader.d.ts.map +1 -0
- package/lib/LegacyThirdPartyFabricCoreLoader.js +90 -0
- package/lib/PropertyMetadataProcessor.d.ts +54 -0
- package/lib/PropertyMetadataProcessor.d.ts.map +1 -0
- package/lib/PropertyMetadataProcessor.js +297 -0
- package/lib/ShimmerFactory.d.ts +17 -0
- package/lib/ShimmerFactory.d.ts.map +1 -0
- package/lib/ShimmerFactory.js +62 -0
- package/lib/chunks/legacy-third-party-fabric-core/FabricLocalFont.d.ts +17 -0
- package/lib/chunks/legacy-third-party-fabric-core/FabricLocalFont.d.ts.map +1 -0
- package/lib/chunks/legacy-third-party-fabric-core/FabricLocalFont.js +17 -0
- package/lib/chunks/legacy-third-party-fabric-core/fabric-core-sass/Fabric.LocalFont.global.scss.css +9247 -0
- package/lib/chunks/legacy-third-party-fabric-core/fabric-core-sass/Fabric.LocalFontKillSwitchActivated.scss.css +11165 -0
- package/lib/chunks/legacy-third-party-fabric-core/fabric-core-shim.global.scss.css +2063 -0
- package/lib/chunks/legacy-third-party-fabric-core/fabric-core-shimKillSwitchActivated.scss.css +2164 -0
- package/lib/chunks/legacy-third-party-fabric-core/iconDefinitions.css +6 -0
- package/lib/common/Flights.d.ts +3 -0
- package/lib/common/Flights.d.ts.map +1 -0
- package/lib/common/Flights.js +10 -0
- package/lib/common/KillSwitches.d.ts +2 -0
- package/lib/common/KillSwitches.d.ts.map +1 -0
- package/lib/common/KillSwitches.js +5 -0
- package/lib/dataCollector/IWebPartLoadData.d.ts +140 -0
- package/lib/dataCollector/IWebPartLoadData.d.ts.map +1 -0
- package/lib/dataCollector/IWebPartLoadData.js +40 -0
- package/lib/dataCollector/WebPartLoadDataCollector.d.ts +14 -0
- package/lib/dataCollector/WebPartLoadDataCollector.d.ts.map +1 -0
- package/lib/dataCollector/WebPartLoadDataCollector.js +137 -0
- package/lib/index.d.ts +34 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +27 -0
- package/lib/loc/Strings.resx.d.ts +44 -0
- package/lib/loc/Strings.resx.json +1 -0
- package/lib/sp-component-base.manifest.json +9 -0
- package/lib/styles/shimmer.module.scss.css +11 -0
- package/lib/teams/DeferredTeamsAppsClient.d.ts +17 -0
- package/lib/teams/DeferredTeamsAppsClient.d.ts.map +1 -0
- package/lib/teams/DeferredTeamsAppsClient.js +39 -0
- package/lib/teams/ITeamsAppCatalog.d.ts +72 -0
- package/lib/teams/ITeamsAppCatalog.d.ts.map +1 -0
- package/lib/teams/ITeamsAppCatalog.js +2 -0
- package/lib/teams/TeamsAppsClient.d.ts +113 -0
- package/lib/teams/TeamsAppsClient.d.ts.map +1 -0
- package/lib/teams/TeamsAppsClient.js +440 -0
- package/lib/test-api/MockComponent.d.ts +8 -0
- package/lib/test-api/MockComponent.d.ts.map +1 -0
- package/lib/test-api/MockComponent.js +31 -0
- package/lib/test-api/MockComponentContext.d.ts +6 -0
- package/lib/test-api/MockComponentContext.d.ts.map +1 -0
- package/lib/test-api/MockComponentContext.js +27 -0
- package/lib/test-api/index.d.ts +3 -0
- package/lib/test-api/index.d.ts.map +1 -0
- package/lib/test-api/index.js +3 -0
- package/lib/themeProvider/ThemeProvider.d.ts +71 -0
- package/lib/themeProvider/ThemeProvider.d.ts.map +1 -0
- package/lib/themeProvider/ThemeProvider.js +99 -0
- package/lib/themeProvider/themeInterfaces/IFontStyles.d.ts +26 -0
- package/lib/themeProvider/themeInterfaces/IFontStyles.d.ts.map +1 -0
- package/lib/themeProvider/themeInterfaces/IFontStyles.js +2 -0
- package/lib/themeProvider/themeInterfaces/IPalette.d.ts +7 -0
- package/lib/themeProvider/themeInterfaces/IPalette.d.ts.map +1 -0
- package/lib/themeProvider/themeInterfaces/IPalette.js +2 -0
- package/lib/themeProvider/themeInterfaces/ISemanticColors.d.ts +56 -0
- package/lib/themeProvider/themeInterfaces/ISemanticColors.d.ts.map +1 -0
- package/lib/themeProvider/themeInterfaces/ISemanticColors.js +2 -0
- package/lib/themeProvider/themeInterfaces/ISemanticTextColors.d.ts +7 -0
- package/lib/themeProvider/themeInterfaces/ISemanticTextColors.d.ts.map +1 -0
- package/lib/themeProvider/themeInterfaces/ISemanticTextColors.js +2 -0
- package/lib/themeProvider/themeInterfaces/ITheme.d.ts +16 -0
- package/lib/themeProvider/themeInterfaces/ITheme.d.ts.map +1 -0
- package/lib/themeProvider/themeInterfaces/ITheme.js +2 -0
- package/package.json +15 -15
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: FabricMDL2Icons;
|
|
3
|
+
src: url("https://res-1.cdn.office.net/files/fabric-cdn-prod_20240610.001/assets/icons/fabricmdl2icons-2.23.woff2") format("woff2"), url("https://res-1.cdn.office.net/files/fabric-cdn-prod_20240610.001/assets/icons/fabricmdl2icons-2.23.woff") format("woff"), url("https://res-1.cdn.office.net/files/fabric-cdn-prod_20240610.001/assets/icons/fabricmdl2icons-2.23.ttf") format("truetype");
|
|
4
|
+
font-weight: normal;
|
|
5
|
+
font-style: normal;
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Flights.d.ts","sourceRoot":"","sources":["../../src/common/Flights.ts"],"names":[],"mappings":"AAGA,wBAAgB,yBAAyB,IAAI,OAAO,CAEnD;AAGD,wBAAgB,kCAAkC,IAAI,OAAO,CAE5D"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { _SPFlight } from '@microsoft/sp-core-library';
|
|
2
|
+
// cross-project flight
|
|
3
|
+
export function isBotAcesFromTeamsEnabled() {
|
|
4
|
+
return _SPFlight.isEnabled(60693 /* APEXBotAceFromTeamsClient */);
|
|
5
|
+
}
|
|
6
|
+
// cross-project flight
|
|
7
|
+
export function isServerPropertiesSanitizedEnabled() {
|
|
8
|
+
return _SPFlight.isEnabled(61389 /* APEXServerPropertiesSanitizedEnabled */);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=Flights.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KillSwitches.d.ts","sourceRoot":"","sources":["../../src/common/KillSwitches.ts"],"names":[],"mappings":"AAEA,wBAAgB,qDAAqD,IAAI,OAAO,CAI/E"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { _SPKillSwitch } from '@microsoft/sp-core-library';
|
|
2
|
+
export function isExemptWebPartWithDynamicDataFromLazyLoadKSActivated() {
|
|
3
|
+
return _SPKillSwitch.isActivated('bbd78e03-ff18-40ed-9a94-973fc659366c' /* '12/01/2022', 'Update getWebPartsExemptedFromViewPortLoading to check for containsDynamicDataSource' */);
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=KillSwitches.js.map
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
export declare const CacheStatus: {
|
|
5
|
+
readonly True: "true";
|
|
6
|
+
readonly False: "false";
|
|
7
|
+
readonly NotAvailable: "N/A";
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* {@inheritdoc (CacheStatus:variable)}
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export type CacheStatus = typeof CacheStatus[keyof typeof CacheStatus];
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare const _CacheMissReason: {
|
|
18
|
+
/**
|
|
19
|
+
* Cache was available but config requested has changed.
|
|
20
|
+
*/
|
|
21
|
+
readonly CacheConfigMissmatch: "CacheConfigMissmatch";
|
|
22
|
+
/**
|
|
23
|
+
* Cache did not arrvie by the time web part requested it.
|
|
24
|
+
*/
|
|
25
|
+
readonly LateFlush: "LateFlush";
|
|
26
|
+
/**
|
|
27
|
+
* Cache is available but there is no cache entry for the web part.
|
|
28
|
+
*/
|
|
29
|
+
readonly CachedItemNotFound: "CachedItemNotFound";
|
|
30
|
+
/**
|
|
31
|
+
* Cache is available, config is also good but is too stale for use.
|
|
32
|
+
*/
|
|
33
|
+
readonly CacheExpired: "CacheExpired";
|
|
34
|
+
/**
|
|
35
|
+
* Cache miss happened but reason is not specified.
|
|
36
|
+
*/
|
|
37
|
+
readonly NotSpecified: "NotSpecified";
|
|
38
|
+
/**
|
|
39
|
+
* Not Applicable if there was cache hit.
|
|
40
|
+
*/
|
|
41
|
+
readonly NotApplicable: "N/A";
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* {@inheritdoc (_CacheMissReason:variable)}
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
export type _CacheMissReason = typeof _CacheMissReason[keyof typeof _CacheMissReason];
|
|
48
|
+
/**
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
export interface IWebPartLoadData {
|
|
52
|
+
alias: string;
|
|
53
|
+
isInternal: boolean | undefined;
|
|
54
|
+
manifestId: string;
|
|
55
|
+
/**
|
|
56
|
+
* Time taken to load javascript module for web part since loadWebPart().
|
|
57
|
+
*/
|
|
58
|
+
moduleLoadTime?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Time taken to initialize web part after module is loaded and web part ready for viewport loading.
|
|
61
|
+
*/
|
|
62
|
+
initTime?: number;
|
|
63
|
+
/**
|
|
64
|
+
* Time taken by web part to render post initialization. This is mostly time taken during render().
|
|
65
|
+
* It might also include getDataComplete if webpart overrides _internalGetData()
|
|
66
|
+
*/
|
|
67
|
+
renderTime?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Synchronous time taken by render function first execution.
|
|
70
|
+
*/
|
|
71
|
+
syncRenderTime?: number;
|
|
72
|
+
/**
|
|
73
|
+
* Indicator for if the webpart end up displaying a spinny.
|
|
74
|
+
* This would indicate if the webpart at any point in the life cycle, ended up showing a spinny.
|
|
75
|
+
*/
|
|
76
|
+
isSpinnyShown?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Scneario ID indicates context in which webpart has been loaded.
|
|
79
|
+
*/
|
|
80
|
+
scenarioId?: string;
|
|
81
|
+
/**
|
|
82
|
+
* is MultiGeo will be used to track, if the tenant is a multi geto tenant
|
|
83
|
+
*/
|
|
84
|
+
isMultiGeo?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Time spent by web part waitinng in the Viewport loader queue.
|
|
87
|
+
*/
|
|
88
|
+
viewportWait?: number;
|
|
89
|
+
/**
|
|
90
|
+
* Whether Web part my site cache was hit or miss. N/A in case not applicable
|
|
91
|
+
*/
|
|
92
|
+
mySiteCacheHit?: 'true' | 'false' | 'N/A';
|
|
93
|
+
/**
|
|
94
|
+
* The layout of the webpart. N/A is not applicable (NewsWebPart has layouts such as FilmStrip, Carousel etx)
|
|
95
|
+
*/
|
|
96
|
+
layout?: string;
|
|
97
|
+
/**
|
|
98
|
+
* The data provider of the webpart. N/A is not applicable (NewsWebPart has dataProviders like MyNews, ViewCounts etx)
|
|
99
|
+
*/
|
|
100
|
+
dataProvider?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Potential reason why a cache miss has happened.
|
|
103
|
+
* Ignore this property when mySiteCacheHit is true.
|
|
104
|
+
*/
|
|
105
|
+
cacheMissReason?: _CacheMissReason;
|
|
106
|
+
/**
|
|
107
|
+
* True if it was full page load, false otherwise.
|
|
108
|
+
*/
|
|
109
|
+
isFullPage?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Display name of the current tenant.
|
|
112
|
+
*/
|
|
113
|
+
tenantName?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Whether web part was rendered within viewport or loading was delayed outside viewport.
|
|
116
|
+
*/
|
|
117
|
+
insideViewport?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* List of comma separated experiment and flight ids with status on and off.
|
|
120
|
+
* Example: 90037_Off,90038_On
|
|
121
|
+
*/
|
|
122
|
+
flights?: string;
|
|
123
|
+
/**
|
|
124
|
+
* The store app id if the app came from the store.
|
|
125
|
+
*/
|
|
126
|
+
storeAppId?: string;
|
|
127
|
+
/**
|
|
128
|
+
* Microsoft partner number ID of the component, if provided.
|
|
129
|
+
*/
|
|
130
|
+
mpnId?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Name of the component developer, if provided.
|
|
133
|
+
*/
|
|
134
|
+
componentDeveloperName?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Is this webpart being hosted in a teams context?
|
|
137
|
+
*/
|
|
138
|
+
teamsHosted?: boolean;
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=IWebPartLoadData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IWebPartLoadData.d.ts","sourceRoot":"","sources":["../../src/dataCollector/IWebPartLoadData.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,WAAW;;;;CAId,CAAC;AACX;;;GAGG;AAEH,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAEvE;;GAEG;AAEH,eAAO,MAAM,gBAAgB;IAC3B;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;CAEK,CAAC;AACX;;;GAGG;AAEH,MAAM,MAAM,gBAAgB,GAAG,OAAO,gBAAgB,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAEtF;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC;IAE1C;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,eAAe,CAAC,EAAE,gBAAgB,CAAC;IAEnC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/typedef
|
|
5
|
+
export var CacheStatus = {
|
|
6
|
+
True: 'true',
|
|
7
|
+
False: 'false',
|
|
8
|
+
NotAvailable: 'N/A'
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/typedef
|
|
14
|
+
export var _CacheMissReason = {
|
|
15
|
+
/**
|
|
16
|
+
* Cache was available but config requested has changed.
|
|
17
|
+
*/
|
|
18
|
+
CacheConfigMissmatch: 'CacheConfigMissmatch',
|
|
19
|
+
/**
|
|
20
|
+
* Cache did not arrvie by the time web part requested it.
|
|
21
|
+
*/
|
|
22
|
+
LateFlush: 'LateFlush',
|
|
23
|
+
/**
|
|
24
|
+
* Cache is available but there is no cache entry for the web part.
|
|
25
|
+
*/
|
|
26
|
+
CachedItemNotFound: 'CachedItemNotFound',
|
|
27
|
+
/**
|
|
28
|
+
* Cache is available, config is also good but is too stale for use.
|
|
29
|
+
*/
|
|
30
|
+
CacheExpired: 'CacheExpired',
|
|
31
|
+
/**
|
|
32
|
+
* Cache miss happened but reason is not specified.
|
|
33
|
+
*/
|
|
34
|
+
NotSpecified: 'NotSpecified',
|
|
35
|
+
/**
|
|
36
|
+
* Not Applicable if there was cache hit.
|
|
37
|
+
*/
|
|
38
|
+
NotApplicable: 'N/A'
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=IWebPartLoadData.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { IClientSideWebPartManifest } from '@microsoft/sp-module-interfaces';
|
|
2
|
+
import type { PageContext } from '@microsoft/sp-page-context';
|
|
3
|
+
import { type IWebPartLoadData } from './IWebPartLoadData';
|
|
4
|
+
/**
|
|
5
|
+
* This is used internally to collect web part and adaptive card extension's module load, init, and render performances.
|
|
6
|
+
* This file moved from sp-webpart-base to not additional dependency to sp-adaptive-card-extension-base.
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare class WebPartLoadDataCollector {
|
|
10
|
+
static collect(manifest: IClientSideWebPartManifest<unknown>, webPartTag: string, pageContext: PageContext): IWebPartLoadData;
|
|
11
|
+
private static _getSyncRenderTime;
|
|
12
|
+
private static _getCacheMissReason;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=WebPartLoadDataCollector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebPartLoadDataCollector.d.ts","sourceRoot":"","sources":["../../src/dataCollector/WebPartLoadDataCollector.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAMlF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAoD,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAK7G;;;;GAIG;AACH,qBAAa,wBAAwB;WACrB,OAAO,CACnB,QAAQ,EAAE,0BAA0B,CAAC,OAAO,CAAC,EAC7C,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,WAAW,GACvB,gBAAgB;IA4FnB,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAuBjC,OAAO,CAAC,MAAM,CAAC,mBAAmB;CA0BnC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
// Copyright (c) Microsoft. All rights reserved.
|
|
2
|
+
import { _PerformanceLogger, _PerformanceDataDimensions } from '@msinternal/sp-telemetry';
|
|
3
|
+
import { _CacheMissReason as CacheMissReason, CacheStatus } from './IWebPartLoadData';
|
|
4
|
+
import { _BrowserUtilities } from '@microsoft/sp-core-library';
|
|
5
|
+
var NOT_AVAILABLE = 'N/A';
|
|
6
|
+
/**
|
|
7
|
+
* This is used internally to collect web part and adaptive card extension's module load, init, and render performances.
|
|
8
|
+
* This file moved from sp-webpart-base to not additional dependency to sp-adaptive-card-extension-base.
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
var WebPartLoadDataCollector = /** @class */ (function () {
|
|
12
|
+
function WebPartLoadDataCollector() {
|
|
13
|
+
}
|
|
14
|
+
WebPartLoadDataCollector.collect = function (manifest, webPartTag, pageContext) {
|
|
15
|
+
var getTime = function (key) {
|
|
16
|
+
return (_PerformanceLogger.readComponentBreakdown(webPartTag, key) ||
|
|
17
|
+
_PerformanceLogger.readTempData("".concat(webPartTag, ".").concat(key)));
|
|
18
|
+
};
|
|
19
|
+
var start = getTime('start');
|
|
20
|
+
var moduleLoaded = getTime('modulesLoaded');
|
|
21
|
+
var initialized = getTime('init');
|
|
22
|
+
var end = getTime('end');
|
|
23
|
+
var isSpinnyShown = !!getTime('displaySpinner');
|
|
24
|
+
var isMultiGeo = Boolean(pageContext && pageContext.legacyPageContext && pageContext.legacyPageContext.isMultiGeoTenant);
|
|
25
|
+
var dataProvider = NOT_AVAILABLE;
|
|
26
|
+
var layoutID = NOT_AVAILABLE;
|
|
27
|
+
var webPartCacheHit = CacheStatus.NotAvailable;
|
|
28
|
+
var cacheMissReason = CacheMissReason.NotApplicable;
|
|
29
|
+
// Collect data for first-party web parts only. This ideally should be done outside of spfx.
|
|
30
|
+
// VSO#855246 Refactor WebPartLoadDataCollector to move out first-party only logging logic.
|
|
31
|
+
if (manifest.isInternal) {
|
|
32
|
+
var cacheHit = getTime('CacheHit');
|
|
33
|
+
var cacheMiss = getTime('CacheMiss');
|
|
34
|
+
var prefetechedData = getTime('prefetchedData');
|
|
35
|
+
var isCacheApplicable = Boolean(cacheHit || cacheMiss);
|
|
36
|
+
webPartCacheHit = isCacheApplicable
|
|
37
|
+
? cacheHit
|
|
38
|
+
? CacheStatus.True
|
|
39
|
+
: CacheStatus.False
|
|
40
|
+
: CacheStatus.NotAvailable;
|
|
41
|
+
cacheMissReason = WebPartLoadDataCollector._getCacheMissReason(cacheHit, getTime);
|
|
42
|
+
var dataProviderTime_1 = _PerformanceLogger.now();
|
|
43
|
+
var layoutKey_1 = _PerformanceDataDimensions.Layout;
|
|
44
|
+
var dataProviderKey_1 = _PerformanceDataDimensions.DataProvider;
|
|
45
|
+
var perfBreakDown_1 = _PerformanceLogger.readFullEUPLBreakDown();
|
|
46
|
+
// WebParts which have different layouts and dataproviders, will have perf marks such as
|
|
47
|
+
// webPartTag.dataProvider: [dataProviderName]
|
|
48
|
+
// webPartTag.Layout: [Layout]
|
|
49
|
+
// The logic below will extract the data provider and layout, and log them for perf measurements.
|
|
50
|
+
Object.keys(perfBreakDown_1).forEach(function (key) {
|
|
51
|
+
if (key.indexOf(webPartTag) > -1) {
|
|
52
|
+
// We only have 1 layout
|
|
53
|
+
if (layoutID === NOT_AVAILABLE && key.indexOf(layoutKey_1) > -1) {
|
|
54
|
+
layoutID = key.split(layoutKey_1)[1];
|
|
55
|
+
// Focus on primary data provider
|
|
56
|
+
}
|
|
57
|
+
else if (key.indexOf(dataProviderKey_1) > -1) {
|
|
58
|
+
// Pick earliest data provider, in case there are multiple
|
|
59
|
+
if (dataProvider === NOT_AVAILABLE || perfBreakDown_1[key] < dataProviderTime_1) {
|
|
60
|
+
dataProvider = key.split(dataProviderKey_1)[1];
|
|
61
|
+
dataProviderTime_1 = perfBreakDown_1[key];
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
dataProvider = prefetechedData ? 'Prefetch' : dataProvider;
|
|
67
|
+
}
|
|
68
|
+
var webpartPerfFlights = _PerformanceLogger.getWebpartFlightsAndExperiments(webPartTag);
|
|
69
|
+
var syncRenderTime = this._getSyncRenderTime(layoutID, getTime);
|
|
70
|
+
var retVal = {
|
|
71
|
+
alias: manifest.alias,
|
|
72
|
+
isMultiGeo: isMultiGeo,
|
|
73
|
+
isInternal: manifest.isInternal,
|
|
74
|
+
isSpinnyShown: isSpinnyShown,
|
|
75
|
+
manifestId: manifest.id,
|
|
76
|
+
moduleLoadTime: Math.floor(moduleLoaded - start),
|
|
77
|
+
initTime: Math.floor(initialized - moduleLoaded),
|
|
78
|
+
renderTime: Math.floor(end - initialized),
|
|
79
|
+
syncRenderTime: syncRenderTime,
|
|
80
|
+
scenarioId: _PerformanceLogger.getScenarioId(),
|
|
81
|
+
isFullPage: _PerformanceLogger.fullPageLoad,
|
|
82
|
+
dataProvider: dataProvider,
|
|
83
|
+
layout: layoutID,
|
|
84
|
+
mySiteCacheHit: webPartCacheHit,
|
|
85
|
+
cacheMissReason: cacheMissReason,
|
|
86
|
+
flights: webpartPerfFlights,
|
|
87
|
+
storeAppId: manifest.storeAppId,
|
|
88
|
+
mpnId: manifest.mpnId,
|
|
89
|
+
componentDeveloperName: manifest.componentDeveloperName
|
|
90
|
+
};
|
|
91
|
+
retVal.teamsHosted = _BrowserUtilities.isTeamsHosted();
|
|
92
|
+
return retVal;
|
|
93
|
+
};
|
|
94
|
+
WebPartLoadDataCollector._getSyncRenderTime = function (layoutID, getTime) {
|
|
95
|
+
var syncRenderTime = undefined;
|
|
96
|
+
syncRenderTime = Math.floor(getTime('syncRender') - getTime('getDataComplete'));
|
|
97
|
+
var postRenderCompleteTime = getTime('postRenderComplete');
|
|
98
|
+
var loadLayoutEnd = getTime('loadLayoutEnd');
|
|
99
|
+
var syncLayoutRenderComplete = getTime('syncLayoutRenderComplete');
|
|
100
|
+
if (loadLayoutEnd && syncLayoutRenderComplete) {
|
|
101
|
+
// render layout and items inside it
|
|
102
|
+
syncRenderTime = Math.floor(syncRenderTime + (syncLayoutRenderComplete - loadLayoutEnd));
|
|
103
|
+
}
|
|
104
|
+
if (postRenderCompleteTime) {
|
|
105
|
+
syncRenderTime = Math.floor(
|
|
106
|
+
// transposeRow + transposeItems + render + syncPostRender
|
|
107
|
+
syncRenderTime + (postRenderCompleteTime - getTime(_PerformanceDataDimensions.Layout + layoutID)));
|
|
108
|
+
}
|
|
109
|
+
return syncRenderTime;
|
|
110
|
+
};
|
|
111
|
+
WebPartLoadDataCollector._getCacheMissReason = function (cacheHit, getTime) {
|
|
112
|
+
if (cacheHit) {
|
|
113
|
+
return CacheMissReason.NotApplicable;
|
|
114
|
+
}
|
|
115
|
+
var mySiteCacheMissOnConfgMismatch = !!getTime('CacheMissConfigMismatch');
|
|
116
|
+
var mySiteCacheMissOnLateFlush = !!getTime('LateFlush');
|
|
117
|
+
var cachedWebPartNotFound = !!getTime('CachedWebPartNotFound');
|
|
118
|
+
var cacheExpired = !!getTime('CacheExpired');
|
|
119
|
+
var cacheMissReason = CacheMissReason.NotSpecified;
|
|
120
|
+
if (mySiteCacheMissOnConfgMismatch) {
|
|
121
|
+
cacheMissReason = CacheMissReason.CacheConfigMissmatch;
|
|
122
|
+
}
|
|
123
|
+
else if (mySiteCacheMissOnLateFlush) {
|
|
124
|
+
cacheMissReason = CacheMissReason.LateFlush;
|
|
125
|
+
}
|
|
126
|
+
else if (cachedWebPartNotFound) {
|
|
127
|
+
cacheMissReason = CacheMissReason.CachedItemNotFound;
|
|
128
|
+
}
|
|
129
|
+
else if (cacheExpired) {
|
|
130
|
+
cacheMissReason = CacheMissReason.CacheExpired;
|
|
131
|
+
}
|
|
132
|
+
return cacheMissReason;
|
|
133
|
+
};
|
|
134
|
+
return WebPartLoadDataCollector;
|
|
135
|
+
}());
|
|
136
|
+
export { WebPartLoadDataCollector };
|
|
137
|
+
//# sourceMappingURL=WebPartLoadDataCollector.js.map
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SharePoint Framework support for building client-side components
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* This package supports development of client-side components (e.g. web parts,
|
|
6
|
+
* client-side extensions, and applications) built using the SharePoint Framework.
|
|
7
|
+
* It defines the base classes and interfaces for functionality that is
|
|
8
|
+
* common across all client-side component types.
|
|
9
|
+
*
|
|
10
|
+
* @packagedocumentation
|
|
11
|
+
*/
|
|
12
|
+
export { default as BaseComponent } from './BaseComponent';
|
|
13
|
+
export { default as BaseComponentContext, type IComponentContextParameters as _IComponentContextParameters } from './BaseComponentContext';
|
|
14
|
+
export { default as DynamicDataProvider } from './DynamicDataProvider';
|
|
15
|
+
export { default as DynamicDataSourceManager } from './DynamicDataSourceManager';
|
|
16
|
+
export { default as DynamicProperty } from './DynamicProperty';
|
|
17
|
+
export { default as _LegacyThirdPartyFabricCoreLoader } from './LegacyThirdPartyFabricCoreLoader';
|
|
18
|
+
export type { IComponentPropertyMetadata } from './IComponentPropertyMetadata';
|
|
19
|
+
export { PropertyMetadataProcessor as _PropertyMetadataProcessor } from './PropertyMetadataProcessor';
|
|
20
|
+
export { type ISerializedServerProcessedData, ServerProcessedDataType } from './ISerializedServerProcessedData';
|
|
21
|
+
export type { IFontStyles, IReadonlyFontStyles, IRawStyle, IReadonlyRawStyle } from './themeProvider/themeInterfaces/IFontStyles';
|
|
22
|
+
export type { IPalette } from './themeProvider/themeInterfaces/IPalette';
|
|
23
|
+
export type { ISemanticTextColors } from './themeProvider/themeInterfaces/ISemanticTextColors';
|
|
24
|
+
export type { ISemanticColors } from './themeProvider/themeInterfaces/ISemanticColors';
|
|
25
|
+
export type { IReadonlyTheme, ITheme } from './themeProvider/themeInterfaces/ITheme';
|
|
26
|
+
export { ThemeChangedEventArgs, ThemeProvider } from './themeProvider/ThemeProvider';
|
|
27
|
+
export { default as _ShimmerFactory } from './ShimmerFactory';
|
|
28
|
+
export { ensureIsolatedDomainUrl as _ensureIsolatedDomainUrl } from './EnsureIsolatedDomainUrl';
|
|
29
|
+
export { WebPartLoadDataCollector as _WebPartLoadDataCollector } from './dataCollector/WebPartLoadDataCollector';
|
|
30
|
+
export { type IWebPartLoadData as _IWebPartLoadData, _CacheMissReason } from './dataCollector/IWebPartLoadData';
|
|
31
|
+
export type { IComponentPosition as _IComponentPosition } from './IComponentPosition';
|
|
32
|
+
export type { ITeamsAppComponent as _ITeamsAppComponent, ITeamsAppComponentId as _ITeamsAppComponentId, TeamsAppsClient as _TeamsAppsClient } from './teams/TeamsAppsClient';
|
|
33
|
+
export { DeferredTeamsAppsClient as _DeferredTeamsAppsClient } from './teams/DeferredTeamsAppsClient';
|
|
34
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EACL,OAAO,IAAI,oBAAoB,EAC/B,KAAK,2BAA2B,IAAI,4BAA4B,EACjE,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEvE,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEjF,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,OAAO,IAAI,iCAAiC,EAAE,MAAM,oCAAoC,CAAC;AAElG,YAAY,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE/E,OAAO,EAAE,yBAAyB,IAAI,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAEtG,OAAO,EACL,KAAK,8BAA8B,EACnC,uBAAuB,EACxB,MAAM,kCAAkC,CAAC;AAE1C,YAAY,EACV,WAAW,EACX,mBAAmB,EACnB,SAAS,EACT,iBAAiB,EAClB,MAAM,6CAA6C,CAAC;AAErD,YAAY,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AAEzE,YAAY,EAAE,mBAAmB,EAAE,MAAM,qDAAqD,CAAC;AAE/F,YAAY,EAAE,eAAe,EAAE,MAAM,iDAAiD,CAAC;AAEvF,YAAY,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,wCAAwC,CAAC;AAErF,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAGrF,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAE9D,OAAO,EAAE,uBAAuB,IAAI,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAEhG,OAAO,EAAE,wBAAwB,IAAI,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAEjH,OAAO,EACL,KAAK,gBAAgB,IAAI,iBAAiB,EAC1C,gBAAgB,EACjB,MAAM,kCAAkC,CAAC;AAE1C,YAAY,EAAE,kBAAkB,IAAI,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEtF,YAAY,EACV,kBAAkB,IAAI,mBAAmB,EACzC,oBAAoB,IAAI,qBAAqB,EAC7C,eAAe,IAAI,gBAAgB,EACpC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,uBAAuB,IAAI,wBAAwB,EAAE,MAAM,iCAAiC,CAAC"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SharePoint Framework support for building client-side components
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* This package supports development of client-side components (e.g. web parts,
|
|
6
|
+
* client-side extensions, and applications) built using the SharePoint Framework.
|
|
7
|
+
* It defines the base classes and interfaces for functionality that is
|
|
8
|
+
* common across all client-side component types.
|
|
9
|
+
*
|
|
10
|
+
* @packagedocumentation
|
|
11
|
+
*/
|
|
12
|
+
export { default as BaseComponent } from './BaseComponent';
|
|
13
|
+
export { default as BaseComponentContext } from './BaseComponentContext';
|
|
14
|
+
export { default as DynamicDataProvider } from './DynamicDataProvider';
|
|
15
|
+
export { default as DynamicDataSourceManager } from './DynamicDataSourceManager';
|
|
16
|
+
export { default as DynamicProperty } from './DynamicProperty';
|
|
17
|
+
export { default as _LegacyThirdPartyFabricCoreLoader } from './LegacyThirdPartyFabricCoreLoader';
|
|
18
|
+
export { PropertyMetadataProcessor as _PropertyMetadataProcessor } from './PropertyMetadataProcessor';
|
|
19
|
+
export { ServerProcessedDataType } from './ISerializedServerProcessedData';
|
|
20
|
+
export { ThemeChangedEventArgs, ThemeProvider } from './themeProvider/ThemeProvider';
|
|
21
|
+
// ShimmerFactory
|
|
22
|
+
export { default as _ShimmerFactory } from './ShimmerFactory';
|
|
23
|
+
export { ensureIsolatedDomainUrl as _ensureIsolatedDomainUrl } from './EnsureIsolatedDomainUrl';
|
|
24
|
+
export { WebPartLoadDataCollector as _WebPartLoadDataCollector } from './dataCollector/WebPartLoadDataCollector';
|
|
25
|
+
export { _CacheMissReason } from './dataCollector/IWebPartLoadData';
|
|
26
|
+
export { DeferredTeamsAppsClient as _DeferredTeamsAppsClient } from './teams/DeferredTeamsAppsClient';
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// This file was generated by a tool. Modifying it will produce unexpected behavior
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface IStrings {
|
|
7
|
+
/**
|
|
8
|
+
* [Tag:ODSP-SPPPLAT-ComponentBase]{Locked} Error when the Source has already been initialized.
|
|
9
|
+
*/
|
|
10
|
+
'SourceAlreadyInitialized': string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* [Tag:ODSP-SPPPLAT-ComponentBase]{Locked} Error when there is no sendData api defined when the allowedEvents returns a non-empty value.
|
|
14
|
+
*/
|
|
15
|
+
'NoSendEventWhenAllowedEventsIsNonEmpty': string;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* [Tag:ODSP-SPPPLAT-ComponentBase]{Locked} Error when someone calls DynamicDataSourceManager after it has been disposed.
|
|
19
|
+
*/
|
|
20
|
+
'DynamicDataSourceManagerIsDisposed': string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* [Tag:ODSP-SPPPLAT-ComponentBase]{Locked} Error when someone calls DynamicDataSourceManager before it is initialized.
|
|
24
|
+
*/
|
|
25
|
+
'DynamicDataSourceManagerIsNotInitialized': string;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* [Tag:ODSP-SPPPLAT-ComponentBase]{Locked} Error when someone calls DynamicDataSource before it is initialized.
|
|
29
|
+
*/
|
|
30
|
+
'DynamicDataSourceIsNotInitialized': string;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* [Tag:ODSP-SPPPLAT-ComponentBase]{Locked} Error when someone calls DynamicDataSource before it is initialized. {0} is the event name and {1} is the source title.
|
|
34
|
+
*/
|
|
35
|
+
'InvalidEvent': string;
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
declare const strings: IStrings;
|
|
43
|
+
|
|
44
|
+
export default strings;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"SourceAlreadyInitialized":"Source has already been initialized.","NoSendEventWhenAllowedEventsIsNonEmpty":"\"sendEvent()\" must be defined, when the \"allowedEvents()\" returns a non-empty value.","DynamicDataSourceManagerIsDisposed":"Dynamic Data Source Manager has been disposed.","DynamicDataSourceManagerIsNotInitialized":"Dynamic Data Source Manager has not been initialized.","DynamicDataSourceIsNotInitialized":"Dynamic Data Source has not been initialized.","InvalidEvent":"\"{0}\" event is not allowed on the source \"{1}\""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/spfx/client-side-component-manifest.schema.json",
|
|
3
|
+
|
|
4
|
+
"id": "467dc675-7cc5-4709-8aac-78e3b71bd2f6",
|
|
5
|
+
"alias": "SPComponentBase",
|
|
6
|
+
"componentType": "Library",
|
|
7
|
+
"version": "*",
|
|
8
|
+
"manifestVersion": 2
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ServiceKey, type ServiceScope } from '@microsoft/sp-core-library';
|
|
2
|
+
import type { TeamsAppsClient } from './TeamsAppsClient';
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare class DeferredTeamsAppsClient {
|
|
7
|
+
/**
|
|
8
|
+
* The service key for DeferredTeamsAppsClient.
|
|
9
|
+
*/
|
|
10
|
+
static readonly serviceKey: ServiceKey<DeferredTeamsAppsClient>;
|
|
11
|
+
private _teamsAppsClientPromise;
|
|
12
|
+
private _teamsAppsClient;
|
|
13
|
+
private _serviceScope;
|
|
14
|
+
constructor(serviceScope: ServiceScope);
|
|
15
|
+
getClient(): Promise<TeamsAppsClient>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=DeferredTeamsAppsClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeferredTeamsAppsClient.d.ts","sourceRoot":"","sources":["../../src/teams/DeferredTeamsAppsClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;GAEG;AACH,qBAAa,uBAAuB;IAClC;;OAEG;IACH,gBAAuB,UAAU,EAAE,UAAU,CAAC,uBAAuB,CAAC,CACwB;IAE9F,OAAO,CAAC,uBAAuB,CAAuC;IACtE,OAAO,CAAC,gBAAgB,CAA8B;IACtD,OAAO,CAAC,aAAa,CAAe;gBAEjB,YAAY,EAAE,YAAY;IAItC,SAAS,IAAI,OAAO,CAAC,eAAe,CAAC;CAqB7C"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ServiceKey } from '@microsoft/sp-core-library';
|
|
2
|
+
import { _QosMonitor } from '@microsoft/sp-diagnostics';
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
var DeferredTeamsAppsClient = /** @class */ (function () {
|
|
7
|
+
function DeferredTeamsAppsClient(serviceScope) {
|
|
8
|
+
this._serviceScope = serviceScope;
|
|
9
|
+
}
|
|
10
|
+
DeferredTeamsAppsClient.prototype.getClient = function () {
|
|
11
|
+
var _this = this;
|
|
12
|
+
if (this._teamsAppsClient) {
|
|
13
|
+
return Promise.resolve(this._teamsAppsClient);
|
|
14
|
+
}
|
|
15
|
+
if (!this._teamsAppsClientPromise) {
|
|
16
|
+
var loadMonitor_1 = new _QosMonitor('DeferredTeamsAppsClient.LoadTeamsAppClient');
|
|
17
|
+
this._teamsAppsClientPromise = import(/* webpackChunkName: 'teams-apps-client' */ './TeamsAppsClient')
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
19
|
+
.then(function (_a) {
|
|
20
|
+
var TeamsAppsClient = _a.TeamsAppsClient;
|
|
21
|
+
_this._teamsAppsClient = new TeamsAppsClient(_this._serviceScope);
|
|
22
|
+
loadMonitor_1.writeSuccess();
|
|
23
|
+
return _this._teamsAppsClient;
|
|
24
|
+
})
|
|
25
|
+
.catch(function (error) {
|
|
26
|
+
loadMonitor_1.writeUnexpectedFailure(undefined, error);
|
|
27
|
+
throw error;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return this._teamsAppsClientPromise;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* The service key for DeferredTeamsAppsClient.
|
|
34
|
+
*/
|
|
35
|
+
DeferredTeamsAppsClient.serviceKey = ServiceKey.create('sp-teams-apps-client', DeferredTeamsAppsClient);
|
|
36
|
+
return DeferredTeamsAppsClient;
|
|
37
|
+
}());
|
|
38
|
+
export { DeferredTeamsAppsClient };
|
|
39
|
+
//# sourceMappingURL=DeferredTeamsAppsClient.js.map
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Top level teams app item in app catalogs fetched using the Graph API.
|
|
3
|
+
*
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export interface ITeamsAppCatalogItem {
|
|
7
|
+
appDefinitions: ITeamsAppDefinition[];
|
|
8
|
+
displayName: string;
|
|
9
|
+
distributionMethod: string;
|
|
10
|
+
externalId: string | null;
|
|
11
|
+
id: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export interface ITeamsAppDefinition {
|
|
17
|
+
bot: ITeamsBot;
|
|
18
|
+
dashboardCards?: ITeamsDashboardCard[];
|
|
19
|
+
description: string;
|
|
20
|
+
displayName: string;
|
|
21
|
+
id: string;
|
|
22
|
+
outlineIcon: ITeamsAppIcon | null;
|
|
23
|
+
colorIcon: ITeamsAppIcon | null;
|
|
24
|
+
teamsAppId: string;
|
|
25
|
+
version: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
export interface ITeamsDashboardCard {
|
|
31
|
+
id: string;
|
|
32
|
+
displayName: string;
|
|
33
|
+
description: string;
|
|
34
|
+
pickerGroupId: string;
|
|
35
|
+
defaultSize: string;
|
|
36
|
+
contentSource: ITeamsDashboardCardContentSource;
|
|
37
|
+
icon?: ITeamsDashboardCardIcon;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
export interface ITeamsDashboardCardIcon {
|
|
43
|
+
iconUrl?: string;
|
|
44
|
+
officeUIFabricIconName?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
export interface ITeamsDashboardCardContentSource {
|
|
50
|
+
sourceType: 'bot';
|
|
51
|
+
botConfiguration?: ITeamsDashboardCardBotConfiguration;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
export interface ITeamsDashboardCardBotConfiguration {
|
|
57
|
+
botId: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
export interface ITeamsBot {
|
|
63
|
+
id: string;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
export interface ITeamsAppIcon {
|
|
69
|
+
id: string;
|
|
70
|
+
webUrl: string;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=ITeamsAppCatalog.d.ts.map
|