@splunk/react-page 7.0.0 → 7.2.0

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,20 @@
1
1
  Change Log
2
2
  ============
3
3
 
4
+ 7.2.0 - April 1, 2025
5
+ ----------
6
+ New Features:
7
+ * Added support for `themeFamily` and `themeDensity` options (SPL-273100).
8
+
9
+ 7.1.0 - July 8, 2024
10
+ ----------
11
+ New Features:
12
+ * Added a new `onLayoutStart` callback (SPL-254150).
13
+ * `AppBar` and `SplunkBar` default placeholder elements are now exported (SPL-254150).
14
+
15
+ API Changes:
16
+ * Internal changes to built output to support multiple exports in future versions. (SUI-6279)
17
+
4
18
  7.0.0 - February 6, 2024
5
19
  ----------
6
20
  API Changes:
@@ -61,161 +61,147 @@
61
61
  e.r(n);
62
62
  // EXPORTS
63
63
  e.d(n, {
64
- default: () => /* binding */ X
64
+ AppBar: () => /* reexport */ b,
65
+ SplunkBar: () => /* reexport */ y,
66
+ default: () => /* binding */ W
65
67
  });
66
68
  // CONCATENATED MODULE: external "react-dom"
67
69
  const r = require("react-dom");
68
- // CONCATENATED MODULE: external "react"
69
- const t = require("react");
70
- var a = e.n(t);
71
- // CONCATENATED MODULE: external "scriptjs"
72
- const i = require("scriptjs");
73
- var o = e.n(i);
74
- // CONCATENATED MODULE: external "@splunk/react-ui/Layer"
75
- const l = require("@splunk/react-ui/Layer");
76
- // CONCATENATED MODULE: external "@splunk/splunk-utils/url"
77
- const u = require("@splunk/splunk-utils/url");
78
- // CONCATENATED MODULE: external "@splunk/themes/SplunkThemeProvider"
79
- const c = require("@splunk/themes/SplunkThemeProvider");
80
- var d = e.n(c);
81
70
  // CONCATENATED MODULE: external "styled-components"
82
- const p = require("styled-components");
83
- var s = e.n(p);
71
+ const t = require("styled-components");
72
+ var a = e.n(t);
84
73
  // CONCATENATED MODULE: external "@splunk/themes"
85
- const v = require("@splunk/themes");
74
+ const i = require("@splunk/themes");
86
75
  // CONCATENATED MODULE: ./src/LoadingStyles.js
87
- function f() {
88
- var e = k([ "\n animation-name: ", ";\n animation-duration: 1.4s;\n animation-iteration-count: infinite;\n animation-fill-mode: both;\n background-color: ", ";\n width: 10px;\n height: 10px;\n border-radius: 5px;\n display: inline-block;\n margin-right: ", ";\n\n &:nth-child(2) {\n animation-delay: 0.2s;\n }\n\n &:nth-child(3) {\n animation-delay: 0.4s;\n }\n" ]);
89
- f = function n() {
76
+ function o() {
77
+ var e = s([ "\n animation-name: ", ";\n animation-duration: 1.4s;\n animation-iteration-count: infinite;\n animation-fill-mode: both;\n background-color: ", ";\n width: 10px;\n height: 10px;\n border-radius: 5px;\n display: inline-block;\n margin-right: ", ";\n\n &:nth-child(2) {\n animation-delay: 0.2s;\n }\n\n &:nth-child(3) {\n animation-delay: 0.4s;\n }\n" ]);
78
+ o = function n() {
90
79
  return e;
91
80
  };
92
81
  return e;
93
82
  }
94
- function m() {
95
- var e = k([ "\n color: ", ";\n padding-top: 30vh;\n text-align: center;\n min-height: 400px;\n" ]);
96
- m = function n() {
83
+ function l() {
84
+ var e = s([ "\n color: ", ";\n padding-top: 30vh;\n text-align: center;\n min-height: 400px;\n" ]);
85
+ l = function n() {
97
86
  return e;
98
87
  };
99
88
  return e;
100
89
  }
101
- function h() {
102
- var e = k([ "\n background-color: ", ";\n min-height: ", "px;\n" ]);
103
- h = function n() {
90
+ function u() {
91
+ var e = s([ "\n background-color: ", ";\n min-height: ", "px;\n" ]);
92
+ u = function n() {
104
93
  return e;
105
94
  };
106
95
  return e;
107
96
  }
108
- function b() {
109
- var e = k([ "\n padding: 0;\n background-color: ", ";\n height: ", "px;\n" ]);
110
- b = function n() {
97
+ function c() {
98
+ var e = s([ "\n padding: 0;\n background-color: ", ";\n height: ", "px;\n" ]);
99
+ c = function n() {
111
100
  return e;
112
101
  };
113
102
  return e;
114
103
  }
115
- function y() {
116
- var e = k([ "\n background-color: ", ";\n position: fixed;\n opacity: 1;\n z-index: 10000;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n" ]);
117
- y = function n() {
104
+ function d() {
105
+ var e = s([ "\n background-color: ", ";\n position: fixed;\n opacity: 1;\n z-index: 10000;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n" ]);
106
+ d = function n() {
118
107
  return e;
119
108
  };
120
109
  return e;
121
110
  }
122
- function g() {
123
- var e = k([ "\n 0% {\n opacity: 0.2;\n }\n\n 20% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0.2;\n }\n" ]);
124
- g = function n() {
111
+ function p() {
112
+ var e = s([ "\n 0% {\n opacity: 0.2;\n }\n\n 20% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0.2;\n }\n" ]);
113
+ p = function n() {
125
114
  return e;
126
115
  };
127
116
  return e;
128
117
  }
129
- function k(e, n) {
130
- if (!n) {
131
- n = e.slice(0);
132
- }
133
- return Object.freeze(Object.defineProperties(e, {
118
+ function s(e, n) {
119
+ return n || (n = e.slice(0)), Object.freeze(Object.defineProperties(e, {
134
120
  raw: {
135
121
  value: Object.freeze(n)
136
122
  }
137
123
  }));
138
124
  }
139
- var S = 45;
140
- var j = 34;
141
- var w = (0, p.keyframes)(g());
142
- var E = s().div(y(), v.variables.backgroundColorPage);
143
- var C = s().div(b(), (0, v.pick)({
144
- prisma: v.variables.backgroundColorSection,
145
- enterprise: v.variables.gray20
146
- }), j);
147
- var B = s().div(h(), (0, v.pick)({
148
- prisma: v.variables.backgroundColorPopup,
149
- enterprise: v.variables.gray30
150
- }), S);
151
- var x = s().div(m(), v.variables.contentColorInverted);
152
- var q = s().div(f(), w, v.variables.neutral500, (0, v.pick)({
153
- prisma: v.variables.spacingMedium,
154
- enterprise: v.variables.spacingHalf
125
+ var v = 45;
126
+ var m = 34;
127
+ var f = (0, t.keyframes)(p());
128
+ var h = a().div(d(), i.variables.backgroundColorPage);
129
+ var y = a().div(c(), (0, i.pick)({
130
+ prisma: i.variables.backgroundColorSection,
131
+ enterprise: i.variables.gray20
132
+ }), m);
133
+ var b = a().div(u(), (0, i.pick)({
134
+ prisma: i.variables.backgroundColorPopup,
135
+ enterprise: i.variables.gray30
136
+ }), v);
137
+ var g = a().div(l(), i.variables.contentColorInverted);
138
+ var k = a().div(o(), f, i.variables.neutral500, (0, i.pick)({
139
+ prisma: i.variables.spacingMedium,
140
+ enterprise: i.variables.spacingSmall
155
141
  }));
142
+ // CONCATENATED MODULE: external "react"
143
+ const S = require("react");
144
+ var w = e.n(S);
145
+ // CONCATENATED MODULE: external "scriptjs"
146
+ const C = require("scriptjs");
147
+ var E = e.n(C);
148
+ // CONCATENATED MODULE: external "@splunk/react-ui/Layer"
149
+ const j = require("@splunk/react-ui/Layer");
150
+ // CONCATENATED MODULE: external "@splunk/splunk-utils/url"
151
+ const B = require("@splunk/splunk-utils/url");
152
+ // CONCATENATED MODULE: external "@splunk/themes/SplunkThemeProvider"
153
+ const q = require("@splunk/themes/SplunkThemeProvider");
154
+ var x = e.n(q);
156
155
  // CONCATENATED MODULE: external "prop-types"
157
156
  const O = require("prop-types");
158
- var A = e.n(O);
157
+ var P = e.n(O);
159
158
  // CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
160
- const P = require("@splunk/react-ui/ScreenReaderContent");
161
- var F = e.n(P);
159
+ const A = require("@splunk/react-ui/ScreenReaderContent");
160
+ var F = e.n(A);
162
161
  // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
163
- const _ = require("@splunk/ui-utils/i18n");
162
+ const L = require("@splunk/ui-utils/i18n");
164
163
  // CONCATENATED MODULE: ./src/Loading.jsx
165
- var L = {
166
- hideAppBar: A().bool,
167
- hideChrome: A().bool,
168
- hideSplunkBar: A().bool,
169
- AppBarFallback: A().elementType,
170
- SplunkBarFallback: A().elementType
171
- };
172
- var T = {
173
- hideAppBar: false,
174
- hideChrome: false,
175
- hideSplunkBar: false,
176
- AppBarFallback: B,
177
- SplunkBarFallback: C
164
+ var _ = {
165
+ hideAppBar: P().bool,
166
+ hideChrome: P().bool,
167
+ hideSplunkBar: P().bool,
168
+ AppBarFallback: P().elementType,
169
+ SplunkBarFallback: P().elementType
178
170
  };
179
- function H(e) {
180
- var n = e.hideAppBar, r = e.hideChrome, t = e.hideSplunkBar, i = e.SplunkBarFallback, o = e.AppBarFallback;
171
+ function T(e) {
172
+ var n = e.AppBarFallback, r = n === void 0 ? b : n, t = e.hideAppBar, a = e.hideChrome, i = e.hideSplunkBar, o = e.SplunkBarFallback, l = o === void 0 ? y : o;
181
173
 
182
- return a().createElement(E, null, !r && !t && a().createElement(i, null), !r && !n && a().createElement(o, null), a().createElement(x, null, a().createElement(q, null), a().createElement(q, null), a().createElement(q, null), a().createElement(F(), null, (0,
183
- _._)("Loading"))));
174
+ return w().createElement(h, null, !a && !i && w().createElement(l, null), !a && !t && w().createElement(r, null), w().createElement(g, null, w().createElement(k, null), w().createElement(k, null), w().createElement(k, null), w().createElement(F(), null, (0,
175
+ L._)("Loading"))));
184
176
  }
185
- H.propTypes = L;
186
- H.defaultProps = T;
187
- /* harmony default export */ const M = H;
177
+ T.propTypes = _;
178
+ /* harmony default export */ const H = T;
188
179
  // CONCATENATED MODULE: ./src/baseLayout.jsx
189
- function z(e, n) {
190
- if (e == null) return {};
191
- var r = G(e, n);
192
- var t, a;
180
+ function M(e, n) {
181
+ if (null == e) return {};
182
+ var r, t, a = z(e, n);
193
183
  if (Object.getOwnPropertySymbols) {
194
184
  var i = Object.getOwnPropertySymbols(e);
195
- for (a = 0; a < i.length; a++) {
196
- t = i[a];
197
- if (n.indexOf(t) >= 0) continue;
198
- if (!Object.prototype.propertyIsEnumerable.call(e, t)) continue;
199
- r[t] = e[t];
185
+ for (t = 0; t < i.length; t++) {
186
+ r = i[t], n.includes(r) || {}.propertyIsEnumerable.call(e, r) && (a[r] = e[r]);
200
187
  }
201
188
  }
202
- return r;
189
+ return a;
203
190
  }
204
- function G(e, n) {
205
- if (e == null) return {};
191
+ function z(e, n) {
192
+ if (null == e) return {};
206
193
  var r = {};
207
- var t = Object.keys(e);
208
- var a, i;
209
- for (i = 0; i < t.length; i++) {
210
- a = t[i];
211
- if (n.indexOf(a) >= 0) continue;
212
- r[a] = e[a];
194
+ for (var t in e) {
195
+ if ({}.hasOwnProperty.call(e, t)) {
196
+ if (n.includes(t)) continue;
197
+ r[t] = e[t];
198
+ }
213
199
  }
214
200
  return r;
215
201
  }
216
- var I = "build/api/layout.js";
217
- var R = "build/api/layout-dark.js";
218
- var U = 'header[data-view="splunkjs/mvc/headerview"]';
202
+ var G = "build/api/layout.js";
203
+ var I = "build/api/layout-dark.js";
204
+ var D = 'header[data-view="splunkjs/mvc/headerview"]';
219
205
  /**
220
206
  * Loads the layout from the server, using requirejs if available on the window and scriptjs if not.
221
207
  *
@@ -223,18 +209,18 @@
223
209
  * @param {object} [options]
224
210
  * @param {String} [options.loader = 'scriptjs'] - Configures the loader used for the loading the layout - available loaders are "scriptjs" and "requirejs".
225
211
  * @private
226
- */ function N(e, n) {
212
+ */ function R(e, n) {
227
213
  var r = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, t = r.loader, a = t === void 0 ? "scriptjs" : t;
228
- var i = e === "dark" ? R : I;
229
- var l = (0, u.createStaticURL)(i);
214
+ var i = e === "dark" ? I : G;
215
+ var o = (0, B.createStaticURL)(i);
230
216
  if (a === "scriptjs") {
231
- o()(l, (function() {
217
+ E()(o, (function() {
232
218
  // eslint-disable-next-line no-underscore-dangle
233
219
  n(window.__splunk_layout__);
234
220
  }));
235
221
  } else if (a === "requirejs") {
236
222
  if (window.requirejs) {
237
- window.requirejs([ l ], n);
223
+ window.requirejs([ o ], n);
238
224
  } else {
239
225
  throw new Error('Error in react-page: options.loader = "requirejs" was set but window.requirejs does not exist.');
240
226
  }
@@ -248,7 +234,7 @@
248
234
  * @param {HTMLDivElement} headerContainer
249
235
  * @param {object} [options]
250
236
  * @private
251
- */ function D(e) {
237
+ */ function U(e) {
252
238
  var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
253
239
  var r = n.hideSplunkBar, t = n.hideAppBar, a = n.headerHeight;
254
240
  var i = e.children[0];
@@ -272,11 +258,11 @@
272
258
  * @param {boolean} useGlobalLayerStack
273
259
  * @param {object} splunkTheme
274
260
  * @private
275
- */ function J(e, n, r) {
261
+ */ function N(e, n, r) {
276
262
  var t = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
277
- var i = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
278
- var o = t ? a().createElement(l.LayerStackGlobalProvider, null, a().createElement(d(), i, e)) : a().createElement(d(), i, e);
279
- return n(o, r);
263
+ var a = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
264
+ var i = t ? w().createElement(j.LayerStackGlobalProvider, null, w().createElement(x(), a, e)) : w().createElement(x(), a, e);
265
+ return n(i, r);
280
266
  }
281
267
  /**
282
268
  * Renders a React element into the Layout API.
@@ -296,70 +282,76 @@
296
282
  * to the edge of the page.
297
283
  * @param {Boolean} [options.useGlobalLayerStack = true] - Wraps elements in @splunk/react-ui's LayerStackGlobalProvider.
298
284
  * @param {String} [options.theme = 'light'] - Used to theme UI elements. Ex. "light" or "dark".
285
+ * @param {String} [options.themeFamily = 'enterprise'] - Ex. Theme family to use for UI elements. Ex. "enterprise" or "prisma".
286
+ * @param {String} [options.themeDensity] - Ex. Theme density to use for UI elements. Ex. "compact" or "comfortable".
299
287
  * @param {String} [options.loader = 'scriptjs'] - Configures the loader used for the loading the layout - available loaders are "scriptjs" and "requirejs".
300
288
  * Change this only if the default loader does not work for your application.
301
289
  * @param {Boolean} [options.lazyLoadLayout = false] - Prioritizes loading the React element and lazily fetches and compiles the layout API (navigation bar).
302
290
  * @param {element} [options.SplunkBarFallback = SplunkBar] - A React element used as a placeholder for the splunk bar while the navigation bar is loading.
303
291
  * @param {element} [options.AppBarFallback = AppBar] - A React element used as a placeholder for the app bar while the navigation bar is loading.
304
292
  * @param {function} [options.onLayoutComplete] - A callback function which executes after layout API is fetched and compiled.
305
- */ function K(e, n) {
293
+ */ function J(e, n) {
306
294
  var r = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
307
- var t = r.useGlobalLayerStack, i = t === void 0 ? true : t, o = r.pageTitle, l = r.theme, u = l === void 0 ? "light" : l, c = r.loader, p = c === void 0 ? "scriptjs" : c, s = z(r, [ "useGlobalLayerStack", "pageTitle", "theme", "loader" ]);
308
- if (o) {
309
- document.title = o;
295
+ var t = r.useGlobalLayerStack, a = t === void 0 ? true : t, i = r.pageTitle, o = r.theme, l = o === void 0 ? "light" : o, u = r.themeDensity, c = r.loader, d = c === void 0 ? "scriptjs" : c, p = M(r, [ "useGlobalLayerStack", "pageTitle", "theme", "themeDensity", "loader" ]);
296
+ if (i) {
297
+ document.title = i;
310
298
  }
311
- var v = s.hideChrome, f = s.hideAppBar, m = s.hideSplunkBar, h = s.SplunkBarFallback, b = h === void 0 ? C : h, y = s.AppBarFallback, g = y === void 0 ? B : y, k = s.lazyLoadLayout, w = k === void 0 ? false : k, E = s.onLayoutComplete;
312
- var x = document.createElement("div");
313
- var q = document.createElement("div");
314
- // The "theme" in enterprise used to be "enterprise" instead of "light"...
315
- var O = u === "light" || u === "enterprise" ? "light" : "dark";
316
- var A = {
317
- family: "enterprise",
318
- colorScheme: O,
319
- density: "comfortable"
299
+ var s = p.hideChrome, f = p.themeFamily, h = f === void 0 ? "enterprise" : f, g = p.hideAppBar, k = p.hideSplunkBar, S = p.SplunkBarFallback, C = S === void 0 ? y : S, E = p.AppBarFallback, j = E === void 0 ? b : E, B = p.lazyLoadLayout, q = B === void 0 ? false : B, O = p.onLayoutComplete, P = p.onLayoutStart;
300
+ var A = document.createElement("div");
301
+ var F = document.createElement("div");
302
+ P === null || P === void 0 ? void 0 : P({
303
+ headerContainer: F,
304
+ bodyContainer: A
305
+ });
306
+ // The "theme" in enterprise used to be "enterprise" instead of "light"...
307
+ var L = l === "light" || l === "enterprise" ? "light" : "dark";
308
+ var _ = {
309
+ family: h,
310
+ colorScheme: L,
311
+ density: u || (h === "prisma" ? "compact" : "comfortable")
320
312
  };
321
- var P;
322
- var F;
323
- if (w) {
313
+ var T;
314
+ var z;
315
+ if (q) {
324
316
  // render the React app immediately without waiting for layout API
325
- if (!v) {
326
- document.body.appendChild(q);
327
- F = n( a().createElement(a().Fragment, null, !m && a().createElement(b, null), !f && a().createElement(g, null)), q);
328
- // explicitly set height and background of header container to avoid layout and color shift when fallback gets replaced
329
- var _ = q.offsetHeight;
330
- var L = D(q, {
331
- hideSplunkBar: m,
332
- hideAppBar: f,
333
- headerHeight: _,
334
- AppBarFallback: g,
335
- SplunkBarFallback: b
317
+ if (!s) {
318
+ document.body.appendChild(F);
319
+ z = n( w().createElement(w().Fragment, null, !k && w().createElement(C, null), !g && w().createElement(j, null)), F);
320
+ // explicitly set height and background of header container to avoid layout and color shift when fallback gets replaced
321
+ var G = F.offsetHeight;
322
+ var I = U(F, {
323
+ hideSplunkBar: k,
324
+ hideAppBar: g,
325
+ headerHeight: G,
326
+ AppBarFallback: j,
327
+ SplunkBarFallback: C
336
328
  });
337
- q.style.height = "".concat(_, "px");
338
- q.style.background = "".concat(L);
329
+ F.style.height = "".concat(G, "px");
330
+ F.style.background = "".concat(I);
339
331
  }
340
- document.body.appendChild(x);
341
- P = J(e, n, x, i, A);
332
+ document.body.appendChild(A);
333
+ T = N(e, n, A, a, _);
342
334
  } else {
343
- document.body.appendChild(x);
344
- P = n( a().createElement(d(), A, a().createElement(M, s)), x);
335
+ document.body.appendChild(A);
336
+ T = n( w().createElement(x(), _, w().createElement(H, p)), A);
345
337
  }
346
- N(u, (function(r) {
338
+ R(l, (function(r) {
347
339
  var t;
348
340
  if (r) {
349
- t = r.create(s).getContainerElement();
350
- if (s.layout === "fixed") {
341
+ t = r.create(p).getContainerElement();
342
+ if (p.layout === "fixed") {
351
343
  // the above create method adds flex: 1 0 0
352
344
  // IE 11 disregards 0px shorthand for flex-basis component.
353
345
  // flex-basis 0% is better than 0px because css minification can remove px
354
346
  if (!t.style.flex || t.style.flex === "1 0 0px") {
355
347
  t.style.flex = "1 0 0%";
356
348
  }
357
- // all elements in the hierarchy must have 'overflow: hidden' for children
349
+ // all elements in the hierarchy must have 'overflow: hidden' for children
358
350
  // to support scrolling correctly.
359
351
  if (!t.style.overflow) {
360
352
  t.style.overflow = "hidden";
361
353
  }
362
- // splunk hijacks the width of the body when printing, so we have to force width to the size
354
+ // splunk hijacks the width of the body when printing, so we have to force width to the size
363
355
  // of the viewport so that things print at the correct width
364
356
  if (!t.style.width) {
365
357
  t.style.width = "100vw";
@@ -371,34 +363,34 @@
371
363
  t = document.createElement("div");
372
364
  document.body.appendChild(t);
373
365
  }
374
- if (w) {
375
- if (!v) {
366
+ if (q) {
367
+ if (!s) {
376
368
  // replace placeholder nav bar with real nav bar
377
- F.unmount(q);
378
- var a = document.querySelector(U);
379
- var o = (!v && !m ? j : 0) + (!v && !f ? S : 0);
380
- // set a min-height for basic nav bar components and auto height for any additional components like global banner
381
- q.style.minHeight = "".concat(o, "px");
382
- q.style.height = "auto";
383
- q.appendChild(a);
369
+ z.unmount(F);
370
+ var i = document.querySelector(D);
371
+ var o = (!s && !k ? m : 0) + (!s && !g ? v : 0);
372
+ // set a min-height for basic nav bar components and auto height for any additional components like global banner
373
+ F.style.minHeight = "".concat(o, "px");
374
+ F.style.height = "auto";
375
+ F.appendChild(i);
384
376
  }
385
- t.appendChild(x);
386
- E === null || E === void 0 ? void 0 : E();
377
+ t.appendChild(A);
378
+ O === null || O === void 0 ? void 0 : O();
387
379
  } else {
388
380
  setTimeout((function() {
389
- P.unmount(x);
390
- P = J(e, n, x, i, A);
391
- t.appendChild(x);
392
- E === null || E === void 0 ? void 0 : E();
381
+ T.unmount(A);
382
+ T = N(e, n, A, a, _);
383
+ t.appendChild(A);
384
+ O === null || O === void 0 ? void 0 : O();
393
385
  }), 30);
394
386
  }
395
387
  }), {
396
- loader: p
388
+ loader: d
397
389
  });
398
390
  }
399
- /* harmony default export */ const Q = K;
391
+ /* harmony default export */ const K = J;
400
392
  // CONCATENATED MODULE: ./src/index.jsx
401
- var V = function e(n, t) {
393
+ var Q = function e(n, t) {
402
394
  (0, r.render)(n, t);
403
395
  return {
404
396
  unmount: function e() {
@@ -423,15 +415,18 @@
423
415
  * to the edge of the page.
424
416
  * @param {Boolean} [options.useGlobalLayerStack = true] - Wraps elements in @splunk/react-ui's LayerStackGlobalProvider.
425
417
  * @param {String} [options.theme = 'light'] - Used to theme UI elements. Ex. "light" or "dark".
418
+ * @param {String} [options.themeFamily = 'enterprise'] - Ex. Theme family to use for UI elements. Ex. "enterprise" or "prisma".
419
+ * @param {String} [options.themeDensity] - Ex. Theme density to use for UI elements. Ex. "compact" or "comfortable".
426
420
  * @param {String} [options.loader = 'scriptjs'] - Configures the loader used for the loading the layout - available loaders are "scriptjs" and "requirejs".
427
421
  * Change this only if the default loader does not work for your application.
428
422
  * @param {Boolean} [options.lazyLoadLayout = false] - Prioritizes loading the React element and lazily fetches and compiles the layout API (navigation bar).
429
423
  * @param {element} [options.SplunkBarFallback = SplunkBar] - A React element used as a placeholder for the splunk bar while the navigation bar is loading.
430
424
  * @param {element} [options.AppBarFallback = AppBar] - A React element used as a placeholder for the app bar while the navigation bar is loading.
431
425
  * @param {function} [options.onLayoutComplete] - A callback function which executes after layout API is fetched and compiled.
432
- */ function W(e, n) {
433
- Q(e, V, n);
426
+ * @param {function} [options.onLayoutStart] - A callback function which executes once the layout starts to render
427
+ */ function V(e, n) {
428
+ K(e, Q, n);
434
429
  }
435
- /* harmony default export */ const X = W;
430
+ /* harmony default export */ const W = V;
436
431
  module.exports = n;
437
432
  /******/})();
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@splunk/react-page",
3
- "version": "7.0.0",
3
+ "version": "7.2.0",
4
4
  "description": "Load React components into the latest layout from Splunk Enterprise",
5
- "main": "lib/index.js",
6
5
  "license": "Apache-2.0",
7
6
  "author": "Splunk Inc.",
8
7
  "scripts": {
@@ -22,37 +21,38 @@
22
21
  "test:cypress:ci": "node src/tests/run-cypress-tests.js"
23
22
  },
24
23
  "dependencies": {
25
- "@splunk/react-ui": "^4.25.0",
26
- "@splunk/splunk-utils": "^3.0.0",
27
- "@splunk/themes": "^0.16.4",
28
- "@splunk/ui-utils": "^1.6.0",
24
+ "@splunk/react-ui": "^4.44.0",
25
+ "@splunk/splunk-utils": "^3.2.0",
26
+ "@splunk/themes": "^0.23.0",
27
+ "@splunk/ui-utils": "^1.8.0",
29
28
  "prop-types": "^15.6.2",
30
29
  "scriptjs": "^2.5.8"
31
30
  },
32
31
  "devDependencies": {
33
- "@babel/core": "^7.2.0",
32
+ "@babel/core": "^7.16.0",
33
+ "@babel/eslint-parser": "^7.16.0",
34
34
  "@splunk/babel-preset": "^4.0.0",
35
- "@splunk/eslint-config": "^4.0.0",
36
- "@splunk/stylelint-config": "^4.0.0",
35
+ "@splunk/eslint-config": "^5.0.0",
36
+ "@splunk/react-docs": "1.0.0-beta.21",
37
+ "@splunk/stylelint-config": "^5.0.0",
37
38
  "@splunk/webpack-configs": "^7.0.2",
38
- "babel-eslint": "^10.1.0",
39
39
  "babel-loader": "^8.3.0",
40
40
  "babel-plugin-transform-imports": "^2.0.0",
41
41
  "cross-env": "^6.0.3",
42
42
  "cypress": "^12.17.1",
43
- "eslint": "^7.14.0",
44
- "eslint-config-airbnb": "^18.2.1",
45
- "eslint-config-prettier": "^6.15.0",
43
+ "eslint": "^8.57.1",
44
+ "eslint-config-airbnb": "^19.0.4",
45
+ "eslint-config-prettier": "^9.1.0",
46
46
  "eslint-import-resolver-webpack": "^0.13.4",
47
- "eslint-plugin-import": "^2.22.1",
48
- "eslint-plugin-jsx-a11y": "^6.4.1",
49
- "eslint-plugin-react": "^7.21.5",
50
- "eslint-plugin-react-hooks": "^4.2.0",
47
+ "eslint-plugin-import": "^2.30.1",
48
+ "eslint-plugin-jsx-a11y": "^6.10.0",
49
+ "eslint-plugin-react": "^7.36.1",
50
+ "eslint-plugin-react-hooks": "^4.6.2",
51
51
  "execa": "^4.0.0",
52
52
  "react": "^16.12.0",
53
53
  "react-dom": "^16.12.0",
54
54
  "styled-components": "^5.3.10",
55
- "stylelint": "^13.0.0",
55
+ "stylelint": "^15.11.0",
56
56
  "webpack": "^5.88.2",
57
57
  "webpack-cli": "^5.1.4",
58
58
  "webpack-dev-server": "^4.15.1",