@hari_digitus/sms-ui-library 7.0.5 → 9.0.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/Readme.md +78 -0
- package/dist/SideNavBar.cjs.js +10 -10
- package/dist/SideNavBar.es.js +315 -312
- package/dist/types/icons/icon.d.ts +6 -0
- package/package.json +2 -2
package/dist/SideNavBar.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import We, { createContext as pr, useState as V, useContext as vr, useEffect as hr } from "react";
|
|
2
|
-
var
|
|
2
|
+
var ue = { exports: {} }, Q = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.min.js
|
|
@@ -13,13 +13,13 @@ var Fe;
|
|
|
13
13
|
function mr() {
|
|
14
14
|
if (Fe) return Q;
|
|
15
15
|
Fe = 1;
|
|
16
|
-
var w = We,
|
|
16
|
+
var w = We, T = Symbol.for("react.element"), h = Symbol.for("react.fragment"), _ = Object.prototype.hasOwnProperty, k = w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, P = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
17
17
|
function N(m, d, I) {
|
|
18
|
-
var
|
|
18
|
+
var g, j = {}, S = null, W = null;
|
|
19
19
|
I !== void 0 && (S = "" + I), d.key !== void 0 && (S = "" + d.key), d.ref !== void 0 && (W = d.ref);
|
|
20
|
-
for (
|
|
21
|
-
if (m && m.defaultProps) for (
|
|
22
|
-
return { $$typeof:
|
|
20
|
+
for (g in d) _.call(d, g) && !P.hasOwnProperty(g) && (j[g] = d[g]);
|
|
21
|
+
if (m && m.defaultProps) for (g in d = m.defaultProps, d) j[g] === void 0 && (j[g] = d[g]);
|
|
22
|
+
return { $$typeof: T, type: m, key: S, ref: W, props: j, _owner: k.current };
|
|
23
23
|
}
|
|
24
24
|
return Q.Fragment = h, Q.jsx = N, Q.jsxs = N, Q;
|
|
25
25
|
}
|
|
@@ -34,53 +34,53 @@ var ee = {};
|
|
|
34
34
|
* LICENSE file in the root directory of this source tree.
|
|
35
35
|
*/
|
|
36
36
|
var $e;
|
|
37
|
-
function
|
|
37
|
+
function gr() {
|
|
38
38
|
return $e || ($e = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
39
|
-
var w = We,
|
|
39
|
+
var w = We, T = Symbol.for("react.element"), h = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), k = Symbol.for("react.strict_mode"), P = Symbol.for("react.profiler"), N = Symbol.for("react.provider"), m = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), I = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), j = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), W = Symbol.for("react.offscreen"), b = Symbol.iterator, re = "@@iterator";
|
|
40
40
|
function Y(e) {
|
|
41
41
|
if (e === null || typeof e != "object")
|
|
42
42
|
return null;
|
|
43
|
-
var r =
|
|
43
|
+
var r = b && e[b] || e[re];
|
|
44
44
|
return typeof r == "function" ? r : null;
|
|
45
45
|
}
|
|
46
46
|
var L = w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
47
47
|
function p(e) {
|
|
48
48
|
{
|
|
49
|
-
for (var r = arguments.length,
|
|
50
|
-
|
|
51
|
-
fe("error", e,
|
|
49
|
+
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
|
|
50
|
+
n[a - 1] = arguments[a];
|
|
51
|
+
fe("error", e, n);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function fe(e, r,
|
|
54
|
+
function fe(e, r, n) {
|
|
55
55
|
{
|
|
56
56
|
var a = L.ReactDebugCurrentFrame, s = a.getStackAddendum();
|
|
57
|
-
s !== "" && (r += "%s",
|
|
58
|
-
var
|
|
57
|
+
s !== "" && (r += "%s", n = n.concat([s]));
|
|
58
|
+
var c = n.map(function(o) {
|
|
59
59
|
return String(o);
|
|
60
60
|
});
|
|
61
|
-
|
|
61
|
+
c.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, c);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
var de = !1, ne = !1, pe = !1, te = !1, ae = !1, F;
|
|
65
65
|
F = Symbol.for("react.module.reference");
|
|
66
66
|
function J(e) {
|
|
67
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
67
|
+
return !!(typeof e == "string" || typeof e == "function" || e === _ || e === P || ae || e === k || e === I || e === g || te || e === W || de || ne || pe || typeof e == "object" && e !== null && (e.$$typeof === S || e.$$typeof === j || e.$$typeof === N || e.$$typeof === m || e.$$typeof === d || // This needs to include all possible module reference object
|
|
68
68
|
// types supported by any Flight configuration anywhere since
|
|
69
69
|
// we don't know which Flight build this will end up being used
|
|
70
70
|
// with.
|
|
71
71
|
e.$$typeof === F || e.getModuleId !== void 0));
|
|
72
72
|
}
|
|
73
|
-
function ie(e, r,
|
|
73
|
+
function ie(e, r, n) {
|
|
74
74
|
var a = e.displayName;
|
|
75
75
|
if (a)
|
|
76
76
|
return a;
|
|
77
77
|
var s = r.displayName || r.name || "";
|
|
78
|
-
return s !== "" ?
|
|
78
|
+
return s !== "" ? n + "(" + s + ")" : n;
|
|
79
79
|
}
|
|
80
80
|
function q(e) {
|
|
81
81
|
return e.displayName || "Context";
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function O(e) {
|
|
84
84
|
if (e == null)
|
|
85
85
|
return null;
|
|
86
86
|
if (typeof e.tag == "number" && p("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
@@ -88,7 +88,7 @@ function xr() {
|
|
|
88
88
|
if (typeof e == "string")
|
|
89
89
|
return e;
|
|
90
90
|
switch (e) {
|
|
91
|
-
case
|
|
91
|
+
case _:
|
|
92
92
|
return "Fragment";
|
|
93
93
|
case h:
|
|
94
94
|
return "Portal";
|
|
@@ -98,7 +98,7 @@ function xr() {
|
|
|
98
98
|
return "StrictMode";
|
|
99
99
|
case I:
|
|
100
100
|
return "Suspense";
|
|
101
|
-
case
|
|
101
|
+
case g:
|
|
102
102
|
return "SuspenseList";
|
|
103
103
|
}
|
|
104
104
|
if (typeof e == "object")
|
|
@@ -107,17 +107,17 @@ function xr() {
|
|
|
107
107
|
var r = e;
|
|
108
108
|
return q(r) + ".Consumer";
|
|
109
109
|
case N:
|
|
110
|
-
var
|
|
111
|
-
return q(
|
|
110
|
+
var n = e;
|
|
111
|
+
return q(n._context) + ".Provider";
|
|
112
112
|
case d:
|
|
113
113
|
return ie(e, e.render, "ForwardRef");
|
|
114
|
-
case
|
|
114
|
+
case j:
|
|
115
115
|
var a = e.displayName || null;
|
|
116
|
-
return a !== null ? a :
|
|
116
|
+
return a !== null ? a : O(e.type) || "Memo";
|
|
117
117
|
case S: {
|
|
118
|
-
var s = e,
|
|
118
|
+
var s = e, c = s._payload, o = s._init;
|
|
119
119
|
try {
|
|
120
|
-
return
|
|
120
|
+
return O(o(c));
|
|
121
121
|
} catch {
|
|
122
122
|
return null;
|
|
123
123
|
}
|
|
@@ -125,14 +125,14 @@ function xr() {
|
|
|
125
125
|
}
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
128
|
-
var D = Object.assign, $ = 0, v,
|
|
128
|
+
var D = Object.assign, $ = 0, v, C, A, l, H, K, G;
|
|
129
129
|
function z() {
|
|
130
130
|
}
|
|
131
131
|
z.__reactDisabledLog = !0;
|
|
132
|
-
function
|
|
132
|
+
function x() {
|
|
133
133
|
{
|
|
134
134
|
if ($ === 0) {
|
|
135
|
-
v = console.log,
|
|
135
|
+
v = console.log, C = console.info, A = console.warn, l = console.error, H = console.group, K = console.groupCollapsed, G = console.groupEnd;
|
|
136
136
|
var e = {
|
|
137
137
|
configurable: !0,
|
|
138
138
|
enumerable: !0,
|
|
@@ -165,7 +165,7 @@ function xr() {
|
|
|
165
165
|
value: v
|
|
166
166
|
}),
|
|
167
167
|
info: D({}, e, {
|
|
168
|
-
value:
|
|
168
|
+
value: C
|
|
169
169
|
}),
|
|
170
170
|
warn: D({}, e, {
|
|
171
171
|
value: A
|
|
@@ -188,7 +188,7 @@ function xr() {
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
var X = L.ReactCurrentDispatcher, he;
|
|
191
|
-
function oe(e, r,
|
|
191
|
+
function oe(e, r, n) {
|
|
192
192
|
{
|
|
193
193
|
if (he === void 0)
|
|
194
194
|
try {
|
|
@@ -206,20 +206,20 @@ function xr() {
|
|
|
206
206
|
var Be = typeof WeakMap == "function" ? WeakMap : Map;
|
|
207
207
|
se = new Be();
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function je(e, r) {
|
|
210
210
|
if (!e || me)
|
|
211
211
|
return "";
|
|
212
212
|
{
|
|
213
|
-
var
|
|
214
|
-
if (
|
|
215
|
-
return
|
|
213
|
+
var n = se.get(e);
|
|
214
|
+
if (n !== void 0)
|
|
215
|
+
return n;
|
|
216
216
|
}
|
|
217
217
|
var a;
|
|
218
218
|
me = !0;
|
|
219
219
|
var s = Error.prepareStackTrace;
|
|
220
220
|
Error.prepareStackTrace = void 0;
|
|
221
|
-
var
|
|
222
|
-
|
|
221
|
+
var c;
|
|
222
|
+
c = X.current, X.current = null, x();
|
|
223
223
|
try {
|
|
224
224
|
if (r) {
|
|
225
225
|
var o = function() {
|
|
@@ -232,144 +232,144 @@ function xr() {
|
|
|
232
232
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
233
233
|
try {
|
|
234
234
|
Reflect.construct(o, []);
|
|
235
|
-
} catch (
|
|
236
|
-
a =
|
|
235
|
+
} catch (E) {
|
|
236
|
+
a = E;
|
|
237
237
|
}
|
|
238
238
|
Reflect.construct(e, [], o);
|
|
239
239
|
} else {
|
|
240
240
|
try {
|
|
241
241
|
o.call();
|
|
242
|
-
} catch (
|
|
243
|
-
a =
|
|
242
|
+
} catch (E) {
|
|
243
|
+
a = E;
|
|
244
244
|
}
|
|
245
245
|
e.call(o.prototype);
|
|
246
246
|
}
|
|
247
247
|
} else {
|
|
248
248
|
try {
|
|
249
249
|
throw Error();
|
|
250
|
-
} catch (
|
|
251
|
-
a =
|
|
250
|
+
} catch (E) {
|
|
251
|
+
a = E;
|
|
252
252
|
}
|
|
253
253
|
e();
|
|
254
254
|
}
|
|
255
|
-
} catch (
|
|
256
|
-
if (
|
|
257
|
-
for (var i =
|
|
258
|
-
`),
|
|
259
|
-
`),
|
|
255
|
+
} catch (E) {
|
|
256
|
+
if (E && a && typeof E.stack == "string") {
|
|
257
|
+
for (var i = E.stack.split(`
|
|
258
|
+
`), y = a.stack.split(`
|
|
259
|
+
`), u = i.length - 1, f = y.length - 1; u >= 1 && f >= 0 && i[u] !== y[f]; )
|
|
260
260
|
f--;
|
|
261
|
-
for (;
|
|
262
|
-
if (i[
|
|
263
|
-
if (
|
|
261
|
+
for (; u >= 1 && f >= 0; u--, f--)
|
|
262
|
+
if (i[u] !== y[f]) {
|
|
263
|
+
if (u !== 1 || f !== 1)
|
|
264
264
|
do
|
|
265
|
-
if (
|
|
265
|
+
if (u--, f--, f < 0 || i[u] !== y[f]) {
|
|
266
266
|
var R = `
|
|
267
|
-
` + i[
|
|
267
|
+
` + i[u].replace(" at new ", " at ");
|
|
268
268
|
return e.displayName && R.includes("<anonymous>") && (R = R.replace("<anonymous>", e.displayName)), typeof e == "function" && se.set(e, R), R;
|
|
269
269
|
}
|
|
270
|
-
while (
|
|
270
|
+
while (u >= 1 && f >= 0);
|
|
271
271
|
break;
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
} finally {
|
|
275
|
-
me = !1, X.current =
|
|
275
|
+
me = !1, X.current = c, ve(), Error.prepareStackTrace = s;
|
|
276
276
|
}
|
|
277
277
|
var U = e ? e.displayName || e.name : "", M = U ? oe(U) : "";
|
|
278
278
|
return typeof e == "function" && se.set(e, M), M;
|
|
279
279
|
}
|
|
280
|
-
function Ue(e, r,
|
|
281
|
-
return
|
|
280
|
+
function Ue(e, r, n) {
|
|
281
|
+
return je(e, !1);
|
|
282
282
|
}
|
|
283
283
|
function Ve(e) {
|
|
284
284
|
var r = e.prototype;
|
|
285
285
|
return !!(r && r.isReactComponent);
|
|
286
286
|
}
|
|
287
|
-
function le(e, r,
|
|
287
|
+
function le(e, r, n) {
|
|
288
288
|
if (e == null)
|
|
289
289
|
return "";
|
|
290
290
|
if (typeof e == "function")
|
|
291
|
-
return
|
|
291
|
+
return je(e, Ve(e));
|
|
292
292
|
if (typeof e == "string")
|
|
293
293
|
return oe(e);
|
|
294
294
|
switch (e) {
|
|
295
295
|
case I:
|
|
296
296
|
return oe("Suspense");
|
|
297
|
-
case
|
|
297
|
+
case g:
|
|
298
298
|
return oe("SuspenseList");
|
|
299
299
|
}
|
|
300
300
|
if (typeof e == "object")
|
|
301
301
|
switch (e.$$typeof) {
|
|
302
302
|
case d:
|
|
303
303
|
return Ue(e.render);
|
|
304
|
-
case
|
|
305
|
-
return le(e.type, r,
|
|
304
|
+
case j:
|
|
305
|
+
return le(e.type, r, n);
|
|
306
306
|
case S: {
|
|
307
|
-
var a = e, s = a._payload,
|
|
307
|
+
var a = e, s = a._payload, c = a._init;
|
|
308
308
|
try {
|
|
309
|
-
return le(
|
|
309
|
+
return le(c(s), r, n);
|
|
310
310
|
} catch {
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
return "";
|
|
315
315
|
}
|
|
316
|
-
var Z = Object.prototype.hasOwnProperty, Re = {},
|
|
317
|
-
function
|
|
316
|
+
var Z = Object.prototype.hasOwnProperty, Re = {}, _e = L.ReactDebugCurrentFrame;
|
|
317
|
+
function ce(e) {
|
|
318
318
|
if (e) {
|
|
319
|
-
var r = e._owner,
|
|
320
|
-
|
|
319
|
+
var r = e._owner, n = le(e.type, e._source, r ? r.type : null);
|
|
320
|
+
_e.setExtraStackFrame(n);
|
|
321
321
|
} else
|
|
322
|
-
|
|
322
|
+
_e.setExtraStackFrame(null);
|
|
323
323
|
}
|
|
324
|
-
function Je(e, r,
|
|
324
|
+
function Je(e, r, n, a, s) {
|
|
325
325
|
{
|
|
326
|
-
var
|
|
326
|
+
var c = Function.call.bind(Z);
|
|
327
327
|
for (var o in e)
|
|
328
|
-
if (
|
|
328
|
+
if (c(e, o)) {
|
|
329
329
|
var i = void 0;
|
|
330
330
|
try {
|
|
331
331
|
if (typeof e[o] != "function") {
|
|
332
|
-
var
|
|
333
|
-
throw
|
|
332
|
+
var y = Error((a || "React class") + ": " + n + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
333
|
+
throw y.name = "Invariant Violation", y;
|
|
334
334
|
}
|
|
335
|
-
i = e[o](r, o, a,
|
|
336
|
-
} catch (
|
|
337
|
-
i =
|
|
335
|
+
i = e[o](r, o, a, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
336
|
+
} catch (u) {
|
|
337
|
+
i = u;
|
|
338
338
|
}
|
|
339
|
-
i && !(i instanceof Error) && (
|
|
339
|
+
i && !(i instanceof Error) && (ce(s), p("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", a || "React class", n, o, typeof i), ce(null)), i instanceof Error && !(i.message in Re) && (Re[i.message] = !0, ce(s), p("Failed %s type: %s", n, i.message), ce(null));
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
var qe = Array.isArray;
|
|
344
|
-
function
|
|
344
|
+
function ge(e) {
|
|
345
345
|
return qe(e);
|
|
346
346
|
}
|
|
347
347
|
function He(e) {
|
|
348
348
|
{
|
|
349
|
-
var r = typeof Symbol == "function" && Symbol.toStringTag,
|
|
350
|
-
return
|
|
349
|
+
var r = typeof Symbol == "function" && Symbol.toStringTag, n = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
350
|
+
return n;
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
function Ke(e) {
|
|
354
354
|
try {
|
|
355
|
-
return
|
|
355
|
+
return Ce(e), !1;
|
|
356
356
|
} catch {
|
|
357
357
|
return !0;
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function Ce(e) {
|
|
361
361
|
return "" + e;
|
|
362
362
|
}
|
|
363
363
|
function we(e) {
|
|
364
364
|
if (Ke(e))
|
|
365
|
-
return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", He(e)),
|
|
365
|
+
return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", He(e)), Ce(e);
|
|
366
366
|
}
|
|
367
367
|
var Se = L.ReactCurrentOwner, Ge = {
|
|
368
368
|
key: !0,
|
|
369
369
|
ref: !0,
|
|
370
370
|
__self: !0,
|
|
371
371
|
__source: !0
|
|
372
|
-
},
|
|
372
|
+
}, Oe, Te;
|
|
373
373
|
function ze(e) {
|
|
374
374
|
if (Z.call(e, "ref")) {
|
|
375
375
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
@@ -391,37 +391,37 @@ function xr() {
|
|
|
391
391
|
}
|
|
392
392
|
function Qe(e, r) {
|
|
393
393
|
{
|
|
394
|
-
var
|
|
395
|
-
|
|
394
|
+
var n = function() {
|
|
395
|
+
Oe || (Oe = !0, p("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
396
396
|
};
|
|
397
|
-
|
|
398
|
-
get:
|
|
397
|
+
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
398
|
+
get: n,
|
|
399
399
|
configurable: !0
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
403
|
function er(e, r) {
|
|
404
404
|
{
|
|
405
|
-
var
|
|
406
|
-
|
|
405
|
+
var n = function() {
|
|
406
|
+
Te || (Te = !0, p("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
407
407
|
};
|
|
408
|
-
|
|
409
|
-
get:
|
|
408
|
+
n.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
409
|
+
get: n,
|
|
410
410
|
configurable: !0
|
|
411
411
|
});
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
var rr = function(e, r,
|
|
414
|
+
var rr = function(e, r, n, a, s, c, o) {
|
|
415
415
|
var i = {
|
|
416
416
|
// This tag allows us to uniquely identify this as a React Element
|
|
417
|
-
$$typeof:
|
|
417
|
+
$$typeof: T,
|
|
418
418
|
// Built-in properties that belong on the element
|
|
419
419
|
type: e,
|
|
420
420
|
key: r,
|
|
421
|
-
ref:
|
|
421
|
+
ref: n,
|
|
422
422
|
props: o,
|
|
423
423
|
// Record the component responsible for creating this element.
|
|
424
|
-
_owner:
|
|
424
|
+
_owner: c
|
|
425
425
|
};
|
|
426
426
|
return i._store = {}, Object.defineProperty(i._store, "validated", {
|
|
427
427
|
configurable: !1,
|
|
@@ -440,41 +440,41 @@ function xr() {
|
|
|
440
440
|
value: s
|
|
441
441
|
}), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
|
|
442
442
|
};
|
|
443
|
-
function nr(e, r,
|
|
443
|
+
function nr(e, r, n, a, s) {
|
|
444
444
|
{
|
|
445
|
-
var
|
|
446
|
-
|
|
447
|
-
for (
|
|
448
|
-
Z.call(r,
|
|
445
|
+
var c, o = {}, i = null, y = null;
|
|
446
|
+
n !== void 0 && (we(n), i = "" + n), Xe(r) && (we(r.key), i = "" + r.key), ze(r) && (y = r.ref, Ze(r, s));
|
|
447
|
+
for (c in r)
|
|
448
|
+
Z.call(r, c) && !Ge.hasOwnProperty(c) && (o[c] = r[c]);
|
|
449
449
|
if (e && e.defaultProps) {
|
|
450
|
-
var
|
|
451
|
-
for (
|
|
452
|
-
o[
|
|
450
|
+
var u = e.defaultProps;
|
|
451
|
+
for (c in u)
|
|
452
|
+
o[c] === void 0 && (o[c] = u[c]);
|
|
453
453
|
}
|
|
454
|
-
if (i ||
|
|
454
|
+
if (i || y) {
|
|
455
455
|
var f = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
456
|
-
i && Qe(o, f),
|
|
456
|
+
i && Qe(o, f), y && er(o, f);
|
|
457
457
|
}
|
|
458
|
-
return rr(e, i,
|
|
458
|
+
return rr(e, i, y, s, a, Se.current, o);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
var
|
|
461
|
+
var be = L.ReactCurrentOwner, ke = L.ReactDebugCurrentFrame;
|
|
462
462
|
function B(e) {
|
|
463
463
|
if (e) {
|
|
464
|
-
var r = e._owner,
|
|
465
|
-
ke.setExtraStackFrame(
|
|
464
|
+
var r = e._owner, n = le(e.type, e._source, r ? r.type : null);
|
|
465
|
+
ke.setExtraStackFrame(n);
|
|
466
466
|
} else
|
|
467
467
|
ke.setExtraStackFrame(null);
|
|
468
468
|
}
|
|
469
|
-
var
|
|
470
|
-
|
|
471
|
-
function
|
|
472
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
469
|
+
var xe;
|
|
470
|
+
xe = !1;
|
|
471
|
+
function ye(e) {
|
|
472
|
+
return typeof e == "object" && e !== null && e.$$typeof === T;
|
|
473
473
|
}
|
|
474
474
|
function Pe() {
|
|
475
475
|
{
|
|
476
|
-
if (
|
|
477
|
-
var e =
|
|
476
|
+
if (be.current) {
|
|
477
|
+
var e = O(be.current.type);
|
|
478
478
|
if (e)
|
|
479
479
|
return `
|
|
480
480
|
|
|
@@ -491,10 +491,10 @@ Check the render method of \`` + e + "`.";
|
|
|
491
491
|
{
|
|
492
492
|
var r = Pe();
|
|
493
493
|
if (!r) {
|
|
494
|
-
var
|
|
495
|
-
|
|
494
|
+
var n = typeof e == "string" ? e : e.displayName || e.name;
|
|
495
|
+
n && (r = `
|
|
496
496
|
|
|
497
|
-
Check the top-level render call using <` +
|
|
497
|
+
Check the top-level render call using <` + n + ">.");
|
|
498
498
|
}
|
|
499
499
|
return r;
|
|
500
500
|
}
|
|
@@ -504,30 +504,30 @@ Check the top-level render call using <` + t + ">.");
|
|
|
504
504
|
if (!e._store || e._store.validated || e.key != null)
|
|
505
505
|
return;
|
|
506
506
|
e._store.validated = !0;
|
|
507
|
-
var
|
|
508
|
-
if (Ne[
|
|
507
|
+
var n = ar(r);
|
|
508
|
+
if (Ne[n])
|
|
509
509
|
return;
|
|
510
|
-
Ne[
|
|
510
|
+
Ne[n] = !0;
|
|
511
511
|
var a = "";
|
|
512
|
-
e && e._owner && e._owner !==
|
|
512
|
+
e && e._owner && e._owner !== be.current && (a = " It was passed a child from " + O(e._owner.type) + "."), B(e), p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, a), B(null);
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
515
|
function De(e, r) {
|
|
516
516
|
{
|
|
517
517
|
if (typeof e != "object")
|
|
518
518
|
return;
|
|
519
|
-
if (
|
|
520
|
-
for (var
|
|
521
|
-
var a = e[
|
|
522
|
-
|
|
519
|
+
if (ge(e))
|
|
520
|
+
for (var n = 0; n < e.length; n++) {
|
|
521
|
+
var a = e[n];
|
|
522
|
+
ye(a) && Ie(a, r);
|
|
523
523
|
}
|
|
524
|
-
else if (
|
|
524
|
+
else if (ye(e))
|
|
525
525
|
e._store && (e._store.validated = !0);
|
|
526
526
|
else if (e) {
|
|
527
527
|
var s = Y(e);
|
|
528
528
|
if (typeof s == "function" && s !== e.entries)
|
|
529
|
-
for (var
|
|
530
|
-
|
|
529
|
+
for (var c = s.call(e), o; !(o = c.next()).done; )
|
|
530
|
+
ye(o.value) && Ie(o.value, r);
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
533
|
}
|
|
@@ -536,21 +536,21 @@ Check the top-level render call using <` + t + ">.");
|
|
|
536
536
|
var r = e.type;
|
|
537
537
|
if (r == null || typeof r == "string")
|
|
538
538
|
return;
|
|
539
|
-
var
|
|
539
|
+
var n;
|
|
540
540
|
if (typeof r == "function")
|
|
541
|
-
|
|
541
|
+
n = r.propTypes;
|
|
542
542
|
else if (typeof r == "object" && (r.$$typeof === d || // Note: Memo only checks outer props here.
|
|
543
543
|
// Inner props are checked in the reconciler.
|
|
544
|
-
r.$$typeof ===
|
|
545
|
-
|
|
544
|
+
r.$$typeof === j))
|
|
545
|
+
n = r.propTypes;
|
|
546
546
|
else
|
|
547
547
|
return;
|
|
548
|
-
if (
|
|
549
|
-
var a =
|
|
550
|
-
Je(
|
|
551
|
-
} else if (r.PropTypes !== void 0 && !
|
|
552
|
-
|
|
553
|
-
var s =
|
|
548
|
+
if (n) {
|
|
549
|
+
var a = O(r);
|
|
550
|
+
Je(n, e.props, "prop", a, e);
|
|
551
|
+
} else if (r.PropTypes !== void 0 && !xe) {
|
|
552
|
+
xe = !0;
|
|
553
|
+
var s = O(r);
|
|
554
554
|
p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", s || "Unknown");
|
|
555
555
|
}
|
|
556
556
|
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
@@ -558,8 +558,8 @@ Check the top-level render call using <` + t + ">.");
|
|
|
558
558
|
}
|
|
559
559
|
function or(e) {
|
|
560
560
|
{
|
|
561
|
-
for (var r = Object.keys(e.props),
|
|
562
|
-
var a = r[
|
|
561
|
+
for (var r = Object.keys(e.props), n = 0; n < r.length; n++) {
|
|
562
|
+
var a = r[n];
|
|
563
563
|
if (a !== "children" && a !== "key") {
|
|
564
564
|
B(e), p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), B(null);
|
|
565
565
|
break;
|
|
@@ -569,25 +569,25 @@ Check the top-level render call using <` + t + ">.");
|
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
571
|
var Ae = {};
|
|
572
|
-
function Le(e, r,
|
|
572
|
+
function Le(e, r, n, a, s, c) {
|
|
573
573
|
{
|
|
574
574
|
var o = J(e);
|
|
575
575
|
if (!o) {
|
|
576
576
|
var i = "";
|
|
577
577
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (i += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
578
|
-
var
|
|
579
|
-
|
|
580
|
-
var
|
|
581
|
-
e === null ?
|
|
578
|
+
var y = tr();
|
|
579
|
+
y ? i += y : i += Pe();
|
|
580
|
+
var u;
|
|
581
|
+
e === null ? u = "null" : ge(e) ? u = "array" : e !== void 0 && e.$$typeof === T ? (u = "<" + (O(e.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : u = typeof e, p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", u, i);
|
|
582
582
|
}
|
|
583
|
-
var f = nr(e, r,
|
|
583
|
+
var f = nr(e, r, n, s, c);
|
|
584
584
|
if (f == null)
|
|
585
585
|
return f;
|
|
586
586
|
if (o) {
|
|
587
587
|
var R = r.children;
|
|
588
588
|
if (R !== void 0)
|
|
589
589
|
if (a)
|
|
590
|
-
if (
|
|
590
|
+
if (ge(R)) {
|
|
591
591
|
for (var U = 0; U < R.length; U++)
|
|
592
592
|
De(R[U], e);
|
|
593
593
|
Object.freeze && Object.freeze(R);
|
|
@@ -597,128 +597,117 @@ Check the top-level render call using <` + t + ">.");
|
|
|
597
597
|
De(R, e);
|
|
598
598
|
}
|
|
599
599
|
if (Z.call(r, "key")) {
|
|
600
|
-
var M =
|
|
600
|
+
var M = O(e), E = Object.keys(r).filter(function(dr) {
|
|
601
601
|
return dr !== "key";
|
|
602
|
-
}),
|
|
603
|
-
if (!Ae[M +
|
|
604
|
-
var fr =
|
|
602
|
+
}), Ee = E.length > 0 ? "{key: someKey, " + E.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
603
|
+
if (!Ae[M + Ee]) {
|
|
604
|
+
var fr = E.length > 0 ? "{" + E.join(": ..., ") + ": ...}" : "{}";
|
|
605
605
|
p(`A props object containing a "key" prop is being spread into JSX:
|
|
606
606
|
let props = %s;
|
|
607
607
|
<%s {...props} />
|
|
608
608
|
React keys must be passed directly to JSX without using spread:
|
|
609
609
|
let props = %s;
|
|
610
|
-
<%s key={someKey} {...props} />`,
|
|
610
|
+
<%s key={someKey} {...props} />`, Ee, M, fr, M), Ae[M + Ee] = !0;
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
|
-
return e ===
|
|
613
|
+
return e === _ ? or(f) : ir(f), f;
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
|
-
function sr(e, r,
|
|
617
|
-
return Le(e, r,
|
|
616
|
+
function sr(e, r, n) {
|
|
617
|
+
return Le(e, r, n, !0);
|
|
618
618
|
}
|
|
619
|
-
function lr(e, r,
|
|
620
|
-
return Le(e, r,
|
|
619
|
+
function lr(e, r, n) {
|
|
620
|
+
return Le(e, r, n, !1);
|
|
621
621
|
}
|
|
622
|
-
var
|
|
623
|
-
ee.Fragment =
|
|
622
|
+
var cr = lr, ur = sr;
|
|
623
|
+
ee.Fragment = _, ee.jsx = cr, ee.jsxs = ur;
|
|
624
624
|
})()), ee;
|
|
625
625
|
}
|
|
626
626
|
var Me;
|
|
627
|
-
function
|
|
628
|
-
return Me || (Me = 1, process.env.NODE_ENV === "production" ?
|
|
627
|
+
function br() {
|
|
628
|
+
return Me || (Me = 1, process.env.NODE_ENV === "production" ? ue.exports = mr() : ue.exports = gr()), ue.exports;
|
|
629
629
|
}
|
|
630
|
-
var
|
|
630
|
+
var t = br();
|
|
631
631
|
const Ye = pr(null), wr = ({ children: w }) => {
|
|
632
|
-
const [
|
|
632
|
+
const [T, h] = V(!0), [_, k] = V(null), P = () => {
|
|
633
633
|
h((m) => !m), k(null);
|
|
634
634
|
}, N = (m) => {
|
|
635
635
|
k((d) => d === m ? null : m);
|
|
636
636
|
};
|
|
637
|
-
return /* @__PURE__ */
|
|
637
|
+
return /* @__PURE__ */ t.jsx(
|
|
638
638
|
Ye.Provider,
|
|
639
639
|
{
|
|
640
|
-
value: { isExpanded:
|
|
640
|
+
value: { isExpanded: T, toggleSidebar: P, openSubmenu: _, toggleSubmenu: N },
|
|
641
641
|
children: w
|
|
642
642
|
}
|
|
643
643
|
);
|
|
644
|
-
},
|
|
644
|
+
}, xr = () => {
|
|
645
645
|
const w = vr(Ye);
|
|
646
646
|
if (!w) throw new Error("useSidebar must be used inside <SidebarProvider>");
|
|
647
647
|
return w;
|
|
648
|
-
},
|
|
649
|
-
/* @__PURE__ */ n.jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M20.3334 7C20.3334 7.55228 20.0072 8 19.6048 8L4.06194 8C3.65957 8 3.33337 7.55228 3.33337 7C3.33337 6.44772 3.65957 6 4.06194 6L19.6048 6C20.0072 6 20.3334 6.44772 20.3334 7Z", fill: "white" }),
|
|
650
|
-
/* @__PURE__ */ n.jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M20.3334 12C20.3334 12.5523 20.0072 13 19.6048 13L4.06194 13C3.65957 13 3.33337 12.5523 3.33337 12C3.33337 11.4477 3.65957 11 4.06194 11L19.6048 11C20.0072 11 20.3334 11.4477 20.3334 12Z", fill: "white" }),
|
|
651
|
-
/* @__PURE__ */ n.jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M20.3334 17C20.3334 17.5523 20.0072 18 19.6048 18L4.06194 18C3.65957 18 3.33337 17.5523 3.33337 17C3.33337 16.4477 3.65957 16 4.06194 16L19.6048 16C20.0072 16 20.3334 16.4477 20.3334 17Z", fill: "white" })
|
|
652
|
-
] }), yr = () => /* @__PURE__ */ n.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
653
|
-
/* @__PURE__ */ n.jsx("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
|
|
654
|
-
/* @__PURE__ */ n.jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
|
655
|
-
] }), Er = () => /* @__PURE__ */ n.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
656
|
-
/* @__PURE__ */ n.jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
657
|
-
/* @__PURE__ */ n.jsx("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
|
658
|
-
/* @__PURE__ */ n.jsx("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
|
|
659
|
-
] }), Rr = () => /* @__PURE__ */ n.jsxs("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", children: [
|
|
660
|
-
/* @__PURE__ */ n.jsx("rect", { width: "32", height: "32", rx: "8", fill: "currentColor", opacity: "0.15" }),
|
|
661
|
-
/* @__PURE__ */ n.jsx("circle", { cx: "16", cy: "16", r: "6", fill: "currentColor" })
|
|
662
|
-
] }), Cr = () => /* @__PURE__ */ n.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
663
|
-
/* @__PURE__ */ n.jsx("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }),
|
|
664
|
-
/* @__PURE__ */ n.jsx("polyline", { points: "16 17 21 12 16 7" }),
|
|
665
|
-
/* @__PURE__ */ n.jsx("line", { x1: "21", y1: "12", x2: "9", y2: "12" })
|
|
666
|
-
] }), Sr = ({ config: w }) => {
|
|
648
|
+
}, yr = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M20.3334%207C20.3334%207.55228%2020.0072%208%2019.6048%208L4.06194%208C3.65957%208%203.33337%207.55228%203.33337%207C3.33337%206.44772%203.65957%206%204.06194%206L19.6048%206C20.0072%206%2020.3334%206.44772%2020.3334%207Z'%20fill='white'%20/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M20.3334%2012C20.3334%2012.5523%2020.0072%2013%2019.6048%2013L4.06194%2013C3.65957%2013%203.33337%2012.5523%203.33337%2012C3.33337%2011.4477%203.65957%2011%204.06194%2011L19.6048%2011C20.0072%2011%2020.3334%2011.4477%2020.3334%2012Z'%20fill='white'%20/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M20.3334%2017C20.3334%2017.5523%2020.0072%2018%2019.6048%2018L4.06194%2018C3.65957%2018%203.33337%2017.5523%203.33337%2017C3.33337%2016.4477%203.65957%2016%204.06194%2016L19.6048%2016C20.0072%2016%2020.3334%2016.4477%2020.3334%2017Z'%20fill='white'%20/%3e%3c/svg%3e", Er = "data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='currentColor'%20strokeWidth='2'%20strokeLinecap='round'%20strokeLinejoin='round'%20%3e%3ccircle%20cx='12'%20cy='12'%20r='10'%20/%3e%3cpath%20d='M9.09%209a3%203%200%200%201%205.83%201c0%202-3%203-3%203'%20/%3e%3cline%20x1='12'%20y1='17'%20x2='12.01'%20y2='17'%20/%3e%3c/svg%3e", jr = "data:image/svg+xml,", Rr = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='currentColor'%20strokeWidth='2.5'%20strokeLinecap='round'%20strokeLinejoin='round'%20%3e%3cline%20x1='12'%20y1='5'%20x2='12'%20y2='19'%20/%3e%3cline%20x1='5'%20y1='12'%20x2='19'%20y2='12'%20/%3e%3c/svg%3e", _r = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='currentColor'%20strokeWidth='2'%20strokeLinecap='round'%20strokeLinejoin='round'%20%3e%3cpath%20d='M9%2021H5a2%202%200%200%201-2-2V5a2%202%200%200%201%202-2h4'%20/%3e%3cpolyline%20points='16%2017%2021%2012%2016%207'%20/%3e%3cline%20x1='21'%20y1='12'%20x2='9'%20y2='12'%20/%3e%3c/svg%3e", Sr = ({ config: w }) => {
|
|
667
649
|
const {
|
|
668
|
-
navItems:
|
|
650
|
+
navItems: T,
|
|
669
651
|
user: h,
|
|
670
|
-
createButtonRoles:
|
|
652
|
+
createButtonRoles: _,
|
|
671
653
|
createButtonLabel: k = "Create",
|
|
672
654
|
createButtonPath: P,
|
|
673
655
|
brandName: N = "Amphenol",
|
|
674
656
|
brandSubtitle: m = "COMMUNICATION SOLUTIONS",
|
|
675
657
|
logo: d,
|
|
676
658
|
helpLabel: I = "Help Center",
|
|
677
|
-
helpIcon:
|
|
678
|
-
onSignOut:
|
|
659
|
+
helpIcon: g,
|
|
660
|
+
onSignOut: j,
|
|
679
661
|
onNavigate: S,
|
|
680
662
|
className: W = ""
|
|
681
|
-
} = w, { isExpanded:
|
|
663
|
+
} = w, { isExpanded: b, toggleSidebar: re, openSubmenu: Y, toggleSubmenu: L } = xr(), [p, fe] = V(window.location.pathname), [de, ne] = V(!1), [pe, te] = V(!1), [ae, F] = V(null);
|
|
682
664
|
hr(() => {
|
|
683
665
|
const v = () => fe(window.location.pathname);
|
|
684
666
|
return window.addEventListener("popstate", v), () => window.removeEventListener("popstate", v);
|
|
685
667
|
}, []);
|
|
686
|
-
const J = (v,
|
|
687
|
-
v.preventDefault(),
|
|
688
|
-
}, ie = () => h.email ? h.email.split("@")[0] : "User", q = () => h.email ? h.email.charAt(0).toUpperCase() : "U",
|
|
689
|
-
|
|
690
|
-
}, D = !
|
|
691
|
-
(v,
|
|
692
|
-
const A =
|
|
693
|
-
return v[A] || (v[A] = []), v[A].push(
|
|
668
|
+
const J = (v, C) => {
|
|
669
|
+
v.preventDefault(), C && (S ? S(C) : (window.history.pushState({}, "", C), window.dispatchEvent(new PopStateEvent("popstate"))));
|
|
670
|
+
}, ie = () => h.email ? h.email.split("@")[0] : "User", q = () => h.email ? h.email.charAt(0).toUpperCase() : "U", O = () => {
|
|
671
|
+
j ? j() : window.location.href = "/c/portal/logout";
|
|
672
|
+
}, D = !_ || _.includes(h.role), $ = T.reduce(
|
|
673
|
+
(v, C) => {
|
|
674
|
+
const A = C.section || "GENERAL";
|
|
675
|
+
return v[A] || (v[A] = []), v[A].push(C), v;
|
|
694
676
|
},
|
|
695
677
|
{}
|
|
696
678
|
);
|
|
697
|
-
return /* @__PURE__ */
|
|
679
|
+
return /* @__PURE__ */ t.jsxs(
|
|
698
680
|
"aside",
|
|
699
681
|
{
|
|
700
|
-
style: { backgroundColor: "#0f172a"
|
|
701
|
-
className: `rdr-sidebar ${
|
|
682
|
+
style: { backgroundColor: "#0f172a" },
|
|
683
|
+
className: `rdr-sidebar ${b ? "expanded" : "collapsed"} ${W}`,
|
|
702
684
|
children: [
|
|
703
|
-
/* @__PURE__ */
|
|
704
|
-
/* @__PURE__ */
|
|
705
|
-
/* @__PURE__ */
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
685
|
+
/* @__PURE__ */ t.jsxs("div", { className: "sidebar-header ", style: { paddingTop: "10px" }, children: [
|
|
686
|
+
/* @__PURE__ */ t.jsxs("div", { className: "logo-section", onClick: re, children: [
|
|
687
|
+
/* @__PURE__ */ t.jsx(
|
|
688
|
+
"span",
|
|
689
|
+
{
|
|
690
|
+
className: "logo-icon ",
|
|
691
|
+
style: { color: "var(--sidebar-accent)", marginTop: "15px" },
|
|
692
|
+
children: d ?? /* @__PURE__ */ t.jsx(jr, {})
|
|
693
|
+
}
|
|
694
|
+
),
|
|
695
|
+
b && /* @__PURE__ */ t.jsxs("div", { className: "brand-text", children: [
|
|
696
|
+
/* @__PURE__ */ t.jsx("h2", { children: N }),
|
|
697
|
+
m && /* @__PURE__ */ t.jsx("span", { children: m })
|
|
709
698
|
] })
|
|
710
699
|
] }),
|
|
711
|
-
|
|
700
|
+
b && /* @__PURE__ */ t.jsx(
|
|
712
701
|
"button",
|
|
713
702
|
{
|
|
714
703
|
className: "menu-toggle",
|
|
715
704
|
onClick: re,
|
|
716
705
|
"aria-label": "Collapse sidebar",
|
|
717
|
-
children: /* @__PURE__ */
|
|
706
|
+
children: /* @__PURE__ */ t.jsx(yr, {})
|
|
718
707
|
}
|
|
719
708
|
)
|
|
720
709
|
] }),
|
|
721
|
-
D && P && /* @__PURE__ */
|
|
710
|
+
D && P && /* @__PURE__ */ t.jsx("div", { className: "sidebar-actions", children: /* @__PURE__ */ t.jsxs(
|
|
722
711
|
"button",
|
|
723
712
|
{
|
|
724
713
|
className: "sidebar-create-btn",
|
|
@@ -727,9 +716,9 @@ const Ye = pr(null), wr = ({ children: w }) => {
|
|
|
727
716
|
alignItems: "center",
|
|
728
717
|
justifyContent: "center",
|
|
729
718
|
gap: "8px",
|
|
730
|
-
width: "100%",
|
|
719
|
+
width: b ? "100%" : "44px",
|
|
731
720
|
height: "44px",
|
|
732
|
-
padding: "0 16px",
|
|
721
|
+
padding: b ? "0 16px" : "0",
|
|
733
722
|
borderRadius: "10px",
|
|
734
723
|
border: "none",
|
|
735
724
|
outline: "none",
|
|
@@ -745,111 +734,125 @@ const Ye = pr(null), wr = ({ children: w }) => {
|
|
|
745
734
|
onMouseLeave: () => te(!1),
|
|
746
735
|
onClick: (v) => J(v, P),
|
|
747
736
|
children: [
|
|
748
|
-
/* @__PURE__ */
|
|
749
|
-
|
|
737
|
+
/* @__PURE__ */ t.jsx(Rr, {}),
|
|
738
|
+
b && /* @__PURE__ */ t.jsx("span", { children: k })
|
|
750
739
|
]
|
|
751
740
|
}
|
|
752
741
|
) }),
|
|
753
|
-
/* @__PURE__ */
|
|
754
|
-
const A =
|
|
742
|
+
/* @__PURE__ */ t.jsx("div", { className: "sidebar-nav", children: Object.entries($).map(([v, C]) => {
|
|
743
|
+
const A = C.filter(
|
|
755
744
|
(l) => !l.roles || l.roles.includes(h.role)
|
|
756
745
|
);
|
|
757
|
-
return A.length ? /* @__PURE__ */
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
746
|
+
return A.length ? /* @__PURE__ */ t.jsxs(
|
|
747
|
+
"div",
|
|
748
|
+
{
|
|
749
|
+
className: "nav-section",
|
|
750
|
+
style: { listStyleType: "none" },
|
|
751
|
+
children: [
|
|
752
|
+
b && /* @__PURE__ */ t.jsx("h4", { className: "section-title", children: v }),
|
|
753
|
+
/* @__PURE__ */ t.jsx("ul", { className: "nav-items", children: A.map((l) => {
|
|
754
|
+
var G, z;
|
|
755
|
+
const H = (G = l.subItems) == null ? void 0 : G.some(
|
|
756
|
+
(x) => x.path && p.includes(x.path)
|
|
757
|
+
), K = l.path ? p === l.path : !1;
|
|
758
|
+
return /* @__PURE__ */ t.jsx("li", { children: (z = l.subItems) != null && z.length ? (
|
|
759
|
+
/* Parent with submenu */
|
|
760
|
+
/* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
761
|
+
/* @__PURE__ */ t.jsxs(
|
|
762
|
+
"div",
|
|
763
|
+
{
|
|
764
|
+
className: `nav-item ${Y === l.name || H ? "active" : ""}`,
|
|
765
|
+
"data-label": l.name,
|
|
766
|
+
onClick: () => L(l.name),
|
|
767
|
+
onMouseEnter: () => F(l.name),
|
|
768
|
+
onMouseLeave: () => F(null),
|
|
769
|
+
style: Y === l.name || H || ae === l.name ? {
|
|
770
|
+
backgroundColor: "#10B981",
|
|
771
|
+
border: "1px solid #10B981",
|
|
772
|
+
borderRadius: "8px"
|
|
773
|
+
} : {},
|
|
774
|
+
children: [
|
|
775
|
+
/* @__PURE__ */ t.jsx("span", { className: "nav-icon", children: l.icon }),
|
|
776
|
+
b && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
777
|
+
/* @__PURE__ */ t.jsx("span", { className: "nav-text", children: l.name }),
|
|
778
|
+
/* @__PURE__ */ t.jsx("span", { className: "submenu-arrow", children: Y === l.name ? "−" : "+" })
|
|
779
|
+
] })
|
|
780
|
+
]
|
|
781
|
+
}
|
|
782
|
+
),
|
|
783
|
+
b && Y === l.name && /* @__PURE__ */ t.jsx("ul", { className: "submenu", children: l.subItems.map((x) => {
|
|
784
|
+
const ve = x.path ? p === x.path : !1;
|
|
785
|
+
return /* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsxs(
|
|
786
|
+
"a",
|
|
787
|
+
{
|
|
788
|
+
href: x.path || "/",
|
|
789
|
+
onClick: (X) => J(X, x.path),
|
|
790
|
+
className: `submenu-item ${ve ? "active-sub" : ""}`,
|
|
791
|
+
children: [
|
|
792
|
+
x.icon && /* @__PURE__ */ t.jsx("span", { className: "submenu-icon", children: x.icon }),
|
|
793
|
+
/* @__PURE__ */ t.jsx("span", { children: x.name })
|
|
794
|
+
]
|
|
795
|
+
}
|
|
796
|
+
) }, x.name);
|
|
797
|
+
}) })
|
|
798
|
+
] })
|
|
799
|
+
) : (
|
|
800
|
+
/* Leaf nav item */
|
|
801
|
+
/* @__PURE__ */ t.jsxs(
|
|
792
802
|
"a",
|
|
793
803
|
{
|
|
794
|
-
href:
|
|
795
|
-
|
|
796
|
-
|
|
804
|
+
href: l.path || "/",
|
|
805
|
+
"data-label": l.name,
|
|
806
|
+
onClick: (x) => J(x, l.path),
|
|
807
|
+
style: K || ae === l.name ? {
|
|
808
|
+
backgroundColor: "#10B981",
|
|
809
|
+
border: "none",
|
|
810
|
+
// kill any CSS border including left strip
|
|
811
|
+
borderRadius: "8px",
|
|
812
|
+
outline: "1px solid #10B981",
|
|
813
|
+
outlineOffset: "0px"
|
|
814
|
+
} : {
|
|
815
|
+
border: "none"
|
|
816
|
+
// also reset on non-active to remove the strip
|
|
817
|
+
},
|
|
818
|
+
onMouseEnter: () => F(l.name),
|
|
819
|
+
onMouseLeave: () => F(null),
|
|
820
|
+
className: `nav-item ${K ? "active" : ""}`,
|
|
797
821
|
children: [
|
|
798
|
-
|
|
799
|
-
/* @__PURE__ */
|
|
822
|
+
/* @__PURE__ */ t.jsx("span", { className: "nav-icon", children: l.icon }),
|
|
823
|
+
b && /* @__PURE__ */ t.jsx("span", { className: "nav-text", children: l.name })
|
|
800
824
|
]
|
|
801
825
|
}
|
|
802
|
-
)
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
{
|
|
810
|
-
href: l.path || "/",
|
|
811
|
-
"data-label": l.name,
|
|
812
|
-
onClick: (g) => J(g, l.path),
|
|
813
|
-
style: K || ae === l.name ? {
|
|
814
|
-
backgroundColor: "#10B981",
|
|
815
|
-
border: "1px solid #10B981",
|
|
816
|
-
borderRadius: "8px"
|
|
817
|
-
} : {},
|
|
818
|
-
onMouseEnter: () => F(l.name),
|
|
819
|
-
onMouseLeave: () => F(null),
|
|
820
|
-
className: `nav-item ${K ? "active" : ""}`,
|
|
821
|
-
children: [
|
|
822
|
-
/* @__PURE__ */ n.jsx("span", { className: "nav-icon", children: l.icon }),
|
|
823
|
-
y && /* @__PURE__ */ n.jsx("span", { className: "nav-text", children: l.name })
|
|
824
|
-
]
|
|
825
|
-
}
|
|
826
|
-
)
|
|
827
|
-
) }, l.name);
|
|
828
|
-
}) })
|
|
829
|
-
] }, v) : null;
|
|
826
|
+
)
|
|
827
|
+
) }, l.name);
|
|
828
|
+
}) })
|
|
829
|
+
]
|
|
830
|
+
},
|
|
831
|
+
v
|
|
832
|
+
) : null;
|
|
830
833
|
}) }),
|
|
831
|
-
/* @__PURE__ */
|
|
832
|
-
/* @__PURE__ */
|
|
833
|
-
/* @__PURE__ */
|
|
834
|
-
|
|
834
|
+
/* @__PURE__ */ t.jsxs("div", { className: "sidebar-footer", children: [
|
|
835
|
+
/* @__PURE__ */ t.jsxs("div", { className: "footer-link", "data-label": I, children: [
|
|
836
|
+
/* @__PURE__ */ t.jsx("span", { children: g ?? /* @__PURE__ */ t.jsx(Er, {}) }),
|
|
837
|
+
b && /* @__PURE__ */ t.jsx("span", { children: I })
|
|
835
838
|
] }),
|
|
836
|
-
/* @__PURE__ */
|
|
837
|
-
/* @__PURE__ */
|
|
839
|
+
/* @__PURE__ */ t.jsxs("div", { className: "user-profile-wrapper", children: [
|
|
840
|
+
/* @__PURE__ */ t.jsxs(
|
|
838
841
|
"div",
|
|
839
842
|
{
|
|
840
843
|
className: "user-profile",
|
|
841
844
|
onClick: () => ne((v) => !v),
|
|
842
845
|
children: [
|
|
843
|
-
/* @__PURE__ */
|
|
844
|
-
|
|
845
|
-
/* @__PURE__ */
|
|
846
|
-
/* @__PURE__ */
|
|
846
|
+
/* @__PURE__ */ t.jsx("div", { className: "avatar", children: q() }),
|
|
847
|
+
b && /* @__PURE__ */ t.jsxs("div", { className: "user-info", children: [
|
|
848
|
+
/* @__PURE__ */ t.jsx("div", { className: "user-name", children: ie() }),
|
|
849
|
+
/* @__PURE__ */ t.jsx("div", { className: "user-role", children: h.roleName })
|
|
847
850
|
] })
|
|
848
851
|
]
|
|
849
852
|
}
|
|
850
853
|
),
|
|
851
|
-
de && /* @__PURE__ */
|
|
852
|
-
/* @__PURE__ */
|
|
854
|
+
de && /* @__PURE__ */ t.jsxs("div", { className: "profile-popup", children: [
|
|
855
|
+
/* @__PURE__ */ t.jsx(
|
|
853
856
|
"button",
|
|
854
857
|
{
|
|
855
858
|
className: "popup-close",
|
|
@@ -858,18 +861,18 @@ const Ye = pr(null), wr = ({ children: w }) => {
|
|
|
858
861
|
children: "✕"
|
|
859
862
|
}
|
|
860
863
|
),
|
|
861
|
-
/* @__PURE__ */
|
|
862
|
-
/* @__PURE__ */
|
|
863
|
-
/* @__PURE__ */
|
|
864
|
-
/* @__PURE__ */
|
|
865
|
-
/* @__PURE__ */
|
|
866
|
-
/* @__PURE__ */
|
|
864
|
+
/* @__PURE__ */ t.jsxs("div", { className: "popup-header", children: [
|
|
865
|
+
/* @__PURE__ */ t.jsx("div", { className: "popup-avatar", children: q() }),
|
|
866
|
+
/* @__PURE__ */ t.jsxs("div", { className: "popup-user-details", children: [
|
|
867
|
+
/* @__PURE__ */ t.jsx("div", { className: "popup-name", children: ie() }),
|
|
868
|
+
/* @__PURE__ */ t.jsx("div", { className: "popup-role", children: h.roleName }),
|
|
869
|
+
/* @__PURE__ */ t.jsx("div", { className: "popup-email", children: h.email })
|
|
867
870
|
] })
|
|
868
871
|
] }),
|
|
869
|
-
/* @__PURE__ */
|
|
870
|
-
/* @__PURE__ */
|
|
871
|
-
/* @__PURE__ */
|
|
872
|
-
/* @__PURE__ */
|
|
872
|
+
/* @__PURE__ */ t.jsx("div", { className: "popup-divider" }),
|
|
873
|
+
/* @__PURE__ */ t.jsxs("button", { className: "signout-btn", onClick: O, children: [
|
|
874
|
+
/* @__PURE__ */ t.jsx(_r, {}),
|
|
875
|
+
/* @__PURE__ */ t.jsx("span", { children: "Sign Out" })
|
|
873
876
|
] })
|
|
874
877
|
] })
|
|
875
878
|
] })
|
|
@@ -881,5 +884,5 @@ const Ye = pr(null), wr = ({ children: w }) => {
|
|
|
881
884
|
export {
|
|
882
885
|
Sr as SideNavbar,
|
|
883
886
|
wr as SidebarProvider,
|
|
884
|
-
|
|
887
|
+
xr as useSidebar
|
|
885
888
|
};
|