@microsoft/sp-component-base 1.16.1 → 1.17.0-beta.3

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.
Files changed (57) hide show
  1. package/dist/467dc675-7cc5-4709-8aac-78e3b71bd2f6.manifest.json +72 -72
  2. package/dist/chunk.legacy-third-party-fabric-core-localfont_none_f116e3020ea59afe9c30.js +1 -0
  3. package/dist/index-internal-beta.d.ts +5 -0
  4. package/dist/index-internal-public.d.ts +5 -0
  5. package/dist/index-internal.d.ts +5 -0
  6. package/dist/{sp-component-base_en-us_ee18de6e19b14eb89178.js → sp-component-base_default_e6c42e836798d1199613.js} +1 -1
  7. package/dist/sp-component-base_en-us_e6c42e836798d1199613.js +1 -0
  8. package/dist/sp-component-base_qps-ploc_e6c42e836798d1199613.js +1 -0
  9. package/dist/sp-component-base_qps-ploca_e6c42e836798d1199613.js +1 -0
  10. package/dist/tsdoc-metadata.json +1 -1
  11. package/lib-commonjs/BaseComponent.js +22 -0
  12. package/lib-commonjs/DynamicDataSourceManager.js +11 -7
  13. package/lib-commonjs/IComponentPosition.js +3 -0
  14. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/Fabric.LocalFont.scss.css +9247 -0
  15. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/Fabric.LocalFontKillSwitchActivated.scss.css +11267 -0
  16. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-shim.scss.css +2063 -0
  17. package/lib-commonjs/chunks/legacy-third-party-fabric-core/{fabric-core-shimKillSwitchActivated.scss → fabric-core-shimKillSwitchActivated.scss.css} +222 -534
  18. package/lib-commonjs/chunks/legacy-third-party-fabric-core/iconDefinitions.css +2 -7
  19. package/lib-commonjs/common/KillSwitches.js +6 -10
  20. package/lib-commonjs/styles/{shimmer.module.scss → shimmer.module.scss.css} +2 -4
  21. package/package.json +17 -14
  22. package/dist/chunk.legacy-third-party-fabric-core-localfont_none_e3d3ee858da922ec12dd.js +0 -1
  23. package/dist/sp-component-base_default_ee18de6e19b14eb89178.js +0 -1
  24. package/dist/sp-component-base_qps-ploc_ee18de6e19b14eb89178.js +0 -1
  25. package/dist/sp-component-base_qps-ploca_ee18de6e19b14eb89178.js +0 -1
  26. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/Fabric.LocalFont.scss +0 -29
  27. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/Fabric.LocalFontKillSwitchActivated.scss +0 -21
  28. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/_Animation.scss +0 -173
  29. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/_BrandIcon.scss +0 -19
  30. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/_Color.scss +0 -483
  31. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/_Font.scss +0 -397
  32. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/_Grid.scss +0 -24
  33. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/_Icon.Definitions.scss +0 -32
  34. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/_Icon.scss +0 -36
  35. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/_References.scss +0 -27
  36. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/_Responsive.scss +0 -1009
  37. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/_Utility.scss +0 -56
  38. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/_Wrapper.scss +0 -42
  39. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/mixins/_Animation.Mixins.scss +0 -549
  40. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/mixins/_BrandIcon.Mixins.scss +0 -36
  41. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/mixins/_Color.Mixins.scss +0 -407
  42. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/mixins/_Directionality.Mixins.scss +0 -334
  43. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/mixins/_Font.Mixins.scss +0 -403
  44. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/mixins/_General.Mixins.scss +0 -228
  45. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/mixins/_Grid.Mixins.scss +0 -39
  46. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/mixins/_Icon.Mixins.scss +0 -4116
  47. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/mixins/_Responsive.Mixins.scss +0 -1487
  48. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/mixins/_ScopedStyles.Mixins.scss +0 -21
  49. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/variables/_Animation.Variables.scss +0 -11
  50. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/variables/_BrandIcon.Variables.scss +0 -14
  51. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/variables/_Color.Variables.scss +0 -73
  52. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/variables/_Font.Variables.scss +0 -45
  53. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/variables/_General.Variables.scss +0 -6
  54. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/variables/_Icon.Variables.scss +0 -2672
  55. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/variables/_Responsive.Variables.scss +0 -16
  56. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-sass/variables/_ZIndex.Variables.scss +0 -14
  57. package/lib-commonjs/chunks/legacy-third-party-fabric-core/fabric-core-shim.scss +0 -2478
@@ -8,6 +8,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
8
8
  var BaseComponent = /** @class */ (function () {
9
9
  /** @internal */
10
10
  function BaseComponent() {
11
+ /**
12
+ * Stores whether or not this component has a dynamic data source.
13
+ * @internal
14
+ */
15
+ this._isWebPartAndContainsDynamicDataSource = false;
11
16
  this._isDisposed = false;
12
17
  // empty block
13
18
  }
@@ -40,6 +45,23 @@ var BaseComponent = /** @class */ (function () {
40
45
  this._isDisposed = true;
41
46
  }
42
47
  };
48
+ Object.defineProperty(BaseComponent.prototype, "_containsDynamicDataSource", {
49
+ /**
50
+ * Returns whether or not this component contains a dynamic data source.
51
+ * @internal
52
+ */
53
+ get: function () {
54
+ return this._isWebPartAndContainsDynamicDataSource;
55
+ },
56
+ /**
57
+ * @internal
58
+ */
59
+ set: function (val) {
60
+ this._isWebPartAndContainsDynamicDataSource = this.manifest.componentType === 'WebPart' ? val : false;
61
+ },
62
+ enumerable: false,
63
+ configurable: true
64
+ });
43
65
  Object.defineProperty(BaseComponent.prototype, "isDisposed", {
44
66
  /**
45
67
  * Returns true if the component has been already disposed.
@@ -7,7 +7,8 @@ var sp_dynamic_data_1 = require("@microsoft/sp-dynamic-data");
7
7
  var lodash = tslib_1.__importStar(require("@microsoft/sp-lodash-subset"));
8
8
  var sp_lodash_subset_1 = require("@microsoft/sp-lodash-subset");
9
9
  var DynamicDataProvider_1 = tslib_1.__importDefault(require("./DynamicDataProvider"));
10
- var strings = tslib_1.__importStar(require("./loc/Strings.resx"));
10
+ var Strings_resx_1 = tslib_1.__importDefault(require("./loc/Strings.resx"));
11
+ var KillSwitches_1 = require("./common/KillSwitches");
11
12
  /**
12
13
  * The Dynamic Data Source Manager is responsible for:
13
14
  * - Constructing the dynamic data source
@@ -82,11 +83,14 @@ var DynamicDataSourceManager = /** @class */ (function () {
82
83
  this._assertNotDisposed();
83
84
  this._assertInitialized();
84
85
  if (!!this._src) {
85
- throw new Error(strings.SourceAlreadyInitialized);
86
+ throw new Error(Strings_resx_1.default.SourceAlreadyInitialized);
86
87
  }
87
88
  this._callableFunctions = callableFunctions;
88
89
  this._src = this._buildSource(this._component);
89
90
  this._dynamicDataManager.addSource(this._src);
91
+ if (!(0, KillSwitches_1.isExemptWebPartWithDynamicDataFromLazyLoadKSActivated)()) {
92
+ this._component._containsDynamicDataSource = true;
93
+ }
90
94
  this._logFeatureEntry('DynamicDataSourceInitialized', { sourceId: this._src.id });
91
95
  };
92
96
  /**
@@ -150,7 +154,7 @@ var DynamicDataSourceManager = /** @class */ (function () {
150
154
  // 'sendEvent' event handler as well.
151
155
  if (this._callableFunctions.allowedEvents && this._callableFunctions.allowedEvents.length > 0) {
152
156
  if (!this._callableFunctions.sendEvent) {
153
- throw new Error(strings.NoSendEventWhenAllowedEventsIsNonEmpty);
157
+ throw new Error(Strings_resx_1.default.NoSendEventWhenAllowedEventsIsNonEmpty);
154
158
  }
155
159
  }
156
160
  return {
@@ -347,22 +351,22 @@ var DynamicDataSourceManager = /** @class */ (function () {
347
351
  */
348
352
  DynamicDataSourceManager.prototype._assertValidEvent = function (eventName) {
349
353
  if (!this._allowedEvents() || (0, sp_lodash_subset_1.findIndex)(this._allowedEvents(), { name: eventName }) === -1) {
350
- throw new Error(sp_core_library_1.Text.format(strings.InvalidEvent, eventName, this._src.metadata.title));
354
+ throw new Error(sp_core_library_1.Text.format(Strings_resx_1.default.InvalidEvent, eventName, this._src.metadata.title));
351
355
  }
352
356
  };
353
357
  DynamicDataSourceManager.prototype._assertNotDisposed = function () {
354
358
  if (this.isDisposed) {
355
- throw new Error(strings.DynamicDataSourceManagerIsDisposed);
359
+ throw new Error(Strings_resx_1.default.DynamicDataSourceManagerIsDisposed);
356
360
  }
357
361
  };
358
362
  DynamicDataSourceManager.prototype._assertInitialized = function () {
359
363
  if (!this._isInitialized) {
360
- throw new Error(strings.DynamicDataSourceManagerIsNotInitialized);
364
+ throw new Error(Strings_resx_1.default.DynamicDataSourceManagerIsNotInitialized);
361
365
  }
362
366
  };
363
367
  DynamicDataSourceManager.prototype._assertSourceExists = function () {
364
368
  if (!this._src) {
365
- throw new Error(strings.DynamicDataSourceIsNotInitialized);
369
+ throw new Error(Strings_resx_1.default.DynamicDataSourceIsNotInitialized);
366
370
  }
367
371
  };
368
372
  /**
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IComponentPosition.js.map