@mt-gloss/ui 0.1.38 → 0.1.40
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/{Expandable-Dojb6oU2.js → Expandable-Cyncyopi.js} +980 -983
- package/catalog.js +2 -2
- package/index.js +2 -2
- package/package.json +1 -1
- package/ui.css +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as d, jsx as e, Fragment as Ve } from "react/jsx-runtime";
|
|
2
2
|
import q, { useId as Oe, useState as L, useCallback as S, createContext as Ut, useContext as Xt, useRef as le, useEffect as ce, useMemo as te, useSyncExternalStore as ss, useReducer as os, forwardRef as is, useImperativeHandle as ls } from "react";
|
|
3
|
-
import { S as J, E as Ze, C as
|
|
3
|
+
import { S as J, E as Ze, C as P, i as cs, R as Ce, l as ds, m as us, n as ms, aj as ps, Q as fs, t as gs, ad as hs, ak as _e, V as bs, W as Xa, X as qa, Y as ys, _ as vs, $ as _s, a0 as xs, a1 as Ns, a2 as Ss, a5 as Cs, a6 as ws, a7 as ks, ac as Ds, a8 as Is, a9 as Ts, P as Es, O as Ms, j as Ps, k as Bs, a3 as Rs, a4 as As, o as zs, v as $s, z as Fs, w as Os, U as yt, A as Ls, D as Hs, x as Ws, F as Gs, y as Vs, ah as js, ai as Ks, G as Ys, H as Us, I as Xs, J as qs, K as Zs, L as Js, M as Qs, N as eo, a as he, b as Wt, f as Za, e as kt, h as Je, Z as Ja, B as to, af as ro, d as Qa, T as Re, ae as ao, ag as va } from "./UIContext-CDdyubSF.js";
|
|
4
4
|
import { formatTrend as no, isStatusModeEnabled as so, formatValue as lr, getValueFontSize as _a, getDateRangeForPreset as Ye, formatDateRangeSmart as pt, isInRange as oo, isSameDay as er, formatMarketDates as io, DEFAULT_MARKET_PRESETS as tr, isMarketActive as xt, detectPreset as rr, getDateRangeDisplayInfo as Ft, toUppercasePresetId as ar, generateMarketId as lo, ROLLING_OPTIONS as Sr, PERIOD_OPTIONS as Cr } from "@mt-gloss/utils";
|
|
5
5
|
import { useGridApiRef as co, DataGridPro as uo } from "@mui/x-data-grid-pro";
|
|
6
6
|
import { Chip as Gt, Tooltip as gt, MenuItem as Vt, Menu as mo, Box as ne, Popper as po, Paper as fo, MenuList as go, ListItemText as ho, IconButton as qe, Select as xa, Typography as Te, Divider as bo, Button as nt, Collapse as yo, Popover as vo, Dialog as _o, DialogTitle as xo, DialogContent as No, TextField as nr, DialogActions as So, Tabs as Co, Tab as wo } from "@mui/material";
|
|
@@ -53,30 +53,30 @@ import Si from "@mui/icons-material/Undo";
|
|
|
53
53
|
import { z as ye } from "zod";
|
|
54
54
|
const Ci = {
|
|
55
55
|
primary: {
|
|
56
|
-
bg:
|
|
57
|
-
color:
|
|
56
|
+
bg: P.BrandPrimary,
|
|
57
|
+
color: P.TextInverse,
|
|
58
58
|
borderColor: "transparent",
|
|
59
59
|
elevation: Ze.ButtonDefault
|
|
60
60
|
},
|
|
61
61
|
secondary: {
|
|
62
|
-
bg:
|
|
63
|
-
color:
|
|
64
|
-
borderColor:
|
|
62
|
+
bg: P.BgSurface,
|
|
63
|
+
color: P.TextPrimary,
|
|
64
|
+
borderColor: P.BorderDefault,
|
|
65
65
|
elevation: Ze.ButtonDefault
|
|
66
66
|
},
|
|
67
67
|
ghost: {
|
|
68
68
|
bg: "transparent",
|
|
69
|
-
color:
|
|
69
|
+
color: P.TextPrimary,
|
|
70
70
|
borderColor: "transparent"
|
|
71
71
|
},
|
|
72
72
|
outline: {
|
|
73
73
|
bg: "transparent",
|
|
74
|
-
color:
|
|
75
|
-
borderColor:
|
|
74
|
+
color: P.BrandPrimary,
|
|
75
|
+
borderColor: P.BrandPrimary
|
|
76
76
|
},
|
|
77
77
|
destructive: {
|
|
78
|
-
bg:
|
|
79
|
-
color:
|
|
78
|
+
bg: P.Red600,
|
|
79
|
+
color: P.TextInverse,
|
|
80
80
|
borderColor: "transparent",
|
|
81
81
|
elevation: Ze.ButtonDefault
|
|
82
82
|
}
|
|
@@ -168,8 +168,8 @@ const Di = q.createContext({
|
|
|
168
168
|
);
|
|
169
169
|
ln.displayName = "ButtonGroup";
|
|
170
170
|
const Ii = {
|
|
171
|
-
default: { trackBorder:
|
|
172
|
-
error: { trackBorder:
|
|
171
|
+
default: { trackBorder: P.BorderDefault },
|
|
172
|
+
error: { trackBorder: P.BorderError }
|
|
173
173
|
}, Ti = {
|
|
174
174
|
xs: { trackSize: "14px", trackRadius: "2px" },
|
|
175
175
|
sm: { trackSize: "16px", trackRadius: "3px" },
|
|
@@ -177,8 +177,8 @@ const Ii = {
|
|
|
177
177
|
lg: { trackSize: "20px", trackRadius: "4px" },
|
|
178
178
|
xl: { trackSize: "24px", trackRadius: "4px" }
|
|
179
179
|
}, Ei = {
|
|
180
|
-
trackBg:
|
|
181
|
-
checkColor:
|
|
180
|
+
trackBg: P.BgSurface,
|
|
181
|
+
checkColor: P.TextInverse
|
|
182
182
|
}, ct = q.forwardRef(
|
|
183
183
|
(r, t) => {
|
|
184
184
|
const {
|
|
@@ -196,9 +196,9 @@ const Ii = {
|
|
|
196
196
|
name: b,
|
|
197
197
|
value: y,
|
|
198
198
|
id: x
|
|
199
|
-
} = r, v = Oe(), h = x || v, [C,
|
|
199
|
+
} = r, v = Oe(), h = x || v, [C, T] = L(l), w = c !== void 0, k = w ? c : C, I = S(
|
|
200
200
|
(_) => {
|
|
201
|
-
w ||
|
|
201
|
+
w || T(_.target.checked), u?.(_), p?.(_.target.checked);
|
|
202
202
|
},
|
|
203
203
|
[w, u, p]
|
|
204
204
|
), g = {
|
|
@@ -206,7 +206,7 @@ const Ii = {
|
|
|
206
206
|
...Ii[a],
|
|
207
207
|
...Ti[n]
|
|
208
208
|
};
|
|
209
|
-
(k || o) && (g.trackBg =
|
|
209
|
+
(k || o) && (g.trackBg = P.BrandPrimary, g.trackBorder = P.BrandPrimary);
|
|
210
210
|
const E = [
|
|
211
211
|
"gloss-preset-checkbox",
|
|
212
212
|
`gloss-preset-checkbox--${a}`,
|
|
@@ -221,7 +221,7 @@ const Ii = {
|
|
|
221
221
|
className: E,
|
|
222
222
|
indeterminate: o,
|
|
223
223
|
checked: k,
|
|
224
|
-
onChange:
|
|
224
|
+
onChange: I,
|
|
225
225
|
disabled: m,
|
|
226
226
|
name: b,
|
|
227
227
|
value: y,
|
|
@@ -260,14 +260,14 @@ function Pi({
|
|
|
260
260
|
Oe();
|
|
261
261
|
const [b, y] = L(t), x = r !== void 0, v = x ? r : b, h = S(
|
|
262
262
|
(k) => {
|
|
263
|
-
const
|
|
264
|
-
x || y(
|
|
263
|
+
const I = v.includes(k) ? v.filter((g) => g !== k) : [...v, k];
|
|
264
|
+
x || y(I), a?.(I);
|
|
265
265
|
},
|
|
266
266
|
[v, x, a]
|
|
267
267
|
), C = S(
|
|
268
268
|
(k) => v.includes(k),
|
|
269
269
|
[v]
|
|
270
|
-
),
|
|
270
|
+
), T = {
|
|
271
271
|
values: v,
|
|
272
272
|
toggle: h,
|
|
273
273
|
isSelected: C,
|
|
@@ -279,7 +279,7 @@ function Pi({
|
|
|
279
279
|
u !== "default" && `gloss-checkbox-group--${u}`,
|
|
280
280
|
m && "gloss-checkbox-group--disabled"
|
|
281
281
|
].filter(Boolean).join(" ");
|
|
282
|
-
return /* @__PURE__ */ e(cn.Provider, { value:
|
|
282
|
+
return /* @__PURE__ */ e(cn.Provider, { value: T, children: /* @__PURE__ */ d("fieldset", { className: w, disabled: m, children: [
|
|
283
283
|
c && /* @__PURE__ */ d("legend", { className: "gloss-checkbox-group__label", children: [
|
|
284
284
|
c,
|
|
285
285
|
p && /* @__PURE__ */ e("span", { className: "gloss-checkbox-group__required", children: " *" })
|
|
@@ -324,8 +324,8 @@ const Bi = q.forwardRef(
|
|
|
324
324
|
);
|
|
325
325
|
Bi.displayName = "GroupCheckbox";
|
|
326
326
|
const Ri = {
|
|
327
|
-
default: { trackBorder:
|
|
328
|
-
error: { trackBorder:
|
|
327
|
+
default: { trackBorder: P.BorderDefault },
|
|
328
|
+
error: { trackBorder: P.BorderError }
|
|
329
329
|
}, Ai = {
|
|
330
330
|
xs: { trackSize: "14px" },
|
|
331
331
|
sm: { trackSize: "16px" },
|
|
@@ -333,8 +333,8 @@ const Ri = {
|
|
|
333
333
|
lg: { trackSize: "20px" },
|
|
334
334
|
xl: { trackSize: "24px" }
|
|
335
335
|
}, zi = {
|
|
336
|
-
trackBg:
|
|
337
|
-
dotColor:
|
|
336
|
+
trackBg: P.BgSurface,
|
|
337
|
+
dotColor: P.BrandPrimary
|
|
338
338
|
}, ur = q.forwardRef(
|
|
339
339
|
(r, t) => {
|
|
340
340
|
const {
|
|
@@ -355,7 +355,7 @@ const Ri = {
|
|
|
355
355
|
...Ri[a],
|
|
356
356
|
...Ai[n]
|
|
357
357
|
};
|
|
358
|
-
c && (y.trackBorder =
|
|
358
|
+
c && (y.trackBorder = P.BrandPrimary);
|
|
359
359
|
const x = [
|
|
360
360
|
"gloss-preset-radio",
|
|
361
361
|
`gloss-preset-radio--${a}`,
|
|
@@ -416,7 +416,7 @@ function Fi({
|
|
|
416
416
|
), C = S(
|
|
417
417
|
(k) => v === k,
|
|
418
418
|
[v]
|
|
419
|
-
),
|
|
419
|
+
), T = {
|
|
420
420
|
value: v,
|
|
421
421
|
select: h,
|
|
422
422
|
isSelected: C,
|
|
@@ -428,7 +428,7 @@ function Fi({
|
|
|
428
428
|
u !== "default" && `gloss-radio-group--${u}`,
|
|
429
429
|
m && "gloss-radio-group--disabled"
|
|
430
430
|
].filter(Boolean).join(" ");
|
|
431
|
-
return /* @__PURE__ */ e(dn.Provider, { value:
|
|
431
|
+
return /* @__PURE__ */ e(dn.Provider, { value: T, children: /* @__PURE__ */ d("fieldset", { className: w, disabled: m, children: [
|
|
432
432
|
c && /* @__PURE__ */ d("legend", { className: "gloss-radio-group__label", children: [
|
|
433
433
|
c,
|
|
434
434
|
p && /* @__PURE__ */ e("span", { className: "gloss-radio-group__required", children: " *" })
|
|
@@ -473,7 +473,7 @@ const Oi = q.forwardRef(
|
|
|
473
473
|
);
|
|
474
474
|
Oi.displayName = "GroupRadio";
|
|
475
475
|
const Li = {
|
|
476
|
-
default:
|
|
476
|
+
default: P.BrandPrimary,
|
|
477
477
|
success: "var(--gloss-color-green-600)",
|
|
478
478
|
error: "var(--gloss-color-red-600)"
|
|
479
479
|
}, Hi = {
|
|
@@ -497,17 +497,17 @@ const Li = {
|
|
|
497
497
|
onCheckedChange: m,
|
|
498
498
|
disabled: f = !1,
|
|
499
499
|
id: b
|
|
500
|
-
} = r, y = Oe(), x = b || y, [v, h] = L(u), C = l !== void 0,
|
|
500
|
+
} = r, y = Oe(), x = b || y, [v, h] = L(u), C = l !== void 0, T = C ? l : v, w = S(
|
|
501
501
|
(g) => {
|
|
502
502
|
C || h(g.target.checked), p?.(g), m?.(g.target.checked);
|
|
503
503
|
},
|
|
504
504
|
[C, p, m]
|
|
505
505
|
), k = {
|
|
506
|
-
trackBg:
|
|
506
|
+
trackBg: P.Gray300,
|
|
507
507
|
trackBgActive: Li[a],
|
|
508
|
-
thumbBg:
|
|
508
|
+
thumbBg: P.White,
|
|
509
509
|
...Hi[n]
|
|
510
|
-
},
|
|
510
|
+
}, I = [
|
|
511
511
|
"gloss-preset-toggle",
|
|
512
512
|
`gloss-preset-toggle--${a}`,
|
|
513
513
|
`gloss-preset-toggle--${n}`
|
|
@@ -518,8 +518,8 @@ const Li = {
|
|
|
518
518
|
{
|
|
519
519
|
ref: t,
|
|
520
520
|
definition: k,
|
|
521
|
-
className:
|
|
522
|
-
checked:
|
|
521
|
+
className: I,
|
|
522
|
+
checked: T,
|
|
523
523
|
onChange: w,
|
|
524
524
|
disabled: f,
|
|
525
525
|
id: x,
|
|
@@ -532,9 +532,9 @@ const Li = {
|
|
|
532
532
|
);
|
|
533
533
|
Wi.displayName = "PresetToggle";
|
|
534
534
|
const Gi = {
|
|
535
|
-
default: { color:
|
|
536
|
-
muted: { color:
|
|
537
|
-
destructive: { color:
|
|
535
|
+
default: { color: P.TextLink },
|
|
536
|
+
muted: { color: P.TextSecondary },
|
|
537
|
+
destructive: { color: P.TextError }
|
|
538
538
|
}, Vi = {
|
|
539
539
|
xs: { fontSize: "0.6875rem" },
|
|
540
540
|
sm: { fontSize: "0.75rem" },
|
|
@@ -579,12 +579,12 @@ const Gi = {
|
|
|
579
579
|
leftIcon: i,
|
|
580
580
|
rightIcon: o,
|
|
581
581
|
href: l ? void 0 : u,
|
|
582
|
-
onClick: (
|
|
582
|
+
onClick: (T) => {
|
|
583
583
|
if (l) {
|
|
584
|
-
|
|
584
|
+
T.preventDefault();
|
|
585
585
|
return;
|
|
586
586
|
}
|
|
587
|
-
f?.(
|
|
587
|
+
f?.(T);
|
|
588
588
|
},
|
|
589
589
|
"aria-disabled": l || void 0,
|
|
590
590
|
...s ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
@@ -597,14 +597,14 @@ const Gi = {
|
|
|
597
597
|
jt.displayName = "PresetLink";
|
|
598
598
|
const ji = {
|
|
599
599
|
default: {
|
|
600
|
-
bg:
|
|
601
|
-
activeBg:
|
|
600
|
+
bg: P.BgMuted,
|
|
601
|
+
activeBg: P.BgSurface,
|
|
602
602
|
borderColor: "transparent"
|
|
603
603
|
},
|
|
604
604
|
filled: {
|
|
605
|
-
bg:
|
|
606
|
-
activeBg:
|
|
607
|
-
borderColor:
|
|
605
|
+
bg: P.Gray200,
|
|
606
|
+
activeBg: P.BgSurface,
|
|
607
|
+
borderColor: P.BorderDefault
|
|
608
608
|
}
|
|
609
609
|
}, Ki = {
|
|
610
610
|
xs: { padding: "1px", fontSize: "0.6875rem" },
|
|
@@ -645,10 +645,10 @@ const Ui = {
|
|
|
645
645
|
lg: { trackHeight: "6px", thumbSize: "20px" },
|
|
646
646
|
xl: { trackHeight: "8px", thumbSize: "24px" }
|
|
647
647
|
}, Xi = {
|
|
648
|
-
trackBg:
|
|
649
|
-
trackActiveBg:
|
|
650
|
-
thumbBg:
|
|
651
|
-
thumbBorder: `2px solid ${
|
|
648
|
+
trackBg: P.Gray200,
|
|
649
|
+
trackActiveBg: P.BrandPrimary,
|
|
650
|
+
thumbBg: P.BgSurface,
|
|
651
|
+
thumbBorder: `2px solid ${P.BrandPrimary}`,
|
|
652
652
|
thumbShadow: "0 1px 3px rgba(0, 0, 0, 0.12)"
|
|
653
653
|
};
|
|
654
654
|
function qi(r) {
|
|
@@ -687,10 +687,10 @@ const Zi = {
|
|
|
687
687
|
lg: { trackHeight: "6px", thumbSize: "20px" },
|
|
688
688
|
xl: { trackHeight: "8px", thumbSize: "24px" }
|
|
689
689
|
}, Ji = {
|
|
690
|
-
trackBg:
|
|
691
|
-
trackActiveBg:
|
|
692
|
-
thumbBg:
|
|
693
|
-
thumbBorder: `2px solid ${
|
|
690
|
+
trackBg: P.Gray200,
|
|
691
|
+
trackActiveBg: P.BrandPrimary,
|
|
692
|
+
thumbBg: P.BgSurface,
|
|
693
|
+
thumbBorder: `2px solid ${P.BrandPrimary}`,
|
|
694
694
|
thumbShadow: "0 1px 3px rgba(0, 0, 0, 0.12)"
|
|
695
695
|
}, Qi = q.forwardRef(
|
|
696
696
|
(r, t) => {
|
|
@@ -712,39 +712,39 @@ const Zi = {
|
|
|
712
712
|
label: v,
|
|
713
713
|
helperText: h,
|
|
714
714
|
id: C,
|
|
715
|
-
name:
|
|
716
|
-
} = r, w = Oe(), k = C || w,
|
|
715
|
+
name: T
|
|
716
|
+
} = r, w = Oe(), k = C || w, I = le(null), [g, E] = L(s), [_, D] = L(null), N = n !== void 0, R = N ? n : g, A = (R[0] - c) / (l - c) * 100, F = (R[1] - c) / (l - c) * 100, M = S((z) => {
|
|
717
717
|
const Y = Math.min(l, Math.max(c, z));
|
|
718
718
|
return Math.round((Math.round((Y - c) / u) * u + c) * 1e3) / 1e3;
|
|
719
|
-
}, [c, l, u]),
|
|
719
|
+
}, [c, l, u]), W = S((z, Y = !1) => {
|
|
720
720
|
const Z = [M(z[0]), M(z[1])];
|
|
721
721
|
Z[0] > Z[1] - p && (_ === 0 ? Z[0] = Z[1] - p : Z[1] = Z[0] + p), Z[0] = Math.max(c, Z[0]), Z[1] = Math.min(l, Z[1]), N || E(Z), i?.(Z), Y && o?.(Z);
|
|
722
722
|
}, [M, p, _, c, l, N, i, o]), U = S((z, Y) => {
|
|
723
|
-
if (!
|
|
724
|
-
const Z =
|
|
723
|
+
if (!I.current) return 0;
|
|
724
|
+
const Z = I.current.getBoundingClientRect(), K = y === "horizontal" ? (z - Z.left) / Z.width : 1 - (Y - Z.top) / Z.height;
|
|
725
725
|
return c + Math.min(1, Math.max(0, K)) * (l - c);
|
|
726
|
-
}, [y, c, l]),
|
|
726
|
+
}, [y, c, l]), j = S((z) => {
|
|
727
727
|
if (x) return;
|
|
728
728
|
z.preventDefault();
|
|
729
729
|
const Y = U(z.clientX, z.clientY), Z = Math.abs(Y - R[0]) <= Math.abs(Y - R[1]) ? 0 : 1;
|
|
730
730
|
D(Z);
|
|
731
731
|
const K = [...R];
|
|
732
|
-
K[Z] = Y,
|
|
733
|
-
}, [x, U, R,
|
|
732
|
+
K[Z] = Y, W(K);
|
|
733
|
+
}, [x, U, R, W]);
|
|
734
734
|
ce(() => {
|
|
735
735
|
if (_ === null) return;
|
|
736
736
|
const z = (Z) => {
|
|
737
737
|
const K = [...R];
|
|
738
|
-
K[_] = U(Z.clientX, Z.clientY),
|
|
738
|
+
K[_] = U(Z.clientX, Z.clientY), W(K);
|
|
739
739
|
}, Y = (Z) => {
|
|
740
740
|
const K = [...R];
|
|
741
|
-
K[_] = U(Z.clientX, Z.clientY),
|
|
741
|
+
K[_] = U(Z.clientX, Z.clientY), W(K, !0), D(null);
|
|
742
742
|
};
|
|
743
743
|
return document.addEventListener("mousemove", z), document.addEventListener("mouseup", Y), () => {
|
|
744
744
|
document.removeEventListener("mousemove", z), document.removeEventListener("mouseup", Y);
|
|
745
745
|
};
|
|
746
|
-
}, [_, U, R,
|
|
747
|
-
const
|
|
746
|
+
}, [_, U, R, W]);
|
|
747
|
+
const B = S((z) => (Y) => {
|
|
748
748
|
if (x) return;
|
|
749
749
|
let Z = 0;
|
|
750
750
|
if (Y.key === "ArrowRight" || Y.key === "ArrowUp") Z = u;
|
|
@@ -752,8 +752,8 @@ const Zi = {
|
|
|
752
752
|
else return;
|
|
753
753
|
Y.preventDefault();
|
|
754
754
|
const K = [...R];
|
|
755
|
-
K[z] += Z,
|
|
756
|
-
}, [x, u, R,
|
|
755
|
+
K[z] += Z, W(K, !0);
|
|
756
|
+
}, [x, u, R, W]), H = Math.abs(F - A) < 5, V = { ...Ji, ...Zi[a] }, G = ["gloss-preset-rangeslider", `gloss-preset-rangeslider--${a}`, x && "gloss-preset-rangeslider--disabled"].filter(Boolean).join(" ");
|
|
757
757
|
return /* @__PURE__ */ d("div", { className: G, children: [
|
|
758
758
|
v && /* @__PURE__ */ d("label", { className: "gloss-preset-rangeslider__label", htmlFor: k, children: [
|
|
759
759
|
v,
|
|
@@ -763,16 +763,16 @@ const Zi = {
|
|
|
763
763
|
b(R[1])
|
|
764
764
|
] })
|
|
765
765
|
] }),
|
|
766
|
-
/* @__PURE__ */ e("input", { ref: t, type: "hidden", id: k, name:
|
|
767
|
-
/* @__PURE__ */ e("input", { type: "hidden", name:
|
|
768
|
-
/* @__PURE__ */ e(hs, { definition:
|
|
769
|
-
/* @__PURE__ */ e("div", { className: "gloss-base-rangeslider__fill", style: y === "horizontal" ? { left: `${A}%`, width: `${
|
|
766
|
+
/* @__PURE__ */ e("input", { ref: t, type: "hidden", id: k, name: T ? `${T}[0]` : void 0, value: R[0] }),
|
|
767
|
+
/* @__PURE__ */ e("input", { type: "hidden", name: T ? `${T}[1]` : void 0, value: R[1] }),
|
|
768
|
+
/* @__PURE__ */ e(hs, { definition: V, orientation: y, disabled: x, collision: H, children: /* @__PURE__ */ d("div", { ref: I, className: "gloss-base-rangeslider__track", onMouseDown: j, children: [
|
|
769
|
+
/* @__PURE__ */ e("div", { className: "gloss-base-rangeslider__fill", style: y === "horizontal" ? { left: `${A}%`, width: `${F - A}%` } : { bottom: `${A}%`, height: `${F - A}%` } }),
|
|
770
770
|
/* @__PURE__ */ e("div", { className: `gloss-base-rangeslider__thumb ${_ === 0 ? "gloss-base-rangeslider__thumb--active" : ""}`, role: "slider", tabIndex: x ? -1 : 0, "aria-valuenow": R[0], "aria-valuemin": c, "aria-valuemax": R[1] - p, onMouseDown: (z) => {
|
|
771
771
|
x || (z.preventDefault(), z.stopPropagation(), D(0));
|
|
772
|
-
}, onKeyDown:
|
|
772
|
+
}, onKeyDown: B(0), style: y === "horizontal" ? { left: `${A}%` } : { bottom: `${A}%` }, "aria-label": `${v || "Range"} minimum` }),
|
|
773
773
|
/* @__PURE__ */ e("div", { className: `gloss-base-rangeslider__thumb ${_ === 1 ? "gloss-base-rangeslider__thumb--active" : ""}`, role: "slider", tabIndex: x ? -1 : 0, "aria-valuenow": R[1], "aria-valuemin": R[0] + p, "aria-valuemax": l, onMouseDown: (z) => {
|
|
774
774
|
x || (z.preventDefault(), z.stopPropagation(), D(1));
|
|
775
|
-
}, onKeyDown:
|
|
775
|
+
}, onKeyDown: B(1), style: y === "horizontal" ? { left: `${F}%` } : { bottom: `${F}%` }, "aria-label": `${v || "Range"} maximum` })
|
|
776
776
|
] }) }),
|
|
777
777
|
h && /* @__PURE__ */ e("div", { className: "gloss-preset-rangeslider__helper", children: h })
|
|
778
778
|
] });
|
|
@@ -864,17 +864,17 @@ const tl = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], rl = ["January", "
|
|
|
864
864
|
return t.replace("DD", String(a).padStart(2, "0")).replace("D", String(a)).replace("MM", String(n).padStart(2, "0")).replace("M", String(n)).replace("YYYY", String(s)).replace("YY", String(s).slice(-2));
|
|
865
865
|
}, wr = (r, t, a, n, s) => t && r < t || a && r > a || n?.some((i) => bt(i, r)) ? !0 : s?.(r) ?? !1, sl = (r, t, a, n, s, i, o, c) => {
|
|
866
866
|
const l = [], u = /* @__PURE__ */ new Date(), p = ka(r, t), f = (al(r, t) - n + 7) % 7, b = t === 0 ? 11 : t - 1, y = t === 0 ? r - 1 : r, x = ka(y, b);
|
|
867
|
-
for (let
|
|
868
|
-
const w = new Date(y, b, x -
|
|
867
|
+
for (let T = f - 1; T >= 0; T--) {
|
|
868
|
+
const w = new Date(y, b, x - T);
|
|
869
869
|
l.push({ date: w, isCurrentMonth: !1, isToday: bt(w, u), isSelected: a ? bt(w, a) : !1, isDisabled: wr(w, s, i, o, c) });
|
|
870
870
|
}
|
|
871
|
-
for (let
|
|
872
|
-
const w = new Date(r, t,
|
|
871
|
+
for (let T = 1; T <= p; T++) {
|
|
872
|
+
const w = new Date(r, t, T);
|
|
873
873
|
l.push({ date: w, isCurrentMonth: !0, isToday: bt(w, u), isSelected: a ? bt(w, a) : !1, isDisabled: wr(w, s, i, o, c) });
|
|
874
874
|
}
|
|
875
875
|
const v = t === 11 ? 0 : t + 1, h = t === 11 ? r + 1 : r, C = 42 - l.length;
|
|
876
|
-
for (let
|
|
877
|
-
const w = new Date(h, v,
|
|
876
|
+
for (let T = 1; T <= C; T++) {
|
|
877
|
+
const w = new Date(h, v, T);
|
|
878
878
|
l.push({ date: w, isCurrentMonth: !1, isToday: bt(w, u), isSelected: a ? bt(w, a) : !1, isDisabled: wr(w, s, i, o, c) });
|
|
879
879
|
}
|
|
880
880
|
return l;
|
|
@@ -885,9 +885,9 @@ const tl = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], rl = ["January", "
|
|
|
885
885
|
lg: { padding: J.Lg },
|
|
886
886
|
xl: { padding: J.Xl }
|
|
887
887
|
}, il = {
|
|
888
|
-
default:
|
|
889
|
-
error:
|
|
890
|
-
success:
|
|
888
|
+
default: P.BorderDefault,
|
|
889
|
+
error: P.BorderError,
|
|
890
|
+
success: P.BorderSuccess
|
|
891
891
|
}, ll = q.forwardRef(
|
|
892
892
|
(r, t) => {
|
|
893
893
|
const {
|
|
@@ -908,24 +908,24 @@ const tl = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], rl = ["January", "
|
|
|
908
908
|
disabled: v = !1,
|
|
909
909
|
clearable: h = !0,
|
|
910
910
|
required: C,
|
|
911
|
-
id:
|
|
911
|
+
id: T,
|
|
912
912
|
name: w
|
|
913
|
-
} = r, k = Oe(),
|
|
913
|
+
} = r, k = Oe(), I = T || k, g = le(null), [E, _] = L(!1), [D, N] = L(i), R = s !== void 0, A = R ? s : D, [F, M] = L(() => A || /* @__PURE__ */ new Date());
|
|
914
914
|
ce(() => {
|
|
915
915
|
A && M(A);
|
|
916
916
|
}, [A]);
|
|
917
|
-
const
|
|
917
|
+
const W = mn({ enabled: E, onEscape: () => _(!1) }), U = te(() => sl(F.getFullYear(), F.getMonth(), A, b, c, l, u, p), [F, A, b, c, l, u, p]), j = te(() => {
|
|
918
918
|
const X = [...tl];
|
|
919
919
|
if (b > 0) {
|
|
920
920
|
const ee = X.splice(0, b);
|
|
921
921
|
X.push(...ee);
|
|
922
922
|
}
|
|
923
923
|
return X;
|
|
924
|
-
}, [b]),
|
|
924
|
+
}, [b]), B = S((X) => {
|
|
925
925
|
R || N(X), o?.(X), _(!1);
|
|
926
|
-
}, [R, o]),
|
|
926
|
+
}, [R, o]), H = S((X) => {
|
|
927
927
|
X.stopPropagation(), R || N(null), o?.(null);
|
|
928
|
-
}, [R, o]),
|
|
928
|
+
}, [R, o]), V = S((X) => M((ee) => {
|
|
929
929
|
const fe = new Date(ee);
|
|
930
930
|
return fe.setMonth(fe.getMonth() + X), fe;
|
|
931
931
|
}), []);
|
|
@@ -937,40 +937,40 @@ const tl = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], rl = ["January", "
|
|
|
937
937
|
return document.addEventListener("mousedown", X), () => document.removeEventListener("mousedown", X);
|
|
938
938
|
}, [E]);
|
|
939
939
|
const G = A ? nl(A, m) : "", z = {
|
|
940
|
-
bg:
|
|
940
|
+
bg: P.BgSurface,
|
|
941
941
|
borderColor: il[a],
|
|
942
942
|
radius: Ce.Md,
|
|
943
943
|
elevation: Ze.Card,
|
|
944
944
|
...ol[n]
|
|
945
|
-
}, Y = { bg:
|
|
945
|
+
}, Y = { bg: P.BrandPrimary, color: P.TextInverse, radius: Ce.Sm }, Z = { bg: P.BgMuted, radius: Ce.Sm }, K = [
|
|
946
946
|
"gloss-preset-datepicker",
|
|
947
947
|
`gloss-preset-datepicker--${a}`,
|
|
948
948
|
`gloss-preset-datepicker--${n}`,
|
|
949
949
|
v && "gloss-preset-datepicker--disabled"
|
|
950
950
|
].filter(Boolean).join(" ");
|
|
951
951
|
return /* @__PURE__ */ d("div", { className: K, ref: g, children: [
|
|
952
|
-
y && /* @__PURE__ */ d("label", { className: "gloss-preset-datepicker__label", htmlFor:
|
|
952
|
+
y && /* @__PURE__ */ d("label", { className: "gloss-preset-datepicker__label", htmlFor: I, children: [
|
|
953
953
|
y,
|
|
954
954
|
C && /* @__PURE__ */ e("span", { className: "gloss-preset-datepicker__required", children: "*" })
|
|
955
955
|
] }),
|
|
956
|
-
/* @__PURE__ */ e("input", { ref: t, type: "hidden", id:
|
|
956
|
+
/* @__PURE__ */ e("input", { ref: t, type: "hidden", id: I, name: w, value: A ? A.toISOString() : "" }),
|
|
957
957
|
/* @__PURE__ */ d("button", { type: "button", className: "gloss-preset-datepicker__trigger", onClick: () => !v && _((X) => !X), disabled: v, "aria-haspopup": "dialog", "aria-expanded": E, children: [
|
|
958
958
|
/* @__PURE__ */ e(_e, { name: "calendar", size: "sm" }),
|
|
959
959
|
/* @__PURE__ */ e("span", { className: `gloss-preset-datepicker__value ${G ? "" : "gloss-preset-datepicker__placeholder"}`, children: G || f }),
|
|
960
|
-
h && A && /* @__PURE__ */ e("span", { className: "gloss-preset-datepicker__clear", onClick:
|
|
960
|
+
h && A && /* @__PURE__ */ e("span", { className: "gloss-preset-datepicker__clear", onClick: H, role: "button", tabIndex: -1, children: /* @__PURE__ */ e(_e, { name: "x", size: "sm" }) }),
|
|
961
961
|
/* @__PURE__ */ e(_e, { name: "chevron-down", size: "sm" })
|
|
962
962
|
] }),
|
|
963
|
-
E && /* @__PURE__ */ e("div", { ref:
|
|
963
|
+
E && /* @__PURE__ */ e("div", { ref: W, role: "dialog", "aria-label": "Choose date", children: /* @__PURE__ */ d(bs, { definition: z, children: [
|
|
964
964
|
/* @__PURE__ */ d(Xa, { children: [
|
|
965
|
-
/* @__PURE__ */ e("button", { type: "button", className: "gloss-preset-datepicker__nav-btn", onClick: () =>
|
|
965
|
+
/* @__PURE__ */ e("button", { type: "button", className: "gloss-preset-datepicker__nav-btn", onClick: () => V(-1), "aria-label": "Previous month", children: /* @__PURE__ */ e(_e, { name: "chevron-left", size: "sm" }) }),
|
|
966
966
|
/* @__PURE__ */ d("span", { className: "gloss-preset-datepicker__title", children: [
|
|
967
|
-
rl[
|
|
967
|
+
rl[F.getMonth()],
|
|
968
968
|
" ",
|
|
969
|
-
|
|
969
|
+
F.getFullYear()
|
|
970
970
|
] }),
|
|
971
|
-
/* @__PURE__ */ e("button", { type: "button", className: "gloss-preset-datepicker__nav-btn", onClick: () =>
|
|
971
|
+
/* @__PURE__ */ e("button", { type: "button", className: "gloss-preset-datepicker__nav-btn", onClick: () => V(1), "aria-label": "Next month", children: /* @__PURE__ */ e(_e, { name: "chevron-right", size: "sm" }) })
|
|
972
972
|
] }),
|
|
973
|
-
/* @__PURE__ */ e("div", { className: "gloss-preset-datepicker__day-headers", children:
|
|
973
|
+
/* @__PURE__ */ e("div", { className: "gloss-preset-datepicker__day-headers", children: j.map((X) => /* @__PURE__ */ e("span", { className: "gloss-preset-datepicker__day-header", children: X }, X)) }),
|
|
974
974
|
/* @__PURE__ */ e(qa, { children: U.map((X, ee) => /* @__PURE__ */ e(
|
|
975
975
|
ys,
|
|
976
976
|
{
|
|
@@ -979,7 +979,7 @@ const tl = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], rl = ["January", "
|
|
|
979
979
|
today: X.isToday,
|
|
980
980
|
outsideMonth: !X.isCurrentMonth,
|
|
981
981
|
disabled: X.isDisabled,
|
|
982
|
-
onClick: () => !X.isDisabled &&
|
|
982
|
+
onClick: () => !X.isDisabled && B(X.date),
|
|
983
983
|
tabIndex: X.isSelected ? 0 : -1,
|
|
984
984
|
"aria-selected": X.isSelected,
|
|
985
985
|
children: X.date.getDate()
|
|
@@ -1017,9 +1017,9 @@ const zr = (r) => {
|
|
|
1017
1017
|
lg: { padding: J.Lg, cellHeight: "40px" },
|
|
1018
1018
|
xl: { padding: J.Xl, cellHeight: "44px" }
|
|
1019
1019
|
}, ul = {
|
|
1020
|
-
default:
|
|
1021
|
-
error:
|
|
1022
|
-
success:
|
|
1020
|
+
default: P.BorderDefault,
|
|
1021
|
+
error: P.BorderError,
|
|
1022
|
+
success: P.BorderSuccess
|
|
1023
1023
|
}, ml = q.forwardRef(
|
|
1024
1024
|
(r, t) => {
|
|
1025
1025
|
const {
|
|
@@ -1040,20 +1040,20 @@ const zr = (r) => {
|
|
|
1040
1040
|
clearable: v = !0,
|
|
1041
1041
|
id: h,
|
|
1042
1042
|
name: C
|
|
1043
|
-
} = r,
|
|
1044
|
-
D || _(
|
|
1045
|
-
}, [D, o]),
|
|
1046
|
-
|
|
1043
|
+
} = r, T = Oe(), w = h || T, k = le(null), [I, g] = L(!1), [E, _] = L(i), D = s !== void 0, N = D ? s : E, R = te(() => cl(u, p, m), [u, p, m]), A = S((j) => {
|
|
1044
|
+
D || _(j), o?.(j), g(!1);
|
|
1045
|
+
}, [D, o]), F = S((j) => {
|
|
1046
|
+
j.stopPropagation(), D || _(""), o?.("");
|
|
1047
1047
|
}, [D, o]);
|
|
1048
1048
|
ce(() => {
|
|
1049
|
-
if (!
|
|
1050
|
-
const
|
|
1051
|
-
k.current && !k.current.contains(
|
|
1049
|
+
if (!I) return;
|
|
1050
|
+
const j = (B) => {
|
|
1051
|
+
k.current && !k.current.contains(B.target) && g(!1);
|
|
1052
1052
|
};
|
|
1053
|
-
return document.addEventListener("mousedown",
|
|
1054
|
-
}, [
|
|
1055
|
-
const M = N ? Da(N, c, l) : "",
|
|
1056
|
-
bg:
|
|
1053
|
+
return document.addEventListener("mousedown", j), () => document.removeEventListener("mousedown", j);
|
|
1054
|
+
}, [I]);
|
|
1055
|
+
const M = N ? Da(N, c, l) : "", W = {
|
|
1056
|
+
bg: P.BgSurface,
|
|
1057
1057
|
borderColor: ul[a],
|
|
1058
1058
|
radius: Ce.Md,
|
|
1059
1059
|
elevation: Ze.Card,
|
|
@@ -1067,13 +1067,13 @@ const zr = (r) => {
|
|
|
1067
1067
|
return /* @__PURE__ */ d("div", { className: U, ref: k, children: [
|
|
1068
1068
|
b && /* @__PURE__ */ e("label", { className: "gloss-preset-timepicker__label", htmlFor: w, children: b }),
|
|
1069
1069
|
/* @__PURE__ */ e("input", { ref: t, type: "hidden", id: w, name: C, value: N }),
|
|
1070
|
-
/* @__PURE__ */ d("button", { type: "button", className: "gloss-preset-timepicker__trigger", onClick: () => !x && g((
|
|
1070
|
+
/* @__PURE__ */ d("button", { type: "button", className: "gloss-preset-timepicker__trigger", onClick: () => !x && g((j) => !j), disabled: x, "aria-haspopup": "listbox", "aria-expanded": I, children: [
|
|
1071
1071
|
/* @__PURE__ */ e(_e, { name: "clock", size: "sm" }),
|
|
1072
1072
|
/* @__PURE__ */ e("span", { className: `gloss-preset-timepicker__value ${M ? "" : "gloss-preset-timepicker__placeholder"}`, children: M || f }),
|
|
1073
|
-
v && N && /* @__PURE__ */ e("span", { className: "gloss-preset-timepicker__clear", onClick:
|
|
1073
|
+
v && N && /* @__PURE__ */ e("span", { className: "gloss-preset-timepicker__clear", onClick: F, role: "button", tabIndex: -1, children: /* @__PURE__ */ e(_e, { name: "x", size: "sm" }) }),
|
|
1074
1074
|
/* @__PURE__ */ e(_e, { name: "chevron-down", size: "sm" })
|
|
1075
1075
|
] }),
|
|
1076
|
-
|
|
1076
|
+
I && /* @__PURE__ */ e(vs, { definition: W, children: /* @__PURE__ */ e(_s, { children: R.map((j) => /* @__PURE__ */ e(xs, { selected: j === N, onClick: () => A(j), children: Da(j, c, l) }, j)) }) }),
|
|
1077
1077
|
y && /* @__PURE__ */ e("div", { className: `gloss-preset-timepicker__helper ${a === "error" ? "gloss-preset-timepicker__helper--error" : ""}`, children: y })
|
|
1078
1078
|
] });
|
|
1079
1079
|
}
|
|
@@ -1084,14 +1084,14 @@ const pl = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], fl = ["January", "
|
|
|
1084
1084
|
return t.replace("DD", String(a).padStart(2, "0")).replace("D", String(a)).replace("MM", String(n).padStart(2, "0")).replace("M", String(n)).replace("YYYY", String(s)).replace("YY", String(s).slice(-2));
|
|
1085
1085
|
}, Ta = (r, t, a, n, s, i) => {
|
|
1086
1086
|
const o = [], c = /* @__PURE__ */ new Date(), l = Ia(r, t), p = (gl(r, t) - n + 7) % 7, m = t === 0 ? 11 : t - 1, f = t === 0 ? r - 1 : r, b = Ia(f, m), y = (h, C) => {
|
|
1087
|
-
const
|
|
1087
|
+
const T = a.start ? kr(h, a.start) : !1, w = a.end ? kr(h, a.end) : !1;
|
|
1088
1088
|
return {
|
|
1089
1089
|
date: h,
|
|
1090
1090
|
isCurrentMonth: C,
|
|
1091
1091
|
isToday: kr(h, c),
|
|
1092
|
-
isSelected:
|
|
1092
|
+
isSelected: T || w,
|
|
1093
1093
|
isDisabled: !!(s && h < s || i && h > i),
|
|
1094
|
-
isRangeStart:
|
|
1094
|
+
isRangeStart: T,
|
|
1095
1095
|
isRangeEnd: w,
|
|
1096
1096
|
inRange: a.start && a.end ? h > a.start && h < a.end : !1
|
|
1097
1097
|
};
|
|
@@ -1127,12 +1127,12 @@ const pl = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], fl = ["January", "
|
|
|
1127
1127
|
helperText: v,
|
|
1128
1128
|
disabled: h = !1,
|
|
1129
1129
|
clearable: C = !0,
|
|
1130
|
-
id:
|
|
1130
|
+
id: T,
|
|
1131
1131
|
name: w
|
|
1132
|
-
} = r, k = Oe(),
|
|
1133
|
-
const de = new Date(
|
|
1132
|
+
} = r, k = Oe(), I = T || k, g = le(null), [E, _] = L(!1), [D, N] = L(i), [R, A] = L(!1), F = s !== void 0, M = F ? s : D, [W, U] = L(() => M.start || /* @__PURE__ */ new Date()), j = te(() => {
|
|
1133
|
+
const de = new Date(W);
|
|
1134
1134
|
return de.setMonth(de.getMonth() + 1), de;
|
|
1135
|
-
}, [
|
|
1135
|
+
}, [W]), B = mn({ enabled: E, onEscape: () => _(!1) }), H = te(() => Ta(W.getFullYear(), W.getMonth(), M, y, c, l), [W, M, y, c, l]), V = te(() => Ta(j.getFullYear(), j.getMonth(), M, y, c, l), [j, M, y, c, l]), G = te(() => {
|
|
1136
1136
|
const de = [...pl];
|
|
1137
1137
|
if (y > 0) {
|
|
1138
1138
|
const be = de.splice(0, y);
|
|
@@ -1147,12 +1147,12 @@ const pl = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], fl = ["January", "
|
|
|
1147
1147
|
if (be = de < M.start ? { start: de, end: M.start } : { start: M.start, end: de }, u && be.start && be.end && Math.ceil(Math.abs(be.end.getTime() - be.start.getTime()) / 864e5) > u) return;
|
|
1148
1148
|
A(!1), _(!1);
|
|
1149
1149
|
}
|
|
1150
|
-
|
|
1151
|
-
}, [R, M, u,
|
|
1150
|
+
F || N(be), o?.(be);
|
|
1151
|
+
}, [R, M, u, F, o]), Y = S((de) => {
|
|
1152
1152
|
de.stopPropagation();
|
|
1153
1153
|
const be = { start: null, end: null };
|
|
1154
|
-
|
|
1155
|
-
}, [
|
|
1154
|
+
F || N(be), o?.(be), A(!1);
|
|
1155
|
+
}, [F, o]), Z = S((de) => U((be) => {
|
|
1156
1156
|
const se = new Date(be);
|
|
1157
1157
|
return se.setMonth(se.getMonth() + de), se;
|
|
1158
1158
|
}), []);
|
|
@@ -1164,8 +1164,8 @@ const pl = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], fl = ["January", "
|
|
|
1164
1164
|
return document.addEventListener("mousedown", de), () => document.removeEventListener("mousedown", de);
|
|
1165
1165
|
}, [E]);
|
|
1166
1166
|
const K = te(() => !M.start && !M.end ? "" : M.start && !M.end ? `${Dr(M.start, f)} - ...` : M.start && M.end ? `${Dr(M.start, f)} - ${Dr(M.end, f)}` : "", [M, f]), X = {
|
|
1167
|
-
bg:
|
|
1168
|
-
borderColor: a === "error" ?
|
|
1167
|
+
bg: P.BgSurface,
|
|
1168
|
+
borderColor: a === "error" ? P.BorderError : a === "success" ? P.BorderSuccess : P.BorderDefault,
|
|
1169
1169
|
radius: Ce.Md,
|
|
1170
1170
|
elevation: Ze.Card,
|
|
1171
1171
|
...hl[n]
|
|
@@ -1188,8 +1188,8 @@ const pl = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], fl = ["January", "
|
|
|
1188
1188
|
/* @__PURE__ */ e(qa, { children: be.map((oe, pe) => /* @__PURE__ */ e(Ss, { selected: oe.isSelected, today: oe.isToday, outsideMonth: !oe.isCurrentMonth, disabled: oe.isDisabled, rangeStart: oe.isRangeStart, rangeEnd: oe.isRangeEnd, inRange: oe.inRange, onClick: () => !oe.isDisabled && z(oe.date), children: oe.date.getDate() }, pe)) })
|
|
1189
1189
|
] });
|
|
1190
1190
|
return /* @__PURE__ */ d("div", { className: ee, ref: g, children: [
|
|
1191
|
-
x && /* @__PURE__ */ e("label", { className: "gloss-preset-daterangepicker__label", htmlFor:
|
|
1192
|
-
/* @__PURE__ */ e("input", { ref: t, type: "hidden", id:
|
|
1191
|
+
x && /* @__PURE__ */ e("label", { className: "gloss-preset-daterangepicker__label", htmlFor: I, children: x }),
|
|
1192
|
+
/* @__PURE__ */ e("input", { ref: t, type: "hidden", id: I, name: w ? `${w}[start]` : void 0, value: M.start ? M.start.toISOString() : "" }),
|
|
1193
1193
|
/* @__PURE__ */ e("input", { type: "hidden", name: w ? `${w}[end]` : void 0, value: M.end ? M.end.toISOString() : "" }),
|
|
1194
1194
|
/* @__PURE__ */ d("button", { type: "button", className: "gloss-preset-daterangepicker__trigger", onClick: () => !h && _((de) => !de), disabled: h, "aria-haspopup": "dialog", "aria-expanded": E, children: [
|
|
1195
1195
|
/* @__PURE__ */ e(_e, { name: "calendar", size: "sm" }),
|
|
@@ -1197,13 +1197,13 @@ const pl = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], fl = ["January", "
|
|
|
1197
1197
|
C && (M.start || M.end) && /* @__PURE__ */ e("span", { className: "gloss-preset-daterangepicker__clear", onClick: Y, role: "button", tabIndex: -1, children: /* @__PURE__ */ e(_e, { name: "x", size: "sm" }) }),
|
|
1198
1198
|
/* @__PURE__ */ e(_e, { name: "chevron-down", size: "sm" })
|
|
1199
1199
|
] }),
|
|
1200
|
-
E && /* @__PURE__ */ d("div", { ref:
|
|
1200
|
+
E && /* @__PURE__ */ d("div", { ref: B, className: "gloss-preset-daterangepicker__dropdown", role: "dialog", "aria-label": "Choose date range", children: [
|
|
1201
1201
|
m && p.length > 0 && /* @__PURE__ */ e("div", { className: "gloss-preset-daterangepicker__presets", children: p.map((de) => /* @__PURE__ */ e("button", { type: "button", className: "gloss-preset-daterangepicker__preset", onClick: () => {
|
|
1202
|
-
|
|
1202
|
+
F || N(de.range), o?.(de.range), _(!1);
|
|
1203
1203
|
}, children: de.label }, de.label)) }),
|
|
1204
1204
|
/* @__PURE__ */ d(Ns, { definition: X, children: [
|
|
1205
|
-
fe(
|
|
1206
|
-
fe(
|
|
1205
|
+
fe(W, H, "left"),
|
|
1206
|
+
fe(j, V, "right")
|
|
1207
1207
|
] })
|
|
1208
1208
|
] }),
|
|
1209
1209
|
v && /* @__PURE__ */ e("div", { className: `gloss-preset-daterangepicker__helper ${a === "error" ? "gloss-preset-daterangepicker__helper--error" : ""}`, children: v })
|
|
@@ -1241,53 +1241,53 @@ const bl = () => Math.random().toString(36).slice(2, 11), Ea = (r) => {
|
|
|
1241
1241
|
onError: v,
|
|
1242
1242
|
id: h,
|
|
1243
1243
|
name: C
|
|
1244
|
-
} = r,
|
|
1245
|
-
D || g(
|
|
1246
|
-
}, [D, i]), A = S((
|
|
1247
|
-
if (l &&
|
|
1244
|
+
} = r, T = Oe(), w = h || T, k = le(null), [I, g] = L([]), [E, _] = L(!1), D = s !== void 0, N = D ? s : I, R = S((B) => {
|
|
1245
|
+
D || g(B), i?.(B);
|
|
1246
|
+
}, [D, i]), A = S((B) => {
|
|
1247
|
+
if (l && B.size > l) return `File size exceeds ${Ea(l)}`;
|
|
1248
1248
|
if (o) {
|
|
1249
|
-
const
|
|
1250
|
-
if (!
|
|
1249
|
+
const H = o.split(",").map((z) => z.trim()), V = `.${B.name.split(".").pop()?.toLowerCase()}`;
|
|
1250
|
+
if (!H.some((z) => z.startsWith(".") ? V === z.toLowerCase() : z.endsWith("/*") ? B.type.startsWith(z.replace("/*", "/")) : B.type === z)) return "File type not accepted";
|
|
1251
1251
|
}
|
|
1252
1252
|
return null;
|
|
1253
|
-
}, [l, o]),
|
|
1254
|
-
const
|
|
1255
|
-
Array.from(
|
|
1253
|
+
}, [l, o]), F = S((B) => {
|
|
1254
|
+
const H = c ? c - N.length : 1 / 0, V = [];
|
|
1255
|
+
Array.from(B).slice(0, H).forEach((G) => {
|
|
1256
1256
|
const z = A(G), Y = G.type.startsWith("image/") ? URL.createObjectURL(G) : void 0;
|
|
1257
|
-
|
|
1258
|
-
}),
|
|
1259
|
-
}, [N, c, A, R, v]), M = S((
|
|
1260
|
-
const
|
|
1261
|
-
|
|
1262
|
-
}, [N, R, f]),
|
|
1263
|
-
|
|
1264
|
-
}, [p,
|
|
1265
|
-
bg:
|
|
1266
|
-
borderColor: a === "error" ?
|
|
1257
|
+
V.push({ file: G, id: bl(), error: z || void 0, preview: Y }), z && v?.(z);
|
|
1258
|
+
}), B.length > H && H >= 0 && v?.(`Maximum ${c} files allowed`), R([...N, ...V]);
|
|
1259
|
+
}, [N, c, A, R, v]), M = S((B) => {
|
|
1260
|
+
const H = N.find((V) => V.id === B);
|
|
1261
|
+
H?.preview && URL.revokeObjectURL(H.preview), R(N.filter((V) => V.id !== B)), f?.(B);
|
|
1262
|
+
}, [N, R, f]), W = S((B) => {
|
|
1263
|
+
B.preventDefault(), B.stopPropagation(), _(!1), !p && B.dataTransfer.files.length > 0 && F(B.dataTransfer.files);
|
|
1264
|
+
}, [p, F]), U = {
|
|
1265
|
+
bg: P.BgMuted,
|
|
1266
|
+
borderColor: a === "error" ? P.BorderError : P.BorderDefault,
|
|
1267
1267
|
borderStyle: "dashed",
|
|
1268
1268
|
radius: Ce.Md,
|
|
1269
1269
|
...yl[n]
|
|
1270
|
-
},
|
|
1270
|
+
}, j = [
|
|
1271
1271
|
"gloss-preset-fileupload",
|
|
1272
1272
|
`gloss-preset-fileupload--${a}`,
|
|
1273
1273
|
`gloss-preset-fileupload--${n}`,
|
|
1274
1274
|
p && "gloss-preset-fileupload--disabled"
|
|
1275
1275
|
].filter(Boolean).join(" ");
|
|
1276
|
-
return /* @__PURE__ */ d("div", { className:
|
|
1276
|
+
return /* @__PURE__ */ d("div", { className: j, children: [
|
|
1277
1277
|
y && /* @__PURE__ */ e("label", { className: "gloss-preset-fileupload__label", htmlFor: w, children: y }),
|
|
1278
1278
|
/* @__PURE__ */ e(
|
|
1279
1279
|
"input",
|
|
1280
1280
|
{
|
|
1281
|
-
ref: (
|
|
1282
|
-
k.current =
|
|
1281
|
+
ref: (B) => {
|
|
1282
|
+
k.current = B, typeof t == "function" ? t(B) : t && (t.current = B);
|
|
1283
1283
|
},
|
|
1284
1284
|
id: w,
|
|
1285
1285
|
name: C,
|
|
1286
1286
|
type: "file",
|
|
1287
1287
|
accept: o,
|
|
1288
1288
|
multiple: u,
|
|
1289
|
-
onChange: (
|
|
1290
|
-
|
|
1289
|
+
onChange: (B) => {
|
|
1290
|
+
B.target.files?.length && (F(B.target.files), B.target.value = "");
|
|
1291
1291
|
},
|
|
1292
1292
|
disabled: p,
|
|
1293
1293
|
className: "gloss-preset-fileupload__input"
|
|
@@ -1300,16 +1300,16 @@ const bl = () => Math.random().toString(36).slice(2, 11), Ea = (r) => {
|
|
|
1300
1300
|
dragging: E,
|
|
1301
1301
|
disabled: p,
|
|
1302
1302
|
onClick: () => !p && k.current?.click(),
|
|
1303
|
-
onDragOver: (
|
|
1304
|
-
|
|
1303
|
+
onDragOver: (B) => {
|
|
1304
|
+
B.preventDefault(), B.stopPropagation(), _(!0);
|
|
1305
1305
|
},
|
|
1306
|
-
onDragLeave: (
|
|
1307
|
-
|
|
1306
|
+
onDragLeave: (B) => {
|
|
1307
|
+
B.preventDefault(), B.stopPropagation(), _(!1);
|
|
1308
1308
|
},
|
|
1309
|
-
onDrop:
|
|
1309
|
+
onDrop: W,
|
|
1310
1310
|
role: "button",
|
|
1311
1311
|
tabIndex: p ? -1 : 0,
|
|
1312
|
-
onKeyDown: (
|
|
1312
|
+
onKeyDown: (B) => B.key === "Enter" && !p && k.current?.click(),
|
|
1313
1313
|
children: [
|
|
1314
1314
|
/* @__PURE__ */ e(_e, { name: "upload-cloud", size: "lg" }),
|
|
1315
1315
|
/* @__PURE__ */ e("span", { className: "gloss-preset-fileupload__text", children: b }),
|
|
@@ -1320,15 +1320,15 @@ const bl = () => Math.random().toString(36).slice(2, 11), Ea = (r) => {
|
|
|
1320
1320
|
]
|
|
1321
1321
|
}
|
|
1322
1322
|
),
|
|
1323
|
-
N.length > 0 && /* @__PURE__ */ e(ws, { children: N.map((
|
|
1324
|
-
m &&
|
|
1323
|
+
N.length > 0 && /* @__PURE__ */ e(ws, { children: N.map((B) => /* @__PURE__ */ d(ks, { error: !!B.error, children: [
|
|
1324
|
+
m && B.preview ? /* @__PURE__ */ e("img", { src: B.preview, alt: B.file.name, className: "gloss-preset-fileupload__preview" }) : /* @__PURE__ */ e(_e, { name: "file", size: "md" }),
|
|
1325
1325
|
/* @__PURE__ */ d("div", { className: "gloss-preset-fileupload__file-info", children: [
|
|
1326
|
-
/* @__PURE__ */ e("span", { className: "gloss-preset-fileupload__file-name", children:
|
|
1327
|
-
/* @__PURE__ */ e("span", { className: "gloss-preset-fileupload__file-size", children: Ea(
|
|
1328
|
-
|
|
1326
|
+
/* @__PURE__ */ e("span", { className: "gloss-preset-fileupload__file-name", children: B.file.name }),
|
|
1327
|
+
/* @__PURE__ */ e("span", { className: "gloss-preset-fileupload__file-size", children: Ea(B.file.size) }),
|
|
1328
|
+
B.error && /* @__PURE__ */ e("span", { className: "gloss-preset-fileupload__file-error", children: B.error })
|
|
1329
1329
|
] }),
|
|
1330
|
-
/* @__PURE__ */ e("button", { type: "button", className: "gloss-preset-fileupload__remove", onClick: () => M(
|
|
1331
|
-
] },
|
|
1330
|
+
/* @__PURE__ */ e("button", { type: "button", className: "gloss-preset-fileupload__remove", onClick: () => M(B.id), "aria-label": `Remove ${B.file.name}`, children: /* @__PURE__ */ e(_e, { name: "x", size: "sm" }) })
|
|
1331
|
+
] }, B.id)) }),
|
|
1332
1332
|
x && /* @__PURE__ */ e("div", { className: `gloss-preset-fileupload__helper ${a === "error" ? "gloss-preset-fileupload__helper--error" : ""}`, children: x })
|
|
1333
1333
|
] });
|
|
1334
1334
|
}
|
|
@@ -1396,27 +1396,27 @@ const vl = [
|
|
|
1396
1396
|
helperText: m,
|
|
1397
1397
|
id: f,
|
|
1398
1398
|
name: b
|
|
1399
|
-
} = r, y = Oe(), x = f || y, v = le(null), [h, C] = L(!1), [
|
|
1400
|
-
const U = Ma(
|
|
1399
|
+
} = r, y = Oe(), x = f || y, v = le(null), [h, C] = L(!1), [T, w] = L(s), k = n !== void 0, I = k ? n : T, g = sr(I) || { r: 59, g: 130, b: 246 }, E = S((F, M, W) => {
|
|
1400
|
+
const U = Ma(F, M, W, o);
|
|
1401
1401
|
k || w(U), i?.(U);
|
|
1402
|
-
}, [o, k, i]), _ = S((
|
|
1403
|
-
const M = sr(
|
|
1402
|
+
}, [o, k, i]), _ = S((F) => {
|
|
1403
|
+
const M = sr(F);
|
|
1404
1404
|
M && E(M.r, M.g, M.b);
|
|
1405
|
-
}, [E]), D = S((
|
|
1406
|
-
const M = sr(
|
|
1405
|
+
}, [E]), D = S((F) => {
|
|
1406
|
+
const M = sr(F.target.value);
|
|
1407
1407
|
M && E(M.r, M.g, M.b);
|
|
1408
|
-
}, [E]), N = S((
|
|
1409
|
-
const M =
|
|
1408
|
+
}, [E]), N = S((F) => {
|
|
1409
|
+
const M = F.target.value;
|
|
1410
1410
|
k || w(M);
|
|
1411
|
-
const
|
|
1412
|
-
|
|
1411
|
+
const W = sr(M);
|
|
1412
|
+
W && i?.(Ma(W.r, W.g, W.b, o));
|
|
1413
1413
|
}, [o, k, i]);
|
|
1414
1414
|
ce(() => {
|
|
1415
1415
|
if (!h) return;
|
|
1416
|
-
const
|
|
1416
|
+
const F = (M) => {
|
|
1417
1417
|
v.current && !v.current.contains(M.target) && C(!1);
|
|
1418
1418
|
};
|
|
1419
|
-
return document.addEventListener("mousedown",
|
|
1419
|
+
return document.addEventListener("mousedown", F), () => document.removeEventListener("mousedown", F);
|
|
1420
1420
|
}, [h]);
|
|
1421
1421
|
const R = {
|
|
1422
1422
|
radius: Ce.Md,
|
|
@@ -1429,16 +1429,16 @@ const vl = [
|
|
|
1429
1429
|
].filter(Boolean).join(" ");
|
|
1430
1430
|
return /* @__PURE__ */ d("div", { className: A, ref: v, children: [
|
|
1431
1431
|
p && /* @__PURE__ */ e("label", { className: "gloss-preset-colorpicker__label", htmlFor: x, children: p }),
|
|
1432
|
-
/* @__PURE__ */ e("input", { ref: t, type: "hidden", id: x, name: b, value:
|
|
1433
|
-
/* @__PURE__ */ d("button", { type: "button", className: "gloss-preset-colorpicker__trigger", onClick: () => !u && C((
|
|
1434
|
-
/* @__PURE__ */ e(Ds, { style: { backgroundColor:
|
|
1435
|
-
/* @__PURE__ */ e("span", { className: "gloss-preset-colorpicker__value", children:
|
|
1432
|
+
/* @__PURE__ */ e("input", { ref: t, type: "hidden", id: x, name: b, value: I }),
|
|
1433
|
+
/* @__PURE__ */ d("button", { type: "button", className: "gloss-preset-colorpicker__trigger", onClick: () => !u && C((F) => !F), disabled: u, "aria-haspopup": "dialog", "aria-expanded": h, children: [
|
|
1434
|
+
/* @__PURE__ */ e(Ds, { style: { backgroundColor: I } }),
|
|
1435
|
+
/* @__PURE__ */ e("span", { className: "gloss-preset-colorpicker__value", children: I }),
|
|
1436
1436
|
/* @__PURE__ */ e(_e, { name: "chevron-down", size: "sm" })
|
|
1437
1437
|
] }),
|
|
1438
1438
|
h && /* @__PURE__ */ e("div", { className: "gloss-preset-colorpicker__dropdown", children: /* @__PURE__ */ d(Is, { definition: R, disabled: u, children: [
|
|
1439
1439
|
/* @__PURE__ */ e(Ts, { children: /* @__PURE__ */ e("input", { type: "color", value: gn(g.r, g.g, g.b), onChange: D, className: "gloss-preset-colorpicker__native", disabled: u }) }),
|
|
1440
|
-
l.length > 0 && /* @__PURE__ */ e("div", { className: "gloss-preset-colorpicker__swatches", children: l.map((
|
|
1441
|
-
/* @__PURE__ */ e("div", { className: "gloss-preset-colorpicker__input-row", children: /* @__PURE__ */ e("input", { type: "text", value:
|
|
1440
|
+
l.length > 0 && /* @__PURE__ */ e("div", { className: "gloss-preset-colorpicker__swatches", children: l.map((F) => /* @__PURE__ */ e("button", { type: "button", className: `gloss-preset-colorpicker__swatch-btn ${I.toLowerCase() === F.toLowerCase() ? "gloss-preset-colorpicker__swatch-btn--selected" : ""}`, style: { backgroundColor: F }, onClick: () => _(F), "aria-label": `Select ${F}` }, F)) }),
|
|
1441
|
+
/* @__PURE__ */ e("div", { className: "gloss-preset-colorpicker__input-row", children: /* @__PURE__ */ e("input", { type: "text", value: I, onChange: N, className: "gloss-preset-colorpicker__text-input", disabled: u, placeholder: "#000000" }) })
|
|
1442
1442
|
] }) }),
|
|
1443
1443
|
m && /* @__PURE__ */ e("div", { className: "gloss-preset-colorpicker__helper", children: m })
|
|
1444
1444
|
] });
|
|
@@ -1453,7 +1453,7 @@ const Sl = {
|
|
|
1453
1453
|
xl: { starSize: "34px", gap: J.Xs }
|
|
1454
1454
|
}, Cl = {
|
|
1455
1455
|
activeColor: "#f59e0b",
|
|
1456
|
-
inactiveColor:
|
|
1456
|
+
inactiveColor: P.Gray300,
|
|
1457
1457
|
hoverColor: "#fbbf24"
|
|
1458
1458
|
}, wl = q.forwardRef(
|
|
1459
1459
|
({ size: r = "md", readOnly: t, disabled: a, children: n, ...s }, i) => {
|
|
@@ -1549,12 +1549,12 @@ const Dl = q.forwardRef(
|
|
|
1549
1549
|
Dl.displayName = "SplitButton";
|
|
1550
1550
|
const Il = {
|
|
1551
1551
|
default: {
|
|
1552
|
-
bg:
|
|
1553
|
-
color:
|
|
1552
|
+
bg: P.Gray900,
|
|
1553
|
+
color: P.TextInverse
|
|
1554
1554
|
},
|
|
1555
1555
|
rich: {
|
|
1556
|
-
bg:
|
|
1557
|
-
color:
|
|
1556
|
+
bg: P.BgSurface,
|
|
1557
|
+
color: P.TextPrimary
|
|
1558
1558
|
}
|
|
1559
1559
|
}, Tl = {
|
|
1560
1560
|
sm: { padding: J.Xs, fontSize: "0.6875rem", maxWidth: "180px" },
|
|
@@ -1590,9 +1590,9 @@ function Ml(r) {
|
|
|
1590
1590
|
}
|
|
1591
1591
|
Ml.displayName = "PresetTooltip";
|
|
1592
1592
|
const Pl = {
|
|
1593
|
-
default: { borderColor:
|
|
1594
|
-
error: { borderColor:
|
|
1595
|
-
success: { borderColor:
|
|
1593
|
+
default: { borderColor: P.BorderDefault },
|
|
1594
|
+
error: { borderColor: P.BorderError },
|
|
1595
|
+
success: { borderColor: P.BorderSuccess }
|
|
1596
1596
|
}, Bl = {
|
|
1597
1597
|
xs: { padding: J.Xs, paddingX: J.Sm, fontSize: "0.75rem", minHeight: "28px" },
|
|
1598
1598
|
sm: { padding: J.Xs, paddingX: J.Sm, fontSize: "0.8125rem", minHeight: "32px" },
|
|
@@ -1600,10 +1600,10 @@ const Pl = {
|
|
|
1600
1600
|
lg: { padding: J.Sm, paddingX: J.Md, fontSize: "0.9375rem", minHeight: "42px" },
|
|
1601
1601
|
xl: { padding: J.Md, paddingX: J.Lg, fontSize: "1rem", minHeight: "48px" }
|
|
1602
1602
|
}, Rl = {
|
|
1603
|
-
bg:
|
|
1604
|
-
color:
|
|
1603
|
+
bg: P.BgSurface,
|
|
1604
|
+
color: P.TextPrimary,
|
|
1605
1605
|
radius: Ce.Md,
|
|
1606
|
-
placeholderColor:
|
|
1606
|
+
placeholderColor: P.TextTertiary
|
|
1607
1607
|
}, Ee = q.forwardRef(
|
|
1608
1608
|
(r, t) => {
|
|
1609
1609
|
const {
|
|
@@ -1630,7 +1630,7 @@ const Pl = {
|
|
|
1630
1630
|
"gloss-preset-input",
|
|
1631
1631
|
`gloss-preset-input--${v}`,
|
|
1632
1632
|
`gloss-preset-input--${n}`
|
|
1633
|
-
].filter(Boolean).join(" "),
|
|
1633
|
+
].filter(Boolean).join(" "), T = c && !!y.value, w = typeof y.value == "string" ? y.value.length : 0, k = y.maxLength, I = m && k != null, g = /* @__PURE__ */ e(
|
|
1634
1634
|
Ps,
|
|
1635
1635
|
{
|
|
1636
1636
|
ref: t,
|
|
@@ -1642,12 +1642,12 @@ const Pl = {
|
|
|
1642
1642
|
...x
|
|
1643
1643
|
}
|
|
1644
1644
|
);
|
|
1645
|
-
if (!
|
|
1645
|
+
if (!T && !f && !b && !I) return g;
|
|
1646
1646
|
const E = k ? w / k : 0, _ = E >= 1 ? "over" : E >= 0.8 ? "warn" : "ok";
|
|
1647
1647
|
return /* @__PURE__ */ d("div", { className: "gloss-preset-input__field-wrapper", children: [
|
|
1648
1648
|
f && /* @__PURE__ */ e("span", { className: "gloss-preset-input__icon gloss-preset-input__icon--left", children: f }),
|
|
1649
1649
|
g,
|
|
1650
|
-
|
|
1650
|
+
T && /* @__PURE__ */ e(
|
|
1651
1651
|
"button",
|
|
1652
1652
|
{
|
|
1653
1653
|
type: "button",
|
|
@@ -1661,8 +1661,8 @@ const Pl = {
|
|
|
1661
1661
|
] })
|
|
1662
1662
|
}
|
|
1663
1663
|
),
|
|
1664
|
-
b && !
|
|
1665
|
-
|
|
1664
|
+
b && !T && /* @__PURE__ */ e("span", { className: "gloss-preset-input__icon gloss-preset-input__icon--right", children: b }),
|
|
1665
|
+
I && /* @__PURE__ */ d("span", { className: `gloss-preset-input__counter gloss-preset-input__counter--${_}`, children: [
|
|
1666
1666
|
w,
|
|
1667
1667
|
"/",
|
|
1668
1668
|
k
|
|
@@ -1672,9 +1672,9 @@ const Pl = {
|
|
|
1672
1672
|
);
|
|
1673
1673
|
Ee.displayName = "PresetInput";
|
|
1674
1674
|
const Al = {
|
|
1675
|
-
default: { borderColor:
|
|
1676
|
-
error: { borderColor:
|
|
1677
|
-
success: { borderColor:
|
|
1675
|
+
default: { borderColor: P.BorderDefault },
|
|
1676
|
+
error: { borderColor: P.BorderError },
|
|
1677
|
+
success: { borderColor: P.BorderSuccess }
|
|
1678
1678
|
}, zl = {
|
|
1679
1679
|
xs: { padding: J.Xs, paddingX: J.Sm, fontSize: "0.75rem", minHeight: "60px" },
|
|
1680
1680
|
sm: { padding: J.Xs, paddingX: J.Sm, fontSize: "0.8125rem", minHeight: "72px" },
|
|
@@ -1682,10 +1682,10 @@ const Al = {
|
|
|
1682
1682
|
lg: { padding: J.Sm, paddingX: J.Md, fontSize: "0.9375rem", minHeight: "96px" },
|
|
1683
1683
|
xl: { padding: J.Md, paddingX: J.Lg, fontSize: "1rem", minHeight: "108px" }
|
|
1684
1684
|
}, $l = {
|
|
1685
|
-
bg:
|
|
1686
|
-
color:
|
|
1685
|
+
bg: P.BgSurface,
|
|
1686
|
+
color: P.TextPrimary,
|
|
1687
1687
|
radius: Ce.Md,
|
|
1688
|
-
placeholderColor:
|
|
1688
|
+
placeholderColor: P.TextTertiary,
|
|
1689
1689
|
resize: "vertical"
|
|
1690
1690
|
}, hn = q.forwardRef(
|
|
1691
1691
|
(r, t) => {
|
|
@@ -1716,16 +1716,16 @@ const Al = {
|
|
|
1716
1716
|
"gloss-preset-textarea",
|
|
1717
1717
|
`gloss-preset-textarea--${v}`,
|
|
1718
1718
|
`gloss-preset-textarea--${n}`
|
|
1719
|
-
].filter(Boolean).join(" "),
|
|
1719
|
+
].filter(Boolean).join(" "), T = le(null), w = S((g) => {
|
|
1720
1720
|
if (!g || !p) return;
|
|
1721
1721
|
g.style.height = "auto";
|
|
1722
|
-
const E = getComputedStyle(g), _ = parseFloat(E.lineHeight) || parseFloat(E.fontSize) * 1.2, D = parseFloat(E.paddingTop) || 0, N = parseFloat(E.paddingBottom) || 0, R = parseFloat(E.borderTopWidth) || 0, A = parseFloat(E.borderBottomWidth) || 0,
|
|
1722
|
+
const E = getComputedStyle(g), _ = parseFloat(E.lineHeight) || parseFloat(E.fontSize) * 1.2, D = parseFloat(E.paddingTop) || 0, N = parseFloat(E.paddingBottom) || 0, R = parseFloat(E.borderTopWidth) || 0, A = parseFloat(E.borderBottomWidth) || 0, F = D + N + R + A, M = m ? _ * m + F : 0, W = f ? _ * f + F : 1 / 0, U = Math.min(Math.max(g.scrollHeight, M), W);
|
|
1723
1723
|
g.style.height = `${U}px`;
|
|
1724
1724
|
}, [p, m, f]), k = S((g) => {
|
|
1725
|
-
|
|
1726
|
-
}, [t, w]),
|
|
1725
|
+
T.current = g, typeof t == "function" ? t(g) : t && (t.current = g), w(g);
|
|
1726
|
+
}, [t, w]), I = x.onChange;
|
|
1727
1727
|
return p && (x.onChange = (g) => {
|
|
1728
|
-
|
|
1728
|
+
I?.(g), w(g.target);
|
|
1729
1729
|
}), /* @__PURE__ */ e(
|
|
1730
1730
|
Bs,
|
|
1731
1731
|
{
|
|
@@ -1749,9 +1749,9 @@ const Fl = {
|
|
|
1749
1749
|
lg: { padding: J.Lg, fontSize: "1rem", minHeight: "40px" },
|
|
1750
1750
|
xl: { padding: J.Xl, fontSize: "1.125rem", minHeight: "44px" }
|
|
1751
1751
|
}, Ol = {
|
|
1752
|
-
default:
|
|
1753
|
-
error:
|
|
1754
|
-
success:
|
|
1752
|
+
default: P.BorderDefault,
|
|
1753
|
+
error: P.BorderError,
|
|
1754
|
+
success: P.BorderSuccess
|
|
1755
1755
|
}, Ll = q.forwardRef(
|
|
1756
1756
|
(r, t) => {
|
|
1757
1757
|
const {
|
|
@@ -1771,33 +1771,33 @@ const Fl = {
|
|
|
1771
1771
|
placeholder: x,
|
|
1772
1772
|
showStepper: v = !0,
|
|
1773
1773
|
formatValue: h
|
|
1774
|
-
} = r, [C,
|
|
1775
|
-
let
|
|
1776
|
-
return c !== void 0 && (
|
|
1774
|
+
} = r, [C, T] = L(i), w = s !== void 0, k = w ? s : C, I = S((M) => {
|
|
1775
|
+
let W = M;
|
|
1776
|
+
return c !== void 0 && (W = Math.max(c, W)), l !== void 0 && (W = Math.min(l, W)), !y && W < 0 && (W = 0), p !== void 0 && (W = parseFloat(W.toFixed(p))), W;
|
|
1777
1777
|
}, [c, l, y, p]), g = S((M) => {
|
|
1778
|
-
const
|
|
1779
|
-
w ||
|
|
1780
|
-
}, [
|
|
1781
|
-
const
|
|
1782
|
-
if (
|
|
1783
|
-
const U = parseFloat(
|
|
1778
|
+
const W = I(M);
|
|
1779
|
+
w || T(W), o?.(W);
|
|
1780
|
+
}, [I, w, o]), E = S((M) => {
|
|
1781
|
+
const W = M.target.value;
|
|
1782
|
+
if (W === "" || W === "-") return;
|
|
1783
|
+
const U = parseFloat(W);
|
|
1784
1784
|
isNaN(U) || g(U);
|
|
1785
1785
|
}, [g]), _ = S((M) => {
|
|
1786
1786
|
M.key === "ArrowUp" && (M.preventDefault(), g(k + u)), M.key === "ArrowDown" && (M.preventDefault(), g(k - u));
|
|
1787
1787
|
}, [k, u, g]), D = c !== void 0 && k <= c, N = l !== void 0 && k >= l, R = h ? h(k) : String(k), A = {
|
|
1788
|
-
bg:
|
|
1789
|
-
color:
|
|
1788
|
+
bg: P.BgSurface,
|
|
1789
|
+
color: P.TextPrimary,
|
|
1790
1790
|
borderColor: Ol[a],
|
|
1791
1791
|
radius: Ce.Md,
|
|
1792
|
-
buttonBg:
|
|
1792
|
+
buttonBg: P.BgMuted,
|
|
1793
1793
|
...Fl[n]
|
|
1794
|
-
},
|
|
1794
|
+
}, F = [
|
|
1795
1795
|
"gloss-preset-numberinput",
|
|
1796
1796
|
`gloss-preset-numberinput--${a}`,
|
|
1797
1797
|
`gloss-preset-numberinput--${n}`,
|
|
1798
1798
|
b && "gloss-preset-numberinput--disabled"
|
|
1799
1799
|
].filter(Boolean).join(" ");
|
|
1800
|
-
return /* @__PURE__ */ d("div", { className:
|
|
1800
|
+
return /* @__PURE__ */ d("div", { className: F, children: [
|
|
1801
1801
|
m && /* @__PURE__ */ e("label", { className: "gloss-preset-numberinput__label", children: m }),
|
|
1802
1802
|
/* @__PURE__ */ d(Rs, { definition: A, disabled: b, children: [
|
|
1803
1803
|
v && /* @__PURE__ */ e("button", { type: "button", onClick: () => g(k - u), disabled: b || D, "aria-label": "Decrease value", tabIndex: -1, children: /* @__PURE__ */ e(_e, { name: "minus", size: "sm" }) }),
|
|
@@ -1861,9 +1861,9 @@ const Gl = {
|
|
|
1861
1861
|
lg: { padding: J.Lg, fontSize: "1rem", minHeight: "40px" },
|
|
1862
1862
|
xl: { padding: J.Xl, fontSize: "1.125rem", minHeight: "44px" }
|
|
1863
1863
|
}, jl = {
|
|
1864
|
-
default:
|
|
1865
|
-
error:
|
|
1866
|
-
success:
|
|
1864
|
+
default: P.BorderDefault,
|
|
1865
|
+
error: P.BorderError,
|
|
1866
|
+
success: P.BorderSuccess
|
|
1867
1867
|
}, Kt = q.forwardRef(
|
|
1868
1868
|
(r, t) => {
|
|
1869
1869
|
const {
|
|
@@ -1882,11 +1882,11 @@ const Gl = {
|
|
|
1882
1882
|
required: y,
|
|
1883
1883
|
id: x,
|
|
1884
1884
|
name: v
|
|
1885
|
-
} = r, h = le(null), C = le(null),
|
|
1885
|
+
} = r, h = le(null), C = le(null), T = typeof s == "string" ? Gl[s] : s, w = S((g) => {
|
|
1886
1886
|
h.current = g, typeof t == "function" ? t(g) : t && (t.current = g);
|
|
1887
1887
|
}, [t]);
|
|
1888
1888
|
ce(() => {
|
|
1889
|
-
if (h.current &&
|
|
1889
|
+
if (h.current && T) {
|
|
1890
1890
|
let g;
|
|
1891
1891
|
try {
|
|
1892
1892
|
const _ = require("imask");
|
|
@@ -1896,7 +1896,7 @@ const Gl = {
|
|
|
1896
1896
|
}
|
|
1897
1897
|
if (typeof g != "function") return;
|
|
1898
1898
|
C.current && C.current.destroy();
|
|
1899
|
-
const E = g(h.current,
|
|
1899
|
+
const E = g(h.current, T);
|
|
1900
1900
|
return C.current = E, E.on("accept", () => {
|
|
1901
1901
|
C.current && o?.(C.current.unmaskedValue);
|
|
1902
1902
|
}), E.on("complete", () => {
|
|
@@ -1905,22 +1905,22 @@ const Gl = {
|
|
|
1905
1905
|
C.current?.destroy(), C.current = null;
|
|
1906
1906
|
};
|
|
1907
1907
|
}
|
|
1908
|
-
}, [
|
|
1908
|
+
}, [T, o, c]), ce(() => {
|
|
1909
1909
|
C.current && i !== void 0 && C.current.unmaskedValue !== i && (C.current.unmaskedValue = i);
|
|
1910
1910
|
}, [i]);
|
|
1911
1911
|
const k = {
|
|
1912
|
-
bg:
|
|
1913
|
-
color:
|
|
1912
|
+
bg: P.BgSurface,
|
|
1913
|
+
color: P.TextPrimary,
|
|
1914
1914
|
borderColor: jl[a],
|
|
1915
1915
|
radius: Ce.Md,
|
|
1916
|
-
placeholderColor:
|
|
1916
|
+
placeholderColor: P.TextTertiary,
|
|
1917
1917
|
...Vl[n]
|
|
1918
|
-
},
|
|
1918
|
+
}, I = [
|
|
1919
1919
|
"gloss-preset-maskedinput",
|
|
1920
1920
|
`gloss-preset-maskedinput--${a}`,
|
|
1921
1921
|
`gloss-preset-maskedinput--${n}`
|
|
1922
1922
|
].filter(Boolean).join(" ");
|
|
1923
|
-
return /* @__PURE__ */ e("div", { className:
|
|
1923
|
+
return /* @__PURE__ */ e("div", { className: I, children: /* @__PURE__ */ e(
|
|
1924
1924
|
As,
|
|
1925
1925
|
{
|
|
1926
1926
|
ref: w,
|
|
@@ -1941,13 +1941,13 @@ const Gl = {
|
|
|
1941
1941
|
Kt.displayName = "PresetMaskedInput";
|
|
1942
1942
|
const Kl = {
|
|
1943
1943
|
default: {
|
|
1944
|
-
borderColor:
|
|
1944
|
+
borderColor: P.BorderDefault
|
|
1945
1945
|
},
|
|
1946
1946
|
error: {
|
|
1947
|
-
borderColor:
|
|
1947
|
+
borderColor: P.BorderError
|
|
1948
1948
|
},
|
|
1949
1949
|
success: {
|
|
1950
|
-
borderColor:
|
|
1950
|
+
borderColor: P.BorderSuccess
|
|
1951
1951
|
}
|
|
1952
1952
|
}, Yl = {
|
|
1953
1953
|
xs: { padding: J.Xs, fontSize: "0.75rem", minHeight: "24px" },
|
|
@@ -1956,10 +1956,10 @@ const Kl = {
|
|
|
1956
1956
|
lg: { padding: J.Sm, fontSize: "0.9375rem", minHeight: "42px" },
|
|
1957
1957
|
xl: { padding: J.Md, fontSize: "1rem", minHeight: "48px" }
|
|
1958
1958
|
}, Ul = {
|
|
1959
|
-
bg:
|
|
1959
|
+
bg: P.BgSurface,
|
|
1960
1960
|
radius: Ce.Md
|
|
1961
1961
|
};
|
|
1962
|
-
|
|
1962
|
+
P.BgSurface, P.BorderDefault, Ce.Md, Ze.Card;
|
|
1963
1963
|
function It(r) {
|
|
1964
1964
|
const {
|
|
1965
1965
|
variant: t = "default",
|
|
@@ -1988,17 +1988,17 @@ function It(r) {
|
|
|
1988
1988
|
It.displayName = "PresetSelect";
|
|
1989
1989
|
const Xl = Ut("md"), ql = {
|
|
1990
1990
|
elevated: {
|
|
1991
|
-
bg:
|
|
1991
|
+
bg: P.BgSurface,
|
|
1992
1992
|
border: "none",
|
|
1993
1993
|
elevation: Ze.Card
|
|
1994
1994
|
},
|
|
1995
1995
|
outlined: {
|
|
1996
|
-
bg:
|
|
1997
|
-
border: `1px solid ${
|
|
1996
|
+
bg: P.BgSurface,
|
|
1997
|
+
border: `1px solid ${P.BorderDefault}`,
|
|
1998
1998
|
elevation: "none"
|
|
1999
1999
|
},
|
|
2000
2000
|
filled: {
|
|
2001
|
-
bg:
|
|
2001
|
+
bg: P.BgMuted,
|
|
2002
2002
|
border: "none",
|
|
2003
2003
|
elevation: "none"
|
|
2004
2004
|
}
|
|
@@ -2079,19 +2079,19 @@ const sc = q.forwardRef(
|
|
|
2079
2079
|
);
|
|
2080
2080
|
sc.displayName = "PresetCardActions";
|
|
2081
2081
|
const oc = {
|
|
2082
|
-
default: { bg:
|
|
2083
|
-
primary: { bg:
|
|
2084
|
-
success: { bg:
|
|
2085
|
-
warning: { bg:
|
|
2086
|
-
error: { bg:
|
|
2087
|
-
info: { bg:
|
|
2082
|
+
default: { bg: P.Gray100, color: P.Gray700 },
|
|
2083
|
+
primary: { bg: P.Blue100, color: P.Blue700 },
|
|
2084
|
+
success: { bg: P.Green100, color: P.Green700 },
|
|
2085
|
+
warning: { bg: P.Amber100, color: P.Amber600 },
|
|
2086
|
+
error: { bg: P.Red100, color: P.Red700 },
|
|
2087
|
+
info: { bg: P.Blue50, color: P.Blue600 }
|
|
2088
2088
|
}, ic = {
|
|
2089
|
-
default: { bg:
|
|
2090
|
-
primary: { bg:
|
|
2091
|
-
success: { bg:
|
|
2092
|
-
warning: { bg:
|
|
2093
|
-
error: { bg:
|
|
2094
|
-
info: { bg:
|
|
2089
|
+
default: { bg: P.Gray50 },
|
|
2090
|
+
primary: { bg: P.Blue50 },
|
|
2091
|
+
success: { bg: P.Green50 },
|
|
2092
|
+
warning: { bg: P.Amber200 },
|
|
2093
|
+
error: { bg: P.Red50 },
|
|
2094
|
+
info: { bg: P.Blue50 }
|
|
2095
2095
|
}, lc = {
|
|
2096
2096
|
xs: { fontSize: "0.625rem", padding: "1px", paddingX: "4px" },
|
|
2097
2097
|
sm: { fontSize: "0.6875rem", padding: "2px", paddingX: "6px" },
|
|
@@ -2129,25 +2129,25 @@ const oc = {
|
|
|
2129
2129
|
yn.displayName = "PresetBadge";
|
|
2130
2130
|
const cc = {
|
|
2131
2131
|
filled: {
|
|
2132
|
-
default: { bg:
|
|
2133
|
-
primary: { bg:
|
|
2134
|
-
success: { bg:
|
|
2135
|
-
warning: { bg:
|
|
2136
|
-
error: { bg:
|
|
2132
|
+
default: { bg: P.Gray100, color: P.Gray700 },
|
|
2133
|
+
primary: { bg: P.Blue100, color: P.Blue700 },
|
|
2134
|
+
success: { bg: P.Green100, color: P.Green700 },
|
|
2135
|
+
warning: { bg: P.Amber100, color: P.Amber600 },
|
|
2136
|
+
error: { bg: P.Red100, color: P.Red700 }
|
|
2137
2137
|
},
|
|
2138
2138
|
outlined: {
|
|
2139
|
-
default: { bg: "transparent", borderColor:
|
|
2140
|
-
primary: { bg: "transparent", borderColor:
|
|
2141
|
-
success: { bg: "transparent", borderColor:
|
|
2142
|
-
warning: { bg: "transparent", borderColor:
|
|
2143
|
-
error: { bg: "transparent", borderColor:
|
|
2139
|
+
default: { bg: "transparent", borderColor: P.Gray300, color: P.Gray700 },
|
|
2140
|
+
primary: { bg: "transparent", borderColor: P.Blue300, color: P.Blue700 },
|
|
2141
|
+
success: { bg: "transparent", borderColor: P.Green500, color: P.Green700 },
|
|
2142
|
+
warning: { bg: "transparent", borderColor: P.Amber500, color: P.Amber600 },
|
|
2143
|
+
error: { bg: "transparent", borderColor: P.Red400, color: P.Red700 }
|
|
2144
2144
|
},
|
|
2145
2145
|
soft: {
|
|
2146
|
-
default: { bg:
|
|
2147
|
-
primary: { bg:
|
|
2148
|
-
success: { bg:
|
|
2149
|
-
warning: { bg:
|
|
2150
|
-
error: { bg:
|
|
2146
|
+
default: { bg: P.Gray50, color: P.Gray700 },
|
|
2147
|
+
primary: { bg: P.Blue50, color: P.Blue700 },
|
|
2148
|
+
success: { bg: P.Green50, color: P.Green700 },
|
|
2149
|
+
warning: { bg: P.Amber200, color: P.Amber600 },
|
|
2150
|
+
error: { bg: P.Red50, color: P.Red700 }
|
|
2151
2151
|
}
|
|
2152
2152
|
}, dc = {
|
|
2153
2153
|
xs: { fontSize: "0.6875rem", padding: "2px", paddingX: "6px" },
|
|
@@ -2230,7 +2230,7 @@ const cc = {
|
|
|
2230
2230
|
);
|
|
2231
2231
|
Ur.displayName = "PresetChip";
|
|
2232
2232
|
const uc = {
|
|
2233
|
-
borderColor:
|
|
2233
|
+
borderColor: P.BorderDefault,
|
|
2234
2234
|
radius: Ce.None
|
|
2235
2235
|
}, mc = q.forwardRef(
|
|
2236
2236
|
({ children: r, ...t }, a) => {
|
|
@@ -2264,8 +2264,8 @@ const hc = {
|
|
|
2264
2264
|
sm: { padding: J.Xs, minWidth: "140px" },
|
|
2265
2265
|
md: { padding: J.Sm, minWidth: "180px" }
|
|
2266
2266
|
}, bc = {
|
|
2267
|
-
bg:
|
|
2268
|
-
borderColor:
|
|
2267
|
+
bg: P.BgSurface,
|
|
2268
|
+
borderColor: P.BorderDefault,
|
|
2269
2269
|
radius: Ce.Md,
|
|
2270
2270
|
elevation: Ze.Card
|
|
2271
2271
|
}, yc = q.forwardRef(
|
|
@@ -2314,7 +2314,7 @@ function vc({ label: r, open: t, onOpenChange: a, showCount: n = "never", childr
|
|
|
2314
2314
|
vc.displayName = "PresetMenuGroup";
|
|
2315
2315
|
const _c = {
|
|
2316
2316
|
padding: J.Sm,
|
|
2317
|
-
hoverBg:
|
|
2317
|
+
hoverBg: P.BgHover
|
|
2318
2318
|
}, xc = q.forwardRef(
|
|
2319
2319
|
({ disabled: r, active: t, as: a, icon: n, children: s, ...i }, o) => {
|
|
2320
2320
|
const c = { ...i };
|
|
@@ -2547,34 +2547,34 @@ function Cc({
|
|
|
2547
2547
|
...m
|
|
2548
2548
|
}) {
|
|
2549
2549
|
delete m.className, delete m.style;
|
|
2550
|
-
const [f, b] = L(r ? "entered" : "exited"), [y, x] = L(r), v = le(null), h = le(null), C = typeof t == "string" ? Ir[t] : t,
|
|
2550
|
+
const [f, b] = L(r ? "entered" : "exited"), [y, x] = L(r), v = le(null), h = le(null), C = typeof t == "string" ? Ir[t] : t, T = a ?? (typeof t == "string" ? Ir[t]?.duration : Qe.normal) ?? Qe.normal, w = n ?? (typeof t == "string" ? Ir[t]?.easing : et.easeOut) ?? et.easeOut, k = S(() => {
|
|
2551
2551
|
v.current && (clearTimeout(v.current), v.current = null), h.current && (cancelAnimationFrame(h.current), h.current = null);
|
|
2552
2552
|
}, []);
|
|
2553
2553
|
if (ce(() => (k(), r ? (x(!0), o?.(), h.current = requestAnimationFrame(() => {
|
|
2554
2554
|
b("entering"), v.current = setTimeout(() => {
|
|
2555
2555
|
b("entered"), c?.();
|
|
2556
|
-
},
|
|
2556
|
+
}, T + s);
|
|
2557
2557
|
})) : (l?.(), b("exiting"), v.current = setTimeout(() => {
|
|
2558
2558
|
b("exited"), i && x(!1), u?.();
|
|
2559
|
-
},
|
|
2560
|
-
let
|
|
2559
|
+
}, T + s)), k), [r, T, s, i, o, c, l, u, k]), !y) return null;
|
|
2560
|
+
let I = {};
|
|
2561
2561
|
switch (f) {
|
|
2562
2562
|
case "entering":
|
|
2563
|
-
|
|
2563
|
+
I = { ...C.enter.to, transition: `all ${T}ms ${w}`, transitionDelay: s > 0 ? `${s}ms` : void 0 };
|
|
2564
2564
|
break;
|
|
2565
2565
|
case "entered":
|
|
2566
|
-
|
|
2566
|
+
I = C.enter.to;
|
|
2567
2567
|
break;
|
|
2568
2568
|
case "exiting":
|
|
2569
|
-
|
|
2569
|
+
I = { ...C.exit.to, transition: `all ${T}ms ${w}`, transitionDelay: s > 0 ? `${s}ms` : void 0 };
|
|
2570
2570
|
break;
|
|
2571
2571
|
case "exited":
|
|
2572
|
-
|
|
2572
|
+
I = C.exit.to;
|
|
2573
2573
|
break;
|
|
2574
2574
|
}
|
|
2575
2575
|
const { style: g } = p.props;
|
|
2576
2576
|
return q.cloneElement(p, {
|
|
2577
|
-
style: { ...g, ...
|
|
2577
|
+
style: { ...g, ...I },
|
|
2578
2578
|
"data-state": f
|
|
2579
2579
|
});
|
|
2580
2580
|
}
|
|
@@ -2618,7 +2618,7 @@ function Dc(r) {
|
|
|
2618
2618
|
}
|
|
2619
2619
|
},
|
|
2620
2620
|
[u, s, h]
|
|
2621
|
-
),
|
|
2621
|
+
), T = S((_, D) => {
|
|
2622
2622
|
f((N) => ({ ...N, [_]: D }));
|
|
2623
2623
|
}, []), w = S(
|
|
2624
2624
|
async (_, D = !0) => {
|
|
@@ -2638,7 +2638,7 @@ function Dc(r) {
|
|
|
2638
2638
|
touched: b[_] ?? !1
|
|
2639
2639
|
}),
|
|
2640
2640
|
[u, m, b, C, w]
|
|
2641
|
-
),
|
|
2641
|
+
), I = te(() => Object.keys(m).length === 0, [m]), g = S(
|
|
2642
2642
|
async (_) => {
|
|
2643
2643
|
o && _.preventDefault();
|
|
2644
2644
|
const D = Object.keys(u).reduce((R, A) => ({ ...R, [A]: !0 }), {});
|
|
@@ -2655,8 +2655,8 @@ function Dc(r) {
|
|
|
2655
2655
|
},
|
|
2656
2656
|
[o, u, h, n]
|
|
2657
2657
|
), E = te(
|
|
2658
|
-
() => ({ values: u, errors: m, touched: b, isSubmitting: x, isValid:
|
|
2659
|
-
[u, m, b, x,
|
|
2658
|
+
() => ({ values: u, errors: m, touched: b, isSubmitting: x, isValid: I, setFieldValue: C, setFieldError: T, setFieldTouched: w, getFieldProps: k }),
|
|
2659
|
+
[u, m, b, x, I, C, T, w, k]
|
|
2660
2660
|
);
|
|
2661
2661
|
return /* @__PURE__ */ e(_n.Provider, { value: E, children: /* @__PURE__ */ e("form", { onSubmit: g, className: "gloss-preset-form", noValidate: !0, children: typeof c == "function" ? c(E) : c }) });
|
|
2662
2662
|
}
|
|
@@ -2675,7 +2675,7 @@ function Ic({
|
|
|
2675
2675
|
const l = kc(), u = Oe(), p = `field-${r}-${u}`, m = `helper-${r}-${u}`, f = `error-${r}-${u}`, { value: b, error: y, touched: x } = te(() => {
|
|
2676
2676
|
const g = l.getFieldProps(r);
|
|
2677
2677
|
return { value: g.value, error: g.error, touched: g.touched };
|
|
2678
|
-
}, [l, r]), v = x && y, h = v ? "error" : "default", C = o.props.onBlur,
|
|
2678
|
+
}, [l, r]), v = x && y, h = v ? "error" : "default", C = o.props.onBlur, T = q.cloneElement(o, {
|
|
2679
2679
|
id: p,
|
|
2680
2680
|
name: r,
|
|
2681
2681
|
value: b ?? "",
|
|
@@ -2698,14 +2698,14 @@ function Ic({
|
|
|
2698
2698
|
"gloss-preset-form-field",
|
|
2699
2699
|
`gloss-form-field--label-${s}`,
|
|
2700
2700
|
v && "gloss-form-field--error"
|
|
2701
|
-
].filter(Boolean).join(" "),
|
|
2701
|
+
].filter(Boolean).join(" "), I = t && /* @__PURE__ */ d("label", { htmlFor: p, className: w, children: [
|
|
2702
2702
|
t,
|
|
2703
2703
|
n && /* @__PURE__ */ e("span", { className: "gloss-form-field__required", "aria-hidden": "true", children: "*" })
|
|
2704
2704
|
] });
|
|
2705
2705
|
return /* @__PURE__ */ d("div", { className: k, children: [
|
|
2706
|
-
s !== "right" &&
|
|
2707
|
-
/* @__PURE__ */ e("div", { className: "gloss-form-field__control", children:
|
|
2708
|
-
s === "right" &&
|
|
2706
|
+
s !== "right" && I,
|
|
2707
|
+
/* @__PURE__ */ e("div", { className: "gloss-form-field__control", children: T }),
|
|
2708
|
+
s === "right" && I,
|
|
2709
2709
|
(a || v) && /* @__PURE__ */ d("div", { className: "gloss-form-field__footer", children: [
|
|
2710
2710
|
a && !v && /* @__PURE__ */ e("div", { id: m, className: "gloss-form-field__helper", children: a }),
|
|
2711
2711
|
v && /* @__PURE__ */ e("div", { id: f, className: "gloss-form-field__error", role: "alert", children: y })
|
|
@@ -2764,9 +2764,9 @@ const dr = q.memo(({
|
|
|
2764
2764
|
connectorActive: o
|
|
2765
2765
|
}) => {
|
|
2766
2766
|
const c = le(null), l = le({}), [u, p] = L(null), [m, f] = L({ left: 0, width: 0 }), [b, y] = L({ left: 0, width: 0 }), x = (h) => {
|
|
2767
|
-
const C = l.current[h],
|
|
2768
|
-
if (!C || !
|
|
2769
|
-
const w = C.getBoundingClientRect(), k =
|
|
2767
|
+
const C = l.current[h], T = c.current;
|
|
2768
|
+
if (!C || !T) return { left: 0, width: 0 };
|
|
2769
|
+
const w = C.getBoundingClientRect(), k = T.getBoundingClientRect();
|
|
2770
2770
|
return { left: w.left - k.left, width: w.width };
|
|
2771
2771
|
};
|
|
2772
2772
|
ce(() => {
|
|
@@ -3552,7 +3552,7 @@ const Tr = {
|
|
|
3552
3552
|
colSpan: l = 1,
|
|
3553
3553
|
isStale: u,
|
|
3554
3554
|
thresholdBreach: p = "none"
|
|
3555
|
-
} = t, m = a === "sparkline" || a === "bars" || a === "donut" ? t.accentColor ?? "#4f46e5" : "#4f46e5", f = a === "highlight" ? t.highlightColor : void 0, b = a === "sparkline" ? t.sparklineData : void 0, y = a === "bars" ? t.barData : void 0, x = a === "donut" ? t.donutValue : 0, v = a === "donut" ? t.donutMax ?? 100 : 100, h = a === "object-arrow" ? t.objectArrowValue : 0, C = a === "object-arrow" ? t.objectArrowMax : 100,
|
|
3555
|
+
} = t, m = a === "sparkline" || a === "bars" || a === "donut" ? t.accentColor ?? "#4f46e5" : "#4f46e5", f = a === "highlight" ? t.highlightColor : void 0, b = a === "sparkline" ? t.sparklineData : void 0, y = a === "bars" ? t.barData : void 0, x = a === "donut" ? t.donutValue : 0, v = a === "donut" ? t.donutMax ?? 100 : 100, h = a === "object-arrow" ? t.objectArrowValue : 0, C = a === "object-arrow" ? t.objectArrowMax : 100, T = a === "arrow" ? t.arrowDirection : void 0, w = a === "versus" ? t.versusData : void 0, k = a === "segmented" ? t.segments : void 0, g = (a === "highlight" && t.tintCondition ? Rc(
|
|
3556
3556
|
typeof t.value == "number" ? t.value : null,
|
|
3557
3557
|
t.tintCondition
|
|
3558
3558
|
) : void 0) ?? f, E = (g ? Ac[g] : void 0) || g, _ = te(() => lr(s, {
|
|
@@ -3565,7 +3565,7 @@ const Tr = {
|
|
|
3565
3565
|
color: a === "highlight" ? E : "rgba(0,0,0,0.87)",
|
|
3566
3566
|
fontSize: D,
|
|
3567
3567
|
lineHeight: 1.1
|
|
3568
|
-
},
|
|
3568
|
+
}, F = {
|
|
3569
3569
|
fontSize: 10.5,
|
|
3570
3570
|
color: "rgba(0,0,0,0.35)",
|
|
3571
3571
|
overflow: "hidden",
|
|
@@ -3573,8 +3573,8 @@ const Tr = {
|
|
|
3573
3573
|
whiteSpace: "nowrap",
|
|
3574
3574
|
flex: 1,
|
|
3575
3575
|
minWidth: 0
|
|
3576
|
-
}, M = a === "sparkline" || a === "bars",
|
|
3577
|
-
...
|
|
3576
|
+
}, M = a === "sparkline" || a === "bars", W = M && c ? {
|
|
3577
|
+
...F,
|
|
3578
3578
|
backgroundColor: "rgba(255,255,255,0.78)",
|
|
3579
3579
|
backdropFilter: "blur(4px)",
|
|
3580
3580
|
WebkitBackdropFilter: "blur(4px)",
|
|
@@ -3583,8 +3583,8 @@ const Tr = {
|
|
|
3583
3583
|
color: "rgba(0,0,0,0.5)",
|
|
3584
3584
|
flex: "none",
|
|
3585
3585
|
minWidth: void 0
|
|
3586
|
-
} :
|
|
3587
|
-
const
|
|
3586
|
+
} : F, U = () => {
|
|
3587
|
+
const V = T === "down" ? "▼" : "▲";
|
|
3588
3588
|
return /* @__PURE__ */ e(
|
|
3589
3589
|
"div",
|
|
3590
3590
|
{
|
|
@@ -3600,12 +3600,12 @@ const Tr = {
|
|
|
3600
3600
|
flexShrink: 0,
|
|
3601
3601
|
marginRight: 6
|
|
3602
3602
|
},
|
|
3603
|
-
children: /* @__PURE__ */ e("span", { style: { fontSize: 10, color: m, lineHeight: 1 }, children:
|
|
3603
|
+
children: /* @__PURE__ */ e("span", { style: { fontSize: 10, color: m, lineHeight: 1 }, children: V })
|
|
3604
3604
|
}
|
|
3605
3605
|
);
|
|
3606
|
-
},
|
|
3606
|
+
}, j = () => {
|
|
3607
3607
|
if (!w) return null;
|
|
3608
|
-
const
|
|
3608
|
+
const V = lr(w.current, {
|
|
3609
3609
|
prefix: i?.prefix || "",
|
|
3610
3610
|
suffix: i?.suffix || "",
|
|
3611
3611
|
abbreviated: i?.abbreviated
|
|
@@ -3613,7 +3613,7 @@ const Tr = {
|
|
|
3613
3613
|
prefix: i?.prefix || "",
|
|
3614
3614
|
suffix: i?.suffix || "",
|
|
3615
3615
|
abbreviated: i?.abbreviated
|
|
3616
|
-
}), z = _a(
|
|
3616
|
+
}), z = _a(V.length, l), Y = Math.max(z - 4, 14);
|
|
3617
3617
|
return /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: 12, flex: 1 }, children: [
|
|
3618
3618
|
/* @__PURE__ */ d("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
3619
3619
|
/* @__PURE__ */ e(
|
|
@@ -3626,8 +3626,8 @@ const Tr = {
|
|
|
3626
3626
|
color: "rgba(0,0,0,0.87)",
|
|
3627
3627
|
lineHeight: 1.1
|
|
3628
3628
|
},
|
|
3629
|
-
title:
|
|
3630
|
-
children:
|
|
3629
|
+
title: V.full,
|
|
3630
|
+
children: V.display
|
|
3631
3631
|
}
|
|
3632
3632
|
),
|
|
3633
3633
|
/* @__PURE__ */ e("span", { style: { fontSize: 10, color: "rgba(0,0,0,0.35)", marginTop: 2 }, children: w.currentLabel })
|
|
@@ -3657,7 +3657,7 @@ const Tr = {
|
|
|
3657
3657
|
/* @__PURE__ */ e("span", { style: { fontSize: 10, color: "rgba(0,0,0,0.35)", marginTop: 2 }, children: w.priorLabel })
|
|
3658
3658
|
] })
|
|
3659
3659
|
] });
|
|
3660
|
-
},
|
|
3660
|
+
}, B = () => !k || k.length === 0 ? null : /* @__PURE__ */ d("div", { style: { zIndex: 2, position: "relative" }, children: [
|
|
3661
3661
|
/* @__PURE__ */ e(
|
|
3662
3662
|
"div",
|
|
3663
3663
|
{
|
|
@@ -3668,12 +3668,12 @@ const Tr = {
|
|
|
3668
3668
|
gap: 1,
|
|
3669
3669
|
overflow: "hidden"
|
|
3670
3670
|
},
|
|
3671
|
-
children: k.map((
|
|
3671
|
+
children: k.map((V, G) => /* @__PURE__ */ e(
|
|
3672
3672
|
"div",
|
|
3673
3673
|
{
|
|
3674
3674
|
style: {
|
|
3675
|
-
flex:
|
|
3676
|
-
backgroundColor:
|
|
3675
|
+
flex: V.value,
|
|
3676
|
+
backgroundColor: V.color,
|
|
3677
3677
|
minWidth: 2
|
|
3678
3678
|
}
|
|
3679
3679
|
},
|
|
@@ -3690,7 +3690,7 @@ const Tr = {
|
|
|
3690
3690
|
flexWrap: "wrap",
|
|
3691
3691
|
marginTop: 4
|
|
3692
3692
|
},
|
|
3693
|
-
children: k.map((
|
|
3693
|
+
children: k.map((V, G) => /* @__PURE__ */ d(
|
|
3694
3694
|
"div",
|
|
3695
3695
|
{
|
|
3696
3696
|
style: {
|
|
@@ -3706,26 +3706,26 @@ const Tr = {
|
|
|
3706
3706
|
width: 6,
|
|
3707
3707
|
height: 6,
|
|
3708
3708
|
borderRadius: "50%",
|
|
3709
|
-
backgroundColor:
|
|
3709
|
+
backgroundColor: V.color,
|
|
3710
3710
|
flexShrink: 0
|
|
3711
3711
|
}
|
|
3712
3712
|
}
|
|
3713
3713
|
),
|
|
3714
|
-
/* @__PURE__ */ e("span", { style: { fontSize: 10, color: "rgba(0,0,0,0.5)" }, children:
|
|
3714
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 10, color: "rgba(0,0,0,0.5)" }, children: V.label })
|
|
3715
3715
|
]
|
|
3716
3716
|
},
|
|
3717
3717
|
G
|
|
3718
3718
|
))
|
|
3719
3719
|
}
|
|
3720
3720
|
)
|
|
3721
|
-
] }),
|
|
3721
|
+
] }), H = [
|
|
3722
3722
|
"gloss-threshold-overlay",
|
|
3723
3723
|
p === "warn" ? "gloss-threshold-warn" : "",
|
|
3724
3724
|
p === "critical" ? "gloss-threshold-critical" : "",
|
|
3725
3725
|
p === "critical" ? "gloss-threshold-pulse" : ""
|
|
3726
3726
|
].filter(Boolean).join(" ");
|
|
3727
3727
|
return /* @__PURE__ */ d(Ve, { children: [
|
|
3728
|
-
p !== "none" && /* @__PURE__ */ e("div", { className:
|
|
3728
|
+
p !== "none" && /* @__PURE__ */ e("div", { className: H }),
|
|
3729
3729
|
p === "warn" && /* @__PURE__ */ e("span", { className: "gloss-threshold-icon gloss-threshold-icon--warn", children: /* @__PURE__ */ e(zc, {}) }),
|
|
3730
3730
|
p === "critical" && /* @__PURE__ */ e("span", { className: "gloss-threshold-icon gloss-threshold-icon--critical", children: /* @__PURE__ */ e($c, {}) }),
|
|
3731
3731
|
a === "highlight" && E && /* @__PURE__ */ e(
|
|
@@ -3773,7 +3773,7 @@ const Tr = {
|
|
|
3773
3773
|
),
|
|
3774
3774
|
a === "arrow" && U(),
|
|
3775
3775
|
a !== "versus" && a !== "segmented" && /* @__PURE__ */ e("span", { style: A, title: _.full, children: _.display }),
|
|
3776
|
-
a === "versus" &&
|
|
3776
|
+
a === "versus" && j(),
|
|
3777
3777
|
a === "segmented" && /* @__PURE__ */ e("span", { style: A, title: _.full, children: _.display })
|
|
3778
3778
|
]
|
|
3779
3779
|
}
|
|
@@ -3785,7 +3785,7 @@ const Tr = {
|
|
|
3785
3785
|
className: `gloss-metric-card__zone-c ${R}`,
|
|
3786
3786
|
style: { minHeight: 18, flexShrink: 0, zIndex: 2, position: "relative" },
|
|
3787
3787
|
children: [
|
|
3788
|
-
/* @__PURE__ */ e("span", { style:
|
|
3788
|
+
/* @__PURE__ */ e("span", { style: W, children: c }),
|
|
3789
3789
|
M && o?.value != null ? /* @__PURE__ */ e("span", { style: {
|
|
3790
3790
|
backgroundColor: "rgba(255,255,255,0.78)",
|
|
3791
3791
|
backdropFilter: "blur(4px)",
|
|
@@ -3797,7 +3797,7 @@ const Tr = {
|
|
|
3797
3797
|
]
|
|
3798
3798
|
}
|
|
3799
3799
|
),
|
|
3800
|
-
a === "segmented" &&
|
|
3800
|
+
a === "segmented" && B()
|
|
3801
3801
|
] });
|
|
3802
3802
|
};
|
|
3803
3803
|
st.displayName = "MetricCard";
|
|
@@ -3992,11 +3992,11 @@ const Dn = (r) => {
|
|
|
3992
3992
|
ce(() => {
|
|
3993
3993
|
n && !h && C(!0);
|
|
3994
3994
|
}, [n, h]);
|
|
3995
|
-
const { menuId:
|
|
3995
|
+
const { menuId: T } = Oc(
|
|
3996
3996
|
s,
|
|
3997
3997
|
p,
|
|
3998
3998
|
i
|
|
3999
|
-
), k = Jo() === !0,
|
|
3999
|
+
), k = Jo() === !0, I = te(() => Lc(k), [k]), g = te(() => Hc(k), [k]), E = te(() => Wc(k), [k]), _ = te(
|
|
4000
4000
|
() => Gc(k),
|
|
4001
4001
|
[k]
|
|
4002
4002
|
), D = te(
|
|
@@ -4005,22 +4005,22 @@ const Dn = (r) => {
|
|
|
4005
4005
|
), N = te(
|
|
4006
4006
|
() => za(a, m),
|
|
4007
4007
|
[a, m]
|
|
4008
|
-
), R = Math.max(0, 5 - D.length - 1), A = te(() => N.filter((ae) => ae.isPromotable).sort((ae, Ne) => ae.order - Ne.order).slice(0, R), [N, R]),
|
|
4008
|
+
), R = Math.max(0, 5 - D.length - 1), A = te(() => N.filter((ae) => ae.isPromotable).sort((ae, Ne) => ae.order - Ne.order).slice(0, R), [N, R]), F = te(() => {
|
|
4009
4009
|
const ae = new Set(A.map((Ne) => Ne.id));
|
|
4010
4010
|
return N.filter((Ne) => !ae.has(Ne.id)).sort((Ne, Le) => Ne.order - Le.order);
|
|
4011
4011
|
}, [N, A]), M = te(
|
|
4012
4012
|
() => jc(N, R),
|
|
4013
4013
|
[N, R]
|
|
4014
|
-
),
|
|
4014
|
+
), W = y && s, [U, j] = L(!1);
|
|
4015
4015
|
ce(() => {
|
|
4016
|
-
s ||
|
|
4016
|
+
s || j(!1);
|
|
4017
4017
|
}, [s]);
|
|
4018
|
-
const
|
|
4019
|
-
open:
|
|
4018
|
+
const B = u === "up" ? "top-start" : "bottom-start", { refs: H, floatingStyles: V, placement: G, context: z } = an({
|
|
4019
|
+
open: W,
|
|
4020
4020
|
onOpenChange: (ae) => {
|
|
4021
|
-
ae || (
|
|
4021
|
+
ae || (j(!1), i(!1));
|
|
4022
4022
|
},
|
|
4023
|
-
placement:
|
|
4023
|
+
placement: B,
|
|
4024
4024
|
// quick-260418-k7k-fix-2: strategy='fixed' positions the floating menu
|
|
4025
4025
|
// against the viewport instead of the nearest positioned ancestor.
|
|
4026
4026
|
// Each metric-card cell wrapper has position:relative (creating its
|
|
@@ -4060,7 +4060,7 @@ const Dn = (r) => {
|
|
|
4060
4060
|
outsidePress: !0,
|
|
4061
4061
|
outsidePressEvent: "mousedown",
|
|
4062
4062
|
escapeKey: !0
|
|
4063
|
-
}), { getFloatingProps: Z, getReferenceProps: K } = sn([Y]), ee = (u ?
|
|
4063
|
+
}), { getFloatingProps: Z, getReferenceProps: K } = sn([Y]), ee = (u ? B : G ?? B).startsWith("top") ? "up" : "down", fe = !W || M ? "collapsed" : ee === "up" ? "expanded-up" : "expanded-down", de = {
|
|
4064
4064
|
display: "inline-flex",
|
|
4065
4065
|
alignItems: "center",
|
|
4066
4066
|
overflow: "hidden",
|
|
@@ -4079,18 +4079,18 @@ const Dn = (r) => {
|
|
|
4079
4079
|
}, []);
|
|
4080
4080
|
const pe = S(
|
|
4081
4081
|
(ae) => {
|
|
4082
|
-
if (!
|
|
4082
|
+
if (!W) return;
|
|
4083
4083
|
const Ne = ae.nativeEvent?.relatedTarget, Le = ae.relatedTarget, $e = Ne ?? Le;
|
|
4084
4084
|
$e && typeof $e.closest == "function" && $e.closest("[data-action-strip]") || (oe.current !== null && clearTimeout(oe.current), oe.current = setTimeout(() => {
|
|
4085
4085
|
oe.current = null, i(!1);
|
|
4086
4086
|
}, Ue.GRACE_CLOSE_MS));
|
|
4087
4087
|
},
|
|
4088
|
-
[
|
|
4088
|
+
[W, i]
|
|
4089
4089
|
), Me = S(() => {
|
|
4090
4090
|
oe.current !== null && (clearTimeout(oe.current), oe.current = null);
|
|
4091
4091
|
}, []), Se = S(() => {
|
|
4092
4092
|
const ae = !s;
|
|
4093
|
-
|
|
4093
|
+
j(!!ae), i(ae);
|
|
4094
4094
|
}, [s, i]), [we, ze] = L(
|
|
4095
4095
|
{}
|
|
4096
4096
|
), ke = le(
|
|
@@ -4130,7 +4130,7 @@ const Dn = (r) => {
|
|
|
4130
4130
|
{
|
|
4131
4131
|
className: "gloss-action-strip",
|
|
4132
4132
|
"data-action-strip": !0,
|
|
4133
|
-
"data-action-strip-menu-id":
|
|
4133
|
+
"data-action-strip-menu-id": T,
|
|
4134
4134
|
"data-flipped": o ? "true" : "false",
|
|
4135
4135
|
"data-expanded": s ? "true" : "false",
|
|
4136
4136
|
"data-flip": ee,
|
|
@@ -4148,18 +4148,18 @@ const Dn = (r) => {
|
|
|
4148
4148
|
"div",
|
|
4149
4149
|
{
|
|
4150
4150
|
className: "gloss-action-strip__surface",
|
|
4151
|
-
ref:
|
|
4151
|
+
ref: H.setReference,
|
|
4152
4152
|
children: [
|
|
4153
4153
|
/* @__PURE__ */ d(
|
|
4154
4154
|
Ct.div,
|
|
4155
4155
|
{
|
|
4156
4156
|
layout: !0,
|
|
4157
|
-
className: `gloss-action-strip__pill${
|
|
4157
|
+
className: `gloss-action-strip__pill${W ? " gloss-action-strip__pill--expanded" : ""}${ee === "up" ? " gloss-action-strip__pill--flip-up" : ""}`,
|
|
4158
4158
|
"data-action-strip-pill": !0,
|
|
4159
4159
|
"data-primary-count": D.length,
|
|
4160
4160
|
"data-overflow-count": N.length,
|
|
4161
4161
|
"data-variant": fe,
|
|
4162
|
-
variants:
|
|
4162
|
+
variants: I,
|
|
4163
4163
|
animate: fe,
|
|
4164
4164
|
initial: "collapsed",
|
|
4165
4165
|
transition: {
|
|
@@ -4231,9 +4231,9 @@ const Dn = (r) => {
|
|
|
4231
4231
|
"data-count": A.length,
|
|
4232
4232
|
style: { display: "inline-flex", alignItems: "center" },
|
|
4233
4233
|
variants: _,
|
|
4234
|
-
animate:
|
|
4234
|
+
animate: W ? "expanded" : "collapsed",
|
|
4235
4235
|
initial: "collapsed",
|
|
4236
|
-
children: /* @__PURE__ */ e(Ar, { mode: "popLayout", initial: !1, children:
|
|
4236
|
+
children: /* @__PURE__ */ e(Ar, { mode: "popLayout", initial: !1, children: W ? A.map((ae) => /* @__PURE__ */ e(
|
|
4237
4237
|
Ct.span,
|
|
4238
4238
|
{
|
|
4239
4239
|
className: "gloss-action-strip__icon-slot",
|
|
@@ -4269,7 +4269,7 @@ const Dn = (r) => {
|
|
|
4269
4269
|
]
|
|
4270
4270
|
}
|
|
4271
4271
|
),
|
|
4272
|
-
/* @__PURE__ */ e(Ar, { children:
|
|
4272
|
+
/* @__PURE__ */ e(Ar, { children: W && !M ? (
|
|
4273
4273
|
// quick-260418-k7k-fix-6: FloatingPortal is required because
|
|
4274
4274
|
// dnd-kit's SortableContext wraps each card in a div with
|
|
4275
4275
|
// inline `transform`. Per CSS spec, `transform !== none`
|
|
@@ -4283,8 +4283,8 @@ const Dn = (r) => {
|
|
|
4283
4283
|
/* @__PURE__ */ e(on, { children: /* @__PURE__ */ e(
|
|
4284
4284
|
"div",
|
|
4285
4285
|
{
|
|
4286
|
-
ref:
|
|
4287
|
-
style: { ...
|
|
4286
|
+
ref: H.setFloating,
|
|
4287
|
+
style: { ...V, zIndex: 9999 },
|
|
4288
4288
|
...Z(),
|
|
4289
4289
|
children: /* @__PURE__ */ e(
|
|
4290
4290
|
Ct.div,
|
|
@@ -4292,7 +4292,7 @@ const Dn = (r) => {
|
|
|
4292
4292
|
className: `gloss-action-strip__menu gloss-action-strip__menu--flip-${ee}`,
|
|
4293
4293
|
"data-action-strip-menu": !0,
|
|
4294
4294
|
"data-flip": ee,
|
|
4295
|
-
"data-overflow-count":
|
|
4295
|
+
"data-overflow-count": F.length,
|
|
4296
4296
|
role: "menu",
|
|
4297
4297
|
variants: g,
|
|
4298
4298
|
custom: ee,
|
|
@@ -4302,7 +4302,7 @@ const Dn = (r) => {
|
|
|
4302
4302
|
style: {
|
|
4303
4303
|
transformOrigin: Vc(ee)
|
|
4304
4304
|
},
|
|
4305
|
-
children:
|
|
4305
|
+
children: F.map((ae) => /* @__PURE__ */ d(
|
|
4306
4306
|
"button",
|
|
4307
4307
|
{
|
|
4308
4308
|
type: "button",
|
|
@@ -4411,8 +4411,8 @@ const nd = [
|
|
|
4411
4411
|
f((h) => {
|
|
4412
4412
|
const C = new Set(h);
|
|
4413
4413
|
C.has(v) ? C.size > 2 && C.delete(v) : C.size < 3 && C.add(v);
|
|
4414
|
-
const
|
|
4415
|
-
return o && o(
|
|
4414
|
+
const T = Array.from(C);
|
|
4415
|
+
return o && o(T), C;
|
|
4416
4416
|
});
|
|
4417
4417
|
}, x = s === "stacked";
|
|
4418
4418
|
return s === "dimension-chooser" ? /* @__PURE__ */ d(
|
|
@@ -4554,10 +4554,10 @@ const ot = function({
|
|
|
4554
4554
|
onShrink: v,
|
|
4555
4555
|
onMove: h,
|
|
4556
4556
|
onReplace: C,
|
|
4557
|
-
onNavigate:
|
|
4557
|
+
onNavigate: T,
|
|
4558
4558
|
onRetry: w,
|
|
4559
4559
|
onRefresh: k,
|
|
4560
|
-
enableQuickSettings:
|
|
4560
|
+
enableQuickSettings: I,
|
|
4561
4561
|
onUpdateTimeframe: g,
|
|
4562
4562
|
instanceTimeframe: E,
|
|
4563
4563
|
cardTitle: _,
|
|
@@ -4565,14 +4565,14 @@ const ot = function({
|
|
|
4565
4565
|
onViewAsStack: N,
|
|
4566
4566
|
onUnstack: R,
|
|
4567
4567
|
isStackedGroup: A,
|
|
4568
|
-
onUpdateStackedTimeframes:
|
|
4568
|
+
onUpdateStackedTimeframes: F,
|
|
4569
4569
|
instanceStackedTimeframes: M,
|
|
4570
|
-
isGraphActive:
|
|
4570
|
+
isGraphActive: W,
|
|
4571
4571
|
isTableActive: U,
|
|
4572
|
-
isGraphCard:
|
|
4573
|
-
canExpand:
|
|
4574
|
-
anchorX:
|
|
4575
|
-
extensionOverflow:
|
|
4572
|
+
isGraphCard: j,
|
|
4573
|
+
canExpand: B,
|
|
4574
|
+
anchorX: H,
|
|
4575
|
+
extensionOverflow: V,
|
|
4576
4576
|
cardRef: G,
|
|
4577
4577
|
hovered: z,
|
|
4578
4578
|
forceHide: Y,
|
|
@@ -4586,10 +4586,10 @@ const ot = function({
|
|
|
4586
4586
|
const ve = ke.current;
|
|
4587
4587
|
if (ve !== null && ve.length < 2)
|
|
4588
4588
|
return;
|
|
4589
|
-
Z !== void 0 ? K?.(!1) : se(!1), ve && ve.length >= 2 &&
|
|
4589
|
+
Z !== void 0 ? K?.(!1) : se(!1), ve && ve.length >= 2 && F && F(ve);
|
|
4590
4590
|
} else
|
|
4591
4591
|
Z !== void 0 ? K?.(!1) : se(!1), ze.current && g && g(ze.current);
|
|
4592
|
-
}, [g,
|
|
4592
|
+
}, [g, F, A, Z, K]), Ke = S((ve) => {
|
|
4593
4593
|
ze.current = ve;
|
|
4594
4594
|
}, []);
|
|
4595
4595
|
ce(() => {
|
|
@@ -4730,7 +4730,7 @@ const ot = function({
|
|
|
4730
4730
|
activeIcon: /* @__PURE__ */ e(Dt, { style: { fontSize: 16 } }),
|
|
4731
4731
|
label: "Graph",
|
|
4732
4732
|
onClick: p,
|
|
4733
|
-
isActive:
|
|
4733
|
+
isActive: W,
|
|
4734
4734
|
showFeedback: !0,
|
|
4735
4735
|
activeColor: "#4f46e5"
|
|
4736
4736
|
}), m && ve.push({
|
|
@@ -4742,19 +4742,19 @@ const ot = function({
|
|
|
4742
4742
|
isActive: U,
|
|
4743
4743
|
showFeedback: !0,
|
|
4744
4744
|
activeColor: "#10b981"
|
|
4745
|
-
}),
|
|
4745
|
+
}), T && ve.push({
|
|
4746
4746
|
id: "navigate",
|
|
4747
4747
|
icon: /* @__PURE__ */ e(en, { style: { fontSize: 13 } }),
|
|
4748
4748
|
label: "Open details in new tab",
|
|
4749
|
-
onClick:
|
|
4749
|
+
onClick: T
|
|
4750
4750
|
});
|
|
4751
4751
|
const Pe = ad({
|
|
4752
|
-
onSettings:
|
|
4752
|
+
onSettings: I ? xe : void 0,
|
|
4753
4753
|
onRemove: b,
|
|
4754
4754
|
onReplace: C,
|
|
4755
4755
|
onRefresh: k,
|
|
4756
4756
|
onWhatsThis: y
|
|
4757
|
-
}), vt = Pe.filter((tt) => tt.id === "whats-this"), He = Pe.filter((tt) => tt.id !== "whats-this"), We = (
|
|
4757
|
+
}), vt = Pe.filter((tt) => tt.id === "whats-this"), He = Pe.filter((tt) => tt.id !== "whats-this"), We = (V ?? []).map((tt, Xe) => ({
|
|
4758
4758
|
...tt,
|
|
4759
4759
|
order: He.length + Xe
|
|
4760
4760
|
})), Ie = vt.map((tt, Xe) => ({
|
|
@@ -4775,12 +4775,12 @@ const ot = function({
|
|
|
4775
4775
|
onExpandedChange: de,
|
|
4776
4776
|
isFlipped: oe,
|
|
4777
4777
|
onFlipBack: je,
|
|
4778
|
-
anchorX:
|
|
4778
|
+
anchorX: H,
|
|
4779
4779
|
context: {
|
|
4780
4780
|
isErrorState: !!(w && !p && !m),
|
|
4781
4781
|
colSpan: n,
|
|
4782
|
-
isGraphCard:
|
|
4783
|
-
canExpand:
|
|
4782
|
+
isGraphCard: j,
|
|
4783
|
+
canExpand: B
|
|
4784
4784
|
}
|
|
4785
4785
|
}
|
|
4786
4786
|
);
|
|
@@ -4811,63 +4811,63 @@ const od = function(t) {
|
|
|
4811
4811
|
sparklineInset: x = "padded",
|
|
4812
4812
|
slotToActionStripConfig: v,
|
|
4813
4813
|
onSlotActionStripConfigChange: h
|
|
4814
|
-
} = t, C = u || o[o.length - 1] || "YTD",
|
|
4814
|
+
} = t, C = u || o[o.length - 1] || "YTD", T = m ? "gloss-metric-data-stale" : "gloss-metric-data-fresh", w = le(!1);
|
|
4815
4815
|
ce(() => {
|
|
4816
4816
|
if (w.current) return;
|
|
4817
|
-
const
|
|
4818
|
-
v &&
|
|
4817
|
+
const B = "onTableAction" in t;
|
|
4818
|
+
v && B && (console.warn(
|
|
4819
4819
|
"[StackedGroupCard AP-12] slotToActionStripConfig supplied alongside legacy onTableAction — per-slot dispatch will win; remove onTableAction from the consumer."
|
|
4820
4820
|
), w.current = !0);
|
|
4821
4821
|
}, []);
|
|
4822
4822
|
const k = S(
|
|
4823
|
-
(
|
|
4824
|
-
if (b?.(
|
|
4825
|
-
let
|
|
4823
|
+
(B, H) => {
|
|
4824
|
+
if (b?.(B, H), !v) return;
|
|
4825
|
+
let V = null;
|
|
4826
4826
|
try {
|
|
4827
|
-
|
|
4827
|
+
V = v(B);
|
|
4828
4828
|
} catch (G) {
|
|
4829
4829
|
console.error(
|
|
4830
4830
|
"[StackedGroupCard] slotToActionStripConfig threw for slot",
|
|
4831
|
-
|
|
4831
|
+
B,
|
|
4832
4832
|
G
|
|
4833
|
-
), h?.(
|
|
4833
|
+
), h?.(B, null);
|
|
4834
4834
|
return;
|
|
4835
4835
|
}
|
|
4836
|
-
h?.(
|
|
4836
|
+
h?.(B, V);
|
|
4837
4837
|
},
|
|
4838
4838
|
[b, v, h]
|
|
4839
|
-
),
|
|
4840
|
-
|
|
4839
|
+
), I = le(null), g = S(() => {
|
|
4840
|
+
I.current !== null && (clearTimeout(I.current), I.current = null);
|
|
4841
4841
|
}, []);
|
|
4842
4842
|
ce(() => () => {
|
|
4843
|
-
|
|
4843
|
+
I.current !== null && (clearTimeout(I.current), I.current = null);
|
|
4844
4844
|
}, []);
|
|
4845
4845
|
const E = S(
|
|
4846
|
-
(
|
|
4847
|
-
const
|
|
4848
|
-
|
|
4849
|
-
y?.(), v && h?.(null, null),
|
|
4846
|
+
(B) => {
|
|
4847
|
+
const H = B.relatedTarget;
|
|
4848
|
+
H instanceof Element && (H.closest("[data-slot-idx]") || H.closest("[data-action-strip]")) || (g(), I.current = setTimeout(() => {
|
|
4849
|
+
y?.(), v && h?.(null, null), I.current = null;
|
|
4850
4850
|
}, 250));
|
|
4851
4851
|
},
|
|
4852
4852
|
[y, v, h, g]
|
|
4853
4853
|
), _ = k, D = S(
|
|
4854
|
-
(
|
|
4855
|
-
g(), _(
|
|
4854
|
+
(B, H) => {
|
|
4855
|
+
g(), _(B, H);
|
|
4856
4856
|
},
|
|
4857
4857
|
[_, g]
|
|
4858
|
-
), N = !!b || !!v, R = !!y || !!v, A = le(null), { capacity:
|
|
4859
|
-
const
|
|
4858
|
+
), N = !!b || !!v, R = !!y || !!v, A = le(null), { capacity: F } = wn(A), M = f != null ? sd(f) : F, W = te(() => o.map((B, H) => {
|
|
4859
|
+
const V = i.find((Y) => Y.timeframe === B) || i[H], G = V?.value ?? null, z = lr(G, { prefix: n, suffix: s, abbreviated: !0 });
|
|
4860
4860
|
return {
|
|
4861
|
-
timeframe:
|
|
4861
|
+
timeframe: B,
|
|
4862
4862
|
formatted: z,
|
|
4863
|
-
trend:
|
|
4863
|
+
trend: V?.trend || null
|
|
4864
4864
|
};
|
|
4865
4865
|
}), [o, i, n, s]), U = te(
|
|
4866
|
-
() =>
|
|
4867
|
-
[
|
|
4868
|
-
),
|
|
4866
|
+
() => W.slice(0, Math.min(W.length, M)),
|
|
4867
|
+
[W, M]
|
|
4868
|
+
), j = c?.[C];
|
|
4869
4869
|
return /* @__PURE__ */ d(Ve, { children: [
|
|
4870
|
-
|
|
4870
|
+
j && j.length >= 2 && /* @__PURE__ */ e(gr, { data: j, color: l, isStale: m }),
|
|
4871
4871
|
/* @__PURE__ */ e(
|
|
4872
4872
|
"div",
|
|
4873
4873
|
{
|
|
@@ -4898,21 +4898,21 @@ const od = function(t) {
|
|
|
4898
4898
|
kt,
|
|
4899
4899
|
{
|
|
4900
4900
|
definition: { direction: "horizontal", gap: "0px", align: "stretch" },
|
|
4901
|
-
className:
|
|
4901
|
+
className: T,
|
|
4902
4902
|
style: { flex: 1, minHeight: 0, position: "relative", zIndex: 2 },
|
|
4903
|
-
children: U.map((
|
|
4904
|
-
const
|
|
4903
|
+
children: U.map((B, H) => {
|
|
4904
|
+
const V = B.timeframe === C;
|
|
4905
4905
|
return /* @__PURE__ */ d(
|
|
4906
4906
|
he,
|
|
4907
4907
|
{
|
|
4908
4908
|
definition: { display: "flex", direction: "column", align: "center", justify: "center" },
|
|
4909
|
-
"data-slot-idx":
|
|
4910
|
-
onPointerEnter: N ? () => D(
|
|
4909
|
+
"data-slot-idx": H,
|
|
4910
|
+
onPointerEnter: N ? () => D(H, B.timeframe) : void 0,
|
|
4911
4911
|
onPointerLeave: R ? E : void 0,
|
|
4912
4912
|
style: {
|
|
4913
4913
|
flex: 1,
|
|
4914
4914
|
minWidth: 0,
|
|
4915
|
-
borderRight:
|
|
4915
|
+
borderRight: H < U.length - 1 ? "1px solid rgba(0,0,0,0.06)" : "none",
|
|
4916
4916
|
padding: "0 4px"
|
|
4917
4917
|
},
|
|
4918
4918
|
children: [
|
|
@@ -4920,28 +4920,28 @@ const od = function(t) {
|
|
|
4920
4920
|
"span",
|
|
4921
4921
|
{
|
|
4922
4922
|
onClick: p ? (G) => {
|
|
4923
|
-
G.stopPropagation(), p(
|
|
4923
|
+
G.stopPropagation(), p(B.timeframe);
|
|
4924
4924
|
} : void 0,
|
|
4925
4925
|
style: {
|
|
4926
4926
|
fontSize: 9,
|
|
4927
4927
|
fontWeight: 600,
|
|
4928
4928
|
textTransform: "uppercase",
|
|
4929
4929
|
letterSpacing: "0.04em",
|
|
4930
|
-
color:
|
|
4930
|
+
color: V ? l : "#9CA3AF",
|
|
4931
4931
|
lineHeight: 1,
|
|
4932
4932
|
marginBottom: 6,
|
|
4933
4933
|
cursor: p ? "pointer" : "default",
|
|
4934
4934
|
transition: "color 150ms ease"
|
|
4935
4935
|
},
|
|
4936
|
-
children:
|
|
4936
|
+
children: B.timeframe
|
|
4937
4937
|
}
|
|
4938
4938
|
),
|
|
4939
4939
|
/* @__PURE__ */ e(
|
|
4940
4940
|
"span",
|
|
4941
4941
|
{
|
|
4942
|
-
title:
|
|
4942
|
+
title: B.formatted.full,
|
|
4943
4943
|
style: {
|
|
4944
|
-
fontSize: id(
|
|
4944
|
+
fontSize: id(B.formatted.length),
|
|
4945
4945
|
fontWeight: 700,
|
|
4946
4946
|
color: "var(--color-text-primary, #111827)",
|
|
4947
4947
|
lineHeight: 1.1,
|
|
@@ -4951,10 +4951,10 @@ const od = function(t) {
|
|
|
4951
4951
|
maxWidth: "100%",
|
|
4952
4952
|
textAlign: "center"
|
|
4953
4953
|
},
|
|
4954
|
-
children:
|
|
4954
|
+
children: B.formatted.display
|
|
4955
4955
|
}
|
|
4956
4956
|
),
|
|
4957
|
-
|
|
4957
|
+
B.trend && /* @__PURE__ */ d("span", { style: {
|
|
4958
4958
|
display: "flex",
|
|
4959
4959
|
alignItems: "center",
|
|
4960
4960
|
gap: 2,
|
|
@@ -4962,14 +4962,14 @@ const od = function(t) {
|
|
|
4962
4962
|
fontSize: 9,
|
|
4963
4963
|
fontWeight: 600,
|
|
4964
4964
|
lineHeight: 1,
|
|
4965
|
-
color:
|
|
4965
|
+
color: B.trend.direction === "up" ? "var(--color-positive, #10b981)" : B.trend.direction === "down" ? "var(--color-negative, #ef4444)" : "var(--color-text-secondary, #6B7280)"
|
|
4966
4966
|
}, children: [
|
|
4967
|
-
/* @__PURE__ */ e("span", { style: { fontSize: 8 }, children:
|
|
4968
|
-
typeof
|
|
4967
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 8 }, children: B.trend.direction === "up" ? "▲" : B.trend.direction === "down" ? "▼" : "▶" }),
|
|
4968
|
+
typeof B.trend.value == "number" ? `${Math.abs(B.trend.value)}%` : ""
|
|
4969
4969
|
] })
|
|
4970
4970
|
]
|
|
4971
4971
|
},
|
|
4972
|
-
|
|
4972
|
+
B.timeframe
|
|
4973
4973
|
);
|
|
4974
4974
|
})
|
|
4975
4975
|
}
|
|
@@ -5357,7 +5357,7 @@ function _d(r) {
|
|
|
5357
5357
|
} = r, v = co(), h = te(() => bd(a), [a]), C = te(
|
|
5358
5358
|
() => o ? yd(o) : [],
|
|
5359
5359
|
[o]
|
|
5360
|
-
),
|
|
5360
|
+
), T = S(
|
|
5361
5361
|
(D) => {
|
|
5362
5362
|
c?.(vd(D));
|
|
5363
5363
|
},
|
|
@@ -5367,15 +5367,15 @@ function _d(r) {
|
|
|
5367
5367
|
return t.map((N, R) => {
|
|
5368
5368
|
const A = N.id;
|
|
5369
5369
|
if (A != null && A !== "" && A !== "None" && A !== "null" && A !== "undefined") {
|
|
5370
|
-
const
|
|
5371
|
-
return D.set(
|
|
5370
|
+
const F = String(A), M = D.get(F) || 0;
|
|
5371
|
+
return D.set(F, M + 1), M > 0 ? { ...N, id: `${F}__dup${R}` } : N;
|
|
5372
5372
|
}
|
|
5373
5373
|
return { ...N, id: `fallback-${R}` };
|
|
5374
5374
|
});
|
|
5375
5375
|
}, [t]), k = S(
|
|
5376
5376
|
(D) => x ? x(D) : String(D.id),
|
|
5377
5377
|
[x]
|
|
5378
|
-
),
|
|
5378
|
+
), I = S(
|
|
5379
5379
|
(D, N) => {
|
|
5380
5380
|
b?.(D.row, D.field, N);
|
|
5381
5381
|
},
|
|
@@ -5393,7 +5393,7 @@ function _d(r) {
|
|
|
5393
5393
|
);
|
|
5394
5394
|
const g = S(
|
|
5395
5395
|
(D, N) => {
|
|
5396
|
-
const R = h.find((
|
|
5396
|
+
const R = h.find((F) => F.field === D.field);
|
|
5397
5397
|
String(R?.headerClassName || "").includes("narrow-header") && (N.defaultMuiPrevented = !0, v.current?.showColumnMenu(D.field));
|
|
5398
5398
|
},
|
|
5399
5399
|
[h, v]
|
|
@@ -5456,13 +5456,13 @@ function _d(r) {
|
|
|
5456
5456
|
getRowId: k,
|
|
5457
5457
|
apiRef: v,
|
|
5458
5458
|
onColumnHeaderClick: g,
|
|
5459
|
-
onCellClick: b ?
|
|
5459
|
+
onCellClick: b ? I : void 0,
|
|
5460
5460
|
pagination: !0,
|
|
5461
5461
|
...E,
|
|
5462
5462
|
rowBufferPx: 3 * m,
|
|
5463
5463
|
columnBufferPx: 200,
|
|
5464
5464
|
sortModel: C,
|
|
5465
|
-
onSortModelChange:
|
|
5465
|
+
onSortModelChange: T,
|
|
5466
5466
|
loading: n,
|
|
5467
5467
|
sx: _,
|
|
5468
5468
|
rowHeight: m,
|
|
@@ -5606,7 +5606,7 @@ const $a = () => /* @__PURE__ */ d(
|
|
|
5606
5606
|
}, [p]);
|
|
5607
5607
|
const C = S((g) => {
|
|
5608
5608
|
a?.(g), m(-1), f.current?.blur();
|
|
5609
|
-
}, [a]),
|
|
5609
|
+
}, [a]), T = S((g) => {
|
|
5610
5610
|
if (!h) {
|
|
5611
5611
|
g.key === "Enter" && r.trim() && n?.(r.trim());
|
|
5612
5612
|
return;
|
|
@@ -5622,7 +5622,7 @@ const $a = () => /* @__PURE__ */ d(
|
|
|
5622
5622
|
ce(() => () => {
|
|
5623
5623
|
b.current && clearTimeout(b.current);
|
|
5624
5624
|
}, []);
|
|
5625
|
-
const
|
|
5625
|
+
const I = {
|
|
5626
5626
|
display: "flex",
|
|
5627
5627
|
alignItems: "center",
|
|
5628
5628
|
gap: "8px",
|
|
@@ -5639,7 +5639,7 @@ const $a = () => /* @__PURE__ */ d(
|
|
|
5639
5639
|
transition: "opacity 0.12s ease",
|
|
5640
5640
|
cursor: "text"
|
|
5641
5641
|
};
|
|
5642
|
-
return i ? /* @__PURE__ */ d("div", { style: { ...
|
|
5642
|
+
return i ? /* @__PURE__ */ d("div", { style: { ...I, gap: "6px" }, children: [
|
|
5643
5643
|
/* @__PURE__ */ e("span", { style: { color: "rgba(0,0,0,0.22)", display: "flex", flexShrink: 0 }, children: /* @__PURE__ */ e($a, {}) }),
|
|
5644
5644
|
/* @__PURE__ */ e("span", { style: {
|
|
5645
5645
|
color: "rgba(0,0,0,0.75)",
|
|
@@ -5681,7 +5681,7 @@ const $a = () => /* @__PURE__ */ d(
|
|
|
5681
5681
|
"div",
|
|
5682
5682
|
{
|
|
5683
5683
|
style: {
|
|
5684
|
-
...
|
|
5684
|
+
...I,
|
|
5685
5685
|
position: "relative",
|
|
5686
5686
|
background: l ? "rgba(0,0,0,0.02)" : "transparent",
|
|
5687
5687
|
borderRadius: "5px"
|
|
@@ -5698,7 +5698,7 @@ const $a = () => /* @__PURE__ */ d(
|
|
|
5698
5698
|
onChange: (g) => t(g.target.value),
|
|
5699
5699
|
onFocus: w,
|
|
5700
5700
|
onBlur: k,
|
|
5701
|
-
onKeyDown:
|
|
5701
|
+
onKeyDown: T,
|
|
5702
5702
|
placeholder: "",
|
|
5703
5703
|
style: {
|
|
5704
5704
|
border: "none",
|
|
@@ -5770,7 +5770,7 @@ const wd = "left 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.
|
|
|
5770
5770
|
onEntityClear: v,
|
|
5771
5771
|
entityFilterValue: h,
|
|
5772
5772
|
entityFading: C,
|
|
5773
|
-
entityOptions:
|
|
5773
|
+
entityOptions: T
|
|
5774
5774
|
}) => /* @__PURE__ */ e("div", { style: {
|
|
5775
5775
|
overflow: r ? "visible" : "hidden",
|
|
5776
5776
|
height: r ? "40px" : "0px",
|
|
@@ -5822,7 +5822,7 @@ const wd = "left 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.
|
|
|
5822
5822
|
onClear: v,
|
|
5823
5823
|
activeValue: h,
|
|
5824
5824
|
fading: C,
|
|
5825
|
-
options:
|
|
5825
|
+
options: T
|
|
5826
5826
|
}
|
|
5827
5827
|
) })
|
|
5828
5828
|
] }) }));
|
|
@@ -5907,25 +5907,22 @@ function Td(r, t, a, n, s, i, o, c, l, u) {
|
|
|
5907
5907
|
const f = () => {
|
|
5908
5908
|
const y = r.current, x = t.current, v = a.current, h = n.current;
|
|
5909
5909
|
if (!y || !x || !v) return;
|
|
5910
|
-
const C = y.getBoundingClientRect(),
|
|
5911
|
-
const
|
|
5910
|
+
const C = y.getBoundingClientRect(), T = (H) => {
|
|
5911
|
+
const V = H.getBoundingClientRect();
|
|
5912
5912
|
return {
|
|
5913
|
-
left:
|
|
5914
|
-
top:
|
|
5915
|
-
width:
|
|
5916
|
-
height:
|
|
5917
|
-
right:
|
|
5918
|
-
bottom:
|
|
5913
|
+
left: V.left - C.left,
|
|
5914
|
+
top: V.top - C.top,
|
|
5915
|
+
width: V.width,
|
|
5916
|
+
height: V.height,
|
|
5917
|
+
right: V.right - C.left,
|
|
5918
|
+
bottom: V.bottom - C.top
|
|
5919
5919
|
};
|
|
5920
|
-
}, w =
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
itemFilter: { left: R, width: O, top: U, height: 32 },
|
|
5927
|
-
entityPill: N ? { left: N.left, width: N.width, top: N.top, height: N.height } : V.entityPill,
|
|
5928
|
-
entityFilter: { left: H, width: M, top: U, height: 32 },
|
|
5920
|
+
}, w = T(x), k = T(v), I = h ? T(h) : null, g = I ? [w, k, I] : [w, k], E = s.current?.items, _ = E ? T(E) : null, D = h ? i.current?.[o.dimension] : null, N = D ? T(D) : null, R = k.left, A = I ? I.right : k.right, F = Math.max(A - k.left, 300), M = R, W = F, U = I ? R : 0, j = I ? F : 0, B = C.height + 2;
|
|
5921
|
+
m((H) => ({
|
|
5922
|
+
itemPill: _ ? { left: _.left, width: _.width, top: _.top, height: _.height } : H.itemPill,
|
|
5923
|
+
itemFilter: { left: M, width: W, top: B, height: 32 },
|
|
5924
|
+
entityPill: N ? { left: N.left, width: N.width, top: N.top, height: N.height } : H.entityPill,
|
|
5925
|
+
entityFilter: { left: U, width: j, top: B, height: 32 },
|
|
5929
5926
|
tracks: g
|
|
5930
5927
|
}));
|
|
5931
5928
|
};
|
|
@@ -5987,38 +5984,38 @@ const Ed = q.memo(({
|
|
|
5987
5984
|
id: me.id,
|
|
5988
5985
|
label: me.label || me.name || me.id
|
|
5989
5986
|
}))
|
|
5990
|
-
}), [b, l]), [
|
|
5991
|
-
|
|
5992
|
-
|
|
5987
|
+
}), [b, l]), [T, w] = L(!1), [k, I] = L(!1), [g, E] = L(null), [_, D] = L(null), [N, R] = L(""), [A, F] = L(""), [M, W] = L(!1), U = x.entity === "items" && T, j = k, B = U || j, H = le(null), V = le(null), G = le(null), z = le(null), Y = le({}), Z = le({}), K = Td(
|
|
5988
|
+
H,
|
|
5989
|
+
V,
|
|
5993
5990
|
G,
|
|
5994
5991
|
z,
|
|
5995
5992
|
Y,
|
|
5996
5993
|
Z,
|
|
5997
5994
|
x,
|
|
5998
|
-
|
|
5995
|
+
B,
|
|
5999
5996
|
g,
|
|
6000
5997
|
_
|
|
6001
5998
|
), X = le(x.dimension), ee = le(null);
|
|
6002
|
-
ce(() => (X.current !== x.dimension && (ee.current && clearTimeout(ee.current),
|
|
5999
|
+
ce(() => (X.current !== x.dimension && (ee.current && clearTimeout(ee.current), W(!0), ee.current = setTimeout(() => W(!1), 150)), X.current = x.dimension, () => {
|
|
6003
6000
|
ee.current && clearTimeout(ee.current);
|
|
6004
6001
|
}), [x.dimension]);
|
|
6005
6002
|
const fe = le({ id: null, name: null }), de = le({ id: null, name: null });
|
|
6006
6003
|
ce(() => {
|
|
6007
6004
|
const me = r.entity?.id ?? null, xe = r.entity?.name ?? null, je = r.byItem?.id ?? null, Ke = r.byItem?.name ?? null;
|
|
6008
|
-
(me !== fe.current.id || xe !== fe.current.name) && (fe.current = { id: me, name: xe }, me && xe ? (D(xe),
|
|
6005
|
+
(me !== fe.current.id || xe !== fe.current.name) && (fe.current = { id: me, name: xe }, me && xe ? (D(xe), I(!0), F("")) : D(null)), (je !== de.current.id || Ke !== de.current.name) && (de.current = { id: je, name: Ke }, je && Ke ? (E(Ke), w(!0), R("")) : E(null));
|
|
6009
6006
|
}, [r.entity?.id, r.entity?.name, r.byItem?.id, r.byItem?.name]);
|
|
6010
6007
|
const be = S((me, xe) => {
|
|
6011
6008
|
me === "metric" ? a(xe) : me === "entity" ? (t(xe), xe !== "items" && w(!1)) : me === "dimension" && n(xe);
|
|
6012
6009
|
}, [a, t, n]), se = S(() => {
|
|
6013
6010
|
x.entity === "items" && w((me) => !me);
|
|
6014
6011
|
}, [x.entity]), oe = S(() => {
|
|
6015
|
-
|
|
6012
|
+
I((me) => !me);
|
|
6016
6013
|
}, []), pe = S((me) => {
|
|
6017
6014
|
E(me), R(""), i(me, me);
|
|
6018
6015
|
}, [i]), Me = S(() => {
|
|
6019
6016
|
E(null), i(null, null);
|
|
6020
6017
|
}, [i]), Se = S((me) => {
|
|
6021
|
-
D(me),
|
|
6018
|
+
D(me), F(""), s(me, me);
|
|
6022
6019
|
}, [s]), we = S(() => {
|
|
6023
6020
|
D(null), s(null, null);
|
|
6024
6021
|
}, [s]), ze = S((me) => {
|
|
@@ -6026,9 +6023,9 @@ const Ed = q.memo(({
|
|
|
6026
6023
|
E(xe), R(""), i(me.id, xe);
|
|
6027
6024
|
}, [i]), ke = S((me) => {
|
|
6028
6025
|
const xe = me.label || me.name || me.id;
|
|
6029
|
-
D(xe),
|
|
6026
|
+
D(xe), F(""), s(me.id, xe);
|
|
6030
6027
|
}, [s]);
|
|
6031
|
-
return /* @__PURE__ */ d("div", { ref:
|
|
6028
|
+
return /* @__PURE__ */ d("div", { ref: H, className: "gloss-chart-control-bar", children: [
|
|
6032
6029
|
K.tracks.map((me, xe) => /* @__PURE__ */ e(
|
|
6033
6030
|
"div",
|
|
6034
6031
|
{
|
|
@@ -6063,7 +6060,7 @@ const Ed = q.memo(({
|
|
|
6063
6060
|
filterWidth: K.entityFilter.width,
|
|
6064
6061
|
filterTop: K.entityFilter.top,
|
|
6065
6062
|
filterHeight: K.entityFilter.height,
|
|
6066
|
-
visible:
|
|
6063
|
+
visible: j
|
|
6067
6064
|
}
|
|
6068
6065
|
)
|
|
6069
6066
|
] }),
|
|
@@ -6077,13 +6074,13 @@ const Ed = q.memo(({
|
|
|
6077
6074
|
onSelect: be,
|
|
6078
6075
|
onEntityToggle: se,
|
|
6079
6076
|
onDimensionToggle: oe,
|
|
6080
|
-
metricGroupRef:
|
|
6077
|
+
metricGroupRef: V,
|
|
6081
6078
|
entityGroupRef: G,
|
|
6082
6079
|
dimensionGroupRef: z,
|
|
6083
6080
|
entityTabRefs: Y,
|
|
6084
6081
|
dimensionTabRefs: Z,
|
|
6085
6082
|
showItemFilter: U,
|
|
6086
|
-
showEntityFilter:
|
|
6083
|
+
showEntityFilter: j,
|
|
6087
6084
|
showDimensionGroup: y,
|
|
6088
6085
|
datePickerSlot: p
|
|
6089
6086
|
}
|
|
@@ -6091,9 +6088,9 @@ const Ed = q.memo(({
|
|
|
6091
6088
|
/* @__PURE__ */ e("div", { className: "gloss-chart-control-bar__row-2-overlay", children: /* @__PURE__ */ e(
|
|
6092
6089
|
En,
|
|
6093
6090
|
{
|
|
6094
|
-
showRow2:
|
|
6091
|
+
showRow2: B,
|
|
6095
6092
|
showItemFilter: U,
|
|
6096
|
-
showEntityFilter:
|
|
6093
|
+
showEntityFilter: j,
|
|
6097
6094
|
itemFilterLayout: { left: K.itemFilter.left, width: K.itemFilter.width },
|
|
6098
6095
|
entityFilterLayout: { left: K.entityFilter.left, width: K.entityFilter.width },
|
|
6099
6096
|
itemSearch: N,
|
|
@@ -6104,7 +6101,7 @@ const Ed = q.memo(({
|
|
|
6104
6101
|
itemFilterValue: g,
|
|
6105
6102
|
itemOptions: u,
|
|
6106
6103
|
entitySearch: A,
|
|
6107
|
-
setEntitySearch:
|
|
6104
|
+
setEntitySearch: F,
|
|
6108
6105
|
onEntitySubmit: Se,
|
|
6109
6106
|
onEntitySelect: ke,
|
|
6110
6107
|
onEntityClear: we,
|
|
@@ -6606,7 +6603,7 @@ function Ad({
|
|
|
6606
6603
|
onUpdateViz: h,
|
|
6607
6604
|
onActionClick: C
|
|
6608
6605
|
}) {
|
|
6609
|
-
const
|
|
6606
|
+
const T = te(() => n && n.length > 0 ? n : s ? Pd(s, {
|
|
6610
6607
|
entityType: o,
|
|
6611
6608
|
userType: p,
|
|
6612
6609
|
orderStatus: i?.status,
|
|
@@ -6614,12 +6611,12 @@ function Ad({
|
|
|
6614
6611
|
field: f
|
|
6615
6612
|
}) : [], [n, s, o, p, i, m, f]), w = te(() => {
|
|
6616
6613
|
const _ = /* @__PURE__ */ new Map();
|
|
6617
|
-
for (const D of
|
|
6614
|
+
for (const D of T) {
|
|
6618
6615
|
const N = D.section;
|
|
6619
6616
|
_.has(N) || _.set(N, []), _.get(N).push(D);
|
|
6620
6617
|
}
|
|
6621
6618
|
return _;
|
|
6622
|
-
}, [
|
|
6619
|
+
}, [T]), k = S((_) => ({
|
|
6623
6620
|
row: i,
|
|
6624
6621
|
entityType: o,
|
|
6625
6622
|
entityId: c ?? i.id,
|
|
@@ -6628,7 +6625,7 @@ function Ad({
|
|
|
6628
6625
|
userType: p,
|
|
6629
6626
|
tableType: m,
|
|
6630
6627
|
field: f ?? _.filterKey
|
|
6631
|
-
}), [i, o, c, l, u, p, m, f]),
|
|
6628
|
+
}), [i, o, c, l, u, p, m, f]), I = S((_) => {
|
|
6632
6629
|
const D = k(_), N = C;
|
|
6633
6630
|
if (N) {
|
|
6634
6631
|
N(_, D), a();
|
|
@@ -6668,7 +6665,7 @@ function Ad({
|
|
|
6668
6665
|
] }) }) }, _.id) : /* @__PURE__ */ d(
|
|
6669
6666
|
Vt,
|
|
6670
6667
|
{
|
|
6671
|
-
onClick: () =>
|
|
6668
|
+
onClick: () => I(_),
|
|
6672
6669
|
className: _.variant === "destructive" ? "gloss-unified-context-menu__item--destructive" : void 0,
|
|
6673
6670
|
children: [
|
|
6674
6671
|
/* @__PURE__ */ e(Je, { icon: Oa(_.icon), definition: { size: "sm" }, style: { marginRight: 8, flexShrink: 0 } }),
|
|
@@ -6680,7 +6677,7 @@ function Ad({
|
|
|
6680
6677
|
},
|
|
6681
6678
|
_.id
|
|
6682
6679
|
);
|
|
6683
|
-
}, [i, o,
|
|
6680
|
+
}, [i, o, I]), E = te(() => {
|
|
6684
6681
|
const _ = [];
|
|
6685
6682
|
let D = 0;
|
|
6686
6683
|
for (const N of Rd) {
|
|
@@ -6688,8 +6685,8 @@ function Ad({
|
|
|
6688
6685
|
if (!(!R || R.length === 0)) {
|
|
6689
6686
|
D > 0 && _.push(/* @__PURE__ */ e(Za, { className: "gloss-unified-context-menu__divider" }, `divider-${N}`));
|
|
6690
6687
|
for (const A of R) {
|
|
6691
|
-
const
|
|
6692
|
-
|
|
6688
|
+
const F = g(A);
|
|
6689
|
+
F && _.push(F);
|
|
6693
6690
|
}
|
|
6694
6691
|
D++;
|
|
6695
6692
|
}
|
|
@@ -6738,7 +6735,7 @@ const Gr = ({
|
|
|
6738
6735
|
isOpen: c = !1,
|
|
6739
6736
|
onOpenChange: l
|
|
6740
6737
|
}) => {
|
|
6741
|
-
const u = le(null), p = c, m = t.find((
|
|
6738
|
+
const u = le(null), p = c, m = t.find((I) => I.id === a), f = !!m, b = m || t.find((I) => I.id === i) || t.find((I) => I.id === n) || t[0], y = te(() => {
|
|
6742
6739
|
if (!b || !["7d", "30d", "60d", "90d", "mtd", "qtd", "ytd", "lytd"].includes(b.id))
|
|
6743
6740
|
return "";
|
|
6744
6741
|
const { start: g, end: E } = Ye(b.id);
|
|
@@ -6751,10 +6748,10 @@ const Gr = ({
|
|
|
6751
6748
|
l && l(r, !1);
|
|
6752
6749
|
}, [r, l]), C = S(() => {
|
|
6753
6750
|
l && l(r, !p);
|
|
6754
|
-
}, [r, p, l]),
|
|
6755
|
-
s(
|
|
6756
|
-
}, [s, h]), w = S((
|
|
6757
|
-
|
|
6751
|
+
}, [r, p, l]), T = S((I) => {
|
|
6752
|
+
s(I), h();
|
|
6753
|
+
}, [s, h]), w = S((I, g) => {
|
|
6754
|
+
I.stopPropagation(), o && o(g);
|
|
6758
6755
|
}, [o]), k = /* @__PURE__ */ d(
|
|
6759
6756
|
ne,
|
|
6760
6757
|
{
|
|
@@ -6816,12 +6813,12 @@ const Gr = ({
|
|
|
6816
6813
|
mt: 0.5,
|
|
6817
6814
|
py: 0.5
|
|
6818
6815
|
},
|
|
6819
|
-
children: /* @__PURE__ */ e(go, { dense: !0, children: t.map((
|
|
6820
|
-
const g = a ===
|
|
6816
|
+
children: /* @__PURE__ */ e(go, { dense: !0, children: t.map((I) => {
|
|
6817
|
+
const g = a === I.id, E = i === I.id;
|
|
6821
6818
|
return /* @__PURE__ */ d(
|
|
6822
6819
|
Vt,
|
|
6823
6820
|
{
|
|
6824
|
-
onClick: () => I
|
|
6821
|
+
onClick: () => T(I.id),
|
|
6825
6822
|
selected: g,
|
|
6826
6823
|
sx: {
|
|
6827
6824
|
display: "flex",
|
|
@@ -6837,7 +6834,7 @@ const Gr = ({
|
|
|
6837
6834
|
/* @__PURE__ */ e(
|
|
6838
6835
|
ho,
|
|
6839
6836
|
{
|
|
6840
|
-
primary:
|
|
6837
|
+
primary: I.label,
|
|
6841
6838
|
primaryTypographyProps: {
|
|
6842
6839
|
fontSize: 13,
|
|
6843
6840
|
fontWeight: g ? 600 : 400,
|
|
@@ -6850,7 +6847,7 @@ const Gr = ({
|
|
|
6850
6847
|
qe,
|
|
6851
6848
|
{
|
|
6852
6849
|
size: "small",
|
|
6853
|
-
onClick: (_) => w(_,
|
|
6850
|
+
onClick: (_) => w(_, I.id),
|
|
6854
6851
|
sx: {
|
|
6855
6852
|
p: 0.25,
|
|
6856
6853
|
opacity: E ? 1 : 0,
|
|
@@ -6865,7 +6862,7 @@ const Gr = ({
|
|
|
6865
6862
|
)
|
|
6866
6863
|
]
|
|
6867
6864
|
},
|
|
6868
|
-
|
|
6865
|
+
I.id
|
|
6869
6866
|
);
|
|
6870
6867
|
}) })
|
|
6871
6868
|
}
|
|
@@ -6959,25 +6956,25 @@ const $d = ["S", "M", "T", "W", "T", "F", "S"], La = {
|
|
|
6959
6956
|
}, [r, t]), ce(() => {
|
|
6960
6957
|
l && b(new Date(l.getFullYear(), l.getMonth(), 1));
|
|
6961
6958
|
}, [l]);
|
|
6962
|
-
const
|
|
6963
|
-
b(new Date(
|
|
6964
|
-
}, [
|
|
6965
|
-
b(new Date(
|
|
6966
|
-
}, [
|
|
6959
|
+
const T = f.getFullYear(), w = f.getMonth(), k = new Date(T, w + 1, 0).getDate(), I = new Date(T, w, 1).getDay(), g = f.toLocaleDateString("en-US", { month: "long", year: "numeric" }), E = S(() => {
|
|
6960
|
+
b(new Date(T, w - 1, 1));
|
|
6961
|
+
}, [T, w]), _ = S(() => {
|
|
6962
|
+
b(new Date(T, w + 1, 1));
|
|
6963
|
+
}, [T, w]), D = S((z) => {
|
|
6967
6964
|
const Y = z.target.value;
|
|
6968
|
-
b(new Date(
|
|
6969
|
-
}, [
|
|
6965
|
+
b(new Date(T, Y, 1));
|
|
6966
|
+
}, [T]), N = S((z) => {
|
|
6970
6967
|
const Y = z.target.value;
|
|
6971
6968
|
b(new Date(Y, w, 1));
|
|
6972
6969
|
}, [w]), R = S((z) => n.some(
|
|
6973
6970
|
(Y) => Y.startDate && Y.endDate && z >= Y.startDate && z <= Y.endDate
|
|
6974
6971
|
), [n]), A = S((z) => n.filter(
|
|
6975
6972
|
(Z) => Z.startDate && Z.endDate && z >= Z.startDate && z <= Z.endDate
|
|
6976
|
-
).map((Z) => Z.label).join(", "), [n]),
|
|
6973
|
+
).map((Z) => Z.label).join(", "), [n]), F = S((z) => {
|
|
6977
6974
|
if (!r) return !1;
|
|
6978
6975
|
const Y = v || t;
|
|
6979
6976
|
return Y ? oo(z, r, Y) : !1;
|
|
6980
|
-
}, [r, t, v]), M = S((z) => !z || !r ? !1 : er(z, r), [r]),
|
|
6977
|
+
}, [r, t, v]), M = S((z) => !z || !r ? !1 : er(z, r), [r]), W = S((z) => {
|
|
6981
6978
|
if (!z) return !1;
|
|
6982
6979
|
const Y = v || t;
|
|
6983
6980
|
return Y ? er(z, Y) : !1;
|
|
@@ -6985,16 +6982,16 @@ const $d = ["S", "M", "T", "W", "T", "F", "S"], La = {
|
|
|
6985
6982
|
if (!z || !r) return !1;
|
|
6986
6983
|
const Y = v || t;
|
|
6987
6984
|
return Y ? er(r, Y) && M(z) : M(z);
|
|
6988
|
-
}, [r, t, v, M]),
|
|
6989
|
-
const Y = new Date(
|
|
6985
|
+
}, [r, t, v, M]), j = S((z) => z ? !!(m && z > m) : !1, [m]), B = S((z) => {
|
|
6986
|
+
const Y = new Date(T, w, z);
|
|
6990
6987
|
y ? (C.current = !0, r && Y < r ? a(Y, r) : a(r, Y), x(!1), h(null)) : (C.current = !0, a(Y, null), x(!0));
|
|
6991
|
-
}, [
|
|
6992
|
-
y && h(new Date(
|
|
6993
|
-
}, [y,
|
|
6988
|
+
}, [T, w, r, y, a]), H = S((z) => {
|
|
6989
|
+
y && h(new Date(T, w, z));
|
|
6990
|
+
}, [y, T, w]), V = S(() => {
|
|
6994
6991
|
h(null);
|
|
6995
6992
|
}, []), G = te(() => {
|
|
6996
6993
|
const z = [];
|
|
6997
|
-
for (let Z = 0; Z <
|
|
6994
|
+
for (let Z = 0; Z < I; Z++)
|
|
6998
6995
|
z.push(
|
|
6999
6996
|
/* @__PURE__ */ e(
|
|
7000
6997
|
ne,
|
|
@@ -7006,14 +7003,14 @@ const $d = ["S", "M", "T", "W", "T", "F", "S"], La = {
|
|
|
7006
7003
|
);
|
|
7007
7004
|
const Y = /* @__PURE__ */ new Date();
|
|
7008
7005
|
for (let Z = 1; Z <= k; Z++) {
|
|
7009
|
-
const K = new Date(
|
|
7006
|
+
const K = new Date(T, w, Z), X = F(K), ee = M(K), fe = W(K), de = U(K), be = j(K), se = R(K), oe = er(K, Y), pe = ["mini-calendar__day"];
|
|
7010
7007
|
be ? (pe.push("mini-calendar__day--disabled"), fe ? pe.push("mini-calendar__day--disabled-end") : X && pe.push("mini-calendar__day--disabled-in-range"), se && pe.push("mini-calendar__day--market")) : (de ? pe.push("mini-calendar__day--single") : ee ? pe.push("mini-calendar__day--start") : fe ? pe.push("mini-calendar__day--end") : X && pe.push("mini-calendar__day--in-range"), (de || ee || fe || X) && (u === "secondary" ? pe.push("mini-calendar__day--secondary") : u === "tertiary" && pe.push("mini-calendar__day--tertiary")), oe && !ee && !fe && !de && pe.push("mini-calendar__day--today"), se && pe.push("mini-calendar__day--market"));
|
|
7011
7008
|
const Me = /* @__PURE__ */ e(
|
|
7012
7009
|
ne,
|
|
7013
7010
|
{
|
|
7014
7011
|
component: "button",
|
|
7015
|
-
onClick: be ? void 0 : () =>
|
|
7016
|
-
onMouseEnter: be ? void 0 : () =>
|
|
7012
|
+
onClick: be ? void 0 : () => B(Z),
|
|
7013
|
+
onMouseEnter: be ? void 0 : () => H(Z),
|
|
7017
7014
|
className: pe.join(" "),
|
|
7018
7015
|
sx: {
|
|
7019
7016
|
border: "none",
|
|
@@ -7047,12 +7044,12 @@ const $d = ["S", "M", "T", "W", "T", "F", "S"], La = {
|
|
|
7047
7044
|
);
|
|
7048
7045
|
}
|
|
7049
7046
|
return z;
|
|
7050
|
-
}, [
|
|
7047
|
+
}, [T, w, k, I, F, M, W, U, j, R, A, B, H, u]);
|
|
7051
7048
|
return /* @__PURE__ */ d(
|
|
7052
7049
|
ne,
|
|
7053
7050
|
{
|
|
7054
7051
|
className: "mini-calendar",
|
|
7055
|
-
onMouseLeave:
|
|
7052
|
+
onMouseLeave: V,
|
|
7056
7053
|
sx: {
|
|
7057
7054
|
"--cell-size": `${p.cellSize}px`,
|
|
7058
7055
|
"--font-size": `${p.fontSize}px`,
|
|
@@ -7094,7 +7091,7 @@ const $d = ["S", "M", "T", "W", "T", "F", "S"], La = {
|
|
|
7094
7091
|
/* @__PURE__ */ e(
|
|
7095
7092
|
xa,
|
|
7096
7093
|
{
|
|
7097
|
-
value:
|
|
7094
|
+
value: T,
|
|
7098
7095
|
onChange: N,
|
|
7099
7096
|
variant: "standard",
|
|
7100
7097
|
disableUnderline: !0,
|
|
@@ -7286,17 +7283,17 @@ const Ld = {
|
|
|
7286
7283
|
const h = te(() => ({
|
|
7287
7284
|
...Ld,
|
|
7288
7285
|
...u
|
|
7289
|
-
}), [u]), C = le(null), [
|
|
7286
|
+
}), [u]), C = le(null), [T, w] = L(null), [k, I] = L("calendar"), [g, E] = L(null), [_, D] = L(null), N = le(null), [R, A] = L(() => h.lastPreset || "mtd"), [F, M] = L(null), [W, U] = L(null), [j, B] = L(null), [H, V] = L(null), [G, z] = L(null), [Y, Z] = L(() => a ? x ?? h.compareEnabled ?? !1 : !1), K = x ?? Y, X = S(($) => {
|
|
7290
7287
|
Z($), v?.($);
|
|
7291
|
-
}, [v]), [ee, fe] = L("A"), [de, be] = L(() => h.lastPresetB ?? null), [se, oe] = L(null), [pe, Me] = L(null), [Se, we] = L(null), [ze, ke] = L(null), [me, xe] = L(null), [je, Ke] = L(null), [ae, Ne] = L(null), [Le, $e] = L(null), [ve, Pe] = L(null), [vt, He] = L(null), [Tt, We] = L(null), [Ie, dt] = L(1), [tt, Xe] = L(!1), [Gn, Vn] = L(void 0), Be =
|
|
7292
|
-
const $ = m || tr,
|
|
7288
|
+
}, [v]), [ee, fe] = L("A"), [de, be] = L(() => h.lastPresetB ?? null), [se, oe] = L(null), [pe, Me] = L(null), [Se, we] = L(null), [ze, ke] = L(null), [me, xe] = L(null), [je, Ke] = L(null), [ae, Ne] = L(null), [Le, $e] = L(null), [ve, Pe] = L(null), [vt, He] = L(null), [Tt, We] = L(null), [Ie, dt] = L(1), [tt, Xe] = L(!1), [Gn, Vn] = L(void 0), Be = j !== null ? j : R, Et = j !== null ? H : F, ut = j !== null ? G : W, it = Se !== null ? Se : de, Mt = Se !== null ? ze : se, Pt = Se !== null ? me : pe, lt = ve !== null ? ve : je, Bt = ve !== null ? vt : ae, Rt = ve !== null ? Tt : Le, aa = j !== null && (j !== R || H !== F || G !== W), [ge, br] = L(() => {
|
|
7289
|
+
const $ = m || tr, O = f || [], Q = new Set(O.map((ue) => ue.id)), re = $.filter((ue) => !Q.has(ue.id)).map((ue) => ({ ...ue, active: xt(ue) })), ie = O.map((ue) => ({
|
|
7293
7290
|
...ue,
|
|
7294
7291
|
active: xt(ue)
|
|
7295
7292
|
}));
|
|
7296
7293
|
return [...re, ...ie].sort((ue, Ae) => ue.startDate.getTime() - Ae.startDate.getTime());
|
|
7297
7294
|
});
|
|
7298
7295
|
ce(() => {
|
|
7299
|
-
const $ = m || tr,
|
|
7296
|
+
const $ = m || tr, O = f || [], Q = new Set(O.map((ue) => ue.id)), re = $.filter((ue) => !Q.has(ue.id)).map((ue) => ({ ...ue, active: xt(ue) })), ie = O.map((ue) => ({
|
|
7300
7297
|
...ue,
|
|
7301
7298
|
active: xt(ue)
|
|
7302
7299
|
}));
|
|
@@ -7310,22 +7307,22 @@ const Ld = {
|
|
|
7310
7307
|
}), { pastAndCurrentEvents: yr, futureEvents: vr } = te(() => {
|
|
7311
7308
|
const $ = /* @__PURE__ */ new Date();
|
|
7312
7309
|
$.setHours(0, 0, 0, 0);
|
|
7313
|
-
const
|
|
7310
|
+
const O = [], Q = [];
|
|
7314
7311
|
return ge.forEach((re) => {
|
|
7315
|
-
re.startDate > $ ? Q.push(re) :
|
|
7316
|
-
}), { pastAndCurrentEvents:
|
|
7312
|
+
re.startDate > $ ? Q.push(re) : O.push(re);
|
|
7313
|
+
}), { pastAndCurrentEvents: O, futureEvents: Q };
|
|
7317
7314
|
}, [ge]), { defaultMarketEvents: na, customRanges: sa, futureDefaultEvents: Zt, futureCustomRanges: oa } = te(() => {
|
|
7318
|
-
const $ = m || tr,
|
|
7315
|
+
const $ = m || tr, O = new Set($.map((Q) => Q.id));
|
|
7319
7316
|
return {
|
|
7320
|
-
defaultMarketEvents: yr.filter((Q) => !Q.isCustom &&
|
|
7321
|
-
customRanges: yr.filter((Q) => Q.isCustom || !
|
|
7322
|
-
futureDefaultEvents: vr.filter((Q) => !Q.isCustom &&
|
|
7323
|
-
futureCustomRanges: vr.filter((Q) => Q.isCustom || !
|
|
7317
|
+
defaultMarketEvents: yr.filter((Q) => !Q.isCustom && O.has(Q.id)),
|
|
7318
|
+
customRanges: yr.filter((Q) => Q.isCustom || !O.has(Q.id)),
|
|
7319
|
+
futureDefaultEvents: vr.filter((Q) => !Q.isCustom && O.has(Q.id)),
|
|
7320
|
+
futureCustomRanges: vr.filter((Q) => Q.isCustom || !O.has(Q.id))
|
|
7324
7321
|
};
|
|
7325
|
-
}, [yr, vr, m]), mt = o || !!
|
|
7322
|
+
}, [yr, vr, m]), mt = o || !!T;
|
|
7326
7323
|
ce(() => {
|
|
7327
|
-
o &&
|
|
7328
|
-
}, [o,
|
|
7324
|
+
o && j === null && (B(R), V(F), z(W));
|
|
7325
|
+
}, [o, j, R, F, W]);
|
|
7329
7326
|
const Ge = te(
|
|
7330
7327
|
() => ge.find(($) => $.active),
|
|
7331
7328
|
[ge]
|
|
@@ -7342,8 +7339,8 @@ const Ld = {
|
|
|
7342
7339
|
r && !Array.isArray(r) && "rangeA" in r && r.rangeB && X(!0);
|
|
7343
7340
|
}, [r, X]), ce(() => {
|
|
7344
7341
|
if (!rt.start || !rt.end) return;
|
|
7345
|
-
const $ = /* @__PURE__ */ new Date(),
|
|
7346
|
-
|
|
7342
|
+
const $ = /* @__PURE__ */ new Date(), O = new Date(rt.start);
|
|
7343
|
+
O.setHours(0, 0, 0, 0);
|
|
7347
7344
|
const Q = new Date(rt.end);
|
|
7348
7345
|
Q.setHours(0, 0, 0, 0);
|
|
7349
7346
|
let re = null;
|
|
@@ -7351,109 +7348,109 @@ const Ld = {
|
|
|
7351
7348
|
const ie = Ye(h.lastPreset, $), ue = new Date(ie.start);
|
|
7352
7349
|
ue.setHours(0, 0, 0, 0);
|
|
7353
7350
|
const Ae = new Date(ie.end);
|
|
7354
|
-
Ae.setHours(0, 0, 0, 0),
|
|
7351
|
+
Ae.setHours(0, 0, 0, 0), O.getTime() === ue.getTime() && Q.getTime() === Ae.getTime() && (re = h.lastPreset);
|
|
7355
7352
|
}
|
|
7356
7353
|
if (!re) {
|
|
7357
7354
|
const ie = rr(rt.start, rt.end, $, ge);
|
|
7358
7355
|
re = ie ? ie.id : null;
|
|
7359
7356
|
}
|
|
7360
|
-
re ? (A(re), M(null), U(null)) : (A("custom"), M(rt.start), U(rt.end)),
|
|
7357
|
+
re ? (A(re), M(null), U(null)) : (A("custom"), M(rt.start), U(rt.end)), B(null), V(null), z(null);
|
|
7361
7358
|
}, [rt.start?.getTime(), rt.end?.getTime(), ge, h.lastPreset]);
|
|
7362
7359
|
const Kn = te(() => {
|
|
7363
|
-
let $,
|
|
7364
|
-
if (R === "custom" &&
|
|
7365
|
-
$ =
|
|
7360
|
+
let $, O;
|
|
7361
|
+
if (R === "custom" && F && W)
|
|
7362
|
+
$ = F, O = W;
|
|
7366
7363
|
else {
|
|
7367
7364
|
const re = ge.find((ie) => ie.id === R);
|
|
7368
7365
|
if (re)
|
|
7369
|
-
$ = re.startDate,
|
|
7366
|
+
$ = re.startDate, O = re.endDate;
|
|
7370
7367
|
else {
|
|
7371
7368
|
const ie = Ye(R);
|
|
7372
|
-
$ = ie.start,
|
|
7369
|
+
$ = ie.start, O = ie.end;
|
|
7373
7370
|
}
|
|
7374
7371
|
}
|
|
7375
|
-
return Ft($,
|
|
7376
|
-
}, [R,
|
|
7372
|
+
return Ft($, O, /* @__PURE__ */ new Date(), ge).display;
|
|
7373
|
+
}, [R, F, W, ge]), Yn = te(() => {
|
|
7377
7374
|
if (!K || !de) return null;
|
|
7378
|
-
let $,
|
|
7375
|
+
let $, O;
|
|
7379
7376
|
if (de === "custom" && se && pe)
|
|
7380
|
-
$ = se,
|
|
7377
|
+
$ = se, O = pe;
|
|
7381
7378
|
else {
|
|
7382
7379
|
const re = ge.find((ie) => ie.id === de);
|
|
7383
7380
|
if (re)
|
|
7384
|
-
$ = re.startDate,
|
|
7381
|
+
$ = re.startDate, O = re.endDate;
|
|
7385
7382
|
else {
|
|
7386
7383
|
const ie = Ye(de);
|
|
7387
|
-
$ = ie.start,
|
|
7384
|
+
$ = ie.start, O = ie.end;
|
|
7388
7385
|
}
|
|
7389
7386
|
}
|
|
7390
|
-
return Ft($,
|
|
7387
|
+
return Ft($, O, /* @__PURE__ */ new Date(), ge).display;
|
|
7391
7388
|
}, [K, de, se, pe, ge]), ia = te(() => {
|
|
7392
|
-
const $ = ["7d", "30d", "60d", "90d", "mtd", "qtd", "ytd", "lytd"],
|
|
7393
|
-
if (
|
|
7394
|
-
return pt(
|
|
7389
|
+
const $ = ["7d", "30d", "60d", "90d", "mtd", "qtd", "ytd", "lytd"], O = ge.find((Q) => Q.id === R);
|
|
7390
|
+
if (O)
|
|
7391
|
+
return pt(O.startDate, O.endDate, /* @__PURE__ */ new Date());
|
|
7395
7392
|
if ($.includes(R)) {
|
|
7396
7393
|
const { start: Q, end: re } = Ye(R);
|
|
7397
7394
|
return pt(Q, re, /* @__PURE__ */ new Date());
|
|
7398
7395
|
}
|
|
7399
7396
|
return "";
|
|
7400
7397
|
}, [R, ge]), la = te(() => {
|
|
7401
|
-
let $,
|
|
7398
|
+
let $, O;
|
|
7402
7399
|
if (Be === "custom" && Et && ut)
|
|
7403
|
-
$ = Et,
|
|
7400
|
+
$ = Et, O = ut;
|
|
7404
7401
|
else {
|
|
7405
7402
|
const ie = ge.find((ue) => ue.id === Be);
|
|
7406
7403
|
if (ie)
|
|
7407
|
-
$ = ie.startDate,
|
|
7404
|
+
$ = ie.startDate, O = ie.endDate;
|
|
7408
7405
|
else {
|
|
7409
7406
|
const ue = Ye(Be);
|
|
7410
|
-
$ = ue.start,
|
|
7407
|
+
$ = ue.start, O = ue.end;
|
|
7411
7408
|
}
|
|
7412
7409
|
}
|
|
7413
|
-
const Q = Ft($,
|
|
7410
|
+
const Q = Ft($, O, /* @__PURE__ */ new Date(), ge), re = pt($, O, /* @__PURE__ */ new Date());
|
|
7414
7411
|
return Q.preset ? `${Q.preset.label} (${re})` : re;
|
|
7415
7412
|
}, [Be, Et, ut, ge]);
|
|
7416
7413
|
te(() => {
|
|
7417
7414
|
if (!K || !it) return null;
|
|
7418
|
-
let $,
|
|
7415
|
+
let $, O;
|
|
7419
7416
|
if (it === "custom" && Mt && Pt)
|
|
7420
|
-
$ = Mt,
|
|
7417
|
+
$ = Mt, O = Pt;
|
|
7421
7418
|
else {
|
|
7422
7419
|
const ie = ge.find((ue) => ue.id === it);
|
|
7423
7420
|
if (ie)
|
|
7424
|
-
$ = ie.startDate,
|
|
7421
|
+
$ = ie.startDate, O = ie.endDate;
|
|
7425
7422
|
else {
|
|
7426
7423
|
const ue = Ye(it);
|
|
7427
|
-
$ = ue.start,
|
|
7424
|
+
$ = ue.start, O = ue.end;
|
|
7428
7425
|
}
|
|
7429
7426
|
}
|
|
7430
|
-
const Q = Ft($,
|
|
7427
|
+
const Q = Ft($, O, /* @__PURE__ */ new Date(), ge), re = pt($, O, /* @__PURE__ */ new Date());
|
|
7431
7428
|
return Q.preset ? `${Q.preset.label} (${re})` : re;
|
|
7432
7429
|
}, [K, it, Mt, Pt, ge]), te(() => {
|
|
7433
7430
|
if (!K || Ie < 3 || !lt) return null;
|
|
7434
|
-
let $,
|
|
7431
|
+
let $, O;
|
|
7435
7432
|
if (lt === "custom" && Bt && Rt)
|
|
7436
|
-
$ = Bt,
|
|
7433
|
+
$ = Bt, O = Rt;
|
|
7437
7434
|
else {
|
|
7438
7435
|
const ie = ge.find((ue) => ue.id === lt);
|
|
7439
7436
|
if (ie)
|
|
7440
|
-
$ = ie.startDate,
|
|
7437
|
+
$ = ie.startDate, O = ie.endDate;
|
|
7441
7438
|
else {
|
|
7442
7439
|
const ue = Ye(lt);
|
|
7443
|
-
$ = ue.start,
|
|
7440
|
+
$ = ue.start, O = ue.end;
|
|
7444
7441
|
}
|
|
7445
7442
|
}
|
|
7446
|
-
const Q = Ft($,
|
|
7443
|
+
const Q = Ft($, O, /* @__PURE__ */ new Date(), ge), re = pt($, O, /* @__PURE__ */ new Date());
|
|
7447
7444
|
return Q.preset ? `${Q.preset.label} (${re})` : re;
|
|
7448
7445
|
}, [K, Ie, lt, Bt, Rt, ge]);
|
|
7449
7446
|
const Un = S(($) => {
|
|
7450
|
-
|
|
7451
|
-
}, [R,
|
|
7452
|
-
const re = [$,
|
|
7447
|
+
B(R), V(F), z(W), K && (we(de), ke(se), xe(pe), Ie >= 3 && (Pe(je), He(ae), We(Le))), w($.currentTarget);
|
|
7448
|
+
}, [R, F, W, K, Ie, de, se, pe, je, ae, Le]), ca = S(($, O, Q) => {
|
|
7449
|
+
const re = [$, O];
|
|
7453
7450
|
Q && (re.shortcutId = ar(Q)), t(re);
|
|
7454
|
-
}, [t]), Jt = S(($,
|
|
7455
|
-
if ($ === "custom" &&
|
|
7456
|
-
return [
|
|
7451
|
+
}, [t]), Jt = S(($, O, Q) => {
|
|
7452
|
+
if ($ === "custom" && O && Q)
|
|
7453
|
+
return [O, Q];
|
|
7457
7454
|
const re = ge.find((Ae) => Ae.id === $);
|
|
7458
7455
|
if (re)
|
|
7459
7456
|
return [re.startDate, re.endDate];
|
|
@@ -7462,22 +7459,22 @@ const Ld = {
|
|
|
7462
7459
|
}, [ge]), at = S(($) => {
|
|
7463
7460
|
p && p({ ...h, ...$ });
|
|
7464
7461
|
}, [p, h]), Qt = S(() => {
|
|
7465
|
-
if (
|
|
7466
|
-
A(
|
|
7467
|
-
const $ = Jt(
|
|
7462
|
+
if (j === null) return;
|
|
7463
|
+
A(j), M(H), U(G);
|
|
7464
|
+
const $ = Jt(j, H, G);
|
|
7468
7465
|
if (K && Ie >= 2 && Se !== null) {
|
|
7469
7466
|
be(Se), oe(ze), Me(me);
|
|
7470
|
-
const
|
|
7467
|
+
const O = Jt(Se, ze, me), Q = {
|
|
7471
7468
|
rangeA: $,
|
|
7472
|
-
rangeB:
|
|
7473
|
-
shortcutId: ar(
|
|
7469
|
+
rangeB: O,
|
|
7470
|
+
shortcutId: ar(j),
|
|
7474
7471
|
shortcutIdB: ar(Se)
|
|
7475
7472
|
};
|
|
7476
7473
|
if (Ie >= 3 && ve !== null) {
|
|
7477
7474
|
Ke(ve), Ne(vt), $e(Tt);
|
|
7478
7475
|
const re = Jt(ve, vt, Tt);
|
|
7479
7476
|
Q.rangeC = re, Q.shortcutIdC = ar(ve), at({
|
|
7480
|
-
lastPreset:
|
|
7477
|
+
lastPreset: j,
|
|
7481
7478
|
compareEnabled: !0,
|
|
7482
7479
|
rangeCount: Ie,
|
|
7483
7480
|
lastPresetB: Se,
|
|
@@ -7485,7 +7482,7 @@ const Ld = {
|
|
|
7485
7482
|
});
|
|
7486
7483
|
} else
|
|
7487
7484
|
at({
|
|
7488
|
-
lastPreset:
|
|
7485
|
+
lastPreset: j,
|
|
7489
7486
|
compareEnabled: !0,
|
|
7490
7487
|
rangeCount: Ie,
|
|
7491
7488
|
lastPresetB: Se,
|
|
@@ -7494,21 +7491,21 @@ const Ld = {
|
|
|
7494
7491
|
t(Q);
|
|
7495
7492
|
} else
|
|
7496
7493
|
at({
|
|
7497
|
-
lastPreset:
|
|
7494
|
+
lastPreset: j,
|
|
7498
7495
|
compareEnabled: !1,
|
|
7499
7496
|
rangeCount: 1,
|
|
7500
7497
|
lastPresetB: null,
|
|
7501
7498
|
lastPresetC: null
|
|
7502
|
-
}), ca($[0], $[1],
|
|
7503
|
-
}, [
|
|
7504
|
-
o || (aa && Qt(),
|
|
7499
|
+
}), ca($[0], $[1], j);
|
|
7500
|
+
}, [j, H, G, K, Ie, Se, ze, me, ve, vt, Tt, Jt, t, ca, at]), Xn = S(() => {
|
|
7501
|
+
o || (aa && Qt(), B(null), V(null), z(null), we(null), ke(null), xe(null), Pe(null), He(null), We(null), D(null), w(null));
|
|
7505
7502
|
}, [o, aa, Qt]), da = S(() => {
|
|
7506
|
-
o || (
|
|
7503
|
+
o || (B(null), V(null), z(null), we(null), ke(null), xe(null), Pe(null), He(null), We(null), D(null), w(null));
|
|
7507
7504
|
}, [o]), ua = S(() => {
|
|
7508
7505
|
if (Ie >= 3) return;
|
|
7509
|
-
const $ =
|
|
7506
|
+
const $ = j !== null ? j : R;
|
|
7510
7507
|
Ie === 1 ? (X(!0), dt(2), we($), fe("B"), Xe(!0)) : Ie === 2 && (dt(3), Pe($), fe("C"));
|
|
7511
|
-
}, [Ie,
|
|
7508
|
+
}, [Ie, j, R, X]), ma = S(($) => {
|
|
7512
7509
|
$ === "C" ? (dt(2), Pe(null), He(null), We(null), Ke(null), Ne(null), $e(null), ee === "C" && fe("B")) : $ === "B" && Ie === 2 && (X(!1), dt(1), we(null), ke(null), xe(null), be(null), oe(null), Me(null), fe("A"), Xe(!1), at({
|
|
7513
7510
|
compareEnabled: !1,
|
|
7514
7511
|
rangeCount: 1,
|
|
@@ -7523,49 +7520,49 @@ const Ld = {
|
|
|
7523
7520
|
lastPresetC: null
|
|
7524
7521
|
});
|
|
7525
7522
|
}, [X, at]), _r = S(($) => {
|
|
7526
|
-
N.current && (clearTimeout(N.current), N.current = null), D(null), K && ee === "C" ? (Pe($), He(null), We(null)) : K && ee === "B" ? (we($), ke(null), xe(null)) : (
|
|
7523
|
+
N.current && (clearTimeout(N.current), N.current = null), D(null), K && ee === "C" ? (Pe($), He(null), We(null)) : K && ee === "B" ? (we($), ke(null), xe(null)) : (B($), V(null), z(null));
|
|
7527
7524
|
}, [K, ee]), $t = S(($) => {
|
|
7528
7525
|
if (!ge.find((re) => re.id === $)) return;
|
|
7529
7526
|
const Q = h.pinnedPreset || "mtd";
|
|
7530
|
-
K && ee === "C" ? (Pe((ve !== null ? ve : je) === $ ? Q : $), He(null), We(null)) : K && ee === "B" ? (we((Se !== null ? Se : de) === $ ? Q : $), ke(null), xe(null)) : (
|
|
7531
|
-
}, [ge, K, ee, h.pinnedPreset,
|
|
7527
|
+
K && ee === "C" ? (Pe((ve !== null ? ve : je) === $ ? Q : $), He(null), We(null)) : K && ee === "B" ? (we((Se !== null ? Se : de) === $ ? Q : $), ke(null), xe(null)) : (B((j !== null ? j : R) === $ ? Q : $), V(null), z(null));
|
|
7528
|
+
}, [ge, K, ee, h.pinnedPreset, j, R, Se, de, ve, je]), Zn = S(($, O) => {
|
|
7532
7529
|
if (K && ee === "C")
|
|
7533
|
-
if (He($),
|
|
7534
|
-
We(
|
|
7535
|
-
const Q = rr($,
|
|
7530
|
+
if (He($), O) {
|
|
7531
|
+
We(O);
|
|
7532
|
+
const Q = rr($, O, /* @__PURE__ */ new Date(), ge);
|
|
7536
7533
|
Q ? (Pe(Q.id), He(null), We(null)) : Pe("custom");
|
|
7537
7534
|
} else
|
|
7538
7535
|
Pe("custom"), We(null);
|
|
7539
7536
|
else if (K && ee === "B")
|
|
7540
|
-
if (ke($),
|
|
7541
|
-
xe(
|
|
7542
|
-
const Q = rr($,
|
|
7537
|
+
if (ke($), O) {
|
|
7538
|
+
xe(O);
|
|
7539
|
+
const Q = rr($, O, /* @__PURE__ */ new Date(), ge);
|
|
7543
7540
|
Q ? (we(Q.id), ke(null), xe(null)) : we("custom");
|
|
7544
7541
|
} else
|
|
7545
7542
|
we("custom"), xe(null);
|
|
7546
|
-
else if (
|
|
7547
|
-
z(
|
|
7548
|
-
const Q = rr($,
|
|
7549
|
-
Q ? (
|
|
7543
|
+
else if (V($), O) {
|
|
7544
|
+
z(O);
|
|
7545
|
+
const Q = rr($, O, /* @__PURE__ */ new Date(), ge);
|
|
7546
|
+
Q ? (B(Q.id), V(null), z(null)) : B("custom");
|
|
7550
7547
|
} else
|
|
7551
|
-
|
|
7548
|
+
B("custom"), z(null);
|
|
7552
7549
|
}, [ge, K, ee]), pa = S(($) => {
|
|
7553
|
-
at({ pinnedPreset: $ }), K && ee === "C" ? (Pe($), He(null), We(null)) : K && ee === "B" ? (we($), ke(null), xe(null)) : (
|
|
7554
|
-
}, [K, ee, at]), fa = S(($,
|
|
7555
|
-
N.current && (clearTimeout(N.current), N.current = null),
|
|
7550
|
+
at({ pinnedPreset: $ }), K && ee === "C" ? (Pe($), He(null), We(null)) : K && ee === "B" ? (we($), ke(null), xe(null)) : (B($), V(null), z(null));
|
|
7551
|
+
}, [K, ee, at]), fa = S(($, O) => {
|
|
7552
|
+
N.current && (clearTimeout(N.current), N.current = null), O ? D($) : N.current = setTimeout(() => {
|
|
7556
7553
|
D(null);
|
|
7557
7554
|
}, 150);
|
|
7558
7555
|
}, []), ga = S(() => {
|
|
7559
|
-
Qt(),
|
|
7556
|
+
Qt(), B(null), V(null), z(null), w(null);
|
|
7560
7557
|
}, [Qt]), Jn = S(() => {
|
|
7561
7558
|
let $;
|
|
7562
7559
|
if (Be === "custom" && ut)
|
|
7563
7560
|
$ = ut;
|
|
7564
7561
|
else {
|
|
7565
|
-
const
|
|
7566
|
-
|
|
7562
|
+
const O = ge.find((Q) => Q.id === Be);
|
|
7563
|
+
O ? $ = O.endDate : $ = Ye(Be).end;
|
|
7567
7564
|
}
|
|
7568
|
-
|
|
7565
|
+
I("calendar"), Vn(new Date($));
|
|
7569
7566
|
}, [Be, ut, ge]);
|
|
7570
7567
|
ce(() => {
|
|
7571
7568
|
g && zt({
|
|
@@ -7578,14 +7575,14 @@ const Ld = {
|
|
|
7578
7575
|
const Qn = S(() => {
|
|
7579
7576
|
const $ = /* @__PURE__ */ new Date();
|
|
7580
7577
|
$.setDate($.getDate() + 1);
|
|
7581
|
-
const
|
|
7582
|
-
|
|
7578
|
+
const O = new Date($);
|
|
7579
|
+
O.setDate(O.getDate() + 6), E({
|
|
7583
7580
|
id: "",
|
|
7584
7581
|
// empty ID indicates new market
|
|
7585
7582
|
isNew: !0,
|
|
7586
7583
|
label: "",
|
|
7587
7584
|
startDate: $,
|
|
7588
|
-
endDate:
|
|
7585
|
+
endDate: O,
|
|
7589
7586
|
location: ""
|
|
7590
7587
|
});
|
|
7591
7588
|
}, []), es = S(() => {
|
|
@@ -7598,7 +7595,7 @@ const Ld = {
|
|
|
7598
7595
|
location: Fe.location,
|
|
7599
7596
|
isCustom: !0
|
|
7600
7597
|
};
|
|
7601
|
-
b?.($), br((
|
|
7598
|
+
b?.($), br((O) => [...O.filter((ie) => ie.id !== $.id), { ...$, active: xt($) }].sort((ie, ue) => ie.startDate.getTime() - ue.startDate.getTime())), E(null);
|
|
7602
7599
|
}, [g, Fe, b]), ts = S(() => {
|
|
7603
7600
|
if (!g || g.isNew) {
|
|
7604
7601
|
E(null);
|
|
@@ -7606,8 +7603,8 @@ const Ld = {
|
|
|
7606
7603
|
}
|
|
7607
7604
|
g.isCustom && y?.(g.id);
|
|
7608
7605
|
const $ = m || tr;
|
|
7609
|
-
br((
|
|
7610
|
-
const Q =
|
|
7606
|
+
br((O) => {
|
|
7607
|
+
const Q = O.filter((ie) => ie.id !== g.id), re = $.find((ie) => ie.id === g.id);
|
|
7611
7608
|
return re && !g.isCustom ? [...Q, { ...re, active: xt(re) }].sort((ie, ue) => ie.startDate.getTime() - ue.startDate.getTime()) : Q;
|
|
7612
7609
|
}), E(null);
|
|
7613
7610
|
}, [g, y, m]), ht = ($) => Be === $;
|
|
@@ -7619,16 +7616,16 @@ const Ld = {
|
|
|
7619
7616
|
if (!$) return "Select...";
|
|
7620
7617
|
if ($ === "custom") return "Custom";
|
|
7621
7618
|
if ($ === "today") return "Today";
|
|
7622
|
-
const
|
|
7623
|
-
if (
|
|
7619
|
+
const O = Sr.find((ie) => ie.id === $);
|
|
7620
|
+
if (O) return O.label;
|
|
7624
7621
|
const Q = Cr.find((ie) => ie.id === $);
|
|
7625
7622
|
if (Q) return Q.label;
|
|
7626
7623
|
const re = ge.find((ie) => ie.id === $);
|
|
7627
7624
|
return re ? re.label : $;
|
|
7628
|
-
}, [ge]), xr = S(($,
|
|
7625
|
+
}, [ge]), xr = S(($, O, Q) => {
|
|
7629
7626
|
let re, ie;
|
|
7630
|
-
if ($ === "custom" &&
|
|
7631
|
-
re =
|
|
7627
|
+
if ($ === "custom" && O && Q)
|
|
7628
|
+
re = O, ie = Q;
|
|
7632
7629
|
else {
|
|
7633
7630
|
const ue = ge.find((Ae) => Ae.id === $);
|
|
7634
7631
|
if (ue)
|
|
@@ -7642,21 +7639,21 @@ const Ld = {
|
|
|
7642
7639
|
}, [ge]), rs = S(() => {
|
|
7643
7640
|
Xe(($) => !$);
|
|
7644
7641
|
}, []), as = S(() => {
|
|
7645
|
-
const $ =
|
|
7642
|
+
const $ = j !== null ? j : R;
|
|
7646
7643
|
X(!0), dt(2), we($), fe("B"), Xe(!0);
|
|
7647
|
-
}, [
|
|
7644
|
+
}, [j, R, X]), Nr = S(({ label: $, isActive: O, presetName: Q, dateRange: re, color: ie, onSelect: ue, onRemove: Ae }) => {
|
|
7648
7645
|
const ya = !Q || Q === "Select...";
|
|
7649
7646
|
return /* @__PURE__ */ d(
|
|
7650
7647
|
ne,
|
|
7651
7648
|
{
|
|
7652
|
-
className: `range-card range-card--${ie} ${
|
|
7649
|
+
className: `range-card range-card--${ie} ${O ? "range-card--active" : ""} ${ya ? "range-card--empty" : ""}`,
|
|
7653
7650
|
onClick: ue,
|
|
7654
7651
|
children: [
|
|
7655
7652
|
/* @__PURE__ */ e(ne, { className: "range-card__color-bar" }),
|
|
7656
7653
|
/* @__PURE__ */ d(ne, { className: "range-card__content", children: [
|
|
7657
7654
|
/* @__PURE__ */ d(ne, { className: "range-card__header", children: [
|
|
7658
7655
|
/* @__PURE__ */ e(Te, { className: "range-card__label", children: $ }),
|
|
7659
|
-
/* @__PURE__ */ e(ne, { className: `range-card__indicator ${
|
|
7656
|
+
/* @__PURE__ */ e(ne, { className: `range-card__indicator ${O ? "range-card__indicator--active" : ""}` })
|
|
7660
7657
|
] }),
|
|
7661
7658
|
ya ? /* @__PURE__ */ e(Te, { className: "range-card__preset", sx: { color: "#9ca3af", fontStyle: "italic" }, children: "Select a date range" }) : /* @__PURE__ */ d(Ve, { children: [
|
|
7662
7659
|
/* @__PURE__ */ e(Te, { className: "range-card__preset", children: Q }),
|
|
@@ -7811,8 +7808,8 @@ const Ld = {
|
|
|
7811
7808
|
{
|
|
7812
7809
|
className: "active-market-edit-button",
|
|
7813
7810
|
size: "small",
|
|
7814
|
-
onClick: (
|
|
7815
|
-
|
|
7811
|
+
onClick: (O) => {
|
|
7812
|
+
O.stopPropagation(), E(Ge);
|
|
7816
7813
|
},
|
|
7817
7814
|
sx: {
|
|
7818
7815
|
p: 0.5,
|
|
@@ -7875,7 +7872,7 @@ const Ld = {
|
|
|
7875
7872
|
qe,
|
|
7876
7873
|
{
|
|
7877
7874
|
size: "small",
|
|
7878
|
-
onClick: () =>
|
|
7875
|
+
onClick: () => I("calendar"),
|
|
7879
7876
|
color: k === "calendar" ? "primary" : "default",
|
|
7880
7877
|
sx: { p: 0.5 },
|
|
7881
7878
|
children: /* @__PURE__ */ e(Na, { sx: { fontSize: 16 } })
|
|
@@ -7885,7 +7882,7 @@ const Ld = {
|
|
|
7885
7882
|
qe,
|
|
7886
7883
|
{
|
|
7887
7884
|
size: "small",
|
|
7888
|
-
onClick: () =>
|
|
7885
|
+
onClick: () => I("markets"),
|
|
7889
7886
|
color: k === "markets" ? "primary" : "default",
|
|
7890
7887
|
sx: {
|
|
7891
7888
|
p: 0.5,
|
|
@@ -7914,12 +7911,12 @@ const Ld = {
|
|
|
7914
7911
|
] }),
|
|
7915
7912
|
/* @__PURE__ */ d(ne, { className: "hybrid-date-picker__content", children: [
|
|
7916
7913
|
k === "calendar" && (() => {
|
|
7917
|
-
const
|
|
7914
|
+
const O = K && ee === "C" ? lt : K && ee === "B" ? it : Be, Q = K && ee === "C" ? Bt : K && ee === "B" ? Mt : Et, re = K && ee === "C" ? Rt : K && ee === "B" ? Pt : ut;
|
|
7918
7915
|
return /* @__PURE__ */ e(
|
|
7919
7916
|
Mn,
|
|
7920
7917
|
{
|
|
7921
|
-
selectedStart:
|
|
7922
|
-
selectedEnd:
|
|
7918
|
+
selectedStart: O === "custom" && Q ? Q : ge.find((ie) => ie.id === O)?.startDate ?? Ye(O || "mtd").start,
|
|
7919
|
+
selectedEnd: O === "custom" ? re : ge.find((ie) => ie.id === O)?.endDate ?? Ye(O || "mtd").end,
|
|
7923
7920
|
onSelect: Zn,
|
|
7924
7921
|
marketDates: ge,
|
|
7925
7922
|
size: n,
|
|
@@ -7930,15 +7927,15 @@ const Ld = {
|
|
|
7930
7927
|
})(),
|
|
7931
7928
|
k === "markets" && /* @__PURE__ */ d(ne, { className: "hybrid-date-picker__markets-list", children: [
|
|
7932
7929
|
/* @__PURE__ */ e(Te, { className: "hybrid-date-picker__events-section-header", children: "Market Events" }),
|
|
7933
|
-
na.filter((
|
|
7930
|
+
na.filter((O) => !Ge || O.id !== Ge.id).map((O) => /* @__PURE__ */ e(
|
|
7934
7931
|
Lt,
|
|
7935
7932
|
{
|
|
7936
|
-
preset:
|
|
7937
|
-
isSelected: ht(
|
|
7933
|
+
preset: O,
|
|
7934
|
+
isSelected: ht(O.id),
|
|
7938
7935
|
onSelect: $t,
|
|
7939
7936
|
onEdit: E
|
|
7940
7937
|
},
|
|
7941
|
-
|
|
7938
|
+
O.id
|
|
7942
7939
|
)),
|
|
7943
7940
|
Zt.length > 0 && /* @__PURE__ */ d(Ve, { children: [
|
|
7944
7941
|
/* @__PURE__ */ e(
|
|
@@ -7970,28 +7967,28 @@ const Ld = {
|
|
|
7970
7967
|
children: At ? "Hide Upcoming Events" : `Show ${Zt.length} Upcoming Event${Zt.length > 1 ? "s" : ""}`
|
|
7971
7968
|
}
|
|
7972
7969
|
),
|
|
7973
|
-
At && Zt.map((
|
|
7970
|
+
At && Zt.map((O) => /* @__PURE__ */ e(
|
|
7974
7971
|
Lt,
|
|
7975
7972
|
{
|
|
7976
|
-
preset:
|
|
7973
|
+
preset: O,
|
|
7977
7974
|
isSelected: !1,
|
|
7978
7975
|
disabled: !0,
|
|
7979
7976
|
onSelect: $t,
|
|
7980
7977
|
onEdit: E
|
|
7981
7978
|
},
|
|
7982
|
-
|
|
7979
|
+
O.id
|
|
7983
7980
|
))
|
|
7984
7981
|
] }),
|
|
7985
7982
|
/* @__PURE__ */ e(Te, { className: "hybrid-date-picker__events-section-header", children: "Custom Ranges" }),
|
|
7986
|
-
sa.length > 0 ? sa.filter((
|
|
7983
|
+
sa.length > 0 ? sa.filter((O) => !Ge || O.id !== Ge.id).map((O) => /* @__PURE__ */ e(
|
|
7987
7984
|
Lt,
|
|
7988
7985
|
{
|
|
7989
|
-
preset:
|
|
7990
|
-
isSelected: ht(
|
|
7986
|
+
preset: O,
|
|
7987
|
+
isSelected: ht(O.id),
|
|
7991
7988
|
onSelect: $t,
|
|
7992
7989
|
onEdit: E
|
|
7993
7990
|
},
|
|
7994
|
-
|
|
7991
|
+
O.id
|
|
7995
7992
|
)) : /* @__PURE__ */ e(
|
|
7996
7993
|
Te,
|
|
7997
7994
|
{
|
|
@@ -8001,16 +7998,16 @@ const Ld = {
|
|
|
8001
7998
|
children: "No custom ranges saved"
|
|
8002
7999
|
}
|
|
8003
8000
|
),
|
|
8004
|
-
oa.length > 0 && At && oa.map((
|
|
8001
|
+
oa.length > 0 && At && oa.map((O) => /* @__PURE__ */ e(
|
|
8005
8002
|
Lt,
|
|
8006
8003
|
{
|
|
8007
|
-
preset:
|
|
8004
|
+
preset: O,
|
|
8008
8005
|
isSelected: !1,
|
|
8009
8006
|
disabled: !0,
|
|
8010
8007
|
onSelect: $t,
|
|
8011
8008
|
onEdit: E
|
|
8012
8009
|
},
|
|
8013
|
-
|
|
8010
|
+
O.id
|
|
8014
8011
|
)),
|
|
8015
8012
|
/* @__PURE__ */ e(ne, { className: "hybrid-date-picker__markets-list-add", children: /* @__PURE__ */ e(
|
|
8016
8013
|
nt,
|
|
@@ -8058,8 +8055,8 @@ const Ld = {
|
|
|
8058
8055
|
{
|
|
8059
8056
|
component: "span",
|
|
8060
8057
|
className: "hybrid-date-picker__footer-drawer-range-label",
|
|
8061
|
-
onClick: (
|
|
8062
|
-
|
|
8058
|
+
onClick: (O) => {
|
|
8059
|
+
O.stopPropagation(), Xe(!0), fe("A");
|
|
8063
8060
|
},
|
|
8064
8061
|
sx: { ml: 0.5 },
|
|
8065
8062
|
children: [
|
|
@@ -8074,8 +8071,8 @@ const Ld = {
|
|
|
8074
8071
|
{
|
|
8075
8072
|
component: "span",
|
|
8076
8073
|
className: "hybrid-date-picker__footer-drawer-range-label",
|
|
8077
|
-
onClick: (
|
|
8078
|
-
|
|
8074
|
+
onClick: (O) => {
|
|
8075
|
+
O.stopPropagation(), Xe(!0), fe("B");
|
|
8079
8076
|
},
|
|
8080
8077
|
children: [
|
|
8081
8078
|
/* @__PURE__ */ e(ne, { component: "span", sx: { color: "#10B981", fontSize: 10, mr: 0.25, lineHeight: 1 }, children: "●" }),
|
|
@@ -8090,8 +8087,8 @@ const Ld = {
|
|
|
8090
8087
|
{
|
|
8091
8088
|
component: "span",
|
|
8092
8089
|
className: "hybrid-date-picker__footer-drawer-range-label",
|
|
8093
|
-
onClick: (
|
|
8094
|
-
|
|
8090
|
+
onClick: (O) => {
|
|
8091
|
+
O.stopPropagation(), Xe(!0), fe("C");
|
|
8095
8092
|
},
|
|
8096
8093
|
children: [
|
|
8097
8094
|
/* @__PURE__ */ e(ne, { component: "span", sx: { color: "#F59E0B", fontSize: 10, mr: 0.25, lineHeight: 1 }, children: "●" }),
|
|
@@ -8107,8 +8104,8 @@ const Ld = {
|
|
|
8107
8104
|
qe,
|
|
8108
8105
|
{
|
|
8109
8106
|
size: "small",
|
|
8110
|
-
onClick: (
|
|
8111
|
-
|
|
8107
|
+
onClick: (O) => {
|
|
8108
|
+
O.stopPropagation(), ua();
|
|
8112
8109
|
},
|
|
8113
8110
|
title: "Add range",
|
|
8114
8111
|
sx: { p: 0.5 },
|
|
@@ -8119,8 +8116,8 @@ const Ld = {
|
|
|
8119
8116
|
qe,
|
|
8120
8117
|
{
|
|
8121
8118
|
size: "small",
|
|
8122
|
-
onClick: (
|
|
8123
|
-
|
|
8119
|
+
onClick: (O) => {
|
|
8120
|
+
O.stopPropagation(), qn();
|
|
8124
8121
|
},
|
|
8125
8122
|
title: "Exit compare mode",
|
|
8126
8123
|
sx: { p: 0.5 },
|
|
@@ -8252,11 +8249,11 @@ const Ld = {
|
|
|
8252
8249
|
},
|
|
8253
8250
|
title: "Click to view in calendar",
|
|
8254
8251
|
children: (() => {
|
|
8255
|
-
const
|
|
8256
|
-
return
|
|
8257
|
-
|
|
8252
|
+
const O = la.match(/^(.+?)(\s*\(.+\))$/);
|
|
8253
|
+
return O && O[1] && O[1].length > 14 ? /* @__PURE__ */ d(Ve, { children: [
|
|
8254
|
+
O[1],
|
|
8258
8255
|
/* @__PURE__ */ e("br", {}),
|
|
8259
|
-
|
|
8256
|
+
O[2]
|
|
8260
8257
|
] }) : la;
|
|
8261
8258
|
})()
|
|
8262
8259
|
}
|
|
@@ -8300,7 +8297,7 @@ const Ld = {
|
|
|
8300
8297
|
vo,
|
|
8301
8298
|
{
|
|
8302
8299
|
open: mt,
|
|
8303
|
-
anchorEl:
|
|
8300
|
+
anchorEl: T,
|
|
8304
8301
|
onClose: Xn,
|
|
8305
8302
|
disableScrollLock: !0,
|
|
8306
8303
|
anchorOrigin: {
|
|
@@ -8347,7 +8344,7 @@ const Ld = {
|
|
|
8347
8344
|
fullWidth: !0,
|
|
8348
8345
|
size: "small",
|
|
8349
8346
|
value: Fe.label,
|
|
8350
|
-
onChange: ($) => zt((
|
|
8347
|
+
onChange: ($) => zt((O) => ({ ...O, label: $.target.value })),
|
|
8351
8348
|
placeholder: "e.g., Atlanta Market",
|
|
8352
8349
|
sx: { mt: 0.5 }
|
|
8353
8350
|
}
|
|
@@ -8363,7 +8360,7 @@ const Ld = {
|
|
|
8363
8360
|
size: "small",
|
|
8364
8361
|
type: "date",
|
|
8365
8362
|
value: Fe.startDate,
|
|
8366
|
-
onChange: ($) => zt((
|
|
8363
|
+
onChange: ($) => zt((O) => ({ ...O, startDate: $.target.value })),
|
|
8367
8364
|
sx: { mt: 0.5 }
|
|
8368
8365
|
}
|
|
8369
8366
|
)
|
|
@@ -8377,7 +8374,7 @@ const Ld = {
|
|
|
8377
8374
|
size: "small",
|
|
8378
8375
|
type: "date",
|
|
8379
8376
|
value: Fe.endDate,
|
|
8380
|
-
onChange: ($) => zt((
|
|
8377
|
+
onChange: ($) => zt((O) => ({ ...O, endDate: $.target.value })),
|
|
8381
8378
|
sx: { mt: 0.5 }
|
|
8382
8379
|
}
|
|
8383
8380
|
)
|
|
@@ -8391,7 +8388,7 @@ const Ld = {
|
|
|
8391
8388
|
fullWidth: !0,
|
|
8392
8389
|
size: "small",
|
|
8393
8390
|
value: Fe.location,
|
|
8394
|
-
onChange: ($) => zt((
|
|
8391
|
+
onChange: ($) => zt((O) => ({ ...O, location: $.target.value })),
|
|
8395
8392
|
placeholder: "e.g., Atlanta, GA",
|
|
8396
8393
|
sx: { mt: 0.5 }
|
|
8397
8394
|
}
|
|
@@ -8563,8 +8560,8 @@ const Pr = [
|
|
|
8563
8560
|
"button",
|
|
8564
8561
|
{
|
|
8565
8562
|
className: "gloss-timeframe__pin-btn",
|
|
8566
|
-
onClick: (
|
|
8567
|
-
|
|
8563
|
+
onClick: (I) => {
|
|
8564
|
+
I.stopPropagation(), u(C ? null : y);
|
|
8568
8565
|
},
|
|
8569
8566
|
style: { opacity: C ? 1 : 0.6 },
|
|
8570
8567
|
title: C ? "Unpin as default" : "Set as default",
|
|
@@ -8626,7 +8623,7 @@ const Pr = [
|
|
|
8626
8623
|
activePresetId: b,
|
|
8627
8624
|
onPresetChange: y
|
|
8628
8625
|
}) => {
|
|
8629
|
-
const x = o !== void 0, [v, h] = L(!1), [C,
|
|
8626
|
+
const x = o !== void 0, [v, h] = L(!1), [C, T] = L(!1), [w, k] = L(i ?? !1), I = a?.pinnedPreset || "MTD", [g, E] = L(() => a?.lastPreset?.toUpperCase() || "MTD"), [_, D] = L(null), N = te(() => ir(r) ? r.rangeA : r, [r]), R = te(() => ir(r) ? r.rangeB : null, [r]), A = S((G) => {
|
|
8630
8627
|
const z = G || "MTD";
|
|
8631
8628
|
n && a && n({ ...a, pinnedPreset: z.toLowerCase() });
|
|
8632
8629
|
const Y = Pr.find((Z) => Z.id === z && !Z.disabled);
|
|
@@ -8645,7 +8642,7 @@ const Pr = [
|
|
|
8645
8642
|
}, [x, r]), ce(() => {
|
|
8646
8643
|
i !== void 0 && k(i);
|
|
8647
8644
|
}, [i]);
|
|
8648
|
-
const
|
|
8645
|
+
const F = S((G) => {
|
|
8649
8646
|
Promise.resolve().then(() => t(G));
|
|
8650
8647
|
}, [t]), M = le(!1);
|
|
8651
8648
|
ce(() => {
|
|
@@ -8656,12 +8653,12 @@ const Pr = [
|
|
|
8656
8653
|
}
|
|
8657
8654
|
if (w) {
|
|
8658
8655
|
const G = Array.isArray(N) ? N : [null, null];
|
|
8659
|
-
|
|
8656
|
+
F({ rangeA: G, rangeB: R || [null, null] });
|
|
8660
8657
|
} else
|
|
8661
|
-
Array.isArray(N) &&
|
|
8658
|
+
Array.isArray(N) && F(N);
|
|
8662
8659
|
}
|
|
8663
|
-
}, [w, x, N, R,
|
|
8664
|
-
const
|
|
8660
|
+
}, [w, x, N, R, F]);
|
|
8661
|
+
const W = S((G, z) => {
|
|
8665
8662
|
if (z || E(null), w) {
|
|
8666
8663
|
const Y = { rangeA: G, rangeB: R || [null, null] };
|
|
8667
8664
|
z && (Y.shortcutId = z), t(Y);
|
|
@@ -8674,11 +8671,11 @@ const Pr = [
|
|
|
8674
8671
|
z || D(null);
|
|
8675
8672
|
const Y = { rangeA: N || [null, null], rangeB: G };
|
|
8676
8673
|
z && (Y.shortcutId = z), t(Y);
|
|
8677
|
-
}, [t, N]),
|
|
8678
|
-
E(z),
|
|
8679
|
-
}, [
|
|
8680
|
-
D(z), U(G, z),
|
|
8681
|
-
}, [U]),
|
|
8674
|
+
}, [t, N]), j = S((G, z) => {
|
|
8675
|
+
E(z), W(G, z), h(!1);
|
|
8676
|
+
}, [W]), B = S((G, z) => {
|
|
8677
|
+
D(z), U(G, z), T(!1);
|
|
8678
|
+
}, [U]), H = te(() => ({
|
|
8682
8679
|
shortcuts: {
|
|
8683
8680
|
items: Pr.map((G) => ({
|
|
8684
8681
|
label: G.label,
|
|
@@ -8686,16 +8683,16 @@ const Pr = [
|
|
|
8686
8683
|
getValue: G.value,
|
|
8687
8684
|
disabled: G.disabled || !1
|
|
8688
8685
|
})),
|
|
8689
|
-
onChange: (G) =>
|
|
8690
|
-
onShortcutClick:
|
|
8686
|
+
onChange: (G) => W(G),
|
|
8687
|
+
onShortcutClick: j,
|
|
8691
8688
|
value: N,
|
|
8692
8689
|
activeShortcutId: g,
|
|
8693
8690
|
enableCompare: x,
|
|
8694
8691
|
compareEnabled: w,
|
|
8695
|
-
pinnedId:
|
|
8692
|
+
pinnedId: I,
|
|
8696
8693
|
onPinChange: A,
|
|
8697
8694
|
onEnableCompare: () => {
|
|
8698
|
-
k(!0), o?.(!0), h(!1), setTimeout(() =>
|
|
8695
|
+
k(!0), o?.(!0), h(!1), setTimeout(() => T(!0), 0);
|
|
8699
8696
|
}
|
|
8700
8697
|
},
|
|
8701
8698
|
textField: {
|
|
@@ -8715,10 +8712,10 @@ const Pr = [
|
|
|
8715
8712
|
"& .MuiInputAdornment-root": { display: "none !important" }
|
|
8716
8713
|
},
|
|
8717
8714
|
onClick: () => {
|
|
8718
|
-
|
|
8715
|
+
T(!1), h(!0);
|
|
8719
8716
|
}
|
|
8720
8717
|
}
|
|
8721
|
-
}), [N,
|
|
8718
|
+
}), [N, W, j, x, w, I, A, g, o]), V = te(() => ({
|
|
8722
8719
|
shortcuts: {
|
|
8723
8720
|
items: Pr.map((G) => ({
|
|
8724
8721
|
label: G.label,
|
|
@@ -8727,7 +8724,7 @@ const Pr = [
|
|
|
8727
8724
|
disabled: G.disabled || !1
|
|
8728
8725
|
})),
|
|
8729
8726
|
onChange: (G) => U(G),
|
|
8730
|
-
onShortcutClick:
|
|
8727
|
+
onShortcutClick: B,
|
|
8731
8728
|
value: R,
|
|
8732
8729
|
activeShortcutId: _
|
|
8733
8730
|
// No pin functionality for compare range
|
|
@@ -8749,10 +8746,10 @@ const Pr = [
|
|
|
8749
8746
|
"& .MuiInputAdornment-root": { display: "none !important" }
|
|
8750
8747
|
},
|
|
8751
8748
|
onClick: () => {
|
|
8752
|
-
h(!1),
|
|
8749
|
+
h(!1), T(!0);
|
|
8753
8750
|
}
|
|
8754
8751
|
}
|
|
8755
|
-
}), [R, U,
|
|
8752
|
+
}), [R, U, B, _]);
|
|
8756
8753
|
if (f === "simple-selector") {
|
|
8757
8754
|
const G = ir(r) ? r.rangeA : r;
|
|
8758
8755
|
return /* @__PURE__ */ e(
|
|
@@ -8770,18 +8767,18 @@ const Pr = [
|
|
|
8770
8767
|
Sa,
|
|
8771
8768
|
{
|
|
8772
8769
|
value: N || [null, null],
|
|
8773
|
-
onChange: (G) =>
|
|
8770
|
+
onChange: (G) => W(G),
|
|
8774
8771
|
calendars: 1,
|
|
8775
8772
|
disableFuture: !0,
|
|
8776
8773
|
minDate: new Date(2024, 0, 1),
|
|
8777
8774
|
format: "M/d",
|
|
8778
8775
|
open: v,
|
|
8779
8776
|
onOpen: () => {
|
|
8780
|
-
|
|
8777
|
+
T(!1), h(!0);
|
|
8781
8778
|
},
|
|
8782
8779
|
onClose: () => h(!1),
|
|
8783
8780
|
slots: { layout: Ga, shortcuts: Wa },
|
|
8784
|
-
slotProps:
|
|
8781
|
+
slotProps: H
|
|
8785
8782
|
}
|
|
8786
8783
|
),
|
|
8787
8784
|
x && w && /* @__PURE__ */ d(kt, { definition: { direction: "horizontal", gap: "4px", align: "center" }, children: [
|
|
@@ -8796,11 +8793,11 @@ const Pr = [
|
|
|
8796
8793
|
format: "M/d",
|
|
8797
8794
|
open: C,
|
|
8798
8795
|
onOpen: () => {
|
|
8799
|
-
h(!1),
|
|
8796
|
+
h(!1), T(!0);
|
|
8800
8797
|
},
|
|
8801
|
-
onClose: () =>
|
|
8798
|
+
onClose: () => T(!1),
|
|
8802
8799
|
slots: { layout: Ga, shortcuts: Wa },
|
|
8803
|
-
slotProps:
|
|
8800
|
+
slotProps: V
|
|
8804
8801
|
}
|
|
8805
8802
|
),
|
|
8806
8803
|
/* @__PURE__ */ e(
|
|
@@ -8809,7 +8806,7 @@ const Pr = [
|
|
|
8809
8806
|
className: "gloss-timeframe__pin-btn",
|
|
8810
8807
|
"aria-label": "Remove comparison",
|
|
8811
8808
|
onClick: () => {
|
|
8812
|
-
k(!1), o?.(!1),
|
|
8809
|
+
k(!1), o?.(!1), T(!1), h(!0), Array.isArray(N) && Promise.resolve().then(() => t(N));
|
|
8813
8810
|
},
|
|
8814
8811
|
children: /* @__PURE__ */ e(Je, { icon: /* @__PURE__ */ e(wt, { fontSize: "small" }) })
|
|
8815
8812
|
}
|
|
@@ -8982,9 +8979,9 @@ const Yd = 30, Ud = {
|
|
|
8982
8979
|
}, []), h = n.columns * n.maxRows, C = te(() => {
|
|
8983
8980
|
const _ = n.currentPage * h, D = a.slice(_, _ + h), N = new Map(t.map((R) => [R.id, R]));
|
|
8984
8981
|
return D.map((R) => N.get(R)).filter((R) => R !== void 0);
|
|
8985
|
-
}, [t, a, n.currentPage, h]),
|
|
8982
|
+
}, [t, a, n.currentPage, h]), T = te(() => C.reduce((_, D) => _ + D.colSpan, 0), [C]), w = Math.max(0, h - T), k = te(() => u ? t.find((_) => _.id === u) ?? null : null, [u, t]), I = te(() => {
|
|
8986
8983
|
if (!f) return null;
|
|
8987
|
-
const _ = C.findIndex((
|
|
8984
|
+
const _ = C.findIndex((F) => F.id === f);
|
|
8988
8985
|
if (_ === -1) return null;
|
|
8989
8986
|
const D = Vd(_, C.length, n.columns);
|
|
8990
8987
|
if (D === null) return null;
|
|
@@ -8994,7 +8991,7 @@ const Yd = 30, Ud = {
|
|
|
8994
8991
|
gridTemplateColumns: `repeat(${n.columns}, 1fr)`,
|
|
8995
8992
|
gridAutoRows: `${n.rowHeight}px`,
|
|
8996
8993
|
gap: `${n.gap}px`
|
|
8997
|
-
}), [n.columns, n.rowHeight, n.gap]), E = !!(f &&
|
|
8994
|
+
}), [n.columns, n.rowHeight, n.gap]), E = !!(f && I && l.length > 0);
|
|
8998
8995
|
return /* @__PURE__ */ d(he, { className: "gloss-grid", children: [
|
|
8999
8996
|
/* @__PURE__ */ d(
|
|
9000
8997
|
ai,
|
|
@@ -9013,7 +9010,7 @@ const Yd = 30, Ud = {
|
|
|
9013
9010
|
strategy: ci,
|
|
9014
9011
|
children: /* @__PURE__ */ d("div", { className: "gloss-grid__container", style: g, children: [
|
|
9015
9012
|
C.map((_, D) => {
|
|
9016
|
-
const N =
|
|
9013
|
+
const N = I?.isDimCover === !0 && I.dimCoverId === _.id;
|
|
9017
9014
|
return /* @__PURE__ */ e(
|
|
9018
9015
|
jd,
|
|
9019
9016
|
{
|
|
@@ -9026,9 +9023,9 @@ const Yd = 30, Ud = {
|
|
|
9026
9023
|
_.id
|
|
9027
9024
|
);
|
|
9028
9025
|
}),
|
|
9029
|
-
c && Array.from({ length: w }, (_, D) => /* @__PURE__ */ e("div", { className: "gloss-grid__empty-slot", children: c(
|
|
9030
|
-
/* @__PURE__ */ e(Ar, { children: E &&
|
|
9031
|
-
const _ =
|
|
9026
|
+
c && Array.from({ length: w }, (_, D) => /* @__PURE__ */ e("div", { className: "gloss-grid__empty-slot", children: c(T + D) }, `empty-${D}`)),
|
|
9027
|
+
/* @__PURE__ */ e(Ar, { children: E && I && (() => {
|
|
9028
|
+
const _ = I.extrudeIndex % n.columns + 1, D = Math.floor(I.extrudeIndex / n.columns) + 1;
|
|
9032
9029
|
return /* @__PURE__ */ e(
|
|
9033
9030
|
Ct.div,
|
|
9034
9031
|
{
|
|
@@ -9623,14 +9620,14 @@ const Rn = q.forwardRef(
|
|
|
9623
9620
|
label: v,
|
|
9624
9621
|
status: h,
|
|
9625
9622
|
helperText: C,
|
|
9626
|
-
required:
|
|
9623
|
+
required: T,
|
|
9627
9624
|
disabled: w,
|
|
9628
9625
|
name: k,
|
|
9629
|
-
id:
|
|
9626
|
+
id: I,
|
|
9630
9627
|
className: g,
|
|
9631
9628
|
autoComplete: E
|
|
9632
9629
|
}, _) => {
|
|
9633
|
-
const D = le(null), [N, R] = L(p ?? ""), [A,
|
|
9630
|
+
const D = le(null), [N, R] = L(p ?? ""), [A, F] = L(!1), [M, W] = L(-1), U = le(null), j = u !== void 0 ? u : N, B = String(j).length > 0, H = A && i && n.length > 0, V = S(
|
|
9634
9631
|
(X) => {
|
|
9635
9632
|
const ee = X.target.value;
|
|
9636
9633
|
u === void 0 && R(ee), t > 0 ? (U.current && clearTimeout(U.current), U.current = setTimeout(() => {
|
|
@@ -9645,37 +9642,37 @@ const Rn = q.forwardRef(
|
|
|
9645
9642
|
}), D.current?.focus();
|
|
9646
9643
|
}, [u, m]), z = S(
|
|
9647
9644
|
(X) => {
|
|
9648
|
-
if (
|
|
9645
|
+
if (H)
|
|
9649
9646
|
switch (X.key) {
|
|
9650
9647
|
case "ArrowDown":
|
|
9651
|
-
X.preventDefault(),
|
|
9648
|
+
X.preventDefault(), W(
|
|
9652
9649
|
(ee) => ee < n.length - 1 ? ee + 1 : 0
|
|
9653
9650
|
);
|
|
9654
9651
|
break;
|
|
9655
9652
|
case "ArrowUp":
|
|
9656
|
-
X.preventDefault(),
|
|
9653
|
+
X.preventDefault(), W(
|
|
9657
9654
|
(ee) => ee > 0 ? ee - 1 : n.length - 1
|
|
9658
9655
|
);
|
|
9659
9656
|
break;
|
|
9660
9657
|
case "Enter":
|
|
9661
|
-
M >= 0 && n[M] ? (X.preventDefault(), s?.(n[M]),
|
|
9658
|
+
M >= 0 && n[M] ? (X.preventDefault(), s?.(n[M]), W(-1)) : r?.(String(j));
|
|
9662
9659
|
break;
|
|
9663
9660
|
case "Escape":
|
|
9664
|
-
|
|
9661
|
+
F(!1), D.current?.blur();
|
|
9665
9662
|
break;
|
|
9666
9663
|
}
|
|
9667
|
-
else X.key === "Enter" && r?.(String(
|
|
9664
|
+
else X.key === "Enter" && r?.(String(j));
|
|
9668
9665
|
f?.(X);
|
|
9669
9666
|
},
|
|
9670
|
-
[
|
|
9667
|
+
[H, n, M, j, r, s, f]
|
|
9671
9668
|
), Y = S(
|
|
9672
9669
|
(X) => {
|
|
9673
|
-
|
|
9670
|
+
F(!0), b?.(X);
|
|
9674
9671
|
},
|
|
9675
9672
|
[b]
|
|
9676
9673
|
), Z = S(
|
|
9677
9674
|
(X) => {
|
|
9678
|
-
setTimeout(() =>
|
|
9675
|
+
setTimeout(() => F(!1), 150), y?.(X);
|
|
9679
9676
|
},
|
|
9680
9677
|
[y]
|
|
9681
9678
|
);
|
|
@@ -9689,7 +9686,7 @@ const Rn = q.forwardRef(
|
|
|
9689
9686
|
U.current && clearTimeout(U.current);
|
|
9690
9687
|
}, []);
|
|
9691
9688
|
const K = /* @__PURE__ */ d("div", { className: "gloss-search-input__actions", children: [
|
|
9692
|
-
|
|
9689
|
+
B && l && /* @__PURE__ */ e(
|
|
9693
9690
|
"button",
|
|
9694
9691
|
{
|
|
9695
9692
|
type: "button",
|
|
@@ -9713,8 +9710,8 @@ const Rn = q.forwardRef(
|
|
|
9713
9710
|
D.current = X, typeof _ == "function" ? _(X) : _ && (_.current = X);
|
|
9714
9711
|
},
|
|
9715
9712
|
type: "search",
|
|
9716
|
-
value:
|
|
9717
|
-
onChange:
|
|
9713
|
+
value: j,
|
|
9714
|
+
onChange: V,
|
|
9718
9715
|
onKeyDown: z,
|
|
9719
9716
|
onFocus: Y,
|
|
9720
9717
|
onBlur: Z,
|
|
@@ -9722,23 +9719,23 @@ const Rn = q.forwardRef(
|
|
|
9722
9719
|
label: v,
|
|
9723
9720
|
status: h === "pending" ? "default" : h,
|
|
9724
9721
|
helperText: C,
|
|
9725
|
-
required:
|
|
9722
|
+
required: T,
|
|
9726
9723
|
disabled: w,
|
|
9727
9724
|
name: k,
|
|
9728
|
-
id:
|
|
9725
|
+
id: I,
|
|
9729
9726
|
autoComplete: E,
|
|
9730
9727
|
leftIcon: /* @__PURE__ */ e(_e, { name: "search", size: "sm" }),
|
|
9731
9728
|
rightIcon: K
|
|
9732
9729
|
}
|
|
9733
9730
|
),
|
|
9734
|
-
|
|
9731
|
+
H && /* @__PURE__ */ e("ul", { className: "gloss-search-input__suggestions", role: "listbox", children: n.map((X, ee) => /* @__PURE__ */ d(
|
|
9735
9732
|
"li",
|
|
9736
9733
|
{
|
|
9737
9734
|
role: "option",
|
|
9738
9735
|
"aria-selected": ee === M,
|
|
9739
9736
|
className: `gloss-search-input__suggestion ${ee === M ? "gloss-search-input__suggestion--selected" : ""}`,
|
|
9740
9737
|
onClick: () => {
|
|
9741
|
-
s?.(X),
|
|
9738
|
+
s?.(X), W(-1);
|
|
9742
9739
|
},
|
|
9743
9740
|
children: [
|
|
9744
9741
|
X.icon && /* @__PURE__ */ e(_e, { name: X.icon, size: "sm" }),
|
|
@@ -9791,38 +9788,38 @@ const cu = [
|
|
|
9791
9788
|
required: v,
|
|
9792
9789
|
disabled: h,
|
|
9793
9790
|
name: C,
|
|
9794
|
-
id:
|
|
9791
|
+
id: T,
|
|
9795
9792
|
className: w,
|
|
9796
9793
|
autoComplete: k = "new-password"
|
|
9797
|
-
},
|
|
9794
|
+
}, I) => {
|
|
9798
9795
|
const [g, E] = L(!1), [_, D] = L(String(u ?? "")), N = l !== void 0 ? String(l) : _, R = te(
|
|
9799
9796
|
() => uu(N, n),
|
|
9800
9797
|
[N, n]
|
|
9801
|
-
), A = a ?? R,
|
|
9802
|
-
() => n.map((
|
|
9803
|
-
...
|
|
9804
|
-
passed:
|
|
9798
|
+
), A = a ?? R, F = te(
|
|
9799
|
+
() => n.map((V) => ({
|
|
9800
|
+
...V,
|
|
9801
|
+
passed: V.validate(N)
|
|
9805
9802
|
})),
|
|
9806
9803
|
[N, n]
|
|
9807
9804
|
), M = S(
|
|
9808
|
-
(
|
|
9809
|
-
l === void 0 && D(
|
|
9805
|
+
(V) => {
|
|
9806
|
+
l === void 0 && D(V.target.value), p?.(V);
|
|
9810
9807
|
},
|
|
9811
9808
|
[l, p]
|
|
9812
|
-
),
|
|
9813
|
-
E((
|
|
9809
|
+
), W = S(() => {
|
|
9810
|
+
E((V) => !V);
|
|
9814
9811
|
}, []), U = S(() => {
|
|
9815
|
-
const
|
|
9816
|
-
i ? i(
|
|
9817
|
-
target: { value:
|
|
9818
|
-
currentTarget: { value:
|
|
9812
|
+
const V = du(o);
|
|
9813
|
+
i ? i(V) : (l === void 0 && D(V), p?.({
|
|
9814
|
+
target: { value: V },
|
|
9815
|
+
currentTarget: { value: V }
|
|
9819
9816
|
})), E(!0);
|
|
9820
|
-
}, [o, i, l, p]),
|
|
9817
|
+
}, [o, i, l, p]), j = {
|
|
9821
9818
|
weak: "#ef4444",
|
|
9822
9819
|
fair: "#f59e0b",
|
|
9823
9820
|
good: "#3b82f6",
|
|
9824
9821
|
strong: "#22c55e"
|
|
9825
|
-
},
|
|
9822
|
+
}, B = {
|
|
9826
9823
|
weak: "Weak",
|
|
9827
9824
|
fair: "Fair",
|
|
9828
9825
|
good: "Good",
|
|
@@ -9832,7 +9829,7 @@ const cu = [
|
|
|
9832
9829
|
/* @__PURE__ */ e(
|
|
9833
9830
|
Ee,
|
|
9834
9831
|
{
|
|
9835
|
-
ref:
|
|
9832
|
+
ref: I,
|
|
9836
9833
|
type: g ? "text" : "password",
|
|
9837
9834
|
value: N,
|
|
9838
9835
|
onChange: M,
|
|
@@ -9855,7 +9852,7 @@ const cu = [
|
|
|
9855
9852
|
{
|
|
9856
9853
|
type: "button",
|
|
9857
9854
|
className: "gloss-password-input__toggle",
|
|
9858
|
-
onClick:
|
|
9855
|
+
onClick: W,
|
|
9859
9856
|
"aria-label": g ? "Hide password" : "Show password",
|
|
9860
9857
|
tabIndex: -1,
|
|
9861
9858
|
children: /* @__PURE__ */ e(_e, { name: g ? "eye-off" : "eye", size: "sm" })
|
|
@@ -9869,7 +9866,7 @@ const cu = [
|
|
|
9869
9866
|
required: v,
|
|
9870
9867
|
disabled: h,
|
|
9871
9868
|
name: C,
|
|
9872
|
-
id:
|
|
9869
|
+
id: T,
|
|
9873
9870
|
autoComplete: k
|
|
9874
9871
|
}
|
|
9875
9872
|
),
|
|
@@ -9880,7 +9877,7 @@ const cu = [
|
|
|
9880
9877
|
className: "gloss-password-input__strength-fill",
|
|
9881
9878
|
style: {
|
|
9882
9879
|
width: A === "weak" ? "25%" : A === "fair" ? "50%" : A === "good" ? "75%" : "100%",
|
|
9883
|
-
backgroundColor:
|
|
9880
|
+
backgroundColor: j[A]
|
|
9884
9881
|
}
|
|
9885
9882
|
}
|
|
9886
9883
|
) }),
|
|
@@ -9888,21 +9885,21 @@ const cu = [
|
|
|
9888
9885
|
"span",
|
|
9889
9886
|
{
|
|
9890
9887
|
className: "gloss-password-input__strength-label",
|
|
9891
|
-
style: { color:
|
|
9892
|
-
children:
|
|
9888
|
+
style: { color: j[A] },
|
|
9889
|
+
children: B[A]
|
|
9893
9890
|
}
|
|
9894
9891
|
)
|
|
9895
9892
|
] }),
|
|
9896
|
-
c && /* @__PURE__ */ e("ul", { className: "gloss-password-input__rules", children:
|
|
9893
|
+
c && /* @__PURE__ */ e("ul", { className: "gloss-password-input__rules", children: F.map((V) => /* @__PURE__ */ d(
|
|
9897
9894
|
"li",
|
|
9898
9895
|
{
|
|
9899
|
-
className: `gloss-password-input__rule ${
|
|
9896
|
+
className: `gloss-password-input__rule ${V.passed ? "gloss-password-input__rule--passed" : ""}`,
|
|
9900
9897
|
children: [
|
|
9901
|
-
/* @__PURE__ */ e(_e, { name:
|
|
9902
|
-
/* @__PURE__ */ e("span", { children:
|
|
9898
|
+
/* @__PURE__ */ e(_e, { name: V.passed ? "check" : "x", size: "sm" }),
|
|
9899
|
+
/* @__PURE__ */ e("span", { children: V.label })
|
|
9903
9900
|
]
|
|
9904
9901
|
},
|
|
9905
|
-
|
|
9902
|
+
V.id
|
|
9906
9903
|
)) })
|
|
9907
9904
|
] });
|
|
9908
9905
|
}
|
|
@@ -9929,18 +9926,18 @@ const mu = q.forwardRef(
|
|
|
9929
9926
|
id: v,
|
|
9930
9927
|
name: h
|
|
9931
9928
|
}, C) => {
|
|
9932
|
-
const
|
|
9929
|
+
const T = Oe(), w = v || T, k = le(null), [I, g] = L(t), [E, _] = L(""), [D, N] = L(null), [R, A] = L(!1), [F, M] = L(-1), W = r !== void 0, U = W ? r : I, j = E ? l.filter(
|
|
9933
9930
|
(se) => se.toLowerCase().includes(E.toLowerCase()) && (o || !U.includes(se))
|
|
9934
|
-
) : [],
|
|
9931
|
+
) : [], B = R && j.length > 0, H = s === void 0 || U.length < s, V = S(
|
|
9935
9932
|
(se) => {
|
|
9936
|
-
|
|
9933
|
+
W || g(se), a?.(se);
|
|
9937
9934
|
},
|
|
9938
|
-
[
|
|
9935
|
+
[W, a]
|
|
9939
9936
|
), G = S(
|
|
9940
9937
|
(se) => {
|
|
9941
9938
|
const oe = se.trim();
|
|
9942
9939
|
if (oe) {
|
|
9943
|
-
if (!
|
|
9940
|
+
if (!H) {
|
|
9944
9941
|
N(`Maximum of ${s} tags allowed`);
|
|
9945
9942
|
return;
|
|
9946
9943
|
}
|
|
@@ -9959,16 +9956,16 @@ const mu = q.forwardRef(
|
|
|
9959
9956
|
return;
|
|
9960
9957
|
}
|
|
9961
9958
|
}
|
|
9962
|
-
N(null),
|
|
9959
|
+
N(null), V([...U, oe]), _(""), M(-1);
|
|
9963
9960
|
}
|
|
9964
9961
|
},
|
|
9965
|
-
[U,
|
|
9962
|
+
[U, H, s, o, i, c, V]
|
|
9966
9963
|
), z = S(
|
|
9967
9964
|
(se) => {
|
|
9968
9965
|
const oe = U.filter((pe, Me) => Me !== se);
|
|
9969
|
-
|
|
9966
|
+
V(oe), N(null);
|
|
9970
9967
|
},
|
|
9971
|
-
[U,
|
|
9968
|
+
[U, V]
|
|
9972
9969
|
), Y = S(
|
|
9973
9970
|
(se) => {
|
|
9974
9971
|
const oe = se.target.value, pe = n.filter((Me) => Me !== "Enter");
|
|
@@ -9984,16 +9981,16 @@ const mu = q.forwardRef(
|
|
|
9984
9981
|
[n, G]
|
|
9985
9982
|
), Z = S(
|
|
9986
9983
|
(se) => {
|
|
9987
|
-
se.key === "Enter" ? (se.preventDefault(),
|
|
9988
|
-
(oe) => oe <
|
|
9989
|
-
)) : se.key === "ArrowUp" &&
|
|
9990
|
-
(oe) => oe > 0 ? oe - 1 :
|
|
9984
|
+
se.key === "Enter" ? (se.preventDefault(), B && F >= 0 ? G(j[F]) : n.includes("Enter") && E.trim() && G(E)) : se.key === "Backspace" && !E && U.length > 0 ? z(U.length - 1) : se.key === "ArrowDown" && B ? (se.preventDefault(), M(
|
|
9985
|
+
(oe) => oe < j.length - 1 ? oe + 1 : 0
|
|
9986
|
+
)) : se.key === "ArrowUp" && B ? (se.preventDefault(), M(
|
|
9987
|
+
(oe) => oe > 0 ? oe - 1 : j.length - 1
|
|
9991
9988
|
)) : se.key === "Escape" && (_(""), M(-1));
|
|
9992
9989
|
},
|
|
9993
9990
|
[
|
|
9994
|
-
|
|
9995
|
-
|
|
9996
|
-
|
|
9991
|
+
B,
|
|
9992
|
+
F,
|
|
9993
|
+
j,
|
|
9997
9994
|
n,
|
|
9998
9995
|
E,
|
|
9999
9996
|
U,
|
|
@@ -10044,7 +10041,7 @@ const mu = q.forwardRef(
|
|
|
10044
10041
|
}
|
|
10045
10042
|
)
|
|
10046
10043
|
] }, `${se}-${oe}`)),
|
|
10047
|
-
|
|
10044
|
+
H && /* @__PURE__ */ e(
|
|
10048
10045
|
"input",
|
|
10049
10046
|
{
|
|
10050
10047
|
ref: (se) => {
|
|
@@ -10064,12 +10061,12 @@ const mu = q.forwardRef(
|
|
|
10064
10061
|
}
|
|
10065
10062
|
)
|
|
10066
10063
|
] }),
|
|
10067
|
-
|
|
10064
|
+
B && /* @__PURE__ */ e("ul", { className: "gloss-tag-input__suggestions", role: "listbox", children: j.map((se, oe) => /* @__PURE__ */ e(
|
|
10068
10065
|
"li",
|
|
10069
10066
|
{
|
|
10070
10067
|
role: "option",
|
|
10071
|
-
"aria-selected": oe ===
|
|
10072
|
-
className: `gloss-tag-input__suggestion ${oe ===
|
|
10068
|
+
"aria-selected": oe === F,
|
|
10069
|
+
className: `gloss-tag-input__suggestion ${oe === F ? "gloss-tag-input__suggestion--selected" : ""}`,
|
|
10073
10070
|
onClick: () => fe(se),
|
|
10074
10071
|
children: se
|
|
10075
10072
|
},
|
|
@@ -10147,17 +10144,17 @@ const pu = [
|
|
|
10147
10144
|
className: y = "",
|
|
10148
10145
|
id: x
|
|
10149
10146
|
}, v) => {
|
|
10150
|
-
const h = Oe(), C = x || h,
|
|
10147
|
+
const h = Oe(), C = x || h, T = s.find((G) => G.code === n) || s[0], w = te(
|
|
10151
10148
|
() => Va(r || t || "", s),
|
|
10152
10149
|
[]
|
|
10153
|
-
), [k,
|
|
10154
|
-
w.country ||
|
|
10150
|
+
), [k, I] = L(
|
|
10151
|
+
w.country || T
|
|
10155
10152
|
), [g, E] = L(
|
|
10156
10153
|
w.nationalNumber
|
|
10157
10154
|
), [_, D] = L(!1), N = r !== void 0, R = te(
|
|
10158
10155
|
() => N ? Va(r || "", s) : null,
|
|
10159
10156
|
[N, r, s]
|
|
10160
|
-
), A = R?.country || k,
|
|
10157
|
+
), A = R?.country || k, F = R?.nationalNumber || g, M = fu(F, A.format), W = S(
|
|
10161
10158
|
(G, z) => {
|
|
10162
10159
|
const Y = ja(z);
|
|
10163
10160
|
return Y ? `${G.dialCode}${Y}` : "";
|
|
@@ -10167,28 +10164,28 @@ const pu = [
|
|
|
10167
10164
|
(G) => {
|
|
10168
10165
|
const z = G.target.value, Y = ja(z);
|
|
10169
10166
|
N || E(Y);
|
|
10170
|
-
const Z =
|
|
10167
|
+
const Z = W(A, Y);
|
|
10171
10168
|
a?.(Z);
|
|
10172
10169
|
},
|
|
10173
|
-
[N, A,
|
|
10174
|
-
),
|
|
10170
|
+
[N, A, W, a]
|
|
10171
|
+
), j = S(
|
|
10175
10172
|
(G) => {
|
|
10176
|
-
N ||
|
|
10177
|
-
const z =
|
|
10173
|
+
N || I(G);
|
|
10174
|
+
const z = W(G, F);
|
|
10178
10175
|
a?.(z), D(!1);
|
|
10179
10176
|
},
|
|
10180
|
-
[N,
|
|
10181
|
-
),
|
|
10177
|
+
[N, F, W, a]
|
|
10178
|
+
), B = S(() => {
|
|
10182
10179
|
f || D((G) => !G);
|
|
10183
|
-
}, [f]),
|
|
10180
|
+
}, [f]), H = S(() => {
|
|
10184
10181
|
setTimeout(() => D(!1), 150);
|
|
10185
|
-
}, []),
|
|
10182
|
+
}, []), V = i ? /* @__PURE__ */ d(
|
|
10186
10183
|
"button",
|
|
10187
10184
|
{
|
|
10188
10185
|
type: "button",
|
|
10189
10186
|
className: "gloss-phone-input__country-btn",
|
|
10190
|
-
onClick:
|
|
10191
|
-
onBlur:
|
|
10187
|
+
onClick: B,
|
|
10188
|
+
onBlur: H,
|
|
10192
10189
|
disabled: f,
|
|
10193
10190
|
"aria-label": "Select country",
|
|
10194
10191
|
"aria-expanded": _,
|
|
@@ -10203,14 +10200,14 @@ const pu = [
|
|
|
10203
10200
|
c && /* @__PURE__ */ e("label", { className: "gloss-phone-input__label", htmlFor: C, children: c }),
|
|
10204
10201
|
/* @__PURE__ */ d("div", { className: "gloss-phone-input", children: [
|
|
10205
10202
|
/* @__PURE__ */ d("div", { className: "gloss-phone-input__country", children: [
|
|
10206
|
-
|
|
10203
|
+
V,
|
|
10207
10204
|
_ && /* @__PURE__ */ e("ul", { className: "gloss-phone-input__dropdown", role: "listbox", children: s.map((G) => /* @__PURE__ */ d(
|
|
10208
10205
|
"li",
|
|
10209
10206
|
{
|
|
10210
10207
|
role: "option",
|
|
10211
10208
|
"aria-selected": G.code === A.code,
|
|
10212
10209
|
className: `gloss-phone-input__option ${G.code === A.code ? "gloss-phone-input__option--selected" : ""}`,
|
|
10213
|
-
onClick: () =>
|
|
10210
|
+
onClick: () => j(G),
|
|
10214
10211
|
children: [
|
|
10215
10212
|
/* @__PURE__ */ e("span", { className: "gloss-phone-input__option-flag", children: G.code }),
|
|
10216
10213
|
/* @__PURE__ */ e("span", { className: "gloss-phone-input__option-name", children: G.name }),
|
|
@@ -10294,7 +10291,7 @@ function Xr({
|
|
|
10294
10291
|
children: i
|
|
10295
10292
|
}) {
|
|
10296
10293
|
const o = {
|
|
10297
|
-
bg:
|
|
10294
|
+
bg: P.BgSurface,
|
|
10298
10295
|
shadow: Ze.Hover,
|
|
10299
10296
|
radius: Ce.Md,
|
|
10300
10297
|
padding: J.Md,
|
|
@@ -10345,73 +10342,73 @@ function zn(r) {
|
|
|
10345
10342
|
disabled: x = !1,
|
|
10346
10343
|
size: v = "md",
|
|
10347
10344
|
className: h
|
|
10348
|
-
} = r, [C,
|
|
10345
|
+
} = r, [C, T] = L(""), [w, k] = L(!1), [I, g] = L(-1), E = le(null), _ = le(null), D = le(null);
|
|
10349
10346
|
ce(() => {
|
|
10350
|
-
a != null &&
|
|
10347
|
+
a != null && T(s(a));
|
|
10351
10348
|
}, [a, s]);
|
|
10352
10349
|
const N = te(() => {
|
|
10353
10350
|
if (i || !C) return t;
|
|
10354
|
-
const
|
|
10351
|
+
const B = C.toLowerCase();
|
|
10355
10352
|
return t.filter(
|
|
10356
|
-
(
|
|
10353
|
+
(H) => s(H).toLowerCase().includes(B)
|
|
10357
10354
|
);
|
|
10358
10355
|
}, [t, C, i, s]), R = S(
|
|
10359
|
-
(
|
|
10360
|
-
const
|
|
10361
|
-
|
|
10362
|
-
i(
|
|
10356
|
+
(B) => {
|
|
10357
|
+
const H = B.target.value;
|
|
10358
|
+
T(H), k(!0), g(-1), i && (_.current && clearTimeout(_.current), _.current = setTimeout(() => {
|
|
10359
|
+
i(H);
|
|
10363
10360
|
}, 300));
|
|
10364
10361
|
},
|
|
10365
10362
|
[i]
|
|
10366
10363
|
), A = S(
|
|
10367
|
-
(
|
|
10368
|
-
|
|
10364
|
+
(B) => {
|
|
10365
|
+
T(s(B)), k(!1), g(-1), n?.(B);
|
|
10369
10366
|
},
|
|
10370
10367
|
[s, n]
|
|
10371
|
-
),
|
|
10372
|
-
(
|
|
10368
|
+
), F = S(
|
|
10369
|
+
(B) => {
|
|
10373
10370
|
if (!w) {
|
|
10374
|
-
(
|
|
10371
|
+
(B.key === "ArrowDown" || B.key === "ArrowUp") && (B.preventDefault(), k(!0));
|
|
10375
10372
|
return;
|
|
10376
10373
|
}
|
|
10377
|
-
switch (
|
|
10374
|
+
switch (B.key) {
|
|
10378
10375
|
case "ArrowDown":
|
|
10379
|
-
|
|
10380
|
-
(
|
|
10376
|
+
B.preventDefault(), g(
|
|
10377
|
+
(H) => H < N.length - 1 ? H + 1 : 0
|
|
10381
10378
|
);
|
|
10382
10379
|
break;
|
|
10383
10380
|
case "ArrowUp":
|
|
10384
|
-
|
|
10385
|
-
(
|
|
10381
|
+
B.preventDefault(), g(
|
|
10382
|
+
(H) => H > 0 ? H - 1 : N.length - 1
|
|
10386
10383
|
);
|
|
10387
10384
|
break;
|
|
10388
10385
|
case "Enter":
|
|
10389
|
-
|
|
10386
|
+
B.preventDefault(), I >= 0 && N[I] && A(N[I]);
|
|
10390
10387
|
break;
|
|
10391
10388
|
case "Escape":
|
|
10392
|
-
|
|
10389
|
+
B.preventDefault(), k(!1), g(-1);
|
|
10393
10390
|
break;
|
|
10394
10391
|
}
|
|
10395
10392
|
},
|
|
10396
|
-
[w, N,
|
|
10393
|
+
[w, N, I, A]
|
|
10397
10394
|
);
|
|
10398
10395
|
ce(() => {
|
|
10399
|
-
|
|
10400
|
-
}, [
|
|
10396
|
+
I >= 0 && D.current && D.current.querySelectorAll('[role="option"]')[I]?.scrollIntoView({ block: "nearest" });
|
|
10397
|
+
}, [I]), ce(() => () => {
|
|
10401
10398
|
_.current && clearTimeout(_.current);
|
|
10402
10399
|
}, []);
|
|
10403
10400
|
const M = S(() => {
|
|
10404
10401
|
k(!0);
|
|
10405
|
-
}, []),
|
|
10402
|
+
}, []), W = S(() => {
|
|
10406
10403
|
k(!1), g(-1);
|
|
10407
|
-
}, []), U = w && (N.length > 0 || y || N.length === 0),
|
|
10408
|
-
return /* @__PURE__ */ d("div", { className:
|
|
10404
|
+
}, []), U = w && (N.length > 0 || y || N.length === 0), j = ["gloss-autocomplete", h].filter(Boolean).join(" ");
|
|
10405
|
+
return /* @__PURE__ */ d("div", { className: j, ref: E, children: [
|
|
10409
10406
|
/* @__PURE__ */ e(
|
|
10410
10407
|
Ee,
|
|
10411
10408
|
{
|
|
10412
10409
|
value: C,
|
|
10413
10410
|
onChange: R,
|
|
10414
|
-
onKeyDown:
|
|
10411
|
+
onKeyDown: F,
|
|
10415
10412
|
onFocus: M,
|
|
10416
10413
|
placeholder: u,
|
|
10417
10414
|
label: p,
|
|
@@ -10430,7 +10427,7 @@ function zn(r) {
|
|
|
10430
10427
|
Xr,
|
|
10431
10428
|
{
|
|
10432
10429
|
open: U && !x,
|
|
10433
|
-
onDismiss:
|
|
10430
|
+
onDismiss: W,
|
|
10434
10431
|
anchorRef: E,
|
|
10435
10432
|
placement: "bottom-start",
|
|
10436
10433
|
children: y ? l ?? /* @__PURE__ */ e(yu, {}) : N.length === 0 ? c : /* @__PURE__ */ e(
|
|
@@ -10439,24 +10436,24 @@ function zn(r) {
|
|
|
10439
10436
|
ref: D,
|
|
10440
10437
|
className: "gloss-autocomplete__results",
|
|
10441
10438
|
role: "listbox",
|
|
10442
|
-
children: N.map((
|
|
10443
|
-
const
|
|
10439
|
+
children: N.map((B, H) => {
|
|
10440
|
+
const V = H === I;
|
|
10444
10441
|
return /* @__PURE__ */ e(
|
|
10445
10442
|
"li",
|
|
10446
10443
|
{
|
|
10447
10444
|
role: "option",
|
|
10448
|
-
"aria-selected":
|
|
10445
|
+
"aria-selected": V,
|
|
10449
10446
|
className: [
|
|
10450
10447
|
"gloss-autocomplete__result-item",
|
|
10451
|
-
|
|
10448
|
+
V && "gloss-autocomplete__result-item--highlighted"
|
|
10452
10449
|
].filter(Boolean).join(" "),
|
|
10453
10450
|
onMouseDown: (G) => {
|
|
10454
|
-
G.preventDefault(), A(
|
|
10451
|
+
G.preventDefault(), A(B);
|
|
10455
10452
|
},
|
|
10456
|
-
onMouseEnter: () => g(
|
|
10457
|
-
children: o ? o(
|
|
10453
|
+
onMouseEnter: () => g(H),
|
|
10454
|
+
children: o ? o(B, V) : /* @__PURE__ */ e("span", { children: s(B) })
|
|
10458
10455
|
},
|
|
10459
|
-
s(
|
|
10456
|
+
s(B) + H
|
|
10460
10457
|
);
|
|
10461
10458
|
})
|
|
10462
10459
|
}
|
|
@@ -10484,83 +10481,83 @@ function $n(r) {
|
|
|
10484
10481
|
maxSelected: y,
|
|
10485
10482
|
searchable: x = !1,
|
|
10486
10483
|
className: v
|
|
10487
|
-
} = r, [h, C] = L(!1), [
|
|
10488
|
-
() => t.filter((
|
|
10484
|
+
} = r, [h, C] = L(!1), [T, w] = L(""), [k, I] = L(-1), g = le(null), E = le(null), _ = le(null), D = te(
|
|
10485
|
+
() => t.filter((H) => a.includes(H.value)),
|
|
10489
10486
|
[t, a]
|
|
10490
10487
|
), N = te(() => {
|
|
10491
|
-
if (!
|
|
10492
|
-
const
|
|
10493
|
-
return t.filter((
|
|
10494
|
-
}, [t,
|
|
10495
|
-
(
|
|
10496
|
-
a.includes(
|
|
10488
|
+
if (!T) return t;
|
|
10489
|
+
const H = T.toLowerCase();
|
|
10490
|
+
return t.filter((V) => V.label.toLowerCase().includes(H));
|
|
10491
|
+
}, [t, T]), R = y != null && a.length >= y, A = S(
|
|
10492
|
+
(H) => {
|
|
10493
|
+
a.includes(H) ? n(a.filter((G) => G !== H)) : R || n([...a, H]);
|
|
10497
10494
|
},
|
|
10498
10495
|
[a, n, R]
|
|
10499
|
-
),
|
|
10500
|
-
(
|
|
10501
|
-
n(a.filter((
|
|
10496
|
+
), F = S(
|
|
10497
|
+
(H) => {
|
|
10498
|
+
n(a.filter((V) => V !== H));
|
|
10502
10499
|
},
|
|
10503
10500
|
[a, n]
|
|
10504
10501
|
), M = S(
|
|
10505
|
-
(
|
|
10502
|
+
(H) => {
|
|
10506
10503
|
if (!f)
|
|
10507
|
-
switch (
|
|
10504
|
+
switch (H.key) {
|
|
10508
10505
|
case "ArrowDown":
|
|
10509
|
-
|
|
10510
|
-
(
|
|
10511
|
-
) : (C(!0),
|
|
10506
|
+
H.preventDefault(), h ? I(
|
|
10507
|
+
(V) => V < N.length - 1 ? V + 1 : 0
|
|
10508
|
+
) : (C(!0), I(0));
|
|
10512
10509
|
break;
|
|
10513
10510
|
case "ArrowUp":
|
|
10514
|
-
|
|
10515
|
-
(
|
|
10511
|
+
H.preventDefault(), h && I(
|
|
10512
|
+
(V) => V > 0 ? V - 1 : N.length - 1
|
|
10516
10513
|
);
|
|
10517
10514
|
break;
|
|
10518
10515
|
case "Enter":
|
|
10519
|
-
if (
|
|
10520
|
-
const
|
|
10521
|
-
|
|
10516
|
+
if (H.preventDefault(), h && k >= 0 && N[k]) {
|
|
10517
|
+
const V = N[k];
|
|
10518
|
+
V.disabled || A(V.value);
|
|
10522
10519
|
} else h || C(!0);
|
|
10523
10520
|
break;
|
|
10524
10521
|
case "Escape":
|
|
10525
|
-
|
|
10522
|
+
H.preventDefault(), C(!1), I(-1);
|
|
10526
10523
|
break;
|
|
10527
10524
|
case "Backspace":
|
|
10528
|
-
x &&
|
|
10525
|
+
x && T === "" && a.length > 0 && F(a[a.length - 1]);
|
|
10529
10526
|
break;
|
|
10530
10527
|
}
|
|
10531
10528
|
},
|
|
10532
|
-
[f, h, N, k, A, x,
|
|
10529
|
+
[f, h, N, k, A, x, T, a, F]
|
|
10533
10530
|
);
|
|
10534
10531
|
ce(() => {
|
|
10535
10532
|
k >= 0 && _.current && _.current.querySelectorAll('[role="option"]')[k]?.scrollIntoView({ block: "nearest" });
|
|
10536
10533
|
}, [k]), ce(() => {
|
|
10537
10534
|
h && x && E.current && E.current.focus();
|
|
10538
10535
|
}, [h, x]), ce(() => {
|
|
10539
|
-
h || (w(""),
|
|
10536
|
+
h || (w(""), I(-1));
|
|
10540
10537
|
}, [h]);
|
|
10541
|
-
const
|
|
10542
|
-
f || C((
|
|
10538
|
+
const W = S(() => {
|
|
10539
|
+
f || C((H) => !H);
|
|
10543
10540
|
}, [f]), U = S(() => {
|
|
10544
10541
|
C(!1);
|
|
10545
|
-
}, []),
|
|
10542
|
+
}, []), j = [
|
|
10546
10543
|
"gloss-multi-select",
|
|
10547
10544
|
f && "gloss-multi-select--disabled",
|
|
10548
10545
|
p && "gloss-multi-select--error",
|
|
10549
10546
|
`gloss-multi-select--${b}`,
|
|
10550
10547
|
v
|
|
10551
|
-
].filter(Boolean).join(" "),
|
|
10548
|
+
].filter(Boolean).join(" "), B = [
|
|
10552
10549
|
"gloss-multi-select__trigger",
|
|
10553
10550
|
h && "gloss-multi-select__trigger--focused",
|
|
10554
10551
|
p && "gloss-multi-select__trigger--error"
|
|
10555
10552
|
].filter(Boolean).join(" ");
|
|
10556
|
-
return /* @__PURE__ */ d("div", { className:
|
|
10553
|
+
return /* @__PURE__ */ d("div", { className: j, children: [
|
|
10557
10554
|
l && /* @__PURE__ */ e("label", { className: "gloss-multi-select__label", children: l }),
|
|
10558
10555
|
/* @__PURE__ */ d(
|
|
10559
10556
|
"div",
|
|
10560
10557
|
{
|
|
10561
10558
|
ref: g,
|
|
10562
|
-
className:
|
|
10563
|
-
onClick:
|
|
10559
|
+
className: B,
|
|
10560
|
+
onClick: W,
|
|
10564
10561
|
onKeyDown: M,
|
|
10565
10562
|
tabIndex: f ? -1 : 0,
|
|
10566
10563
|
role: "combobox",
|
|
@@ -10568,24 +10565,24 @@ function $n(r) {
|
|
|
10568
10565
|
"aria-haspopup": "listbox",
|
|
10569
10566
|
"aria-disabled": f || void 0,
|
|
10570
10567
|
children: [
|
|
10571
|
-
D.map((
|
|
10568
|
+
D.map((H) => /* @__PURE__ */ e("span", { className: "gloss-multi-select__tag", children: s ? s(H, () => F(H.value)) : /* @__PURE__ */ e(
|
|
10572
10569
|
Ur,
|
|
10573
10570
|
{
|
|
10574
10571
|
size: b === "lg" ? "md" : "sm",
|
|
10575
10572
|
variant: "outlined",
|
|
10576
|
-
onDelete: f ? void 0 : () =>
|
|
10577
|
-
children:
|
|
10573
|
+
onDelete: f ? void 0 : () => F(H.value),
|
|
10574
|
+
children: H.label
|
|
10578
10575
|
}
|
|
10579
|
-
) },
|
|
10576
|
+
) }, H.value)),
|
|
10580
10577
|
x ? /* @__PURE__ */ e(
|
|
10581
10578
|
"input",
|
|
10582
10579
|
{
|
|
10583
10580
|
ref: E,
|
|
10584
10581
|
type: "text",
|
|
10585
10582
|
className: "gloss-multi-select__search",
|
|
10586
|
-
value:
|
|
10587
|
-
onChange: (
|
|
10588
|
-
w(
|
|
10583
|
+
value: T,
|
|
10584
|
+
onChange: (H) => {
|
|
10585
|
+
w(H.target.value), h || C(!0), I(-1);
|
|
10589
10586
|
},
|
|
10590
10587
|
placeholder: D.length === 0 ? c : "",
|
|
10591
10588
|
disabled: f,
|
|
@@ -10626,8 +10623,8 @@ function $n(r) {
|
|
|
10626
10623
|
className: "gloss-multi-select__dropdown",
|
|
10627
10624
|
role: "listbox",
|
|
10628
10625
|
"aria-multiselectable": "true",
|
|
10629
|
-
children: N.map((
|
|
10630
|
-
const G = a.includes(
|
|
10626
|
+
children: N.map((H, V) => {
|
|
10627
|
+
const G = a.includes(H.value), z = V === k, Y = H.disabled || R && !G;
|
|
10631
10628
|
return /* @__PURE__ */ e(
|
|
10632
10629
|
"li",
|
|
10633
10630
|
{
|
|
@@ -10641,10 +10638,10 @@ function $n(r) {
|
|
|
10641
10638
|
Y && "gloss-multi-select__option--disabled"
|
|
10642
10639
|
].filter(Boolean).join(" "),
|
|
10643
10640
|
onMouseDown: (Z) => {
|
|
10644
|
-
Z.preventDefault(), Y || A(
|
|
10641
|
+
Z.preventDefault(), Y || A(H.value);
|
|
10645
10642
|
},
|
|
10646
|
-
onMouseEnter: () =>
|
|
10647
|
-
children: i ? i(
|
|
10643
|
+
onMouseEnter: () => I(V),
|
|
10644
|
+
children: i ? i(H, G) : /* @__PURE__ */ d(Ve, { children: [
|
|
10648
10645
|
/* @__PURE__ */ e(
|
|
10649
10646
|
"span",
|
|
10650
10647
|
{
|
|
@@ -10668,10 +10665,10 @@ function $n(r) {
|
|
|
10668
10665
|
)
|
|
10669
10666
|
}
|
|
10670
10667
|
),
|
|
10671
|
-
/* @__PURE__ */ e("span", { className: "gloss-multi-select__option-label", children:
|
|
10668
|
+
/* @__PURE__ */ e("span", { className: "gloss-multi-select__option-label", children: H.label })
|
|
10672
10669
|
] })
|
|
10673
10670
|
},
|
|
10674
|
-
|
|
10671
|
+
H.value
|
|
10675
10672
|
);
|
|
10676
10673
|
})
|
|
10677
10674
|
}
|
|
@@ -10688,8 +10685,8 @@ const vu = {
|
|
|
10688
10685
|
lg: { size: "48px", fontSize: "1rem" },
|
|
10689
10686
|
xl: { size: "64px", fontSize: "1.25rem" }
|
|
10690
10687
|
}, _u = {
|
|
10691
|
-
bg:
|
|
10692
|
-
color:
|
|
10688
|
+
bg: P.BgMuted,
|
|
10689
|
+
color: P.TextSecondary
|
|
10693
10690
|
}, xu = {
|
|
10694
10691
|
circle: "50%",
|
|
10695
10692
|
square: Ce.Md
|
|
@@ -10804,36 +10801,36 @@ function Zr(r) {
|
|
|
10804
10801
|
pageSize: v,
|
|
10805
10802
|
totalCount: h,
|
|
10806
10803
|
onPageChange: C,
|
|
10807
|
-
loading:
|
|
10804
|
+
loading: T = !1,
|
|
10808
10805
|
striped: w = !1,
|
|
10809
10806
|
className: k
|
|
10810
|
-
} = r,
|
|
10807
|
+
} = r, I = te(
|
|
10811
10808
|
() => a.map((M) => String(M[n])),
|
|
10812
10809
|
[a, n]
|
|
10813
10810
|
), g = te(
|
|
10814
|
-
() => p != null &&
|
|
10815
|
-
[p,
|
|
10811
|
+
() => p != null && I.length > 0 && I.every((M) => p.has(M)),
|
|
10812
|
+
[p, I]
|
|
10816
10813
|
), E = te(
|
|
10817
|
-
() => p != null &&
|
|
10818
|
-
[p,
|
|
10814
|
+
() => p != null && I.some((M) => p.has(M)),
|
|
10815
|
+
[p, I]
|
|
10819
10816
|
), _ = S(() => {
|
|
10820
|
-
m && m(g ? /* @__PURE__ */ new Set() : new Set(
|
|
10821
|
-
}, [g,
|
|
10817
|
+
m && m(g ? /* @__PURE__ */ new Set() : new Set(I));
|
|
10818
|
+
}, [g, I, m]), D = S(
|
|
10822
10819
|
(M) => {
|
|
10823
10820
|
if (!m || !p) return;
|
|
10824
|
-
const
|
|
10825
|
-
|
|
10821
|
+
const W = new Set(p);
|
|
10822
|
+
W.has(M) ? W.delete(M) : W.add(M), m(W);
|
|
10826
10823
|
},
|
|
10827
10824
|
[p, m]
|
|
10828
10825
|
), N = S(
|
|
10829
10826
|
(M) => {
|
|
10830
10827
|
if (!y) return;
|
|
10831
|
-
let
|
|
10832
|
-
f === M && b === "asc" && (
|
|
10828
|
+
let W = "asc";
|
|
10829
|
+
f === M && b === "asc" && (W = "desc"), y(M, W);
|
|
10833
10830
|
},
|
|
10834
10831
|
[f, b, y]
|
|
10835
|
-
), R = te(() => h != null && v != null && v > 0 ? Math.ceil(h / v) : 1, [h, v]), A = x != null && v != null && h != null && C != null,
|
|
10836
|
-
return /* @__PURE__ */ d("div", { className:
|
|
10832
|
+
), R = te(() => h != null && v != null && v > 0 ? Math.ceil(h / v) : 1, [h, v]), A = x != null && v != null && h != null && C != null, F = ["gloss-data-table", k].filter(Boolean).join(" ");
|
|
10833
|
+
return /* @__PURE__ */ d("div", { className: F, children: [
|
|
10837
10834
|
/* @__PURE__ */ d("table", { className: "gloss-data-table__table", children: [
|
|
10838
10835
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ d("tr", { children: [
|
|
10839
10836
|
u && /* @__PURE__ */ e("th", { className: "gloss-data-table__header-cell gloss-data-table__header-cell--checkbox", children: /* @__PURE__ */ e(
|
|
@@ -10846,7 +10843,7 @@ function Zr(r) {
|
|
|
10846
10843
|
}
|
|
10847
10844
|
) }),
|
|
10848
10845
|
t.map((M) => {
|
|
10849
|
-
const
|
|
10846
|
+
const W = f === M.key, U = [
|
|
10850
10847
|
"gloss-data-table__header-cell",
|
|
10851
10848
|
M.sortable && "gloss-data-table__header-cell--sortable",
|
|
10852
10849
|
M.align === "center" && "gloss-data-table__body-cell--align-center",
|
|
@@ -10858,17 +10855,17 @@ function Zr(r) {
|
|
|
10858
10855
|
className: U,
|
|
10859
10856
|
style: M.width ? { width: M.width } : void 0,
|
|
10860
10857
|
onClick: M.sortable ? () => N(M.key) : void 0,
|
|
10861
|
-
"aria-sort":
|
|
10858
|
+
"aria-sort": W ? b : void 0,
|
|
10862
10859
|
children: s ? s(M) : /* @__PURE__ */ d("span", { className: "gloss-data-table__header-content", children: [
|
|
10863
10860
|
M.header,
|
|
10864
10861
|
M.sortable && /* @__PURE__ */ e(
|
|
10865
10862
|
"span",
|
|
10866
10863
|
{
|
|
10867
|
-
className: `gloss-data-table__sort-icon${
|
|
10864
|
+
className: `gloss-data-table__sort-icon${W ? " gloss-data-table__sort-icon--active" : ""}`,
|
|
10868
10865
|
children: /* @__PURE__ */ e(
|
|
10869
10866
|
Je,
|
|
10870
10867
|
{
|
|
10871
|
-
name:
|
|
10868
|
+
name: W && b === "desc" ? "arrow-down" : "arrow-up",
|
|
10872
10869
|
definition: { size: "sm" }
|
|
10873
10870
|
}
|
|
10874
10871
|
)
|
|
@@ -10882,18 +10879,18 @@ function Zr(r) {
|
|
|
10882
10879
|
o && /* @__PURE__ */ e("th", { className: "gloss-data-table__header-cell gloss-data-table__header-cell--actions" })
|
|
10883
10880
|
] }) }),
|
|
10884
10881
|
/* @__PURE__ */ d("tbody", { children: [
|
|
10885
|
-
|
|
10882
|
+
T && Array.from({ length: 3 }, (M, W) => /* @__PURE__ */ d("tr", { className: "gloss-data-table__skeleton-row", children: [
|
|
10886
10883
|
u && /* @__PURE__ */ e("td", { className: "gloss-data-table__body-cell gloss-data-table__body-cell--checkbox", children: /* @__PURE__ */ e("div", { className: "gloss-data-table__skeleton-cell", style: { width: 18 } }) }),
|
|
10887
10884
|
t.map((U) => /* @__PURE__ */ e("td", { className: "gloss-data-table__body-cell", children: /* @__PURE__ */ e(
|
|
10888
10885
|
"div",
|
|
10889
10886
|
{
|
|
10890
10887
|
className: "gloss-data-table__skeleton-cell",
|
|
10891
|
-
style: { width: `${60 + (
|
|
10888
|
+
style: { width: `${60 + (W * 20 + t.indexOf(U) * 15) % 40}%` }
|
|
10892
10889
|
}
|
|
10893
10890
|
) }, U.key)),
|
|
10894
10891
|
o && /* @__PURE__ */ e("td", { className: "gloss-data-table__body-cell gloss-data-table__body-cell--actions", children: /* @__PURE__ */ e("div", { className: "gloss-data-table__skeleton-cell", style: { width: 24 } }) })
|
|
10895
|
-
] }, `skeleton-${
|
|
10896
|
-
!
|
|
10892
|
+
] }, `skeleton-${W}`)),
|
|
10893
|
+
!T && a.length === 0 && /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
|
|
10897
10894
|
"td",
|
|
10898
10895
|
{
|
|
10899
10896
|
colSpan: t.length + (u ? 1 : 0) + (o ? 1 : 0),
|
|
@@ -10903,36 +10900,36 @@ function Zr(r) {
|
|
|
10903
10900
|
] })
|
|
10904
10901
|
}
|
|
10905
10902
|
) }),
|
|
10906
|
-
!
|
|
10907
|
-
const U = String(M[n]),
|
|
10903
|
+
!T && a.map((M, W) => {
|
|
10904
|
+
const U = String(M[n]), j = p?.has(U) ?? !1, B = [
|
|
10908
10905
|
"gloss-data-table__row",
|
|
10909
|
-
|
|
10906
|
+
j && "gloss-data-table__row--selected",
|
|
10910
10907
|
w && "gloss-data-table__row--striped"
|
|
10911
10908
|
].filter(Boolean).join(" ");
|
|
10912
|
-
return /* @__PURE__ */ d("tr", { className:
|
|
10909
|
+
return /* @__PURE__ */ d("tr", { className: B, children: [
|
|
10913
10910
|
u && /* @__PURE__ */ e("td", { className: "gloss-data-table__body-cell gloss-data-table__body-cell--checkbox", children: /* @__PURE__ */ e(
|
|
10914
10911
|
ct,
|
|
10915
10912
|
{
|
|
10916
|
-
checked:
|
|
10913
|
+
checked: j,
|
|
10917
10914
|
onChange: () => D(U),
|
|
10918
10915
|
size: "sm"
|
|
10919
10916
|
}
|
|
10920
10917
|
) }),
|
|
10921
|
-
t.map((
|
|
10922
|
-
const
|
|
10918
|
+
t.map((H) => {
|
|
10919
|
+
const V = [
|
|
10923
10920
|
"gloss-data-table__body-cell",
|
|
10924
|
-
|
|
10925
|
-
|
|
10921
|
+
H.align === "center" && "gloss-data-table__body-cell--align-center",
|
|
10922
|
+
H.align === "right" && "gloss-data-table__body-cell--align-right"
|
|
10926
10923
|
].filter(Boolean).join(" ");
|
|
10927
10924
|
let G;
|
|
10928
|
-
return i ? G = i(
|
|
10925
|
+
return i ? G = i(H, M) : H.render ? G = H.render(M[H.key], M) : G = String(M[H.key] ?? ""), /* @__PURE__ */ e(
|
|
10929
10926
|
"td",
|
|
10930
10927
|
{
|
|
10931
|
-
className:
|
|
10932
|
-
style:
|
|
10928
|
+
className: V,
|
|
10929
|
+
style: H.width ? { width: H.width } : void 0,
|
|
10933
10930
|
children: G
|
|
10934
10931
|
},
|
|
10935
|
-
|
|
10932
|
+
H.key
|
|
10936
10933
|
);
|
|
10937
10934
|
}),
|
|
10938
10935
|
o && /* @__PURE__ */ e("td", { className: "gloss-data-table__body-cell gloss-data-table__body-cell--actions", children: o(M) })
|
|
@@ -11046,7 +11043,7 @@ const Iu = {
|
|
|
11046
11043
|
dismissOnClickOutside: !0,
|
|
11047
11044
|
dismissOnEscape: !0,
|
|
11048
11045
|
role: "dialog",
|
|
11049
|
-
bg:
|
|
11046
|
+
bg: P.BgSurface,
|
|
11050
11047
|
shadow: Ze.Hover,
|
|
11051
11048
|
radius: Ce.Lg,
|
|
11052
11049
|
padding: "0",
|
|
@@ -11134,14 +11131,14 @@ const Mu = {
|
|
|
11134
11131
|
fontSize: Re.TextBase,
|
|
11135
11132
|
fontWeight: Re.WeightNormal,
|
|
11136
11133
|
lineHeight: Re.LeadingNormal,
|
|
11137
|
-
color:
|
|
11134
|
+
color: P.TextPrimary
|
|
11138
11135
|
},
|
|
11139
11136
|
caption: {
|
|
11140
11137
|
fontFamily: Re.FontBody,
|
|
11141
11138
|
fontSize: Re.TextSm,
|
|
11142
11139
|
fontWeight: Re.WeightNormal,
|
|
11143
11140
|
lineHeight: Re.LeadingNormal,
|
|
11144
|
-
color:
|
|
11141
|
+
color: P.TextSecondary
|
|
11145
11142
|
},
|
|
11146
11143
|
overline: {
|
|
11147
11144
|
fontFamily: Re.FontBody,
|
|
@@ -11149,7 +11146,7 @@ const Mu = {
|
|
|
11149
11146
|
fontWeight: Re.WeightSemibold,
|
|
11150
11147
|
lineHeight: Re.LeadingTight,
|
|
11151
11148
|
letterSpacing: "0.08em",
|
|
11152
|
-
color:
|
|
11149
|
+
color: P.TextSecondary
|
|
11153
11150
|
}
|
|
11154
11151
|
}, Pu = {
|
|
11155
11152
|
xs: { fontSize: Re.TextXs },
|
|
@@ -11453,7 +11450,7 @@ function ip({
|
|
|
11453
11450
|
email: p.email ?? "",
|
|
11454
11451
|
password: p.password ?? "",
|
|
11455
11452
|
rememberMe: p.rememberMe ?? !1
|
|
11456
|
-
}), [v, h] = L({}), [C,
|
|
11453
|
+
}), [v, h] = L({}), [C, T] = L({}), w = S((_, D) => {
|
|
11457
11454
|
try {
|
|
11458
11455
|
Ka.shape[_].parse(D), h((R) => ({ ...R, [_]: void 0 }));
|
|
11459
11456
|
} catch (N) {
|
|
@@ -11464,9 +11461,9 @@ function ip({
|
|
|
11464
11461
|
x((N) => ({ ...N, [_]: D })), C[_] && w(_, D);
|
|
11465
11462
|
},
|
|
11466
11463
|
[C, w]
|
|
11467
|
-
),
|
|
11464
|
+
), I = S(
|
|
11468
11465
|
(_) => () => {
|
|
11469
|
-
|
|
11466
|
+
T((D) => ({ ...D, [_]: !0 })), w(_, y[_]);
|
|
11470
11467
|
},
|
|
11471
11468
|
[y, w]
|
|
11472
11469
|
), g = S(
|
|
@@ -11481,7 +11478,7 @@ function ip({
|
|
|
11481
11478
|
D.error.issues.forEach((R) => {
|
|
11482
11479
|
const A = R.path[0];
|
|
11483
11480
|
N[A] || (N[A] = R.message);
|
|
11484
|
-
}), h(N),
|
|
11481
|
+
}), h(N), T({ email: !0, password: !0 });
|
|
11485
11482
|
return;
|
|
11486
11483
|
}
|
|
11487
11484
|
await m?.(D.data);
|
|
@@ -11508,7 +11505,7 @@ function ip({
|
|
|
11508
11505
|
placeholder: "name@company.com",
|
|
11509
11506
|
value: y.email,
|
|
11510
11507
|
onChange: (_) => k("email")(_.target.value),
|
|
11511
|
-
onBlur:
|
|
11508
|
+
onBlur: I("email"),
|
|
11512
11509
|
status: v.email ? "error" : void 0,
|
|
11513
11510
|
disabled: u || l
|
|
11514
11511
|
}
|
|
@@ -11535,7 +11532,7 @@ function ip({
|
|
|
11535
11532
|
placeholder: "Enter your password",
|
|
11536
11533
|
value: y.password,
|
|
11537
11534
|
onChange: (_) => k("password")(_.target.value),
|
|
11538
|
-
onBlur:
|
|
11535
|
+
onBlur: I("password"),
|
|
11539
11536
|
status: v.password ? "error" : void 0,
|
|
11540
11537
|
disabled: u || l
|
|
11541
11538
|
}
|
|
@@ -11717,7 +11714,7 @@ function Au({
|
|
|
11717
11714
|
},
|
|
11718
11715
|
getValues: () => ({ ...f })
|
|
11719
11716
|
}), [f]);
|
|
11720
|
-
const
|
|
11717
|
+
const T = S((g, E) => {
|
|
11721
11718
|
if (g === "street2" && !E) {
|
|
11722
11719
|
h((_) => ({ ..._, [g]: void 0 }));
|
|
11723
11720
|
return;
|
|
@@ -11730,15 +11727,15 @@ function Au({
|
|
|
11730
11727
|
}, []), w = S(
|
|
11731
11728
|
(g) => (E) => {
|
|
11732
11729
|
const _ = { ...f, [g]: E };
|
|
11733
|
-
b(_), l?.(_), y[g] &&
|
|
11730
|
+
b(_), l?.(_), y[g] && T(g, E);
|
|
11734
11731
|
},
|
|
11735
|
-
[f, y, l,
|
|
11732
|
+
[f, y, l, T]
|
|
11736
11733
|
), k = S(
|
|
11737
11734
|
(g) => () => {
|
|
11738
|
-
x((E) => ({ ...E, [g]: !0 })),
|
|
11735
|
+
x((E) => ({ ...E, [g]: !0 })), T(g, f[g] ?? ""), u?.(g);
|
|
11739
11736
|
},
|
|
11740
|
-
[f,
|
|
11741
|
-
),
|
|
11737
|
+
[f, T, u]
|
|
11738
|
+
), I = (g) => {
|
|
11742
11739
|
if (y[g]) {
|
|
11743
11740
|
if (C[g]) return "error";
|
|
11744
11741
|
if (f[g]) return "success";
|
|
@@ -11763,7 +11760,7 @@ function Au({
|
|
|
11763
11760
|
value: f.street,
|
|
11764
11761
|
onChange: (g) => w("street")(g.target.value),
|
|
11765
11762
|
onBlur: k("street"),
|
|
11766
|
-
status:
|
|
11763
|
+
status: I("street"),
|
|
11767
11764
|
disabled: i
|
|
11768
11765
|
}
|
|
11769
11766
|
),
|
|
@@ -11798,7 +11795,7 @@ function Au({
|
|
|
11798
11795
|
value: f.city,
|
|
11799
11796
|
onChange: (g) => w("city")(g.target.value),
|
|
11800
11797
|
onBlur: k("city"),
|
|
11801
|
-
status:
|
|
11798
|
+
status: I("city"),
|
|
11802
11799
|
disabled: i
|
|
11803
11800
|
}
|
|
11804
11801
|
),
|
|
@@ -11847,7 +11844,7 @@ function Au({
|
|
|
11847
11844
|
value: f.zip,
|
|
11848
11845
|
onChange: (g) => w("zip")(g.target.value),
|
|
11849
11846
|
onBlur: k("zip"),
|
|
11850
|
-
status:
|
|
11847
|
+
status: I("zip"),
|
|
11851
11848
|
disabled: i,
|
|
11852
11849
|
maxLength: 10
|
|
11853
11850
|
}
|
|
@@ -11970,22 +11967,22 @@ function dp({
|
|
|
11970
11967
|
expiryDate: p.expiryDate ?? "",
|
|
11971
11968
|
cvv: p.cvv ?? "",
|
|
11972
11969
|
cardholderName: p.cardholderName ?? ""
|
|
11973
|
-
}), [h, C] = L({}), [
|
|
11970
|
+
}), [h, C] = L({}), [T, w] = L({}), k = te(() => n ? `${a} ${n}` : a, [a, n]), I = S((N, R) => {
|
|
11974
11971
|
try {
|
|
11975
|
-
pr.shape[N].parse(R), C((
|
|
11972
|
+
pr.shape[N].parse(R), C((F) => ({ ...F, [N]: void 0 }));
|
|
11976
11973
|
} catch (A) {
|
|
11977
|
-
A instanceof ye.ZodError && C((
|
|
11974
|
+
A instanceof ye.ZodError && C((F) => ({ ...F, [N]: A.issues[0]?.message }));
|
|
11978
11975
|
}
|
|
11979
11976
|
}, []), g = S(
|
|
11980
11977
|
(N) => (R) => {
|
|
11981
|
-
v((A) => ({ ...A, [N]: R })), N === "cardNumber" && y?.(R.replace(/\s/g, "")),
|
|
11978
|
+
v((A) => ({ ...A, [N]: R })), N === "cardNumber" && y?.(R.replace(/\s/g, "")), T[N] && I(N, R);
|
|
11982
11979
|
},
|
|
11983
|
-
[
|
|
11980
|
+
[T, I, y]
|
|
11984
11981
|
), E = S(
|
|
11985
11982
|
(N) => () => {
|
|
11986
|
-
w((R) => ({ ...R, [N]: !0 })),
|
|
11983
|
+
w((R) => ({ ...R, [N]: !0 })), I(N, x[N]);
|
|
11987
11984
|
},
|
|
11988
|
-
[x,
|
|
11985
|
+
[x, I]
|
|
11989
11986
|
), _ = S(
|
|
11990
11987
|
async (N) => {
|
|
11991
11988
|
if (N.preventDefault(), f) {
|
|
@@ -11995,9 +11992,9 @@ function dp({
|
|
|
11995
11992
|
const R = pr.safeParse(x);
|
|
11996
11993
|
if (!R.success) {
|
|
11997
11994
|
const A = {};
|
|
11998
|
-
R.error.issues.forEach((
|
|
11999
|
-
const M =
|
|
12000
|
-
A[M] || (A[M] =
|
|
11995
|
+
R.error.issues.forEach((F) => {
|
|
11996
|
+
const M = F.path[0];
|
|
11997
|
+
A[M] || (A[M] = F.message);
|
|
12001
11998
|
}), C(A), w({
|
|
12002
11999
|
cardNumber: !0,
|
|
12003
12000
|
expiryDate: !0,
|
|
@@ -12010,7 +12007,7 @@ function dp({
|
|
|
12010
12007
|
},
|
|
12011
12008
|
[x, m, f]
|
|
12012
12009
|
), D = (N) => {
|
|
12013
|
-
if (
|
|
12010
|
+
if (T[N]) {
|
|
12014
12011
|
if (h[N]) return "error";
|
|
12015
12012
|
if (x[N] && !h[N]) return "success";
|
|
12016
12013
|
}
|
|
@@ -12038,7 +12035,7 @@ function dp({
|
|
|
12038
12035
|
disabled: l || o
|
|
12039
12036
|
}
|
|
12040
12037
|
) }),
|
|
12041
|
-
h.cardNumber &&
|
|
12038
|
+
h.cardNumber && T.cardNumber && /* @__PURE__ */ e("span", { className: "gloss-pattern-credit-card-form__error", children: h.cardNumber })
|
|
12042
12039
|
] }),
|
|
12043
12040
|
/* @__PURE__ */ d("div", { className: "gloss-pattern-credit-card-form__row", children: [
|
|
12044
12041
|
/* @__PURE__ */ d("div", { className: "gloss-pattern-credit-card-form__field", children: [
|
|
@@ -12055,7 +12052,7 @@ function dp({
|
|
|
12055
12052
|
disabled: l || o
|
|
12056
12053
|
}
|
|
12057
12054
|
),
|
|
12058
|
-
h.expiryDate &&
|
|
12055
|
+
h.expiryDate && T.expiryDate && /* @__PURE__ */ e("span", { className: "gloss-pattern-credit-card-form__error", children: h.expiryDate })
|
|
12059
12056
|
] }),
|
|
12060
12057
|
/* @__PURE__ */ d("div", { className: "gloss-pattern-credit-card-form__field", children: [
|
|
12061
12058
|
/* @__PURE__ */ e("label", { className: "gloss-pattern-credit-card-form__label", children: "CVV" }),
|
|
@@ -12073,7 +12070,7 @@ function dp({
|
|
|
12073
12070
|
disabled: l || o
|
|
12074
12071
|
}
|
|
12075
12072
|
),
|
|
12076
|
-
h.cvv &&
|
|
12073
|
+
h.cvv && T.cvv && /* @__PURE__ */ e("span", { className: "gloss-pattern-credit-card-form__error", children: h.cvv })
|
|
12077
12074
|
] })
|
|
12078
12075
|
] }),
|
|
12079
12076
|
/* @__PURE__ */ d("div", { className: "gloss-pattern-credit-card-form__field", children: [
|
|
@@ -12089,7 +12086,7 @@ function dp({
|
|
|
12089
12086
|
disabled: l || o
|
|
12090
12087
|
}
|
|
12091
12088
|
),
|
|
12092
|
-
h.cardholderName &&
|
|
12089
|
+
h.cardholderName && T.cardholderName && /* @__PURE__ */ e("span", { className: "gloss-pattern-credit-card-form__error", children: h.cardholderName })
|
|
12093
12090
|
] })
|
|
12094
12091
|
] }),
|
|
12095
12092
|
/* @__PURE__ */ d("div", { className: "gloss-pattern-credit-card-form__footer", children: [
|
|
@@ -12217,7 +12214,7 @@ function mp({
|
|
|
12217
12214
|
}
|
|
12218
12215
|
},
|
|
12219
12216
|
[f.password]
|
|
12220
|
-
),
|
|
12217
|
+
), T = S(
|
|
12221
12218
|
(g) => (E) => {
|
|
12222
12219
|
b((_) => ({ ..._, [g]: E })), v[g] && C(g, E);
|
|
12223
12220
|
},
|
|
@@ -12252,7 +12249,7 @@ function mp({
|
|
|
12252
12249
|
await r?.(E.data);
|
|
12253
12250
|
},
|
|
12254
12251
|
[f, r, t]
|
|
12255
|
-
),
|
|
12252
|
+
), I = o ? /* @__PURE__ */ d("span", { children: [
|
|
12256
12253
|
"I agree to the",
|
|
12257
12254
|
" ",
|
|
12258
12255
|
/* @__PURE__ */ e(jt, { href: c, size: "sm", children: "Terms of Service" })
|
|
@@ -12271,7 +12268,7 @@ function mp({
|
|
|
12271
12268
|
{
|
|
12272
12269
|
placeholder: "John",
|
|
12273
12270
|
value: f.firstName,
|
|
12274
|
-
onChange: (g) =>
|
|
12271
|
+
onChange: (g) => T("firstName")(g.target.value),
|
|
12275
12272
|
onBlur: w("firstName"),
|
|
12276
12273
|
status: y.firstName ? "error" : void 0,
|
|
12277
12274
|
disabled: n || a,
|
|
@@ -12287,7 +12284,7 @@ function mp({
|
|
|
12287
12284
|
{
|
|
12288
12285
|
placeholder: "Doe",
|
|
12289
12286
|
value: f.lastName,
|
|
12290
|
-
onChange: (g) =>
|
|
12287
|
+
onChange: (g) => T("lastName")(g.target.value),
|
|
12291
12288
|
onBlur: w("lastName"),
|
|
12292
12289
|
status: y.lastName ? "error" : void 0,
|
|
12293
12290
|
disabled: n || a,
|
|
@@ -12305,7 +12302,7 @@ function mp({
|
|
|
12305
12302
|
type: "email",
|
|
12306
12303
|
placeholder: "name@company.com",
|
|
12307
12304
|
value: f.email,
|
|
12308
|
-
onChange: (g) =>
|
|
12305
|
+
onChange: (g) => T("email")(g.target.value),
|
|
12309
12306
|
onBlur: w("email"),
|
|
12310
12307
|
status: y.email ? "error" : void 0,
|
|
12311
12308
|
disabled: n || a,
|
|
@@ -12324,7 +12321,7 @@ function mp({
|
|
|
12324
12321
|
showRules: !0,
|
|
12325
12322
|
placeholder: "Create a password",
|
|
12326
12323
|
value: f.password,
|
|
12327
|
-
onChange: (g) =>
|
|
12324
|
+
onChange: (g) => T("password")(g.target.value),
|
|
12328
12325
|
onBlur: w("password"),
|
|
12329
12326
|
status: y.password ? "error" : void 0,
|
|
12330
12327
|
disabled: n || a,
|
|
@@ -12342,7 +12339,7 @@ function mp({
|
|
|
12342
12339
|
showToggle: !0,
|
|
12343
12340
|
placeholder: "Confirm your password",
|
|
12344
12341
|
value: f.confirmPassword,
|
|
12345
|
-
onChange: (g) =>
|
|
12342
|
+
onChange: (g) => T("confirmPassword")(g.target.value),
|
|
12346
12343
|
onBlur: w("confirmPassword"),
|
|
12347
12344
|
status: y.confirmPassword ? "error" : void 0,
|
|
12348
12345
|
disabled: n || a,
|
|
@@ -12357,8 +12354,8 @@ function mp({
|
|
|
12357
12354
|
ct,
|
|
12358
12355
|
{
|
|
12359
12356
|
checked: f.acceptTerms,
|
|
12360
|
-
onChange: (g) =>
|
|
12361
|
-
label:
|
|
12357
|
+
onChange: (g) => T("acceptTerms")(g.target.checked),
|
|
12358
|
+
label: I,
|
|
12362
12359
|
variant: y.acceptTerms && v.acceptTerms ? "error" : "default",
|
|
12363
12360
|
disabled: n || a
|
|
12364
12361
|
}
|
|
@@ -12450,12 +12447,12 @@ function fp({
|
|
|
12450
12447
|
}), [m, f] = L({}), [b, y] = L({}), x = S((w, k) => {
|
|
12451
12448
|
try {
|
|
12452
12449
|
Ua.shape[w].parse(k), f((g) => ({ ...g, [w]: void 0 }));
|
|
12453
|
-
} catch (
|
|
12454
|
-
|
|
12450
|
+
} catch (I) {
|
|
12451
|
+
I instanceof ye.ZodError && f((g) => ({ ...g, [w]: I.issues[0]?.message }));
|
|
12455
12452
|
}
|
|
12456
12453
|
}, []), v = S(
|
|
12457
12454
|
(w) => (k) => {
|
|
12458
|
-
p((
|
|
12455
|
+
p((I) => ({ ...I, [w]: k })), b[w] && x(w, k);
|
|
12459
12456
|
},
|
|
12460
12457
|
[b, x]
|
|
12461
12458
|
), h = S(
|
|
@@ -12471,11 +12468,11 @@ function fp({
|
|
|
12471
12468
|
}
|
|
12472
12469
|
const k = Ua.safeParse(u);
|
|
12473
12470
|
if (!k.success) {
|
|
12474
|
-
const
|
|
12471
|
+
const I = {};
|
|
12475
12472
|
k.error.issues.forEach((g) => {
|
|
12476
12473
|
const E = g.path[0];
|
|
12477
|
-
|
|
12478
|
-
}), f(
|
|
12474
|
+
I[E] || (I[E] = g.message);
|
|
12475
|
+
}), f(I), y({
|
|
12479
12476
|
name: !0,
|
|
12480
12477
|
email: !0,
|
|
12481
12478
|
subject: !0,
|
|
@@ -12486,7 +12483,7 @@ function fp({
|
|
|
12486
12483
|
await r?.(k.data);
|
|
12487
12484
|
},
|
|
12488
12485
|
[u, r, t]
|
|
12489
|
-
),
|
|
12486
|
+
), T = o?.map((w) => ({
|
|
12490
12487
|
value: w,
|
|
12491
12488
|
label: w
|
|
12492
12489
|
}));
|
|
@@ -12531,10 +12528,10 @@ function fp({
|
|
|
12531
12528
|
] }),
|
|
12532
12529
|
/* @__PURE__ */ d("div", { className: "gloss-contact-form__field", children: [
|
|
12533
12530
|
/* @__PURE__ */ e("label", { className: "gloss-contact-form__label", children: "Subject" }),
|
|
12534
|
-
|
|
12531
|
+
T ? /* @__PURE__ */ e(
|
|
12535
12532
|
It,
|
|
12536
12533
|
{
|
|
12537
|
-
options:
|
|
12534
|
+
options: T,
|
|
12538
12535
|
value: u.subject,
|
|
12539
12536
|
onChange: (w) => {
|
|
12540
12537
|
v("subject")(w), y((k) => ({ ...k, subject: !0 }));
|
|
@@ -12657,22 +12654,22 @@ function hp({
|
|
|
12657
12654
|
expiryDate: s.card?.expiryDate ?? "",
|
|
12658
12655
|
cvv: s.card?.cvv ?? "",
|
|
12659
12656
|
cardholderName: s.card?.cardholderName ?? ""
|
|
12660
|
-
}), [y, x] = L({}), [v, h] = L({}), [C,
|
|
12657
|
+
}), [y, x] = L({}), [v, h] = L({}), [C, T] = L(
|
|
12661
12658
|
s.savePaymentMethod ?? !1
|
|
12662
|
-
), [w, k] = L(),
|
|
12659
|
+
), [w, k] = L(), I = le(null), g = p === "credit_card" || p === "debit_card", E = S((A, F) => {
|
|
12663
12660
|
try {
|
|
12664
|
-
pr.shape[A].parse(
|
|
12661
|
+
pr.shape[A].parse(F), x((W) => ({ ...W, [A]: void 0 }));
|
|
12665
12662
|
} catch (M) {
|
|
12666
|
-
M instanceof ye.ZodError && x((
|
|
12663
|
+
M instanceof ye.ZodError && x((W) => ({ ...W, [A]: M.issues[0]?.message }));
|
|
12667
12664
|
}
|
|
12668
12665
|
}, []), _ = S(
|
|
12669
|
-
(A) => (
|
|
12670
|
-
b((M) => ({ ...M, [A]:
|
|
12666
|
+
(A) => (F) => {
|
|
12667
|
+
b((M) => ({ ...M, [A]: F })), v[A] && E(A, F);
|
|
12671
12668
|
},
|
|
12672
12669
|
[v, E]
|
|
12673
12670
|
), D = S(
|
|
12674
12671
|
(A) => () => {
|
|
12675
|
-
h((
|
|
12672
|
+
h((F) => ({ ...F, [A]: !0 })), E(A, f[A]);
|
|
12676
12673
|
},
|
|
12677
12674
|
[f, E]
|
|
12678
12675
|
), N = (A) => {
|
|
@@ -12686,32 +12683,32 @@ function hp({
|
|
|
12686
12683
|
t(new FormData(A.currentTarget));
|
|
12687
12684
|
return;
|
|
12688
12685
|
}
|
|
12689
|
-
const
|
|
12690
|
-
if (!
|
|
12686
|
+
const F = I.current?.validate(), M = I.current?.getValues();
|
|
12687
|
+
if (!F?.success) {
|
|
12691
12688
|
k("Please fix the errors above before submitting.");
|
|
12692
12689
|
return;
|
|
12693
12690
|
}
|
|
12694
|
-
const
|
|
12691
|
+
const W = {
|
|
12695
12692
|
paymentMethod: p,
|
|
12696
12693
|
billingAddress: M,
|
|
12697
12694
|
savePaymentMethod: C
|
|
12698
12695
|
};
|
|
12699
|
-
g && (
|
|
12700
|
-
const U = $u.safeParse(
|
|
12696
|
+
g && (W.card = f);
|
|
12697
|
+
const U = $u.safeParse(W);
|
|
12701
12698
|
if (!U.success) {
|
|
12702
|
-
const
|
|
12703
|
-
U.error.issues.forEach((
|
|
12704
|
-
const
|
|
12705
|
-
if (
|
|
12706
|
-
const
|
|
12707
|
-
V
|
|
12708
|
-
} else
|
|
12709
|
-
}), Object.keys(
|
|
12699
|
+
const j = {};
|
|
12700
|
+
U.error.issues.forEach((B) => {
|
|
12701
|
+
const H = B.path;
|
|
12702
|
+
if (H[0] === "card" && H.length === 2) {
|
|
12703
|
+
const V = H[1];
|
|
12704
|
+
j[V] || (j[V] = B.message);
|
|
12705
|
+
} else H[0] === "card" && H.length === 1 && k(B.message);
|
|
12706
|
+
}), Object.keys(j).length > 0 && (x(j), h({
|
|
12710
12707
|
cardNumber: !0,
|
|
12711
12708
|
expiryDate: !0,
|
|
12712
12709
|
cvv: !0,
|
|
12713
12710
|
cardholderName: !0
|
|
12714
|
-
})), !w && Object.keys(
|
|
12711
|
+
})), !w && Object.keys(j).length === 0 && k("Please fix the errors above before submitting.");
|
|
12715
12712
|
return;
|
|
12716
12713
|
}
|
|
12717
12714
|
await r?.(U.data);
|
|
@@ -12726,13 +12723,13 @@ function hp({
|
|
|
12726
12723
|
{
|
|
12727
12724
|
methods: l,
|
|
12728
12725
|
value: l.find((A) => A.id === p)?.id,
|
|
12729
|
-
onChange: (A,
|
|
12726
|
+
onChange: (A, F) => {
|
|
12730
12727
|
m({
|
|
12731
12728
|
visa: "credit_card",
|
|
12732
12729
|
mastercard: "credit_card",
|
|
12733
12730
|
amex: "credit_card",
|
|
12734
12731
|
generic: "credit_card"
|
|
12735
|
-
}[
|
|
12732
|
+
}[F.type] ?? "credit_card");
|
|
12736
12733
|
},
|
|
12737
12734
|
disabled: n || a
|
|
12738
12735
|
}
|
|
@@ -12815,7 +12812,7 @@ function hp({
|
|
|
12815
12812
|
/* @__PURE__ */ e(
|
|
12816
12813
|
On,
|
|
12817
12814
|
{
|
|
12818
|
-
ref:
|
|
12815
|
+
ref: I,
|
|
12819
12816
|
legend: "",
|
|
12820
12817
|
compact: !0,
|
|
12821
12818
|
showStreet2: !0,
|
|
@@ -12828,7 +12825,7 @@ function hp({
|
|
|
12828
12825
|
ct,
|
|
12829
12826
|
{
|
|
12830
12827
|
checked: C,
|
|
12831
|
-
onChange: (A) =>
|
|
12828
|
+
onChange: (A) => T(A.target.checked),
|
|
12832
12829
|
label: "Save this payment method for future use",
|
|
12833
12830
|
disabled: n || a
|
|
12834
12831
|
}
|
|
@@ -13137,26 +13134,26 @@ function Lu(r) {
|
|
|
13137
13134
|
Lu.displayName = "OrderFilterBar";
|
|
13138
13135
|
const Hu = {
|
|
13139
13136
|
default: {
|
|
13140
|
-
fillBg:
|
|
13141
|
-
trackBg:
|
|
13137
|
+
fillBg: P.BrandPrimary,
|
|
13138
|
+
trackBg: P.Gray200,
|
|
13142
13139
|
height: "8px",
|
|
13143
13140
|
radius: Ce.Full
|
|
13144
13141
|
},
|
|
13145
13142
|
success: {
|
|
13146
|
-
fillBg:
|
|
13147
|
-
trackBg:
|
|
13143
|
+
fillBg: P.Green600,
|
|
13144
|
+
trackBg: P.Green50,
|
|
13148
13145
|
height: "8px",
|
|
13149
13146
|
radius: Ce.Full
|
|
13150
13147
|
},
|
|
13151
13148
|
warning: {
|
|
13152
|
-
fillBg:
|
|
13153
|
-
trackBg:
|
|
13149
|
+
fillBg: P.Amber600,
|
|
13150
|
+
trackBg: P.Amber100,
|
|
13154
13151
|
height: "8px",
|
|
13155
13152
|
radius: Ce.Full
|
|
13156
13153
|
},
|
|
13157
13154
|
error: {
|
|
13158
|
-
fillBg:
|
|
13159
|
-
trackBg:
|
|
13155
|
+
fillBg: P.Red600,
|
|
13156
|
+
trackBg: P.Red50,
|
|
13160
13157
|
height: "8px",
|
|
13161
13158
|
radius: Ce.Full
|
|
13162
13159
|
}
|
|
@@ -13227,7 +13224,7 @@ function Gu(r) {
|
|
|
13227
13224
|
), C = S(
|
|
13228
13225
|
(k) => k === 0 && m.length === 0 ? (v("Please upload a file to continue."), !1) : !0,
|
|
13229
13226
|
[m]
|
|
13230
|
-
),
|
|
13227
|
+
), T = S(async () => {
|
|
13231
13228
|
try {
|
|
13232
13229
|
v(null), await i(b);
|
|
13233
13230
|
} catch {
|
|
@@ -13273,7 +13270,7 @@ function Gu(r) {
|
|
|
13273
13270
|
" rows to import."
|
|
13274
13271
|
] }),
|
|
13275
13272
|
o && c != null && /* @__PURE__ */ e(Ln, { value: c, max: 100, label: "Importing..." }),
|
|
13276
|
-
!o && /* @__PURE__ */ e(De, { variant: "primary", onClick:
|
|
13273
|
+
!o && /* @__PURE__ */ e(De, { variant: "primary", onClick: T, children: "Import" }),
|
|
13277
13274
|
o && /* @__PURE__ */ e(De, { variant: "primary", disabled: !0, isLoading: !0, children: "Importing..." })
|
|
13278
13275
|
] });
|
|
13279
13276
|
default:
|