@microsoft/sp-component-base 1.14.0 → 1.15.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/467dc675-7cc5-4709-8aac-78e3b71bd2f6.manifest.json +77 -72
- package/dist/chunk.legacy-third-party-fabric-core-localfont_none_a519719afeb8d3624a6c.js +1 -0
- package/dist/index-internal-beta.d.ts +13 -6
- package/dist/index-internal-public.d.ts +13 -6
- package/dist/index-internal.d.ts +13 -6
- package/dist/sp-component-base_default_97a85e790de1a99c0fc6.js +1 -0
- package/dist/sp-component-base_en-us_97a85e790de1a99c0fc6.js +1 -0
- package/dist/sp-component-base_qps-ploc_97a85e790de1a99c0fc6.js +1 -0
- package/dist/sp-component-base_qps-ploca_97a85e790de1a99c0fc6.js +1 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/lib-commonjs/BaseComponent.js +2 -2
- package/lib-commonjs/DynamicDataSourceManager.js +8 -10
- package/lib-commonjs/DynamicProperty.js +21 -3
- package/lib-commonjs/EnsureIsolatedDomainUrl.js +1 -1
- package/lib-commonjs/LegacyThirdPartyFabricCoreLoader.js +6 -2
- package/lib-commonjs/PropertyMetadataProcessor.js +22 -8
- package/lib-commonjs/ShimmerFactory.js +2 -2
- package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/_Icon.Definitions.scss +3 -3
- package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/variables/_BrandIcon.Variables.scss +2 -2
- package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/variables/_Font.Variables.scss +1 -1
- package/lib-commonjs/chunks/legacy-third-party-fabric-core/iconDefinitions.css +3 -3
- package/lib-commonjs/dataCollector/IWebPartLoadData.js +8 -0
- package/lib-commonjs/dataCollector/WebPartLoadDataCollector.js +139 -0
- package/lib-commonjs/index.js +13 -7
- package/lib-commonjs/test-api/index.js +1 -0
- package/package.json +11 -11
- package/dist/chunk.legacy-third-party-fabric-core-localfont_none_99c6fc3c6a2dea12779c.js +0 -1
- package/dist/sp-component-base_default_f510dfc265b8222fa720.js +0 -1
- package/dist/sp-component-base_en-us_f510dfc265b8222fa720.js +0 -1
- package/dist/sp-component-base_qps-ploc_f510dfc265b8222fa720.js +0 -1
- package/dist/sp-component-base_qps-ploca_f510dfc265b8222fa720.js +0 -1
|
@@ -18,7 +18,7 @@ var BaseComponent = /** @class */ (function () {
|
|
|
18
18
|
* @internal
|
|
19
19
|
*/
|
|
20
20
|
get: function () {
|
|
21
|
-
return this.manifest.componentType
|
|
21
|
+
return "".concat(this.manifest.componentType, ".").concat(this.manifest.id, ".").concat(this.instanceId);
|
|
22
22
|
},
|
|
23
23
|
enumerable: false,
|
|
24
24
|
configurable: true
|
|
@@ -90,7 +90,7 @@ var BaseComponent = /** @class */ (function () {
|
|
|
90
90
|
});
|
|
91
91
|
Object.defineProperty(BaseComponent.prototype, "componentId", {
|
|
92
92
|
/**
|
|
93
|
-
* Returns the component identifier as defined in the component
|
|
93
|
+
* Returns the component identifier as defined in the component's associated manifest.
|
|
94
94
|
*
|
|
95
95
|
* @remarks
|
|
96
96
|
* Each client-side component has an associated manifest that is used by the sp-loader to load its scripts,
|
|
@@ -132,7 +132,7 @@ var DynamicDataSourceManager = /** @class */ (function () {
|
|
|
132
132
|
metadata.alias = undefined;
|
|
133
133
|
metadata.componentId = undefined;
|
|
134
134
|
metadata.instanceId = undefined;
|
|
135
|
-
sp_lodash_subset_1.merge(this._src.metadata, metadata);
|
|
135
|
+
(0, sp_lodash_subset_1.merge)(this._src.metadata, metadata);
|
|
136
136
|
};
|
|
137
137
|
Object.defineProperty(DynamicDataSourceManager.prototype, "sourceId", {
|
|
138
138
|
/**
|
|
@@ -174,7 +174,7 @@ var DynamicDataSourceManager = /** @class */ (function () {
|
|
|
174
174
|
*/
|
|
175
175
|
DynamicDataSourceManager.prototype._allowedEvents = function () {
|
|
176
176
|
return this._callableFunctions.allowedEvents
|
|
177
|
-
? sp_lodash_subset_1.cloneDeep(this._callableFunctions.allowedEvents())
|
|
177
|
+
? (0, sp_lodash_subset_1.cloneDeep)(this._callableFunctions.allowedEvents())
|
|
178
178
|
: undefined;
|
|
179
179
|
};
|
|
180
180
|
/**
|
|
@@ -193,7 +193,7 @@ var DynamicDataSourceManager = /** @class */ (function () {
|
|
|
193
193
|
* This assumes that the component has dynamic data and has a controller.
|
|
194
194
|
*/
|
|
195
195
|
DynamicDataSourceManager.prototype._getPropertyDefinitions = function () {
|
|
196
|
-
return sp_lodash_subset_1.cloneDeep(this._callableFunctions.getPropertyDefinitions());
|
|
196
|
+
return (0, sp_lodash_subset_1.cloneDeep)(this._callableFunctions.getPropertyDefinitions());
|
|
197
197
|
};
|
|
198
198
|
/**
|
|
199
199
|
* This is the getPropertyValue() that the DynamicDataSource actually exposes.
|
|
@@ -228,12 +228,11 @@ var DynamicDataSourceManager = /** @class */ (function () {
|
|
|
228
228
|
0 &&
|
|
229
229
|
this._src // Check that the source exists to get its title
|
|
230
230
|
) {
|
|
231
|
-
throw new Error("Property \""
|
|
231
|
+
throw new Error("Property \"".concat(propertyId, "\" doesn't exist in source \"").concat(this._src.metadata.title, "\""));
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
qosMonitor.writeSuccess(tslib_1.__assign(tslib_1.__assign({}, ((this._src && this._src.metadata) || {})), { sourceId: this._src && this._src.id, propertyValue: propertyValue,
|
|
235
|
-
|
|
236
|
-
return sp_lodash_subset_1.cloneDeep(propertyValue);
|
|
234
|
+
qosMonitor.writeSuccess(tslib_1.__assign(tslib_1.__assign({}, ((this._src && this._src.metadata) || {})), { sourceId: this._src && this._src.id, propertyValue: propertyValue, propertyId: propertyId }));
|
|
235
|
+
return (0, sp_lodash_subset_1.cloneDeep)(propertyValue);
|
|
237
236
|
}
|
|
238
237
|
catch (error) {
|
|
239
238
|
qosMonitor.writeUnexpectedFailure('NoPropertyId', error, { propertyId: propertyId });
|
|
@@ -294,8 +293,7 @@ var DynamicDataSourceManager = /** @class */ (function () {
|
|
|
294
293
|
annotatedPropertyValue = annotatedPropertyValue[paths[0]];
|
|
295
294
|
}
|
|
296
295
|
}
|
|
297
|
-
qosMonitor.writeSuccess(tslib_1.__assign(tslib_1.__assign({}, ((this._src && this._src.metadata) || {})), { sourceId: this._src && this._src.id, annotatedPropertyValue: annotatedPropertyValue,
|
|
298
|
-
propertyId: propertyId }));
|
|
296
|
+
qosMonitor.writeSuccess(tslib_1.__assign(tslib_1.__assign({}, ((this._src && this._src.metadata) || {})), { sourceId: this._src && this._src.id, annotatedPropertyValue: annotatedPropertyValue, propertyId: propertyId }));
|
|
299
297
|
}
|
|
300
298
|
catch (error) {
|
|
301
299
|
qosMonitor.writeExpectedFailure('NoAnnotatedPropertyValue', error, { annotatedPropertyValue: annotatedPropertyValue });
|
|
@@ -348,7 +346,7 @@ var DynamicDataSourceManager = /** @class */ (function () {
|
|
|
348
346
|
* @param eventName - Name of the event.
|
|
349
347
|
*/
|
|
350
348
|
DynamicDataSourceManager.prototype._assertValidEvent = function (eventName) {
|
|
351
|
-
if (!this._allowedEvents() || sp_lodash_subset_1.findIndex(this._allowedEvents(), { name: eventName }) === -1) {
|
|
349
|
+
if (!this._allowedEvents() || (0, sp_lodash_subset_1.findIndex)(this._allowedEvents(), { name: eventName }) === -1) {
|
|
352
350
|
throw new Error(sp_core_library_1.Text.format(strings.InvalidEvent, eventName, this._src.metadata.title));
|
|
353
351
|
}
|
|
354
352
|
};
|
|
@@ -175,7 +175,13 @@ var DynamicProperty = /** @class */ (function () {
|
|
|
175
175
|
* undefined if the source or the data doesn't exist.
|
|
176
176
|
*/
|
|
177
177
|
DynamicProperty.prototype.tryGetValue = function () {
|
|
178
|
-
|
|
178
|
+
if (this.isDisposed &&
|
|
179
|
+
!sp_core_library_1._SPKillSwitch.isActivated('413769dc-5e0c-4609-9c86-bdf099fe84e3' /*, '12/02/2021', 'DisposedUndefinedNotException'*/)) {
|
|
180
|
+
return undefined;
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
sp_core_library_1.Validate.isNotDisposed(this, 'DynamicData');
|
|
184
|
+
}
|
|
179
185
|
var value = this._getData();
|
|
180
186
|
if (Array.isArray(value)) {
|
|
181
187
|
value = value[0];
|
|
@@ -219,7 +225,13 @@ var DynamicProperty = /** @class */ (function () {
|
|
|
219
225
|
* Returns undefined if the source doesn't exist.
|
|
220
226
|
*/
|
|
221
227
|
DynamicProperty.prototype.tryGetSource = function () {
|
|
222
|
-
|
|
228
|
+
if (this.isDisposed &&
|
|
229
|
+
!sp_core_library_1._SPKillSwitch.isActivated('413769dc-5e0c-4609-9c86-bdf099fe84e3' /*, '12/02/2021', 'DisposedUndefinedNotException'*/)) {
|
|
230
|
+
return undefined;
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
sp_core_library_1.Validate.isNotDisposed(this, 'DynamicData');
|
|
234
|
+
}
|
|
223
235
|
return this._hasValue ? undefined : this._provider.tryGetSource(this._sourceId);
|
|
224
236
|
};
|
|
225
237
|
/**
|
|
@@ -354,7 +366,13 @@ var DynamicProperty = /** @class */ (function () {
|
|
|
354
366
|
}
|
|
355
367
|
};
|
|
356
368
|
DynamicProperty.prototype._getData = function () {
|
|
357
|
-
|
|
369
|
+
if (this.isDisposed &&
|
|
370
|
+
!sp_core_library_1._SPKillSwitch.isActivated('413769dc-5e0c-4609-9c86-bdf099fe84e3' /*, '12/02/2021', 'DisposedUndefinedNotException'*/)) {
|
|
371
|
+
return undefined;
|
|
372
|
+
}
|
|
373
|
+
else {
|
|
374
|
+
sp_core_library_1.Validate.isNotDisposed(this, 'DynamicData');
|
|
375
|
+
}
|
|
358
376
|
var value;
|
|
359
377
|
try {
|
|
360
378
|
value = this._hasValue ? this._value : this._provider._getData(this._reference);
|
|
@@ -19,7 +19,7 @@ function ensureIsolatedDomainUrl(isolatedDomain, absoluteUrl) {
|
|
|
19
19
|
absoluteUrl = absoluteUrl + '/';
|
|
20
20
|
slashAdded = true;
|
|
21
21
|
}
|
|
22
|
-
absoluteUrl = absoluteUrl.replace(domainRegex, "https://"
|
|
22
|
+
absoluteUrl = absoluteUrl.replace(domainRegex, "https://".concat(isolatedDomain, "/"));
|
|
23
23
|
if (slashAdded) {
|
|
24
24
|
// Remove the ending slash
|
|
25
25
|
absoluteUrl = absoluteUrl.substr(0, absoluteUrl.length - 1);
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
14
18
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
19
|
if (mod && mod.__esModule) return mod;
|
|
16
20
|
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
22
|
__setModuleDefault(result, mod);
|
|
19
23
|
return result;
|
|
20
24
|
};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PropertyMetadataProcessor = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
|
+
var sp_core_library_1 = require("@microsoft/sp-core-library");
|
|
5
6
|
var lodash = tslib_1.__importStar(require("@microsoft/sp-lodash-subset"));
|
|
6
7
|
/**
|
|
7
8
|
* The processor to serialize and deserialize the server processed content and component properties
|
|
@@ -54,7 +55,7 @@ var PropertyMetadataProcessor = /** @class */ (function () {
|
|
|
54
55
|
// Build custom metadata for the given property path
|
|
55
56
|
var customMetadata_1 = {};
|
|
56
57
|
if (metadata && metadata.customMetadata) {
|
|
57
|
-
|
|
58
|
+
var _loop_1 = function (propName) {
|
|
58
59
|
/* tslint:disable-line:forin */
|
|
59
60
|
var customMetadataPropPath = metadata.customMetadata[propName];
|
|
60
61
|
if (iteration !== undefined && customMetadataPropPath.indexOf('*') !== -1) {
|
|
@@ -67,10 +68,18 @@ var PropertyMetadataProcessor = /** @class */ (function () {
|
|
|
67
68
|
var customValue = lodash.get(properties, fixedPropPath);
|
|
68
69
|
if (serverProcessedContent && customValue !== undefined) {
|
|
69
70
|
// Insert custom metadata key and value
|
|
70
|
-
|
|
71
|
+
if (isFixCustomMetadataKeyKillSwitchActivated()) {
|
|
72
|
+
customMetadata_1[fixedPropPath] = customValue;
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
customMetadata_1[propName] = customValue;
|
|
76
|
+
}
|
|
71
77
|
}
|
|
72
78
|
}
|
|
73
79
|
});
|
|
80
|
+
};
|
|
81
|
+
for (var propName in metadata.customMetadata) {
|
|
82
|
+
_loop_1(propName);
|
|
74
83
|
}
|
|
75
84
|
}
|
|
76
85
|
if (!serverProcessedContent.customMetadata) {
|
|
@@ -148,7 +157,7 @@ var PropertyMetadataProcessor = /** @class */ (function () {
|
|
|
148
157
|
*/
|
|
149
158
|
PropertyMetadataProcessor._forEachPropertyWithMetaData = function (propertiesMetadata, properties, metadataProcessor) {
|
|
150
159
|
if (propertiesMetadata) {
|
|
151
|
-
var
|
|
160
|
+
var _loop_2 = function (propPath) {
|
|
152
161
|
/* tslint:disable-line:forin */
|
|
153
162
|
var metadata = propertiesMetadata[propPath];
|
|
154
163
|
this_1._validateAndIteratePath(propPath, properties, function (fixedPropPath, index) {
|
|
@@ -157,7 +166,7 @@ var PropertyMetadataProcessor = /** @class */ (function () {
|
|
|
157
166
|
};
|
|
158
167
|
var this_1 = this;
|
|
159
168
|
for (var propPath in propertiesMetadata) {
|
|
160
|
-
|
|
169
|
+
_loop_2(propPath);
|
|
161
170
|
}
|
|
162
171
|
}
|
|
163
172
|
};
|
|
@@ -172,13 +181,13 @@ var PropertyMetadataProcessor = /** @class */ (function () {
|
|
|
172
181
|
var wildcardCount = (propPath.match(/\*/g) || []).length;
|
|
173
182
|
if (wildcardCount > 1) {
|
|
174
183
|
// Skip if there are more than one asterisks in the path (not supported)
|
|
175
|
-
console.warn("Invalid property path: Multiple wildcards are not supported in property paths.\nEntry with path '"
|
|
184
|
+
console.warn("Invalid property path: Multiple wildcards are not supported in property paths.\nEntry with path '".concat(propPath, "' got ignored in the properties metadata."));
|
|
176
185
|
return;
|
|
177
186
|
}
|
|
178
187
|
else if (wildcardCount === 1) {
|
|
179
188
|
var index = propPath.indexOf('[*]');
|
|
180
189
|
if (index < -1) {
|
|
181
|
-
console.warn("Invalid property path: Wildcards are only supported inside brackets to select array\nindices as in 'foo[*].bar'. Entry with path '"
|
|
190
|
+
console.warn("Invalid property path: Wildcards are only supported inside brackets to select array\nindices as in 'foo[*].bar'. Entry with path '".concat(propPath, "' got ignored in the properties metadata."));
|
|
182
191
|
// Skip if the wildcard is not used for an array (not supported)
|
|
183
192
|
return;
|
|
184
193
|
}
|
|
@@ -187,12 +196,12 @@ var PropertyMetadataProcessor = /** @class */ (function () {
|
|
|
187
196
|
var arrayPath = propPath.substr(0, index);
|
|
188
197
|
var arrayInstance = lodash.get(properties, arrayPath);
|
|
189
198
|
if (!arrayInstance) {
|
|
190
|
-
console.warn("Invalid property path: Could not find an array named '"
|
|
199
|
+
console.warn("Invalid property path: Could not find an array named '".concat(arrayPath, "' in the properties.\nEntry with path '").concat(propPath, "' got ignored in the properties metadata."));
|
|
191
200
|
return;
|
|
192
201
|
}
|
|
193
202
|
else {
|
|
194
203
|
for (var i = 0; i < arrayInstance.length; i++) {
|
|
195
|
-
var fixedPropPath = propPath.replace('*', ""
|
|
204
|
+
var fixedPropPath = propPath.replace('*', "".concat(i));
|
|
196
205
|
propertyPathHandler(fixedPropPath, i);
|
|
197
206
|
}
|
|
198
207
|
}
|
|
@@ -205,4 +214,9 @@ var PropertyMetadataProcessor = /** @class */ (function () {
|
|
|
205
214
|
return PropertyMetadataProcessor;
|
|
206
215
|
}());
|
|
207
216
|
exports.PropertyMetadataProcessor = PropertyMetadataProcessor;
|
|
217
|
+
function isFixCustomMetadataKeyKillSwitchActivated() {
|
|
218
|
+
return sp_core_library_1._SPKillSwitch.isActivated('bf085c27-422d-4b62-a93a-43efa89e77ee'
|
|
219
|
+
/* '2022-03-28', 'Fix custom metadata key' */
|
|
220
|
+
);
|
|
221
|
+
}
|
|
208
222
|
//# sourceMappingURL=PropertyMetadataProcessor.js.map
|
|
@@ -45,7 +45,7 @@ var ShimmerFactory = /** @class */ (function () {
|
|
|
45
45
|
var rectangle3Y = rectangle2Y + gap;
|
|
46
46
|
var rectangle4Y = rectangle3Y + gap;
|
|
47
47
|
var className = shimmer_module_scss_1.default.shimmerElementFill;
|
|
48
|
-
shimmerDiv.innerHTML = "<svg width="
|
|
48
|
+
shimmerDiv.innerHTML = "<svg width=".concat(width, " height=").concat(height, " viewBox=\"0 0 ").concat(width, " ").concat(height, "\" version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <title>").concat(loadingMessage, "</title>\n <g id=").concat(componentTag, "_Shimmer stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <rect x=\"0\" y=\"0\" width=").concat(width, " height=").concat(height, "></rect>\n ").concat(ShimmerFactory._shimmerRect(componentTag + '_1', className, RECTANGLE_X, rectangle1Y, RECTANGLE_1_LENGTH, rectangleHeight), "\n ").concat(ShimmerFactory._shimmerRect(componentTag + '_2', className, RECTANGLE_X, rectangle2Y, RECTANGLE_2_LENGTH, rectangleHeight), "\n ").concat(ShimmerFactory._shimmerRect(componentTag + '_3', className, RECTANGLE_X, rectangle3Y, RECTANGLE_3_LENGTH, rectangleHeight), "\n ").concat(ShimmerFactory._shimmerRect(componentTag + '_4', className, RECTANGLE_X, rectangle4Y, RECTANGLE_4_LENGTH, rectangleHeight), "\n </g>\n </svg>");
|
|
49
49
|
if (containerMargin !== undefined) {
|
|
50
50
|
shimmerContainerDiv.style.margin = containerMargin + '';
|
|
51
51
|
}
|
|
@@ -57,7 +57,7 @@ var ShimmerFactory = /** @class */ (function () {
|
|
|
57
57
|
return shimmerContainerDiv;
|
|
58
58
|
};
|
|
59
59
|
ShimmerFactory._shimmerRect = function (id, className, x, y, width, height) {
|
|
60
|
-
return "<rect id="
|
|
60
|
+
return "<rect id=".concat(id, " class=").concat(className, " x=").concat(x, " y=").concat(y, " width=\"").concat(width, "%\" height=").concat(height, ">\n <animate\n attributeName=\"opacity\"\n dur=\"1s\"\n values=\"0.2;0.5;0.9\"\n repeatCount=\"indefinite\"\n begin=\"0\"/>\n </rect>");
|
|
61
61
|
};
|
|
62
62
|
return ShimmerFactory;
|
|
63
63
|
}());
|
package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/_Icon.Definitions.scss
CHANGED
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
font-family: $icon-font-family;
|
|
24
|
-
src: url('https://
|
|
24
|
+
src: url('https://res-1.cdn.office.net/files/fabric-cdn-prod_20220127.003/assets/icons/#{$icon-font-name}-#{$icon-font-version}.woff2')
|
|
25
25
|
format('woff2'),
|
|
26
|
-
url('https://
|
|
26
|
+
url('https://res-1.cdn.office.net/files/fabric-cdn-prod_20220127.003/assets/icons/#{$icon-font-name}-#{$icon-font-version}.woff')
|
|
27
27
|
format('woff'),
|
|
28
|
-
url('https://
|
|
28
|
+
url('https://res-1.cdn.office.net/files/fabric-cdn-prod_20220127.003/assets/icons/#{$icon-font-name}-#{$icon-font-version}.ttf')
|
|
29
29
|
format('truetype');
|
|
30
30
|
font-weight: normal;
|
|
31
31
|
font-style: normal;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information.
|
|
2
2
|
|
|
3
3
|
// Image paths
|
|
4
|
-
$ms-brand-icon-product-images-path: 'https://
|
|
5
|
-
$ms-brand-icon-document-images-path: 'https://
|
|
4
|
+
$ms-brand-icon-product-images-path: 'https://res-1.cdn.office.net/files/fabric-cdn-prod_20220127.003/assets/brand-icons/product/png';
|
|
5
|
+
$ms-brand-icon-document-images-path: 'https://res-1.cdn.office.net/files/fabric-cdn-prod_20220127.003/assets/brand-icons/document/png';
|
|
6
6
|
|
|
7
7
|
// Names
|
|
8
8
|
$ms-brand-icon-product-icons: access excel infopath office onedrive onenote outlook powerpoint project
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information.
|
|
2
2
|
|
|
3
3
|
// Font directory and paths
|
|
4
|
-
$ms-font-cdn-path: 'https://
|
|
4
|
+
$ms-font-cdn-path: 'https://res-1.cdn.office.net/files/fabric-cdn-prod_20220127.003/assets/fonts' !default;
|
|
5
5
|
|
|
6
6
|
// Fallback fonts, if specified system or web fonts are unavailable.
|
|
7
7
|
$ms-font-family-fallbacks: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: FabricMDL2Icons;
|
|
3
|
-
src: url('https://
|
|
3
|
+
src: url('https://res-1.cdn.office.net/files/fabric-cdn-prod_20220127.003/assets/icons/fabricmdl2icons-2.23.woff2')
|
|
4
4
|
format('woff2'),
|
|
5
|
-
url('https://
|
|
5
|
+
url('https://res-1.cdn.office.net/files/fabric-cdn-prod_20220127.003/assets/icons/fabricmdl2icons-2.23.woff')
|
|
6
6
|
format('woff'),
|
|
7
|
-
url('https://
|
|
7
|
+
url('https://res-1.cdn.office.net/files/fabric-cdn-prod_20220127.003/assets/icons/fabricmdl2icons-2.23.ttf')
|
|
8
8
|
format('truetype');
|
|
9
9
|
font-weight: normal;
|
|
10
10
|
font-style: normal;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* @file Interface that defines the shape of extra data to be uploaded for web part load metrics
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
//# sourceMappingURL=IWebPartLoadData.js.map
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft. All rights reserved.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.WebPartLoadDataCollector = void 0;
|
|
5
|
+
var sp_telemetry_1 = require("@ms/sp-telemetry");
|
|
6
|
+
var sp_core_library_1 = require("@microsoft/sp-core-library");
|
|
7
|
+
var NOT_AVAILABLE = 'N/A';
|
|
8
|
+
/**
|
|
9
|
+
* This is used internally to collect web part and adaptive card extension's module load, init, and render performances.
|
|
10
|
+
* This file moved from sp-webpart-base to not additional dependency to sp-adaptive-card-extension-base.
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
var WebPartLoadDataCollector = /** @class */ (function () {
|
|
14
|
+
function WebPartLoadDataCollector() {
|
|
15
|
+
}
|
|
16
|
+
WebPartLoadDataCollector.collect = function (manifest, webPartTag, pageContext) {
|
|
17
|
+
var getTime = function (key) {
|
|
18
|
+
return (sp_telemetry_1._PerformanceLogger.readComponentBreakdown(webPartTag, key) ||
|
|
19
|
+
sp_telemetry_1._PerformanceLogger.readTempData("".concat(webPartTag, ".").concat(key)));
|
|
20
|
+
};
|
|
21
|
+
var start = getTime('start');
|
|
22
|
+
var moduleLoaded = getTime('modulesLoaded');
|
|
23
|
+
var initialized = getTime('init');
|
|
24
|
+
var end = getTime('end');
|
|
25
|
+
var isSpinnyShown = !!getTime('displaySpinner');
|
|
26
|
+
var isMultiGeo = Boolean(pageContext && pageContext.legacyPageContext && pageContext.legacyPageContext.isMultiGeoTenant);
|
|
27
|
+
var dataProvider = NOT_AVAILABLE;
|
|
28
|
+
var layoutID = NOT_AVAILABLE;
|
|
29
|
+
var webPartCacheHit = "N/A" /* NotAvailable */;
|
|
30
|
+
var cacheMissReason = "N/A" /* NotApplicable */;
|
|
31
|
+
// Collect data for first-party web parts only. This ideally should be done outside of spfx.
|
|
32
|
+
// VSO#855246 Refactor WebPartLoadDataCollector to move out first-party only logging logic.
|
|
33
|
+
if (manifest.isInternal) {
|
|
34
|
+
var cacheHit = getTime('CacheHit');
|
|
35
|
+
var cacheMiss = getTime('CacheMiss');
|
|
36
|
+
var prefetechedData = getTime('prefetchedData');
|
|
37
|
+
var isCacheApplicable = Boolean(cacheHit || cacheMiss);
|
|
38
|
+
webPartCacheHit = isCacheApplicable
|
|
39
|
+
? cacheHit
|
|
40
|
+
? "true" /* True */
|
|
41
|
+
: "false" /* False */
|
|
42
|
+
: "N/A" /* NotAvailable */;
|
|
43
|
+
cacheMissReason = WebPartLoadDataCollector._getCacheMissReason(cacheHit, getTime);
|
|
44
|
+
var dataProviderTime_1 = sp_telemetry_1._PerformanceLogger.now();
|
|
45
|
+
var layoutKey_1 = sp_telemetry_1._PerformanceDataDimensions.Layout;
|
|
46
|
+
var dataProviderKey_1 = sp_telemetry_1._PerformanceDataDimensions.DataProvider;
|
|
47
|
+
var perfBreakDown_1 = sp_telemetry_1._PerformanceLogger.readFullEUPLBreakDown();
|
|
48
|
+
// WebParts which have different layouts and dataproviders, will have perf marks such as
|
|
49
|
+
// webPartTag.dataProvider: [dataProviderName]
|
|
50
|
+
// webPartTag.Layout: [Layout]
|
|
51
|
+
// The logic below will extract the data provider and layout, and log them for perf measurements.
|
|
52
|
+
Object.keys(perfBreakDown_1).forEach(function (key) {
|
|
53
|
+
if (key.indexOf(webPartTag) > -1) {
|
|
54
|
+
// We only have 1 layout
|
|
55
|
+
if (layoutID === NOT_AVAILABLE && key.indexOf(layoutKey_1) > -1) {
|
|
56
|
+
layoutID = key.split(layoutKey_1)[1];
|
|
57
|
+
// Focus on primary data provider
|
|
58
|
+
}
|
|
59
|
+
else if (key.indexOf(dataProviderKey_1) > -1) {
|
|
60
|
+
// Pick earliest data provider, in case there are multiple
|
|
61
|
+
if (dataProvider === NOT_AVAILABLE || perfBreakDown_1[key] < dataProviderTime_1) {
|
|
62
|
+
dataProvider = key.split(dataProviderKey_1)[1];
|
|
63
|
+
dataProviderTime_1 = perfBreakDown_1[key];
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
dataProvider = prefetechedData ? 'Prefetch' : dataProvider;
|
|
69
|
+
}
|
|
70
|
+
var webpartPerfFlights = sp_telemetry_1._PerformanceLogger.getWebpartFlightsAndExperiments(webPartTag);
|
|
71
|
+
var syncRenderTime = this._getSyncRenderTime(layoutID, getTime);
|
|
72
|
+
var retVal = {
|
|
73
|
+
alias: manifest.alias,
|
|
74
|
+
isMultiGeo: isMultiGeo,
|
|
75
|
+
isInternal: manifest.isInternal,
|
|
76
|
+
isSpinnyShown: isSpinnyShown,
|
|
77
|
+
manifestId: manifest.id,
|
|
78
|
+
moduleLoadTime: Math.floor(moduleLoaded - start),
|
|
79
|
+
initTime: Math.floor(initialized - moduleLoaded),
|
|
80
|
+
renderTime: Math.floor(end - initialized),
|
|
81
|
+
syncRenderTime: syncRenderTime,
|
|
82
|
+
scenarioId: sp_telemetry_1._PerformanceLogger.getScenarioId(),
|
|
83
|
+
isFullPage: sp_telemetry_1._PerformanceLogger.fullPageLoad,
|
|
84
|
+
dataProvider: dataProvider,
|
|
85
|
+
layout: layoutID,
|
|
86
|
+
mySiteCacheHit: webPartCacheHit,
|
|
87
|
+
cacheMissReason: cacheMissReason,
|
|
88
|
+
flights: webpartPerfFlights,
|
|
89
|
+
storeAppId: manifest.storeAppId,
|
|
90
|
+
mpnId: manifest.mpnId,
|
|
91
|
+
componentDeveloperName: manifest.componentDeveloperName
|
|
92
|
+
};
|
|
93
|
+
retVal.teamsHosted = sp_core_library_1._BrowserUtilities.isTeamsHosted();
|
|
94
|
+
return retVal;
|
|
95
|
+
};
|
|
96
|
+
WebPartLoadDataCollector._getSyncRenderTime = function (layoutID, getTime) {
|
|
97
|
+
var syncRenderTime = undefined;
|
|
98
|
+
syncRenderTime = Math.floor(getTime('syncRender') - getTime('getDataComplete'));
|
|
99
|
+
var postRenderCompleteTime = getTime('postRenderComplete');
|
|
100
|
+
var loadLayoutEnd = getTime('loadLayoutEnd');
|
|
101
|
+
var syncLayoutRenderComplete = getTime('syncLayoutRenderComplete');
|
|
102
|
+
if (loadLayoutEnd && syncLayoutRenderComplete) {
|
|
103
|
+
// render layout and items inside it
|
|
104
|
+
syncRenderTime = Math.floor(syncRenderTime + (syncLayoutRenderComplete - loadLayoutEnd));
|
|
105
|
+
}
|
|
106
|
+
if (postRenderCompleteTime) {
|
|
107
|
+
syncRenderTime = Math.floor(
|
|
108
|
+
// transposeRow + transposeItems + render + syncPostRender
|
|
109
|
+
syncRenderTime + (postRenderCompleteTime - getTime(sp_telemetry_1._PerformanceDataDimensions.Layout + layoutID)));
|
|
110
|
+
}
|
|
111
|
+
return syncRenderTime;
|
|
112
|
+
};
|
|
113
|
+
WebPartLoadDataCollector._getCacheMissReason = function (cacheHit, getTime) {
|
|
114
|
+
if (cacheHit) {
|
|
115
|
+
return "N/A" /* NotApplicable */;
|
|
116
|
+
}
|
|
117
|
+
var mySiteCacheMissOnConfgMismatch = !!getTime('CacheMissConfigMismatch');
|
|
118
|
+
var mySiteCacheMissOnLateFlush = !!getTime('LateFlush');
|
|
119
|
+
var cachedWebPartNotFound = !!getTime('CachedWebPartNotFound');
|
|
120
|
+
var cacheExpired = !!getTime('CacheExpired');
|
|
121
|
+
var cacheMissReason = "NotSpecified" /* NotSpecified */;
|
|
122
|
+
if (mySiteCacheMissOnConfgMismatch) {
|
|
123
|
+
cacheMissReason = "CacheConfigMissmatch" /* CacheConfigMissmatch */;
|
|
124
|
+
}
|
|
125
|
+
else if (mySiteCacheMissOnLateFlush) {
|
|
126
|
+
cacheMissReason = "LateFlush" /* LateFlush */;
|
|
127
|
+
}
|
|
128
|
+
else if (cachedWebPartNotFound) {
|
|
129
|
+
cacheMissReason = "CachedItemNotFound" /* CachedItemNotFound */;
|
|
130
|
+
}
|
|
131
|
+
else if (cacheExpired) {
|
|
132
|
+
cacheMissReason = "CacheExpired" /* CacheExpired */;
|
|
133
|
+
}
|
|
134
|
+
return cacheMissReason;
|
|
135
|
+
};
|
|
136
|
+
return WebPartLoadDataCollector;
|
|
137
|
+
}());
|
|
138
|
+
exports.WebPartLoadDataCollector = WebPartLoadDataCollector;
|
|
139
|
+
//# sourceMappingURL=WebPartLoadDataCollector.js.map
|
package/lib-commonjs/index.js
CHANGED
|
@@ -10,19 +10,23 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @packagedocumentation
|
|
12
12
|
*/
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
13
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports._WebPartLoadDataCollector = exports._ensureIsolatedDomainUrl = exports._ShimmerFactory = exports.ThemeProvider = exports.ThemeChangedEventArgs = exports._PropertyMetadataProcessor = exports._LegacyThirdPartyFabricCoreLoader = exports.DynamicProperty = exports.DynamicDataSourceManager = exports.DynamicDataProvider = exports.BaseComponentContext = exports.BaseComponent = void 0;
|
|
14
18
|
var BaseComponent_1 = require("./BaseComponent");
|
|
15
|
-
Object.defineProperty(exports, "BaseComponent", { enumerable: true, get: function () { return BaseComponent_1.default; } });
|
|
19
|
+
Object.defineProperty(exports, "BaseComponent", { enumerable: true, get: function () { return __importDefault(BaseComponent_1).default; } });
|
|
16
20
|
var BaseComponentContext_1 = require("./BaseComponentContext");
|
|
17
|
-
Object.defineProperty(exports, "BaseComponentContext", { enumerable: true, get: function () { return BaseComponentContext_1.default; } });
|
|
21
|
+
Object.defineProperty(exports, "BaseComponentContext", { enumerable: true, get: function () { return __importDefault(BaseComponentContext_1).default; } });
|
|
18
22
|
var DynamicDataProvider_1 = require("./DynamicDataProvider");
|
|
19
|
-
Object.defineProperty(exports, "DynamicDataProvider", { enumerable: true, get: function () { return DynamicDataProvider_1.default; } });
|
|
23
|
+
Object.defineProperty(exports, "DynamicDataProvider", { enumerable: true, get: function () { return __importDefault(DynamicDataProvider_1).default; } });
|
|
20
24
|
var DynamicDataSourceManager_1 = require("./DynamicDataSourceManager");
|
|
21
|
-
Object.defineProperty(exports, "DynamicDataSourceManager", { enumerable: true, get: function () { return DynamicDataSourceManager_1.default; } });
|
|
25
|
+
Object.defineProperty(exports, "DynamicDataSourceManager", { enumerable: true, get: function () { return __importDefault(DynamicDataSourceManager_1).default; } });
|
|
22
26
|
var DynamicProperty_1 = require("./DynamicProperty");
|
|
23
|
-
Object.defineProperty(exports, "DynamicProperty", { enumerable: true, get: function () { return DynamicProperty_1.default; } });
|
|
27
|
+
Object.defineProperty(exports, "DynamicProperty", { enumerable: true, get: function () { return __importDefault(DynamicProperty_1).default; } });
|
|
24
28
|
var LegacyThirdPartyFabricCoreLoader_1 = require("./LegacyThirdPartyFabricCoreLoader");
|
|
25
|
-
Object.defineProperty(exports, "_LegacyThirdPartyFabricCoreLoader", { enumerable: true, get: function () { return LegacyThirdPartyFabricCoreLoader_1.default; } });
|
|
29
|
+
Object.defineProperty(exports, "_LegacyThirdPartyFabricCoreLoader", { enumerable: true, get: function () { return __importDefault(LegacyThirdPartyFabricCoreLoader_1).default; } });
|
|
26
30
|
var PropertyMetadataProcessor_1 = require("./PropertyMetadataProcessor");
|
|
27
31
|
Object.defineProperty(exports, "_PropertyMetadataProcessor", { enumerable: true, get: function () { return PropertyMetadataProcessor_1.PropertyMetadataProcessor; } });
|
|
28
32
|
var ThemeProvider_1 = require("./themeProvider/ThemeProvider");
|
|
@@ -30,7 +34,9 @@ Object.defineProperty(exports, "ThemeChangedEventArgs", { enumerable: true, get:
|
|
|
30
34
|
Object.defineProperty(exports, "ThemeProvider", { enumerable: true, get: function () { return ThemeProvider_1.ThemeProvider; } });
|
|
31
35
|
// ShimmerFactory
|
|
32
36
|
var ShimmerFactory_1 = require("./ShimmerFactory");
|
|
33
|
-
Object.defineProperty(exports, "_ShimmerFactory", { enumerable: true, get: function () { return ShimmerFactory_1.default; } });
|
|
37
|
+
Object.defineProperty(exports, "_ShimmerFactory", { enumerable: true, get: function () { return __importDefault(ShimmerFactory_1).default; } });
|
|
34
38
|
var EnsureIsolatedDomainUrl_1 = require("./EnsureIsolatedDomainUrl");
|
|
35
39
|
Object.defineProperty(exports, "_ensureIsolatedDomainUrl", { enumerable: true, get: function () { return EnsureIsolatedDomainUrl_1.ensureIsolatedDomainUrl; } });
|
|
40
|
+
var WebPartLoadDataCollector_1 = require("./dataCollector/WebPartLoadDataCollector");
|
|
41
|
+
Object.defineProperty(exports, "_WebPartLoadDataCollector", { enumerable: true, get: function () { return WebPartLoadDataCollector_1.WebPartLoadDataCollector; } });
|
|
36
42
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MockComponentContext = exports.MockComponent = void 0;
|
|
3
4
|
var MockComponent_1 = require("./MockComponent");
|
|
4
5
|
Object.defineProperty(exports, "MockComponent", { enumerable: true, get: function () { return MockComponent_1.MockComponent; } });
|
|
5
6
|
var MockComponentContext_1 = require("./MockComponentContext");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/sp-component-base",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0-rc.0",
|
|
4
4
|
"description": "SharePoint Framework support for building client-side components",
|
|
5
5
|
"license": "SEE LICENSE IN \"EULA\" FOLDER",
|
|
6
6
|
"homepage": "http://aka.ms/spfx",
|
|
@@ -11,18 +11,18 @@
|
|
|
11
11
|
"tsdocFlavor": "AEDoc"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@microsoft/office-ui-fabric-react-bundle": "1.
|
|
15
|
-
"@microsoft/sp-core-library": "1.
|
|
16
|
-
"@microsoft/sp-diagnostics": "1.
|
|
17
|
-
"@microsoft/sp-dynamic-data": "1.
|
|
18
|
-
"@microsoft/sp-http": "1.
|
|
19
|
-
"@microsoft/sp-lodash-subset": "1.
|
|
20
|
-
"@microsoft/sp-module-interfaces": "1.
|
|
21
|
-
"@microsoft/sp-page-context": "1.
|
|
22
|
-
"tslib": "
|
|
14
|
+
"@microsoft/office-ui-fabric-react-bundle": "1.15.0-rc.0",
|
|
15
|
+
"@microsoft/sp-core-library": "1.15.0-rc.0",
|
|
16
|
+
"@microsoft/sp-diagnostics": "1.15.0-rc.0",
|
|
17
|
+
"@microsoft/sp-dynamic-data": "1.15.0-rc.0",
|
|
18
|
+
"@microsoft/sp-http": "1.15.0-rc.0",
|
|
19
|
+
"@microsoft/sp-lodash-subset": "1.15.0-rc.0",
|
|
20
|
+
"@microsoft/sp-module-interfaces": "1.15.0-rc.0",
|
|
21
|
+
"@microsoft/sp-page-context": "1.15.0-rc.0",
|
|
22
|
+
"tslib": "2.3.1"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {},
|
|
25
25
|
"engines": {
|
|
26
|
-
"node": ">=12.13.0 <13.0.0 || >=14.15.0 <15.0.0"
|
|
26
|
+
"node": ">=12.13.0 <13.0.0 || >=14.15.0 <15.0.0 || >=16.13.0 <17.0.0"
|
|
27
27
|
}
|
|
28
28
|
}
|