@mt-gloss/ui 0.1.137 → 0.1.138
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/{COMMITS-B7dc_-m8.js → COMMITS-aGwevMtR.js} +254 -186
- package/{Expandable-DA4NFzCR.js → Expandable-G7SCUlMb.js} +740 -738
- package/catalog.js +2 -2
- package/composites-panels.js +786 -668
- package/index.js +804 -852
- package/lib/composites/panels/coordinator/settingsBufferSchemas.d.ts +9 -4
- package/lib/composites/panels/index.d.ts +0 -2
- package/lib/composites/panels/shells/SettingsShell.d.ts +14 -16
- package/lib/composites/panels/shells/index.d.ts +0 -2
- package/lib/composites/panels/shells/settings/ColorControls.d.ts +13 -0
- package/lib/composites/panels/shells/settings/SlotsControls.d.ts +1 -6
- package/lib/composites/panels/shells/settings/ThresholdControls.d.ts +10 -0
- package/lib/composites/panels/shells/settings/index.d.ts +4 -6
- package/lib/composites/panels/stage3d/CloneStage.d.ts +11 -1
- package/lib/facade/index.d.ts +0 -2
- package/lib/presets/PresetMenu/PresetMenu.d.ts +1 -0
- package/package.json +1 -1
- package/ui.css +1 -1
- package/lib/composites/panels/shells/MetricInfoShell.d.ts +0 -29
- package/lib/composites/panels/shells/settings/GhostSlotPill.d.ts +0 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as o, jsx as e, Fragment as Ye } from "react/jsx-runtime";
|
|
2
2
|
import * as ua from "react";
|
|
3
|
-
import ve, { useId as He, useState as H, useCallback as
|
|
3
|
+
import ve, { useId as He, useState as H, useCallback as N, createContext as Ut, useContext as Xt, useRef as ce, useEffect as le, useMemo as Q, useSyncExternalStore as Kn, useReducer as Yn, forwardRef as Un, useImperativeHandle as Xn } from "react";
|
|
4
4
|
import { S as Z, E as Ze, C as B, e as qn, R as Se, h as Zn, i as Jn, j as Qn, af as es, M as ts, p as as, a9 as rs, ag as ye, N as ns, O as Vr, P as Wr, Q as ss, V as is, W as ls, X as os, Y as cs, _ as ds, a1 as us, a2 as ms, a3 as ps, a8 as gs, a4 as fs, a5 as hs, L as bs, K as ys, f as vs, g as _s, $ as xs, a0 as Ns, k as Ss, q as Cs, v as ks, r as ws, U as _t, w as Ds, x as Is, s as Ts, y as Es, t as Ps, ad as Ms, ae as Bs, z as As, A as Rs, D as zs, F as Fs, G as $s, H as Os, I as Ls, J as Hs, c as Dt, d as Je, Z as jr, B as Gs, ab as Vs, b as Kr, T as Re, aa as Ws, ac as br } from "./UIContext-CGQI_KJk.js";
|
|
5
5
|
import { B as be, b as js, a as Ks } from "./BaseText-Dxbk1JJa.js";
|
|
6
6
|
import { u as Ys, a as Us, M as ut } from "./MetricCard-DOPtBpek.js";
|
|
@@ -200,9 +200,9 @@ const bl = {
|
|
|
200
200
|
name: b,
|
|
201
201
|
value: y,
|
|
202
202
|
id: _
|
|
203
|
-
} = t, v = He(), f = _ || v, [w, E] = H(c), S = d !== void 0,
|
|
204
|
-
(
|
|
205
|
-
S || E(
|
|
203
|
+
} = t, v = He(), f = _ || v, [w, E] = H(c), S = d !== void 0, C = S ? d : w, I = N(
|
|
204
|
+
(k) => {
|
|
205
|
+
S || E(k.target.checked), u?.(k), h?.(k.target.checked);
|
|
206
206
|
},
|
|
207
207
|
[S, u, h]
|
|
208
208
|
), p = {
|
|
@@ -210,7 +210,7 @@ const bl = {
|
|
|
210
210
|
...bl[r],
|
|
211
211
|
...yl[n]
|
|
212
212
|
};
|
|
213
|
-
(
|
|
213
|
+
(C || i) && (p.trackBg = B.BrandPrimary, p.trackBorder = B.BrandPrimary);
|
|
214
214
|
const M = [
|
|
215
215
|
"gloss-preset-checkbox",
|
|
216
216
|
`gloss-preset-checkbox--${r}`,
|
|
@@ -224,13 +224,13 @@ const bl = {
|
|
|
224
224
|
definition: p,
|
|
225
225
|
className: M,
|
|
226
226
|
indeterminate: i,
|
|
227
|
-
checked:
|
|
227
|
+
checked: C,
|
|
228
228
|
onChange: I,
|
|
229
229
|
disabled: m,
|
|
230
230
|
name: b,
|
|
231
231
|
value: y,
|
|
232
232
|
id: f,
|
|
233
|
-
"aria-checked": i ? "mixed" :
|
|
233
|
+
"aria-checked": i ? "mixed" : C,
|
|
234
234
|
children: s && /* @__PURE__ */ o("span", { className: "gloss-preset-checkbox__label", children: [
|
|
235
235
|
s,
|
|
236
236
|
g && /* @__PURE__ */ e("span", { className: "gloss-preset-checkbox__required", children: " *" })
|
|
@@ -261,14 +261,14 @@ function xl({
|
|
|
261
261
|
name: g
|
|
262
262
|
}) {
|
|
263
263
|
He();
|
|
264
|
-
const [b, y] = H(t), _ = a !== void 0, v = _ ? a : b, f =
|
|
265
|
-
(
|
|
266
|
-
const I = v.includes(
|
|
264
|
+
const [b, y] = H(t), _ = a !== void 0, v = _ ? a : b, f = N(
|
|
265
|
+
(C) => {
|
|
266
|
+
const I = v.includes(C) ? v.filter((p) => p !== C) : [...v, C];
|
|
267
267
|
_ || y(I), r?.(I);
|
|
268
268
|
},
|
|
269
269
|
[v, _, r]
|
|
270
|
-
), w =
|
|
271
|
-
(
|
|
270
|
+
), w = N(
|
|
271
|
+
(C) => v.includes(C),
|
|
272
272
|
[v]
|
|
273
273
|
), E = {
|
|
274
274
|
values: v,
|
|
@@ -287,20 +287,20 @@ function xl({
|
|
|
287
287
|
d,
|
|
288
288
|
h && /* @__PURE__ */ e("span", { className: "gloss-checkbox-group__required", children: " *" })
|
|
289
289
|
] }),
|
|
290
|
-
/* @__PURE__ */ e("div", { className: "gloss-checkbox-group__items", role: "group", children: n ? n.map((
|
|
290
|
+
/* @__PURE__ */ e("div", { className: "gloss-checkbox-group__items", role: "group", children: n ? n.map((C) => /* @__PURE__ */ e(
|
|
291
291
|
dt,
|
|
292
292
|
{
|
|
293
|
-
checked: w(
|
|
294
|
-
onChange: () => f(
|
|
295
|
-
label:
|
|
296
|
-
helperText:
|
|
297
|
-
disabled: m ||
|
|
293
|
+
checked: w(C.value),
|
|
294
|
+
onChange: () => f(C.value),
|
|
295
|
+
label: C.label,
|
|
296
|
+
helperText: C.helperText,
|
|
297
|
+
disabled: m || C.disabled,
|
|
298
298
|
size: i,
|
|
299
299
|
variant: u === "error" ? "error" : "default",
|
|
300
300
|
name: g,
|
|
301
|
-
value: String(
|
|
301
|
+
value: String(C.value)
|
|
302
302
|
},
|
|
303
|
-
String(
|
|
303
|
+
String(C.value)
|
|
304
304
|
)) : s }),
|
|
305
305
|
c && /* @__PURE__ */ e("div", { className: `gloss-checkbox-group__helper ${u === "error" ? "gloss-checkbox-group__helper--error" : ""}`, children: c })
|
|
306
306
|
] }) });
|
|
@@ -414,13 +414,13 @@ function Dl({
|
|
|
414
414
|
name: g
|
|
415
415
|
}) {
|
|
416
416
|
He();
|
|
417
|
-
const [b, y] = H(t), _ = a !== void 0, v = _ ? a : b, f =
|
|
418
|
-
(
|
|
419
|
-
_ || y(
|
|
417
|
+
const [b, y] = H(t), _ = a !== void 0, v = _ ? a : b, f = N(
|
|
418
|
+
(C) => {
|
|
419
|
+
_ || y(C), r?.(C);
|
|
420
420
|
},
|
|
421
421
|
[_, r]
|
|
422
|
-
), w =
|
|
423
|
-
(
|
|
422
|
+
), w = N(
|
|
423
|
+
(C) => v === C,
|
|
424
424
|
[v]
|
|
425
425
|
), E = {
|
|
426
426
|
value: v,
|
|
@@ -439,20 +439,20 @@ function Dl({
|
|
|
439
439
|
d,
|
|
440
440
|
h && /* @__PURE__ */ e("span", { className: "gloss-radio-group__required", children: " *" })
|
|
441
441
|
] }),
|
|
442
|
-
/* @__PURE__ */ e("div", { className: "gloss-radio-group__items", role: "radiogroup", "aria-required": h, children: n ? n.map((
|
|
442
|
+
/* @__PURE__ */ e("div", { className: "gloss-radio-group__items", role: "radiogroup", "aria-required": h, children: n ? n.map((C) => /* @__PURE__ */ e(
|
|
443
443
|
pa,
|
|
444
444
|
{
|
|
445
445
|
name: g,
|
|
446
|
-
value: String(
|
|
447
|
-
checked: w(
|
|
448
|
-
onChange: () => f(
|
|
449
|
-
label:
|
|
450
|
-
description:
|
|
451
|
-
disabled: m ||
|
|
446
|
+
value: String(C.value),
|
|
447
|
+
checked: w(C.value),
|
|
448
|
+
onChange: () => f(C.value),
|
|
449
|
+
label: C.label,
|
|
450
|
+
description: C.description,
|
|
451
|
+
disabled: m || C.disabled,
|
|
452
452
|
size: i,
|
|
453
453
|
variant: u === "error" ? "error" : "default"
|
|
454
454
|
},
|
|
455
|
-
String(
|
|
455
|
+
String(C.value)
|
|
456
456
|
)) : s }),
|
|
457
457
|
c && /* @__PURE__ */ e("div", { className: `gloss-radio-group__helper ${u === "error" ? "gloss-radio-group__helper--error" : ""}`, children: c })
|
|
458
458
|
] }) });
|
|
@@ -507,12 +507,12 @@ const Tl = {
|
|
|
507
507
|
onCheckedChange: m,
|
|
508
508
|
disabled: g = !1,
|
|
509
509
|
id: b
|
|
510
|
-
} = t, y = He(), _ = b || y, [v, f] = H(u), w = c !== void 0, E = w ? c : v, S =
|
|
510
|
+
} = t, y = He(), _ = b || y, [v, f] = H(u), w = c !== void 0, E = w ? c : v, S = N(
|
|
511
511
|
(p) => {
|
|
512
512
|
w || f(p.target.checked), h?.(p), m?.(p.target.checked);
|
|
513
513
|
},
|
|
514
514
|
[w, h, m]
|
|
515
|
-
),
|
|
515
|
+
), C = {
|
|
516
516
|
trackBg: B.Gray300,
|
|
517
517
|
trackBgActive: Tl[r],
|
|
518
518
|
thumbBg: B.White,
|
|
@@ -527,7 +527,7 @@ const Tl = {
|
|
|
527
527
|
Qn,
|
|
528
528
|
{
|
|
529
529
|
ref: a,
|
|
530
|
-
definition:
|
|
530
|
+
definition: C,
|
|
531
531
|
className: I,
|
|
532
532
|
checked: E,
|
|
533
533
|
onChange: S,
|
|
@@ -725,66 +725,66 @@ const Ll = {
|
|
|
725
725
|
helperText: f,
|
|
726
726
|
id: w,
|
|
727
727
|
name: E
|
|
728
|
-
} = t, S = He(),
|
|
728
|
+
} = t, S = He(), C = w || S, I = ce(null), [p, M] = H(s), [k, D] = H(null), x = n !== void 0, R = x ? n : p, T = (R[0] - d) / (c - d) * 100, z = (R[1] - d) / (c - d) * 100, P = N(($) => {
|
|
729
729
|
const U = Math.min(c, Math.max(d, $));
|
|
730
730
|
return Math.round((Math.round((U - d) / u) * u + d) * 1e3) / 1e3;
|
|
731
|
-
}, [d, c, u]), O =
|
|
731
|
+
}, [d, c, u]), O = N(($, U = !1) => {
|
|
732
732
|
const q = [P($[0]), P($[1])];
|
|
733
|
-
q[0] > q[1] - h && (
|
|
734
|
-
}, [P, h,
|
|
733
|
+
q[0] > q[1] - h && (k === 0 ? q[0] = q[1] - h : q[1] = q[0] + h), q[0] = Math.max(d, q[0]), q[1] = Math.min(c, q[1]), x || M(q), l?.(q), U && i?.(q);
|
|
734
|
+
}, [P, h, k, d, c, x, l, i]), Y = N(($, U) => {
|
|
735
735
|
if (!I.current) return 0;
|
|
736
736
|
const q = I.current.getBoundingClientRect(), K = y === "horizontal" ? ($ - q.left) / q.width : 1 - (U - q.top) / q.height;
|
|
737
737
|
return d + Math.min(1, Math.max(0, K)) * (c - d);
|
|
738
|
-
}, [y, d, c]), j =
|
|
738
|
+
}, [y, d, c]), j = N(($) => {
|
|
739
739
|
if (_) return;
|
|
740
740
|
$.preventDefault();
|
|
741
|
-
const U = Y($.clientX, $.clientY), q = Math.abs(U -
|
|
741
|
+
const U = Y($.clientX, $.clientY), q = Math.abs(U - R[0]) <= Math.abs(U - R[1]) ? 0 : 1;
|
|
742
742
|
D(q);
|
|
743
|
-
const K = [...
|
|
743
|
+
const K = [...R];
|
|
744
744
|
K[q] = U, O(K);
|
|
745
|
-
}, [_, Y,
|
|
745
|
+
}, [_, Y, R, O]);
|
|
746
746
|
le(() => {
|
|
747
|
-
if (
|
|
747
|
+
if (k === null) return;
|
|
748
748
|
const $ = (q) => {
|
|
749
|
-
const K = [...
|
|
750
|
-
K[
|
|
749
|
+
const K = [...R];
|
|
750
|
+
K[k] = Y(q.clientX, q.clientY), O(K);
|
|
751
751
|
}, U = (q) => {
|
|
752
|
-
const K = [...
|
|
753
|
-
K[
|
|
752
|
+
const K = [...R];
|
|
753
|
+
K[k] = Y(q.clientX, q.clientY), O(K, !0), D(null);
|
|
754
754
|
};
|
|
755
755
|
return document.addEventListener("mousemove", $), document.addEventListener("mouseup", U), () => {
|
|
756
756
|
document.removeEventListener("mousemove", $), document.removeEventListener("mouseup", U);
|
|
757
757
|
};
|
|
758
|
-
}, [
|
|
759
|
-
const A =
|
|
758
|
+
}, [k, Y, R, O]);
|
|
759
|
+
const A = N(($) => (U) => {
|
|
760
760
|
if (_) return;
|
|
761
761
|
let q = 0;
|
|
762
762
|
if (U.key === "ArrowRight" || U.key === "ArrowUp") q = u;
|
|
763
763
|
else if (U.key === "ArrowLeft" || U.key === "ArrowDown") q = -u;
|
|
764
764
|
else return;
|
|
765
765
|
U.preventDefault();
|
|
766
|
-
const K = [...
|
|
766
|
+
const K = [...R];
|
|
767
767
|
K[$] += q, O(K, !0);
|
|
768
|
-
}, [_, u,
|
|
768
|
+
}, [_, u, R, O]), G = Math.abs(z - T) < 5, W = { ...Hl, ...Ll[r] }, V = ["gloss-preset-rangeslider", `gloss-preset-rangeslider--${r}`, _ && "gloss-preset-rangeslider--disabled"].filter(Boolean).join(" ");
|
|
769
769
|
return /* @__PURE__ */ o("div", { className: V, children: [
|
|
770
|
-
v && /* @__PURE__ */ o("label", { className: "gloss-preset-rangeslider__label", htmlFor:
|
|
770
|
+
v && /* @__PURE__ */ o("label", { className: "gloss-preset-rangeslider__label", htmlFor: C, children: [
|
|
771
771
|
v,
|
|
772
772
|
g && /* @__PURE__ */ o("span", { className: "gloss-preset-rangeslider__value-label", children: [
|
|
773
|
-
b(
|
|
773
|
+
b(R[0]),
|
|
774
774
|
" - ",
|
|
775
|
-
b(
|
|
775
|
+
b(R[1])
|
|
776
776
|
] })
|
|
777
777
|
] }),
|
|
778
|
-
/* @__PURE__ */ e("input", { ref: a, type: "hidden", id:
|
|
779
|
-
/* @__PURE__ */ e("input", { type: "hidden", name: E ? `${E}[1]` : void 0, value:
|
|
778
|
+
/* @__PURE__ */ e("input", { ref: a, type: "hidden", id: C, name: E ? `${E}[0]` : void 0, value: R[0] }),
|
|
779
|
+
/* @__PURE__ */ e("input", { type: "hidden", name: E ? `${E}[1]` : void 0, value: R[1] }),
|
|
780
780
|
/* @__PURE__ */ e(rs, { definition: W, orientation: y, disabled: _, collision: G, children: /* @__PURE__ */ o("div", { ref: I, className: "gloss-base-rangeslider__track", onMouseDown: j, children: [
|
|
781
|
-
/* @__PURE__ */ e("div", { className: "gloss-base-rangeslider__fill", style: y === "horizontal" ? { left: `${T}%`, width: `${
|
|
782
|
-
/* @__PURE__ */ e("div", { className: `gloss-base-rangeslider__thumb ${
|
|
781
|
+
/* @__PURE__ */ e("div", { className: "gloss-base-rangeslider__fill", style: y === "horizontal" ? { left: `${T}%`, width: `${z - T}%` } : { bottom: `${T}%`, height: `${z - T}%` } }),
|
|
782
|
+
/* @__PURE__ */ e("div", { className: `gloss-base-rangeslider__thumb ${k === 0 ? "gloss-base-rangeslider__thumb--active" : ""}`, role: "slider", tabIndex: _ ? -1 : 0, "aria-valuenow": R[0], "aria-valuemin": d, "aria-valuemax": R[1] - h, onMouseDown: ($) => {
|
|
783
783
|
_ || ($.preventDefault(), $.stopPropagation(), D(0));
|
|
784
784
|
}, onKeyDown: A(0), style: y === "horizontal" ? { left: `${T}%` } : { bottom: `${T}%` }, "aria-label": `${v || "Range"} minimum` }),
|
|
785
|
-
/* @__PURE__ */ e("div", { className: `gloss-base-rangeslider__thumb ${
|
|
785
|
+
/* @__PURE__ */ e("div", { className: `gloss-base-rangeslider__thumb ${k === 1 ? "gloss-base-rangeslider__thumb--active" : ""}`, role: "slider", tabIndex: _ ? -1 : 0, "aria-valuenow": R[1], "aria-valuemin": R[0] + h, "aria-valuemax": c, onMouseDown: ($) => {
|
|
786
786
|
_ || ($.preventDefault(), $.stopPropagation(), D(1));
|
|
787
|
-
}, onKeyDown: A(1), style: y === "horizontal" ? { left: `${
|
|
787
|
+
}, onKeyDown: A(1), style: y === "horizontal" ? { left: `${z}%` } : { bottom: `${z}%` }, "aria-label": `${v || "Range"} maximum` })
|
|
788
788
|
] }) }),
|
|
789
789
|
f && /* @__PURE__ */ e("div", { className: "gloss-preset-rangeslider__helper", children: f })
|
|
790
790
|
] });
|
|
@@ -807,19 +807,19 @@ function nn(a = {}) {
|
|
|
807
807
|
initialFocus: s,
|
|
808
808
|
allowOutsideClick: l = !1,
|
|
809
809
|
onEscape: i
|
|
810
|
-
} = a, d = ce(null), c = ce(null), u =
|
|
810
|
+
} = a, d = ce(null), c = ce(null), u = N(() => {
|
|
811
811
|
if (!d.current) return [];
|
|
812
812
|
const b = d.current.querySelectorAll(Vl);
|
|
813
813
|
return Array.from(b).filter((y) => y.offsetParent !== null && !y.hidden);
|
|
814
|
-
}, []), h =
|
|
814
|
+
}, []), h = N(() => {
|
|
815
815
|
const b = u();
|
|
816
816
|
b.length > 0 && b[0].focus();
|
|
817
817
|
}, [u]);
|
|
818
|
-
|
|
818
|
+
N(() => {
|
|
819
819
|
const b = u();
|
|
820
820
|
b.length > 0 && b[b.length - 1].focus();
|
|
821
821
|
}, [u]);
|
|
822
|
-
const m =
|
|
822
|
+
const m = N(
|
|
823
823
|
(b) => {
|
|
824
824
|
if (!t || !d.current) return;
|
|
825
825
|
if (b.key === "Escape") {
|
|
@@ -840,7 +840,7 @@ function nn(a = {}) {
|
|
|
840
840
|
}
|
|
841
841
|
},
|
|
842
842
|
[t, u, i]
|
|
843
|
-
), g =
|
|
843
|
+
), g = N(
|
|
844
844
|
(b) => {
|
|
845
845
|
if (!t || !d.current || l) return;
|
|
846
846
|
const y = b.relatedTarget;
|
|
@@ -923,29 +923,29 @@ const Wl = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], jl = ["January", "
|
|
|
923
923
|
required: w,
|
|
924
924
|
id: E,
|
|
925
925
|
name: S
|
|
926
|
-
} = t,
|
|
926
|
+
} = t, C = He(), I = E || C, p = ce(null), [M, k] = H(!1), [D, x] = H(l), R = s !== void 0, T = R ? s : D, [z, P] = H(() => T || /* @__PURE__ */ new Date());
|
|
927
927
|
le(() => {
|
|
928
928
|
T && P(T);
|
|
929
929
|
}, [T]);
|
|
930
|
-
const O = nn({ enabled: M, onEscape: () =>
|
|
930
|
+
const O = nn({ enabled: M, onEscape: () => k(!1) }), Y = Q(() => Ul(z.getFullYear(), z.getMonth(), T, b, d, c, u, h), [z, T, b, d, c, u, h]), j = Q(() => {
|
|
931
931
|
const X = [...Wl];
|
|
932
932
|
if (b > 0) {
|
|
933
933
|
const ee = X.splice(0, b);
|
|
934
934
|
X.push(...ee);
|
|
935
935
|
}
|
|
936
936
|
return X;
|
|
937
|
-
}, [b]), A =
|
|
938
|
-
|
|
939
|
-
}, [
|
|
940
|
-
X.stopPropagation(),
|
|
941
|
-
}, [
|
|
937
|
+
}, [b]), A = N((X) => {
|
|
938
|
+
R || x(X), i?.(X), k(!1);
|
|
939
|
+
}, [R, i]), G = N((X) => {
|
|
940
|
+
X.stopPropagation(), R || x(null), i?.(null);
|
|
941
|
+
}, [R, i]), W = N((X) => P((ee) => {
|
|
942
942
|
const ge = new Date(ee);
|
|
943
943
|
return ge.setMonth(ge.getMonth() + X), ge;
|
|
944
944
|
}), []);
|
|
945
945
|
le(() => {
|
|
946
946
|
if (!M) return;
|
|
947
947
|
const X = (ee) => {
|
|
948
|
-
p.current && !p.current.contains(ee.target) &&
|
|
948
|
+
p.current && !p.current.contains(ee.target) && k(!1);
|
|
949
949
|
};
|
|
950
950
|
return document.addEventListener("mousedown", X), () => document.removeEventListener("mousedown", X);
|
|
951
951
|
}, [M]);
|
|
@@ -967,7 +967,7 @@ const Wl = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], jl = ["January", "
|
|
|
967
967
|
w && /* @__PURE__ */ e("span", { className: "gloss-preset-datepicker__required", children: "*" })
|
|
968
968
|
] }),
|
|
969
969
|
/* @__PURE__ */ e("input", { ref: a, type: "hidden", id: I, name: S, value: T ? T.toISOString() : "" }),
|
|
970
|
-
/* @__PURE__ */ o("button", { type: "button", className: "gloss-preset-datepicker__trigger", onClick: () => !v &&
|
|
970
|
+
/* @__PURE__ */ o("button", { type: "button", className: "gloss-preset-datepicker__trigger", onClick: () => !v && k((X) => !X), disabled: v, "aria-haspopup": "dialog", "aria-expanded": M, children: [
|
|
971
971
|
/* @__PURE__ */ e(ye, { name: "calendar", size: "sm" }),
|
|
972
972
|
/* @__PURE__ */ e("span", { className: `gloss-preset-datepicker__value ${V ? "" : "gloss-preset-datepicker__placeholder"}`, children: V || g }),
|
|
973
973
|
f && T && /* @__PURE__ */ e("span", { className: "gloss-preset-datepicker__clear", onClick: G, role: "button", tabIndex: -1, children: /* @__PURE__ */ e(ye, { name: "x", size: "sm" }) }),
|
|
@@ -977,9 +977,9 @@ const Wl = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], jl = ["January", "
|
|
|
977
977
|
/* @__PURE__ */ o(Vr, { children: [
|
|
978
978
|
/* @__PURE__ */ e("button", { type: "button", className: "gloss-preset-datepicker__nav-btn", onClick: () => W(-1), "aria-label": "Previous month", children: /* @__PURE__ */ e(ye, { name: "chevron-left", size: "sm" }) }),
|
|
979
979
|
/* @__PURE__ */ o("span", { className: "gloss-preset-datepicker__title", children: [
|
|
980
|
-
jl[
|
|
980
|
+
jl[z.getMonth()],
|
|
981
981
|
" ",
|
|
982
|
-
|
|
982
|
+
z.getFullYear()
|
|
983
983
|
] }),
|
|
984
984
|
/* @__PURE__ */ e("button", { type: "button", className: "gloss-preset-datepicker__nav-btn", onClick: () => W(1), "aria-label": "Next month", children: /* @__PURE__ */ e(ye, { name: "chevron-right", size: "sm" }) })
|
|
985
985
|
] }),
|
|
@@ -1054,19 +1054,19 @@ const Ra = (a) => {
|
|
|
1054
1054
|
clearable: v = !0,
|
|
1055
1055
|
id: f,
|
|
1056
1056
|
name: w
|
|
1057
|
-
} = t, E = He(), S = f || E,
|
|
1058
|
-
D ||
|
|
1059
|
-
}, [D, i]),
|
|
1060
|
-
j.stopPropagation(), D ||
|
|
1057
|
+
} = t, E = He(), S = f || E, C = ce(null), [I, p] = H(!1), [M, k] = H(l), D = s !== void 0, x = D ? s : M, R = Q(() => Jl(u, h, m), [u, h, m]), T = N((j) => {
|
|
1058
|
+
D || k(j), i?.(j), p(!1);
|
|
1059
|
+
}, [D, i]), z = N((j) => {
|
|
1060
|
+
j.stopPropagation(), D || k(""), i?.("");
|
|
1061
1061
|
}, [D, i]);
|
|
1062
1062
|
le(() => {
|
|
1063
1063
|
if (!I) return;
|
|
1064
1064
|
const j = (A) => {
|
|
1065
|
-
|
|
1065
|
+
C.current && !C.current.contains(A.target) && p(!1);
|
|
1066
1066
|
};
|
|
1067
1067
|
return document.addEventListener("mousedown", j), () => document.removeEventListener("mousedown", j);
|
|
1068
1068
|
}, [I]);
|
|
1069
|
-
const P =
|
|
1069
|
+
const P = x ? Cr(x, d, c) : "", O = {
|
|
1070
1070
|
bg: B.BgSurface,
|
|
1071
1071
|
borderColor: eo[r],
|
|
1072
1072
|
radius: Se.Md,
|
|
@@ -1078,16 +1078,16 @@ const Ra = (a) => {
|
|
|
1078
1078
|
`gloss-preset-timepicker--${n}`,
|
|
1079
1079
|
_ && "gloss-preset-timepicker--disabled"
|
|
1080
1080
|
].filter(Boolean).join(" ");
|
|
1081
|
-
return /* @__PURE__ */ o("div", { className: Y, ref:
|
|
1081
|
+
return /* @__PURE__ */ o("div", { className: Y, ref: C, children: [
|
|
1082
1082
|
b && /* @__PURE__ */ e("label", { className: "gloss-preset-timepicker__label", htmlFor: S, children: b }),
|
|
1083
|
-
/* @__PURE__ */ e("input", { ref: a, type: "hidden", id: S, name: w, value:
|
|
1083
|
+
/* @__PURE__ */ e("input", { ref: a, type: "hidden", id: S, name: w, value: x }),
|
|
1084
1084
|
/* @__PURE__ */ o("button", { type: "button", className: "gloss-preset-timepicker__trigger", onClick: () => !_ && p((j) => !j), disabled: _, "aria-haspopup": "listbox", "aria-expanded": I, children: [
|
|
1085
1085
|
/* @__PURE__ */ e(ye, { name: "clock", size: "sm" }),
|
|
1086
1086
|
/* @__PURE__ */ e("span", { className: `gloss-preset-timepicker__value ${P ? "" : "gloss-preset-timepicker__placeholder"}`, children: P || g }),
|
|
1087
|
-
v &&
|
|
1087
|
+
v && x && /* @__PURE__ */ e("span", { className: "gloss-preset-timepicker__clear", onClick: z, role: "button", tabIndex: -1, children: /* @__PURE__ */ e(ye, { name: "x", size: "sm" }) }),
|
|
1088
1088
|
/* @__PURE__ */ e(ye, { name: "chevron-down", size: "sm" })
|
|
1089
1089
|
] }),
|
|
1090
|
-
I && /* @__PURE__ */ e(is, { definition: O, children: /* @__PURE__ */ e(ls, { children:
|
|
1090
|
+
I && /* @__PURE__ */ e(is, { definition: O, children: /* @__PURE__ */ e(ls, { children: R.map((j) => /* @__PURE__ */ e(os, { selected: j === x, onClick: () => T(j), children: Cr(j, d, c) }, j)) }) }),
|
|
1091
1091
|
y && /* @__PURE__ */ e("div", { className: `gloss-preset-timepicker__helper ${r === "error" ? "gloss-preset-timepicker__helper--error" : ""}`, children: y })
|
|
1092
1092
|
] });
|
|
1093
1093
|
};
|
|
@@ -1144,37 +1144,37 @@ const ao = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], ro = ["January", "
|
|
|
1144
1144
|
clearable: w = !0,
|
|
1145
1145
|
id: E,
|
|
1146
1146
|
name: S
|
|
1147
|
-
} = t,
|
|
1147
|
+
} = t, C = He(), I = E || C, p = ce(null), [M, k] = H(!1), [D, x] = H(l), [R, T] = H(!1), z = s !== void 0, P = z ? s : D, [O, Y] = H(() => P.start || /* @__PURE__ */ new Date()), j = Q(() => {
|
|
1148
1148
|
const ne = new Date(O);
|
|
1149
1149
|
return ne.setMonth(ne.getMonth() + 1), ne;
|
|
1150
|
-
}, [O]), A = nn({ enabled: M, onEscape: () =>
|
|
1150
|
+
}, [O]), A = nn({ enabled: M, onEscape: () => k(!1) }), G = Q(() => wr(O.getFullYear(), O.getMonth(), P, y, d, c), [O, P, y, d, c]), W = Q(() => wr(j.getFullYear(), j.getMonth(), P, y, d, c), [j, P, y, d, c]), V = Q(() => {
|
|
1151
1151
|
const ne = [...ao];
|
|
1152
1152
|
if (y > 0) {
|
|
1153
1153
|
const fe = ne.splice(0, y);
|
|
1154
1154
|
ne.push(...fe);
|
|
1155
1155
|
}
|
|
1156
1156
|
return ne;
|
|
1157
|
-
}, [y]), $ =
|
|
1157
|
+
}, [y]), $ = N((ne) => {
|
|
1158
1158
|
let fe;
|
|
1159
|
-
if (!
|
|
1159
|
+
if (!R || !P.start)
|
|
1160
1160
|
fe = { start: ne, end: null }, T(!0);
|
|
1161
1161
|
else {
|
|
1162
1162
|
if (fe = ne < P.start ? { start: ne, end: P.start } : { start: P.start, end: ne }, u && fe.start && fe.end && Math.ceil(Math.abs(fe.end.getTime() - fe.start.getTime()) / 864e5) > u) return;
|
|
1163
|
-
T(!1),
|
|
1163
|
+
T(!1), k(!1);
|
|
1164
1164
|
}
|
|
1165
|
-
|
|
1166
|
-
}, [
|
|
1165
|
+
z || x(fe), i?.(fe);
|
|
1166
|
+
}, [R, P, u, z, i]), U = N((ne) => {
|
|
1167
1167
|
ne.stopPropagation();
|
|
1168
1168
|
const fe = { start: null, end: null };
|
|
1169
|
-
|
|
1170
|
-
}, [
|
|
1169
|
+
z || x(fe), i?.(fe), T(!1);
|
|
1170
|
+
}, [z, i]), q = N((ne) => Y((fe) => {
|
|
1171
1171
|
const oe = new Date(fe);
|
|
1172
1172
|
return oe.setMonth(oe.getMonth() + ne), oe;
|
|
1173
1173
|
}), []);
|
|
1174
1174
|
le(() => {
|
|
1175
1175
|
if (!M) return;
|
|
1176
1176
|
const ne = (fe) => {
|
|
1177
|
-
p.current && !p.current.contains(fe.target) && (
|
|
1177
|
+
p.current && !p.current.contains(fe.target) && (k(!1), T(!1));
|
|
1178
1178
|
};
|
|
1179
1179
|
return document.addEventListener("mousedown", ne), () => document.removeEventListener("mousedown", ne);
|
|
1180
1180
|
}, [M]);
|
|
@@ -1206,7 +1206,7 @@ const ao = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], ro = ["January", "
|
|
|
1206
1206
|
_ && /* @__PURE__ */ e("label", { className: "gloss-preset-daterangepicker__label", htmlFor: I, children: _ }),
|
|
1207
1207
|
/* @__PURE__ */ e("input", { ref: a, type: "hidden", id: I, name: S ? `${S}[start]` : void 0, value: P.start ? P.start.toISOString() : "" }),
|
|
1208
1208
|
/* @__PURE__ */ e("input", { type: "hidden", name: S ? `${S}[end]` : void 0, value: P.end ? P.end.toISOString() : "" }),
|
|
1209
|
-
/* @__PURE__ */ o("button", { type: "button", className: "gloss-preset-daterangepicker__trigger", onClick: () => !f &&
|
|
1209
|
+
/* @__PURE__ */ o("button", { type: "button", className: "gloss-preset-daterangepicker__trigger", onClick: () => !f && k((ne) => !ne), disabled: f, "aria-haspopup": "dialog", "aria-expanded": M, children: [
|
|
1210
1210
|
/* @__PURE__ */ e(ye, { name: "calendar", size: "sm" }),
|
|
1211
1211
|
/* @__PURE__ */ e("span", { className: `gloss-preset-daterangepicker__value ${K ? "" : "gloss-preset-daterangepicker__placeholder"}`, children: K || b }),
|
|
1212
1212
|
w && (P.start || P.end) && /* @__PURE__ */ e("span", { className: "gloss-preset-daterangepicker__clear", onClick: U, role: "button", tabIndex: -1, children: /* @__PURE__ */ e(ye, { name: "x", size: "sm" }) }),
|
|
@@ -1214,7 +1214,7 @@ const ao = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], ro = ["January", "
|
|
|
1214
1214
|
] }),
|
|
1215
1215
|
M && /* @__PURE__ */ o("div", { ref: A, className: "gloss-preset-daterangepicker__dropdown", role: "dialog", "aria-label": "Choose date range", children: [
|
|
1216
1216
|
m && h.length > 0 && /* @__PURE__ */ e("div", { className: "gloss-preset-daterangepicker__presets", children: h.map((ne) => /* @__PURE__ */ e("button", { type: "button", className: "gloss-preset-daterangepicker__preset", onClick: () => {
|
|
1217
|
-
|
|
1217
|
+
z || x(ne.range), i?.(ne.range), k(!1);
|
|
1218
1218
|
}, children: ne.label }, ne.label)) }),
|
|
1219
1219
|
/* @__PURE__ */ o(cs, { definition: X, children: [
|
|
1220
1220
|
ge(O, G, "left"),
|
|
@@ -1257,27 +1257,27 @@ const io = () => Math.random().toString(36).slice(2, 11), Dr = (a) => {
|
|
|
1257
1257
|
onError: v,
|
|
1258
1258
|
id: f,
|
|
1259
1259
|
name: w
|
|
1260
|
-
} = t, E = He(), S = f || E,
|
|
1260
|
+
} = t, E = He(), S = f || E, C = ce(null), [I, p] = H([]), [M, k] = H(!1), D = s !== void 0, x = D ? s : I, R = N((A) => {
|
|
1261
1261
|
D || p(A), l?.(A);
|
|
1262
|
-
}, [D, l]), T =
|
|
1262
|
+
}, [D, l]), T = N((A) => {
|
|
1263
1263
|
if (c && A.size > c) return `File size exceeds ${Dr(c)}`;
|
|
1264
1264
|
if (i) {
|
|
1265
1265
|
const G = i.split(",").map(($) => $.trim()), W = `.${A.name.split(".").pop()?.toLowerCase()}`;
|
|
1266
1266
|
if (!G.some(($) => $.startsWith(".") ? W === $.toLowerCase() : $.endsWith("/*") ? A.type.startsWith($.replace("/*", "/")) : A.type === $)) return "File type not accepted";
|
|
1267
1267
|
}
|
|
1268
1268
|
return null;
|
|
1269
|
-
}, [c, i]),
|
|
1270
|
-
const G = d ? d -
|
|
1269
|
+
}, [c, i]), z = N((A) => {
|
|
1270
|
+
const G = d ? d - x.length : 1 / 0, W = [];
|
|
1271
1271
|
Array.from(A).slice(0, G).forEach((V) => {
|
|
1272
1272
|
const $ = T(V), U = V.type.startsWith("image/") ? URL.createObjectURL(V) : void 0;
|
|
1273
1273
|
W.push({ file: V, id: io(), error: $ || void 0, preview: U }), $ && v?.($);
|
|
1274
|
-
}), A.length > G && G >= 0 && v?.(`Maximum ${d} files allowed`),
|
|
1275
|
-
}, [
|
|
1276
|
-
const G =
|
|
1277
|
-
G?.preview && URL.revokeObjectURL(G.preview),
|
|
1278
|
-
}, [
|
|
1279
|
-
A.preventDefault(), A.stopPropagation(),
|
|
1280
|
-
}, [h,
|
|
1274
|
+
}), A.length > G && G >= 0 && v?.(`Maximum ${d} files allowed`), R([...x, ...W]);
|
|
1275
|
+
}, [x, d, T, R, v]), P = N((A) => {
|
|
1276
|
+
const G = x.find((W) => W.id === A);
|
|
1277
|
+
G?.preview && URL.revokeObjectURL(G.preview), R(x.filter((W) => W.id !== A)), g?.(A);
|
|
1278
|
+
}, [x, R, g]), O = N((A) => {
|
|
1279
|
+
A.preventDefault(), A.stopPropagation(), k(!1), !h && A.dataTransfer.files.length > 0 && z(A.dataTransfer.files);
|
|
1280
|
+
}, [h, z]), Y = {
|
|
1281
1281
|
bg: B.BgMuted,
|
|
1282
1282
|
borderColor: r === "error" ? B.BorderError : B.BorderDefault,
|
|
1283
1283
|
borderStyle: "dashed",
|
|
@@ -1295,7 +1295,7 @@ const io = () => Math.random().toString(36).slice(2, 11), Dr = (a) => {
|
|
|
1295
1295
|
"input",
|
|
1296
1296
|
{
|
|
1297
1297
|
ref: (A) => {
|
|
1298
|
-
|
|
1298
|
+
C.current = A, typeof a == "function" ? a(A) : a && (a.current = A);
|
|
1299
1299
|
},
|
|
1300
1300
|
id: S,
|
|
1301
1301
|
name: w,
|
|
@@ -1303,7 +1303,7 @@ const io = () => Math.random().toString(36).slice(2, 11), Dr = (a) => {
|
|
|
1303
1303
|
accept: i,
|
|
1304
1304
|
multiple: u,
|
|
1305
1305
|
onChange: (A) => {
|
|
1306
|
-
A.target.files?.length && (
|
|
1306
|
+
A.target.files?.length && (z(A.target.files), A.target.value = "");
|
|
1307
1307
|
},
|
|
1308
1308
|
disabled: h,
|
|
1309
1309
|
className: "gloss-preset-fileupload__input"
|
|
@@ -1315,17 +1315,17 @@ const io = () => Math.random().toString(36).slice(2, 11), Dr = (a) => {
|
|
|
1315
1315
|
definition: Y,
|
|
1316
1316
|
dragging: M,
|
|
1317
1317
|
disabled: h,
|
|
1318
|
-
onClick: () => !h &&
|
|
1318
|
+
onClick: () => !h && C.current?.click(),
|
|
1319
1319
|
onDragOver: (A) => {
|
|
1320
|
-
A.preventDefault(), A.stopPropagation(),
|
|
1320
|
+
A.preventDefault(), A.stopPropagation(), k(!0);
|
|
1321
1321
|
},
|
|
1322
1322
|
onDragLeave: (A) => {
|
|
1323
|
-
A.preventDefault(), A.stopPropagation(),
|
|
1323
|
+
A.preventDefault(), A.stopPropagation(), k(!1);
|
|
1324
1324
|
},
|
|
1325
1325
|
onDrop: O,
|
|
1326
1326
|
role: "button",
|
|
1327
1327
|
tabIndex: h ? -1 : 0,
|
|
1328
|
-
onKeyDown: (A) => A.key === "Enter" && !h &&
|
|
1328
|
+
onKeyDown: (A) => A.key === "Enter" && !h && C.current?.click(),
|
|
1329
1329
|
children: [
|
|
1330
1330
|
/* @__PURE__ */ e(ye, { name: "upload-cloud", size: "lg" }),
|
|
1331
1331
|
/* @__PURE__ */ e("span", { className: "gloss-preset-fileupload__text", children: b }),
|
|
@@ -1336,7 +1336,7 @@ const io = () => Math.random().toString(36).slice(2, 11), Dr = (a) => {
|
|
|
1336
1336
|
]
|
|
1337
1337
|
}
|
|
1338
1338
|
),
|
|
1339
|
-
|
|
1339
|
+
x.length > 0 && /* @__PURE__ */ e(ms, { children: x.map((A) => /* @__PURE__ */ o(ps, { error: !!A.error, children: [
|
|
1340
1340
|
m && A.preview ? /* @__PURE__ */ e("img", { src: A.preview, alt: A.file.name, className: "gloss-preset-fileupload__preview" }) : /* @__PURE__ */ e(ye, { name: "file", size: "md" }),
|
|
1341
1341
|
/* @__PURE__ */ o("div", { className: "gloss-preset-fileupload__file-info", children: [
|
|
1342
1342
|
/* @__PURE__ */ e("span", { className: "gloss-preset-fileupload__file-name", children: A.file.name }),
|
|
@@ -1413,29 +1413,29 @@ const oo = [
|
|
|
1413
1413
|
helperText: m,
|
|
1414
1414
|
id: g,
|
|
1415
1415
|
name: b
|
|
1416
|
-
} = t, y = He(), _ = g || y, v = ce(null), [f, w] = H(!1), [E, S] = H(s),
|
|
1417
|
-
const Y = Ir(
|
|
1418
|
-
|
|
1419
|
-
}, [i,
|
|
1420
|
-
const P = ia(
|
|
1416
|
+
} = t, y = He(), _ = g || y, v = ce(null), [f, w] = H(!1), [E, S] = H(s), C = n !== void 0, I = C ? n : E, p = ia(I) || { r: 59, g: 130, b: 246 }, M = N((z, P, O) => {
|
|
1417
|
+
const Y = Ir(z, P, O, i);
|
|
1418
|
+
C || S(Y), l?.(Y);
|
|
1419
|
+
}, [i, C, l]), k = N((z) => {
|
|
1420
|
+
const P = ia(z);
|
|
1421
1421
|
P && M(P.r, P.g, P.b);
|
|
1422
|
-
}, [M]), D =
|
|
1423
|
-
const P = ia(
|
|
1422
|
+
}, [M]), D = N((z) => {
|
|
1423
|
+
const P = ia(z.target.value);
|
|
1424
1424
|
P && M(P.r, P.g, P.b);
|
|
1425
|
-
}, [M]),
|
|
1426
|
-
const P =
|
|
1427
|
-
|
|
1425
|
+
}, [M]), x = N((z) => {
|
|
1426
|
+
const P = z.target.value;
|
|
1427
|
+
C || S(P);
|
|
1428
1428
|
const O = ia(P);
|
|
1429
1429
|
O && l?.(Ir(O.r, O.g, O.b, i));
|
|
1430
|
-
}, [i,
|
|
1430
|
+
}, [i, C, l]);
|
|
1431
1431
|
le(() => {
|
|
1432
1432
|
if (!f) return;
|
|
1433
|
-
const
|
|
1433
|
+
const z = (P) => {
|
|
1434
1434
|
v.current && !v.current.contains(P.target) && w(!1);
|
|
1435
1435
|
};
|
|
1436
|
-
return document.addEventListener("mousedown",
|
|
1436
|
+
return document.addEventListener("mousedown", z), () => document.removeEventListener("mousedown", z);
|
|
1437
1437
|
}, [f]);
|
|
1438
|
-
const
|
|
1438
|
+
const R = {
|
|
1439
1439
|
radius: Se.Md,
|
|
1440
1440
|
elevation: Ze.Card,
|
|
1441
1441
|
...uo[r]
|
|
@@ -1447,15 +1447,15 @@ const oo = [
|
|
|
1447
1447
|
return /* @__PURE__ */ o("div", { className: T, ref: v, children: [
|
|
1448
1448
|
h && /* @__PURE__ */ e("label", { className: "gloss-preset-colorpicker__label", htmlFor: _, children: h }),
|
|
1449
1449
|
/* @__PURE__ */ e("input", { ref: a, type: "hidden", id: _, name: b, value: I }),
|
|
1450
|
-
/* @__PURE__ */ o("button", { type: "button", className: "gloss-preset-colorpicker__trigger", onClick: () => !u && w((
|
|
1450
|
+
/* @__PURE__ */ o("button", { type: "button", className: "gloss-preset-colorpicker__trigger", onClick: () => !u && w((z) => !z), disabled: u, "aria-haspopup": "dialog", "aria-expanded": f, children: [
|
|
1451
1451
|
/* @__PURE__ */ e(gs, { style: { backgroundColor: I } }),
|
|
1452
1452
|
/* @__PURE__ */ e("span", { className: "gloss-preset-colorpicker__value", children: I }),
|
|
1453
1453
|
/* @__PURE__ */ e(ye, { name: "chevron-down", size: "sm" })
|
|
1454
1454
|
] }),
|
|
1455
|
-
f && /* @__PURE__ */ e("div", { className: "gloss-preset-colorpicker__dropdown", children: /* @__PURE__ */ o(fs, { definition:
|
|
1455
|
+
f && /* @__PURE__ */ e("div", { className: "gloss-preset-colorpicker__dropdown", children: /* @__PURE__ */ o(fs, { definition: R, disabled: u, children: [
|
|
1456
1456
|
/* @__PURE__ */ e(hs, { children: /* @__PURE__ */ e("input", { type: "color", value: on(p.r, p.g, p.b), onChange: D, className: "gloss-preset-colorpicker__native", disabled: u }) }),
|
|
1457
|
-
c.length > 0 && /* @__PURE__ */ e("div", { className: "gloss-preset-colorpicker__swatches", children: c.map((
|
|
1458
|
-
/* @__PURE__ */ e("div", { className: "gloss-preset-colorpicker__input-row", children: /* @__PURE__ */ e("input", { type: "text", value: I, onChange:
|
|
1457
|
+
c.length > 0 && /* @__PURE__ */ e("div", { className: "gloss-preset-colorpicker__swatches", children: c.map((z) => /* @__PURE__ */ e("button", { type: "button", className: `gloss-preset-colorpicker__swatch-btn ${I.toLowerCase() === z.toLowerCase() ? "gloss-preset-colorpicker__swatch-btn--selected" : ""}`, style: { backgroundColor: z }, onClick: () => k(z), "aria-label": `Select ${z}` }, z)) }),
|
|
1458
|
+
/* @__PURE__ */ e("div", { className: "gloss-preset-colorpicker__input-row", children: /* @__PURE__ */ e("input", { type: "text", value: I, onChange: x, className: "gloss-preset-colorpicker__text-input", disabled: u, placeholder: "#000000" }) })
|
|
1459
1459
|
] }) }),
|
|
1460
1460
|
m && /* @__PURE__ */ e("div", { className: "gloss-preset-colorpicker__helper", children: m })
|
|
1461
1461
|
] });
|
|
@@ -1661,7 +1661,7 @@ const No = {
|
|
|
1661
1661
|
"gloss-preset-input",
|
|
1662
1662
|
`gloss-preset-input--${v}`,
|
|
1663
1663
|
`gloss-preset-input--${n}`
|
|
1664
|
-
].filter(Boolean).join(" "), E = d && !!y.value, S = typeof y.value == "string" ? y.value.length : 0,
|
|
1664
|
+
].filter(Boolean).join(" "), E = d && !!y.value, S = typeof y.value == "string" ? y.value.length : 0, C = y.maxLength, I = m && C != null, p = /* @__PURE__ */ e(
|
|
1665
1665
|
vs,
|
|
1666
1666
|
{
|
|
1667
1667
|
ref: a,
|
|
@@ -1674,7 +1674,7 @@ const No = {
|
|
|
1674
1674
|
}
|
|
1675
1675
|
);
|
|
1676
1676
|
if (!E && !g && !b && !I) return p;
|
|
1677
|
-
const M =
|
|
1677
|
+
const M = C ? S / C : 0, k = M >= 1 ? "over" : M >= 0.8 ? "warn" : "ok";
|
|
1678
1678
|
return /* @__PURE__ */ o("div", { className: "gloss-preset-input__field-wrapper", children: [
|
|
1679
1679
|
g && /* @__PURE__ */ e("span", { className: "gloss-preset-input__icon gloss-preset-input__icon--left", children: g }),
|
|
1680
1680
|
p,
|
|
@@ -1693,10 +1693,10 @@ const No = {
|
|
|
1693
1693
|
}
|
|
1694
1694
|
),
|
|
1695
1695
|
b && !E && /* @__PURE__ */ e("span", { className: "gloss-preset-input__icon gloss-preset-input__icon--right", children: b }),
|
|
1696
|
-
I && /* @__PURE__ */ o("span", { className: `gloss-preset-input__counter gloss-preset-input__counter--${
|
|
1696
|
+
I && /* @__PURE__ */ o("span", { className: `gloss-preset-input__counter gloss-preset-input__counter--${k}`, children: [
|
|
1697
1697
|
S,
|
|
1698
1698
|
"/",
|
|
1699
|
-
|
|
1699
|
+
C
|
|
1700
1700
|
] })
|
|
1701
1701
|
] });
|
|
1702
1702
|
};
|
|
@@ -1748,12 +1748,12 @@ const ko = {
|
|
|
1748
1748
|
"gloss-preset-textarea",
|
|
1749
1749
|
`gloss-preset-textarea--${v}`,
|
|
1750
1750
|
`gloss-preset-textarea--${n}`
|
|
1751
|
-
].filter(Boolean).join(" "), E = ce(null), S =
|
|
1751
|
+
].filter(Boolean).join(" "), E = ce(null), S = N((p) => {
|
|
1752
1752
|
if (!p || !h) return;
|
|
1753
1753
|
p.style.height = "auto";
|
|
1754
|
-
const M = getComputedStyle(p),
|
|
1754
|
+
const M = getComputedStyle(p), k = parseFloat(M.lineHeight) || parseFloat(M.fontSize) * 1.2, D = parseFloat(M.paddingTop) || 0, x = parseFloat(M.paddingBottom) || 0, R = parseFloat(M.borderTopWidth) || 0, T = parseFloat(M.borderBottomWidth) || 0, z = D + x + R + T, P = m ? k * m + z : 0, O = g ? k * g + z : 1 / 0, Y = Math.min(Math.max(p.scrollHeight, P), O);
|
|
1755
1755
|
p.style.height = `${Y}px`;
|
|
1756
|
-
}, [h, m, g]),
|
|
1756
|
+
}, [h, m, g]), C = N((p) => {
|
|
1757
1757
|
E.current = p, typeof a == "function" ? a(p) : a && (a.current = p), S(p);
|
|
1758
1758
|
}, [a, S]), I = _.onChange;
|
|
1759
1759
|
return h && (_.onChange = (p) => {
|
|
@@ -1761,7 +1761,7 @@ const ko = {
|
|
|
1761
1761
|
}), /* @__PURE__ */ e(
|
|
1762
1762
|
_s,
|
|
1763
1763
|
{
|
|
1764
|
-
ref:
|
|
1764
|
+
ref: C,
|
|
1765
1765
|
definition: f,
|
|
1766
1766
|
className: w,
|
|
1767
1767
|
label: s,
|
|
@@ -1804,54 +1804,54 @@ const Io = {
|
|
|
1804
1804
|
placeholder: _,
|
|
1805
1805
|
showStepper: v = !0,
|
|
1806
1806
|
formatValue: f
|
|
1807
|
-
} = t, [w, E] = H(l), S = s !== void 0,
|
|
1807
|
+
} = t, [w, E] = H(l), S = s !== void 0, C = S ? s : w, I = N((P) => {
|
|
1808
1808
|
let O = P;
|
|
1809
1809
|
return d !== void 0 && (O = Math.max(d, O)), c !== void 0 && (O = Math.min(c, O)), !y && O < 0 && (O = 0), h !== void 0 && (O = parseFloat(O.toFixed(h))), O;
|
|
1810
|
-
}, [d, c, y, h]), p =
|
|
1810
|
+
}, [d, c, y, h]), p = N((P) => {
|
|
1811
1811
|
const O = I(P);
|
|
1812
1812
|
S || E(O), i?.(O);
|
|
1813
|
-
}, [I, S, i]), M =
|
|
1813
|
+
}, [I, S, i]), M = N((P) => {
|
|
1814
1814
|
const O = P.target.value;
|
|
1815
1815
|
if (O === "" || O === "-") return;
|
|
1816
1816
|
const Y = parseFloat(O);
|
|
1817
1817
|
isNaN(Y) || p(Y);
|
|
1818
|
-
}, [p]),
|
|
1819
|
-
P.key === "ArrowUp" && (P.preventDefault(), p(
|
|
1820
|
-
}, [
|
|
1818
|
+
}, [p]), k = N((P) => {
|
|
1819
|
+
P.key === "ArrowUp" && (P.preventDefault(), p(C + u)), P.key === "ArrowDown" && (P.preventDefault(), p(C - u));
|
|
1820
|
+
}, [C, u, p]), D = d !== void 0 && C <= d, x = c !== void 0 && C >= c, R = f ? f(C) : String(C), T = {
|
|
1821
1821
|
bg: B.BgSurface,
|
|
1822
1822
|
color: B.TextPrimary,
|
|
1823
1823
|
borderColor: To[r],
|
|
1824
1824
|
radius: Se.Md,
|
|
1825
1825
|
buttonBg: B.BgMuted,
|
|
1826
1826
|
...Io[n]
|
|
1827
|
-
},
|
|
1827
|
+
}, z = [
|
|
1828
1828
|
"gloss-preset-numberinput",
|
|
1829
1829
|
`gloss-preset-numberinput--${r}`,
|
|
1830
1830
|
`gloss-preset-numberinput--${n}`,
|
|
1831
1831
|
b && "gloss-preset-numberinput--disabled"
|
|
1832
1832
|
].filter(Boolean).join(" ");
|
|
1833
|
-
return /* @__PURE__ */ o("div", { className:
|
|
1833
|
+
return /* @__PURE__ */ o("div", { className: z, children: [
|
|
1834
1834
|
m && /* @__PURE__ */ e("label", { className: "gloss-preset-numberinput__label", children: m }),
|
|
1835
1835
|
/* @__PURE__ */ o(xs, { definition: T, disabled: b, children: [
|
|
1836
|
-
v && /* @__PURE__ */ e("button", { type: "button", onClick: () => p(
|
|
1836
|
+
v && /* @__PURE__ */ e("button", { type: "button", onClick: () => p(C - u), disabled: b || D, "aria-label": "Decrease value", tabIndex: -1, children: /* @__PURE__ */ e(ye, { name: "minus", size: "sm" }) }),
|
|
1837
1837
|
/* @__PURE__ */ e(
|
|
1838
1838
|
"input",
|
|
1839
1839
|
{
|
|
1840
1840
|
ref: a,
|
|
1841
1841
|
type: "text",
|
|
1842
1842
|
inputMode: "numeric",
|
|
1843
|
-
value:
|
|
1843
|
+
value: R,
|
|
1844
1844
|
onChange: M,
|
|
1845
|
-
onBlur: () => p(
|
|
1846
|
-
onKeyDown:
|
|
1845
|
+
onBlur: () => p(C),
|
|
1846
|
+
onKeyDown: k,
|
|
1847
1847
|
disabled: b,
|
|
1848
1848
|
placeholder: _,
|
|
1849
1849
|
"aria-valuemin": d,
|
|
1850
1850
|
"aria-valuemax": c,
|
|
1851
|
-
"aria-valuenow":
|
|
1851
|
+
"aria-valuenow": C
|
|
1852
1852
|
}
|
|
1853
1853
|
),
|
|
1854
|
-
v && /* @__PURE__ */ e("button", { type: "button", onClick: () => p(
|
|
1854
|
+
v && /* @__PURE__ */ e("button", { type: "button", onClick: () => p(C + u), disabled: b || x, "aria-label": "Increase value", tabIndex: -1, children: /* @__PURE__ */ e(ye, { name: "plus", size: "sm" }) })
|
|
1855
1855
|
] }),
|
|
1856
1856
|
g && /* @__PURE__ */ e("div", { className: `gloss-preset-numberinput__helper ${r === "error" ? "gloss-preset-numberinput__helper--error" : ""}`, children: g })
|
|
1857
1857
|
] });
|
|
@@ -1920,15 +1920,15 @@ const Bo = {
|
|
|
1920
1920
|
required: y,
|
|
1921
1921
|
id: _,
|
|
1922
1922
|
name: v
|
|
1923
|
-
} = t, f = ce(null), w = ce(null), E = typeof s == "string" ? Bo[s] : s, S =
|
|
1923
|
+
} = t, f = ce(null), w = ce(null), E = typeof s == "string" ? Bo[s] : s, S = N((p) => {
|
|
1924
1924
|
f.current = p, typeof a == "function" ? a(p) : a && (a.current = p);
|
|
1925
1925
|
}, [a]);
|
|
1926
1926
|
le(() => {
|
|
1927
1927
|
if (f.current && E) {
|
|
1928
1928
|
let p;
|
|
1929
1929
|
try {
|
|
1930
|
-
const
|
|
1931
|
-
p =
|
|
1930
|
+
const k = require("imask");
|
|
1931
|
+
p = k.default || k;
|
|
1932
1932
|
} catch {
|
|
1933
1933
|
return;
|
|
1934
1934
|
}
|
|
@@ -1946,7 +1946,7 @@ const Bo = {
|
|
|
1946
1946
|
}, [E, i, d]), le(() => {
|
|
1947
1947
|
w.current && l !== void 0 && w.current.unmaskedValue !== l && (w.current.unmaskedValue = l);
|
|
1948
1948
|
}, [l]);
|
|
1949
|
-
const
|
|
1949
|
+
const C = {
|
|
1950
1950
|
bg: B.BgSurface,
|
|
1951
1951
|
color: B.TextPrimary,
|
|
1952
1952
|
borderColor: Ro[r],
|
|
@@ -1962,7 +1962,7 @@ const Bo = {
|
|
|
1962
1962
|
Ns,
|
|
1963
1963
|
{
|
|
1964
1964
|
ref: S,
|
|
1965
|
-
definition:
|
|
1965
|
+
definition: C,
|
|
1966
1966
|
label: u,
|
|
1967
1967
|
helperText: h,
|
|
1968
1968
|
required: y,
|
|
@@ -2636,16 +2636,16 @@ function gc({
|
|
|
2636
2636
|
...m
|
|
2637
2637
|
}) {
|
|
2638
2638
|
delete m.className, delete m.style;
|
|
2639
|
-
const [g, b] = H(a ? "entered" : "exited"), [y, _] = H(a), v = ce(null), f = ce(null), w = typeof t == "string" ? Ta[t] : t, E = r ?? (typeof t == "string" ? Ta[t]?.duration : Qe.normal) ?? Qe.normal, S = n ?? (typeof t == "string" ? Ta[t]?.easing : et.easeOut) ?? et.easeOut,
|
|
2639
|
+
const [g, b] = H(a ? "entered" : "exited"), [y, _] = H(a), v = ce(null), f = ce(null), w = typeof t == "string" ? Ta[t] : t, E = r ?? (typeof t == "string" ? Ta[t]?.duration : Qe.normal) ?? Qe.normal, S = n ?? (typeof t == "string" ? Ta[t]?.easing : et.easeOut) ?? et.easeOut, C = N(() => {
|
|
2640
2640
|
v.current && (clearTimeout(v.current), v.current = null), f.current && (cancelAnimationFrame(f.current), f.current = null);
|
|
2641
2641
|
}, []);
|
|
2642
|
-
if (le(() => (
|
|
2642
|
+
if (le(() => (C(), a ? (_(!0), i?.(), f.current = requestAnimationFrame(() => {
|
|
2643
2643
|
b("entering"), v.current = setTimeout(() => {
|
|
2644
2644
|
b("entered"), d?.();
|
|
2645
2645
|
}, E + s);
|
|
2646
2646
|
})) : (c?.(), b("exiting"), v.current = setTimeout(() => {
|
|
2647
2647
|
b("exited"), l && _(!1), u?.();
|
|
2648
|
-
}, E + s)),
|
|
2648
|
+
}, E + s)), C), [a, E, s, l, i, d, c, u, C]), !y) return null;
|
|
2649
2649
|
let I = {};
|
|
2650
2650
|
switch (g) {
|
|
2651
2651
|
case "entering":
|
|
@@ -2691,49 +2691,49 @@ function bc(a) {
|
|
|
2691
2691
|
...c
|
|
2692
2692
|
} = a;
|
|
2693
2693
|
({ ...c });
|
|
2694
|
-
const [u, h] = H(t), [m, g] = H({}), [b, y] = H({}), [_, v] = H(!1), f =
|
|
2695
|
-
async (
|
|
2694
|
+
const [u, h] = H(t), [m, g] = H({}), [b, y] = H({}), [_, v] = H(!1), f = N(
|
|
2695
|
+
async (k) => {
|
|
2696
2696
|
if (!r) return {};
|
|
2697
|
-
const D = r(
|
|
2697
|
+
const D = r(k);
|
|
2698
2698
|
return D instanceof Promise ? await D : D;
|
|
2699
2699
|
},
|
|
2700
2700
|
[r]
|
|
2701
|
-
), w =
|
|
2702
|
-
async (
|
|
2703
|
-
const
|
|
2704
|
-
if (h(
|
|
2705
|
-
const
|
|
2706
|
-
g(
|
|
2701
|
+
), w = N(
|
|
2702
|
+
async (k, D) => {
|
|
2703
|
+
const x = { ...u, [k]: D };
|
|
2704
|
+
if (h(x), s) {
|
|
2705
|
+
const R = await f(x);
|
|
2706
|
+
g(R);
|
|
2707
2707
|
}
|
|
2708
2708
|
},
|
|
2709
2709
|
[u, s, f]
|
|
2710
|
-
), E =
|
|
2711
|
-
g((
|
|
2712
|
-
}, []), S =
|
|
2713
|
-
async (
|
|
2714
|
-
if (y((
|
|
2715
|
-
const
|
|
2716
|
-
g(
|
|
2710
|
+
), E = N((k, D) => {
|
|
2711
|
+
g((x) => ({ ...x, [k]: D }));
|
|
2712
|
+
}, []), S = N(
|
|
2713
|
+
async (k, D = !0) => {
|
|
2714
|
+
if (y((x) => ({ ...x, [k]: D })), l && D) {
|
|
2715
|
+
const x = await f(u);
|
|
2716
|
+
g(x);
|
|
2717
2717
|
}
|
|
2718
2718
|
},
|
|
2719
2719
|
[l, f, u]
|
|
2720
|
-
),
|
|
2721
|
-
(
|
|
2722
|
-
value: u[
|
|
2723
|
-
onChange: (D) => w(
|
|
2724
|
-
onBlur: () => S(
|
|
2725
|
-
name:
|
|
2726
|
-
error: b[
|
|
2727
|
-
touched: b[
|
|
2720
|
+
), C = N(
|
|
2721
|
+
(k) => ({
|
|
2722
|
+
value: u[k],
|
|
2723
|
+
onChange: (D) => w(k, D),
|
|
2724
|
+
onBlur: () => S(k, !0),
|
|
2725
|
+
name: k,
|
|
2726
|
+
error: b[k] ? m[k] : void 0,
|
|
2727
|
+
touched: b[k] ?? !1
|
|
2728
2728
|
}),
|
|
2729
2729
|
[u, m, b, w, S]
|
|
2730
|
-
), I = Q(() => Object.keys(m).length === 0, [m]), p =
|
|
2731
|
-
async (
|
|
2732
|
-
i &&
|
|
2733
|
-
const D = Object.keys(u).reduce((
|
|
2730
|
+
), I = Q(() => Object.keys(m).length === 0, [m]), p = N(
|
|
2731
|
+
async (k) => {
|
|
2732
|
+
i && k.preventDefault();
|
|
2733
|
+
const D = Object.keys(u).reduce((R, T) => ({ ...R, [T]: !0 }), {});
|
|
2734
2734
|
y(D);
|
|
2735
|
-
const
|
|
2736
|
-
if (g(
|
|
2735
|
+
const x = await f(u);
|
|
2736
|
+
if (g(x), !(Object.keys(x).length > 0)) {
|
|
2737
2737
|
v(!0);
|
|
2738
2738
|
try {
|
|
2739
2739
|
await n(u);
|
|
@@ -2744,8 +2744,8 @@ function bc(a) {
|
|
|
2744
2744
|
},
|
|
2745
2745
|
[i, u, f, n]
|
|
2746
2746
|
), M = Q(
|
|
2747
|
-
() => ({ values: u, errors: m, touched: b, isSubmitting: _, isValid: I, setFieldValue: w, setFieldError: E, setFieldTouched: S, getFieldProps:
|
|
2748
|
-
[u, m, b, _, I, w, E, S,
|
|
2747
|
+
() => ({ values: u, errors: m, touched: b, isSubmitting: _, isValid: I, setFieldValue: w, setFieldError: E, setFieldTouched: S, getFieldProps: C }),
|
|
2748
|
+
[u, m, b, _, I, w, E, S, C]
|
|
2749
2749
|
);
|
|
2750
2750
|
return /* @__PURE__ */ e(pn.Provider, { value: M, children: /* @__PURE__ */ e("form", { onSubmit: p, className: "gloss-preset-form", noValidate: !0, children: typeof d == "function" ? d(M) : d }) });
|
|
2751
2751
|
}
|
|
@@ -2782,7 +2782,7 @@ function yc({
|
|
|
2782
2782
|
"aria-describedby": [r ? m : null, v ? g : null].filter(Boolean).join(" ") || void 0,
|
|
2783
2783
|
"aria-invalid": v ? !0 : void 0,
|
|
2784
2784
|
"aria-required": n ? !0 : void 0
|
|
2785
|
-
}), S = ["gloss-form-field__label", l && "gloss-form-field__label--hidden"].filter(Boolean).join(" "),
|
|
2785
|
+
}), S = ["gloss-form-field__label", l && "gloss-form-field__label--hidden"].filter(Boolean).join(" "), C = [
|
|
2786
2786
|
"gloss-form-field",
|
|
2787
2787
|
"gloss-preset-form-field",
|
|
2788
2788
|
`gloss-form-field--label-${s}`,
|
|
@@ -2791,7 +2791,7 @@ function yc({
|
|
|
2791
2791
|
t,
|
|
2792
2792
|
n && /* @__PURE__ */ e("span", { className: "gloss-form-field__required", "aria-hidden": "true", children: "*" })
|
|
2793
2793
|
] });
|
|
2794
|
-
return /* @__PURE__ */ o("div", { className:
|
|
2794
|
+
return /* @__PURE__ */ o("div", { className: C, children: [
|
|
2795
2795
|
s !== "right" && I,
|
|
2796
2796
|
/* @__PURE__ */ e("div", { className: "gloss-form-field__control", children: E }),
|
|
2797
2797
|
s === "right" && I,
|
|
@@ -2810,7 +2810,7 @@ const gn = ve.memo(({
|
|
|
2810
2810
|
variant: s = "filled",
|
|
2811
2811
|
size: l = "small"
|
|
2812
2812
|
}) => {
|
|
2813
|
-
const i =
|
|
2813
|
+
const i = N(() => {
|
|
2814
2814
|
r(a);
|
|
2815
2815
|
}, [a, r]);
|
|
2816
2816
|
return /* @__PURE__ */ e(
|
|
@@ -2855,8 +2855,8 @@ const da = ve.memo(({
|
|
|
2855
2855
|
const d = ce(null), c = ce({}), [u, h] = H(null), [m, g] = H({ left: 0, width: 0 }), [b, y] = H({ left: 0, width: 0 }), _ = (f) => {
|
|
2856
2856
|
const w = c.current[f], E = d.current;
|
|
2857
2857
|
if (!w || !E) return { left: 0, width: 0 };
|
|
2858
|
-
const S = w.getBoundingClientRect(),
|
|
2859
|
-
return { left: S.left -
|
|
2858
|
+
const S = w.getBoundingClientRect(), C = E.getBoundingClientRect();
|
|
2859
|
+
return { left: S.left - C.left, width: S.width };
|
|
2860
2860
|
};
|
|
2861
2861
|
le(() => {
|
|
2862
2862
|
const f = requestAnimationFrame(() => g(_(t)));
|
|
@@ -3413,21 +3413,21 @@ const fn = (a) => {
|
|
|
3413
3413
|
s,
|
|
3414
3414
|
h,
|
|
3415
3415
|
l
|
|
3416
|
-
),
|
|
3417
|
-
() => Ic(
|
|
3418
|
-
[
|
|
3416
|
+
), C = el() === !0, I = Q(() => kc(C), [C]), p = Q(() => wc(C), [C]), M = Q(() => Dc(C), [C]), k = Q(
|
|
3417
|
+
() => Ic(C),
|
|
3418
|
+
[C]
|
|
3419
3419
|
), D = Q(
|
|
3420
3420
|
() => Er(t, m),
|
|
3421
3421
|
[t, m]
|
|
3422
|
-
),
|
|
3422
|
+
), x = Q(
|
|
3423
3423
|
() => Er(r, m),
|
|
3424
3424
|
[r, m]
|
|
3425
|
-
),
|
|
3425
|
+
), R = Math.max(0, 5 - D.length - 1), T = Q(() => x.filter((ae) => ae.isPromotable).sort((ae, xe) => ae.order - xe.order).slice(0, R), [x, R]), z = Q(() => {
|
|
3426
3426
|
const ae = new Set(T.map((xe) => xe.id));
|
|
3427
|
-
return
|
|
3428
|
-
}, [
|
|
3429
|
-
() => Ec(
|
|
3430
|
-
[
|
|
3427
|
+
return x.filter((xe) => !ae.has(xe.id)).sort((xe, We) => xe.order - We.order);
|
|
3428
|
+
}, [x, T]), P = Q(
|
|
3429
|
+
() => Ec(x, R),
|
|
3430
|
+
[x, R]
|
|
3431
3431
|
), O = y && s, [Y, j] = H(!1);
|
|
3432
3432
|
le(() => {
|
|
3433
3433
|
s || j(!1);
|
|
@@ -3494,7 +3494,7 @@ const fn = (a) => {
|
|
|
3494
3494
|
le(() => () => {
|
|
3495
3495
|
se.current !== null && (clearTimeout(se.current), se.current = null);
|
|
3496
3496
|
}, []);
|
|
3497
|
-
const pe =
|
|
3497
|
+
const pe = N(
|
|
3498
3498
|
(ae) => {
|
|
3499
3499
|
if (!O) return;
|
|
3500
3500
|
const xe = ae.nativeEvent?.relatedTarget, We = ae.relatedTarget, Fe = xe ?? We;
|
|
@@ -3503,9 +3503,9 @@ const fn = (a) => {
|
|
|
3503
3503
|
}, Ue.GRACE_CLOSE_MS));
|
|
3504
3504
|
},
|
|
3505
3505
|
[O, l]
|
|
3506
|
-
), Ce =
|
|
3506
|
+
), Ce = N(() => {
|
|
3507
3507
|
se.current !== null && (clearTimeout(se.current), se.current = null);
|
|
3508
|
-
}, []), we =
|
|
3508
|
+
}, []), we = N(() => {
|
|
3509
3509
|
const ae = !s;
|
|
3510
3510
|
j(!!ae), l(ae);
|
|
3511
3511
|
}, [s, l]), [Ne, Xe] = H(
|
|
@@ -3518,7 +3518,7 @@ const fn = (a) => {
|
|
|
3518
3518
|
for (const xe of ae) clearTimeout(xe);
|
|
3519
3519
|
ke.current = {};
|
|
3520
3520
|
}, []);
|
|
3521
|
-
const ue =
|
|
3521
|
+
const ue = N((ae) => {
|
|
3522
3522
|
const xe = ae.id;
|
|
3523
3523
|
ke.current[xe] || (ke.current[xe] = []), Xe((Fe) => ({ ...Fe, [xe]: "pressed" }));
|
|
3524
3524
|
const We = setTimeout(() => {
|
|
@@ -3532,7 +3532,7 @@ const fn = (a) => {
|
|
|
3532
3532
|
ke.current[xe]?.push(Fe);
|
|
3533
3533
|
}, Ue.FEEDBACK_PRESS_MS);
|
|
3534
3534
|
ke.current[xe]?.push(We);
|
|
3535
|
-
}, []), _e =
|
|
3535
|
+
}, []), _e = N(
|
|
3536
3536
|
(ae) => {
|
|
3537
3537
|
if (!ae.showFeedback) {
|
|
3538
3538
|
ae.onClick();
|
|
@@ -3574,14 +3574,14 @@ const fn = (a) => {
|
|
|
3574
3574
|
className: `gloss-action-strip__pill${O ? " gloss-action-strip__pill--expanded" : ""}${ee === "up" ? " gloss-action-strip__pill--flip-up" : ""}`,
|
|
3575
3575
|
"data-action-strip-pill": !0,
|
|
3576
3576
|
"data-primary-count": D.length,
|
|
3577
|
-
"data-overflow-count":
|
|
3577
|
+
"data-overflow-count": x.length,
|
|
3578
3578
|
"data-variant": ge,
|
|
3579
3579
|
variants: I,
|
|
3580
3580
|
animate: ge,
|
|
3581
3581
|
initial: "collapsed",
|
|
3582
3582
|
transition: {
|
|
3583
3583
|
layout: {
|
|
3584
|
-
duration: (
|
|
3584
|
+
duration: (C ? Ue.REDUCED_MOTION_MS : Ue.STRIP_EXPAND_MS) / 1e3,
|
|
3585
3585
|
ease: "easeOut"
|
|
3586
3586
|
}
|
|
3587
3587
|
},
|
|
@@ -3647,7 +3647,7 @@ const fn = (a) => {
|
|
|
3647
3647
|
"data-action-strip-promoted": !0,
|
|
3648
3648
|
"data-count": T.length,
|
|
3649
3649
|
style: { display: "inline-flex", alignItems: "center" },
|
|
3650
|
-
variants:
|
|
3650
|
+
variants: k,
|
|
3651
3651
|
animate: O ? "expanded" : "collapsed",
|
|
3652
3652
|
initial: "collapsed",
|
|
3653
3653
|
children: /* @__PURE__ */ e(ma, { mode: "popLayout", initial: !1, children: O ? T.map((ae) => /* @__PURE__ */ e(
|
|
@@ -3709,7 +3709,7 @@ const fn = (a) => {
|
|
|
3709
3709
|
className: `gloss-action-strip__menu gloss-action-strip__menu--flip-${ee}`,
|
|
3710
3710
|
"data-action-strip-menu": !0,
|
|
3711
3711
|
"data-flip": ee,
|
|
3712
|
-
"data-overflow-count":
|
|
3712
|
+
"data-overflow-count": z.length,
|
|
3713
3713
|
role: "menu",
|
|
3714
3714
|
variants: p,
|
|
3715
3715
|
custom: ee,
|
|
@@ -3719,7 +3719,7 @@ const fn = (a) => {
|
|
|
3719
3719
|
style: {
|
|
3720
3720
|
transformOrigin: Tc(ee)
|
|
3721
3721
|
},
|
|
3722
|
-
children:
|
|
3722
|
+
children: z.map((ae) => /* @__PURE__ */ o(
|
|
3723
3723
|
"button",
|
|
3724
3724
|
{
|
|
3725
3725
|
type: "button",
|
|
@@ -4000,16 +4000,16 @@ const st = function({
|
|
|
4000
4000
|
onReplace: w,
|
|
4001
4001
|
onNavigate: E,
|
|
4002
4002
|
onRetry: S,
|
|
4003
|
-
onRefresh:
|
|
4003
|
+
onRefresh: C,
|
|
4004
4004
|
enableQuickSettings: I,
|
|
4005
4005
|
onUpdateTimeframe: p,
|
|
4006
4006
|
instanceTimeframe: M,
|
|
4007
|
-
cardTitle:
|
|
4007
|
+
cardTitle: k,
|
|
4008
4008
|
quickConfigSlot: D,
|
|
4009
|
-
isStackedGroup:
|
|
4010
|
-
onUpdateStackedTimeframes:
|
|
4009
|
+
isStackedGroup: x,
|
|
4010
|
+
onUpdateStackedTimeframes: R,
|
|
4011
4011
|
instanceStackedTimeframes: T,
|
|
4012
|
-
isGraphActive:
|
|
4012
|
+
isGraphActive: z,
|
|
4013
4013
|
isTableActive: P,
|
|
4014
4014
|
isGraphCard: O,
|
|
4015
4015
|
canExpand: Y,
|
|
@@ -4024,25 +4024,25 @@ const st = function({
|
|
|
4024
4024
|
onFlipChange: K,
|
|
4025
4025
|
clickShadowSlot: X
|
|
4026
4026
|
}) {
|
|
4027
|
-
const [ee, ge] = H(!1), [ne, fe] = H(!1), [oe, se] = H(!1), pe = q ?? oe, Ce = ce(!1), we = ce(null), Ne = W !== void 0 ? W : ee, Xe = G ?? we, ke = ce(null), ue = ce(null), _e = t ?? r, Ge =
|
|
4027
|
+
const [ee, ge] = H(!1), [ne, fe] = H(!1), [oe, se] = H(!1), pe = q ?? oe, Ce = ce(!1), we = ce(null), Ne = W !== void 0 ? W : ee, Xe = G ?? we, ke = ce(null), ue = ce(null), _e = t ?? r, Ge = N(() => {
|
|
4028
4028
|
ke.current = null, ue.current = null, q !== void 0 ? K?.(!0) : se(!0);
|
|
4029
|
-
}, [q, K]), Ve =
|
|
4030
|
-
if (
|
|
4029
|
+
}, [q, K]), Ve = N(() => {
|
|
4030
|
+
if (x) {
|
|
4031
4031
|
const Me = ue.current;
|
|
4032
4032
|
if (Me !== null && Me.length < 2)
|
|
4033
4033
|
return;
|
|
4034
|
-
q !== void 0 ? K?.(!1) : se(!1), Me && Me.length >= 2 &&
|
|
4034
|
+
q !== void 0 ? K?.(!1) : se(!1), Me && Me.length >= 2 && R && R(Me);
|
|
4035
4035
|
} else
|
|
4036
4036
|
q !== void 0 ? K?.(!1) : se(!1), ke.current && p && p(ke.current);
|
|
4037
|
-
}, [p,
|
|
4037
|
+
}, [p, R, x, q, K]), ae = N((Me) => {
|
|
4038
4038
|
ke.current = Me;
|
|
4039
4039
|
}, []);
|
|
4040
4040
|
le(() => {
|
|
4041
4041
|
d && W === void 0 && ge(!1);
|
|
4042
4042
|
}, [d, W]);
|
|
4043
|
-
const xe =
|
|
4043
|
+
const xe = N(() => {
|
|
4044
4044
|
W === void 0 && (Ce.current = !1, ge(!0));
|
|
4045
|
-
}, [W]), We =
|
|
4045
|
+
}, [W]), We = N(() => {
|
|
4046
4046
|
if (W === void 0) {
|
|
4047
4047
|
if (ne) {
|
|
4048
4048
|
Ce.current = !0;
|
|
@@ -4163,10 +4163,10 @@ const st = function({
|
|
|
4163
4163
|
children: D ?? /* @__PURE__ */ e(
|
|
4164
4164
|
hn,
|
|
4165
4165
|
{
|
|
4166
|
-
mode:
|
|
4166
|
+
mode: x ? "stacked" : "single",
|
|
4167
4167
|
currentTimeframe: M,
|
|
4168
4168
|
onSelectTimeframe: ae,
|
|
4169
|
-
title:
|
|
4169
|
+
title: k,
|
|
4170
4170
|
currentStackedTimeframes: T,
|
|
4171
4171
|
onSelectStackedTimeframes: (Me) => {
|
|
4172
4172
|
ue.current = Me;
|
|
@@ -4205,7 +4205,7 @@ const st = function({
|
|
|
4205
4205
|
activeIcon: /* @__PURE__ */ e(It, { style: { fontSize: 16 } }),
|
|
4206
4206
|
label: "Graph",
|
|
4207
4207
|
onClick: h,
|
|
4208
|
-
isActive:
|
|
4208
|
+
isActive: z,
|
|
4209
4209
|
showFeedback: !0,
|
|
4210
4210
|
activeColor: "#4f46e5"
|
|
4211
4211
|
}), m && Me.push({
|
|
@@ -4227,7 +4227,7 @@ const st = function({
|
|
|
4227
4227
|
onSettings: I ? Ge : void 0,
|
|
4228
4228
|
onRemove: b,
|
|
4229
4229
|
onReplace: w,
|
|
4230
|
-
onRefresh:
|
|
4230
|
+
onRefresh: C,
|
|
4231
4231
|
onWhatsThis: y
|
|
4232
4232
|
}), xt = je.filter((lt) => lt.id === "whats-this"), $e = je.filter((lt) => lt.id !== "whats-this"), it = (A ?? []).map((lt, Et) => ({
|
|
4233
4233
|
...lt,
|
|
@@ -4294,7 +4294,7 @@ const Xc = function(t) {
|
|
|
4294
4294
|
"[StackedGroupCard AP-12] slotToActionStripConfig supplied alongside legacy onTableAction — per-slot dispatch will win; remove onTableAction from the consumer."
|
|
4295
4295
|
), S.current = !0);
|
|
4296
4296
|
}, []);
|
|
4297
|
-
const
|
|
4297
|
+
const C = N(
|
|
4298
4298
|
(A, G) => {
|
|
4299
4299
|
if (b?.(A, G), !v) return;
|
|
4300
4300
|
let W = null;
|
|
@@ -4311,13 +4311,13 @@ const Xc = function(t) {
|
|
|
4311
4311
|
f?.(A, W);
|
|
4312
4312
|
},
|
|
4313
4313
|
[b, v, f]
|
|
4314
|
-
), I = ce(null), p =
|
|
4314
|
+
), I = ce(null), p = N(() => {
|
|
4315
4315
|
I.current !== null && (clearTimeout(I.current), I.current = null);
|
|
4316
4316
|
}, []);
|
|
4317
4317
|
le(() => () => {
|
|
4318
4318
|
I.current !== null && (clearTimeout(I.current), I.current = null);
|
|
4319
4319
|
}, []);
|
|
4320
|
-
const M =
|
|
4320
|
+
const M = N(
|
|
4321
4321
|
(A) => {
|
|
4322
4322
|
const G = A.relatedTarget;
|
|
4323
4323
|
G instanceof Element && (G.closest("[data-slot-idx]") || G.closest("[data-action-strip]")) || (p(), I.current = setTimeout(() => {
|
|
@@ -4325,12 +4325,12 @@ const Xc = function(t) {
|
|
|
4325
4325
|
}, 250));
|
|
4326
4326
|
},
|
|
4327
4327
|
[y, v, f, p]
|
|
4328
|
-
),
|
|
4328
|
+
), k = C, D = N(
|
|
4329
4329
|
(A, G) => {
|
|
4330
|
-
p(),
|
|
4330
|
+
p(), k(A, G);
|
|
4331
4331
|
},
|
|
4332
|
-
[
|
|
4333
|
-
),
|
|
4332
|
+
[k, p]
|
|
4333
|
+
), x = !!b || !!v, R = !!y || !!v, T = ce(null), { capacity: z } = Ys(T), P = g != null ? Uc(g) : z, O = Q(() => i.map((A, G) => {
|
|
4334
4334
|
const W = l.find((U) => U.timeframe === A) || l[G], V = W?.value ?? null, $ = Xs(V, { prefix: n, suffix: s, abbreviated: !0 });
|
|
4335
4335
|
return {
|
|
4336
4336
|
timeframe: A,
|
|
@@ -4382,8 +4382,8 @@ const Xc = function(t) {
|
|
|
4382
4382
|
{
|
|
4383
4383
|
definition: { display: "flex", direction: "column", align: "center", justify: "center" },
|
|
4384
4384
|
"data-slot-idx": G,
|
|
4385
|
-
onPointerEnter:
|
|
4386
|
-
onPointerLeave:
|
|
4385
|
+
onPointerEnter: x ? () => D(G, A.timeframe) : void 0,
|
|
4386
|
+
onPointerLeave: R ? M : void 0,
|
|
4387
4387
|
style: {
|
|
4388
4388
|
flex: 1,
|
|
4389
4389
|
minWidth: 0,
|
|
@@ -4506,7 +4506,7 @@ function Zc(a, t) {
|
|
|
4506
4506
|
}
|
|
4507
4507
|
}
|
|
4508
4508
|
function Jc(a) {
|
|
4509
|
-
const [t, r] = Yn(Zc, $a), { onCommit: n } = a ?? {}, s =
|
|
4509
|
+
const [t, r] = Yn(Zc, $a), { onCommit: n } = a ?? {}, s = N((u, h) => {
|
|
4510
4510
|
if (!u) {
|
|
4511
4511
|
(typeof process > "u" || process.env.NODE_ENV !== "production") && console.warn(
|
|
4512
4512
|
"[useFlipAndStage] beginConfig called with null or empty cardId — ignoring."
|
|
@@ -4514,18 +4514,18 @@ function Jc(a) {
|
|
|
4514
4514
|
return;
|
|
4515
4515
|
}
|
|
4516
4516
|
r({ type: "BEGIN_CONFIG", cardId: u, dimensionId: h });
|
|
4517
|
-
}, []), l =
|
|
4517
|
+
}, []), l = N(
|
|
4518
4518
|
(u) => {
|
|
4519
4519
|
if (t.state !== "configuring") return;
|
|
4520
4520
|
const h = u ? { ...t.dirtyState, ...u } : { ...t.dirtyState };
|
|
4521
4521
|
r({ type: "COMMIT_CONFIG" }), n?.(h);
|
|
4522
4522
|
},
|
|
4523
4523
|
[t.dirtyState, t.state, n]
|
|
4524
|
-
), i =
|
|
4524
|
+
), i = N(() => {
|
|
4525
4525
|
r({ type: "CANCEL_CONFIG" });
|
|
4526
|
-
}, []), d =
|
|
4526
|
+
}, []), d = N((u) => {
|
|
4527
4527
|
r({ type: "SET_DIRTY", patch: u });
|
|
4528
|
-
}, []), c =
|
|
4528
|
+
}, []), c = N((u) => {
|
|
4529
4529
|
r({ type: "SET_OPEN_SECTION", id: u });
|
|
4530
4530
|
}, []);
|
|
4531
4531
|
return {
|
|
@@ -4832,44 +4832,44 @@ function cd(a) {
|
|
|
4832
4832
|
} = a, v = Qs(), f = Q(() => id(r), [r]), w = Q(
|
|
4833
4833
|
() => i ? ld(i) : [],
|
|
4834
4834
|
[i]
|
|
4835
|
-
), E =
|
|
4835
|
+
), E = N(
|
|
4836
4836
|
(D) => {
|
|
4837
4837
|
d?.(od(D));
|
|
4838
4838
|
},
|
|
4839
4839
|
[d]
|
|
4840
4840
|
), S = Q(() => {
|
|
4841
4841
|
const D = /* @__PURE__ */ new Map();
|
|
4842
|
-
return t.map((
|
|
4843
|
-
const T =
|
|
4842
|
+
return t.map((x, R) => {
|
|
4843
|
+
const T = x.id;
|
|
4844
4844
|
if (T != null && T !== "" && T !== "None" && T !== "null" && T !== "undefined") {
|
|
4845
|
-
const
|
|
4846
|
-
return D.set(
|
|
4845
|
+
const z = String(T), P = D.get(z) || 0;
|
|
4846
|
+
return D.set(z, P + 1), P > 0 ? { ...x, id: `${z}__dup${R}` } : x;
|
|
4847
4847
|
}
|
|
4848
|
-
return { ...
|
|
4848
|
+
return { ...x, id: `fallback-${R}` };
|
|
4849
4849
|
});
|
|
4850
|
-
}, [t]),
|
|
4850
|
+
}, [t]), C = N(
|
|
4851
4851
|
(D) => _ ? _(D) : String(D.id),
|
|
4852
4852
|
[_]
|
|
4853
|
-
), I =
|
|
4854
|
-
(D,
|
|
4855
|
-
b?.(D.row, D.field,
|
|
4853
|
+
), I = N(
|
|
4854
|
+
(D, x) => {
|
|
4855
|
+
b?.(D.row, D.field, x);
|
|
4856
4856
|
},
|
|
4857
4857
|
[b]
|
|
4858
4858
|
);
|
|
4859
|
-
|
|
4860
|
-
(D,
|
|
4861
|
-
|
|
4859
|
+
N(
|
|
4860
|
+
(D, x) => {
|
|
4861
|
+
x.preventDefault(), y?.(
|
|
4862
4862
|
D.row,
|
|
4863
4863
|
D.field,
|
|
4864
|
-
|
|
4864
|
+
x.currentTarget
|
|
4865
4865
|
);
|
|
4866
4866
|
},
|
|
4867
4867
|
[y]
|
|
4868
4868
|
);
|
|
4869
|
-
const p =
|
|
4870
|
-
(D,
|
|
4871
|
-
const
|
|
4872
|
-
String(
|
|
4869
|
+
const p = N(
|
|
4870
|
+
(D, x) => {
|
|
4871
|
+
const R = f.find((z) => z.field === D.field);
|
|
4872
|
+
String(R?.headerClassName || "").includes("narrow-header") && (x.defaultMuiPrevented = !0, v.current?.showColumnMenu(D.field));
|
|
4873
4873
|
},
|
|
4874
4874
|
[f, v]
|
|
4875
4875
|
), M = Q(() => c ? {
|
|
@@ -4879,7 +4879,7 @@ function cd(a) {
|
|
|
4879
4879
|
},
|
|
4880
4880
|
rowCount: c.total,
|
|
4881
4881
|
paginationMode: "server"
|
|
4882
|
-
} : { autoPageSize: !0 }, [c]),
|
|
4882
|
+
} : { autoPageSize: !0 }, [c]), k = Q(() => nd, []);
|
|
4883
4883
|
return s ? /* @__PURE__ */ e(
|
|
4884
4884
|
be,
|
|
4885
4885
|
{
|
|
@@ -4928,7 +4928,7 @@ function cd(a) {
|
|
|
4928
4928
|
{
|
|
4929
4929
|
rows: S,
|
|
4930
4930
|
columns: f,
|
|
4931
|
-
getRowId:
|
|
4931
|
+
getRowId: C,
|
|
4932
4932
|
apiRef: v,
|
|
4933
4933
|
onColumnHeaderClick: p,
|
|
4934
4934
|
onCellClick: b ? I : void 0,
|
|
@@ -4939,7 +4939,7 @@ function cd(a) {
|
|
|
4939
4939
|
sortModel: w,
|
|
4940
4940
|
onSortModelChange: E,
|
|
4941
4941
|
loading: n,
|
|
4942
|
-
sx:
|
|
4942
|
+
sx: k,
|
|
4943
4943
|
rowHeight: m,
|
|
4944
4944
|
columnHeaderHeight: g
|
|
4945
4945
|
}
|
|
@@ -5079,17 +5079,17 @@ const Pr = () => /* @__PURE__ */ o(
|
|
|
5079
5079
|
p[h] && p[h].scrollIntoView({ block: "nearest" });
|
|
5080
5080
|
}
|
|
5081
5081
|
}, [h]);
|
|
5082
|
-
const w =
|
|
5082
|
+
const w = N((p) => {
|
|
5083
5083
|
r?.(p), m(-1), g.current?.blur();
|
|
5084
|
-
}, [r]), E =
|
|
5084
|
+
}, [r]), E = N((p) => {
|
|
5085
5085
|
if (!f) {
|
|
5086
5086
|
p.key === "Enter" && a.trim() && n?.(a.trim());
|
|
5087
5087
|
return;
|
|
5088
5088
|
}
|
|
5089
5089
|
p.key === "ArrowDown" ? (p.preventDefault(), m((M) => M < v.length - 1 ? M + 1 : M)) : p.key === "ArrowUp" ? (p.preventDefault(), m((M) => M > 0 ? M - 1 : -1)) : p.key === "Enter" ? (p.preventDefault(), h >= 0 && h < v.length ? w(v[h]) : a.trim() && n?.(a.trim())) : p.key === "Escape" && (p.preventDefault(), g.current?.blur());
|
|
5090
|
-
}, [f, h, v, a, w, n]), S =
|
|
5090
|
+
}, [f, h, v, a, w, n]), S = N(() => {
|
|
5091
5091
|
b.current && (clearTimeout(b.current), b.current = null), u(!0);
|
|
5092
|
-
}, []),
|
|
5092
|
+
}, []), C = N(() => {
|
|
5093
5093
|
b.current = setTimeout(() => {
|
|
5094
5094
|
u(!1), m(-1);
|
|
5095
5095
|
}, 150);
|
|
@@ -5172,7 +5172,7 @@ const Pr = () => /* @__PURE__ */ o(
|
|
|
5172
5172
|
value: a,
|
|
5173
5173
|
onChange: (p) => t(p.target.value),
|
|
5174
5174
|
onFocus: S,
|
|
5175
|
-
onBlur:
|
|
5175
|
+
onBlur: C,
|
|
5176
5176
|
onKeyDown: E,
|
|
5177
5177
|
placeholder: "",
|
|
5178
5178
|
style: {
|
|
@@ -5208,8 +5208,8 @@ const Pr = () => /* @__PURE__ */ o(
|
|
|
5208
5208
|
f && /* @__PURE__ */ e("div", { ref: y, style: md, children: v.map((p, M) => /* @__PURE__ */ e(
|
|
5209
5209
|
"div",
|
|
5210
5210
|
{
|
|
5211
|
-
onMouseDown: (
|
|
5212
|
-
|
|
5211
|
+
onMouseDown: (k) => {
|
|
5212
|
+
k.preventDefault(), w(p);
|
|
5213
5213
|
},
|
|
5214
5214
|
onMouseEnter: () => m(M),
|
|
5215
5215
|
style: {
|
|
@@ -5392,11 +5392,11 @@ function yd(a, t, r, n, s, l, i, d, c, u) {
|
|
|
5392
5392
|
right: W.right - w.left,
|
|
5393
5393
|
bottom: W.bottom - w.top
|
|
5394
5394
|
};
|
|
5395
|
-
}, S = E(_),
|
|
5395
|
+
}, S = E(_), C = E(v), I = f ? E(f) : null, p = I ? [S, C, I] : [S, C], M = s.current?.items, k = M ? E(M) : null, D = f ? l.current?.[i.dimension] : null, x = D ? E(D) : null, R = C.left, T = I ? I.right : C.right, z = Math.max(T - C.left, 300), P = R, O = z, Y = I ? R : 0, j = I ? z : 0, A = w.height + 2;
|
|
5396
5396
|
m((G) => ({
|
|
5397
|
-
itemPill:
|
|
5397
|
+
itemPill: k ? { left: k.left, width: k.width, top: k.top, height: k.height } : G.itemPill,
|
|
5398
5398
|
itemFilter: { left: P, width: O, top: A, height: 32 },
|
|
5399
|
-
entityPill:
|
|
5399
|
+
entityPill: x ? { left: x.left, width: x.width, top: x.top, height: x.height } : G.entityPill,
|
|
5400
5400
|
entityFilter: { left: Y, width: j, top: A, height: 32 },
|
|
5401
5401
|
tracks: p
|
|
5402
5402
|
}));
|
|
@@ -5459,7 +5459,7 @@ const vd = ve.memo(({
|
|
|
5459
5459
|
id: ue.id,
|
|
5460
5460
|
label: ue.label || ue.name || ue.id
|
|
5461
5461
|
}))
|
|
5462
|
-
}), [b, c]), [E, S] = H(!1), [
|
|
5462
|
+
}), [b, c]), [E, S] = H(!1), [C, I] = H(!1), [p, M] = H(null), [k, D] = H(null), [x, R] = H(""), [T, z] = H(""), [P, O] = H(!1), Y = _.entity === "items" && E, j = C, A = Y || j, G = ce(null), W = ce(null), V = ce(null), $ = ce(null), U = ce({}), q = ce({}), K = yd(
|
|
5463
5463
|
G,
|
|
5464
5464
|
W,
|
|
5465
5465
|
V,
|
|
@@ -5469,7 +5469,7 @@ const vd = ve.memo(({
|
|
|
5469
5469
|
_,
|
|
5470
5470
|
A,
|
|
5471
5471
|
p,
|
|
5472
|
-
|
|
5472
|
+
k
|
|
5473
5473
|
), X = ce(_.dimension), ee = ce(null);
|
|
5474
5474
|
le(() => (X.current !== _.dimension && (ee.current && clearTimeout(ee.current), O(!0), ee.current = setTimeout(() => O(!1), 150)), X.current = _.dimension, () => {
|
|
5475
5475
|
ee.current && clearTimeout(ee.current);
|
|
@@ -5477,28 +5477,28 @@ const vd = ve.memo(({
|
|
|
5477
5477
|
const ge = ce({ id: null, name: null }), ne = ce({ id: null, name: null });
|
|
5478
5478
|
le(() => {
|
|
5479
5479
|
const ue = a.entity?.id ?? null, _e = a.entity?.name ?? null, Ge = a.byItem?.id ?? null, Ve = a.byItem?.name ?? null;
|
|
5480
|
-
(ue !== ge.current.id || _e !== ge.current.name) && (ge.current = { id: ue, name: _e }, ue && _e ? (D(_e), I(!0),
|
|
5480
|
+
(ue !== ge.current.id || _e !== ge.current.name) && (ge.current = { id: ue, name: _e }, ue && _e ? (D(_e), I(!0), z("")) : D(null)), (Ge !== ne.current.id || Ve !== ne.current.name) && (ne.current = { id: Ge, name: Ve }, Ge && Ve ? (M(Ve), S(!0), R("")) : M(null));
|
|
5481
5481
|
}, [a.entity?.id, a.entity?.name, a.byItem?.id, a.byItem?.name]);
|
|
5482
|
-
const fe =
|
|
5482
|
+
const fe = N((ue, _e) => {
|
|
5483
5483
|
ue === "metric" ? r(_e) : ue === "entity" ? (t(_e), _e !== "items" && S(!1)) : ue === "dimension" && n(_e);
|
|
5484
|
-
}, [r, t, n]), oe =
|
|
5484
|
+
}, [r, t, n]), oe = N(() => {
|
|
5485
5485
|
_.entity === "items" && S((ue) => !ue);
|
|
5486
|
-
}, [_.entity]), se =
|
|
5486
|
+
}, [_.entity]), se = N(() => {
|
|
5487
5487
|
I((ue) => !ue);
|
|
5488
|
-
}, []), pe =
|
|
5489
|
-
M(ue),
|
|
5490
|
-
}, [l]), Ce =
|
|
5488
|
+
}, []), pe = N((ue) => {
|
|
5489
|
+
M(ue), R(""), l(ue, ue);
|
|
5490
|
+
}, [l]), Ce = N(() => {
|
|
5491
5491
|
M(null), l(null, null);
|
|
5492
|
-
}, [l]), we =
|
|
5493
|
-
D(ue),
|
|
5494
|
-
}, [s]), Ne =
|
|
5492
|
+
}, [l]), we = N((ue) => {
|
|
5493
|
+
D(ue), z(""), s(ue, ue);
|
|
5494
|
+
}, [s]), Ne = N(() => {
|
|
5495
5495
|
D(null), s(null, null);
|
|
5496
|
-
}, [s]), Xe =
|
|
5496
|
+
}, [s]), Xe = N((ue) => {
|
|
5497
5497
|
const _e = ue.label || ue.name || ue.id;
|
|
5498
|
-
M(_e),
|
|
5499
|
-
}, [l]), ke =
|
|
5498
|
+
M(_e), R(""), l(ue.id, _e);
|
|
5499
|
+
}, [l]), ke = N((ue) => {
|
|
5500
5500
|
const _e = ue.label || ue.name || ue.id;
|
|
5501
|
-
D(_e),
|
|
5501
|
+
D(_e), z(""), s(ue.id, _e);
|
|
5502
5502
|
}, [s]);
|
|
5503
5503
|
return /* @__PURE__ */ o("div", { ref: G, className: "gloss-chart-control-bar", children: [
|
|
5504
5504
|
K.tracks.map((ue, _e) => /* @__PURE__ */ e(
|
|
@@ -5568,19 +5568,19 @@ const vd = ve.memo(({
|
|
|
5568
5568
|
showEntityFilter: j,
|
|
5569
5569
|
itemFilterLayout: { left: K.itemFilter.left, width: K.itemFilter.width },
|
|
5570
5570
|
entityFilterLayout: { left: K.entityFilter.left, width: K.entityFilter.width },
|
|
5571
|
-
itemSearch:
|
|
5572
|
-
setItemSearch:
|
|
5571
|
+
itemSearch: x,
|
|
5572
|
+
setItemSearch: R,
|
|
5573
5573
|
onItemSubmit: pe,
|
|
5574
5574
|
onItemSelect: Xe,
|
|
5575
5575
|
onItemClear: Ce,
|
|
5576
5576
|
itemFilterValue: p,
|
|
5577
5577
|
itemOptions: u,
|
|
5578
5578
|
entitySearch: T,
|
|
5579
|
-
setEntitySearch:
|
|
5579
|
+
setEntitySearch: z,
|
|
5580
5580
|
onEntitySubmit: we,
|
|
5581
5581
|
onEntitySelect: ke,
|
|
5582
5582
|
onEntityClear: Ne,
|
|
5583
|
-
entityFilterValue:
|
|
5583
|
+
entityFilterValue: k,
|
|
5584
5584
|
entityFading: P,
|
|
5585
5585
|
entityOptions: c
|
|
5586
5586
|
}
|
|
@@ -6085,13 +6085,13 @@ function Cd({
|
|
|
6085
6085
|
tableType: m,
|
|
6086
6086
|
field: g
|
|
6087
6087
|
}) : [], [n, s, i, h, l, m, g]), S = Q(() => {
|
|
6088
|
-
const
|
|
6088
|
+
const k = /* @__PURE__ */ new Map();
|
|
6089
6089
|
for (const D of E) {
|
|
6090
|
-
const
|
|
6091
|
-
|
|
6090
|
+
const x = D.section;
|
|
6091
|
+
k.has(x) || k.set(x, []), k.get(x).push(D);
|
|
6092
6092
|
}
|
|
6093
|
-
return
|
|
6094
|
-
}, [E]),
|
|
6093
|
+
return k;
|
|
6094
|
+
}, [E]), C = N((k) => ({
|
|
6095
6095
|
row: l,
|
|
6096
6096
|
entityType: i,
|
|
6097
6097
|
entityId: d ?? l.id,
|
|
@@ -6099,20 +6099,20 @@ function Cd({
|
|
|
6099
6099
|
timeFrame: u,
|
|
6100
6100
|
userType: h,
|
|
6101
6101
|
tableType: m,
|
|
6102
|
-
field: g ??
|
|
6103
|
-
}), [l, i, d, c, u, h, m, g]), I =
|
|
6104
|
-
const D = k
|
|
6105
|
-
if (
|
|
6106
|
-
|
|
6102
|
+
field: g ?? k.filterKey
|
|
6103
|
+
}), [l, i, d, c, u, h, m, g]), I = N((k) => {
|
|
6104
|
+
const D = C(k), x = w;
|
|
6105
|
+
if (x) {
|
|
6106
|
+
x(k, D), r();
|
|
6107
6107
|
return;
|
|
6108
6108
|
}
|
|
6109
|
-
switch (
|
|
6109
|
+
switch (k.type) {
|
|
6110
6110
|
case "create-tab": {
|
|
6111
|
-
y ? y({ type: "CREATE_TAB", source: "unified-context-menu", payload: { action:
|
|
6111
|
+
y ? y({ type: "CREATE_TAB", source: "unified-context-menu", payload: { action: k, context: D } }) : _ && _({ action: k, context: D });
|
|
6112
6112
|
break;
|
|
6113
6113
|
}
|
|
6114
6114
|
case "graph": {
|
|
6115
|
-
y ? y({ type: "GRAPH", source: "unified-context-menu", payload: { action:
|
|
6115
|
+
y ? y({ type: "GRAPH", source: "unified-context-menu", payload: { action: k, context: D } }) : f && f({ action: k, context: D });
|
|
6116
6116
|
break;
|
|
6117
6117
|
}
|
|
6118
6118
|
case "filter": {
|
|
@@ -6120,53 +6120,53 @@ function Cd({
|
|
|
6120
6120
|
break;
|
|
6121
6121
|
}
|
|
6122
6122
|
case "navigate": {
|
|
6123
|
-
y && y({ type: "NAVIGATE", source: "unified-context-menu", payload: { action:
|
|
6123
|
+
y && y({ type: "NAVIGATE", source: "unified-context-menu", payload: { action: k, context: D } });
|
|
6124
6124
|
break;
|
|
6125
6125
|
}
|
|
6126
6126
|
case "dispatch": {
|
|
6127
|
-
y && y({ type:
|
|
6127
|
+
y && y({ type: k.id, source: "unified-context-menu", payload: { action: k, context: D } });
|
|
6128
6128
|
break;
|
|
6129
6129
|
}
|
|
6130
6130
|
}
|
|
6131
6131
|
r();
|
|
6132
|
-
}, [
|
|
6133
|
-
const D =
|
|
6134
|
-
return (
|
|
6135
|
-
/* @__PURE__ */ e(Je, { icon: Br(
|
|
6132
|
+
}, [C, y, _, v, f, w, r]), p = N((k) => {
|
|
6133
|
+
const D = k.labelFn ? k.labelFn(l, i) : k.label;
|
|
6134
|
+
return (k.disabled ? k.disabled(l) : !1) ? /* @__PURE__ */ e(ht, { title: k.disabledTooltip || "", placement: "left", enterDelay: 300, children: /* @__PURE__ */ e("span", { children: /* @__PURE__ */ o(Wt, { disabled: !0, className: "gloss-unified-context-menu__item--disabled", children: [
|
|
6135
|
+
/* @__PURE__ */ e(Je, { icon: Br(k.icon), definition: { size: "sm" }, style: { marginRight: 8, flexShrink: 0 } }),
|
|
6136
6136
|
/* @__PURE__ */ o("span", { className: "gloss-unified-context-menu__text-group", style: { flex: 1, minWidth: 0 }, children: [
|
|
6137
6137
|
/* @__PURE__ */ e("span", { className: "gloss-unified-context-menu__label", style: { display: "block", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", maxWidth: 200 }, children: D }),
|
|
6138
|
-
|
|
6138
|
+
k.subtitle && /* @__PURE__ */ e("span", { className: "gloss-unified-context-menu__subtitle", style: { display: "block" }, children: k.subtitle })
|
|
6139
6139
|
] })
|
|
6140
|
-
] }) }) },
|
|
6140
|
+
] }) }) }, k.id) : /* @__PURE__ */ o(
|
|
6141
6141
|
Wt,
|
|
6142
6142
|
{
|
|
6143
|
-
onClick: () => I(
|
|
6144
|
-
className:
|
|
6143
|
+
onClick: () => I(k),
|
|
6144
|
+
className: k.variant === "destructive" ? "gloss-unified-context-menu__item--destructive" : void 0,
|
|
6145
6145
|
children: [
|
|
6146
|
-
/* @__PURE__ */ e(Je, { icon: Br(
|
|
6146
|
+
/* @__PURE__ */ e(Je, { icon: Br(k.icon), definition: { size: "sm" }, style: { marginRight: 8, flexShrink: 0 } }),
|
|
6147
6147
|
/* @__PURE__ */ o("span", { className: "gloss-unified-context-menu__text-group", style: { flex: 1, minWidth: 0 }, children: [
|
|
6148
6148
|
/* @__PURE__ */ e("span", { className: "gloss-unified-context-menu__label", style: { display: "block", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", maxWidth: 200 }, children: D }),
|
|
6149
|
-
|
|
6149
|
+
k.subtitle && /* @__PURE__ */ e("span", { className: "gloss-unified-context-menu__subtitle", style: { display: "block" }, children: k.subtitle })
|
|
6150
6150
|
] })
|
|
6151
6151
|
]
|
|
6152
6152
|
},
|
|
6153
|
-
|
|
6153
|
+
k.id
|
|
6154
6154
|
);
|
|
6155
6155
|
}, [l, i, I]), M = Q(() => {
|
|
6156
|
-
const
|
|
6156
|
+
const k = [];
|
|
6157
6157
|
let D = 0;
|
|
6158
|
-
for (const
|
|
6159
|
-
const
|
|
6160
|
-
if (!(!
|
|
6161
|
-
D > 0 &&
|
|
6162
|
-
for (const T of
|
|
6163
|
-
const
|
|
6164
|
-
|
|
6158
|
+
for (const x of Sd) {
|
|
6159
|
+
const R = S.get(x);
|
|
6160
|
+
if (!(!R || R.length === 0)) {
|
|
6161
|
+
D > 0 && k.push(/* @__PURE__ */ e(js, { className: "gloss-unified-context-menu__divider" }, `divider-${x}`));
|
|
6162
|
+
for (const T of R) {
|
|
6163
|
+
const z = p(T);
|
|
6164
|
+
z && k.push(z);
|
|
6165
6165
|
}
|
|
6166
6166
|
D++;
|
|
6167
6167
|
}
|
|
6168
6168
|
}
|
|
6169
|
-
return
|
|
6169
|
+
return k;
|
|
6170
6170
|
}, [S, p]);
|
|
6171
6171
|
return /* @__PURE__ */ e(
|
|
6172
6172
|
ti,
|
|
@@ -6215,19 +6215,19 @@ const Ha = ({
|
|
|
6215
6215
|
return "";
|
|
6216
6216
|
const { start: p, end: M } = Ke(b.id);
|
|
6217
6217
|
return gt(p, M, /* @__PURE__ */ new Date());
|
|
6218
|
-
}, [b]), _ =
|
|
6218
|
+
}, [b]), _ = N(() => {
|
|
6219
6219
|
c && c(a, !0);
|
|
6220
|
-
}, [a, c]), v =
|
|
6220
|
+
}, [a, c]), v = N(() => {
|
|
6221
6221
|
c && c(a, !1);
|
|
6222
|
-
}, [a, c]), f =
|
|
6222
|
+
}, [a, c]), f = N(() => {
|
|
6223
6223
|
c && c(a, !1);
|
|
6224
|
-
}, [a, c]), w =
|
|
6224
|
+
}, [a, c]), w = N(() => {
|
|
6225
6225
|
c && c(a, !h);
|
|
6226
|
-
}, [a, h, c]), E =
|
|
6226
|
+
}, [a, h, c]), E = N((I) => {
|
|
6227
6227
|
s(I), f();
|
|
6228
|
-
}, [s, f]), S =
|
|
6228
|
+
}, [s, f]), S = N((I, p) => {
|
|
6229
6229
|
I.stopPropagation(), i && i(p);
|
|
6230
|
-
}, [i]),
|
|
6230
|
+
}, [i]), C = /* @__PURE__ */ o(
|
|
6231
6231
|
re,
|
|
6232
6232
|
{
|
|
6233
6233
|
ref: u,
|
|
@@ -6322,7 +6322,7 @@ const Ha = ({
|
|
|
6322
6322
|
qe,
|
|
6323
6323
|
{
|
|
6324
6324
|
size: "small",
|
|
6325
|
-
onClick: (
|
|
6325
|
+
onClick: (k) => S(k, I.id),
|
|
6326
6326
|
sx: {
|
|
6327
6327
|
p: 0.25,
|
|
6328
6328
|
opacity: M ? 1 : 0,
|
|
@@ -6357,9 +6357,9 @@ const Ha = ({
|
|
|
6357
6357
|
modifiers: [{ name: "offset", options: { offset: [0, -9] } }]
|
|
6358
6358
|
}
|
|
6359
6359
|
},
|
|
6360
|
-
children:
|
|
6360
|
+
children: C
|
|
6361
6361
|
}
|
|
6362
|
-
) :
|
|
6362
|
+
) : C;
|
|
6363
6363
|
};
|
|
6364
6364
|
Ha.displayName = "ExpandableChip";
|
|
6365
6365
|
const wd = ["S", "M", "T", "W", "T", "F", "S"], Ar = {
|
|
@@ -6431,38 +6431,38 @@ const wd = ["S", "M", "T", "W", "T", "F", "S"], Ar = {
|
|
|
6431
6431
|
}, [a, t]), le(() => {
|
|
6432
6432
|
c && b(new Date(c.getFullYear(), c.getMonth(), 1));
|
|
6433
6433
|
}, [c]);
|
|
6434
|
-
const E = g.getFullYear(), S = g.getMonth(),
|
|
6434
|
+
const E = g.getFullYear(), S = g.getMonth(), C = new Date(E, S + 1, 0).getDate(), I = new Date(E, S, 1).getDay(), p = g.toLocaleDateString("en-US", { month: "long", year: "numeric" }), M = N(() => {
|
|
6435
6435
|
b(new Date(E, S - 1, 1));
|
|
6436
|
-
}, [E, S]),
|
|
6436
|
+
}, [E, S]), k = N(() => {
|
|
6437
6437
|
b(new Date(E, S + 1, 1));
|
|
6438
|
-
}, [E, S]), D =
|
|
6438
|
+
}, [E, S]), D = N(($) => {
|
|
6439
6439
|
const U = $.target.value;
|
|
6440
6440
|
b(new Date(E, U, 1));
|
|
6441
|
-
}, [E]),
|
|
6441
|
+
}, [E]), x = N(($) => {
|
|
6442
6442
|
const U = $.target.value;
|
|
6443
6443
|
b(new Date(U, S, 1));
|
|
6444
|
-
}, [S]),
|
|
6444
|
+
}, [S]), R = N(($) => n.some(
|
|
6445
6445
|
(U) => U.startDate && U.endDate && $ >= U.startDate && $ <= U.endDate
|
|
6446
|
-
), [n]), T =
|
|
6446
|
+
), [n]), T = N(($) => n.filter(
|
|
6447
6447
|
(q) => q.startDate && q.endDate && $ >= q.startDate && $ <= q.endDate
|
|
6448
|
-
).map((q) => q.label).join(", "), [n]),
|
|
6448
|
+
).map((q) => q.label).join(", "), [n]), z = N(($) => {
|
|
6449
6449
|
if (!a) return !1;
|
|
6450
6450
|
const U = v || t;
|
|
6451
6451
|
return U ? qs($, a, U) : !1;
|
|
6452
|
-
}, [a, t, v]), P =
|
|
6452
|
+
}, [a, t, v]), P = N(($) => !$ || !a ? !1 : ta($, a), [a]), O = N(($) => {
|
|
6453
6453
|
if (!$) return !1;
|
|
6454
6454
|
const U = v || t;
|
|
6455
6455
|
return U ? ta($, U) : !1;
|
|
6456
|
-
}, [t, v]), Y =
|
|
6456
|
+
}, [t, v]), Y = N(($) => {
|
|
6457
6457
|
if (!$ || !a) return !1;
|
|
6458
6458
|
const U = v || t;
|
|
6459
6459
|
return U ? ta(a, U) && P($) : P($);
|
|
6460
|
-
}, [a, t, v, P]), j =
|
|
6460
|
+
}, [a, t, v, P]), j = N(($) => $ ? !!(m && $ > m) : !1, [m]), A = N(($) => {
|
|
6461
6461
|
const U = new Date(E, S, $);
|
|
6462
6462
|
y ? (w.current = !0, a && U < a ? r(U, a) : r(a, U), _(!1), f(null)) : (w.current = !0, r(U, null), _(!0));
|
|
6463
|
-
}, [E, S, a, y, r]), G =
|
|
6463
|
+
}, [E, S, a, y, r]), G = N(($) => {
|
|
6464
6464
|
y && f(new Date(E, S, $));
|
|
6465
|
-
}, [y, E, S]), W =
|
|
6465
|
+
}, [y, E, S]), W = N(() => {
|
|
6466
6466
|
f(null);
|
|
6467
6467
|
}, []), V = Q(() => {
|
|
6468
6468
|
const $ = [];
|
|
@@ -6477,8 +6477,8 @@ const wd = ["S", "M", "T", "W", "T", "F", "S"], Ar = {
|
|
|
6477
6477
|
)
|
|
6478
6478
|
);
|
|
6479
6479
|
const U = /* @__PURE__ */ new Date();
|
|
6480
|
-
for (let q = 1; q <=
|
|
6481
|
-
const K = new Date(E, S, q), X =
|
|
6480
|
+
for (let q = 1; q <= C; q++) {
|
|
6481
|
+
const K = new Date(E, S, q), X = z(K), ee = P(K), ge = O(K), ne = Y(K), fe = j(K), oe = R(K), se = ta(K, U), pe = ["mini-calendar__day"];
|
|
6482
6482
|
fe ? (pe.push("mini-calendar__day--disabled"), ge ? pe.push("mini-calendar__day--disabled-end") : X && pe.push("mini-calendar__day--disabled-in-range"), oe && pe.push("mini-calendar__day--market")) : (ne ? pe.push("mini-calendar__day--single") : ee ? pe.push("mini-calendar__day--start") : ge ? pe.push("mini-calendar__day--end") : X && pe.push("mini-calendar__day--in-range"), (ne || ee || ge || X) && (u === "secondary" ? pe.push("mini-calendar__day--secondary") : u === "tertiary" && pe.push("mini-calendar__day--tertiary")), se && !ee && !ge && !ne && pe.push("mini-calendar__day--today"), oe && pe.push("mini-calendar__day--market"));
|
|
6483
6483
|
const Ce = /* @__PURE__ */ e(
|
|
6484
6484
|
re,
|
|
@@ -6519,7 +6519,7 @@ const wd = ["S", "M", "T", "W", "T", "F", "S"], Ar = {
|
|
|
6519
6519
|
);
|
|
6520
6520
|
}
|
|
6521
6521
|
return $;
|
|
6522
|
-
}, [E, S,
|
|
6522
|
+
}, [E, S, C, I, z, P, O, Y, j, R, T, A, G, u]);
|
|
6523
6523
|
return /* @__PURE__ */ o(
|
|
6524
6524
|
re,
|
|
6525
6525
|
{
|
|
@@ -6567,7 +6567,7 @@ const wd = ["S", "M", "T", "W", "T", "F", "S"], Ar = {
|
|
|
6567
6567
|
yr,
|
|
6568
6568
|
{
|
|
6569
6569
|
value: E,
|
|
6570
|
-
onChange:
|
|
6570
|
+
onChange: x,
|
|
6571
6571
|
variant: "standard",
|
|
6572
6572
|
disableUnderline: !0,
|
|
6573
6573
|
sx: {
|
|
@@ -6590,7 +6590,7 @@ const wd = ["S", "M", "T", "W", "T", "F", "S"], Ar = {
|
|
|
6590
6590
|
}
|
|
6591
6591
|
)
|
|
6592
6592
|
] }) : /* @__PURE__ */ e(Te, { variant: "body2", fontWeight: 500, children: p }),
|
|
6593
|
-
/* @__PURE__ */ e(qe, { onClick:
|
|
6593
|
+
/* @__PURE__ */ e(qe, { onClick: k, size: "small", sx: { p: 0.5 }, children: /* @__PURE__ */ e(Ai, { fontSize: "small" }) })
|
|
6594
6594
|
] }),
|
|
6595
6595
|
/* @__PURE__ */ e(re, { className: "mini-calendar__grid", children: wd.map(($, U) => /* @__PURE__ */ e(
|
|
6596
6596
|
re,
|
|
@@ -6758,9 +6758,9 @@ const Td = {
|
|
|
6758
6758
|
const f = Q(() => ({
|
|
6759
6759
|
...Td,
|
|
6760
6760
|
...u
|
|
6761
|
-
}), [u]), w = ce(null), [E, S] = H(null), [
|
|
6761
|
+
}), [u]), w = ce(null), [E, S] = H(null), [C, I] = H("calendar"), [p, M] = H(null), [k, D] = H(null), x = ce(null), [R, T] = H(() => f.lastPreset || "mtd"), [z, P] = H(null), [O, Y] = H(null), [j, A] = H(null), [G, W] = H(null), [V, $] = H(null), [U, q] = H(() => r ? _ ?? f.compareEnabled ?? !1 : !1), K = _ ?? U, X = N((F) => {
|
|
6762
6762
|
q(F), v?.(F);
|
|
6763
|
-
}, [v]), [ee, ge] = H("A"), [ne, fe] = H(() => f.lastPresetB ?? null), [oe, se] = H(null), [pe, Ce] = H(null), [we, Ne] = H(null), [Xe, ke] = H(null), [ue, _e] = H(null), [Ge, Ve] = H(null), [ae, xe] = H(null), [We, Fe] = H(null), [De, Be] = H(null), [Me, je] = H(null), [xt, $e] = H(null), [Ee, it] = H(1), [Zt, tt] = H(!1), [lt, Et] = H(void 0), Ae = j !== null ? j :
|
|
6763
|
+
}, [v]), [ee, ge] = H("A"), [ne, fe] = H(() => f.lastPresetB ?? null), [oe, se] = H(null), [pe, Ce] = H(null), [we, Ne] = H(null), [Xe, ke] = H(null), [ue, _e] = H(null), [Ge, Ve] = H(null), [ae, xe] = H(null), [We, Fe] = H(null), [De, Be] = H(null), [Me, je] = H(null), [xt, $e] = H(null), [Ee, it] = H(1), [Zt, tt] = H(!1), [lt, Et] = H(void 0), Ae = j !== null ? j : R, Pt = j !== null ? G : z, mt = j !== null ? V : O, ot = we !== null ? we : ne, Mt = we !== null ? Xe : oe, Bt = we !== null ? ue : pe, ct = De !== null ? De : Ge, At = De !== null ? Me : ae, Rt = De !== null ? xt : We, tr = j !== null && (j !== R || G !== z || V !== O), [me, ya] = H(() => {
|
|
6764
6764
|
const F = m || aa, L = g || [], J = new Set(L.map((de) => de.id)), te = F.filter((de) => !J.has(de.id)).map((de) => ({ ...de, active: St(de) })), ie = L.map((de) => ({
|
|
6765
6765
|
...de,
|
|
6766
6766
|
active: St(de)
|
|
@@ -6796,8 +6796,8 @@ const Td = {
|
|
|
6796
6796
|
};
|
|
6797
6797
|
}, [va, _a, m]), pt = i || !!E;
|
|
6798
6798
|
le(() => {
|
|
6799
|
-
i && j === null && (A(
|
|
6800
|
-
}, [i, j,
|
|
6799
|
+
i && j === null && (A(R), W(z), $(O));
|
|
6800
|
+
}, [i, j, R, z, O]);
|
|
6801
6801
|
const Le = Q(
|
|
6802
6802
|
() => me.find((F) => F.active),
|
|
6803
6803
|
[me]
|
|
@@ -6833,19 +6833,19 @@ const Td = {
|
|
|
6833
6833
|
}, [at.start?.getTime(), at.end?.getTime(), me, f.lastPreset]);
|
|
6834
6834
|
const Bn = Q(() => {
|
|
6835
6835
|
let F, L;
|
|
6836
|
-
if (
|
|
6837
|
-
F =
|
|
6836
|
+
if (R === "custom" && z && O)
|
|
6837
|
+
F = z, L = O;
|
|
6838
6838
|
else {
|
|
6839
|
-
const te = me.find((ie) => ie.id ===
|
|
6839
|
+
const te = me.find((ie) => ie.id === R);
|
|
6840
6840
|
if (te)
|
|
6841
6841
|
F = te.startDate, L = te.endDate;
|
|
6842
6842
|
else {
|
|
6843
|
-
const ie = Ke(
|
|
6843
|
+
const ie = Ke(R);
|
|
6844
6844
|
F = ie.start, L = ie.end;
|
|
6845
6845
|
}
|
|
6846
6846
|
}
|
|
6847
6847
|
return Ot(F, L, /* @__PURE__ */ new Date(), me).display;
|
|
6848
|
-
}, [
|
|
6848
|
+
}, [R, z, O, me]), An = Q(() => {
|
|
6849
6849
|
if (!K || !ne) return null;
|
|
6850
6850
|
let F, L;
|
|
6851
6851
|
if (ne === "custom" && oe && pe)
|
|
@@ -6861,15 +6861,15 @@ const Td = {
|
|
|
6861
6861
|
}
|
|
6862
6862
|
return Ot(F, L, /* @__PURE__ */ new Date(), me).display;
|
|
6863
6863
|
}, [K, ne, oe, pe, me]), sr = Q(() => {
|
|
6864
|
-
const F = ["7d", "30d", "60d", "90d", "mtd", "qtd", "ytd", "lytd"], L = me.find((J) => J.id ===
|
|
6864
|
+
const F = ["7d", "30d", "60d", "90d", "mtd", "qtd", "ytd", "lytd"], L = me.find((J) => J.id === R);
|
|
6865
6865
|
if (L)
|
|
6866
6866
|
return gt(L.startDate, L.endDate, /* @__PURE__ */ new Date());
|
|
6867
|
-
if (F.includes(
|
|
6868
|
-
const { start: J, end: te } = Ke(
|
|
6867
|
+
if (F.includes(R)) {
|
|
6868
|
+
const { start: J, end: te } = Ke(R);
|
|
6869
6869
|
return gt(J, te, /* @__PURE__ */ new Date());
|
|
6870
6870
|
}
|
|
6871
6871
|
return "";
|
|
6872
|
-
}, [
|
|
6872
|
+
}, [R, me]), ir = Q(() => {
|
|
6873
6873
|
let F, L;
|
|
6874
6874
|
if (Ae === "custom" && Pt && mt)
|
|
6875
6875
|
F = Pt, L = mt;
|
|
@@ -6918,12 +6918,12 @@ const Td = {
|
|
|
6918
6918
|
const J = Ot(F, L, /* @__PURE__ */ new Date(), me), te = gt(F, L, /* @__PURE__ */ new Date());
|
|
6919
6919
|
return J.preset ? `${J.preset.label} (${te})` : te;
|
|
6920
6920
|
}, [K, Ee, ct, At, Rt, me]);
|
|
6921
|
-
const Rn =
|
|
6922
|
-
A(
|
|
6923
|
-
}, [
|
|
6921
|
+
const Rn = N((F) => {
|
|
6922
|
+
A(R), W(z), $(O), K && (Ne(ne), ke(oe), _e(pe), Ee >= 3 && (Be(Ge), je(ae), $e(We))), S(F.currentTarget);
|
|
6923
|
+
}, [R, z, O, K, Ee, ne, oe, pe, Ge, ae, We]), lr = N((F, L, J) => {
|
|
6924
6924
|
const te = [F, L];
|
|
6925
6925
|
J && (te.shortcutId = na(J)), t(te);
|
|
6926
|
-
}, [t]), Qt =
|
|
6926
|
+
}, [t]), Qt = N((F, L, J) => {
|
|
6927
6927
|
if (F === "custom" && L && J)
|
|
6928
6928
|
return [L, J];
|
|
6929
6929
|
const te = me.find((ze) => ze.id === F);
|
|
@@ -6931,9 +6931,9 @@ const Td = {
|
|
|
6931
6931
|
return [te.startDate, te.endDate];
|
|
6932
6932
|
const { start: ie, end: de } = Ke(F);
|
|
6933
6933
|
return [ie, de];
|
|
6934
|
-
}, [me]), rt =
|
|
6934
|
+
}, [me]), rt = N((F) => {
|
|
6935
6935
|
h && h({ ...f, ...F });
|
|
6936
|
-
}, [h, f]), ea =
|
|
6936
|
+
}, [h, f]), ea = N(() => {
|
|
6937
6937
|
if (j === null) return;
|
|
6938
6938
|
T(j), P(G), Y(V);
|
|
6939
6939
|
const F = Qt(j, G, V);
|
|
@@ -6972,35 +6972,35 @@ const Td = {
|
|
|
6972
6972
|
lastPresetB: null,
|
|
6973
6973
|
lastPresetC: null
|
|
6974
6974
|
}), lr(F[0], F[1], j);
|
|
6975
|
-
}, [j, G, V, K, Ee, we, Xe, ue, De, Me, xt, Qt, t, lr, rt]), zn =
|
|
6975
|
+
}, [j, G, V, K, Ee, we, Xe, ue, De, Me, xt, Qt, t, lr, rt]), zn = N(() => {
|
|
6976
6976
|
i || (tr && ea(), A(null), W(null), $(null), Ne(null), ke(null), _e(null), Be(null), je(null), $e(null), D(null), S(null));
|
|
6977
|
-
}, [i, tr, ea]), or =
|
|
6977
|
+
}, [i, tr, ea]), or = N(() => {
|
|
6978
6978
|
i || (A(null), W(null), $(null), Ne(null), ke(null), _e(null), Be(null), je(null), $e(null), D(null), S(null));
|
|
6979
|
-
}, [i]), cr =
|
|
6979
|
+
}, [i]), cr = N(() => {
|
|
6980
6980
|
if (Ee >= 3) return;
|
|
6981
|
-
const F = j !== null ? j :
|
|
6981
|
+
const F = j !== null ? j : R;
|
|
6982
6982
|
Ee === 1 ? (X(!0), it(2), Ne(F), ge("B"), tt(!0)) : Ee === 2 && (it(3), Be(F), ge("C"));
|
|
6983
|
-
}, [Ee, j,
|
|
6983
|
+
}, [Ee, j, R, X]), dr = N((F) => {
|
|
6984
6984
|
F === "C" ? (it(2), Be(null), je(null), $e(null), Ve(null), xe(null), Fe(null), ee === "C" && ge("B")) : F === "B" && Ee === 2 && (X(!1), it(1), Ne(null), ke(null), _e(null), fe(null), se(null), Ce(null), ge("A"), tt(!1), rt({
|
|
6985
6985
|
compareEnabled: !1,
|
|
6986
6986
|
rangeCount: 1,
|
|
6987
6987
|
lastPresetB: null,
|
|
6988
6988
|
lastPresetC: null
|
|
6989
6989
|
}));
|
|
6990
|
-
}, [Ee, ee, X, rt]), Fn =
|
|
6990
|
+
}, [Ee, ee, X, rt]), Fn = N(() => {
|
|
6991
6991
|
X(!1), it(1), ge("A"), tt(!1), Ne(null), ke(null), _e(null), fe(null), se(null), Ce(null), Be(null), je(null), $e(null), Ve(null), xe(null), Fe(null), rt({
|
|
6992
6992
|
compareEnabled: !1,
|
|
6993
6993
|
rangeCount: 1,
|
|
6994
6994
|
lastPresetB: null,
|
|
6995
6995
|
lastPresetC: null
|
|
6996
6996
|
});
|
|
6997
|
-
}, [X, rt]), xa =
|
|
6998
|
-
|
|
6999
|
-
}, [K, ee]), $t =
|
|
6997
|
+
}, [X, rt]), xa = N((F) => {
|
|
6998
|
+
x.current && (clearTimeout(x.current), x.current = null), D(null), K && ee === "C" ? (Be(F), je(null), $e(null)) : K && ee === "B" ? (Ne(F), ke(null), _e(null)) : (A(F), W(null), $(null));
|
|
6999
|
+
}, [K, ee]), $t = N((F) => {
|
|
7000
7000
|
if (!me.find((te) => te.id === F)) return;
|
|
7001
7001
|
const J = f.pinnedPreset || "mtd";
|
|
7002
|
-
K && ee === "C" ? (Be((De !== null ? De : Ge) === F ? J : F), je(null), $e(null)) : K && ee === "B" ? (Ne((we !== null ? we : ne) === F ? J : F), ke(null), _e(null)) : (A((j !== null ? j :
|
|
7003
|
-
}, [me, K, ee, f.pinnedPreset, j,
|
|
7002
|
+
K && ee === "C" ? (Be((De !== null ? De : Ge) === F ? J : F), je(null), $e(null)) : K && ee === "B" ? (Ne((we !== null ? we : ne) === F ? J : F), ke(null), _e(null)) : (A((j !== null ? j : R) === F ? J : F), W(null), $(null));
|
|
7003
|
+
}, [me, K, ee, f.pinnedPreset, j, R, we, ne, De, Ge]), $n = N((F, L) => {
|
|
7004
7004
|
if (K && ee === "C")
|
|
7005
7005
|
if (je(F), L) {
|
|
7006
7006
|
$e(L);
|
|
@@ -7021,15 +7021,15 @@ const Td = {
|
|
|
7021
7021
|
J ? (A(J.id), W(null), $(null)) : A("custom");
|
|
7022
7022
|
} else
|
|
7023
7023
|
A("custom"), $(null);
|
|
7024
|
-
}, [me, K, ee]), ur =
|
|
7024
|
+
}, [me, K, ee]), ur = N((F) => {
|
|
7025
7025
|
rt({ pinnedPreset: F }), K && ee === "C" ? (Be(F), je(null), $e(null)) : K && ee === "B" ? (Ne(F), ke(null), _e(null)) : (A(F), W(null), $(null));
|
|
7026
|
-
}, [K, ee, rt]), mr =
|
|
7027
|
-
|
|
7026
|
+
}, [K, ee, rt]), mr = N((F, L) => {
|
|
7027
|
+
x.current && (clearTimeout(x.current), x.current = null), L ? D(F) : x.current = setTimeout(() => {
|
|
7028
7028
|
D(null);
|
|
7029
7029
|
}, 150);
|
|
7030
|
-
}, []), pr =
|
|
7030
|
+
}, []), pr = N(() => {
|
|
7031
7031
|
ea(), A(null), W(null), $(null), S(null);
|
|
7032
|
-
}, [ea]), On =
|
|
7032
|
+
}, [ea]), On = N(() => {
|
|
7033
7033
|
let F;
|
|
7034
7034
|
if (Ae === "custom" && mt)
|
|
7035
7035
|
F = mt;
|
|
@@ -7047,7 +7047,7 @@ const Td = {
|
|
|
7047
7047
|
location: p.location || ""
|
|
7048
7048
|
});
|
|
7049
7049
|
}, [p]);
|
|
7050
|
-
const Ln =
|
|
7050
|
+
const Ln = N(() => {
|
|
7051
7051
|
const F = /* @__PURE__ */ new Date();
|
|
7052
7052
|
F.setDate(F.getDate() + 1);
|
|
7053
7053
|
const L = new Date(F);
|
|
@@ -7060,7 +7060,7 @@ const Td = {
|
|
|
7060
7060
|
endDate: L,
|
|
7061
7061
|
location: ""
|
|
7062
7062
|
});
|
|
7063
|
-
}, []), Hn =
|
|
7063
|
+
}, []), Hn = N(() => {
|
|
7064
7064
|
if (!Oe.label || !Oe.startDate || !Oe.endDate) return;
|
|
7065
7065
|
const F = {
|
|
7066
7066
|
id: p?.isNew ? Js() : p.id,
|
|
@@ -7071,7 +7071,7 @@ const Td = {
|
|
|
7071
7071
|
isCustom: !0
|
|
7072
7072
|
};
|
|
7073
7073
|
b?.(F), ya((L) => [...L.filter((ie) => ie.id !== F.id), { ...F, active: St(F) }].sort((ie, de) => ie.startDate.getTime() - de.startDate.getTime())), M(null);
|
|
7074
|
-
}, [p, Oe, b]), Gn =
|
|
7074
|
+
}, [p, Oe, b]), Gn = N(() => {
|
|
7075
7075
|
if (!p || p.isNew) {
|
|
7076
7076
|
M(null);
|
|
7077
7077
|
return;
|
|
@@ -7087,7 +7087,7 @@ const Td = {
|
|
|
7087
7087
|
const gr = Q(() => {
|
|
7088
7088
|
const F = { small: 280, medium: 340, large: 400 };
|
|
7089
7089
|
return F[n] || F.medium;
|
|
7090
|
-
}, [n]), Nt =
|
|
7090
|
+
}, [n]), Nt = N((F) => {
|
|
7091
7091
|
if (!F) return "Select...";
|
|
7092
7092
|
if (F === "custom") return "Custom";
|
|
7093
7093
|
if (F === "today") return "Today";
|
|
@@ -7097,7 +7097,7 @@ const Td = {
|
|
|
7097
7097
|
if (J) return J.label;
|
|
7098
7098
|
const te = me.find((ie) => ie.id === F);
|
|
7099
7099
|
return te ? te.label : F;
|
|
7100
|
-
}, [me]), Na =
|
|
7100
|
+
}, [me]), Na = N((F, L, J) => {
|
|
7101
7101
|
let te, ie;
|
|
7102
7102
|
if (F === "custom" && L && J)
|
|
7103
7103
|
te = L, ie = J;
|
|
@@ -7111,12 +7111,12 @@ const Td = {
|
|
|
7111
7111
|
}
|
|
7112
7112
|
}
|
|
7113
7113
|
return gt(te, ie, /* @__PURE__ */ new Date());
|
|
7114
|
-
}, [me]), Vn =
|
|
7114
|
+
}, [me]), Vn = N(() => {
|
|
7115
7115
|
tt((F) => !F);
|
|
7116
|
-
}, []), Wn =
|
|
7117
|
-
const F = j !== null ? j :
|
|
7116
|
+
}, []), Wn = N(() => {
|
|
7117
|
+
const F = j !== null ? j : R;
|
|
7118
7118
|
X(!0), it(2), Ne(F), ge("B"), tt(!0);
|
|
7119
|
-
}, [j,
|
|
7119
|
+
}, [j, R, X]), Sa = N(({ label: F, isActive: L, presetName: J, dateRange: te, color: ie, onSelect: de, onRemove: ze }) => {
|
|
7120
7120
|
const hr = !J || J === "Select...";
|
|
7121
7121
|
return /* @__PURE__ */ o(
|
|
7122
7122
|
re,
|
|
@@ -7324,7 +7324,7 @@ const Td = {
|
|
|
7324
7324
|
onSelect: xa,
|
|
7325
7325
|
pinnedId: f.pinnedPreset,
|
|
7326
7326
|
onPin: ur,
|
|
7327
|
-
isOpen:
|
|
7327
|
+
isOpen: k === "rolling",
|
|
7328
7328
|
onOpenChange: mr
|
|
7329
7329
|
}
|
|
7330
7330
|
),
|
|
@@ -7338,7 +7338,7 @@ const Td = {
|
|
|
7338
7338
|
onSelect: xa,
|
|
7339
7339
|
pinnedId: f.pinnedPreset,
|
|
7340
7340
|
onPin: ur,
|
|
7341
|
-
isOpen:
|
|
7341
|
+
isOpen: k === "period",
|
|
7342
7342
|
onOpenChange: mr
|
|
7343
7343
|
}
|
|
7344
7344
|
),
|
|
@@ -7348,7 +7348,7 @@ const Td = {
|
|
|
7348
7348
|
{
|
|
7349
7349
|
size: "small",
|
|
7350
7350
|
onClick: () => I("calendar"),
|
|
7351
|
-
color:
|
|
7351
|
+
color: C === "calendar" ? "primary" : "default",
|
|
7352
7352
|
sx: { p: 0.5 },
|
|
7353
7353
|
children: /* @__PURE__ */ e(vr, { sx: { fontSize: 16 } })
|
|
7354
7354
|
}
|
|
@@ -7358,7 +7358,7 @@ const Td = {
|
|
|
7358
7358
|
{
|
|
7359
7359
|
size: "small",
|
|
7360
7360
|
onClick: () => I("markets"),
|
|
7361
|
-
color:
|
|
7361
|
+
color: C === "markets" ? "primary" : "default",
|
|
7362
7362
|
sx: {
|
|
7363
7363
|
p: 0.5,
|
|
7364
7364
|
position: "relative"
|
|
@@ -7385,7 +7385,7 @@ const Td = {
|
|
|
7385
7385
|
) })
|
|
7386
7386
|
] }),
|
|
7387
7387
|
/* @__PURE__ */ o(re, { className: "hybrid-date-picker__content", children: [
|
|
7388
|
-
|
|
7388
|
+
C === "calendar" && (() => {
|
|
7389
7389
|
const L = K && ee === "C" ? ct : K && ee === "B" ? ot : Ae, J = K && ee === "C" ? At : K && ee === "B" ? Mt : Pt, te = K && ee === "C" ? Rt : K && ee === "B" ? Bt : mt;
|
|
7390
7390
|
return /* @__PURE__ */ e(
|
|
7391
7391
|
_n,
|
|
@@ -7400,7 +7400,7 @@ const Td = {
|
|
|
7400
7400
|
}
|
|
7401
7401
|
);
|
|
7402
7402
|
})(),
|
|
7403
|
-
|
|
7403
|
+
C === "markets" && /* @__PURE__ */ o(re, { className: "hybrid-date-picker__markets-list", children: [
|
|
7404
7404
|
/* @__PURE__ */ e(Te, { className: "hybrid-date-picker__events-section-header", children: "Market Events" }),
|
|
7405
7405
|
ar.filter((L) => !Le || L.id !== Le.id).map((L) => /* @__PURE__ */ e(
|
|
7406
7406
|
Ht,
|
|
@@ -8010,7 +8010,7 @@ const Ma = [
|
|
|
8010
8010
|
const [h, m] = H(null);
|
|
8011
8011
|
return /* @__PURE__ */ o(be, { definition: { display: "flex", direction: "column", gap: "8px" }, children: [
|
|
8012
8012
|
a.map(({ label: g, getValue: b, id: y, disabled: _ }) => {
|
|
8013
|
-
const v = b(), f = !_ && (n ? n === y : r?.[0] && v?.[0] && xr(r[0], v[0]) && r?.[1] && v?.[1] && xr(r[1], v[1])), w = c === y,
|
|
8013
|
+
const v = b(), f = !_ && (n ? n === y : r?.[0] && v?.[0] && xr(r[0], v[0]) && r?.[1] && v?.[1] && xr(r[1], v[1])), w = c === y, C = /* @__PURE__ */ o(
|
|
8014
8014
|
be,
|
|
8015
8015
|
{
|
|
8016
8016
|
definition: { display: "flex", align: "center", gap: "4px" },
|
|
@@ -8046,7 +8046,7 @@ const Ma = [
|
|
|
8046
8046
|
]
|
|
8047
8047
|
}
|
|
8048
8048
|
);
|
|
8049
|
-
return _ ? /* @__PURE__ */ e(ht, { title: "Market configuration coming soon", arrow: !0, placement: "right", children: /* @__PURE__ */ e("div", { children:
|
|
8049
|
+
return _ ? /* @__PURE__ */ e(ht, { title: "Market configuration coming soon", arrow: !0, placement: "right", children: /* @__PURE__ */ e("div", { children: C }) }, g) : /* @__PURE__ */ e("div", { children: C }, g);
|
|
8050
8050
|
}),
|
|
8051
8051
|
l && /* @__PURE__ */ e(
|
|
8052
8052
|
be,
|
|
@@ -8098,26 +8098,26 @@ const Ma = [
|
|
|
8098
8098
|
activePresetId: b,
|
|
8099
8099
|
onPresetChange: y
|
|
8100
8100
|
}) => {
|
|
8101
|
-
const _ = i !== void 0, [v, f] = H(!1), [w, E] = H(!1), [S,
|
|
8101
|
+
const _ = i !== void 0, [v, f] = H(!1), [w, E] = H(!1), [S, C] = H(l ?? !1), I = r?.pinnedPreset || "MTD", [p, M] = H(() => r?.lastPreset?.toUpperCase() || "MTD"), [k, D] = H(null), x = Q(() => oa(a) ? a.rangeA : a, [a]), R = Q(() => oa(a) ? a.rangeB : null, [a]), T = N((V) => {
|
|
8102
8102
|
const $ = V || "MTD";
|
|
8103
8103
|
n && r && n({ ...r, pinnedPreset: $.toLowerCase() });
|
|
8104
8104
|
const U = Ma.find((q) => q.id === $ && !q.disabled);
|
|
8105
8105
|
if (U) {
|
|
8106
8106
|
const q = U.value();
|
|
8107
8107
|
if (M($), S)
|
|
8108
|
-
t({ rangeA: q, rangeB:
|
|
8108
|
+
t({ rangeA: q, rangeB: R || [null, null], shortcutId: $ });
|
|
8109
8109
|
else {
|
|
8110
8110
|
const K = [...q];
|
|
8111
8111
|
K.shortcutId = $, t(K);
|
|
8112
8112
|
}
|
|
8113
8113
|
}
|
|
8114
|
-
}, [S,
|
|
8114
|
+
}, [S, R, t, n, r]);
|
|
8115
8115
|
le(() => {
|
|
8116
|
-
_ &&
|
|
8116
|
+
_ && C(oa(a));
|
|
8117
8117
|
}, [_, a]), le(() => {
|
|
8118
|
-
l !== void 0 &&
|
|
8118
|
+
l !== void 0 && C(l);
|
|
8119
8119
|
}, [l]);
|
|
8120
|
-
const
|
|
8120
|
+
const z = N((V) => {
|
|
8121
8121
|
Promise.resolve().then(() => t(V));
|
|
8122
8122
|
}, [t]), P = ce(!1);
|
|
8123
8123
|
le(() => {
|
|
@@ -8127,28 +8127,28 @@ const Ma = [
|
|
|
8127
8127
|
return;
|
|
8128
8128
|
}
|
|
8129
8129
|
if (S) {
|
|
8130
|
-
const V = Array.isArray(
|
|
8131
|
-
|
|
8130
|
+
const V = Array.isArray(x) ? x : [null, null];
|
|
8131
|
+
z({ rangeA: V, rangeB: R || [null, null] });
|
|
8132
8132
|
} else
|
|
8133
|
-
Array.isArray(
|
|
8133
|
+
Array.isArray(x) && z(x);
|
|
8134
8134
|
}
|
|
8135
|
-
}, [S, _,
|
|
8136
|
-
const O =
|
|
8135
|
+
}, [S, _, x, R, z]);
|
|
8136
|
+
const O = N((V, $) => {
|
|
8137
8137
|
if ($ || M(null), S) {
|
|
8138
|
-
const U = { rangeA: V, rangeB:
|
|
8138
|
+
const U = { rangeA: V, rangeB: R || [null, null] };
|
|
8139
8139
|
$ && (U.shortcutId = $), t(U);
|
|
8140
8140
|
} else if ($) {
|
|
8141
8141
|
const U = [...V];
|
|
8142
8142
|
U.shortcutId = $, t(U);
|
|
8143
8143
|
} else
|
|
8144
8144
|
t(V);
|
|
8145
|
-
}, [S,
|
|
8145
|
+
}, [S, R, t]), Y = N((V, $) => {
|
|
8146
8146
|
$ || D(null);
|
|
8147
|
-
const U = { rangeA:
|
|
8147
|
+
const U = { rangeA: x || [null, null], rangeB: V };
|
|
8148
8148
|
$ && (U.shortcutId = $), t(U);
|
|
8149
|
-
}, [t,
|
|
8149
|
+
}, [t, x]), j = N((V, $) => {
|
|
8150
8150
|
M($), O(V, $), f(!1);
|
|
8151
|
-
}, [O]), A =
|
|
8151
|
+
}, [O]), A = N((V, $) => {
|
|
8152
8152
|
D($), Y(V, $), E(!1);
|
|
8153
8153
|
}, [Y]), G = Q(() => ({
|
|
8154
8154
|
shortcuts: {
|
|
@@ -8160,14 +8160,14 @@ const Ma = [
|
|
|
8160
8160
|
})),
|
|
8161
8161
|
onChange: (V) => O(V),
|
|
8162
8162
|
onShortcutClick: j,
|
|
8163
|
-
value:
|
|
8163
|
+
value: x,
|
|
8164
8164
|
activeShortcutId: p,
|
|
8165
8165
|
enableCompare: _,
|
|
8166
8166
|
compareEnabled: S,
|
|
8167
8167
|
pinnedId: I,
|
|
8168
8168
|
onPinChange: T,
|
|
8169
8169
|
onEnableCompare: () => {
|
|
8170
|
-
|
|
8170
|
+
C(!0), i?.(!0), f(!1), setTimeout(() => E(!0), 0);
|
|
8171
8171
|
}
|
|
8172
8172
|
},
|
|
8173
8173
|
textField: {
|
|
@@ -8190,7 +8190,7 @@ const Ma = [
|
|
|
8190
8190
|
E(!1), f(!0);
|
|
8191
8191
|
}
|
|
8192
8192
|
}
|
|
8193
|
-
}), [
|
|
8193
|
+
}), [x, O, j, _, S, I, T, p, i]), W = Q(() => ({
|
|
8194
8194
|
shortcuts: {
|
|
8195
8195
|
items: Ma.map((V) => ({
|
|
8196
8196
|
label: V.label,
|
|
@@ -8200,8 +8200,8 @@ const Ma = [
|
|
|
8200
8200
|
})),
|
|
8201
8201
|
onChange: (V) => Y(V),
|
|
8202
8202
|
onShortcutClick: A,
|
|
8203
|
-
value:
|
|
8204
|
-
activeShortcutId:
|
|
8203
|
+
value: R,
|
|
8204
|
+
activeShortcutId: k
|
|
8205
8205
|
// No pin functionality for compare range
|
|
8206
8206
|
},
|
|
8207
8207
|
textField: {
|
|
@@ -8224,7 +8224,7 @@ const Ma = [
|
|
|
8224
8224
|
f(!1), E(!0);
|
|
8225
8225
|
}
|
|
8226
8226
|
}
|
|
8227
|
-
}), [
|
|
8227
|
+
}), [R, Y, A, k]);
|
|
8228
8228
|
if (g === "simple-selector") {
|
|
8229
8229
|
const V = oa(a) ? a.rangeA : a;
|
|
8230
8230
|
return /* @__PURE__ */ e(
|
|
@@ -8241,7 +8241,7 @@ const Ma = [
|
|
|
8241
8241
|
/* @__PURE__ */ e(
|
|
8242
8242
|
_r,
|
|
8243
8243
|
{
|
|
8244
|
-
value:
|
|
8244
|
+
value: x || [null, null],
|
|
8245
8245
|
onChange: (V) => O(V),
|
|
8246
8246
|
calendars: 1,
|
|
8247
8247
|
disableFuture: !0,
|
|
@@ -8260,7 +8260,7 @@ const Ma = [
|
|
|
8260
8260
|
/* @__PURE__ */ e(
|
|
8261
8261
|
_r,
|
|
8262
8262
|
{
|
|
8263
|
-
value:
|
|
8263
|
+
value: R || [null, null],
|
|
8264
8264
|
onChange: (V) => Y(V),
|
|
8265
8265
|
calendars: 1,
|
|
8266
8266
|
disableFuture: !0,
|
|
@@ -8281,7 +8281,7 @@ const Ma = [
|
|
|
8281
8281
|
className: "gloss-timeframe__pin-btn",
|
|
8282
8282
|
"aria-label": "Remove comparison",
|
|
8283
8283
|
onClick: () => {
|
|
8284
|
-
|
|
8284
|
+
C(!1), i?.(!1), E(!1), f(!0), Array.isArray(x) && Promise.resolve().then(() => t(x));
|
|
8285
8285
|
},
|
|
8286
8286
|
children: /* @__PURE__ */ e(Je, { icon: /* @__PURE__ */ e(wt, { fontSize: "small" }) })
|
|
8287
8287
|
}
|
|
@@ -8442,7 +8442,7 @@ const zd = 30, Fd = { distance: 5 }, $d = {
|
|
|
8442
8442
|
renderEmptySlot: d,
|
|
8443
8443
|
configSections: c = []
|
|
8444
8444
|
}) {
|
|
8445
|
-
const [u, h] = H(null), [m, g] = H(!1), b =
|
|
8445
|
+
const [u, h] = H(null), [m, g] = H(!1), b = N((T) => {
|
|
8446
8446
|
try {
|
|
8447
8447
|
g(!0);
|
|
8448
8448
|
} catch {
|
|
@@ -8471,31 +8471,31 @@ const zd = 30, Fd = { distance: 5 }, $d = {
|
|
|
8471
8471
|
), f = Hi(
|
|
8472
8472
|
Nr(Gi, v),
|
|
8473
8473
|
Nr(Vi, { coordinateGetter: Yi })
|
|
8474
|
-
), w =
|
|
8474
|
+
), w = N((T) => {
|
|
8475
8475
|
g(!1), h(String(T.active.id));
|
|
8476
|
-
}, []), E =
|
|
8477
|
-
const { active:
|
|
8478
|
-
if (g(!1), h(null), !P ||
|
|
8479
|
-
const O = r.indexOf(String(
|
|
8476
|
+
}, []), E = N((T) => {
|
|
8477
|
+
const { active: z, over: P } = T;
|
|
8478
|
+
if (g(!1), h(null), !P || z.id === P.id) return;
|
|
8479
|
+
const O = r.indexOf(String(z.id)), Y = r.indexOf(String(P.id));
|
|
8480
8480
|
O === -1 || Y === -1 || s(Ui(r, O, Y));
|
|
8481
|
-
}, [r, s]), S =
|
|
8481
|
+
}, [r, s]), S = N(() => {
|
|
8482
8482
|
g(!1), h(null);
|
|
8483
|
-
}, []),
|
|
8484
|
-
const T = n.currentPage *
|
|
8485
|
-
return
|
|
8486
|
-
}, [t, r, n.currentPage,
|
|
8483
|
+
}, []), C = n.columns * n.maxRows, I = Q(() => {
|
|
8484
|
+
const T = n.currentPage * C, z = r.slice(T, T + C), P = new Map(t.map((O) => [O.id, O]));
|
|
8485
|
+
return z.map((O) => P.get(O)).filter((O) => O !== void 0);
|
|
8486
|
+
}, [t, r, n.currentPage, C]), p = Q(() => I.reduce((T, z) => T + z.colSpan, 0), [I]), M = Math.max(0, C - p), k = Q(() => u ? t.find((T) => T.id === u) ?? null : null, [u, t]), D = Q(() => {
|
|
8487
8487
|
if (!_) return null;
|
|
8488
8488
|
const T = I.findIndex((j) => j.id === _);
|
|
8489
8489
|
if (T === -1) return null;
|
|
8490
|
-
const
|
|
8491
|
-
if (
|
|
8492
|
-
const P =
|
|
8493
|
-
return { activeIndex: T, extrudeIndex:
|
|
8494
|
-
}, [_, I, n.columns]),
|
|
8490
|
+
const z = Bd(T, I.length, n.columns);
|
|
8491
|
+
if (z === null) return null;
|
|
8492
|
+
const P = z >= I.length, O = !P, Y = O ? I[z]?.id ?? null : null;
|
|
8493
|
+
return { activeIndex: T, extrudeIndex: z, isEmptySlot: P, isDimCover: O, dimCoverId: Y };
|
|
8494
|
+
}, [_, I, n.columns]), x = Q(() => ({
|
|
8495
8495
|
gridTemplateColumns: `repeat(${n.columns}, 1fr)`,
|
|
8496
8496
|
gridAutoRows: `${n.rowHeight}px`,
|
|
8497
8497
|
gap: `${n.gap}px`
|
|
8498
|
-
}), [n.columns, n.rowHeight, n.gap]),
|
|
8498
|
+
}), [n.columns, n.rowHeight, n.gap]), R = !!(_ && D && c.length > 0);
|
|
8499
8499
|
return /* @__PURE__ */ o(be, { className: `gloss-grid${m ? " gloss-grid--armed" : ""}`, children: [
|
|
8500
8500
|
/* @__PURE__ */ o(
|
|
8501
8501
|
Wi,
|
|
@@ -8512,8 +8512,8 @@ const zd = 30, Fd = { distance: 5 }, $d = {
|
|
|
8512
8512
|
{
|
|
8513
8513
|
items: I.map((T) => T.id),
|
|
8514
8514
|
strategy: qi,
|
|
8515
|
-
children: /* @__PURE__ */ o("div", { className: "gloss-grid__container", style:
|
|
8516
|
-
/* @__PURE__ */ e(ma, { mode: "popLayout", children: I.map((T,
|
|
8515
|
+
children: /* @__PURE__ */ o("div", { className: "gloss-grid__container", style: x, children: [
|
|
8516
|
+
/* @__PURE__ */ e(ma, { mode: "popLayout", children: I.map((T, z) => {
|
|
8517
8517
|
const P = D?.isDimCover === !0 && D.dimCoverId === T.id;
|
|
8518
8518
|
return /* @__PURE__ */ e(
|
|
8519
8519
|
vt.div,
|
|
@@ -8524,14 +8524,14 @@ const zd = 30, Fd = { distance: 5 }, $d = {
|
|
|
8524
8524
|
exit: Gd,
|
|
8525
8525
|
transition: {
|
|
8526
8526
|
...Vd,
|
|
8527
|
-
delay:
|
|
8527
|
+
delay: z * 0.03
|
|
8528
8528
|
},
|
|
8529
8529
|
children: /* @__PURE__ */ e(
|
|
8530
8530
|
Ad,
|
|
8531
8531
|
{
|
|
8532
8532
|
id: T.id,
|
|
8533
8533
|
colSpan: T.colSpan,
|
|
8534
|
-
staggerDelay: `${
|
|
8534
|
+
staggerDelay: `${z * zd}ms`,
|
|
8535
8535
|
dimCover: P,
|
|
8536
8536
|
children: i(T)
|
|
8537
8537
|
}
|
|
@@ -8540,9 +8540,9 @@ const zd = 30, Fd = { distance: 5 }, $d = {
|
|
|
8540
8540
|
T.id
|
|
8541
8541
|
);
|
|
8542
8542
|
}) }),
|
|
8543
|
-
d && Array.from({ length: M }, (T,
|
|
8544
|
-
/* @__PURE__ */ e(ma, { children:
|
|
8545
|
-
const T = D.extrudeIndex % n.columns + 1,
|
|
8543
|
+
d && Array.from({ length: M }, (T, z) => /* @__PURE__ */ e("div", { className: "gloss-grid__empty-slot", children: d(p + z) }, `empty-${z}`)),
|
|
8544
|
+
/* @__PURE__ */ e(ma, { children: R && D && (() => {
|
|
8545
|
+
const T = D.extrudeIndex % n.columns + 1, z = Math.floor(D.extrudeIndex / n.columns) + 1;
|
|
8546
8546
|
return /* @__PURE__ */ e(
|
|
8547
8547
|
vt.div,
|
|
8548
8548
|
{
|
|
@@ -8555,7 +8555,7 @@ const zd = 30, Fd = { distance: 5 }, $d = {
|
|
|
8555
8555
|
// Grid placement: pin to computed extrude slot. No
|
|
8556
8556
|
// width/height animation (AN-01 — transform+opacity only).
|
|
8557
8557
|
gridColumnStart: T,
|
|
8558
|
-
gridRowStart:
|
|
8558
|
+
gridRowStart: z,
|
|
8559
8559
|
gridColumn: `${T} / span 1`
|
|
8560
8560
|
},
|
|
8561
8561
|
children: /* @__PURE__ */ e(
|
|
@@ -8573,14 +8573,14 @@ const zd = 30, Fd = { distance: 5 }, $d = {
|
|
|
8573
8573
|
] })
|
|
8574
8574
|
}
|
|
8575
8575
|
),
|
|
8576
|
-
(m ||
|
|
8576
|
+
(m || k) && /* @__PURE__ */ e(
|
|
8577
8577
|
Ki,
|
|
8578
8578
|
{
|
|
8579
8579
|
dropAnimation: {
|
|
8580
8580
|
duration: 200,
|
|
8581
8581
|
easing: "cubic-bezier(0.22, 1, 0.36, 1)"
|
|
8582
8582
|
},
|
|
8583
|
-
children:
|
|
8583
|
+
children: k ? /* @__PURE__ */ e("div", { className: "gloss-grid__drag-overlay", children: i(k) }) : null
|
|
8584
8584
|
}
|
|
8585
8585
|
)
|
|
8586
8586
|
]
|
|
@@ -8606,12 +8606,12 @@ const jd = ve.memo(function({
|
|
|
8606
8606
|
renderTabContent: i,
|
|
8607
8607
|
actions: d
|
|
8608
8608
|
}) {
|
|
8609
|
-
const c =
|
|
8609
|
+
const c = N(
|
|
8610
8610
|
(m, g) => {
|
|
8611
8611
|
n(g);
|
|
8612
8612
|
},
|
|
8613
8613
|
[n]
|
|
8614
|
-
), u =
|
|
8614
|
+
), u = N(
|
|
8615
8615
|
(m, g) => {
|
|
8616
8616
|
m.stopPropagation(), s(g);
|
|
8617
8617
|
},
|
|
@@ -9138,26 +9138,26 @@ const Sn = ({
|
|
|
9138
9138
|
status: w,
|
|
9139
9139
|
helperText: E,
|
|
9140
9140
|
required: S,
|
|
9141
|
-
disabled:
|
|
9141
|
+
disabled: C,
|
|
9142
9142
|
name: I,
|
|
9143
9143
|
id: p,
|
|
9144
9144
|
className: M,
|
|
9145
|
-
autoComplete:
|
|
9145
|
+
autoComplete: k
|
|
9146
9146
|
}) => {
|
|
9147
|
-
const D = ce(null), [
|
|
9147
|
+
const D = ce(null), [x, R] = H(m ?? ""), [T, z] = H(!1), [P, O] = H(-1), Y = ce(null), j = h !== void 0 ? h : x, A = String(j).length > 0, G = T && i && s.length > 0, W = N(
|
|
9148
9148
|
(X) => {
|
|
9149
9149
|
const ee = X.target.value;
|
|
9150
|
-
h === void 0 &&
|
|
9150
|
+
h === void 0 && R(ee), r > 0 ? (Y.current && clearTimeout(Y.current), Y.current = setTimeout(() => {
|
|
9151
9151
|
g?.(X);
|
|
9152
9152
|
}, r)) : g?.(X);
|
|
9153
9153
|
},
|
|
9154
9154
|
[h, r, g]
|
|
9155
|
-
), V =
|
|
9156
|
-
h === void 0 &&
|
|
9155
|
+
), V = N(() => {
|
|
9156
|
+
h === void 0 && R(""), g?.({
|
|
9157
9157
|
target: { value: "" },
|
|
9158
9158
|
currentTarget: { value: "" }
|
|
9159
9159
|
}), D.current?.focus();
|
|
9160
|
-
}, [h, g]), $ =
|
|
9160
|
+
}, [h, g]), $ = N(
|
|
9161
9161
|
(X) => {
|
|
9162
9162
|
if (G)
|
|
9163
9163
|
switch (X.key) {
|
|
@@ -9175,21 +9175,21 @@ const Sn = ({
|
|
|
9175
9175
|
P >= 0 && s[P] ? (X.preventDefault(), l?.(s[P]), O(-1)) : t?.(String(j));
|
|
9176
9176
|
break;
|
|
9177
9177
|
case "Escape":
|
|
9178
|
-
|
|
9178
|
+
z(!1), D.current?.blur();
|
|
9179
9179
|
break;
|
|
9180
9180
|
}
|
|
9181
9181
|
else X.key === "Enter" && t?.(String(j));
|
|
9182
9182
|
b?.(X);
|
|
9183
9183
|
},
|
|
9184
9184
|
[G, s, P, j, t, l, b]
|
|
9185
|
-
), U =
|
|
9185
|
+
), U = N(
|
|
9186
9186
|
(X) => {
|
|
9187
|
-
|
|
9187
|
+
z(!0), y?.(X);
|
|
9188
9188
|
},
|
|
9189
9189
|
[y]
|
|
9190
|
-
), q =
|
|
9190
|
+
), q = N(
|
|
9191
9191
|
(X) => {
|
|
9192
|
-
setTimeout(() =>
|
|
9192
|
+
setTimeout(() => z(!1), 150), _?.(X);
|
|
9193
9193
|
},
|
|
9194
9194
|
[_]
|
|
9195
9195
|
);
|
|
@@ -9237,10 +9237,10 @@ const Sn = ({
|
|
|
9237
9237
|
status: w === "pending" ? "default" : w,
|
|
9238
9238
|
helperText: E,
|
|
9239
9239
|
required: S,
|
|
9240
|
-
disabled:
|
|
9240
|
+
disabled: C,
|
|
9241
9241
|
name: I,
|
|
9242
9242
|
id: p,
|
|
9243
|
-
autoComplete:
|
|
9243
|
+
autoComplete: k,
|
|
9244
9244
|
leftIcon: /* @__PURE__ */ e(ye, { name: "search", size: "sm" }),
|
|
9245
9245
|
rightIcon: K
|
|
9246
9246
|
}
|
|
@@ -9305,26 +9305,26 @@ const ru = [
|
|
|
9305
9305
|
disabled: w,
|
|
9306
9306
|
name: E,
|
|
9307
9307
|
id: S,
|
|
9308
|
-
className:
|
|
9308
|
+
className: C,
|
|
9309
9309
|
autoComplete: I = "new-password"
|
|
9310
9310
|
}) => {
|
|
9311
|
-
const [p, M] = H(!1), [
|
|
9312
|
-
() => su(
|
|
9313
|
-
[
|
|
9314
|
-
), T = n ??
|
|
9311
|
+
const [p, M] = H(!1), [k, D] = H(String(h ?? "")), x = u !== void 0 ? String(u) : k, R = Q(
|
|
9312
|
+
() => su(x, s),
|
|
9313
|
+
[x, s]
|
|
9314
|
+
), T = n ?? R, z = Q(
|
|
9315
9315
|
() => s.map((W) => ({
|
|
9316
9316
|
...W,
|
|
9317
|
-
passed: W.validate(
|
|
9317
|
+
passed: W.validate(x)
|
|
9318
9318
|
})),
|
|
9319
|
-
[
|
|
9320
|
-
), P =
|
|
9319
|
+
[x, s]
|
|
9320
|
+
), P = N(
|
|
9321
9321
|
(W) => {
|
|
9322
9322
|
u === void 0 && D(W.target.value), m?.(W);
|
|
9323
9323
|
},
|
|
9324
9324
|
[u, m]
|
|
9325
|
-
), O =
|
|
9325
|
+
), O = N(() => {
|
|
9326
9326
|
M((W) => !W);
|
|
9327
|
-
}, []), Y =
|
|
9327
|
+
}, []), Y = N(() => {
|
|
9328
9328
|
const W = nu(d);
|
|
9329
9329
|
i ? i(W) : (u === void 0 && D(W), m?.({
|
|
9330
9330
|
target: { value: W },
|
|
@@ -9347,7 +9347,7 @@ const ru = [
|
|
|
9347
9347
|
{
|
|
9348
9348
|
ref: a,
|
|
9349
9349
|
type: p ? "text" : "password",
|
|
9350
|
-
value:
|
|
9350
|
+
value: x,
|
|
9351
9351
|
onChange: P,
|
|
9352
9352
|
onBlur: g,
|
|
9353
9353
|
rightIcon: /* @__PURE__ */ o("div", { className: "gloss-password-input__actions", children: [
|
|
@@ -9386,7 +9386,7 @@ const ru = [
|
|
|
9386
9386
|
autoComplete: I
|
|
9387
9387
|
}
|
|
9388
9388
|
),
|
|
9389
|
-
r &&
|
|
9389
|
+
r && x && /* @__PURE__ */ o("div", { className: "gloss-password-input__strength", children: [
|
|
9390
9390
|
/* @__PURE__ */ e("div", { className: "gloss-password-input__strength-bar", children: /* @__PURE__ */ e(
|
|
9391
9391
|
"div",
|
|
9392
9392
|
{
|
|
@@ -9406,7 +9406,7 @@ const ru = [
|
|
|
9406
9406
|
}
|
|
9407
9407
|
)
|
|
9408
9408
|
] }),
|
|
9409
|
-
c && /* @__PURE__ */ e("ul", { className: "gloss-password-input__rules", children:
|
|
9409
|
+
c && /* @__PURE__ */ e("ul", { className: "gloss-password-input__rules", children: z.map((W) => /* @__PURE__ */ o(
|
|
9410
9410
|
"li",
|
|
9411
9411
|
{
|
|
9412
9412
|
className: `gloss-password-input__rule ${W.passed ? "gloss-password-input__rule--passed" : ""}`,
|
|
@@ -9441,47 +9441,47 @@ const iu = ({
|
|
|
9441
9441
|
id: f,
|
|
9442
9442
|
name: w
|
|
9443
9443
|
}) => {
|
|
9444
|
-
const E = He(), S = f || E,
|
|
9444
|
+
const E = He(), S = f || E, C = ce(null), [I, p] = H(r), [M, k] = H(""), [D, x] = H(null), [R, T] = H(!1), [z, P] = H(-1), O = t !== void 0, Y = O ? t : I, j = M ? u.filter(
|
|
9445
9445
|
(oe) => oe.toLowerCase().includes(M.toLowerCase()) && (d || !Y.includes(oe))
|
|
9446
|
-
) : [], A =
|
|
9446
|
+
) : [], A = R && j.length > 0, G = l === void 0 || Y.length < l, W = N(
|
|
9447
9447
|
(oe) => {
|
|
9448
9448
|
O || p(oe), n?.(oe);
|
|
9449
9449
|
},
|
|
9450
9450
|
[O, n]
|
|
9451
|
-
), V =
|
|
9451
|
+
), V = N(
|
|
9452
9452
|
(oe) => {
|
|
9453
9453
|
const se = oe.trim();
|
|
9454
9454
|
if (se) {
|
|
9455
9455
|
if (!G) {
|
|
9456
|
-
|
|
9456
|
+
x(`Maximum of ${l} tags allowed`);
|
|
9457
9457
|
return;
|
|
9458
9458
|
}
|
|
9459
9459
|
if (!d && Y.includes(se)) {
|
|
9460
|
-
|
|
9460
|
+
x("Duplicate tag");
|
|
9461
9461
|
return;
|
|
9462
9462
|
}
|
|
9463
9463
|
if (i && se.length > i) {
|
|
9464
|
-
|
|
9464
|
+
x(`Tag must be ${i} characters or less`);
|
|
9465
9465
|
return;
|
|
9466
9466
|
}
|
|
9467
9467
|
if (c) {
|
|
9468
9468
|
const pe = c(se);
|
|
9469
9469
|
if (pe !== !0) {
|
|
9470
|
-
|
|
9470
|
+
x(typeof pe == "string" ? pe : "Invalid tag");
|
|
9471
9471
|
return;
|
|
9472
9472
|
}
|
|
9473
9473
|
}
|
|
9474
|
-
|
|
9474
|
+
x(null), W([...Y, se]), k(""), P(-1);
|
|
9475
9475
|
}
|
|
9476
9476
|
},
|
|
9477
9477
|
[Y, G, l, d, i, c, W]
|
|
9478
|
-
), $ =
|
|
9478
|
+
), $ = N(
|
|
9479
9479
|
(oe) => {
|
|
9480
9480
|
const se = Y.filter((pe, Ce) => Ce !== oe);
|
|
9481
|
-
W(se),
|
|
9481
|
+
W(se), x(null);
|
|
9482
9482
|
},
|
|
9483
9483
|
[Y, W]
|
|
9484
|
-
), U =
|
|
9484
|
+
), U = N(
|
|
9485
9485
|
(oe) => {
|
|
9486
9486
|
const se = oe.target.value, pe = s.filter((Ce) => Ce !== "Enter");
|
|
9487
9487
|
for (const Ce of pe)
|
|
@@ -9491,20 +9491,20 @@ const iu = ({
|
|
|
9491
9491
|
});
|
|
9492
9492
|
return;
|
|
9493
9493
|
}
|
|
9494
|
-
|
|
9494
|
+
k(se), P(-1), x(null);
|
|
9495
9495
|
},
|
|
9496
9496
|
[s, V]
|
|
9497
|
-
), q =
|
|
9497
|
+
), q = N(
|
|
9498
9498
|
(oe) => {
|
|
9499
|
-
oe.key === "Enter" ? (oe.preventDefault(), A &&
|
|
9499
|
+
oe.key === "Enter" ? (oe.preventDefault(), A && z >= 0 ? V(j[z]) : s.includes("Enter") && M.trim() && V(M)) : oe.key === "Backspace" && !M && Y.length > 0 ? $(Y.length - 1) : oe.key === "ArrowDown" && A ? (oe.preventDefault(), P(
|
|
9500
9500
|
(se) => se < j.length - 1 ? se + 1 : 0
|
|
9501
9501
|
)) : oe.key === "ArrowUp" && A ? (oe.preventDefault(), P(
|
|
9502
9502
|
(se) => se > 0 ? se - 1 : j.length - 1
|
|
9503
|
-
)) : oe.key === "Escape" && (
|
|
9503
|
+
)) : oe.key === "Escape" && (k(""), P(-1));
|
|
9504
9504
|
},
|
|
9505
9505
|
[
|
|
9506
9506
|
A,
|
|
9507
|
-
|
|
9507
|
+
z,
|
|
9508
9508
|
j,
|
|
9509
9509
|
s,
|
|
9510
9510
|
M,
|
|
@@ -9512,15 +9512,15 @@ const iu = ({
|
|
|
9512
9512
|
V,
|
|
9513
9513
|
$
|
|
9514
9514
|
]
|
|
9515
|
-
), K =
|
|
9515
|
+
), K = N(() => {
|
|
9516
9516
|
T(!0);
|
|
9517
|
-
}, []), X =
|
|
9517
|
+
}, []), X = N(() => {
|
|
9518
9518
|
setTimeout(() => T(!1), 150), M.trim() && s.includes(",") && V(M);
|
|
9519
|
-
}, [M, s, V]), ee =
|
|
9520
|
-
|
|
9521
|
-
}, []), ge =
|
|
9519
|
+
}, [M, s, V]), ee = N(() => {
|
|
9520
|
+
C.current?.focus();
|
|
9521
|
+
}, []), ge = N(
|
|
9522
9522
|
(oe) => {
|
|
9523
|
-
V(oe),
|
|
9523
|
+
V(oe), C.current?.focus();
|
|
9524
9524
|
},
|
|
9525
9525
|
[V]
|
|
9526
9526
|
), ne = [
|
|
@@ -9530,7 +9530,7 @@ const iu = ({
|
|
|
9530
9530
|
"gloss-tag-input",
|
|
9531
9531
|
`gloss-tag-input--${_}`,
|
|
9532
9532
|
y !== "default" && `gloss-tag-input--${y}`,
|
|
9533
|
-
|
|
9533
|
+
R && "gloss-tag-input--focused",
|
|
9534
9534
|
m && "gloss-tag-input--disabled",
|
|
9535
9535
|
D && "gloss-tag-input--error",
|
|
9536
9536
|
v
|
|
@@ -9560,7 +9560,7 @@ const iu = ({
|
|
|
9560
9560
|
"input",
|
|
9561
9561
|
{
|
|
9562
9562
|
ref: (oe) => {
|
|
9563
|
-
|
|
9563
|
+
C.current = oe, typeof a == "function" ? a(oe) : a && (a.current = oe);
|
|
9564
9564
|
},
|
|
9565
9565
|
id: S,
|
|
9566
9566
|
type: "text",
|
|
@@ -9580,8 +9580,8 @@ const iu = ({
|
|
|
9580
9580
|
"li",
|
|
9581
9581
|
{
|
|
9582
9582
|
role: "option",
|
|
9583
|
-
"aria-selected": se ===
|
|
9584
|
-
className: `gloss-tag-input__suggestion ${se ===
|
|
9583
|
+
"aria-selected": se === z,
|
|
9584
|
+
className: `gloss-tag-input__suggestion ${se === z ? "gloss-tag-input__suggestion--selected" : ""}`,
|
|
9585
9585
|
onClick: () => ge(oe),
|
|
9586
9586
|
children: oe
|
|
9587
9587
|
},
|
|
@@ -9661,37 +9661,37 @@ const lu = [
|
|
|
9661
9661
|
const f = He(), w = v || f, E = l.find((V) => V.code === s) || l[0], S = Q(
|
|
9662
9662
|
() => $r(t || r || "", l),
|
|
9663
9663
|
[]
|
|
9664
|
-
), [
|
|
9664
|
+
), [C, I] = H(
|
|
9665
9665
|
S.country || E
|
|
9666
9666
|
), [p, M] = H(
|
|
9667
9667
|
S.nationalNumber
|
|
9668
|
-
), [
|
|
9669
|
-
() =>
|
|
9670
|
-
[
|
|
9671
|
-
), T =
|
|
9668
|
+
), [k, D] = H(!1), x = t !== void 0, R = Q(
|
|
9669
|
+
() => x ? $r(t || "", l) : null,
|
|
9670
|
+
[x, t, l]
|
|
9671
|
+
), T = R?.country || C, z = R?.nationalNumber || p, P = ou(z, T.format), O = N(
|
|
9672
9672
|
(V, $) => {
|
|
9673
9673
|
const U = Or($);
|
|
9674
9674
|
return U ? `${V.dialCode}${U}` : "";
|
|
9675
9675
|
},
|
|
9676
9676
|
[]
|
|
9677
|
-
), Y =
|
|
9677
|
+
), Y = N(
|
|
9678
9678
|
(V) => {
|
|
9679
9679
|
const $ = V.target.value, U = Or($);
|
|
9680
|
-
|
|
9680
|
+
x || M(U);
|
|
9681
9681
|
const q = O(T, U);
|
|
9682
9682
|
n?.(q);
|
|
9683
9683
|
},
|
|
9684
|
-
[
|
|
9685
|
-
), j =
|
|
9684
|
+
[x, T, O, n]
|
|
9685
|
+
), j = N(
|
|
9686
9686
|
(V) => {
|
|
9687
|
-
|
|
9688
|
-
const $ = O(V,
|
|
9687
|
+
x || I(V);
|
|
9688
|
+
const $ = O(V, z);
|
|
9689
9689
|
n?.($), D(!1);
|
|
9690
9690
|
},
|
|
9691
|
-
[
|
|
9692
|
-
), A =
|
|
9691
|
+
[x, z, O, n]
|
|
9692
|
+
), A = N(() => {
|
|
9693
9693
|
b || D((V) => !V);
|
|
9694
|
-
}, [b]), G =
|
|
9694
|
+
}, [b]), G = N(() => {
|
|
9695
9695
|
setTimeout(() => D(!1), 150);
|
|
9696
9696
|
}, []), W = i ? /* @__PURE__ */ o(
|
|
9697
9697
|
"button",
|
|
@@ -9702,7 +9702,7 @@ const lu = [
|
|
|
9702
9702
|
onBlur: G,
|
|
9703
9703
|
disabled: b,
|
|
9704
9704
|
"aria-label": "Select country",
|
|
9705
|
-
"aria-expanded":
|
|
9705
|
+
"aria-expanded": k,
|
|
9706
9706
|
children: [
|
|
9707
9707
|
/* @__PURE__ */ e("span", { className: "gloss-phone-input__country-flag", children: T.code }),
|
|
9708
9708
|
/* @__PURE__ */ e("span", { className: "gloss-phone-input__dial-code", children: T.dialCode }),
|
|
@@ -9715,7 +9715,7 @@ const lu = [
|
|
|
9715
9715
|
/* @__PURE__ */ o("div", { className: "gloss-phone-input", children: [
|
|
9716
9716
|
/* @__PURE__ */ o("div", { className: "gloss-phone-input__country", children: [
|
|
9717
9717
|
W,
|
|
9718
|
-
|
|
9718
|
+
k && /* @__PURE__ */ e("ul", { className: "gloss-phone-input__dropdown", role: "listbox", children: l.map((V) => /* @__PURE__ */ o(
|
|
9719
9719
|
"li",
|
|
9720
9720
|
{
|
|
9721
9721
|
role: "option",
|
|
@@ -9854,73 +9854,73 @@ function kn(a) {
|
|
|
9854
9854
|
disabled: _ = !1,
|
|
9855
9855
|
size: v = "md",
|
|
9856
9856
|
className: f
|
|
9857
|
-
} = a, [w, E] = H(""), [S,
|
|
9857
|
+
} = a, [w, E] = H(""), [S, C] = H(!1), [I, p] = H(-1), M = ce(null), k = ce(null), D = ce(null);
|
|
9858
9858
|
le(() => {
|
|
9859
9859
|
r != null && E(s(r));
|
|
9860
9860
|
}, [r, s]);
|
|
9861
|
-
const
|
|
9861
|
+
const x = Q(() => {
|
|
9862
9862
|
if (l || !w) return t;
|
|
9863
9863
|
const A = w.toLowerCase();
|
|
9864
9864
|
return t.filter(
|
|
9865
9865
|
(G) => s(G).toLowerCase().includes(A)
|
|
9866
9866
|
);
|
|
9867
|
-
}, [t, w, l, s]),
|
|
9867
|
+
}, [t, w, l, s]), R = N(
|
|
9868
9868
|
(A) => {
|
|
9869
9869
|
const G = A.target.value;
|
|
9870
|
-
E(G),
|
|
9870
|
+
E(G), C(!0), p(-1), l && (k.current && clearTimeout(k.current), k.current = setTimeout(() => {
|
|
9871
9871
|
l(G);
|
|
9872
9872
|
}, 300));
|
|
9873
9873
|
},
|
|
9874
9874
|
[l]
|
|
9875
|
-
), T =
|
|
9875
|
+
), T = N(
|
|
9876
9876
|
(A) => {
|
|
9877
|
-
E(s(A)),
|
|
9877
|
+
E(s(A)), C(!1), p(-1), n?.(A);
|
|
9878
9878
|
},
|
|
9879
9879
|
[s, n]
|
|
9880
|
-
),
|
|
9880
|
+
), z = N(
|
|
9881
9881
|
(A) => {
|
|
9882
9882
|
if (!S) {
|
|
9883
|
-
(A.key === "ArrowDown" || A.key === "ArrowUp") && (A.preventDefault(),
|
|
9883
|
+
(A.key === "ArrowDown" || A.key === "ArrowUp") && (A.preventDefault(), C(!0));
|
|
9884
9884
|
return;
|
|
9885
9885
|
}
|
|
9886
9886
|
switch (A.key) {
|
|
9887
9887
|
case "ArrowDown":
|
|
9888
9888
|
A.preventDefault(), p(
|
|
9889
|
-
(G) => G <
|
|
9889
|
+
(G) => G < x.length - 1 ? G + 1 : 0
|
|
9890
9890
|
);
|
|
9891
9891
|
break;
|
|
9892
9892
|
case "ArrowUp":
|
|
9893
9893
|
A.preventDefault(), p(
|
|
9894
|
-
(G) => G > 0 ? G - 1 :
|
|
9894
|
+
(G) => G > 0 ? G - 1 : x.length - 1
|
|
9895
9895
|
);
|
|
9896
9896
|
break;
|
|
9897
9897
|
case "Enter":
|
|
9898
|
-
A.preventDefault(), I >= 0 &&
|
|
9898
|
+
A.preventDefault(), I >= 0 && x[I] && T(x[I]);
|
|
9899
9899
|
break;
|
|
9900
9900
|
case "Escape":
|
|
9901
|
-
A.preventDefault(),
|
|
9901
|
+
A.preventDefault(), C(!1), p(-1);
|
|
9902
9902
|
break;
|
|
9903
9903
|
}
|
|
9904
9904
|
},
|
|
9905
|
-
[S,
|
|
9905
|
+
[S, x, I, T]
|
|
9906
9906
|
);
|
|
9907
9907
|
le(() => {
|
|
9908
9908
|
I >= 0 && D.current && D.current.querySelectorAll('[role="option"]')[I]?.scrollIntoView({ block: "nearest" });
|
|
9909
9909
|
}, [I]), le(() => () => {
|
|
9910
|
-
|
|
9910
|
+
k.current && clearTimeout(k.current);
|
|
9911
9911
|
}, []);
|
|
9912
|
-
const P =
|
|
9913
|
-
|
|
9914
|
-
}, []), O =
|
|
9915
|
-
|
|
9916
|
-
}, []), Y = S && (
|
|
9912
|
+
const P = N(() => {
|
|
9913
|
+
C(!0);
|
|
9914
|
+
}, []), O = N(() => {
|
|
9915
|
+
C(!1), p(-1);
|
|
9916
|
+
}, []), Y = S && (x.length > 0 || y || x.length === 0), j = ["gloss-autocomplete", f].filter(Boolean).join(" ");
|
|
9917
9917
|
return /* @__PURE__ */ o("div", { className: j, ref: M, children: [
|
|
9918
9918
|
/* @__PURE__ */ e(
|
|
9919
9919
|
Pe,
|
|
9920
9920
|
{
|
|
9921
9921
|
value: w,
|
|
9922
|
-
onChange:
|
|
9923
|
-
onKeyDown:
|
|
9922
|
+
onChange: R,
|
|
9923
|
+
onKeyDown: z,
|
|
9924
9924
|
onFocus: P,
|
|
9925
9925
|
placeholder: u,
|
|
9926
9926
|
label: h,
|
|
@@ -9942,13 +9942,13 @@ function kn(a) {
|
|
|
9942
9942
|
onDismiss: O,
|
|
9943
9943
|
anchorRef: M,
|
|
9944
9944
|
placement: "bottom-start",
|
|
9945
|
-
children: y ? c ?? /* @__PURE__ */ e(mu, {}) :
|
|
9945
|
+
children: y ? c ?? /* @__PURE__ */ e(mu, {}) : x.length === 0 ? d : /* @__PURE__ */ e(
|
|
9946
9946
|
"ul",
|
|
9947
9947
|
{
|
|
9948
9948
|
ref: D,
|
|
9949
9949
|
className: "gloss-autocomplete__results",
|
|
9950
9950
|
role: "listbox",
|
|
9951
|
-
children:
|
|
9951
|
+
children: x.map((A, G) => {
|
|
9952
9952
|
const W = G === I;
|
|
9953
9953
|
return /* @__PURE__ */ e(
|
|
9954
9954
|
"li",
|
|
@@ -9993,40 +9993,40 @@ function wn(a) {
|
|
|
9993
9993
|
maxSelected: y,
|
|
9994
9994
|
searchable: _ = !1,
|
|
9995
9995
|
className: v
|
|
9996
|
-
} = a, [f, w] = H(!1), [E, S] = H(""), [
|
|
9996
|
+
} = a, [f, w] = H(!1), [E, S] = H(""), [C, I] = H(-1), p = ce(null), M = ce(null), k = ce(null), D = Q(
|
|
9997
9997
|
() => t.filter((G) => r.includes(G.value)),
|
|
9998
9998
|
[t, r]
|
|
9999
|
-
),
|
|
9999
|
+
), x = Q(() => {
|
|
10000
10000
|
if (!E) return t;
|
|
10001
10001
|
const G = E.toLowerCase();
|
|
10002
10002
|
return t.filter((W) => W.label.toLowerCase().includes(G));
|
|
10003
|
-
}, [t, E]),
|
|
10003
|
+
}, [t, E]), R = y != null && r.length >= y, T = N(
|
|
10004
10004
|
(G) => {
|
|
10005
|
-
r.includes(G) ? n(r.filter((V) => V !== G)) :
|
|
10005
|
+
r.includes(G) ? n(r.filter((V) => V !== G)) : R || n([...r, G]);
|
|
10006
10006
|
},
|
|
10007
|
-
[r, n,
|
|
10008
|
-
),
|
|
10007
|
+
[r, n, R]
|
|
10008
|
+
), z = N(
|
|
10009
10009
|
(G) => {
|
|
10010
10010
|
n(r.filter((W) => W !== G));
|
|
10011
10011
|
},
|
|
10012
10012
|
[r, n]
|
|
10013
|
-
), P =
|
|
10013
|
+
), P = N(
|
|
10014
10014
|
(G) => {
|
|
10015
10015
|
if (!g)
|
|
10016
10016
|
switch (G.key) {
|
|
10017
10017
|
case "ArrowDown":
|
|
10018
10018
|
G.preventDefault(), f ? I(
|
|
10019
|
-
(W) => W <
|
|
10019
|
+
(W) => W < x.length - 1 ? W + 1 : 0
|
|
10020
10020
|
) : (w(!0), I(0));
|
|
10021
10021
|
break;
|
|
10022
10022
|
case "ArrowUp":
|
|
10023
10023
|
G.preventDefault(), f && I(
|
|
10024
|
-
(W) => W > 0 ? W - 1 :
|
|
10024
|
+
(W) => W > 0 ? W - 1 : x.length - 1
|
|
10025
10025
|
);
|
|
10026
10026
|
break;
|
|
10027
10027
|
case "Enter":
|
|
10028
|
-
if (G.preventDefault(), f &&
|
|
10029
|
-
const W = C
|
|
10028
|
+
if (G.preventDefault(), f && C >= 0 && x[C]) {
|
|
10029
|
+
const W = x[C];
|
|
10030
10030
|
W.disabled || T(W.value);
|
|
10031
10031
|
} else f || w(!0);
|
|
10032
10032
|
break;
|
|
@@ -10034,22 +10034,22 @@ function wn(a) {
|
|
|
10034
10034
|
G.preventDefault(), w(!1), I(-1);
|
|
10035
10035
|
break;
|
|
10036
10036
|
case "Backspace":
|
|
10037
|
-
_ && E === "" && r.length > 0 &&
|
|
10037
|
+
_ && E === "" && r.length > 0 && z(r[r.length - 1]);
|
|
10038
10038
|
break;
|
|
10039
10039
|
}
|
|
10040
10040
|
},
|
|
10041
|
-
[g, f,
|
|
10041
|
+
[g, f, x, C, T, _, E, r, z]
|
|
10042
10042
|
);
|
|
10043
10043
|
le(() => {
|
|
10044
|
-
|
|
10045
|
-
}, [
|
|
10044
|
+
C >= 0 && k.current && k.current.querySelectorAll('[role="option"]')[C]?.scrollIntoView({ block: "nearest" });
|
|
10045
|
+
}, [C]), le(() => {
|
|
10046
10046
|
f && _ && M.current && M.current.focus();
|
|
10047
10047
|
}, [f, _]), le(() => {
|
|
10048
10048
|
f || (S(""), I(-1));
|
|
10049
10049
|
}, [f]);
|
|
10050
|
-
const O =
|
|
10050
|
+
const O = N(() => {
|
|
10051
10051
|
g || w((G) => !G);
|
|
10052
|
-
}, [g]), Y =
|
|
10052
|
+
}, [g]), Y = N(() => {
|
|
10053
10053
|
w(!1);
|
|
10054
10054
|
}, []), j = [
|
|
10055
10055
|
"gloss-multi-select",
|
|
@@ -10077,12 +10077,12 @@ function wn(a) {
|
|
|
10077
10077
|
"aria-haspopup": "listbox",
|
|
10078
10078
|
"aria-disabled": g || void 0,
|
|
10079
10079
|
children: [
|
|
10080
|
-
D.map((G) => /* @__PURE__ */ e("span", { className: "gloss-multi-select__tag", children: s ? s(G, () =>
|
|
10080
|
+
D.map((G) => /* @__PURE__ */ e("span", { className: "gloss-multi-select__tag", children: s ? s(G, () => z(G.value)) : /* @__PURE__ */ e(
|
|
10081
10081
|
Ka,
|
|
10082
10082
|
{
|
|
10083
10083
|
size: b === "lg" ? "md" : "sm",
|
|
10084
10084
|
variant: "outlined",
|
|
10085
|
-
onDelete: g ? void 0 : () =>
|
|
10085
|
+
onDelete: g ? void 0 : () => z(G.value),
|
|
10086
10086
|
children: G.label
|
|
10087
10087
|
}
|
|
10088
10088
|
) }, G.value)),
|
|
@@ -10128,15 +10128,15 @@ function wn(a) {
|
|
|
10128
10128
|
onDismiss: Y,
|
|
10129
10129
|
anchorRef: p,
|
|
10130
10130
|
placement: "bottom-start",
|
|
10131
|
-
children:
|
|
10131
|
+
children: x.length === 0 ? i : /* @__PURE__ */ e(
|
|
10132
10132
|
"ul",
|
|
10133
10133
|
{
|
|
10134
|
-
ref:
|
|
10134
|
+
ref: k,
|
|
10135
10135
|
className: "gloss-multi-select__dropdown",
|
|
10136
10136
|
role: "listbox",
|
|
10137
10137
|
"aria-multiselectable": "true",
|
|
10138
|
-
children:
|
|
10139
|
-
const V = r.includes(G.value), $ = W ===
|
|
10138
|
+
children: x.map((G, W) => {
|
|
10139
|
+
const V = r.includes(G.value), $ = W === C, U = G.disabled || R && !V;
|
|
10140
10140
|
return /* @__PURE__ */ e(
|
|
10141
10141
|
"li",
|
|
10142
10142
|
{
|
|
@@ -10315,7 +10315,7 @@ function Xa(a) {
|
|
|
10315
10315
|
onPageChange: w,
|
|
10316
10316
|
loading: E = !1,
|
|
10317
10317
|
striped: S = !1,
|
|
10318
|
-
className:
|
|
10318
|
+
className: C
|
|
10319
10319
|
} = a, I = Q(
|
|
10320
10320
|
() => r.map((P) => String(P[n])),
|
|
10321
10321
|
[r, n]
|
|
@@ -10325,24 +10325,24 @@ function Xa(a) {
|
|
|
10325
10325
|
), M = Q(
|
|
10326
10326
|
() => h != null && I.some((P) => h.has(P)),
|
|
10327
10327
|
[h, I]
|
|
10328
|
-
),
|
|
10328
|
+
), k = N(() => {
|
|
10329
10329
|
m && m(p ? /* @__PURE__ */ new Set() : new Set(I));
|
|
10330
|
-
}, [p, I, m]), D =
|
|
10330
|
+
}, [p, I, m]), D = N(
|
|
10331
10331
|
(P) => {
|
|
10332
10332
|
if (!m || !h) return;
|
|
10333
10333
|
const O = new Set(h);
|
|
10334
10334
|
O.has(P) ? O.delete(P) : O.add(P), m(O);
|
|
10335
10335
|
},
|
|
10336
10336
|
[h, m]
|
|
10337
|
-
),
|
|
10337
|
+
), x = N(
|
|
10338
10338
|
(P) => {
|
|
10339
10339
|
if (!y) return;
|
|
10340
10340
|
let O = "asc";
|
|
10341
10341
|
g === P && b === "asc" && (O = "desc"), y(P, O);
|
|
10342
10342
|
},
|
|
10343
10343
|
[g, b, y]
|
|
10344
|
-
),
|
|
10345
|
-
return /* @__PURE__ */ o("div", { className:
|
|
10344
|
+
), R = Q(() => f != null && v != null && v > 0 ? Math.ceil(f / v) : 1, [f, v]), T = _ != null && v != null && f != null && w != null, z = ["gloss-data-table", C].filter(Boolean).join(" ");
|
|
10345
|
+
return /* @__PURE__ */ o("div", { className: z, children: [
|
|
10346
10346
|
/* @__PURE__ */ o("table", { className: "gloss-data-table__table", children: [
|
|
10347
10347
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ o("tr", { children: [
|
|
10348
10348
|
u && /* @__PURE__ */ e("th", { className: "gloss-data-table__header-cell gloss-data-table__header-cell--checkbox", children: /* @__PURE__ */ e(
|
|
@@ -10350,7 +10350,7 @@ function Xa(a) {
|
|
|
10350
10350
|
{
|
|
10351
10351
|
checked: p,
|
|
10352
10352
|
indeterminate: M && !p,
|
|
10353
|
-
onChange:
|
|
10353
|
+
onChange: k,
|
|
10354
10354
|
size: "sm"
|
|
10355
10355
|
}
|
|
10356
10356
|
) }),
|
|
@@ -10366,8 +10366,8 @@ function Xa(a) {
|
|
|
10366
10366
|
{
|
|
10367
10367
|
className: Y,
|
|
10368
10368
|
style: P.width ? { width: P.width } : void 0,
|
|
10369
|
-
onClick: P.sortable ? () =>
|
|
10370
|
-
"aria-sort": O ? b : void 0,
|
|
10369
|
+
onClick: P.sortable ? () => x(P.key) : void 0,
|
|
10370
|
+
"aria-sort": O ? b === "asc" ? "ascending" : "descending" : void 0,
|
|
10371
10371
|
children: s ? s(P) : /* @__PURE__ */ o("span", { className: "gloss-data-table__header-content", children: [
|
|
10372
10372
|
P.header,
|
|
10373
10373
|
P.sortable && /* @__PURE__ */ e(
|
|
@@ -10454,7 +10454,7 @@ function Xa(a) {
|
|
|
10454
10454
|
"Page ",
|
|
10455
10455
|
_,
|
|
10456
10456
|
" of ",
|
|
10457
|
-
|
|
10457
|
+
R
|
|
10458
10458
|
] }),
|
|
10459
10459
|
/* @__PURE__ */ o("div", { className: "gloss-data-table__page-controls", children: [
|
|
10460
10460
|
/* @__PURE__ */ e(
|
|
@@ -10472,7 +10472,7 @@ function Xa(a) {
|
|
|
10472
10472
|
{
|
|
10473
10473
|
variant: "outline",
|
|
10474
10474
|
size: "sm",
|
|
10475
|
-
disabled: _ >=
|
|
10475
|
+
disabled: _ >= R,
|
|
10476
10476
|
onClick: () => w(_ + 1),
|
|
10477
10477
|
children: "Next"
|
|
10478
10478
|
}
|
|
@@ -10842,9 +10842,9 @@ function Dn(a) {
|
|
|
10842
10842
|
actionSlot: d,
|
|
10843
10843
|
orientation: c = "horizontal",
|
|
10844
10844
|
className: u
|
|
10845
|
-
} = a, h = r === 0, m = r === t.length - 1, g =
|
|
10845
|
+
} = a, h = r === 0, m = r === t.length - 1, g = N(async () => {
|
|
10846
10846
|
s && (n && !await n(r) || r < t.length - 1 && s(r + 1));
|
|
10847
|
-
}, [r, t.length, s, n]), b =
|
|
10847
|
+
}, [r, t.length, s, n]), b = N(() => {
|
|
10848
10848
|
s && r > 0 && s(r - 1);
|
|
10849
10849
|
}, [r, s]), y = (v) => v < r ? "completed" : v === r ? "active" : "upcoming", _ = [
|
|
10850
10850
|
"gloss-stepper",
|
|
@@ -10974,43 +10974,43 @@ function np({
|
|
|
10974
10974
|
email: h.email ?? "",
|
|
10975
10975
|
password: h.password ?? "",
|
|
10976
10976
|
rememberMe: h.rememberMe ?? !1
|
|
10977
|
-
}), [v, f] = H({}), [w, E] = H({}), S =
|
|
10977
|
+
}), [v, f] = H({}), [w, E] = H({}), S = N((k, D) => {
|
|
10978
10978
|
try {
|
|
10979
|
-
Lr.shape[
|
|
10980
|
-
} catch (
|
|
10981
|
-
|
|
10979
|
+
Lr.shape[k].parse(D), f((R) => ({ ...R, [k]: void 0 }));
|
|
10980
|
+
} catch (x) {
|
|
10981
|
+
x instanceof he.ZodError && f((R) => ({ ...R, [k]: x.issues[0]?.message }));
|
|
10982
10982
|
}
|
|
10983
|
-
}, []),
|
|
10984
|
-
(
|
|
10985
|
-
_((
|
|
10983
|
+
}, []), C = N(
|
|
10984
|
+
(k) => (D) => {
|
|
10985
|
+
_((x) => ({ ...x, [k]: D })), w[k] && S(k, D);
|
|
10986
10986
|
},
|
|
10987
10987
|
[w, S]
|
|
10988
|
-
), I =
|
|
10989
|
-
(
|
|
10990
|
-
E((D) => ({ ...D, [
|
|
10988
|
+
), I = N(
|
|
10989
|
+
(k) => () => {
|
|
10990
|
+
E((D) => ({ ...D, [k]: !0 })), S(k, y[k]);
|
|
10991
10991
|
},
|
|
10992
10992
|
[y, S]
|
|
10993
|
-
), p =
|
|
10994
|
-
async (
|
|
10995
|
-
if (
|
|
10996
|
-
g(new FormData(
|
|
10993
|
+
), p = N(
|
|
10994
|
+
async (k) => {
|
|
10995
|
+
if (k.preventDefault(), g) {
|
|
10996
|
+
g(new FormData(k.currentTarget));
|
|
10997
10997
|
return;
|
|
10998
10998
|
}
|
|
10999
10999
|
const D = Lr.safeParse(y);
|
|
11000
11000
|
if (!D.success) {
|
|
11001
|
-
const
|
|
11002
|
-
D.error.issues.forEach((
|
|
11003
|
-
const T =
|
|
11004
|
-
|
|
11005
|
-
}), f(
|
|
11001
|
+
const x = {};
|
|
11002
|
+
D.error.issues.forEach((R) => {
|
|
11003
|
+
const T = R.path[0];
|
|
11004
|
+
x[T] || (x[T] = R.message);
|
|
11005
|
+
}), f(x), E({ email: !0, password: !0 });
|
|
11006
11006
|
return;
|
|
11007
11007
|
}
|
|
11008
11008
|
await m?.(D.data);
|
|
11009
11009
|
},
|
|
11010
11010
|
[y, m, g]
|
|
11011
|
-
), M =
|
|
11012
|
-
(
|
|
11013
|
-
b && (
|
|
11011
|
+
), M = N(
|
|
11012
|
+
(k) => {
|
|
11013
|
+
b && (k.preventDefault(), b());
|
|
11014
11014
|
},
|
|
11015
11015
|
[b]
|
|
11016
11016
|
);
|
|
@@ -11028,7 +11028,7 @@ function np({
|
|
|
11028
11028
|
type: "email",
|
|
11029
11029
|
placeholder: "name@company.com",
|
|
11030
11030
|
value: y.email,
|
|
11031
|
-
onChange: (
|
|
11031
|
+
onChange: (k) => C("email")(k.target.value),
|
|
11032
11032
|
onBlur: I("email"),
|
|
11033
11033
|
status: v.email ? "error" : void 0,
|
|
11034
11034
|
disabled: u || c
|
|
@@ -11055,7 +11055,7 @@ function np({
|
|
|
11055
11055
|
showToggle: !0,
|
|
11056
11056
|
placeholder: "Enter your password",
|
|
11057
11057
|
value: y.password,
|
|
11058
|
-
onChange: (
|
|
11058
|
+
onChange: (k) => C("password")(k.target.value),
|
|
11059
11059
|
onBlur: I("password"),
|
|
11060
11060
|
status: v.password ? "error" : void 0,
|
|
11061
11061
|
disabled: u || c
|
|
@@ -11067,7 +11067,7 @@ function np({
|
|
|
11067
11067
|
dt,
|
|
11068
11068
|
{
|
|
11069
11069
|
checked: y.rememberMe,
|
|
11070
|
-
onChange: (
|
|
11070
|
+
onChange: (k) => C("rememberMe")(k.target.checked),
|
|
11071
11071
|
label: "Keep me signed in",
|
|
11072
11072
|
disabled: u || c
|
|
11073
11073
|
}
|
|
@@ -11228,33 +11228,33 @@ function Tu({
|
|
|
11228
11228
|
return { success: !0, errors: {} };
|
|
11229
11229
|
const M = {};
|
|
11230
11230
|
p.error.issues.forEach((D) => {
|
|
11231
|
-
const
|
|
11232
|
-
M[
|
|
11231
|
+
const x = D.path[0];
|
|
11232
|
+
M[x] || (M[x] = D.message);
|
|
11233
11233
|
}), f(M);
|
|
11234
|
-
const
|
|
11234
|
+
const k = {};
|
|
11235
11235
|
return Object.keys(M).forEach((D) => {
|
|
11236
|
-
|
|
11237
|
-
}), _((D) => ({ ...D, ...
|
|
11236
|
+
k[D] = !0;
|
|
11237
|
+
}), _((D) => ({ ...D, ...k })), { success: !1, errors: M };
|
|
11238
11238
|
},
|
|
11239
11239
|
getValues: () => ({ ...g })
|
|
11240
11240
|
}), [g]);
|
|
11241
|
-
const E =
|
|
11241
|
+
const E = N((p, M) => {
|
|
11242
11242
|
if (p === "street2" && !M) {
|
|
11243
|
-
f((
|
|
11243
|
+
f((k) => ({ ...k, [p]: void 0 }));
|
|
11244
11244
|
return;
|
|
11245
11245
|
}
|
|
11246
11246
|
try {
|
|
11247
11247
|
Ga.shape[p].parse(M), f((D) => ({ ...D, [p]: void 0 }));
|
|
11248
|
-
} catch (
|
|
11249
|
-
|
|
11248
|
+
} catch (k) {
|
|
11249
|
+
k instanceof he.ZodError && f((D) => ({ ...D, [p]: k.issues[0]?.message }));
|
|
11250
11250
|
}
|
|
11251
|
-
}, []), S =
|
|
11251
|
+
}, []), S = N(
|
|
11252
11252
|
(p) => (M) => {
|
|
11253
|
-
const
|
|
11254
|
-
b(
|
|
11253
|
+
const k = { ...g, [p]: M };
|
|
11254
|
+
b(k), c?.(k), y[p] && E(p, M);
|
|
11255
11255
|
},
|
|
11256
11256
|
[g, y, c, E]
|
|
11257
|
-
),
|
|
11257
|
+
), C = N(
|
|
11258
11258
|
(p) => () => {
|
|
11259
11259
|
_((M) => ({ ...M, [p]: !0 })), E(p, g[p] ?? ""), u?.(p);
|
|
11260
11260
|
},
|
|
@@ -11283,7 +11283,7 @@ function Tu({
|
|
|
11283
11283
|
placeholder: "123 Main Street",
|
|
11284
11284
|
value: g.street,
|
|
11285
11285
|
onChange: (p) => S("street")(p.target.value),
|
|
11286
|
-
onBlur:
|
|
11286
|
+
onBlur: C("street"),
|
|
11287
11287
|
status: I("street"),
|
|
11288
11288
|
disabled: l
|
|
11289
11289
|
}
|
|
@@ -11298,7 +11298,7 @@ function Tu({
|
|
|
11298
11298
|
placeholder: "Apt 4B",
|
|
11299
11299
|
value: g.street2,
|
|
11300
11300
|
onChange: (p) => S("street2")(p.target.value),
|
|
11301
|
-
onBlur:
|
|
11301
|
+
onBlur: C("street2"),
|
|
11302
11302
|
disabled: l
|
|
11303
11303
|
}
|
|
11304
11304
|
)
|
|
@@ -11318,7 +11318,7 @@ function Tu({
|
|
|
11318
11318
|
placeholder: "San Francisco",
|
|
11319
11319
|
value: g.city,
|
|
11320
11320
|
onChange: (p) => S("city")(p.target.value),
|
|
11321
|
-
onBlur:
|
|
11321
|
+
onBlur: C("city"),
|
|
11322
11322
|
status: I("city"),
|
|
11323
11323
|
disabled: l
|
|
11324
11324
|
}
|
|
@@ -11367,7 +11367,7 @@ function Tu({
|
|
|
11367
11367
|
placeholder: "94102",
|
|
11368
11368
|
value: g.zip,
|
|
11369
11369
|
onChange: (p) => S("zip")(p.target.value),
|
|
11370
|
-
onBlur:
|
|
11370
|
+
onBlur: C("zip"),
|
|
11371
11371
|
status: I("zip"),
|
|
11372
11372
|
disabled: l,
|
|
11373
11373
|
maxLength: 10
|
|
@@ -11491,34 +11491,34 @@ function lp({
|
|
|
11491
11491
|
expiryDate: h.expiryDate ?? "",
|
|
11492
11492
|
cvv: h.cvv ?? "",
|
|
11493
11493
|
cardholderName: h.cardholderName ?? ""
|
|
11494
|
-
}), [f, w] = H({}), [E, S] = H({}),
|
|
11494
|
+
}), [f, w] = H({}), [E, S] = H({}), C = Q(() => n ? `${r} ${n}` : r, [r, n]), I = N((x, R) => {
|
|
11495
11495
|
try {
|
|
11496
|
-
fa.shape[
|
|
11496
|
+
fa.shape[x].parse(R), w((z) => ({ ...z, [x]: void 0 }));
|
|
11497
11497
|
} catch (T) {
|
|
11498
|
-
T instanceof he.ZodError && w((
|
|
11498
|
+
T instanceof he.ZodError && w((z) => ({ ...z, [x]: T.issues[0]?.message }));
|
|
11499
11499
|
}
|
|
11500
|
-
}, []), p =
|
|
11501
|
-
(
|
|
11502
|
-
v((T) => ({ ...T, [
|
|
11500
|
+
}, []), p = N(
|
|
11501
|
+
(x) => (R) => {
|
|
11502
|
+
v((T) => ({ ...T, [x]: R })), x === "cardNumber" && y?.(R.replace(/\s/g, "")), E[x] && I(x, R);
|
|
11503
11503
|
},
|
|
11504
11504
|
[E, I, y]
|
|
11505
|
-
), M =
|
|
11506
|
-
(
|
|
11507
|
-
S((
|
|
11505
|
+
), M = N(
|
|
11506
|
+
(x) => () => {
|
|
11507
|
+
S((R) => ({ ...R, [x]: !0 })), I(x, _[x]);
|
|
11508
11508
|
},
|
|
11509
11509
|
[_, I]
|
|
11510
|
-
),
|
|
11511
|
-
async (
|
|
11512
|
-
if (
|
|
11513
|
-
g(new FormData(
|
|
11510
|
+
), k = N(
|
|
11511
|
+
async (x) => {
|
|
11512
|
+
if (x.preventDefault(), g) {
|
|
11513
|
+
g(new FormData(x.currentTarget));
|
|
11514
11514
|
return;
|
|
11515
11515
|
}
|
|
11516
|
-
const
|
|
11517
|
-
if (!
|
|
11516
|
+
const R = fa.safeParse(_);
|
|
11517
|
+
if (!R.success) {
|
|
11518
11518
|
const T = {};
|
|
11519
|
-
|
|
11520
|
-
const P =
|
|
11521
|
-
T[P] || (T[P] =
|
|
11519
|
+
R.error.issues.forEach((z) => {
|
|
11520
|
+
const P = z.path[0];
|
|
11521
|
+
T[P] || (T[P] = z.message);
|
|
11522
11522
|
}), w(T), S({
|
|
11523
11523
|
cardNumber: !0,
|
|
11524
11524
|
expiryDate: !0,
|
|
@@ -11527,16 +11527,16 @@ function lp({
|
|
|
11527
11527
|
});
|
|
11528
11528
|
return;
|
|
11529
11529
|
}
|
|
11530
|
-
await m?.(
|
|
11530
|
+
await m?.(R.data);
|
|
11531
11531
|
},
|
|
11532
11532
|
[_, m, g]
|
|
11533
|
-
), D = (
|
|
11534
|
-
if (E[
|
|
11535
|
-
if (f[
|
|
11536
|
-
if (_[
|
|
11533
|
+
), D = (x) => {
|
|
11534
|
+
if (E[x]) {
|
|
11535
|
+
if (f[x]) return "error";
|
|
11536
|
+
if (_[x] && !f[x]) return "success";
|
|
11537
11537
|
}
|
|
11538
11538
|
};
|
|
11539
|
-
return /* @__PURE__ */ o("form", { onSubmit:
|
|
11539
|
+
return /* @__PURE__ */ o("form", { onSubmit: k, className: "gloss-pattern-credit-card-form", children: [
|
|
11540
11540
|
/* @__PURE__ */ o("div", { className: "gloss-pattern-credit-card-form__header", children: [
|
|
11541
11541
|
/* @__PURE__ */ e("h3", { className: "gloss-pattern-credit-card-form__title", children: a }),
|
|
11542
11542
|
t && /* @__PURE__ */ e("p", { className: "gloss-pattern-credit-card-form__subtitle", children: t })
|
|
@@ -11553,7 +11553,7 @@ function lp({
|
|
|
11553
11553
|
mask: "creditCard",
|
|
11554
11554
|
placeholder: "4242 4242 4242 4242",
|
|
11555
11555
|
value: _.cardNumber,
|
|
11556
|
-
onAccept: (
|
|
11556
|
+
onAccept: (x) => p("cardNumber")(x),
|
|
11557
11557
|
onBlur: M("cardNumber"),
|
|
11558
11558
|
variant: D("cardNumber") ?? "default",
|
|
11559
11559
|
disabled: c || i
|
|
@@ -11570,7 +11570,7 @@ function lp({
|
|
|
11570
11570
|
mask: "expiry",
|
|
11571
11571
|
placeholder: "MM / YY",
|
|
11572
11572
|
value: _.expiryDate,
|
|
11573
|
-
onAccept: (
|
|
11573
|
+
onAccept: (x) => p("expiryDate")(x),
|
|
11574
11574
|
onBlur: M("expiryDate"),
|
|
11575
11575
|
variant: D("expiryDate") ?? "default",
|
|
11576
11576
|
disabled: c || i
|
|
@@ -11588,7 +11588,7 @@ function lp({
|
|
|
11588
11588
|
placeholder: "123",
|
|
11589
11589
|
maxLength: 4,
|
|
11590
11590
|
value: _.cvv,
|
|
11591
|
-
onChange: (
|
|
11591
|
+
onChange: (x) => p("cvv")(x.target.value.replace(/\D/g, "")),
|
|
11592
11592
|
onBlur: M("cvv"),
|
|
11593
11593
|
status: D("cvv"),
|
|
11594
11594
|
disabled: c || i
|
|
@@ -11604,7 +11604,7 @@ function lp({
|
|
|
11604
11604
|
{
|
|
11605
11605
|
placeholder: "John Doe",
|
|
11606
11606
|
value: _.cardholderName,
|
|
11607
|
-
onChange: (
|
|
11607
|
+
onChange: (x) => p("cardholderName")(x.target.value),
|
|
11608
11608
|
onBlur: M("cardholderName"),
|
|
11609
11609
|
status: D("cardholderName"),
|
|
11610
11610
|
disabled: c || i
|
|
@@ -11634,7 +11634,7 @@ function lp({
|
|
|
11634
11634
|
disabled: c || d,
|
|
11635
11635
|
leftIcon: u ? /* @__PURE__ */ e(Je, { name: "lock", definition: { size: "sm" } }) : void 0,
|
|
11636
11636
|
fullWidth: !0,
|
|
11637
|
-
children:
|
|
11637
|
+
children: C
|
|
11638
11638
|
}
|
|
11639
11639
|
)
|
|
11640
11640
|
] })
|
|
@@ -11725,30 +11725,32 @@ function cp({
|
|
|
11725
11725
|
acceptTerms: s.acceptTerms ?? !1
|
|
11726
11726
|
}), [y, _] = H({}), [v, f] = H(
|
|
11727
11727
|
{}
|
|
11728
|
-
), w =
|
|
11728
|
+
), w = N(
|
|
11729
11729
|
(p, M) => {
|
|
11730
11730
|
if (p === "confirmPassword") {
|
|
11731
|
-
M !== g.password ? _((
|
|
11731
|
+
M !== g.password ? _((x) => ({ ...x, confirmPassword: "Passwords must match" })) : _((x) => ({ ...x, confirmPassword: void 0 }));
|
|
11732
11732
|
return;
|
|
11733
11733
|
}
|
|
11734
|
-
|
|
11735
|
-
|
|
11736
|
-
|
|
11737
|
-
|
|
11734
|
+
const k = { ...g, [p]: M }, D = Hr.safeParse(k);
|
|
11735
|
+
if (D.success)
|
|
11736
|
+
_((x) => ({ ...x, [p]: void 0 }));
|
|
11737
|
+
else {
|
|
11738
|
+
const x = D.error.issues.find((R) => R.path[0] === p);
|
|
11739
|
+
_((R) => ({ ...R, [p]: x?.message }));
|
|
11738
11740
|
}
|
|
11739
11741
|
},
|
|
11740
11742
|
[g.password]
|
|
11741
|
-
), E =
|
|
11743
|
+
), E = N(
|
|
11742
11744
|
(p) => (M) => {
|
|
11743
|
-
b((
|
|
11745
|
+
b((k) => ({ ...k, [p]: M })), v[p] && w(p, M);
|
|
11744
11746
|
},
|
|
11745
11747
|
[v, w]
|
|
11746
|
-
), S =
|
|
11748
|
+
), S = N(
|
|
11747
11749
|
(p) => () => {
|
|
11748
11750
|
f((M) => ({ ...M, [p]: !0 })), w(p, g[p]);
|
|
11749
11751
|
},
|
|
11750
11752
|
[g, w]
|
|
11751
|
-
),
|
|
11753
|
+
), C = N(
|
|
11752
11754
|
async (p) => {
|
|
11753
11755
|
if (p.preventDefault(), t) {
|
|
11754
11756
|
t(new FormData(p.currentTarget));
|
|
@@ -11756,11 +11758,11 @@ function cp({
|
|
|
11756
11758
|
}
|
|
11757
11759
|
const M = Hr.safeParse(g);
|
|
11758
11760
|
if (!M.success) {
|
|
11759
|
-
const
|
|
11761
|
+
const k = {};
|
|
11760
11762
|
M.error.issues.forEach((D) => {
|
|
11761
|
-
const
|
|
11762
|
-
|
|
11763
|
-
}), _(
|
|
11763
|
+
const x = D.path[0];
|
|
11764
|
+
k[x] || (k[x] = D.message);
|
|
11765
|
+
}), _(k), f({
|
|
11764
11766
|
firstName: !0,
|
|
11765
11767
|
lastName: !0,
|
|
11766
11768
|
email: !0,
|
|
@@ -11778,7 +11780,7 @@ function cp({
|
|
|
11778
11780
|
" ",
|
|
11779
11781
|
/* @__PURE__ */ e(jt, { href: d, size: "sm", children: "Terms of Service" })
|
|
11780
11782
|
] }) : "I agree to the Terms of Service";
|
|
11781
|
-
return /* @__PURE__ */ o("form", { onSubmit:
|
|
11783
|
+
return /* @__PURE__ */ o("form", { onSubmit: C, className: "gloss-registration-form", children: [
|
|
11782
11784
|
/* @__PURE__ */ o("div", { className: "gloss-registration-form__header", children: [
|
|
11783
11785
|
/* @__PURE__ */ e("h3", { className: "gloss-registration-form__title", children: h }),
|
|
11784
11786
|
m && /* @__PURE__ */ e("p", { className: "gloss-registration-form__subtitle", children: m })
|
|
@@ -11968,32 +11970,32 @@ function up({
|
|
|
11968
11970
|
email: s.email ?? "",
|
|
11969
11971
|
subject: s.subject ?? "",
|
|
11970
11972
|
message: s.message ?? ""
|
|
11971
|
-
}), [m, g] = H({}), [b, y] = H({}), _ =
|
|
11973
|
+
}), [m, g] = H({}), [b, y] = H({}), _ = N((S, C) => {
|
|
11972
11974
|
try {
|
|
11973
|
-
Gr.shape[S].parse(
|
|
11975
|
+
Gr.shape[S].parse(C), g((p) => ({ ...p, [S]: void 0 }));
|
|
11974
11976
|
} catch (I) {
|
|
11975
11977
|
I instanceof he.ZodError && g((p) => ({ ...p, [S]: I.issues[0]?.message }));
|
|
11976
11978
|
}
|
|
11977
|
-
}, []), v =
|
|
11978
|
-
(S) => (
|
|
11979
|
-
h((I) => ({ ...I, [S]:
|
|
11979
|
+
}, []), v = N(
|
|
11980
|
+
(S) => (C) => {
|
|
11981
|
+
h((I) => ({ ...I, [S]: C })), b[S] && _(S, C);
|
|
11980
11982
|
},
|
|
11981
11983
|
[b, _]
|
|
11982
|
-
), f =
|
|
11984
|
+
), f = N(
|
|
11983
11985
|
(S) => () => {
|
|
11984
|
-
y((
|
|
11986
|
+
y((C) => ({ ...C, [S]: !0 })), _(S, u[S]);
|
|
11985
11987
|
},
|
|
11986
11988
|
[u, _]
|
|
11987
|
-
), w =
|
|
11989
|
+
), w = N(
|
|
11988
11990
|
async (S) => {
|
|
11989
11991
|
if (S.preventDefault(), t) {
|
|
11990
11992
|
t(new FormData(S.currentTarget));
|
|
11991
11993
|
return;
|
|
11992
11994
|
}
|
|
11993
|
-
const
|
|
11994
|
-
if (!
|
|
11995
|
+
const C = Gr.safeParse(u);
|
|
11996
|
+
if (!C.success) {
|
|
11995
11997
|
const I = {};
|
|
11996
|
-
|
|
11998
|
+
C.error.issues.forEach((p) => {
|
|
11997
11999
|
const M = p.path[0];
|
|
11998
12000
|
I[M] || (I[M] = p.message);
|
|
11999
12001
|
}), g(I), y({
|
|
@@ -12004,7 +12006,7 @@ function up({
|
|
|
12004
12006
|
});
|
|
12005
12007
|
return;
|
|
12006
12008
|
}
|
|
12007
|
-
await a?.(
|
|
12009
|
+
await a?.(C.data);
|
|
12008
12010
|
},
|
|
12009
12011
|
[u, a, t]
|
|
12010
12012
|
), E = i?.map((S) => ({
|
|
@@ -12058,7 +12060,7 @@ function up({
|
|
|
12058
12060
|
options: E,
|
|
12059
12061
|
value: u.subject,
|
|
12060
12062
|
onChange: (S) => {
|
|
12061
|
-
v("subject")(S), y((
|
|
12063
|
+
v("subject")(S), y((C) => ({ ...C, subject: !0 }));
|
|
12062
12064
|
},
|
|
12063
12065
|
placeholder: "Select a subject",
|
|
12064
12066
|
disabled: n || r
|
|
@@ -12180,36 +12182,36 @@ function pp({
|
|
|
12180
12182
|
cardholderName: s.card?.cardholderName ?? ""
|
|
12181
12183
|
}), [y, _] = H({}), [v, f] = H({}), [w, E] = H(
|
|
12182
12184
|
s.savePaymentMethod ?? !1
|
|
12183
|
-
), [S,
|
|
12185
|
+
), [S, C] = H(), I = ce(null), p = h === "credit_card" || h === "debit_card", M = N((T, z) => {
|
|
12184
12186
|
try {
|
|
12185
|
-
fa.shape[T].parse(
|
|
12187
|
+
fa.shape[T].parse(z), _((O) => ({ ...O, [T]: void 0 }));
|
|
12186
12188
|
} catch (P) {
|
|
12187
12189
|
P instanceof he.ZodError && _((O) => ({ ...O, [T]: P.issues[0]?.message }));
|
|
12188
12190
|
}
|
|
12189
|
-
}, []),
|
|
12190
|
-
(T) => (
|
|
12191
|
-
b((P) => ({ ...P, [T]:
|
|
12191
|
+
}, []), k = N(
|
|
12192
|
+
(T) => (z) => {
|
|
12193
|
+
b((P) => ({ ...P, [T]: z })), v[T] && M(T, z);
|
|
12192
12194
|
},
|
|
12193
12195
|
[v, M]
|
|
12194
|
-
), D =
|
|
12196
|
+
), D = N(
|
|
12195
12197
|
(T) => () => {
|
|
12196
|
-
f((
|
|
12198
|
+
f((z) => ({ ...z, [T]: !0 })), M(T, g[T]);
|
|
12197
12199
|
},
|
|
12198
12200
|
[g, M]
|
|
12199
|
-
),
|
|
12201
|
+
), x = (T) => {
|
|
12200
12202
|
if (v[T]) {
|
|
12201
12203
|
if (y[T]) return "error";
|
|
12202
12204
|
if (g[T] && !y[T]) return "success";
|
|
12203
12205
|
}
|
|
12204
|
-
},
|
|
12206
|
+
}, R = N(
|
|
12205
12207
|
async (T) => {
|
|
12206
|
-
if (T.preventDefault(),
|
|
12208
|
+
if (T.preventDefault(), C(void 0), t) {
|
|
12207
12209
|
t(new FormData(T.currentTarget));
|
|
12208
12210
|
return;
|
|
12209
12211
|
}
|
|
12210
|
-
const
|
|
12211
|
-
if (!
|
|
12212
|
-
|
|
12212
|
+
const z = I.current?.validate(), P = I.current?.getValues();
|
|
12213
|
+
if (!z?.success) {
|
|
12214
|
+
C("Please fix the errors above before submitting.");
|
|
12213
12215
|
return;
|
|
12214
12216
|
}
|
|
12215
12217
|
const O = {
|
|
@@ -12226,20 +12228,20 @@ function pp({
|
|
|
12226
12228
|
if (G[0] === "card" && G.length === 2) {
|
|
12227
12229
|
const W = G[1];
|
|
12228
12230
|
j[W] || (j[W] = A.message);
|
|
12229
|
-
} else G[0] === "card" && G.length === 1 &&
|
|
12231
|
+
} else G[0] === "card" && G.length === 1 && C(A.message);
|
|
12230
12232
|
}), Object.keys(j).length > 0 && (_(j), f({
|
|
12231
12233
|
cardNumber: !0,
|
|
12232
12234
|
expiryDate: !0,
|
|
12233
12235
|
cvv: !0,
|
|
12234
12236
|
cardholderName: !0
|
|
12235
|
-
})), !S && Object.keys(j).length === 0 &&
|
|
12237
|
+
})), !S && Object.keys(j).length === 0 && C("Please fix the errors above before submitting.");
|
|
12236
12238
|
return;
|
|
12237
12239
|
}
|
|
12238
12240
|
await a?.(Y.data);
|
|
12239
12241
|
},
|
|
12240
12242
|
[h, g, w, p, a, t, S]
|
|
12241
12243
|
);
|
|
12242
|
-
return /* @__PURE__ */ o("form", { onSubmit:
|
|
12244
|
+
return /* @__PURE__ */ o("form", { onSubmit: R, className: "gloss-payment-form", children: [
|
|
12243
12245
|
c && c.length > 0 && /* @__PURE__ */ o("div", { className: "gloss-payment-form__section", children: [
|
|
12244
12246
|
/* @__PURE__ */ e("h4", { className: "gloss-payment-form__section-title", children: "Payment Method" }),
|
|
12245
12247
|
/* @__PURE__ */ e(
|
|
@@ -12247,13 +12249,13 @@ function pp({
|
|
|
12247
12249
|
{
|
|
12248
12250
|
methods: c,
|
|
12249
12251
|
value: c.find((T) => T.id === h)?.id,
|
|
12250
|
-
onChange: (T,
|
|
12252
|
+
onChange: (T, z) => {
|
|
12251
12253
|
m({
|
|
12252
12254
|
visa: "credit_card",
|
|
12253
12255
|
mastercard: "credit_card",
|
|
12254
12256
|
amex: "credit_card",
|
|
12255
12257
|
generic: "credit_card"
|
|
12256
|
-
}[
|
|
12258
|
+
}[z.type] ?? "credit_card");
|
|
12257
12259
|
},
|
|
12258
12260
|
disabled: n || r
|
|
12259
12261
|
}
|
|
@@ -12268,9 +12270,9 @@ function pp({
|
|
|
12268
12270
|
{
|
|
12269
12271
|
placeholder: "John Doe",
|
|
12270
12272
|
value: g.cardholderName,
|
|
12271
|
-
onChange: (T) =>
|
|
12273
|
+
onChange: (T) => k("cardholderName")(T.target.value),
|
|
12272
12274
|
onBlur: D("cardholderName"),
|
|
12273
|
-
status:
|
|
12275
|
+
status: x("cardholderName"),
|
|
12274
12276
|
disabled: n || r,
|
|
12275
12277
|
name: "cardholderName"
|
|
12276
12278
|
}
|
|
@@ -12285,9 +12287,9 @@ function pp({
|
|
|
12285
12287
|
mask: "creditCard",
|
|
12286
12288
|
placeholder: "4242 4242 4242 4242",
|
|
12287
12289
|
value: g.cardNumber,
|
|
12288
|
-
onAccept: (T) =>
|
|
12290
|
+
onAccept: (T) => k("cardNumber")(T),
|
|
12289
12291
|
onBlur: D("cardNumber"),
|
|
12290
|
-
variant:
|
|
12292
|
+
variant: x("cardNumber") === "error" ? "error" : "default",
|
|
12291
12293
|
disabled: n || r
|
|
12292
12294
|
}
|
|
12293
12295
|
),
|
|
@@ -12302,9 +12304,9 @@ function pp({
|
|
|
12302
12304
|
mask: "expiry",
|
|
12303
12305
|
placeholder: "MM / YY",
|
|
12304
12306
|
value: g.expiryDate,
|
|
12305
|
-
onAccept: (T) =>
|
|
12307
|
+
onAccept: (T) => k("expiryDate")(T),
|
|
12306
12308
|
onBlur: D("expiryDate"),
|
|
12307
|
-
variant:
|
|
12309
|
+
variant: x("expiryDate") === "error" ? "error" : "default",
|
|
12308
12310
|
disabled: n || r
|
|
12309
12311
|
}
|
|
12310
12312
|
),
|
|
@@ -12320,9 +12322,9 @@ function pp({
|
|
|
12320
12322
|
placeholder: "123",
|
|
12321
12323
|
maxLength: 4,
|
|
12322
12324
|
value: g.cvv,
|
|
12323
|
-
onChange: (T) =>
|
|
12325
|
+
onChange: (T) => k("cvv")(T.target.value.replace(/\D/g, "")),
|
|
12324
12326
|
onBlur: D("cvv"),
|
|
12325
|
-
status:
|
|
12327
|
+
status: x("cvv"),
|
|
12326
12328
|
disabled: n || r,
|
|
12327
12329
|
name: "cvv"
|
|
12328
12330
|
}
|
|
@@ -12456,7 +12458,7 @@ function fp({
|
|
|
12456
12458
|
le(() => {
|
|
12457
12459
|
a || y("");
|
|
12458
12460
|
}, [a]);
|
|
12459
|
-
const _ =
|
|
12461
|
+
const _ = N(async () => {
|
|
12460
12462
|
d && b !== c || await r();
|
|
12461
12463
|
}, [d, b, c, r]), v = !d || b === c, f = m ? `${s} This will permanently delete "${m}".` : s;
|
|
12462
12464
|
return /* @__PURE__ */ o(qa, { open: a, onDismiss: h ? void 0 : t, size: "sm", children: [
|
|
@@ -12575,7 +12577,7 @@ function Bu(a) {
|
|
|
12575
12577
|
metadata: i = [],
|
|
12576
12578
|
className: d
|
|
12577
12579
|
} = a, c = ["gloss-profile-card", d].filter(Boolean).join(" ");
|
|
12578
|
-
return /* @__PURE__ */ e(dn, { variant: "outlined",
|
|
12580
|
+
return /* @__PURE__ */ e("div", { className: c, children: /* @__PURE__ */ e(dn, { variant: "outlined", children: /* @__PURE__ */ o("div", { className: "gloss-profile-card__content", children: [
|
|
12579
12581
|
/* @__PURE__ */ e(
|
|
12580
12582
|
Ua,
|
|
12581
12583
|
{
|
|
@@ -12593,7 +12595,7 @@ function Bu(a) {
|
|
|
12593
12595
|
/* @__PURE__ */ e("span", { className: "gloss-profile-card__metadata-label", children: u.label }),
|
|
12594
12596
|
/* @__PURE__ */ e("span", { className: "gloss-profile-card__metadata-value", children: u.value })
|
|
12595
12597
|
] }, h)) })
|
|
12596
|
-
] }) });
|
|
12598
|
+
] }) }) });
|
|
12597
12599
|
}
|
|
12598
12600
|
Bu.displayName = "ProfileCard";
|
|
12599
12601
|
function Au(a) {
|
|
@@ -12608,7 +12610,7 @@ function Au(a) {
|
|
|
12608
12610
|
} = a, c = ["gloss-order-filter-bar", d].filter(Boolean).join(" "), u = (b) => {
|
|
12609
12611
|
r({ ...t, dateRange: b });
|
|
12610
12612
|
}, h = (b) => {
|
|
12611
|
-
r({ ...t, status: b });
|
|
12613
|
+
r({ ...t, status: Array.isArray(b) ? b[0] : b });
|
|
12612
12614
|
}, m = (b) => {
|
|
12613
12615
|
r({ ...t, categories: b });
|
|
12614
12616
|
}, g = (b) => {
|
|
@@ -12740,15 +12742,15 @@ function Fu(a) {
|
|
|
12740
12742
|
isImporting: i = !1,
|
|
12741
12743
|
progress: d,
|
|
12742
12744
|
className: c
|
|
12743
|
-
} = a, [u, h] = H(0), [m, g] = H([]), [b, y] = H([]), [_, v] = H(null), f =
|
|
12744
|
-
(
|
|
12745
|
-
g(
|
|
12745
|
+
} = a, [u, h] = H(0), [m, g] = H([]), [b, y] = H([]), [_, v] = H(null), f = N(
|
|
12746
|
+
(C) => {
|
|
12747
|
+
g(C), v(null), C.length > 0 && r && r([]);
|
|
12746
12748
|
},
|
|
12747
12749
|
[r]
|
|
12748
|
-
), w =
|
|
12749
|
-
(
|
|
12750
|
+
), w = N(
|
|
12751
|
+
(C) => C === 0 && m.length === 0 ? (v("Please upload a file to continue."), !1) : !0,
|
|
12750
12752
|
[m]
|
|
12751
|
-
), E =
|
|
12753
|
+
), E = N(async () => {
|
|
12752
12754
|
try {
|
|
12753
12755
|
v(null), await l(b);
|
|
12754
12756
|
} catch {
|
|
@@ -12763,8 +12765,8 @@ function Fu(a) {
|
|
|
12763
12765
|
activeStep: u,
|
|
12764
12766
|
onStepChange: h,
|
|
12765
12767
|
onStepValidate: w,
|
|
12766
|
-
contentSlot: (
|
|
12767
|
-
switch (
|
|
12768
|
+
contentSlot: (C) => {
|
|
12769
|
+
switch (C) {
|
|
12768
12770
|
case 0:
|
|
12769
12771
|
return /* @__PURE__ */ e("div", { className: "gloss-import-wizard__upload-zone", children: /* @__PURE__ */ e(
|
|
12770
12772
|
ln,
|
|
@@ -12889,9 +12891,9 @@ const Lu = ({
|
|
|
12889
12891
|
showCheckbox: s = !1,
|
|
12890
12892
|
children: l
|
|
12891
12893
|
}) => {
|
|
12892
|
-
const i = ve.Children.only(l), d =
|
|
12894
|
+
const i = ve.Children.only(l), d = N((m) => {
|
|
12893
12895
|
n || r?.(!t, m);
|
|
12894
|
-
}, [n, r, t]), c =
|
|
12896
|
+
}, [n, r, t]), c = N((m) => {
|
|
12895
12897
|
n || (m.key === "Enter" || m.key === " ") && (m.preventDefault(), r?.(!t, m));
|
|
12896
12898
|
}, [n, r, t]), u = i.props, h = ve.cloneElement(i, {
|
|
12897
12899
|
onClick: ha(u.onClick, d),
|