@microsoft/sp-component-base 1.20.0 → 1.21.0-beta.2

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.
@@ -29,12 +29,15 @@ var ThemeProvider = /** @class */ (function () {
29
29
  * @param serviceScope - The current service scope.
30
30
  * @param theme - Theme to provide.
31
31
  */
32
- function ThemeProvider(serviceScope, theme) {
32
+ function ThemeProvider(serviceScope, theme, themeV2) {
33
33
  this._id = ThemeProvider._instanceCount++;
34
34
  this.themeChangedEvent = new sp_core_library_1.SPEvent(this._themeChangedEventName);
35
35
  if (theme) {
36
36
  this._theme = Object.freeze(theme);
37
37
  }
38
+ if (themeV2) {
39
+ this._themeV2 = Object.freeze(themeV2);
40
+ }
38
41
  }
39
42
  Object.defineProperty(ThemeProvider.prototype, "_themeChangedEventName", {
40
43
  get: function () {
@@ -50,6 +53,7 @@ var ThemeProvider = /** @class */ (function () {
50
53
  */
51
54
  ThemeProvider.prototype._clearTheme = function () {
52
55
  this._theme = undefined;
56
+ this._themeV2 = undefined;
53
57
  this._raiseEvent();
54
58
  };
55
59
  /**
@@ -59,9 +63,12 @@ var ThemeProvider = /** @class */ (function () {
59
63
  *
60
64
  * @internal
61
65
  */
62
- ThemeProvider.prototype._setTheme = function (theme) {
66
+ ThemeProvider.prototype._setTheme = function (theme, themeV2) {
63
67
  sp_core_library_1.Validate.isNotNullOrUndefined(theme, 'theme');
64
68
  this._theme = Object.freeze(theme);
69
+ if (themeV2) {
70
+ this._themeV2 = Object.freeze(themeV2);
71
+ }
65
72
  this._raiseEvent();
66
73
  };
67
74
  /**
@@ -70,9 +77,13 @@ var ThemeProvider = /** @class */ (function () {
70
77
  ThemeProvider.prototype.tryGetTheme = function () {
71
78
  return this._theme;
72
79
  };
80
+ ThemeProvider.prototype.tryGetThemeV2 = function () {
81
+ return this._themeV2;
82
+ };
73
83
  ThemeProvider.prototype._raiseEvent = function () {
74
84
  sp_core_library_1._SPEventManager.instance.raiseEvent(this._themeChangedEventName, {
75
- theme: this._theme
85
+ theme: this._theme,
86
+ themeV2: this._themeV2
76
87
  });
77
88
  };
78
89
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/sp-component-base",
3
- "version": "1.20.0",
3
+ "version": "1.21.0-beta.2",
4
4
  "description": "SharePoint Framework support for building client-side components",
5
5
  "license": "https://aka.ms/spfx/license",
6
6
  "homepage": "http://aka.ms/spfx",
@@ -11,34 +11,36 @@
11
11
  "tsdocFlavor": "AEDoc"
12
12
  },
13
13
  "devDependencies": {
14
- "@rushstack/heft": "0.67.0",
14
+ "@rushstack/heft": "0.71.0",
15
15
  "@types/react": "17.0.45",
16
16
  "@types/react-dom": "17.0.17",
17
- "eslint": "8.57.0",
17
+ "eslint": "8.57.1",
18
18
  "react": "17.0.1",
19
19
  "react-dom": "17.0.1",
20
20
  "@ms/ms-graph-v3-bundle": "3.0.2",
21
- "@ms/office-ui-fabric-react-bundle": "1.19.6",
21
+ "@ms/office-ui-fabric-react-bundle": "1.19.22",
22
22
  "@ms/react-17-bundle": "17.0.1",
23
23
  "@ms/react-dom-17-bundle": "17.0.1",
24
- "@ms/sp-safehtml": "0.4.0",
25
- "@ms/sp-telemetry": "0.32.116",
26
24
  "@ms/react-dom-17-profiling-bundle": "17.0.1",
25
+ "@ms/sp-telemetry": "0.34.2",
26
+ "@ms/sp-safehtml": "0.5.0",
27
27
  "@ms/spfx-internal-web-build-rig": "0.1.0"
28
28
  },
29
29
  "dependencies": {
30
- "@fluentui/react": "^8.117.5",
30
+ "@fluentui/react": "^8.122.9",
31
+ "@fluentui/react-components": "^9.58.3",
32
+ "@swc/helpers": "0.5.12",
31
33
  "tslib": "2.3.1",
32
- "@microsoft/sp-core-library": "1.20.0",
33
- "@microsoft/sp-dynamic-data": "1.20.0",
34
- "@microsoft/sp-diagnostics": "1.20.0",
35
- "@microsoft/sp-http": "1.20.0",
36
- "@microsoft/sp-lodash-subset": "1.20.0",
37
- "@microsoft/sp-module-interfaces": "1.20.2",
38
- "@microsoft/sp-page-context": "1.20.0"
34
+ "@microsoft/sp-core-library": "1.21.0-beta.2",
35
+ "@microsoft/sp-diagnostics": "1.21.0-beta.2",
36
+ "@microsoft/sp-dynamic-data": "1.21.0-beta.2",
37
+ "@microsoft/sp-http": "1.21.0-beta.2",
38
+ "@microsoft/sp-lodash-subset": "1.21.0-beta.2",
39
+ "@microsoft/sp-module-interfaces": "1.21.0-beta.2",
40
+ "@microsoft/sp-page-context": "1.21.0-beta.2"
39
41
  },
40
42
  "engines": {
41
- "node": ">=18.17.1 <19.0.0"
43
+ "node": ">=18.17.1 <19.0.0 || >=22.14.0 < 23.0.0"
42
44
  },
43
45
  "scripts": {
44
46
  "build": "heft test --clean",
@@ -48,9 +50,10 @@
48
50
  "test": "heft test",
49
51
  "test-watch": "heft test-watch",
50
52
  "_phase:build": "heft run --only build -- --clean",
51
- "_phase:test": "heft run --only test -- --clean",
52
- "_phase:build-incremental": "heft run --only build --",
53
+ "_phase:build:incremental": "heft run --only build --",
53
54
  "_phase:depscan": "heft depscan",
54
- "_phase:tablink": "heft tablink"
55
+ "_phase:tablink": "heft tablink",
56
+ "_phase:test": "heft run --only test -- --clean",
57
+ "_phase:test:incremental": "heft run --only test --"
55
58
  }
56
59
  }