@touchtech/web-navigation-menu 0.0.18-alpha.4 → 0.0.18-alpha.6
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/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +425 -413
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import be, { useContext as X, useState as le, useEffect as Ee, useMemo as y, useCallback as K, Fragment as
|
|
2
|
-
import { AnimatePresence as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { AuthContext as tt, userHasTenantAccess as M, Privileges as
|
|
1
|
+
import be, { useContext as X, useState as le, useEffect as Ee, useMemo as y, useCallback as K, Fragment as Ot } from "react";
|
|
2
|
+
import { AnimatePresence as Dt, motion as Mt } from "framer-motion";
|
|
3
|
+
import { createPortal as kt } from "react-dom";
|
|
4
|
+
import { AuthContext as tt, userHasTenantAccess as M, Privileges as q } from "@touchtech/web-auth";
|
|
5
5
|
import { TenantIdContext as Te } from "@touchtech/web-tenant-id-provider";
|
|
6
6
|
import re from "classcat";
|
|
7
|
-
import { Image as
|
|
8
|
-
import { useApi as nt } from "@touchtech/web-api-client";
|
|
9
|
-
import
|
|
10
|
-
import { matchPath as
|
|
11
|
-
import { useToggle as
|
|
7
|
+
import { Image as Ft, Button as Se, Icon as ne, IconButton as Lt } from "@touchtech/baselayer-ui";
|
|
8
|
+
import { useApi as nt, createUrl as rt } from "@touchtech/web-api-client";
|
|
9
|
+
import Ut from "swr";
|
|
10
|
+
import { matchPath as Bt } from "react-router-dom";
|
|
11
|
+
import { useToggle as Ht } from "@touchtech/web-hooks";
|
|
12
12
|
var we = { exports: {} }, Q = {};
|
|
13
13
|
/**
|
|
14
14
|
* @license React
|
|
@@ -20,16 +20,16 @@ var we = { exports: {} }, Q = {};
|
|
|
20
20
|
* LICENSE file in the root directory of this source tree.
|
|
21
21
|
*/
|
|
22
22
|
var Je;
|
|
23
|
-
function
|
|
23
|
+
function $t() {
|
|
24
24
|
if (Je) return Q;
|
|
25
25
|
Je = 1;
|
|
26
|
-
var
|
|
27
|
-
function b(
|
|
26
|
+
var i = be, a = Symbol.for("react.element"), p = Symbol.for("react.fragment"), u = Object.prototype.hasOwnProperty, d = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
27
|
+
function b(o, m, x) {
|
|
28
28
|
var g, S = {}, R = null, j = null;
|
|
29
29
|
x !== void 0 && (R = "" + x), m.key !== void 0 && (R = "" + m.key), m.ref !== void 0 && (j = m.ref);
|
|
30
|
-
for (g in m)
|
|
31
|
-
if (
|
|
32
|
-
return { $$typeof:
|
|
30
|
+
for (g in m) u.call(m, g) && !c.hasOwnProperty(g) && (S[g] = m[g]);
|
|
31
|
+
if (o && o.defaultProps) for (g in m = o.defaultProps, m) S[g] === void 0 && (S[g] = m[g]);
|
|
32
|
+
return { $$typeof: a, type: o, key: R, ref: j, props: S, _owner: d.current };
|
|
33
33
|
}
|
|
34
34
|
return Q.Fragment = p, Q.jsx = b, Q.jsxs = b, Q;
|
|
35
35
|
}
|
|
@@ -44,53 +44,53 @@ var ee = {};
|
|
|
44
44
|
* LICENSE file in the root directory of this source tree.
|
|
45
45
|
*/
|
|
46
46
|
var Ze;
|
|
47
|
-
function
|
|
47
|
+
function Wt() {
|
|
48
48
|
return Ze || (Ze = 1, process.env.NODE_ENV !== "production" && function() {
|
|
49
|
-
var
|
|
50
|
-
function
|
|
49
|
+
var i = be, a = Symbol.for("react.element"), p = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), d = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), b = Symbol.for("react.provider"), o = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), S = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), j = Symbol.for("react.offscreen"), L = Symbol.iterator, U = "@@iterator";
|
|
50
|
+
function B(e) {
|
|
51
51
|
if (e === null || typeof e != "object")
|
|
52
52
|
return null;
|
|
53
|
-
var t =
|
|
53
|
+
var t = L && e[L] || e[U];
|
|
54
54
|
return typeof t == "function" ? t : null;
|
|
55
55
|
}
|
|
56
|
-
var C =
|
|
56
|
+
var C = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
57
57
|
function h(e) {
|
|
58
58
|
{
|
|
59
|
-
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0),
|
|
60
|
-
n[
|
|
61
|
-
|
|
59
|
+
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), s = 1; s < t; s++)
|
|
60
|
+
n[s - 1] = arguments[s];
|
|
61
|
+
H("error", e, n);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function H(e, t, n) {
|
|
65
65
|
{
|
|
66
|
-
var
|
|
66
|
+
var s = C.ReactDebugCurrentFrame, v = s.getStackAddendum();
|
|
67
67
|
v !== "" && (t += "%s", n = n.concat([v]));
|
|
68
|
-
var _ = n.map(function(
|
|
69
|
-
return String(
|
|
68
|
+
var _ = n.map(function(f) {
|
|
69
|
+
return String(f);
|
|
70
70
|
});
|
|
71
71
|
_.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, _);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
var Y = !1, J = !1,
|
|
74
|
+
var Y = !1, J = !1, A = !1, ue = !1, st = !1, Ne;
|
|
75
75
|
Ne = Symbol.for("react.module.reference");
|
|
76
|
-
function
|
|
77
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
76
|
+
function it(e) {
|
|
77
|
+
return !!(typeof e == "string" || typeof e == "function" || e === u || e === c || st || e === d || e === x || e === g || ue || e === j || Y || J || A || typeof e == "object" && e !== null && (e.$$typeof === R || e.$$typeof === S || e.$$typeof === b || e.$$typeof === o || e.$$typeof === m || // This needs to include all possible module reference object
|
|
78
78
|
// types supported by any Flight configuration anywhere since
|
|
79
79
|
// we don't know which Flight build this will end up being used
|
|
80
80
|
// with.
|
|
81
81
|
e.$$typeof === Ne || e.getModuleId !== void 0));
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
var
|
|
85
|
-
if (
|
|
86
|
-
return
|
|
83
|
+
function ot(e, t, n) {
|
|
84
|
+
var s = e.displayName;
|
|
85
|
+
if (s)
|
|
86
|
+
return s;
|
|
87
87
|
var v = t.displayName || t.name || "";
|
|
88
88
|
return v !== "" ? n + "(" + v + ")" : n;
|
|
89
89
|
}
|
|
90
90
|
function Ce(e) {
|
|
91
91
|
return e.displayName || "Context";
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function $(e) {
|
|
94
94
|
if (e == null)
|
|
95
95
|
return null;
|
|
96
96
|
if (typeof e.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
@@ -98,13 +98,13 @@ function $t() {
|
|
|
98
98
|
if (typeof e == "string")
|
|
99
99
|
return e;
|
|
100
100
|
switch (e) {
|
|
101
|
-
case
|
|
101
|
+
case u:
|
|
102
102
|
return "Fragment";
|
|
103
103
|
case p:
|
|
104
104
|
return "Portal";
|
|
105
105
|
case c:
|
|
106
106
|
return "Profiler";
|
|
107
|
-
case
|
|
107
|
+
case d:
|
|
108
108
|
return "StrictMode";
|
|
109
109
|
case x:
|
|
110
110
|
return "Suspense";
|
|
@@ -113,21 +113,21 @@ function $t() {
|
|
|
113
113
|
}
|
|
114
114
|
if (typeof e == "object")
|
|
115
115
|
switch (e.$$typeof) {
|
|
116
|
-
case
|
|
116
|
+
case o:
|
|
117
117
|
var t = e;
|
|
118
118
|
return Ce(t) + ".Consumer";
|
|
119
119
|
case b:
|
|
120
120
|
var n = e;
|
|
121
121
|
return Ce(n._context) + ".Provider";
|
|
122
122
|
case m:
|
|
123
|
-
return
|
|
123
|
+
return ot(e, e.render, "ForwardRef");
|
|
124
124
|
case S:
|
|
125
|
-
var
|
|
126
|
-
return
|
|
125
|
+
var s = e.displayName || null;
|
|
126
|
+
return s !== null ? s : $(e.type) || "Memo";
|
|
127
127
|
case R: {
|
|
128
|
-
var v = e, _ = v._payload,
|
|
128
|
+
var v = e, _ = v._payload, f = v._init;
|
|
129
129
|
try {
|
|
130
|
-
return
|
|
130
|
+
return $(f(_));
|
|
131
131
|
} catch {
|
|
132
132
|
return null;
|
|
133
133
|
}
|
|
@@ -135,11 +135,11 @@ function $t() {
|
|
|
135
135
|
}
|
|
136
136
|
return null;
|
|
137
137
|
}
|
|
138
|
-
var
|
|
138
|
+
var W = Object.assign, Z = 0, Ie, ye, je, Ae, Pe, Oe, De;
|
|
139
139
|
function Me() {
|
|
140
140
|
}
|
|
141
141
|
Me.__reactDisabledLog = !0;
|
|
142
|
-
function
|
|
142
|
+
function ct() {
|
|
143
143
|
{
|
|
144
144
|
if (Z === 0) {
|
|
145
145
|
Ie = console.log, ye = console.info, je = console.warn, Ae = console.error, Pe = console.group, Oe = console.groupCollapsed, De = console.groupEnd;
|
|
@@ -162,7 +162,7 @@ function $t() {
|
|
|
162
162
|
Z++;
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function lt() {
|
|
166
166
|
{
|
|
167
167
|
if (Z--, Z === 0) {
|
|
168
168
|
var e = {
|
|
@@ -171,25 +171,25 @@ function $t() {
|
|
|
171
171
|
writable: !0
|
|
172
172
|
};
|
|
173
173
|
Object.defineProperties(console, {
|
|
174
|
-
log:
|
|
174
|
+
log: W({}, e, {
|
|
175
175
|
value: Ie
|
|
176
176
|
}),
|
|
177
|
-
info:
|
|
177
|
+
info: W({}, e, {
|
|
178
178
|
value: ye
|
|
179
179
|
}),
|
|
180
|
-
warn:
|
|
180
|
+
warn: W({}, e, {
|
|
181
181
|
value: je
|
|
182
182
|
}),
|
|
183
|
-
error:
|
|
183
|
+
error: W({}, e, {
|
|
184
184
|
value: Ae
|
|
185
185
|
}),
|
|
186
|
-
group:
|
|
186
|
+
group: W({}, e, {
|
|
187
187
|
value: Pe
|
|
188
188
|
}),
|
|
189
|
-
groupCollapsed:
|
|
189
|
+
groupCollapsed: W({}, e, {
|
|
190
190
|
value: Oe
|
|
191
191
|
}),
|
|
192
|
-
groupEnd:
|
|
192
|
+
groupEnd: W({}, e, {
|
|
193
193
|
value: De
|
|
194
194
|
})
|
|
195
195
|
});
|
|
@@ -204,8 +204,8 @@ function $t() {
|
|
|
204
204
|
try {
|
|
205
205
|
throw Error();
|
|
206
206
|
} catch (v) {
|
|
207
|
-
var
|
|
208
|
-
fe =
|
|
207
|
+
var s = v.stack.trim().match(/\n( *(at )?)/);
|
|
208
|
+
fe = s && s[1] || "";
|
|
209
209
|
}
|
|
210
210
|
return `
|
|
211
211
|
` + fe + e;
|
|
@@ -213,8 +213,8 @@ function $t() {
|
|
|
213
213
|
}
|
|
214
214
|
var pe = !1, se;
|
|
215
215
|
{
|
|
216
|
-
var
|
|
217
|
-
se = new
|
|
216
|
+
var ut = typeof WeakMap == "function" ? WeakMap : Map;
|
|
217
|
+
se = new ut();
|
|
218
218
|
}
|
|
219
219
|
function ke(e, t) {
|
|
220
220
|
if (!e || pe)
|
|
@@ -224,48 +224,48 @@ function $t() {
|
|
|
224
224
|
if (n !== void 0)
|
|
225
225
|
return n;
|
|
226
226
|
}
|
|
227
|
-
var
|
|
227
|
+
var s;
|
|
228
228
|
pe = !0;
|
|
229
229
|
var v = Error.prepareStackTrace;
|
|
230
230
|
Error.prepareStackTrace = void 0;
|
|
231
231
|
var _;
|
|
232
|
-
_ = de.current, de.current = null,
|
|
232
|
+
_ = de.current, de.current = null, ct();
|
|
233
233
|
try {
|
|
234
234
|
if (t) {
|
|
235
|
-
var
|
|
235
|
+
var f = function() {
|
|
236
236
|
throw Error();
|
|
237
237
|
};
|
|
238
|
-
if (Object.defineProperty(
|
|
238
|
+
if (Object.defineProperty(f.prototype, "props", {
|
|
239
239
|
set: function() {
|
|
240
240
|
throw Error();
|
|
241
241
|
}
|
|
242
242
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
243
243
|
try {
|
|
244
|
-
Reflect.construct(
|
|
245
|
-
} catch (
|
|
246
|
-
|
|
244
|
+
Reflect.construct(f, []);
|
|
245
|
+
} catch (P) {
|
|
246
|
+
s = P;
|
|
247
247
|
}
|
|
248
|
-
Reflect.construct(e, [],
|
|
248
|
+
Reflect.construct(e, [], f);
|
|
249
249
|
} else {
|
|
250
250
|
try {
|
|
251
|
-
|
|
252
|
-
} catch (
|
|
253
|
-
|
|
251
|
+
f.call();
|
|
252
|
+
} catch (P) {
|
|
253
|
+
s = P;
|
|
254
254
|
}
|
|
255
|
-
e.call(
|
|
255
|
+
e.call(f.prototype);
|
|
256
256
|
}
|
|
257
257
|
} else {
|
|
258
258
|
try {
|
|
259
259
|
throw Error();
|
|
260
|
-
} catch (
|
|
261
|
-
|
|
260
|
+
} catch (P) {
|
|
261
|
+
s = P;
|
|
262
262
|
}
|
|
263
263
|
e();
|
|
264
264
|
}
|
|
265
|
-
} catch (
|
|
266
|
-
if (
|
|
267
|
-
for (var l =
|
|
268
|
-
`), N =
|
|
265
|
+
} catch (P) {
|
|
266
|
+
if (P && s && typeof P.stack == "string") {
|
|
267
|
+
for (var l = P.stack.split(`
|
|
268
|
+
`), N = s.stack.split(`
|
|
269
269
|
`), E = l.length - 1, w = N.length - 1; E >= 1 && w >= 0 && l[E] !== N[w]; )
|
|
270
270
|
w--;
|
|
271
271
|
for (; E >= 1 && w >= 0; E--, w--)
|
|
@@ -282,15 +282,15 @@ function $t() {
|
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
} finally {
|
|
285
|
-
pe = !1, de.current = _,
|
|
285
|
+
pe = !1, de.current = _, lt(), Error.prepareStackTrace = v;
|
|
286
286
|
}
|
|
287
287
|
var z = e ? e.displayName || e.name : "", Xe = z ? ae(z) : "";
|
|
288
288
|
return typeof e == "function" && se.set(e, Xe), Xe;
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function dt(e, t, n) {
|
|
291
291
|
return ke(e, !1);
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function ft(e) {
|
|
294
294
|
var t = e.prototype;
|
|
295
295
|
return !!(t && t.isReactComponent);
|
|
296
296
|
}
|
|
@@ -298,7 +298,7 @@ function $t() {
|
|
|
298
298
|
if (e == null)
|
|
299
299
|
return "";
|
|
300
300
|
if (typeof e == "function")
|
|
301
|
-
return ke(e,
|
|
301
|
+
return ke(e, ft(e));
|
|
302
302
|
if (typeof e == "string")
|
|
303
303
|
return ae(e);
|
|
304
304
|
switch (e) {
|
|
@@ -310,11 +310,11 @@ function $t() {
|
|
|
310
310
|
if (typeof e == "object")
|
|
311
311
|
switch (e.$$typeof) {
|
|
312
312
|
case m:
|
|
313
|
-
return
|
|
313
|
+
return dt(e.render);
|
|
314
314
|
case S:
|
|
315
315
|
return ie(e.type, t, n);
|
|
316
316
|
case R: {
|
|
317
|
-
var
|
|
317
|
+
var s = e, v = s._payload, _ = s._init;
|
|
318
318
|
try {
|
|
319
319
|
return ie(_(v), t, n);
|
|
320
320
|
} catch {
|
|
@@ -331,36 +331,36 @@ function $t() {
|
|
|
331
331
|
} else
|
|
332
332
|
Le.setExtraStackFrame(null);
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function pt(e, t, n, s, v) {
|
|
335
335
|
{
|
|
336
336
|
var _ = Function.call.bind(oe);
|
|
337
|
-
for (var
|
|
338
|
-
if (_(e,
|
|
337
|
+
for (var f in e)
|
|
338
|
+
if (_(e, f)) {
|
|
339
339
|
var l = void 0;
|
|
340
340
|
try {
|
|
341
|
-
if (typeof e[
|
|
342
|
-
var N = Error((
|
|
341
|
+
if (typeof e[f] != "function") {
|
|
342
|
+
var N = Error((s || "React class") + ": " + n + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
343
343
|
throw N.name = "Invariant Violation", N;
|
|
344
344
|
}
|
|
345
|
-
l = e[
|
|
345
|
+
l = e[f](t, f, s, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
346
346
|
} catch (E) {
|
|
347
347
|
l = E;
|
|
348
348
|
}
|
|
349
|
-
l && !(l instanceof Error) && (ce(v), h("%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).",
|
|
349
|
+
l && !(l instanceof Error) && (ce(v), h("%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).", s || "React class", n, f, typeof l), ce(null)), l instanceof Error && !(l.message in Fe) && (Fe[l.message] = !0, ce(v), h("Failed %s type: %s", n, l.message), ce(null));
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
|
-
var
|
|
353
|
+
var vt = Array.isArray;
|
|
354
354
|
function ve(e) {
|
|
355
|
-
return
|
|
355
|
+
return vt(e);
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function _t(e) {
|
|
358
358
|
{
|
|
359
359
|
var t = typeof Symbol == "function" && Symbol.toStringTag, n = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
360
360
|
return n;
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function mt(e) {
|
|
364
364
|
try {
|
|
365
365
|
return Ue(e), !1;
|
|
366
366
|
} catch {
|
|
@@ -371,16 +371,16 @@ function $t() {
|
|
|
371
371
|
return "" + e;
|
|
372
372
|
}
|
|
373
373
|
function Be(e) {
|
|
374
|
-
if (
|
|
375
|
-
return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
374
|
+
if (mt(e))
|
|
375
|
+
return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", _t(e)), Ue(e);
|
|
376
376
|
}
|
|
377
|
-
var He = C.ReactCurrentOwner,
|
|
377
|
+
var He = C.ReactCurrentOwner, ht = {
|
|
378
378
|
key: !0,
|
|
379
379
|
ref: !0,
|
|
380
380
|
__self: !0,
|
|
381
381
|
__source: !0
|
|
382
382
|
}, $e, We;
|
|
383
|
-
function
|
|
383
|
+
function gt(e) {
|
|
384
384
|
if (oe.call(e, "ref")) {
|
|
385
385
|
var t = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
386
386
|
if (t && t.isReactWarning)
|
|
@@ -388,7 +388,7 @@ function $t() {
|
|
|
388
388
|
}
|
|
389
389
|
return e.ref !== void 0;
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function Et(e) {
|
|
392
392
|
if (oe.call(e, "key")) {
|
|
393
393
|
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
394
394
|
if (t && t.isReactWarning)
|
|
@@ -396,10 +396,10 @@ function $t() {
|
|
|
396
396
|
}
|
|
397
397
|
return e.key !== void 0;
|
|
398
398
|
}
|
|
399
|
-
function
|
|
399
|
+
function wt(e, t) {
|
|
400
400
|
typeof e.ref == "string" && He.current;
|
|
401
401
|
}
|
|
402
|
-
function
|
|
402
|
+
function bt(e, t) {
|
|
403
403
|
{
|
|
404
404
|
var n = function() {
|
|
405
405
|
$e || ($e = !0, h("%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)", t));
|
|
@@ -410,7 +410,7 @@ function $t() {
|
|
|
410
410
|
});
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
|
-
function
|
|
413
|
+
function Tt(e, t) {
|
|
414
414
|
{
|
|
415
415
|
var n = function() {
|
|
416
416
|
We || (We = !0, h("%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)", t));
|
|
@@ -421,15 +421,15 @@ function $t() {
|
|
|
421
421
|
});
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
|
-
var
|
|
424
|
+
var St = function(e, t, n, s, v, _, f) {
|
|
425
425
|
var l = {
|
|
426
426
|
// This tag allows us to uniquely identify this as a React Element
|
|
427
|
-
$$typeof:
|
|
427
|
+
$$typeof: a,
|
|
428
428
|
// Built-in properties that belong on the element
|
|
429
429
|
type: e,
|
|
430
430
|
key: t,
|
|
431
431
|
ref: n,
|
|
432
|
-
props:
|
|
432
|
+
props: f,
|
|
433
433
|
// Record the component responsible for creating this element.
|
|
434
434
|
_owner: _
|
|
435
435
|
};
|
|
@@ -442,7 +442,7 @@ function $t() {
|
|
|
442
442
|
configurable: !1,
|
|
443
443
|
enumerable: !1,
|
|
444
444
|
writable: !1,
|
|
445
|
-
value:
|
|
445
|
+
value: s
|
|
446
446
|
}), Object.defineProperty(l, "_source", {
|
|
447
447
|
configurable: !1,
|
|
448
448
|
enumerable: !1,
|
|
@@ -450,22 +450,22 @@ function $t() {
|
|
|
450
450
|
value: v
|
|
451
451
|
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
|
|
452
452
|
};
|
|
453
|
-
function
|
|
453
|
+
function xt(e, t, n, s, v) {
|
|
454
454
|
{
|
|
455
|
-
var _,
|
|
456
|
-
n !== void 0 && (Be(n), l = "" + n),
|
|
455
|
+
var _, f = {}, l = null, N = null;
|
|
456
|
+
n !== void 0 && (Be(n), l = "" + n), Et(t) && (Be(t.key), l = "" + t.key), gt(t) && (N = t.ref, wt(t, v));
|
|
457
457
|
for (_ in t)
|
|
458
|
-
oe.call(t, _) && !
|
|
458
|
+
oe.call(t, _) && !ht.hasOwnProperty(_) && (f[_] = t[_]);
|
|
459
459
|
if (e && e.defaultProps) {
|
|
460
460
|
var E = e.defaultProps;
|
|
461
461
|
for (_ in E)
|
|
462
|
-
|
|
462
|
+
f[_] === void 0 && (f[_] = E[_]);
|
|
463
463
|
}
|
|
464
464
|
if (l || N) {
|
|
465
465
|
var w = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
466
|
-
l &&
|
|
466
|
+
l && bt(f, w), N && Tt(f, w);
|
|
467
467
|
}
|
|
468
|
-
return
|
|
468
|
+
return St(e, l, N, v, s, He.current, f);
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
471
|
var _e = C.ReactCurrentOwner, qe = C.ReactDebugCurrentFrame;
|
|
@@ -479,12 +479,12 @@ function $t() {
|
|
|
479
479
|
var me;
|
|
480
480
|
me = !1;
|
|
481
481
|
function he(e) {
|
|
482
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
482
|
+
return typeof e == "object" && e !== null && e.$$typeof === a;
|
|
483
483
|
}
|
|
484
484
|
function Ve() {
|
|
485
485
|
{
|
|
486
486
|
if (_e.current) {
|
|
487
|
-
var e =
|
|
487
|
+
var e = $(_e.current.type);
|
|
488
488
|
if (e)
|
|
489
489
|
return `
|
|
490
490
|
|
|
@@ -493,11 +493,11 @@ Check the render method of \`` + e + "`.";
|
|
|
493
493
|
return "";
|
|
494
494
|
}
|
|
495
495
|
}
|
|
496
|
-
function
|
|
496
|
+
function Rt(e) {
|
|
497
497
|
return "";
|
|
498
498
|
}
|
|
499
499
|
var Ye = {};
|
|
500
|
-
function
|
|
500
|
+
function Nt(e) {
|
|
501
501
|
{
|
|
502
502
|
var t = Ve();
|
|
503
503
|
if (!t) {
|
|
@@ -514,12 +514,12 @@ Check the top-level render call using <` + n + ">.");
|
|
|
514
514
|
if (!e._store || e._store.validated || e.key != null)
|
|
515
515
|
return;
|
|
516
516
|
e._store.validated = !0;
|
|
517
|
-
var n =
|
|
517
|
+
var n = Nt(t);
|
|
518
518
|
if (Ye[n])
|
|
519
519
|
return;
|
|
520
520
|
Ye[n] = !0;
|
|
521
|
-
var
|
|
522
|
-
e && e._owner && e._owner !== _e.current && (
|
|
521
|
+
var s = "";
|
|
522
|
+
e && e._owner && e._owner !== _e.current && (s = " It was passed a child from " + $(e._owner.type) + "."), G(e), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, s), G(null);
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
525
|
function ze(e, t) {
|
|
@@ -528,20 +528,20 @@ Check the top-level render call using <` + n + ">.");
|
|
|
528
528
|
return;
|
|
529
529
|
if (ve(e))
|
|
530
530
|
for (var n = 0; n < e.length; n++) {
|
|
531
|
-
var
|
|
532
|
-
he(
|
|
531
|
+
var s = e[n];
|
|
532
|
+
he(s) && Ge(s, t);
|
|
533
533
|
}
|
|
534
534
|
else if (he(e))
|
|
535
535
|
e._store && (e._store.validated = !0);
|
|
536
536
|
else if (e) {
|
|
537
|
-
var v =
|
|
537
|
+
var v = B(e);
|
|
538
538
|
if (typeof v == "function" && v !== e.entries)
|
|
539
|
-
for (var _ = v.call(e),
|
|
540
|
-
he(
|
|
539
|
+
for (var _ = v.call(e), f; !(f = _.next()).done; )
|
|
540
|
+
he(f.value) && Ge(f.value, t);
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
|
-
function
|
|
544
|
+
function Ct(e) {
|
|
545
545
|
{
|
|
546
546
|
var t = e.type;
|
|
547
547
|
if (t == null || typeof t == "string")
|
|
@@ -556,46 +556,46 @@ Check the top-level render call using <` + n + ">.");
|
|
|
556
556
|
else
|
|
557
557
|
return;
|
|
558
558
|
if (n) {
|
|
559
|
-
var
|
|
560
|
-
|
|
559
|
+
var s = $(t);
|
|
560
|
+
pt(n, e.props, "prop", s, e);
|
|
561
561
|
} else if (t.PropTypes !== void 0 && !me) {
|
|
562
562
|
me = !0;
|
|
563
|
-
var v =
|
|
563
|
+
var v = $(t);
|
|
564
564
|
h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", v || "Unknown");
|
|
565
565
|
}
|
|
566
566
|
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
function
|
|
569
|
+
function It(e) {
|
|
570
570
|
{
|
|
571
571
|
for (var t = Object.keys(e.props), n = 0; n < t.length; n++) {
|
|
572
|
-
var
|
|
573
|
-
if (
|
|
574
|
-
G(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",
|
|
572
|
+
var s = t[n];
|
|
573
|
+
if (s !== "children" && s !== "key") {
|
|
574
|
+
G(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), G(null);
|
|
575
575
|
break;
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
578
|
e.ref !== null && (G(e), h("Invalid attribute `ref` supplied to `React.Fragment`."), G(null));
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
|
-
function Ke(e, t, n,
|
|
581
|
+
function Ke(e, t, n, s, v, _) {
|
|
582
582
|
{
|
|
583
|
-
var
|
|
584
|
-
if (!
|
|
583
|
+
var f = it(e);
|
|
584
|
+
if (!f) {
|
|
585
585
|
var l = "";
|
|
586
586
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (l += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
587
|
-
var N =
|
|
587
|
+
var N = Rt();
|
|
588
588
|
N ? l += N : l += Ve();
|
|
589
589
|
var E;
|
|
590
|
-
e === null ? E = "null" : ve(e) ? E = "array" : e !== void 0 && e.$$typeof ===
|
|
590
|
+
e === null ? E = "null" : ve(e) ? E = "array" : e !== void 0 && e.$$typeof === a ? (E = "<" + ($(e.type) || "Unknown") + " />", l = " Did you accidentally export a JSX literal instead of a component?") : E = typeof e, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", E, l);
|
|
591
591
|
}
|
|
592
|
-
var w =
|
|
592
|
+
var w = xt(e, t, n, v, _);
|
|
593
593
|
if (w == null)
|
|
594
594
|
return w;
|
|
595
|
-
if (
|
|
595
|
+
if (f) {
|
|
596
596
|
var I = t.children;
|
|
597
597
|
if (I !== void 0)
|
|
598
|
-
if (
|
|
598
|
+
if (s)
|
|
599
599
|
if (ve(I)) {
|
|
600
600
|
for (var z = 0; z < I.length; z++)
|
|
601
601
|
ze(I[z], e);
|
|
@@ -605,22 +605,22 @@ Check the top-level render call using <` + n + ">.");
|
|
|
605
605
|
else
|
|
606
606
|
ze(I, e);
|
|
607
607
|
}
|
|
608
|
-
return e ===
|
|
608
|
+
return e === u ? It(w) : Ct(w), w;
|
|
609
609
|
}
|
|
610
610
|
}
|
|
611
|
-
function
|
|
611
|
+
function yt(e, t, n) {
|
|
612
612
|
return Ke(e, t, n, !0);
|
|
613
613
|
}
|
|
614
|
-
function
|
|
614
|
+
function jt(e, t, n) {
|
|
615
615
|
return Ke(e, t, n, !1);
|
|
616
616
|
}
|
|
617
|
-
var
|
|
618
|
-
ee.Fragment =
|
|
617
|
+
var At = jt, Pt = yt;
|
|
618
|
+
ee.Fragment = u, ee.jsx = At, ee.jsxs = Pt;
|
|
619
619
|
}()), ee;
|
|
620
620
|
}
|
|
621
|
-
process.env.NODE_ENV === "production" ? we.exports =
|
|
621
|
+
process.env.NODE_ENV === "production" ? we.exports = $t() : we.exports = Wt();
|
|
622
622
|
var r = we.exports;
|
|
623
|
-
const
|
|
623
|
+
const D = {
|
|
624
624
|
SHOWROOM: "/showroom",
|
|
625
625
|
SENDOUTS: "/sendouts",
|
|
626
626
|
SENDOUTS_CMS: "/sendouts-cms",
|
|
@@ -634,109 +634,109 @@ const O = {
|
|
|
634
634
|
INSTORE_ADMIN: "/instore-admin",
|
|
635
635
|
SUPERADMIN: "/superadmin",
|
|
636
636
|
CMS: "/cms"
|
|
637
|
-
},
|
|
638
|
-
var F = /* @__PURE__ */ ((
|
|
637
|
+
}, qt = 300, Vt = 300;
|
|
638
|
+
var F = /* @__PURE__ */ ((i) => (i.OPEN = "OPEN", i.HIDDEN = "HIDDEN", i.EXPANDED = "EXPANDED", i))(F || {});
|
|
639
639
|
const xe = be.createContext(
|
|
640
640
|
{}
|
|
641
641
|
);
|
|
642
|
-
function
|
|
642
|
+
function V() {
|
|
643
643
|
return X(xe);
|
|
644
644
|
}
|
|
645
|
-
function
|
|
646
|
-
children:
|
|
647
|
-
isOpen:
|
|
645
|
+
function Yt({
|
|
646
|
+
children: i,
|
|
647
|
+
isOpen: a,
|
|
648
648
|
tenantServiceUrl: p,
|
|
649
|
-
onNavigationClose:
|
|
649
|
+
onNavigationClose: u = () => {
|
|
650
650
|
}
|
|
651
651
|
}) {
|
|
652
|
-
const [
|
|
653
|
-
selectedTenantId:
|
|
652
|
+
const [d] = X(Te), [c, b] = le({
|
|
653
|
+
selectedTenantId: d,
|
|
654
654
|
currentPosition: "HIDDEN"
|
|
655
655
|
/* HIDDEN */
|
|
656
|
-
}), { user:
|
|
656
|
+
}), { user: o, authService: m, canSignOut: x } = X(tt);
|
|
657
657
|
Ee(() => {
|
|
658
|
-
if (
|
|
659
|
-
b((
|
|
660
|
-
...
|
|
661
|
-
selectedTenantId:
|
|
658
|
+
if (a) {
|
|
659
|
+
b((A) => ({
|
|
660
|
+
...A,
|
|
661
|
+
selectedTenantId: d,
|
|
662
662
|
currentPosition: "OPEN"
|
|
663
663
|
/* OPEN */
|
|
664
664
|
}));
|
|
665
665
|
return;
|
|
666
666
|
}
|
|
667
|
-
b((
|
|
668
|
-
...
|
|
667
|
+
b((A) => ({
|
|
668
|
+
...A,
|
|
669
669
|
currentPosition: "HIDDEN"
|
|
670
670
|
/* HIDDEN */
|
|
671
671
|
}));
|
|
672
|
-
}, [
|
|
673
|
-
|
|
674
|
-
}, [m,
|
|
672
|
+
}, [d, a, b]), Ee(() => {
|
|
673
|
+
a && m.refreshUser(300);
|
|
674
|
+
}, [m, a]);
|
|
675
675
|
const g = y(
|
|
676
|
-
() =>
|
|
677
|
-
|
|
676
|
+
() => o ? M(
|
|
677
|
+
o,
|
|
678
678
|
c.selectedTenantId,
|
|
679
|
-
|
|
679
|
+
q.MARKETING_ENGINE_APP
|
|
680
680
|
) : !1,
|
|
681
|
-
[c.selectedTenantId,
|
|
681
|
+
[c.selectedTenantId, o]
|
|
682
682
|
), S = y(
|
|
683
|
-
() =>
|
|
684
|
-
|
|
683
|
+
() => o ? M(
|
|
684
|
+
o,
|
|
685
685
|
c.selectedTenantId,
|
|
686
|
-
|
|
686
|
+
q.SHOWROOM_APP
|
|
687
687
|
) : !1,
|
|
688
|
-
[c.selectedTenantId,
|
|
688
|
+
[c.selectedTenantId, o]
|
|
689
689
|
), R = y(
|
|
690
|
-
() =>
|
|
691
|
-
|
|
690
|
+
() => o ? M(
|
|
691
|
+
o,
|
|
692
692
|
c.selectedTenantId,
|
|
693
|
-
|
|
693
|
+
q.SENDOUTS_APP
|
|
694
694
|
) : !1,
|
|
695
|
-
[c.selectedTenantId,
|
|
695
|
+
[c.selectedTenantId, o]
|
|
696
696
|
), j = y(
|
|
697
|
-
() =>
|
|
698
|
-
|
|
697
|
+
() => o ? M(
|
|
698
|
+
o,
|
|
699
699
|
c.selectedTenantId,
|
|
700
|
-
|
|
700
|
+
q.SENDOUTS_CMS_APP
|
|
701
701
|
) : !1,
|
|
702
|
-
[c.selectedTenantId,
|
|
703
|
-
), D = y(
|
|
704
|
-
() => i ? M(
|
|
705
|
-
i,
|
|
706
|
-
c.selectedTenantId,
|
|
707
|
-
W.USER_MANAGEMENT_APP
|
|
708
|
-
) : !1,
|
|
709
|
-
[c.selectedTenantId, i]
|
|
702
|
+
[c.selectedTenantId, o]
|
|
710
703
|
), L = y(
|
|
711
|
-
() =>
|
|
712
|
-
|
|
704
|
+
() => o ? M(
|
|
705
|
+
o,
|
|
713
706
|
c.selectedTenantId,
|
|
714
|
-
|
|
707
|
+
q.USER_MANAGEMENT_APP
|
|
715
708
|
) : !1,
|
|
716
|
-
[c.selectedTenantId,
|
|
709
|
+
[c.selectedTenantId, o]
|
|
717
710
|
), U = y(
|
|
718
|
-
() =>
|
|
719
|
-
|
|
711
|
+
() => o ? M(
|
|
712
|
+
o,
|
|
713
|
+
c.selectedTenantId,
|
|
714
|
+
q.UNIVERSAL
|
|
715
|
+
) : !1,
|
|
716
|
+
[c.selectedTenantId, o]
|
|
717
|
+
), B = y(
|
|
718
|
+
() => o ? M(o, c.selectedTenantId, "settings-app") : !1,
|
|
719
|
+
[c.selectedTenantId, o]
|
|
720
720
|
), C = y(
|
|
721
|
-
() =>
|
|
722
|
-
|
|
721
|
+
() => o ? M(
|
|
722
|
+
o,
|
|
723
723
|
c.selectedTenantId,
|
|
724
|
-
|
|
724
|
+
q.INSTORE_ADMIN_APP
|
|
725
725
|
) : !1,
|
|
726
|
-
[c.selectedTenantId,
|
|
726
|
+
[c.selectedTenantId, o]
|
|
727
727
|
), h = K(
|
|
728
|
-
(
|
|
728
|
+
(A) => b((ue) => ({
|
|
729
729
|
...ue,
|
|
730
|
-
...
|
|
730
|
+
...A
|
|
731
731
|
})),
|
|
732
732
|
[]
|
|
733
|
-
),
|
|
733
|
+
), H = K(async () => {
|
|
734
734
|
x && await m.signOut();
|
|
735
735
|
}, [m, x]), Y = K(() => {
|
|
736
736
|
if (c.currentPosition === "OPEN") {
|
|
737
737
|
h({
|
|
738
738
|
currentPosition: "EXPANDED",
|
|
739
|
-
selectedTenantId:
|
|
739
|
+
selectedTenantId: d
|
|
740
740
|
});
|
|
741
741
|
return;
|
|
742
742
|
}
|
|
@@ -747,21 +747,21 @@ function Vt({
|
|
|
747
747
|
});
|
|
748
748
|
return;
|
|
749
749
|
}
|
|
750
|
-
}, [
|
|
750
|
+
}, [d, h, c.currentPosition]), J = y(
|
|
751
751
|
() => ({
|
|
752
752
|
hasMarketingEngineAccess: g,
|
|
753
753
|
hasShowroomAccess: S,
|
|
754
754
|
hasSendoutsAccess: R,
|
|
755
755
|
hasCmsAccess: j,
|
|
756
|
-
hasUserManagementAccess:
|
|
757
|
-
hasUniversalAccess:
|
|
758
|
-
hasSettingsAccess:
|
|
756
|
+
hasUserManagementAccess: L,
|
|
757
|
+
hasUniversalAccess: U,
|
|
758
|
+
hasSettingsAccess: B,
|
|
759
759
|
hasInstoreAccess: C,
|
|
760
760
|
viewState: c,
|
|
761
761
|
updateViewState: h,
|
|
762
|
-
signOut:
|
|
762
|
+
signOut: H,
|
|
763
763
|
toggleTenants: Y,
|
|
764
|
-
onNavigationClose:
|
|
764
|
+
onNavigationClose: u,
|
|
765
765
|
tenantServiceUrl: p
|
|
766
766
|
}),
|
|
767
767
|
[
|
|
@@ -769,132 +769,143 @@ function Vt({
|
|
|
769
769
|
R,
|
|
770
770
|
j,
|
|
771
771
|
S,
|
|
772
|
-
D,
|
|
773
772
|
L,
|
|
774
773
|
U,
|
|
774
|
+
B,
|
|
775
775
|
C,
|
|
776
776
|
c,
|
|
777
777
|
h,
|
|
778
|
-
|
|
778
|
+
H,
|
|
779
779
|
Y,
|
|
780
|
-
|
|
780
|
+
u,
|
|
781
781
|
p
|
|
782
782
|
]
|
|
783
783
|
);
|
|
784
|
-
return /* @__PURE__ */ r.jsx(xe.Provider, { value: J, children:
|
|
784
|
+
return /* @__PURE__ */ r.jsx(xe.Provider, { value: J, children: i });
|
|
785
785
|
}
|
|
786
|
-
const
|
|
787
|
-
navigation:
|
|
788
|
-
},
|
|
789
|
-
|
|
790
|
-
|
|
786
|
+
const Gt = "_navigation_1esaw_1", zt = {
|
|
787
|
+
navigation: Gt
|
|
788
|
+
}, Kt = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.398438%200.399902L19.5984%2019.5999M0.398438%2019.5999L19.5984%200.399902'%20stroke='black'/%3e%3c/svg%3e", Xt = "data:image/svg+xml,%3csvg%20width='14'%20height='15'%20viewBox='0%200%2014%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7%201.5999L10.4667%204.7999M7%201.5999L3.8%204.7999M7%201.5999L7%2011.7332M13.4%207.46657L13.4%2014.3999L0.600002%2014.3999L0.600002%207.46657'%20stroke='%232D2D33'/%3e%3c/svg%3e", Jt = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20width='100%25'%20height='100%25'%20viewBox='0%200%2046%2046'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20xmlns:serif='http://www.serif.com/'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;'%3e%3cg%20transform='matrix(1,0,0,1,-27,-27)'%3e%3cpath%20d='M73,50C73,37.3%2062.7,27%2050,27C37.3,27%2027,37.3%2027,50M30.9,50C30.9,39.5%2039.4,30.9%2050,30.9C60.6,30.9%2069.1,39.5%2069.1,50'%20style='fill-rule:nonzero;'%3e%3canimateTransform%20attributeName='transform'%20attributeType='XML'%20type='rotate'%20dur='1s'%20from='0%2050%2050'%20to='360%2050%2050'%20repeatCount='indefinite'%20/%3e%3c/path%3e%3c/g%3e%3c/svg%3e", Zt = (i) => {
|
|
789
|
+
const a = i ?? void 0 ?? void 0;
|
|
790
|
+
if (!a)
|
|
791
|
+
throw new Error(
|
|
792
|
+
"TENANTS_SERVICE_URL or REACT_APP_TENANTS_SERVICE_URL must be set"
|
|
793
|
+
);
|
|
794
|
+
return rt(
|
|
795
|
+
a,
|
|
796
|
+
"/api/Subscriptions/create-customer-portal-session"
|
|
791
797
|
);
|
|
792
798
|
};
|
|
793
|
-
function
|
|
794
|
-
const
|
|
799
|
+
function Qt(i) {
|
|
800
|
+
const a = nt(), p = Zt(i), { viewState: u } = V(), [d] = X(Te);
|
|
795
801
|
return K(
|
|
796
802
|
async (b) => {
|
|
797
|
-
const
|
|
798
|
-
|
|
803
|
+
const o = b.replace(/^\//, "");
|
|
804
|
+
a.setHeader("tenant-id", u.selectedTenantId);
|
|
799
805
|
try {
|
|
800
|
-
return await
|
|
806
|
+
return await a.post(
|
|
801
807
|
p,
|
|
802
|
-
|
|
808
|
+
o
|
|
803
809
|
);
|
|
804
810
|
} finally {
|
|
805
|
-
|
|
811
|
+
d && a.setHeader("tenant-id", d);
|
|
806
812
|
}
|
|
807
813
|
},
|
|
808
|
-
[
|
|
814
|
+
[a, p, u, d]
|
|
809
815
|
);
|
|
810
816
|
}
|
|
811
|
-
function
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
817
|
+
function en(i) {
|
|
818
|
+
const a = i ?? void 0 ?? void 0;
|
|
819
|
+
if (!a)
|
|
820
|
+
throw new Error(
|
|
821
|
+
"TENANTS_SERVICE_URL or REACT_APP_TENANTS_SERVICE_URL must be set"
|
|
822
|
+
);
|
|
823
|
+
return rt(a, "/api/Tenants/view");
|
|
815
824
|
}
|
|
816
|
-
function Re(
|
|
817
|
-
const
|
|
825
|
+
function Re(i) {
|
|
826
|
+
const a = nt(), p = en(i), { data: u, error: d } = Ut(p, a.get);
|
|
818
827
|
return {
|
|
819
|
-
tenants:
|
|
820
|
-
isLoading: !
|
|
821
|
-
error:
|
|
828
|
+
tenants: u ?? [],
|
|
829
|
+
isLoading: !u && !d,
|
|
830
|
+
error: d
|
|
822
831
|
};
|
|
823
832
|
}
|
|
824
|
-
function
|
|
833
|
+
function tn() {
|
|
825
834
|
const {
|
|
826
|
-
viewState: { selectedTenantId:
|
|
827
|
-
|
|
828
|
-
|
|
835
|
+
viewState: { selectedTenantId: i },
|
|
836
|
+
tenantServiceUrl: a
|
|
837
|
+
} = V(), { tenants: p } = Re(a);
|
|
838
|
+
return y(() => p.find((d) => d.id === i), [p, i]);
|
|
829
839
|
}
|
|
830
|
-
function
|
|
840
|
+
function nn({ layout: i }) {
|
|
831
841
|
const {
|
|
832
|
-
viewState: { selectedTenantId:
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
842
|
+
viewState: { selectedTenantId: a },
|
|
843
|
+
tenantServiceUrl: p
|
|
844
|
+
} = V(), { tenants: u } = Re(p), d = y(
|
|
845
|
+
() => u.find((c) => c.id === a),
|
|
846
|
+
[a, u]
|
|
836
847
|
);
|
|
837
|
-
return d ? /* @__PURE__ */ r.jsx(
|
|
848
|
+
return d ? /* @__PURE__ */ r.jsx(Ft, { src: d.logoUrl, layout: i }) : null;
|
|
838
849
|
}
|
|
839
|
-
const
|
|
840
|
-
tier:
|
|
841
|
-
tierHeader:
|
|
842
|
-
border:
|
|
843
|
-
tierMain:
|
|
844
|
-
tierFooter:
|
|
850
|
+
const rn = "_tier_1cqnw_1", an = "_tier-header_1cqnw_12", sn = "_border_1cqnw_17", on = "_tier-main_1cqnw_21", cn = "_tier-footer_1cqnw_26", te = {
|
|
851
|
+
tier: rn,
|
|
852
|
+
tierHeader: an,
|
|
853
|
+
border: sn,
|
|
854
|
+
tierMain: on,
|
|
855
|
+
tierFooter: cn
|
|
845
856
|
};
|
|
846
|
-
function
|
|
847
|
-
children:
|
|
848
|
-
header:
|
|
857
|
+
function at({
|
|
858
|
+
children: i,
|
|
859
|
+
header: a,
|
|
849
860
|
footer: p,
|
|
850
|
-
className:
|
|
851
|
-
width:
|
|
861
|
+
className: u,
|
|
862
|
+
width: d,
|
|
852
863
|
showHeaderBorder: c
|
|
853
864
|
}) {
|
|
854
|
-
return /* @__PURE__ */ r.jsxs("div", { className: re([te.tier,
|
|
855
|
-
!!
|
|
865
|
+
return /* @__PURE__ */ r.jsxs("div", { className: re([te.tier, u]), style: { width: d }, children: [
|
|
866
|
+
!!a && /* @__PURE__ */ r.jsx(
|
|
856
867
|
"div",
|
|
857
868
|
{
|
|
858
869
|
className: re([
|
|
859
870
|
te.tierHeader,
|
|
860
871
|
{ [te.border]: c }
|
|
861
872
|
]),
|
|
862
|
-
children:
|
|
873
|
+
children: a
|
|
863
874
|
}
|
|
864
875
|
),
|
|
865
|
-
/* @__PURE__ */ r.jsx("div", { className: te.tierMain, children:
|
|
876
|
+
/* @__PURE__ */ r.jsx("div", { className: te.tierMain, children: i }),
|
|
866
877
|
!!p && /* @__PURE__ */ r.jsx("div", { className: te.tierFooter, children: p })
|
|
867
878
|
] });
|
|
868
879
|
}
|
|
869
|
-
const
|
|
870
|
-
navigationButton:
|
|
871
|
-
active:
|
|
880
|
+
const ln = "_navigation-button_1ckcy_1", un = "_active_1ckcy_15", Qe = {
|
|
881
|
+
navigationButton: ln,
|
|
882
|
+
active: un
|
|
872
883
|
};
|
|
873
|
-
function
|
|
874
|
-
children:
|
|
875
|
-
to:
|
|
884
|
+
function O({
|
|
885
|
+
children: i,
|
|
886
|
+
to: a,
|
|
876
887
|
hidden: p,
|
|
877
|
-
disabled:
|
|
878
|
-
onClick:
|
|
888
|
+
disabled: u,
|
|
889
|
+
onClick: d
|
|
879
890
|
}) {
|
|
880
|
-
const [c, b] = X(Te), [
|
|
891
|
+
const [c, b] = X(Te), [o, m] = le(!1), {
|
|
881
892
|
viewState: { selectedTenantId: x }
|
|
882
|
-
} =
|
|
893
|
+
} = V();
|
|
883
894
|
Ee(() => {
|
|
884
895
|
const R = () => {
|
|
885
|
-
c !== x &&
|
|
896
|
+
c !== x && o && b(x);
|
|
886
897
|
};
|
|
887
898
|
return window.addEventListener("unload", R), () => {
|
|
888
899
|
window.removeEventListener("unload", R);
|
|
889
900
|
};
|
|
890
|
-
}, [b, c, x,
|
|
901
|
+
}, [b, c, x, o]);
|
|
891
902
|
const g = K(() => {
|
|
892
|
-
if (
|
|
893
|
-
|
|
903
|
+
if (d) {
|
|
904
|
+
d(m);
|
|
894
905
|
return;
|
|
895
906
|
}
|
|
896
|
-
|
|
897
|
-
}, [
|
|
907
|
+
a && (m(!0), window.location.assign(a));
|
|
908
|
+
}, [a, d]), S = a ? !!Bt(`${a}/*`, window.location.pathname) && c === x : !1;
|
|
898
909
|
return p ? null : /* @__PURE__ */ r.jsx(
|
|
899
910
|
Se,
|
|
900
911
|
{
|
|
@@ -902,72 +913,73 @@ function P({
|
|
|
902
913
|
noBorder: !0,
|
|
903
914
|
className: re([Qe.navigationButton, { [Qe.active]: S }]),
|
|
904
915
|
noShadow: !0,
|
|
905
|
-
disabled: S ||
|
|
916
|
+
disabled: S || u,
|
|
906
917
|
onClick: g,
|
|
907
|
-
children:
|
|
918
|
+
children: i
|
|
908
919
|
}
|
|
909
920
|
);
|
|
910
921
|
}
|
|
911
|
-
const
|
|
912
|
-
applications:
|
|
913
|
-
applicationsHeader:
|
|
914
|
-
applicationsHeaderBrand:
|
|
915
|
-
applicationsHeaderLogo:
|
|
916
|
-
applicationsHeaderCloseIcon:
|
|
917
|
-
applicationsHeaderChangeBrandButton:
|
|
918
|
-
applicationsMain:
|
|
919
|
-
applicationsMainContent:
|
|
920
|
-
applicationsMainList:
|
|
921
|
-
applicationsMainUser:
|
|
922
|
-
applicationsMainUserName:
|
|
923
|
-
applicationsMainUserEmail:
|
|
924
|
-
applicationsFooter:
|
|
925
|
-
applicationsFooterSignOut:
|
|
926
|
-
applicationsFooterSignOutIcon:
|
|
927
|
-
applicationsFooterSignOutLabel:
|
|
928
|
-
errorAnim:
|
|
929
|
-
errorText:
|
|
930
|
-
},
|
|
931
|
-
function
|
|
932
|
-
const { user:
|
|
933
|
-
signOut:
|
|
922
|
+
const dn = "_applications_1pwbq_1", fn = "_applications-header_1pwbq_7", pn = "_applications-header-brand_1pwbq_13", vn = "_applications-header-logo_1pwbq_21", _n = "_applications-header-close-icon_1pwbq_26", mn = "_applications-header-change-brand-button_1pwbq_32", hn = "_applications-main_1pwbq_47", gn = "_applications-main-content_1pwbq_51", En = "_applications-main-list_1pwbq_58", wn = "_applications-main-user_1pwbq_74", bn = "_applications-main-user-name_1pwbq_81", Tn = "_applications-main-user-email_1pwbq_82", Sn = "_applications-footer_1pwbq_101", xn = "_applications-footer-sign-out_1pwbq_109", Rn = "_applications-footer-sign-out-icon_1pwbq_115", Nn = "_applications-footer-sign-out-label_1pwbq_119", Cn = "_error-anim_1pwbq_161", In = "_error-text_1pwbq_169", T = {
|
|
923
|
+
applications: dn,
|
|
924
|
+
applicationsHeader: fn,
|
|
925
|
+
applicationsHeaderBrand: pn,
|
|
926
|
+
applicationsHeaderLogo: vn,
|
|
927
|
+
applicationsHeaderCloseIcon: _n,
|
|
928
|
+
applicationsHeaderChangeBrandButton: mn,
|
|
929
|
+
applicationsMain: hn,
|
|
930
|
+
applicationsMainContent: gn,
|
|
931
|
+
applicationsMainList: En,
|
|
932
|
+
applicationsMainUser: wn,
|
|
933
|
+
applicationsMainUserName: bn,
|
|
934
|
+
applicationsMainUserEmail: Tn,
|
|
935
|
+
applicationsFooter: Sn,
|
|
936
|
+
applicationsFooterSignOut: xn,
|
|
937
|
+
applicationsFooterSignOutIcon: Rn,
|
|
938
|
+
applicationsFooterSignOutLabel: Nn,
|
|
939
|
+
errorAnim: Cn,
|
|
940
|
+
errorText: In
|
|
941
|
+
}, yn = (i) => new Promise((a) => setTimeout(a, i));
|
|
942
|
+
function jn() {
|
|
943
|
+
const { user: i } = X(tt), {
|
|
944
|
+
signOut: a,
|
|
934
945
|
onNavigationClose: p,
|
|
935
|
-
toggleTenants:
|
|
936
|
-
hasShowroomAccess:
|
|
946
|
+
toggleTenants: u,
|
|
947
|
+
hasShowroomAccess: d,
|
|
937
948
|
hasMarketingEngineAccess: c,
|
|
938
949
|
hasSendoutsAccess: b,
|
|
939
|
-
hasCmsAccess:
|
|
950
|
+
hasCmsAccess: o,
|
|
940
951
|
hasUserManagementAccess: m,
|
|
941
952
|
hasSettingsAccess: x,
|
|
942
953
|
hasUniversalAccess: g,
|
|
943
|
-
hasInstoreAccess: S
|
|
944
|
-
|
|
945
|
-
|
|
954
|
+
hasInstoreAccess: S,
|
|
955
|
+
tenantServiceUrl: R
|
|
956
|
+
} = V(), j = tn(), L = j && !!j.planName, [U, B] = le(!1), [C, h] = le(!1), H = Qt(R), Y = K(
|
|
957
|
+
async (J) => {
|
|
946
958
|
try {
|
|
947
|
-
|
|
948
|
-
const
|
|
949
|
-
|
|
959
|
+
h(!0);
|
|
960
|
+
const A = await H(window.location.pathname);
|
|
961
|
+
J(!0), window.location.assign(A.text);
|
|
950
962
|
} catch {
|
|
951
|
-
|
|
963
|
+
h(!1), B(!0), await yn(2500), B(!1);
|
|
952
964
|
}
|
|
953
965
|
},
|
|
954
|
-
[
|
|
966
|
+
[h, H]
|
|
955
967
|
);
|
|
956
968
|
return /* @__PURE__ */ r.jsx(
|
|
957
|
-
|
|
969
|
+
at,
|
|
958
970
|
{
|
|
959
971
|
className: T.applications,
|
|
960
|
-
width:
|
|
972
|
+
width: Vt,
|
|
961
973
|
showHeaderBorder: !0,
|
|
962
974
|
header: /* @__PURE__ */ r.jsxs("div", { className: T.applicationsHeader, children: [
|
|
963
975
|
/* @__PURE__ */ r.jsxs("div", { className: T.applicationsHeaderBrand, children: [
|
|
964
|
-
/* @__PURE__ */ r.jsx("div", { className: T.applicationsHeaderLogo, children: /* @__PURE__ */ r.jsx(
|
|
976
|
+
/* @__PURE__ */ r.jsx("div", { className: T.applicationsHeaderLogo, children: /* @__PURE__ */ r.jsx(nn, {}) }),
|
|
965
977
|
/* @__PURE__ */ r.jsx(
|
|
966
978
|
"div",
|
|
967
979
|
{
|
|
968
980
|
className: T.applicationsHeaderCloseIcon,
|
|
969
981
|
onClick: p,
|
|
970
|
-
children: /* @__PURE__ */ r.jsx(ne, { src:
|
|
982
|
+
children: /* @__PURE__ */ r.jsx(ne, { src: Kt, size: "large" })
|
|
971
983
|
}
|
|
972
984
|
)
|
|
973
985
|
] }),
|
|
@@ -978,158 +990,158 @@ function yn() {
|
|
|
978
990
|
noBorder: !0,
|
|
979
991
|
transparent: !0,
|
|
980
992
|
className: T.applicationsHeaderChangeBrandButton,
|
|
981
|
-
onClick:
|
|
993
|
+
onClick: u,
|
|
982
994
|
children: "Change brand"
|
|
983
995
|
}
|
|
984
996
|
)
|
|
985
997
|
] }),
|
|
986
|
-
footer: /* @__PURE__ */ r.jsx("div", { className: T.applicationsFooter, onClick:
|
|
987
|
-
/* @__PURE__ */ r.jsx("div", { className: T.applicationsFooterSignOutIcon, children: /* @__PURE__ */ r.jsx(ne, { src:
|
|
998
|
+
footer: /* @__PURE__ */ r.jsx("div", { className: T.applicationsFooter, onClick: a, children: /* @__PURE__ */ r.jsxs("div", { className: T.applicationsFooterSignOut, children: [
|
|
999
|
+
/* @__PURE__ */ r.jsx("div", { className: T.applicationsFooterSignOutIcon, children: /* @__PURE__ */ r.jsx(ne, { src: Xt, size: "medium" }) }),
|
|
988
1000
|
/* @__PURE__ */ r.jsx("div", { className: T.applicationsFooterSignOutLabel, children: "Sign out" })
|
|
989
1001
|
] }) }),
|
|
990
1002
|
children: /* @__PURE__ */ r.jsx("div", { className: T.applicationsMain, children: /* @__PURE__ */ r.jsxs("div", { className: T.applicationsMainContent, children: [
|
|
991
1003
|
/* @__PURE__ */ r.jsxs("div", { className: T.applicationsMainList, children: [
|
|
992
|
-
/* @__PURE__ */ r.jsx(
|
|
993
|
-
/* @__PURE__ */ r.jsx(
|
|
994
|
-
/* @__PURE__ */ r.jsx(
|
|
1004
|
+
/* @__PURE__ */ r.jsx(O, { to: D.DASHBOARD, children: "Dashboard" }),
|
|
1005
|
+
/* @__PURE__ */ r.jsx(O, { hidden: !d, to: D.SHOWROOM, children: "Presentations (Showroom)" }),
|
|
1006
|
+
/* @__PURE__ */ r.jsx(O, { hidden: !b, to: D.SENDOUTS, children: "Sendouts" }),
|
|
995
1007
|
/* @__PURE__ */ r.jsx(
|
|
996
|
-
|
|
1008
|
+
O,
|
|
997
1009
|
{
|
|
998
1010
|
hidden: !c,
|
|
999
|
-
to:
|
|
1011
|
+
to: D.MARKETING_ENGINE,
|
|
1000
1012
|
children: "Media Library"
|
|
1001
1013
|
}
|
|
1002
1014
|
),
|
|
1003
1015
|
/* @__PURE__ */ r.jsx(
|
|
1004
|
-
|
|
1016
|
+
O,
|
|
1005
1017
|
{
|
|
1006
1018
|
hidden: !S && !g,
|
|
1007
|
-
to:
|
|
1019
|
+
to: D.INSTORE_ADMIN,
|
|
1008
1020
|
children: "Stores"
|
|
1009
1021
|
}
|
|
1010
1022
|
),
|
|
1011
|
-
/* @__PURE__ */ r.jsx(
|
|
1023
|
+
/* @__PURE__ */ r.jsx(O, { hidden: !o, to: D.CMS, children: "Content Manager" }),
|
|
1012
1024
|
/* @__PURE__ */ r.jsx(
|
|
1013
|
-
|
|
1025
|
+
O,
|
|
1014
1026
|
{
|
|
1015
1027
|
hidden: !m,
|
|
1016
|
-
to:
|
|
1028
|
+
to: D.USER_MANAGEMENT,
|
|
1017
1029
|
children: "Users"
|
|
1018
1030
|
}
|
|
1019
1031
|
),
|
|
1020
1032
|
/* @__PURE__ */ r.jsx(
|
|
1021
|
-
|
|
1033
|
+
O,
|
|
1022
1034
|
{
|
|
1023
1035
|
hidden: !g && !x,
|
|
1024
|
-
to:
|
|
1036
|
+
to: D.SETTINGS,
|
|
1025
1037
|
children: "Settings"
|
|
1026
1038
|
}
|
|
1027
1039
|
),
|
|
1028
1040
|
/* @__PURE__ */ r.jsxs(
|
|
1029
|
-
|
|
1041
|
+
O,
|
|
1030
1042
|
{
|
|
1031
|
-
disabled:
|
|
1032
|
-
onClick:
|
|
1033
|
-
hidden: !g || !
|
|
1043
|
+
disabled: C,
|
|
1044
|
+
onClick: Y,
|
|
1045
|
+
hidden: !g || !L,
|
|
1034
1046
|
to: "#",
|
|
1035
1047
|
children: [
|
|
1036
1048
|
/* @__PURE__ */ r.jsx(
|
|
1037
1049
|
"span",
|
|
1038
1050
|
{
|
|
1039
1051
|
className: re({
|
|
1040
|
-
[T.errorAnim]:
|
|
1052
|
+
[T.errorAnim]: U
|
|
1041
1053
|
}),
|
|
1042
1054
|
children: "Subscription"
|
|
1043
1055
|
}
|
|
1044
1056
|
),
|
|
1045
|
-
|
|
1057
|
+
C ? /* @__PURE__ */ r.jsx(ne, { size: "xlarge", src: Jt, alt: "Loading" }) : ""
|
|
1046
1058
|
]
|
|
1047
1059
|
}
|
|
1048
1060
|
),
|
|
1049
|
-
|
|
1061
|
+
U ? /* @__PURE__ */ r.jsx("p", { className: T.errorText, children: "Unable to access subscription page" }) : null
|
|
1050
1062
|
] }),
|
|
1051
|
-
|
|
1063
|
+
i && /* @__PURE__ */ r.jsxs("div", { className: T.applicationsMainUser, children: [
|
|
1052
1064
|
/* @__PURE__ */ r.jsxs("div", { className: T.applicationsMainUserName, children: [
|
|
1053
|
-
|
|
1065
|
+
i.firstName,
|
|
1054
1066
|
" ",
|
|
1055
|
-
|
|
1067
|
+
i.lastName
|
|
1056
1068
|
] }),
|
|
1057
|
-
/* @__PURE__ */ r.jsx("div", { className: T.applicationsMainUserEmail, children:
|
|
1069
|
+
/* @__PURE__ */ r.jsx("div", { className: T.applicationsMainUserEmail, children: i.email })
|
|
1058
1070
|
] })
|
|
1059
1071
|
] }) })
|
|
1060
1072
|
}
|
|
1061
1073
|
);
|
|
1062
1074
|
}
|
|
1063
|
-
const
|
|
1064
|
-
tenantButton:
|
|
1065
|
-
active:
|
|
1075
|
+
const An = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.00170906%207L13.0017%207M6.50171%2013.5L6.50171%200.5'%20stroke='%232D2D33'/%3e%3c/svg%3e", Pn = "data:image/svg+xml,%3csvg%20width='22'%20height='14'%20viewBox='0%200%2022%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.6001%207.00039L8.0001%2013.4004M1.6001%207.00039L8.0001%200.600391M1.6001%207.00039L21.6001%207.00039'%20stroke='%23262626'/%3e%3c/svg%3e", On = "_tenant-button_1m8mx_1", Dn = "_active_1m8mx_15", et = {
|
|
1076
|
+
tenantButton: On,
|
|
1077
|
+
active: Dn
|
|
1066
1078
|
};
|
|
1067
|
-
function
|
|
1079
|
+
function Mn({ tenant: i }) {
|
|
1068
1080
|
const {
|
|
1069
|
-
viewState: { selectedTenantId:
|
|
1081
|
+
viewState: { selectedTenantId: a },
|
|
1070
1082
|
updateViewState: p
|
|
1071
|
-
} =
|
|
1083
|
+
} = V(), u = a === i.id;
|
|
1072
1084
|
return /* @__PURE__ */ r.jsx(
|
|
1073
1085
|
Se,
|
|
1074
1086
|
{
|
|
1075
1087
|
align: "left",
|
|
1076
1088
|
noBorder: !0,
|
|
1077
|
-
className: re([et.tenantButton, { [et.active]:
|
|
1089
|
+
className: re([et.tenantButton, { [et.active]: u }]),
|
|
1078
1090
|
noShadow: !0,
|
|
1079
|
-
disabled:
|
|
1091
|
+
disabled: u,
|
|
1080
1092
|
onClick: () => {
|
|
1081
1093
|
p({
|
|
1082
|
-
selectedTenantId:
|
|
1094
|
+
selectedTenantId: i.id,
|
|
1083
1095
|
currentPosition: F.OPEN
|
|
1084
1096
|
});
|
|
1085
1097
|
},
|
|
1086
|
-
children:
|
|
1098
|
+
children: i.label
|
|
1087
1099
|
},
|
|
1088
|
-
|
|
1100
|
+
i.id
|
|
1089
1101
|
);
|
|
1090
1102
|
}
|
|
1091
|
-
const
|
|
1092
|
-
tenants:
|
|
1093
|
-
tenantsHeader:
|
|
1094
|
-
tenantsHeaderArrowIcon:
|
|
1095
|
-
tenantsMain:
|
|
1096
|
-
tenantsFooter:
|
|
1097
|
-
tenantsFooterCreateBrand:
|
|
1098
|
-
tenantsFooterCreateBrandIcon:
|
|
1099
|
-
tenantsFooterCreateBrandLabel:
|
|
1103
|
+
const kn = "_tenants_6vjyd_1", Fn = "_tenants-header_6vjyd_7", Ln = "_tenants-header-arrow-icon_6vjyd_11", Un = "_tenants-main_6vjyd_24", Bn = "_tenants-footer_6vjyd_42", Hn = "_tenants-footer-create-brand_6vjyd_50", $n = "_tenants-footer-create-brand-icon_6vjyd_56", Wn = "_tenants-footer-create-brand-label_6vjyd_60", k = {
|
|
1104
|
+
tenants: kn,
|
|
1105
|
+
tenantsHeader: Fn,
|
|
1106
|
+
tenantsHeaderArrowIcon: Ln,
|
|
1107
|
+
tenantsMain: Un,
|
|
1108
|
+
tenantsFooter: Bn,
|
|
1109
|
+
tenantsFooterCreateBrand: Hn,
|
|
1110
|
+
tenantsFooterCreateBrandIcon: $n,
|
|
1111
|
+
tenantsFooterCreateBrandLabel: Wn
|
|
1100
1112
|
};
|
|
1101
|
-
function
|
|
1102
|
-
const { toggleTenants:
|
|
1113
|
+
function qn() {
|
|
1114
|
+
const { toggleTenants: i, tenantServiceUrl: a } = V(), { tenants: p } = Re(a);
|
|
1103
1115
|
return /* @__PURE__ */ r.jsx("div", { className: k.tenants, children: /* @__PURE__ */ r.jsx(
|
|
1104
|
-
|
|
1116
|
+
at,
|
|
1105
1117
|
{
|
|
1106
|
-
width:
|
|
1107
|
-
header: /* @__PURE__ */ r.jsx("div", { className: k.tenantsHeader, children: /* @__PURE__ */ r.jsx("div", { className: k.tenantsHeaderArrowIcon, onClick:
|
|
1118
|
+
width: qt,
|
|
1119
|
+
header: /* @__PURE__ */ r.jsx("div", { className: k.tenantsHeader, children: /* @__PURE__ */ r.jsx("div", { className: k.tenantsHeaderArrowIcon, onClick: i, children: /* @__PURE__ */ r.jsx(ne, { src: Pn, size: "large" }) }) }),
|
|
1108
1120
|
footer: /* @__PURE__ */ r.jsx(
|
|
1109
1121
|
"div",
|
|
1110
1122
|
{
|
|
1111
1123
|
className: k.tenantsFooter,
|
|
1112
|
-
onClick: () => window.location.assign(
|
|
1124
|
+
onClick: () => window.location.assign(D.CREATE_WORKSPACE),
|
|
1113
1125
|
children: /* @__PURE__ */ r.jsxs("div", { className: k.tenantsFooterCreateBrand, children: [
|
|
1114
|
-
/* @__PURE__ */ r.jsx("div", { className: k.tenantsFooterCreateBrandIcon, children: /* @__PURE__ */ r.jsx(ne, { src:
|
|
1126
|
+
/* @__PURE__ */ r.jsx("div", { className: k.tenantsFooterCreateBrandIcon, children: /* @__PURE__ */ r.jsx(ne, { src: An, size: "medium" }) }),
|
|
1115
1127
|
/* @__PURE__ */ r.jsx("div", { className: k.tenantsFooterCreateBrandLabel, children: "Create a brand workspace" })
|
|
1116
1128
|
] })
|
|
1117
1129
|
}
|
|
1118
1130
|
),
|
|
1119
|
-
children: /* @__PURE__ */ r.jsx("div", { className: k.tenantsMain, children:
|
|
1131
|
+
children: /* @__PURE__ */ r.jsx("div", { className: k.tenantsMain, children: p.map((u) => /* @__PURE__ */ r.jsx(Mn, { tenant: u }, u.id)) })
|
|
1120
1132
|
}
|
|
1121
1133
|
) });
|
|
1122
1134
|
}
|
|
1123
|
-
const
|
|
1124
|
-
tiers:
|
|
1135
|
+
const Vn = "_tiers_dtxbu_1", Yn = {
|
|
1136
|
+
tiers: Vn
|
|
1125
1137
|
};
|
|
1126
|
-
function
|
|
1127
|
-
return /* @__PURE__ */ r.jsxs("div", { className:
|
|
1128
|
-
/* @__PURE__ */ r.jsx(
|
|
1129
|
-
/* @__PURE__ */ r.jsx(
|
|
1138
|
+
function Gn() {
|
|
1139
|
+
return /* @__PURE__ */ r.jsxs("div", { className: Yn.tiers, children: [
|
|
1140
|
+
/* @__PURE__ */ r.jsx(jn, {}),
|
|
1141
|
+
/* @__PURE__ */ r.jsx(qn, {})
|
|
1130
1142
|
] });
|
|
1131
1143
|
}
|
|
1132
|
-
const ge = { ease: "easeOut", duration: 0.3 },
|
|
1144
|
+
const ge = { ease: "easeOut", duration: 0.3 }, zn = {
|
|
1133
1145
|
[F.HIDDEN]: {
|
|
1134
1146
|
left: -600,
|
|
1135
1147
|
transition: ge
|
|
@@ -1140,76 +1152,76 @@ const ge = { ease: "easeOut", duration: 0.3 }, Gn = {
|
|
|
1140
1152
|
},
|
|
1141
1153
|
[F.EXPANDED]: { left: 0, transition: ge }
|
|
1142
1154
|
};
|
|
1143
|
-
function
|
|
1144
|
-
isOpen:
|
|
1145
|
-
portalContainer:
|
|
1155
|
+
function Kn({
|
|
1156
|
+
isOpen: i,
|
|
1157
|
+
portalContainer: a = document.body,
|
|
1146
1158
|
onClose: p,
|
|
1147
|
-
tenantServiceUrl:
|
|
1159
|
+
tenantServiceUrl: u
|
|
1148
1160
|
}) {
|
|
1149
1161
|
return (
|
|
1150
1162
|
// Using framer-motion lib to animate the navigation component on mount/unmount
|
|
1151
1163
|
// Also to prevent any api calls from being made when the navigation (Tiers component) is hidden
|
|
1152
1164
|
/* @__PURE__ */ r.jsx(
|
|
1153
|
-
|
|
1165
|
+
Yt,
|
|
1154
1166
|
{
|
|
1155
1167
|
onNavigationClose: p,
|
|
1156
|
-
isOpen:
|
|
1157
|
-
tenantServiceUrl:
|
|
1158
|
-
children: /* @__PURE__ */ r.jsx(xe.Consumer, { children: ({ viewState: { currentPosition:
|
|
1159
|
-
/* @__PURE__ */ r.jsx(
|
|
1160
|
-
|
|
1168
|
+
isOpen: i,
|
|
1169
|
+
tenantServiceUrl: u,
|
|
1170
|
+
children: /* @__PURE__ */ r.jsx(xe.Consumer, { children: ({ viewState: { currentPosition: d } }) => kt(
|
|
1171
|
+
/* @__PURE__ */ r.jsx(Dt, { children: d !== F.HIDDEN && /* @__PURE__ */ r.jsx(
|
|
1172
|
+
Mt.div,
|
|
1161
1173
|
{
|
|
1162
|
-
className:
|
|
1174
|
+
className: zt.navigation,
|
|
1163
1175
|
initial: F.HIDDEN,
|
|
1164
|
-
variants:
|
|
1165
|
-
animate:
|
|
1176
|
+
variants: zn,
|
|
1177
|
+
animate: d,
|
|
1166
1178
|
exit: F.HIDDEN,
|
|
1167
|
-
children: /* @__PURE__ */ r.jsx(
|
|
1179
|
+
children: /* @__PURE__ */ r.jsx(Gn, {})
|
|
1168
1180
|
}
|
|
1169
1181
|
) }),
|
|
1170
|
-
|
|
1182
|
+
a
|
|
1171
1183
|
) })
|
|
1172
1184
|
}
|
|
1173
1185
|
)
|
|
1174
1186
|
);
|
|
1175
1187
|
}
|
|
1176
|
-
const
|
|
1177
|
-
function
|
|
1178
|
-
size:
|
|
1179
|
-
alt:
|
|
1180
|
-
src: p =
|
|
1181
|
-
portalContainer:
|
|
1182
|
-
tenantServiceUrl:
|
|
1188
|
+
const Xn = "data:image/svg+xml,%3csvg%20width='14'%20height='15'%20viewBox='0%200%2014%2011'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%201.5H14M0%205.5H14M0%209.5H14M0'%20stroke='black'/%3e%3c/svg%3e";
|
|
1189
|
+
function cr({
|
|
1190
|
+
size: i = "medium",
|
|
1191
|
+
alt: a = "Toggle navigation menu",
|
|
1192
|
+
src: p = Xn,
|
|
1193
|
+
portalContainer: u = document.body,
|
|
1194
|
+
tenantServiceUrl: d,
|
|
1183
1195
|
...c
|
|
1184
1196
|
}) {
|
|
1185
|
-
const [b,
|
|
1186
|
-
return /* @__PURE__ */ r.jsxs(
|
|
1197
|
+
const [b, o] = Ht(!1);
|
|
1198
|
+
return /* @__PURE__ */ r.jsxs(Ot, { children: [
|
|
1187
1199
|
/* @__PURE__ */ r.jsx(
|
|
1188
|
-
|
|
1200
|
+
Lt,
|
|
1189
1201
|
{
|
|
1190
|
-
size:
|
|
1191
|
-
alt:
|
|
1202
|
+
size: i,
|
|
1203
|
+
alt: a,
|
|
1192
1204
|
src: p,
|
|
1193
|
-
onClick: () =>
|
|
1205
|
+
onClick: () => o(),
|
|
1194
1206
|
...c
|
|
1195
1207
|
}
|
|
1196
1208
|
),
|
|
1197
1209
|
/* @__PURE__ */ r.jsx(
|
|
1198
|
-
|
|
1210
|
+
Kn,
|
|
1199
1211
|
{
|
|
1200
1212
|
isOpen: b,
|
|
1201
|
-
portalContainer:
|
|
1202
|
-
onClose: () =>
|
|
1203
|
-
tenantServiceUrl:
|
|
1213
|
+
portalContainer: u,
|
|
1214
|
+
onClose: () => o(),
|
|
1215
|
+
tenantServiceUrl: d
|
|
1204
1216
|
}
|
|
1205
1217
|
)
|
|
1206
1218
|
] });
|
|
1207
1219
|
}
|
|
1208
1220
|
export {
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1221
|
+
Vt as APPLICATIONS_TIER_WIDTH,
|
|
1222
|
+
D as AppPaths,
|
|
1223
|
+
Kn as Navigation,
|
|
1224
|
+
cr as NavigationButton,
|
|
1225
|
+
qt as TENANTS_TIER_WIDTH
|
|
1214
1226
|
};
|
|
1215
1227
|
//# sourceMappingURL=index.mjs.map
|