@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 +14 -0
- package/{lib/index.js → index.js} +165 -170
- package/package.json +18 -18
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
|
-
|
|
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
|
|
83
|
-
var
|
|
71
|
+
const t = require("styled-components");
|
|
72
|
+
var a = e.n(t);
|
|
84
73
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
85
|
-
const
|
|
74
|
+
const i = require("@splunk/themes");
|
|
86
75
|
// CONCATENATED MODULE: ./src/LoadingStyles.js
|
|
87
|
-
function
|
|
88
|
-
var e =
|
|
89
|
-
|
|
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
|
|
95
|
-
var e =
|
|
96
|
-
|
|
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
|
|
102
|
-
var e =
|
|
103
|
-
|
|
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
|
|
109
|
-
var e =
|
|
110
|
-
|
|
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
|
|
116
|
-
var e =
|
|
117
|
-
|
|
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
|
|
123
|
-
var e =
|
|
124
|
-
|
|
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
|
|
130
|
-
|
|
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
|
|
140
|
-
var
|
|
141
|
-
var
|
|
142
|
-
var
|
|
143
|
-
var
|
|
144
|
-
prisma:
|
|
145
|
-
enterprise:
|
|
146
|
-
}),
|
|
147
|
-
var
|
|
148
|
-
prisma:
|
|
149
|
-
enterprise:
|
|
150
|
-
}),
|
|
151
|
-
var
|
|
152
|
-
var
|
|
153
|
-
prisma:
|
|
154
|
-
enterprise:
|
|
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
|
|
157
|
+
var P = e.n(O);
|
|
159
158
|
// CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
|
|
160
|
-
const
|
|
161
|
-
var F = e.n(
|
|
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
|
|
162
|
+
const L = require("@splunk/ui-utils/i18n");
|
|
164
163
|
// CONCATENATED MODULE: ./src/Loading.jsx
|
|
165
|
-
var
|
|
166
|
-
hideAppBar:
|
|
167
|
-
hideChrome:
|
|
168
|
-
hideSplunkBar:
|
|
169
|
-
AppBarFallback:
|
|
170
|
-
SplunkBarFallback:
|
|
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
|
|
180
|
-
var n = e.
|
|
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
|
|
183
|
-
|
|
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
|
-
|
|
186
|
-
H
|
|
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
|
|
190
|
-
if (
|
|
191
|
-
var r =
|
|
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 (
|
|
196
|
-
|
|
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
|
|
189
|
+
return a;
|
|
203
190
|
}
|
|
204
|
-
function
|
|
205
|
-
if (
|
|
191
|
+
function z(e, n) {
|
|
192
|
+
if (null == e) return {};
|
|
206
193
|
var r = {};
|
|
207
|
-
var t
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
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
|
|
217
|
-
var
|
|
218
|
-
var
|
|
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
|
|
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" ?
|
|
229
|
-
var
|
|
214
|
+
var i = e === "dark" ? I : G;
|
|
215
|
+
var o = (0, B.createStaticURL)(i);
|
|
230
216
|
if (a === "scriptjs") {
|
|
231
|
-
|
|
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([
|
|
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
|
|
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
|
|
261
|
+
*/ function N(e, n, r) {
|
|
276
262
|
var t = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
277
|
-
var
|
|
278
|
-
var
|
|
279
|
-
return n(
|
|
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
|
|
293
|
+
*/ function J(e, n) {
|
|
306
294
|
var r = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
307
|
-
var t = r.useGlobalLayerStack,
|
|
308
|
-
if (
|
|
309
|
-
document.title =
|
|
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
|
|
312
|
-
var
|
|
313
|
-
var
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
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
|
|
322
|
-
var
|
|
323
|
-
if (
|
|
313
|
+
var T;
|
|
314
|
+
var z;
|
|
315
|
+
if (q) {
|
|
324
316
|
// render the React app immediately without waiting for layout API
|
|
325
|
-
if (!
|
|
326
|
-
document.body.appendChild(
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
var
|
|
330
|
-
var
|
|
331
|
-
hideSplunkBar:
|
|
332
|
-
hideAppBar:
|
|
333
|
-
headerHeight:
|
|
334
|
-
AppBarFallback:
|
|
335
|
-
SplunkBarFallback:
|
|
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
|
-
|
|
338
|
-
|
|
329
|
+
F.style.height = "".concat(G, "px");
|
|
330
|
+
F.style.background = "".concat(I);
|
|
339
331
|
}
|
|
340
|
-
document.body.appendChild(
|
|
341
|
-
|
|
332
|
+
document.body.appendChild(A);
|
|
333
|
+
T = N(e, n, A, a, _);
|
|
342
334
|
} else {
|
|
343
|
-
document.body.appendChild(
|
|
344
|
-
|
|
335
|
+
document.body.appendChild(A);
|
|
336
|
+
T = n( w().createElement(x(), _, w().createElement(H, p)), A);
|
|
345
337
|
}
|
|
346
|
-
|
|
338
|
+
R(l, (function(r) {
|
|
347
339
|
var t;
|
|
348
340
|
if (r) {
|
|
349
|
-
t = r.create(
|
|
350
|
-
if (
|
|
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
|
-
|
|
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
|
-
|
|
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 (
|
|
375
|
-
if (!
|
|
366
|
+
if (q) {
|
|
367
|
+
if (!s) {
|
|
376
368
|
// replace placeholder nav bar with real nav bar
|
|
377
|
-
|
|
378
|
-
var
|
|
379
|
-
var o = (!
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
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(
|
|
386
|
-
|
|
377
|
+
t.appendChild(A);
|
|
378
|
+
O === null || O === void 0 ? void 0 : O();
|
|
387
379
|
} else {
|
|
388
380
|
setTimeout((function() {
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
t.appendChild(
|
|
392
|
-
|
|
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:
|
|
388
|
+
loader: d
|
|
397
389
|
});
|
|
398
390
|
}
|
|
399
|
-
/* harmony default export */ const
|
|
391
|
+
/* harmony default export */ const K = J;
|
|
400
392
|
// CONCATENATED MODULE: ./src/index.jsx
|
|
401
|
-
var
|
|
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
|
-
|
|
433
|
-
|
|
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
|
|
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.
|
|
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.
|
|
26
|
-
"@splunk/splunk-utils": "^3.
|
|
27
|
-
"@splunk/themes": "^0.
|
|
28
|
-
"@splunk/ui-utils": "^1.
|
|
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.
|
|
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": "^
|
|
36
|
-
"@splunk/
|
|
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": "^
|
|
44
|
-
"eslint-config-airbnb": "^
|
|
45
|
-
"eslint-config-prettier": "^
|
|
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.
|
|
48
|
-
"eslint-plugin-jsx-a11y": "^6.
|
|
49
|
-
"eslint-plugin-react": "^7.
|
|
50
|
-
"eslint-plugin-react-hooks": "^4.2
|
|
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": "^
|
|
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",
|