@livetiles/reach-components-react 0.4.0-preview.192 → 0.4.0-preview.197

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 (3) hide show
  1. package/index.esm2.js +25 -11
  2. package/index.umd.js +25 -11
  3. package/package.json +1 -1
package/index.esm2.js CHANGED
@@ -87447,9 +87447,9 @@ var AuthenticationContextProvider = function AuthenticationContextProvider(_a) {
87447
87447
  }), void 0);
87448
87448
  };
87449
87449
 
87450
- var version$1 = "0.4.0-preview.192";
87451
- var buildId = "98140";
87452
- var commitId = "bddc1d41af31e22d654b3f96126caedce8e147c0";
87450
+ var version$1 = "0.4.0-preview.197";
87451
+ var buildId = "98175";
87452
+ var commitId = "e0a8b202409ac9a1f88ab88f4b727d18a90c5123";
87453
87453
  var isCustomerBuild = false;
87454
87454
  var buildInfo = {
87455
87455
  version: version$1,
@@ -88113,21 +88113,21 @@ function registerComponentLibraryPackages() {
88113
88113
  registerPackages.apply(void 0, __spreadArray$8(['ReachComponentLibraryPackages'], libraryPackages));
88114
88114
  }
88115
88115
 
88116
- initializeIcons();
88117
- var didLogVersion = false;
88116
+ initializeGlobalStuff();
88118
88117
  var ReachContextProvider = function ReachContextProvider(props) {
88119
88118
  var _a, _b, _c, _d;
88120
88119
 
88121
88120
  var envContextExists = useContext(EnvironmentContext) != null;
88122
88121
  useEffect$1(function () {
88123
- if (!envContextExists) {
88124
- registerCorePackages();
88125
- registerComponentLibraryPackages();
88122
+ if (window['__did_initialize_reach_context']) {
88123
+ return;
88126
88124
  }
88127
88125
 
88128
- if (!didLogVersion) {
88129
- console.info("Reach Component Library: " + buildInfo.version + " (" + buildInfo.buildId + ") [" + buildInfo.commitId + "]");
88130
- didLogVersion = true;
88126
+ window['__did_initialize_reach_context'] = true;
88127
+
88128
+ if (!envContextExists && !window['__is_reach_app']) {
88129
+ registerCorePackages();
88130
+ registerComponentLibraryPackages();
88131
88131
  }
88132
88132
  }, []);
88133
88133
  var envContextValue = useMemo(getEnvValue, [(_a = props.config) === null || _a === void 0 ? void 0 : _a.apiEndpoint, (_b = props.config) === null || _b === void 0 ? void 0 : _b.webAppUrl, (_c = props.config) === null || _c === void 0 ? void 0 : _c.api3Endpoint, (_d = props.config) === null || _d === void 0 ? void 0 : _d.webSocketsEndpoint]);
@@ -88345,6 +88345,20 @@ var Styles = function Styles() {
88345
88345
  }, void 0);
88346
88346
  };
88347
88347
 
88348
+ function initializeGlobalStuff() {
88349
+ if (window['__is_reach_app']) {
88350
+ return;
88351
+ }
88352
+
88353
+ console.info("Reach Component Library: " + buildInfo.version + " (" + buildInfo.buildId + ") [" + buildInfo.commitId + "]");
88354
+
88355
+ if (window['__did_initialize_reach_context']) {
88356
+ return;
88357
+ }
88358
+
88359
+ initializeIcons();
88360
+ }
88361
+
88348
88362
  var regex$4=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
88349
88363
 
88350
88364
  var regex$3=/[\0-\x1F\x7F-\x9F]/;
package/index.umd.js CHANGED
@@ -87304,9 +87304,9 @@
87304
87304
  }), void 0);
87305
87305
  };
87306
87306
 
87307
- var version$1 = "0.4.0-preview.192";
87308
- var buildId = "98140";
87309
- var commitId = "bddc1d41af31e22d654b3f96126caedce8e147c0";
87307
+ var version$1 = "0.4.0-preview.197";
87308
+ var buildId = "98175";
87309
+ var commitId = "e0a8b202409ac9a1f88ab88f4b727d18a90c5123";
87310
87310
  var isCustomerBuild = false;
87311
87311
  var buildInfo = {
87312
87312
  version: version$1,
@@ -87970,21 +87970,21 @@
87970
87970
  registerPackages.apply(void 0, __spreadArray$8(['ReachComponentLibraryPackages'], libraryPackages));
87971
87971
  }
87972
87972
 
87973
- officeUiFabricReact.initializeIcons();
87974
- var didLogVersion = false;
87973
+ initializeGlobalStuff();
87975
87974
  var ReachContextProvider = function ReachContextProvider(props) {
87976
87975
  var _a, _b, _c, _d;
87977
87976
 
87978
87977
  var envContextExists = React$d.useContext(EnvironmentContext) != null;
87979
87978
  React$d.useEffect(function () {
87980
- if (!envContextExists) {
87981
- registerCorePackages();
87982
- registerComponentLibraryPackages();
87979
+ if (window['__did_initialize_reach_context']) {
87980
+ return;
87983
87981
  }
87984
87982
 
87985
- if (!didLogVersion) {
87986
- console.info("Reach Component Library: " + buildInfo.version + " (" + buildInfo.buildId + ") [" + buildInfo.commitId + "]");
87987
- didLogVersion = true;
87983
+ window['__did_initialize_reach_context'] = true;
87984
+
87985
+ if (!envContextExists && !window['__is_reach_app']) {
87986
+ registerCorePackages();
87987
+ registerComponentLibraryPackages();
87988
87988
  }
87989
87989
  }, []);
87990
87990
  var envContextValue = React$d.useMemo(getEnvValue, [(_a = props.config) === null || _a === void 0 ? void 0 : _a.apiEndpoint, (_b = props.config) === null || _b === void 0 ? void 0 : _b.webAppUrl, (_c = props.config) === null || _c === void 0 ? void 0 : _c.api3Endpoint, (_d = props.config) === null || _d === void 0 ? void 0 : _d.webSocketsEndpoint]);
@@ -88202,6 +88202,20 @@
88202
88202
  }, void 0);
88203
88203
  };
88204
88204
 
88205
+ function initializeGlobalStuff() {
88206
+ if (window['__is_reach_app']) {
88207
+ return;
88208
+ }
88209
+
88210
+ console.info("Reach Component Library: " + buildInfo.version + " (" + buildInfo.buildId + ") [" + buildInfo.commitId + "]");
88211
+
88212
+ if (window['__did_initialize_reach_context']) {
88213
+ return;
88214
+ }
88215
+
88216
+ officeUiFabricReact.initializeIcons();
88217
+ }
88218
+
88205
88219
  var regex$4=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
88206
88220
 
88207
88221
  var regex$3=/[\0-\x1F\x7F-\x9F]/;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@livetiles/reach-components-react",
3
3
  "description": "Provides React components to consume LiveTiles Reach data",
4
- "version": "0.4.0-preview.192",
4
+ "version": "0.4.0-preview.197",
5
5
  "peerDependencies": {
6
6
  "react": "^16.14.0 || ^17",
7
7
  "react-dom": "^16.14.0 || ^17",