@splunk/react-page 6.0.3 → 6.0.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/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  Change Log
2
2
  ============
3
3
 
4
+ 6.0.4 - April 6, 2023
5
+ ----------
6
+ * `layout` will now fall back to `requirejs` if `scriptjs` fails to load (SUI-5341).
7
+
4
8
  6.0.3 - December 6, 2022
5
9
  ----------
6
10
  * Optimizes bundle sizes of consumers by reducing footprint of "lodash" (SUI-5090).
package/lib/index.js CHANGED
@@ -332,7 +332,21 @@ function getLayoutApi(theme, callback) {
332
332
  var url = Object(url_["createStaticURL"])(themedLayout);
333
333
  external_scriptjs_default()(url, function () {
334
334
  // eslint-disable-next-line no-underscore-dangle
335
- callback(window.__splunk_layout__);
335
+ if (window.__splunk_layout__) {
336
+ // eslint-disable-next-line no-underscore-dangle
337
+ callback(window.__splunk_layout__);
338
+ } else {
339
+ if (false) {}
340
+
341
+ if (window.requirejs) {
342
+ window.requirejs([url], callback);
343
+ } else {
344
+ if (false) {} // callback with no arguments will trigger the error flow
345
+
346
+
347
+ callback();
348
+ }
349
+ }
336
350
  });
337
351
  }
338
352
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splunk/react-page",
3
- "version": "6.0.3",
3
+ "version": "6.0.4",
4
4
  "description": "Load React components into the latest layout from Splunk Enterprise",
5
5
  "main": "lib/index.js",
6
6
  "license": "Apache-2.0",
@@ -26,9 +26,9 @@
26
26
  "test:cypress:ci": "echo TODO: SUI-3442"
27
27
  },
28
28
  "dependencies": {
29
- "@splunk/react-ui": "^4.15.0",
30
- "@splunk/splunk-utils": "^2.2.4",
31
- "@splunk/themes": "^0.13.1",
29
+ "@splunk/react-ui": "^4.16.3",
30
+ "@splunk/splunk-utils": "^2.3.3",
31
+ "@splunk/themes": "^0.16.0",
32
32
  "@splunk/ui-utils": "^1.5.2",
33
33
  "prop-types": "^15.6.2",
34
34
  "scriptjs": "^2.5.8"