@splunk/react-page 6.0.2 → 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,14 @@
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
+
8
+ 6.0.3 - December 6, 2022
9
+ ----------
10
+ * Optimizes bundle sizes of consumers by reducing footprint of "lodash" (SUI-5090).
11
+
4
12
  6.0.2 - September 6, 2022
5
13
  ----------
6
14
  * Fixes an issue where an external requirejs dependency would fail loading Splunk Core APIs.
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.2",
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",
@@ -9,6 +9,7 @@
9
9
  "build": "cross-env NODE_ENV=production webpack",
10
10
  "docs": "NODE_ENV=production webpack --config docs.gen.webpack.config.js",
11
11
  "docs:publish": "cicd-publish-docs docs --force",
12
+ "docs:publish:external": "cicd-publish-docs docs-external --force --suffix=public",
12
13
  "docs:start": "webpack serve --config docs.gen.webpack.config.js",
13
14
  "eslint": "eslint src --ext \".js,.jsx\"",
14
15
  "eslint:fix": "eslint src --ext \".js, .jsx\" --fix",
@@ -25,23 +26,24 @@
25
26
  "test:cypress:ci": "echo TODO: SUI-3442"
26
27
  },
27
28
  "dependencies": {
28
- "@splunk/react-ui": "^4.12.0",
29
- "@splunk/splunk-utils": "^2.2.2",
30
- "@splunk/themes": "^0.13.0",
31
- "@splunk/ui-utils": "^1.5.0",
29
+ "@splunk/react-ui": "^4.16.3",
30
+ "@splunk/splunk-utils": "^2.3.3",
31
+ "@splunk/themes": "^0.16.0",
32
+ "@splunk/ui-utils": "^1.5.2",
32
33
  "prop-types": "^15.6.2",
33
34
  "scriptjs": "^2.5.8"
34
35
  },
35
36
  "devDependencies": {
36
37
  "@babel/core": "^7.2.0",
37
38
  "@splunk/babel-preset": "^3.0.0",
38
- "@splunk/cicd-tools": "^0.4.0",
39
+ "@splunk/cicd-tools": "^0.5.0",
39
40
  "@splunk/eslint-config": "^4.0.0",
40
41
  "@splunk/stylelint-config": "^4.0.0",
41
42
  "@splunk/wdio-functional-test-runner": "^10.1.0",
42
- "@splunk/webpack-configs": "^5.0.0",
43
+ "@splunk/webpack-configs": "^6.0.0",
43
44
  "babel-eslint": "^10.1.0",
44
45
  "babel-loader": "^8.0.4",
46
+ "babel-plugin-transform-imports": "^2.0.0",
45
47
  "cross-env": "^6.0.3",
46
48
  "eslint": "^7.14.0",
47
49
  "eslint-config-airbnb": "^18.2.1",