@mt-gloss/ui 0.0.17 → 0.0.18
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/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { N as Xt, T as Jt, O as ea, Q as ta, b2 as aa, av as ra, ad as na, Z as oa, aj as sa, K as ia, a4 as la, bl as da, P as ca, B as ua, a as ma, y as
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import
|
|
1
|
+
import { N as Xt, T as Jt, O as ea, Q as ta, b2 as aa, av as ra, ad as na, Z as oa, aj as sa, K as ia, a4 as la, bl as da, P as ca, B as ua, a as ma, y as ga, H as pa, be as ba, F as ha, J as fa, A as va, z as Ca, bd as ya, E as Da, D as wa, bt as Na, b as Sa, C as Ta, L as xa, o as ka, a9 as Ia, aJ as _a, y as Pa, H as Ma, F as Ra, J as Fa, A as Oa, z as Aa, E as Ea, D as La, aX as Ba, a_ as Ga, aZ as $a, aY as Ha, a$ as za, ay as Ka, am as Wa, k as Za, m as Ya, aB as qa, a7 as Va, b4 as Ua, a5 as ja, bm as Qa, Y as Xa, bD as Ja, bC as er, bE as tr, al as ar, aM as rr, b6 as nr, bI as or, n as sr, ai as ir, bx as lr, bp as dr, a0 as cr, an as ur, a2 as mr, bw as gr, G as pr, d as br, bg as hr, a6 as fr, bF as vr, aP as Cr, r as yr, v as Dr, I as wr, g as Nr, as as Sr, bJ as Tr, M as xr, w as kr, U as Ir, X as _r, V as Pr, W as Mr, ao as Rr, bc as Fr, bL as Or, bH as Ar, ak as Er, t as Lr, bn as Br, aO as Gr, af as $r, aG as Hr, ac as zr, ah as Kr, aq as Wr, aN as Zr, a8 as Yr, ap as qr, c as Vr, R as Ur, j as jr, p as Qr, aD as Xr, bu as Jr, bv as en, ae as tn, aa as an, h as rn, x as nn, b3 as on, ab as sn, bK as ln, b8 as dn, bb as cn, b9 as un, ba as mn, i as gn, b5 as pn, bk as bn, S as hn, bh as fn, bi as vn, ar as Cn, b7 as yn, bM as Dn, ag as wn, s as Nn, bG as Sn, l as Tn, f as xn, q as kn, _ as In, $ as _n, a3 as Pn, bf as Mn, bs as Rn, bz as Fn, aw as On, ax as An, aK as En, aL as Ln, az as Bn, aA as Gn, aC as $n, aR as Hn, aS as zn, bB as Kn, bA as Wn, aU as Zn, aV as Yn, at as qn, au as Vn, b1 as Un, b0 as jn, aW as Qn, aH as Xn, aI as Jn, aT as eo, aE as to, aF as ao, u as ro, by as no, bo as oo, bq as so, br as io, aQ as lo, a1 as co, e as uo, bj as mo } from "./Expandable-B7Umnd4T.js";
|
|
2
|
+
import { jsxs as R, jsx as c } from "react/jsx-runtime";
|
|
3
|
+
import _, { useRef as O, useEffect as E, useState as M, useCallback as C, forwardRef as ge, useMemo as pe, createContext as be, useContext as he } from "react";
|
|
4
4
|
import { B as fe, U as j } from "./UIContext-C3E-k7HI.js";
|
|
5
|
-
import { a as
|
|
5
|
+
import { a as po, u as bo } from "./UIContext-C3E-k7HI.js";
|
|
6
6
|
import { createPortal as ve } from "react-dom";
|
|
7
|
-
import { DEFAULT_MARKET_PRESETS as fo, DEFAULT_PINNED as vo, PERIOD_OPTIONS as Co, ROLLING_OPTIONS as yo, TODAY_PRESET as Do, findPreset as wo, formatDateRange as No, formatMarketDates as So, formatTrend as To, formatValue as xo, generateMarketId as ko, getAllPresets as Io, getDateRangeForPreset as _o, getPresetLabel as Po, isInRange as
|
|
7
|
+
import { DEFAULT_MARKET_PRESETS as fo, DEFAULT_PINNED as vo, PERIOD_OPTIONS as Co, ROLLING_OPTIONS as yo, TODAY_PRESET as Do, findPreset as wo, formatDateRange as No, formatMarketDates as So, formatTrend as To, formatValue as xo, generateMarketId as ko, getAllPresets as Io, getDateRangeForPreset as _o, getPresetLabel as Po, isInRange as Mo, isMarketActive as Ro, isSameDay as Fo, normalizePresetId as Oo, toUppercasePresetId as Ao } from "@mt-gloss/utils";
|
|
8
8
|
function st(e = {}) {
|
|
9
|
-
const { enabled: t = !0, returnTo: r } = e, a =
|
|
10
|
-
return
|
|
9
|
+
const { enabled: t = !0, returnTo: r } = e, a = O(null);
|
|
10
|
+
return E(() => {
|
|
11
11
|
t && (a.current = r || document.activeElement);
|
|
12
|
-
}, [t, r]),
|
|
12
|
+
}, [t, r]), E(() => () => {
|
|
13
13
|
t && a.current && setTimeout(() => {
|
|
14
14
|
a.current?.focus?.();
|
|
15
15
|
}, 0);
|
|
@@ -25,91 +25,91 @@ function it(e) {
|
|
|
25
25
|
enabled: s = !0,
|
|
26
26
|
isItemDisabled: d,
|
|
27
27
|
onSelect: u,
|
|
28
|
-
onEscape:
|
|
29
|
-
} = e, [b,
|
|
28
|
+
onEscape: g
|
|
29
|
+
} = e, [b, S] = M(-1), p = r !== void 0 ? r : b, i = C(
|
|
30
30
|
(m) => {
|
|
31
|
-
r === void 0 &&
|
|
31
|
+
r === void 0 && S(m), a?.(m);
|
|
32
32
|
},
|
|
33
33
|
[r, a]
|
|
34
|
-
), h =
|
|
35
|
-
(m,
|
|
36
|
-
const
|
|
37
|
-
if (
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
40
|
-
return
|
|
41
|
-
let k =
|
|
42
|
-
return n ? k = (k +
|
|
34
|
+
), h = C(() => t.map((m, D) => ({ item: m, index: D })).filter(({ item: m, index: D }) => !d?.(m, D)).map(({ index: m }) => m), [t, d]), T = C(
|
|
35
|
+
(m, D) => {
|
|
36
|
+
const v = h();
|
|
37
|
+
if (v.length === 0) return -1;
|
|
38
|
+
const I = v.indexOf(m);
|
|
39
|
+
if (I === -1)
|
|
40
|
+
return D === 1 ? v.find((L) => L > m) ?? (n ? v[0] : -1) : [...v].reverse().find((G) => G < m) ?? (n ? v[v.length - 1] : -1);
|
|
41
|
+
let k = I + D;
|
|
42
|
+
return n ? k = (k + v.length) % v.length : k = Math.max(0, Math.min(v.length - 1, k)), v[k];
|
|
43
43
|
},
|
|
44
44
|
[h, n]
|
|
45
|
-
),
|
|
45
|
+
), x = C(() => {
|
|
46
46
|
const m = h();
|
|
47
|
-
m.length > 0 &&
|
|
48
|
-
}, [h,
|
|
47
|
+
m.length > 0 && i(m[0]);
|
|
48
|
+
}, [h, i]), f = C(() => {
|
|
49
49
|
const m = h();
|
|
50
|
-
m.length > 0 &&
|
|
51
|
-
}, [h,
|
|
52
|
-
const m =
|
|
53
|
-
m !== -1 &&
|
|
54
|
-
}, [
|
|
55
|
-
const m =
|
|
56
|
-
m !== -1 &&
|
|
57
|
-
}, [
|
|
58
|
-
|
|
59
|
-
}, [
|
|
50
|
+
m.length > 0 && i(m[m.length - 1]);
|
|
51
|
+
}, [h, i]), w = C(() => {
|
|
52
|
+
const m = T(p, 1);
|
|
53
|
+
m !== -1 && i(m);
|
|
54
|
+
}, [p, T, i]), N = C(() => {
|
|
55
|
+
const m = T(p, -1);
|
|
56
|
+
m !== -1 && i(m);
|
|
57
|
+
}, [p, T, i]), l = C(() => {
|
|
58
|
+
i(-1);
|
|
59
|
+
}, [i]), y = C(
|
|
60
60
|
(m) => {
|
|
61
61
|
if (!s) return;
|
|
62
|
-
const { key:
|
|
63
|
-
if (
|
|
64
|
-
m.preventDefault(),
|
|
62
|
+
const { key: D } = m, v = D === "ArrowUp" && (o === "vertical" || o === "both"), I = D === "ArrowDown" && (o === "vertical" || o === "both"), k = D === "ArrowLeft" && (o === "horizontal" || o === "both"), L = D === "ArrowRight" && (o === "horizontal" || o === "both");
|
|
63
|
+
if (v || k) {
|
|
64
|
+
m.preventDefault(), p === -1 ? f() : N();
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
|
-
if (
|
|
68
|
-
m.preventDefault(),
|
|
67
|
+
if (I || L) {
|
|
68
|
+
m.preventDefault(), p === -1 ? x() : w();
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
|
-
if (
|
|
72
|
-
m.preventDefault(),
|
|
71
|
+
if (D === "Home") {
|
|
72
|
+
m.preventDefault(), x();
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
|
-
if (
|
|
76
|
-
m.preventDefault(),
|
|
75
|
+
if (D === "End") {
|
|
76
|
+
m.preventDefault(), f();
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
|
-
if ((
|
|
79
|
+
if ((D === "Enter" || D === " ") && p >= 0 && p < t.length) {
|
|
80
80
|
m.preventDefault();
|
|
81
|
-
const G = t[
|
|
82
|
-
d?.(G,
|
|
81
|
+
const G = t[p];
|
|
82
|
+
d?.(G, p) || u?.(G, p);
|
|
83
83
|
return;
|
|
84
84
|
}
|
|
85
|
-
if (
|
|
86
|
-
|
|
85
|
+
if (D === "Escape") {
|
|
86
|
+
g?.();
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
89
|
},
|
|
90
90
|
[
|
|
91
91
|
s,
|
|
92
92
|
o,
|
|
93
|
-
|
|
93
|
+
p,
|
|
94
94
|
t,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
x,
|
|
96
|
+
f,
|
|
97
|
+
w,
|
|
98
98
|
N,
|
|
99
99
|
d,
|
|
100
100
|
u,
|
|
101
|
-
|
|
101
|
+
g
|
|
102
102
|
]
|
|
103
103
|
);
|
|
104
104
|
return {
|
|
105
|
-
focusedIndex:
|
|
106
|
-
setFocusedIndex:
|
|
107
|
-
handleKeyDown:
|
|
108
|
-
focusFirst:
|
|
109
|
-
focusLast:
|
|
110
|
-
focusNext:
|
|
105
|
+
focusedIndex: p,
|
|
106
|
+
setFocusedIndex: i,
|
|
107
|
+
handleKeyDown: y,
|
|
108
|
+
focusFirst: x,
|
|
109
|
+
focusLast: f,
|
|
110
|
+
focusNext: w,
|
|
111
111
|
focusPrevious: N,
|
|
112
|
-
resetFocus:
|
|
112
|
+
resetFocus: l
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
115
|
const K = (e) => {
|
|
@@ -169,11 +169,11 @@ const K = (e) => {
|
|
|
169
169
|
{ variant: "block", width: 200, height: 32, borderRadius: 8 },
|
|
170
170
|
{ variant: "block", width: "80%", height: 12, borderRadius: "4px" },
|
|
171
171
|
{ variant: "block", width: 120, height: 44, borderRadius: 22 }
|
|
172
|
-
],
|
|
172
|
+
], gt = [
|
|
173
173
|
{ variant: "text", lines: 3, lineHeight: 14, gap: 8 },
|
|
174
174
|
{ variant: "text", lines: 2, lineHeight: 16, gap: 10 },
|
|
175
175
|
{ variant: "text", lines: 5, lineHeight: 12, gap: 6 }
|
|
176
|
-
],
|
|
176
|
+
], pt = [
|
|
177
177
|
{ variant: "circle", size: 24 },
|
|
178
178
|
{ variant: "circle", size: 40 },
|
|
179
179
|
{ variant: "circle", size: 64 }
|
|
@@ -231,32 +231,32 @@ function Te({
|
|
|
231
231
|
overflowActions: o,
|
|
232
232
|
onClose: s
|
|
233
233
|
}) {
|
|
234
|
-
const [d, u] =
|
|
234
|
+
const [d, u] = M(null), g = O(null), b = C(() => {
|
|
235
235
|
if (!t) return { ...J, top: 0, left: 0 };
|
|
236
|
-
const
|
|
236
|
+
const i = t.getBoundingClientRect();
|
|
237
237
|
return {
|
|
238
238
|
...J,
|
|
239
|
-
top:
|
|
240
|
-
left:
|
|
239
|
+
top: i.bottom + 4,
|
|
240
|
+
left: i.left
|
|
241
241
|
};
|
|
242
242
|
}, [t]);
|
|
243
|
-
if (
|
|
243
|
+
if (E(() => {
|
|
244
244
|
if (!e) return;
|
|
245
|
-
const
|
|
245
|
+
const i = (h) => {
|
|
246
246
|
h.key === "Escape" && s();
|
|
247
247
|
};
|
|
248
|
-
return document.addEventListener("keydown",
|
|
249
|
-
}, [e, s]),
|
|
248
|
+
return document.addEventListener("keydown", i), () => document.removeEventListener("keydown", i);
|
|
249
|
+
}, [e, s]), E(() => {
|
|
250
250
|
if (!e) return;
|
|
251
|
-
const
|
|
252
|
-
|
|
251
|
+
const i = (h) => {
|
|
252
|
+
g.current && !g.current.contains(h.target) && s();
|
|
253
253
|
};
|
|
254
|
-
return document.addEventListener("pointerdown",
|
|
254
|
+
return document.addEventListener("pointerdown", i, !0), () => document.removeEventListener("pointerdown", i, !0);
|
|
255
255
|
}, [e, s]), !e) return null;
|
|
256
|
-
const
|
|
256
|
+
const S = o && o.length > 0, p = /* @__PURE__ */ R(
|
|
257
257
|
"div",
|
|
258
258
|
{
|
|
259
|
-
ref:
|
|
259
|
+
ref: g,
|
|
260
260
|
"data-status-chip-menu": r,
|
|
261
261
|
role: "menu",
|
|
262
262
|
"aria-label": "Status actions",
|
|
@@ -288,28 +288,28 @@ function Te({
|
|
|
288
288
|
children: "Show on graph"
|
|
289
289
|
}
|
|
290
290
|
),
|
|
291
|
-
|
|
292
|
-
|
|
291
|
+
S && /* @__PURE__ */ c("div", { style: Se }),
|
|
292
|
+
S && o?.map((i) => /* @__PURE__ */ c(
|
|
293
293
|
"button",
|
|
294
294
|
{
|
|
295
295
|
role: "menuitem",
|
|
296
|
-
style: Y(d ===
|
|
297
|
-
onMouseEnter: () => u(
|
|
296
|
+
style: Y(d === i.id),
|
|
297
|
+
onMouseEnter: () => u(i.id),
|
|
298
298
|
onMouseLeave: () => u(null),
|
|
299
299
|
onClick: () => {
|
|
300
|
-
|
|
300
|
+
i.onSelect(r), s();
|
|
301
301
|
},
|
|
302
|
-
children:
|
|
302
|
+
children: i.label
|
|
303
303
|
},
|
|
304
|
-
|
|
304
|
+
i.id
|
|
305
305
|
))
|
|
306
306
|
]
|
|
307
307
|
}
|
|
308
308
|
);
|
|
309
|
-
return ve(
|
|
309
|
+
return ve(p, document.body);
|
|
310
310
|
}
|
|
311
311
|
Te.displayName = "StatusSlotChipMenu";
|
|
312
|
-
const xe =
|
|
312
|
+
const xe = ge(
|
|
313
313
|
function({ state: t, onPointerDown: r, onPointerUp: a, edge: n = "right", ariaLabel: o = "Resize card" }, s) {
|
|
314
314
|
const d = t === "handle-visible" || t === "dragging", u = (b) => {
|
|
315
315
|
try {
|
|
@@ -317,7 +317,7 @@ const xe = pe(
|
|
|
317
317
|
} catch {
|
|
318
318
|
}
|
|
319
319
|
r(b);
|
|
320
|
-
},
|
|
320
|
+
}, g = (b) => {
|
|
321
321
|
try {
|
|
322
322
|
b.currentTarget.hasPointerCapture?.(b.pointerId) && b.currentTarget.releasePointerCapture(b.pointerId);
|
|
323
323
|
} catch {
|
|
@@ -338,7 +338,7 @@ const xe = pe(
|
|
|
338
338
|
d ? "gloss-edge-handle--visible" : ""
|
|
339
339
|
].filter(Boolean).join(" "),
|
|
340
340
|
onPointerDown: u,
|
|
341
|
-
onPointerUp:
|
|
341
|
+
onPointerUp: g,
|
|
342
342
|
tabIndex: d ? 0 : -1
|
|
343
343
|
}
|
|
344
344
|
);
|
|
@@ -375,48 +375,64 @@ function vt({
|
|
|
375
375
|
enterMs: o = 180,
|
|
376
376
|
exitMs: s = 120
|
|
377
377
|
}) {
|
|
378
|
-
const [d, u] =
|
|
379
|
-
|
|
380
|
-
}, []),
|
|
381
|
-
u((
|
|
382
|
-
}, [n]),
|
|
383
|
-
|
|
384
|
-
}, [
|
|
385
|
-
(
|
|
386
|
-
u((
|
|
378
|
+
const [d, u] = M("idle"), [g, b] = M(e), S = O(null), p = O(null), i = 180, h = C(() => {
|
|
379
|
+
S.current && (clearTimeout(S.current), S.current = null);
|
|
380
|
+
}, []), T = C(() => {
|
|
381
|
+
u((l) => l !== "idle" ? l : (S.current = setTimeout(() => u("handle-visible"), n), "dwelling"));
|
|
382
|
+
}, [n]), x = C(() => {
|
|
383
|
+
h(), u((l) => l === "dwelling" || l === "handle-visible" ? "idle" : l);
|
|
384
|
+
}, [h]), f = C(
|
|
385
|
+
(l) => {
|
|
386
|
+
u((y) => y !== "handle-visible" ? y : (p.current = l.clientX, "dragging"));
|
|
387
387
|
},
|
|
388
388
|
[]
|
|
389
|
-
),
|
|
390
|
-
(
|
|
391
|
-
u((
|
|
392
|
-
if (
|
|
393
|
-
const
|
|
394
|
-
if (
|
|
389
|
+
), w = C(
|
|
390
|
+
(l) => {
|
|
391
|
+
u((y) => {
|
|
392
|
+
if (y !== "dragging") return y;
|
|
393
|
+
const m = l.clientX - (p.current ?? l.clientX), D = Math.round(m / i), v = Math.min(3, Math.max(1, e + D));
|
|
394
|
+
if (v === e)
|
|
395
395
|
return a?.(), "cancelled";
|
|
396
|
-
const
|
|
397
|
-
return r({ direction:
|
|
396
|
+
const I = v > e ? "grow" : "shrink";
|
|
397
|
+
return r({ direction: I, targetColSpan: v, mode: t ? "slot-fill" : "sparkline-fidelity" }), "committed";
|
|
398
398
|
});
|
|
399
399
|
},
|
|
400
400
|
[e, t, r, a]
|
|
401
|
-
),
|
|
402
|
-
|
|
403
|
-
}, [
|
|
404
|
-
return
|
|
401
|
+
), N = C(() => {
|
|
402
|
+
h(), u((l) => l === "dragging" || l === "handle-visible" ? (a?.(), "cancelled") : l);
|
|
403
|
+
}, [h, a]);
|
|
404
|
+
return E(() => {
|
|
405
405
|
if (d !== "dragging" && d !== "handle-visible") return;
|
|
406
|
-
const
|
|
407
|
-
|
|
406
|
+
const l = (y) => {
|
|
407
|
+
y.key === "Escape" && N();
|
|
408
|
+
};
|
|
409
|
+
return window.addEventListener("keydown", l), () => window.removeEventListener("keydown", l);
|
|
410
|
+
}, [d, N]), E(() => {
|
|
411
|
+
if (d !== "dragging") {
|
|
412
|
+
b(e);
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
const l = (y) => {
|
|
416
|
+
const m = y.clientX - (p.current ?? y.clientX), D = Math.round(m / i), v = Math.min(3, Math.max(1, e + D));
|
|
417
|
+
b((I) => I === v ? I : v);
|
|
408
418
|
};
|
|
409
|
-
return window.addEventListener("
|
|
410
|
-
}, [d,
|
|
419
|
+
return window.addEventListener("pointermove", l), () => window.removeEventListener("pointermove", l);
|
|
420
|
+
}, [d, e]), E(() => () => h(), [h]), E(() => {
|
|
411
421
|
if (d !== "committed" && d !== "cancelled") return;
|
|
412
|
-
const
|
|
413
|
-
return () => clearTimeout(
|
|
422
|
+
const l = setTimeout(() => u("idle"), s);
|
|
423
|
+
return () => clearTimeout(l);
|
|
414
424
|
}, [d, s]), {
|
|
415
425
|
state: d,
|
|
416
|
-
enterEdgeZone:
|
|
417
|
-
leaveEdgeZone:
|
|
418
|
-
handleProps: { onPointerDown:
|
|
419
|
-
|
|
426
|
+
enterEdgeZone: T,
|
|
427
|
+
leaveEdgeZone: x,
|
|
428
|
+
handleProps: { onPointerDown: f, onPointerUp: w },
|
|
429
|
+
previewColSpan: g,
|
|
430
|
+
ghostProps: {
|
|
431
|
+
visible: d === "dragging",
|
|
432
|
+
targetColSpan: g,
|
|
433
|
+
enterMs: o,
|
|
434
|
+
exitMs: s
|
|
435
|
+
}
|
|
420
436
|
};
|
|
421
437
|
}
|
|
422
438
|
const Ct = {
|
|
@@ -549,7 +565,7 @@ const Ct = {
|
|
|
549
565
|
valueFormat: { prefix: "$", abbreviated: !0 },
|
|
550
566
|
isEmpty: !0,
|
|
551
567
|
subtitle: "No data"
|
|
552
|
-
},
|
|
568
|
+
}, Me = {
|
|
553
569
|
variant: "standard",
|
|
554
570
|
label: "Total Revenue",
|
|
555
571
|
value: 125430,
|
|
@@ -557,7 +573,7 @@ const Ct = {
|
|
|
557
573
|
trend: { value: 12.5, direction: "up" },
|
|
558
574
|
subtitle: "MTD",
|
|
559
575
|
isStale: !0
|
|
560
|
-
},
|
|
576
|
+
}, Re = {
|
|
561
577
|
variant: "sparkline",
|
|
562
578
|
label: "Daily Orders",
|
|
563
579
|
value: 847,
|
|
@@ -581,8 +597,8 @@ const Ct = {
|
|
|
581
597
|
Ie,
|
|
582
598
|
_e,
|
|
583
599
|
Pe,
|
|
584
|
-
Re,
|
|
585
600
|
Me,
|
|
601
|
+
Re,
|
|
586
602
|
Fe
|
|
587
603
|
], wt = {
|
|
588
604
|
variant: "sparkline",
|
|
@@ -678,22 +694,22 @@ function ne({
|
|
|
678
694
|
onCreatePage: s,
|
|
679
695
|
onManagePages: d
|
|
680
696
|
}) {
|
|
681
|
-
const u =
|
|
682
|
-
(
|
|
683
|
-
o(
|
|
697
|
+
const u = C(
|
|
698
|
+
(p) => {
|
|
699
|
+
o(p), t();
|
|
684
700
|
},
|
|
685
701
|
[o, t]
|
|
686
|
-
),
|
|
687
|
-
(
|
|
688
|
-
(
|
|
702
|
+
), g = C(
|
|
703
|
+
(p, i) => {
|
|
704
|
+
(i.key === "Enter" || i.key === " ") && (i.preventDefault(), u(p));
|
|
689
705
|
},
|
|
690
706
|
[u]
|
|
691
|
-
), b =
|
|
707
|
+
), b = C(() => {
|
|
692
708
|
s(), t();
|
|
693
|
-
}, [s, t]),
|
|
709
|
+
}, [s, t]), S = C(() => {
|
|
694
710
|
d(), t();
|
|
695
711
|
}, [d, t]);
|
|
696
|
-
return /* @__PURE__ */
|
|
712
|
+
return /* @__PURE__ */ R(
|
|
697
713
|
fe,
|
|
698
714
|
{
|
|
699
715
|
definition: {
|
|
@@ -707,36 +723,36 @@ function ne({
|
|
|
707
723
|
anchorRef: r,
|
|
708
724
|
className: "gloss-page-dropdown",
|
|
709
725
|
children: [
|
|
710
|
-
/* @__PURE__ */ c("ul", { role: "menu", className: "gloss-page-dropdown__list", children: a.map((
|
|
711
|
-
const
|
|
712
|
-
return /* @__PURE__ */
|
|
726
|
+
/* @__PURE__ */ c("ul", { role: "menu", className: "gloss-page-dropdown__list", children: a.map((p) => {
|
|
727
|
+
const i = p.id === n;
|
|
728
|
+
return /* @__PURE__ */ R(
|
|
713
729
|
"li",
|
|
714
730
|
{
|
|
715
731
|
role: "menuitemradio",
|
|
716
|
-
"aria-checked":
|
|
717
|
-
"aria-current":
|
|
732
|
+
"aria-checked": i,
|
|
733
|
+
"aria-current": i ? "page" : void 0,
|
|
718
734
|
tabIndex: 0,
|
|
719
|
-
className: `gloss-page-dropdown__item${
|
|
720
|
-
onClick: () => u(
|
|
721
|
-
onKeyDown: (h) => p
|
|
735
|
+
className: `gloss-page-dropdown__item${i ? " gloss-page-dropdown__item--active" : ""}`,
|
|
736
|
+
onClick: () => u(p.id),
|
|
737
|
+
onKeyDown: (h) => g(p.id, h),
|
|
722
738
|
children: [
|
|
723
739
|
/* @__PURE__ */ c(
|
|
724
740
|
"span",
|
|
725
741
|
{
|
|
726
|
-
className: `gloss-page-dropdown__dot${
|
|
742
|
+
className: `gloss-page-dropdown__dot${i ? " gloss-page-dropdown__dot--active" : ""}`
|
|
727
743
|
}
|
|
728
744
|
),
|
|
729
745
|
/* @__PURE__ */ c(
|
|
730
746
|
"span",
|
|
731
747
|
{
|
|
732
|
-
className: `gloss-page-dropdown__name${
|
|
733
|
-
children:
|
|
748
|
+
className: `gloss-page-dropdown__name${p.named ? "" : " gloss-page-dropdown__name--unnamed"}`,
|
|
749
|
+
children: p.name
|
|
734
750
|
}
|
|
735
751
|
),
|
|
736
|
-
/* @__PURE__ */ c("span", { className: "gloss-page-dropdown__count", children:
|
|
752
|
+
/* @__PURE__ */ c("span", { className: "gloss-page-dropdown__count", children: p.cardCount })
|
|
737
753
|
]
|
|
738
754
|
},
|
|
739
|
-
|
|
755
|
+
p.id
|
|
740
756
|
);
|
|
741
757
|
}) }),
|
|
742
758
|
/* @__PURE__ */ c("hr", { className: "gloss-page-dropdown__separator" }),
|
|
@@ -755,7 +771,7 @@ function ne({
|
|
|
755
771
|
{
|
|
756
772
|
role: "menuitem",
|
|
757
773
|
className: "gloss-page-dropdown__action gloss-page-dropdown__action--muted",
|
|
758
|
-
onClick:
|
|
774
|
+
onClick: S,
|
|
759
775
|
children: "Manage pages"
|
|
760
776
|
}
|
|
761
777
|
)
|
|
@@ -773,12 +789,12 @@ const Oe = function({
|
|
|
773
789
|
onManagePages: s,
|
|
774
790
|
maskRadius: d = "var(--gloss-radius-md)"
|
|
775
791
|
}) {
|
|
776
|
-
const u =
|
|
792
|
+
const u = O(null), [g, b] = M(!1), S = C(() => {
|
|
777
793
|
b((h) => !h);
|
|
778
|
-
}, []),
|
|
794
|
+
}, []), p = C(() => {
|
|
779
795
|
b(!1);
|
|
780
|
-
}, []),
|
|
781
|
-
return /* @__PURE__ */
|
|
796
|
+
}, []), i = a[t]?.id ?? "";
|
|
797
|
+
return /* @__PURE__ */ R(
|
|
782
798
|
"div",
|
|
783
799
|
{
|
|
784
800
|
className: "gloss-page-chip",
|
|
@@ -793,14 +809,14 @@ const Oe = function({
|
|
|
793
809
|
style: { "--_nuzzle-r": d }
|
|
794
810
|
}
|
|
795
811
|
),
|
|
796
|
-
/* @__PURE__ */
|
|
812
|
+
/* @__PURE__ */ R(
|
|
797
813
|
"button",
|
|
798
814
|
{
|
|
799
815
|
className: "gloss-page-chip__trigger",
|
|
800
816
|
"aria-haspopup": "menu",
|
|
801
|
-
"aria-expanded":
|
|
817
|
+
"aria-expanded": g,
|
|
802
818
|
"aria-label": `Page ${t + 1} of ${r}. Click to switch pages.`,
|
|
803
|
-
onClick:
|
|
819
|
+
onClick: S,
|
|
804
820
|
children: [
|
|
805
821
|
t + 1,
|
|
806
822
|
" / ",
|
|
@@ -811,11 +827,11 @@ const Oe = function({
|
|
|
811
827
|
/* @__PURE__ */ c(
|
|
812
828
|
ne,
|
|
813
829
|
{
|
|
814
|
-
open:
|
|
815
|
-
onDismiss:
|
|
830
|
+
open: g,
|
|
831
|
+
onDismiss: p,
|
|
816
832
|
anchorRef: u,
|
|
817
833
|
pages: a,
|
|
818
|
-
activePageId:
|
|
834
|
+
activePageId: i,
|
|
819
835
|
onPageChange: n,
|
|
820
836
|
onCreatePage: o,
|
|
821
837
|
onManagePages: s
|
|
@@ -1102,7 +1118,7 @@ function oe(e) {
|
|
|
1102
1118
|
function se(e) {
|
|
1103
1119
|
return new Date(e).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" });
|
|
1104
1120
|
}
|
|
1105
|
-
const H =
|
|
1121
|
+
const H = _.createElement("span", { style: { color: "var(--color-text-muted)" } }, "—"), _t = [
|
|
1106
1122
|
{
|
|
1107
1123
|
field: "id",
|
|
1108
1124
|
headerName: "Order",
|
|
@@ -1250,7 +1266,7 @@ const H = I.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1250
1266
|
userType: "sales-agency",
|
|
1251
1267
|
entityFilterOptions: Ae,
|
|
1252
1268
|
itemFilterOptions: Ee
|
|
1253
|
-
},
|
|
1269
|
+
}, Mt = {
|
|
1254
1270
|
...ie,
|
|
1255
1271
|
vizState: {
|
|
1256
1272
|
type: "items",
|
|
@@ -1259,7 +1275,7 @@ const H = I.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1259
1275
|
byItem: { id: "i-003", name: "Walnut Console Table" },
|
|
1260
1276
|
timeFrame: "YTD"
|
|
1261
1277
|
}
|
|
1262
|
-
},
|
|
1278
|
+
}, Rt = {
|
|
1263
1279
|
...ie,
|
|
1264
1280
|
vizState: {
|
|
1265
1281
|
type: "orders",
|
|
@@ -1470,11 +1486,11 @@ const H = I.createElement("span", { style: { color: "var(--color-text-muted)" }
|
|
|
1470
1486
|
{ id: "ytd", label: "YTD" },
|
|
1471
1487
|
{ id: "lytd", label: "LYTD" }
|
|
1472
1488
|
];
|
|
1473
|
-
function
|
|
1489
|
+
function F(e, t) {
|
|
1474
1490
|
return {
|
|
1475
1491
|
id: e,
|
|
1476
1492
|
colSpan: 1,
|
|
1477
|
-
content:
|
|
1493
|
+
content: _.createElement("div", {
|
|
1478
1494
|
style: {
|
|
1479
1495
|
width: "100%",
|
|
1480
1496
|
height: "100%",
|
|
@@ -1492,21 +1508,21 @@ function M(e, t) {
|
|
|
1492
1508
|
}
|
|
1493
1509
|
function te(e, t) {
|
|
1494
1510
|
return {
|
|
1495
|
-
...
|
|
1511
|
+
...F(e, t),
|
|
1496
1512
|
colSpan: 2
|
|
1497
1513
|
};
|
|
1498
1514
|
}
|
|
1499
1515
|
const zt = [
|
|
1500
|
-
|
|
1501
|
-
|
|
1516
|
+
F("total-revenue", "Total Revenue"),
|
|
1517
|
+
F("total-orders", "Total Orders"),
|
|
1502
1518
|
te("revenue-trend", "Revenue Trend (2x)"),
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1519
|
+
F("avg-order", "Avg Order Value"),
|
|
1520
|
+
F("new-customers", "New Customers"),
|
|
1521
|
+
F("top-salesperson", "Top Salesperson"),
|
|
1506
1522
|
te("order-trend", "Order Trend (2x)"),
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1523
|
+
F("repeat-rate", "Repeat Rate"),
|
|
1524
|
+
F("open-orders", "Open Orders"),
|
|
1525
|
+
F("shipped-orders", "Shipped Orders")
|
|
1510
1526
|
], Kt = {
|
|
1511
1527
|
columns: 6,
|
|
1512
1528
|
rowHeight: 120,
|
|
@@ -1530,7 +1546,7 @@ const zt = [
|
|
|
1530
1546
|
totalPages: 3
|
|
1531
1547
|
};
|
|
1532
1548
|
function Z(e) {
|
|
1533
|
-
return
|
|
1549
|
+
return _.createElement("span", { style: { fontSize: 14 } }, e);
|
|
1534
1550
|
}
|
|
1535
1551
|
const Yt = [
|
|
1536
1552
|
{
|
|
@@ -1645,7 +1661,7 @@ const ze = function(t) {
|
|
|
1645
1661
|
}
|
|
1646
1662
|
);
|
|
1647
1663
|
const { cards: r, composite: a } = t;
|
|
1648
|
-
return /* @__PURE__ */
|
|
1664
|
+
return /* @__PURE__ */ R(
|
|
1649
1665
|
"div",
|
|
1650
1666
|
{
|
|
1651
1667
|
className: "gloss-metric-group gloss-metric-group--composite",
|
|
@@ -1671,7 +1687,7 @@ const ze = function(t) {
|
|
|
1671
1687
|
style: { background: a.accentColor }
|
|
1672
1688
|
}
|
|
1673
1689
|
),
|
|
1674
|
-
a?.label && /* @__PURE__ */
|
|
1690
|
+
a?.label && /* @__PURE__ */ R("div", { className: "gloss-metric-group__label", children: [
|
|
1675
1691
|
/* @__PURE__ */ c("span", { children: a.label }),
|
|
1676
1692
|
a?.trend && /* @__PURE__ */ c(
|
|
1677
1693
|
"span",
|
|
@@ -1713,7 +1729,7 @@ const ze = function(t) {
|
|
|
1713
1729
|
);
|
|
1714
1730
|
};
|
|
1715
1731
|
ze.displayName = "MetricGroupContainer";
|
|
1716
|
-
const
|
|
1732
|
+
const B = {
|
|
1717
1733
|
"gloss-inline-nudge": "_gloss-inline-nudge_kdk88_34",
|
|
1718
1734
|
"gloss-inline-nudge__message": "_gloss-inline-nudge__message_kdk88_65",
|
|
1719
1735
|
"gloss-inline-nudge__actions": "_gloss-inline-nudge__actions_kdk88_72",
|
|
@@ -1728,18 +1744,18 @@ function Ke({
|
|
|
1728
1744
|
anchorEl: a,
|
|
1729
1745
|
anchorSelector: n
|
|
1730
1746
|
}) {
|
|
1731
|
-
const [o, s] =
|
|
1747
|
+
const [o, s] = _.useState(null), d = _.useMemo(
|
|
1732
1748
|
() => typeof window < "u" && window.matchMedia ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : !1,
|
|
1733
1749
|
[]
|
|
1734
1750
|
);
|
|
1735
|
-
|
|
1751
|
+
_.useEffect(() => {
|
|
1736
1752
|
!a && !n && (typeof process > "u" || process.env.NODE_ENV !== "production") && console.error(
|
|
1737
1753
|
"[InlineNudge] requires anchorEl or anchorSelector. AP-07: Do not mount InlineNudge in Layout/** or _app.tsx."
|
|
1738
1754
|
);
|
|
1739
|
-
}, [a, n]),
|
|
1740
|
-
let
|
|
1741
|
-
if (a ?
|
|
1742
|
-
const b =
|
|
1755
|
+
}, [a, n]), _.useLayoutEffect(() => {
|
|
1756
|
+
let g = null;
|
|
1757
|
+
if (a ? g = a : n && (g = document.querySelector(n)), g) {
|
|
1758
|
+
const b = g.getBoundingClientRect();
|
|
1743
1759
|
s({
|
|
1744
1760
|
top: b.bottom + window.scrollY + 6,
|
|
1745
1761
|
left: b.left + window.scrollX
|
|
@@ -1747,22 +1763,22 @@ function Ke({
|
|
|
1747
1763
|
}
|
|
1748
1764
|
}, [a, n]);
|
|
1749
1765
|
const u = o ? { top: o.top, left: o.left } : {};
|
|
1750
|
-
return /* @__PURE__ */
|
|
1766
|
+
return /* @__PURE__ */ R(
|
|
1751
1767
|
"div",
|
|
1752
1768
|
{
|
|
1753
|
-
className:
|
|
1769
|
+
className: B["gloss-inline-nudge"],
|
|
1754
1770
|
style: u,
|
|
1755
1771
|
role: "status",
|
|
1756
1772
|
"aria-live": "polite",
|
|
1757
1773
|
"data-reduced-motion": d ? "true" : void 0,
|
|
1758
1774
|
children: [
|
|
1759
|
-
/* @__PURE__ */ c("span", { className:
|
|
1760
|
-
/* @__PURE__ */
|
|
1775
|
+
/* @__PURE__ */ c("span", { className: B["gloss-inline-nudge__message"], children: e }),
|
|
1776
|
+
/* @__PURE__ */ R("div", { className: B["gloss-inline-nudge__actions"], children: [
|
|
1761
1777
|
/* @__PURE__ */ c(
|
|
1762
1778
|
"button",
|
|
1763
1779
|
{
|
|
1764
1780
|
type: "button",
|
|
1765
|
-
className: `${
|
|
1781
|
+
className: `${B["gloss-inline-nudge__btn"]} ${B["gloss-inline-nudge__btn--action"]}`,
|
|
1766
1782
|
onClick: t.onClick,
|
|
1767
1783
|
children: t.label
|
|
1768
1784
|
}
|
|
@@ -1771,7 +1787,7 @@ function Ke({
|
|
|
1771
1787
|
"button",
|
|
1772
1788
|
{
|
|
1773
1789
|
type: "button",
|
|
1774
|
-
className: `${
|
|
1790
|
+
className: `${B["gloss-inline-nudge__btn"]} ${B["gloss-inline-nudge__btn--dismiss"]}`,
|
|
1775
1791
|
onClick: r,
|
|
1776
1792
|
"aria-label": "Dismiss",
|
|
1777
1793
|
children: "Dismiss"
|
|
@@ -1800,70 +1816,70 @@ function Ze({
|
|
|
1800
1816
|
max: a = 100,
|
|
1801
1817
|
disabled: n = !1
|
|
1802
1818
|
}) {
|
|
1803
|
-
const o =
|
|
1804
|
-
b.current !== e && (b.current = e,
|
|
1805
|
-
const
|
|
1806
|
-
(
|
|
1819
|
+
const o = O(null), [s, d] = M(null), [u, g] = M(e), b = O(e);
|
|
1820
|
+
b.current !== e && (b.current = e, g(e));
|
|
1821
|
+
const S = pe(() => We(u, r, a), [u, r, a]), p = C(
|
|
1822
|
+
(f) => {
|
|
1807
1823
|
if (!o.current) return r;
|
|
1808
|
-
const
|
|
1809
|
-
return Math.round(
|
|
1824
|
+
const w = o.current.getBoundingClientRect(), N = Math.max(0, Math.min(1, (f - w.left) / w.width)), l = r + N * (a - r);
|
|
1825
|
+
return Math.round(l * 100) / 100;
|
|
1810
1826
|
},
|
|
1811
1827
|
[r, a]
|
|
1812
|
-
),
|
|
1813
|
-
(
|
|
1814
|
-
const N = u.find((
|
|
1815
|
-
n || N?.disabled || (typeof
|
|
1828
|
+
), i = C(
|
|
1829
|
+
(f, w) => {
|
|
1830
|
+
const N = u.find((l) => l.id === w);
|
|
1831
|
+
n || N?.disabled || (typeof f.currentTarget.setPointerCapture == "function" && f.currentTarget.setPointerCapture(f.pointerId), d(w));
|
|
1816
1832
|
},
|
|
1817
1833
|
[n, u]
|
|
1818
|
-
), h =
|
|
1819
|
-
(
|
|
1834
|
+
), h = C(
|
|
1835
|
+
(f) => {
|
|
1820
1836
|
if (!s) return;
|
|
1821
|
-
const
|
|
1822
|
-
|
|
1823
|
-
(N) => N.map((
|
|
1837
|
+
const w = p(f.clientX);
|
|
1838
|
+
g(
|
|
1839
|
+
(N) => N.map((l) => l.id === s ? { ...l, value: w } : l)
|
|
1824
1840
|
);
|
|
1825
1841
|
},
|
|
1826
|
-
[s,
|
|
1827
|
-
),
|
|
1828
|
-
(
|
|
1842
|
+
[s, p]
|
|
1843
|
+
), T = C(
|
|
1844
|
+
(f) => {
|
|
1829
1845
|
if (!s) return;
|
|
1830
|
-
const
|
|
1831
|
-
(
|
|
1846
|
+
const w = p(f.clientX), N = u.map(
|
|
1847
|
+
(l) => l.id === s ? { ...l, value: w } : l
|
|
1832
1848
|
);
|
|
1833
|
-
|
|
1849
|
+
g(N), d(null), t(N);
|
|
1834
1850
|
},
|
|
1835
|
-
[s,
|
|
1836
|
-
),
|
|
1851
|
+
[s, p, u, t]
|
|
1852
|
+
), x = a - r || 1;
|
|
1837
1853
|
return /* @__PURE__ */ c("div", { className: "gloss-threshold-ramp", "data-disabled": n || void 0, children: /* @__PURE__ */ c(
|
|
1838
1854
|
"div",
|
|
1839
1855
|
{
|
|
1840
1856
|
ref: o,
|
|
1841
1857
|
className: "gloss-threshold-ramp__track",
|
|
1842
|
-
style: { background:
|
|
1858
|
+
style: { background: S },
|
|
1843
1859
|
onPointerMove: h,
|
|
1844
|
-
onPointerUp:
|
|
1845
|
-
onPointerLeave:
|
|
1846
|
-
children: u.map((
|
|
1847
|
-
const
|
|
1860
|
+
onPointerUp: T,
|
|
1861
|
+
onPointerLeave: T,
|
|
1862
|
+
children: u.map((f) => {
|
|
1863
|
+
const w = (f.value - r) / x * 100;
|
|
1848
1864
|
return /* @__PURE__ */ c(
|
|
1849
1865
|
"span",
|
|
1850
1866
|
{
|
|
1851
1867
|
className: "gloss-threshold-ramp__stop",
|
|
1852
1868
|
style: {
|
|
1853
|
-
left: `${
|
|
1854
|
-
color: le(
|
|
1869
|
+
left: `${w}%`,
|
|
1870
|
+
color: le(f)
|
|
1855
1871
|
},
|
|
1856
|
-
"data-disabled":
|
|
1857
|
-
"data-dragging": s ===
|
|
1858
|
-
onPointerDown: (N) =>
|
|
1859
|
-
"aria-label":
|
|
1872
|
+
"data-disabled": f.disabled || void 0,
|
|
1873
|
+
"data-dragging": s === f.id || void 0,
|
|
1874
|
+
onPointerDown: (N) => i(N, f.id),
|
|
1875
|
+
"aria-label": f.label ?? `Stop at ${f.value}`,
|
|
1860
1876
|
role: "slider",
|
|
1861
|
-
"aria-valuenow":
|
|
1877
|
+
"aria-valuenow": f.value,
|
|
1862
1878
|
"aria-valuemin": r,
|
|
1863
1879
|
"aria-valuemax": a,
|
|
1864
|
-
tabIndex:
|
|
1880
|
+
tabIndex: f.disabled ? -1 : 0
|
|
1865
1881
|
},
|
|
1866
|
-
|
|
1882
|
+
f.id
|
|
1867
1883
|
);
|
|
1868
1884
|
})
|
|
1869
1885
|
}
|
|
@@ -1875,7 +1891,7 @@ function Ye() {
|
|
|
1875
1891
|
return he(de);
|
|
1876
1892
|
}
|
|
1877
1893
|
function qe({ option: e }) {
|
|
1878
|
-
const t = Ye(), r = t?.isSelected(e.value) ?? !1, a = e.disabled || t?.groupDisabled, n =
|
|
1894
|
+
const t = Ye(), r = t?.isSelected(e.value) ?? !1, a = e.disabled || t?.groupDisabled, n = C(() => {
|
|
1879
1895
|
a || t?.select(e.value);
|
|
1880
1896
|
}, [a, t, e.value]), o = e.colorToken ? `var(--gloss-color-${e.colorToken}, ${e.color ?? "#888"})` : e.color ?? "#888";
|
|
1881
1897
|
return /* @__PURE__ */ c(
|
|
@@ -1903,22 +1919,22 @@ function Ve({
|
|
|
1903
1919
|
disabled: n = !1,
|
|
1904
1920
|
name: o
|
|
1905
1921
|
}) {
|
|
1906
|
-
const s = t !== void 0, [d, u] =
|
|
1907
|
-
(
|
|
1908
|
-
s || u(
|
|
1922
|
+
const s = t !== void 0, [d, u] = M(r), g = s ? t : d, b = C(
|
|
1923
|
+
(i) => {
|
|
1924
|
+
s || u(i), a?.(i);
|
|
1909
1925
|
},
|
|
1910
1926
|
[s, a]
|
|
1911
|
-
),
|
|
1912
|
-
(
|
|
1913
|
-
[
|
|
1914
|
-
),
|
|
1915
|
-
selectedValue:
|
|
1927
|
+
), S = C(
|
|
1928
|
+
(i) => g === i,
|
|
1929
|
+
[g]
|
|
1930
|
+
), p = {
|
|
1931
|
+
selectedValue: g,
|
|
1916
1932
|
select: b,
|
|
1917
|
-
isSelected:
|
|
1933
|
+
isSelected: S,
|
|
1918
1934
|
groupDisabled: n,
|
|
1919
1935
|
name: o
|
|
1920
1936
|
};
|
|
1921
|
-
return /* @__PURE__ */ c(de.Provider, { value:
|
|
1937
|
+
return /* @__PURE__ */ c(de.Provider, { value: p, children: /* @__PURE__ */ c(
|
|
1922
1938
|
"div",
|
|
1923
1939
|
{
|
|
1924
1940
|
className: "gloss-preset-swatch-row",
|
|
@@ -1926,7 +1942,7 @@ function Ve({
|
|
|
1926
1942
|
"aria-label": o,
|
|
1927
1943
|
"aria-disabled": n,
|
|
1928
1944
|
"data-disabled": n || void 0,
|
|
1929
|
-
children: e.map((
|
|
1945
|
+
children: e.map((i) => /* @__PURE__ */ c(qe, { option: i }, i.value))
|
|
1930
1946
|
}
|
|
1931
1947
|
) });
|
|
1932
1948
|
}
|
|
@@ -1946,83 +1962,83 @@ function Ue(e, t, r) {
|
|
|
1946
1962
|
return a.splice(r, 0, n), a;
|
|
1947
1963
|
}
|
|
1948
1964
|
function je(e) {
|
|
1949
|
-
const [t, r] =
|
|
1965
|
+
const [t, r] = M(() => e.zones), [a, n] = M(null), [o, s] = M(null), d = O(null), u = O(e.onZoneChange);
|
|
1950
1966
|
u.current = e.onZoneChange;
|
|
1951
|
-
const
|
|
1967
|
+
const g = C(
|
|
1952
1968
|
(h) => {
|
|
1953
|
-
const
|
|
1954
|
-
let
|
|
1955
|
-
for (const
|
|
1956
|
-
const N =
|
|
1969
|
+
const T = h.active.id;
|
|
1970
|
+
let x = null, f = null;
|
|
1971
|
+
for (const w of t) {
|
|
1972
|
+
const N = w.items.find((l) => l.id === T);
|
|
1957
1973
|
if (N) {
|
|
1958
|
-
|
|
1974
|
+
x = N, f = w.zoneKey;
|
|
1959
1975
|
break;
|
|
1960
1976
|
}
|
|
1961
1977
|
}
|
|
1962
|
-
d.current =
|
|
1978
|
+
d.current = f, n(x), s(f);
|
|
1963
1979
|
},
|
|
1964
1980
|
[t]
|
|
1965
|
-
), b =
|
|
1981
|
+
), b = C(
|
|
1966
1982
|
(h) => {
|
|
1967
1983
|
if (!h.over) {
|
|
1968
1984
|
s(d.current);
|
|
1969
1985
|
return;
|
|
1970
1986
|
}
|
|
1971
|
-
const
|
|
1972
|
-
s(
|
|
1987
|
+
const T = ae(t, h.over.id);
|
|
1988
|
+
s(T);
|
|
1973
1989
|
},
|
|
1974
1990
|
[t]
|
|
1975
|
-
),
|
|
1991
|
+
), S = C(
|
|
1976
1992
|
(h) => {
|
|
1977
|
-
const { active:
|
|
1993
|
+
const { active: T, over: x } = h, f = () => {
|
|
1978
1994
|
d.current = null, n(null), s(null);
|
|
1979
1995
|
};
|
|
1980
|
-
if (!
|
|
1981
|
-
|
|
1996
|
+
if (!x) {
|
|
1997
|
+
f();
|
|
1982
1998
|
return;
|
|
1983
1999
|
}
|
|
1984
|
-
const
|
|
1985
|
-
if (!
|
|
1986
|
-
|
|
2000
|
+
const w = U(t, T.id), N = ae(t, x.id);
|
|
2001
|
+
if (!w || !N) {
|
|
2002
|
+
f();
|
|
1987
2003
|
return;
|
|
1988
2004
|
}
|
|
1989
|
-
let
|
|
1990
|
-
if (
|
|
1991
|
-
const
|
|
1992
|
-
y
|
|
2005
|
+
let l = t.map((y) => ({ ...y, items: [...y.items] }));
|
|
2006
|
+
if (w === N) {
|
|
2007
|
+
const y = l.findIndex((k) => k.zoneKey === w), m = l[y], D = m.items.findIndex((k) => k.id === T.id), v = m.items.findIndex((k) => k.id === x.id), I = v >= 0 ? v : m.items.length - 1;
|
|
2008
|
+
l[y] = {
|
|
1993
2009
|
...m,
|
|
1994
|
-
items: Ue(m.items,
|
|
2010
|
+
items: Ue(m.items, D, I)
|
|
1995
2011
|
};
|
|
1996
2012
|
} else {
|
|
1997
|
-
const
|
|
1998
|
-
let Q = k, A = [...
|
|
1999
|
-
if (
|
|
2000
|
-
const
|
|
2001
|
-
A = A.slice(0,
|
|
2013
|
+
const y = l.findIndex((P) => P.zoneKey === w), m = l.findIndex((P) => P.zoneKey === N), D = l[y], v = l[m], I = D.items.find((P) => P.id === T.id), k = D.items.filter((P) => P.id !== T.id), L = v.items.findIndex((P) => P.id === x.id), G = L >= 0 ? L : v.items.length;
|
|
2014
|
+
let Q = k, A = [...v.items];
|
|
2015
|
+
if (v.maxItems !== void 0 && A.length >= v.maxItems) {
|
|
2016
|
+
const P = A[A.length - 1];
|
|
2017
|
+
A = A.slice(0, v.maxItems - 1), Q = [...k, P];
|
|
2002
2018
|
}
|
|
2003
2019
|
const X = Math.min(G, A.length), me = [
|
|
2004
2020
|
...A.slice(0, X),
|
|
2005
|
-
|
|
2021
|
+
I,
|
|
2006
2022
|
...A.slice(X)
|
|
2007
2023
|
];
|
|
2008
|
-
y
|
|
2024
|
+
l[y] = { ...D, items: Q }, l[m] = { ...v, items: me };
|
|
2009
2025
|
}
|
|
2010
|
-
r(
|
|
2026
|
+
r(l), u.current?.(l), f();
|
|
2011
2027
|
},
|
|
2012
2028
|
[t]
|
|
2013
|
-
),
|
|
2029
|
+
), p = C(
|
|
2014
2030
|
(h) => ({
|
|
2015
2031
|
id: h,
|
|
2016
2032
|
"data-zone-key": h
|
|
2017
2033
|
}),
|
|
2018
2034
|
[]
|
|
2019
|
-
),
|
|
2035
|
+
), i = C(
|
|
2020
2036
|
(h) => {
|
|
2021
|
-
const
|
|
2037
|
+
const T = U(t, h.id) ?? "";
|
|
2022
2038
|
return {
|
|
2023
2039
|
id: h.id,
|
|
2024
2040
|
"data-item-id": h.id,
|
|
2025
|
-
"data-zone-key":
|
|
2041
|
+
"data-zone-key": T
|
|
2026
2042
|
};
|
|
2027
2043
|
},
|
|
2028
2044
|
[t]
|
|
@@ -2031,11 +2047,11 @@ function je(e) {
|
|
|
2031
2047
|
zones: t,
|
|
2032
2048
|
activeZone: o,
|
|
2033
2049
|
activeItem: a,
|
|
2034
|
-
getZoneProps:
|
|
2035
|
-
getItemProps:
|
|
2036
|
-
handleDragStart:
|
|
2050
|
+
getZoneProps: p,
|
|
2051
|
+
getItemProps: i,
|
|
2052
|
+
handleDragStart: g,
|
|
2037
2053
|
handleDragOver: b,
|
|
2038
|
-
handleDragEnd:
|
|
2054
|
+
handleDragEnd: S
|
|
2039
2055
|
};
|
|
2040
2056
|
}
|
|
2041
2057
|
let $ = null, z = null, re = !1;
|
|
@@ -2058,14 +2074,14 @@ function Qe() {
|
|
|
2058
2074
|
})(), z);
|
|
2059
2075
|
}
|
|
2060
2076
|
function Xe(e) {
|
|
2061
|
-
const { zones: t, onZoneChange: r, renderZone: a, renderItem: n, renderDragOverlay: o } = e, s = je({ zones: t, onZoneChange: r }), [d, u] =
|
|
2062
|
-
return
|
|
2077
|
+
const { zones: t, onZoneChange: r, renderZone: a, renderItem: n, renderDragOverlay: o } = e, s = je({ zones: t, onZoneChange: r }), [d, u] = _.useState($);
|
|
2078
|
+
return _.useEffect(() => {
|
|
2063
2079
|
if (d) return;
|
|
2064
|
-
let
|
|
2080
|
+
let g = !0;
|
|
2065
2081
|
return Qe().then((b) => {
|
|
2066
|
-
|
|
2082
|
+
g && u(b);
|
|
2067
2083
|
}), () => {
|
|
2068
|
-
|
|
2084
|
+
g = !1;
|
|
2069
2085
|
};
|
|
2070
2086
|
}, [d]), d ? /* @__PURE__ */ c(
|
|
2071
2087
|
ce,
|
|
@@ -2076,9 +2092,9 @@ function Xe(e) {
|
|
|
2076
2092
|
renderItem: n,
|
|
2077
2093
|
renderDragOverlay: o
|
|
2078
2094
|
}
|
|
2079
|
-
) : /* @__PURE__ */ c("div", { "data-sortable-zones-passive": "true", children: s.zones.map((
|
|
2080
|
-
const b =
|
|
2081
|
-
return /* @__PURE__ */ c("div", { ...s.getZoneProps(
|
|
2095
|
+
) : /* @__PURE__ */ c("div", { "data-sortable-zones-passive": "true", children: s.zones.map((g) => {
|
|
2096
|
+
const b = g.items.map((S) => /* @__PURE__ */ c(_.Fragment, { children: n(S) }, S.id));
|
|
2097
|
+
return /* @__PURE__ */ c("div", { ...s.getZoneProps(g.zoneKey), children: a(g.zoneKey, g.items, b) }, g.zoneKey);
|
|
2082
2098
|
}) });
|
|
2083
2099
|
}
|
|
2084
2100
|
Xe.displayName = "SortableZones";
|
|
@@ -2089,31 +2105,31 @@ function ce({
|
|
|
2089
2105
|
renderItem: a,
|
|
2090
2106
|
renderDragOverlay: n
|
|
2091
2107
|
}) {
|
|
2092
|
-
const { core: o, sortable: s, utilities: d } = t, { DndContext: u, DragOverlay:
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
),
|
|
2096
|
-
return /* @__PURE__ */
|
|
2097
|
-
|
|
2108
|
+
const { core: o, sortable: s, utilities: d } = t, { DndContext: u, DragOverlay: g, useSensors: b, useSensor: S, PointerSensor: p, KeyboardSensor: i, closestCenter: h } = o, { SortableContext: T, verticalListSortingStrategy: x } = s, f = b(
|
|
2109
|
+
S(p, { activationConstraint: { distance: 5 } }),
|
|
2110
|
+
S(i)
|
|
2111
|
+
), w = u, N = g, l = T;
|
|
2112
|
+
return /* @__PURE__ */ R(
|
|
2113
|
+
w,
|
|
2098
2114
|
{
|
|
2099
|
-
sensors:
|
|
2115
|
+
sensors: f,
|
|
2100
2116
|
collisionDetection: h,
|
|
2101
2117
|
onDragStart: e.handleDragStart,
|
|
2102
2118
|
onDragOver: e.handleDragOver,
|
|
2103
2119
|
onDragEnd: e.handleDragEnd,
|
|
2104
2120
|
children: [
|
|
2105
|
-
e.zones.map((
|
|
2106
|
-
const m =
|
|
2121
|
+
e.zones.map((y) => {
|
|
2122
|
+
const m = y.items.map((v) => v.id), D = y.items.map((v) => /* @__PURE__ */ c(
|
|
2107
2123
|
ue,
|
|
2108
2124
|
{
|
|
2109
|
-
id:
|
|
2125
|
+
id: v.id,
|
|
2110
2126
|
useSortable: s.useSortable,
|
|
2111
2127
|
cssHelper: d.CSS,
|
|
2112
|
-
children: a(
|
|
2128
|
+
children: a(v)
|
|
2113
2129
|
},
|
|
2114
|
-
|
|
2130
|
+
v.id
|
|
2115
2131
|
));
|
|
2116
|
-
return /* @__PURE__ */ c("div", { ...e.getZoneProps(
|
|
2132
|
+
return /* @__PURE__ */ c("div", { ...e.getZoneProps(y.zoneKey), children: /* @__PURE__ */ c(l, { items: m, strategy: x, children: r(y.zoneKey, y.items, D) }) }, y.zoneKey);
|
|
2117
2133
|
}),
|
|
2118
2134
|
/* @__PURE__ */ c(N, { children: e.activeItem ? n?.(e.activeItem) ?? a(e.activeItem) : null })
|
|
2119
2135
|
]
|
|
@@ -2122,29 +2138,29 @@ function ce({
|
|
|
2122
2138
|
}
|
|
2123
2139
|
ce.displayName = "SortableZonesInner";
|
|
2124
2140
|
function ue({ id: e, useSortable: t, cssHelper: r, children: a }) {
|
|
2125
|
-
const { attributes: n, listeners: o, setNodeRef: s, transform: d, transition: u, isDragging:
|
|
2141
|
+
const { attributes: n, listeners: o, setNodeRef: s, transform: d, transition: u, isDragging: g } = t({ id: e }), b = {
|
|
2126
2142
|
transform: r?.Transform?.toString(d) ?? void 0,
|
|
2127
2143
|
transition: u,
|
|
2128
|
-
opacity:
|
|
2144
|
+
opacity: g ? 0.5 : 1
|
|
2129
2145
|
};
|
|
2130
2146
|
return /* @__PURE__ */ c("div", { ref: s, style: b, "data-sortable-item-id": e, ...n, ...o, children: a });
|
|
2131
2147
|
}
|
|
2132
2148
|
ue.displayName = "SortableItem";
|
|
2133
|
-
const Je =
|
|
2149
|
+
const Je = _.forwardRef(({ density: e = "compact", children: t, ...r }, a) => {
|
|
2134
2150
|
const n = { ...r };
|
|
2135
2151
|
return delete n.className, delete n.style, /* @__PURE__ */ c("div", { ref: a, className: "gloss-container-toolbar", role: "toolbar", ...n, children: /* @__PURE__ */ c(j, { region: "toolbar", density: e, children: t }) });
|
|
2136
2152
|
});
|
|
2137
2153
|
Je.displayName = "ContainerToolbar";
|
|
2138
|
-
const et =
|
|
2154
|
+
const et = _.forwardRef(({ legend: e, description: t, density: r = "default", children: a, ...n }, o) => {
|
|
2139
2155
|
const s = { ...n };
|
|
2140
|
-
return delete s.className, delete s.style, /* @__PURE__ */
|
|
2156
|
+
return delete s.className, delete s.style, /* @__PURE__ */ R("fieldset", { ref: o, className: "gloss-container-form-section", ...s, children: [
|
|
2141
2157
|
e && /* @__PURE__ */ c("legend", { className: "gloss-container-form-section__legend", children: e }),
|
|
2142
2158
|
t && /* @__PURE__ */ c("p", { className: "gloss-container-form-section__description", children: t }),
|
|
2143
2159
|
/* @__PURE__ */ c(j, { region: "form-section", density: r, children: a })
|
|
2144
2160
|
] });
|
|
2145
2161
|
});
|
|
2146
2162
|
et.displayName = "ContainerFormSection";
|
|
2147
|
-
const tt =
|
|
2163
|
+
const tt = _.forwardRef(({ density: e = "compact", children: t, ...r }, a) => {
|
|
2148
2164
|
const n = { ...r };
|
|
2149
2165
|
return delete n.className, delete n.style, /* @__PURE__ */ c("div", { ref: a, className: "gloss-container-table", ...n, children: /* @__PURE__ */ c(j, { region: "table", density: e, children: t }) });
|
|
2150
2166
|
});
|
|
@@ -2165,8 +2181,8 @@ export {
|
|
|
2165
2181
|
ca as Button,
|
|
2166
2182
|
ua as ButtonGroup,
|
|
2167
2183
|
ma as ButtonGroupContext,
|
|
2168
|
-
|
|
2169
|
-
|
|
2184
|
+
ga as Card,
|
|
2185
|
+
pa as CardActions,
|
|
2170
2186
|
ba as CardBack,
|
|
2171
2187
|
ha as CardBody,
|
|
2172
2188
|
fa as CardFooter,
|
|
@@ -2183,8 +2199,8 @@ export {
|
|
|
2183
2199
|
Ia as ComparisonCard,
|
|
2184
2200
|
_a as ContactForm,
|
|
2185
2201
|
Pa as ContainerCard,
|
|
2186
|
-
|
|
2187
|
-
|
|
2202
|
+
Ma as ContainerCardActions,
|
|
2203
|
+
Ra as ContainerCardBody,
|
|
2188
2204
|
Fa as ContainerCardFooter,
|
|
2189
2205
|
Oa as ContainerCardHeader,
|
|
2190
2206
|
Aa as ContainerCardMedia,
|
|
@@ -2226,9 +2242,9 @@ export {
|
|
|
2226
2242
|
cr as Form,
|
|
2227
2243
|
ur as FormDialog,
|
|
2228
2244
|
mr as FormField,
|
|
2229
|
-
|
|
2245
|
+
gr as FusedShape,
|
|
2230
2246
|
ke as GhostPreview,
|
|
2231
|
-
|
|
2247
|
+
pr as GroupCheckbox,
|
|
2232
2248
|
br as GroupRadio,
|
|
2233
2249
|
hr as GutterActions,
|
|
2234
2250
|
fr as HighlightCard,
|
|
@@ -2246,8 +2262,8 @@ export {
|
|
|
2246
2262
|
Ir as Menu,
|
|
2247
2263
|
_r as MenuDivider,
|
|
2248
2264
|
Pr as MenuGroup,
|
|
2249
|
-
|
|
2250
|
-
|
|
2265
|
+
Mr as MenuItem,
|
|
2266
|
+
Rr as MergePrompt,
|
|
2251
2267
|
Fr as MetricCard,
|
|
2252
2268
|
Or as MetricCardGrid,
|
|
2253
2269
|
ze as MetricGroupContainer,
|
|
@@ -2287,8 +2303,8 @@ export {
|
|
|
2287
2303
|
cn as SkeletonCard,
|
|
2288
2304
|
un as SkeletonChart,
|
|
2289
2305
|
mn as SkeletonTable,
|
|
2290
|
-
|
|
2291
|
-
|
|
2306
|
+
gn as Slider,
|
|
2307
|
+
pn as Sortable,
|
|
2292
2308
|
Xe as SortableZones,
|
|
2293
2309
|
bn as SparklineBg,
|
|
2294
2310
|
hn as SplitButton,
|
|
@@ -2309,10 +2325,10 @@ export {
|
|
|
2309
2325
|
In as Transition,
|
|
2310
2326
|
_n as TransitionGroup,
|
|
2311
2327
|
Pn as TrendCard,
|
|
2312
|
-
|
|
2313
|
-
|
|
2328
|
+
Mn as TrendIndicator,
|
|
2329
|
+
po as UIContext,
|
|
2314
2330
|
j as UIContextProvider,
|
|
2315
|
-
|
|
2331
|
+
Rn as UnifiedBreakdownTable,
|
|
2316
2332
|
Fn as UnifiedContextMenu,
|
|
2317
2333
|
On as addressGroupMetadata,
|
|
2318
2334
|
An as addressSchema,
|
|
@@ -2322,9 +2338,9 @@ export {
|
|
|
2322
2338
|
mt as blockSamples,
|
|
2323
2339
|
ft as cardSamples,
|
|
2324
2340
|
bt as chartSamples,
|
|
2325
|
-
|
|
2341
|
+
pt as circleSamples,
|
|
2326
2342
|
Kt as compactLayout,
|
|
2327
|
-
|
|
2343
|
+
Rt as compactState,
|
|
2328
2344
|
En as contactFormMetadata,
|
|
2329
2345
|
Ln as contactSchema,
|
|
2330
2346
|
Ft as contextMenuFixtures,
|
|
@@ -2340,7 +2356,7 @@ export {
|
|
|
2340
2356
|
Be as entityNameActions,
|
|
2341
2357
|
ct as entityTabGroup,
|
|
2342
2358
|
_e as errorFixture,
|
|
2343
|
-
|
|
2359
|
+
Mt as filteredState,
|
|
2344
2360
|
wo as findPreset,
|
|
2345
2361
|
No as formatDateRange,
|
|
2346
2362
|
So as formatMarketDates,
|
|
@@ -2356,8 +2372,8 @@ export {
|
|
|
2356
2372
|
Zn as getTransitionStyle,
|
|
2357
2373
|
zt as gridCards,
|
|
2358
2374
|
Yn as interpolate,
|
|
2359
|
-
|
|
2360
|
-
|
|
2375
|
+
Mo as isInRange,
|
|
2376
|
+
Ro as isMarketActive,
|
|
2361
2377
|
Fo as isSameDay,
|
|
2362
2378
|
Pt as itemColumns,
|
|
2363
2379
|
It as itemRows,
|
|
@@ -2394,15 +2410,15 @@ export {
|
|
|
2394
2410
|
wt as sparklineFixture,
|
|
2395
2411
|
Nt as sparklineUpFixture,
|
|
2396
2412
|
Fe as staleDonutFixture,
|
|
2397
|
-
|
|
2398
|
-
|
|
2413
|
+
Me as staleFixture,
|
|
2414
|
+
Re as staleSparklineFixture,
|
|
2399
2415
|
St as standardFixture,
|
|
2400
2416
|
xt as standardFlatFixture,
|
|
2401
2417
|
Wt as standardLayout,
|
|
2402
2418
|
Tt as standardNegativeFixture,
|
|
2403
2419
|
ye as statusChip,
|
|
2404
2420
|
ht as tableSamples,
|
|
2405
|
-
|
|
2421
|
+
gt as textSamples,
|
|
2406
2422
|
ut as timeFrameTabGroup,
|
|
2407
2423
|
Ao as toUppercasePresetId,
|
|
2408
2424
|
it as useArrowNavigation,
|