unifyedx-storybook-new 0.1.84 → 0.1.85
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.
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as l, jsx as e, Fragment as
|
|
2
|
-
import re, { useState as M, useMemo as ne, useId as Qe, Fragment as
|
|
3
|
-
import { a as
|
|
4
|
-
import { Popover as ar, PopoverButton as tr, PopoverPanel as rr, Transition as oe, Dialog as me, TransitionChild as pe, DialogPanel as Ne, DialogTitle as Ve, TabGroup as nr, TabList as sr, Tab as ee, TabPanels as lr, RadioGroup as Te, Listbox as
|
|
1
|
+
import { jsxs as l, jsx as e, Fragment as K } from "react/jsx-runtime";
|
|
2
|
+
import re, { useState as M, useMemo as ne, useId as Qe, Fragment as J, useEffect as Q, useCallback as ae, useRef as ue } from "react";
|
|
3
|
+
import { a as W, U as lt, X as ge, P as _, L as ot, C as Oe, b as Me, f as Pe, d as pa, D as ga, F as it, e as ct, h as dt, T as Be, u as ut, i as mt, I as ht, j as pt, k as gt, l as yt, m as ft, n as bt, S as ya, o as fa, M as vt, p as xt, q as ba, r as Nt, A as kt, s as wt, E as Ct, t as St, v as Dt, w as Ft, x as $t, y as va, z as Tt, B as xa, G as Na, H as At, J as Et, K as Rt, N as Le, O as Xe, Q as Ze, R as It, V as zt, W as ka, Y as Pt, Z as ea, _ as Bt, $ as Lt, a0 as wa, a1 as Ot, a2 as Mt, a3 as Vt, a4 as Ut, a5 as qt, a6 as jt, a7 as Gt, a8 as le, a9 as _t, aa as Yt, ab as Wt, ac as Jt, ad as Qt, ae as Xt, af as Zt, ag as Ht, ah as Kt, ai as er } from "./vendor-CugE0rJ9.js";
|
|
4
|
+
import { Popover as ar, PopoverButton as tr, PopoverPanel as rr, Transition as oe, Dialog as me, TransitionChild as pe, DialogPanel as Ne, DialogTitle as Ve, TabGroup as nr, TabList as sr, Tab as ee, TabPanels as lr, RadioGroup as Te, Listbox as X, ListboxButton as or, ListboxOptions as ir, ListboxOption as cr, SwitchGroup as dr, Switch as Ye, Menu as ur, MenuButton as mr, Portal as hr, MenuItems as pr, MenuItem as gr, DialogBackdrop as yr } from "@headlessui/react";
|
|
5
5
|
import { motion as te, AnimatePresence as fe } from "framer-motion";
|
|
6
|
-
import { d as fr, l as br, _ as We } from "./vendor-lodash-
|
|
6
|
+
import { d as fr, l as br, _ as We } from "./vendor-lodash-BvgZjhaA.js";
|
|
7
7
|
import { useFloating as Ca, offset as Sa, flip as Da, shift as Fa, autoUpdate as $a, useClick as vr, useDismiss as xr, useInteractions as Nr, FloatingPortal as kr } from "@floating-ui/react";
|
|
8
|
-
import { P as wr, S as Cr, F as Sr, G as Dr, a as Fr, E as $r, b as Tr, C as Ar, R as Er, c as Rr, d as Ir, e as zr, f as
|
|
8
|
+
import { P as wr, S as Cr, F as Sr, G as Dr, a as Fr, E as $r, b as Tr, C as Ar, R as Er, c as Rr, d as Ir, e as zr, f as Pr, I as Br, g as ra } from "./vendor-syncfusion-DGcZfoFG.js";
|
|
9
9
|
const Lr = (t) => {
|
|
10
10
|
let r = 2166136261;
|
|
11
11
|
for (let s = 0; s < t.length; s++)
|
|
@@ -26,7 +26,7 @@ const Lr = (t) => {
|
|
|
26
26
|
className: m,
|
|
27
27
|
...i
|
|
28
28
|
}) => {
|
|
29
|
-
const [u, y] = M(!1), f = ne(() => Or(r), []), v = t && !u, a = !v && r, k = !v && !r, d =
|
|
29
|
+
const [u, y] = M(!1), f = ne(() => Or(r), []), v = t && !u, a = !v && r, k = !v && !r, d = W(
|
|
30
30
|
"avatar-container",
|
|
31
31
|
`avatar--size-${s}`,
|
|
32
32
|
m
|
|
@@ -71,7 +71,7 @@ const Lr = (t) => {
|
|
|
71
71
|
className: u,
|
|
72
72
|
...y
|
|
73
73
|
}) => {
|
|
74
|
-
const f =
|
|
74
|
+
const f = W(
|
|
75
75
|
"badge",
|
|
76
76
|
`badge--variant-${r}`,
|
|
77
77
|
`badge--size-${s}`,
|
|
@@ -134,7 +134,7 @@ const Ur = {
|
|
|
134
134
|
}, qr = {
|
|
135
135
|
primary: "btn-primary",
|
|
136
136
|
secondary: "btn-secondary"
|
|
137
|
-
},
|
|
137
|
+
}, Z = ({
|
|
138
138
|
dataTestId: t,
|
|
139
139
|
title: r,
|
|
140
140
|
type: s = "button",
|
|
@@ -153,7 +153,7 @@ const Ur = {
|
|
|
153
153
|
onClick: k,
|
|
154
154
|
...d
|
|
155
155
|
}) => {
|
|
156
|
-
const p = y || m, T = u && !v, L =
|
|
156
|
+
const p = y || m, T = u && !v, L = W(
|
|
157
157
|
"btn-base",
|
|
158
158
|
Ur[f],
|
|
159
159
|
qr[i],
|
|
@@ -174,7 +174,7 @@ const Ur = {
|
|
|
174
174
|
title: r || T && o || (typeof v == "string" ? v : void 0),
|
|
175
175
|
"aria-label": o || T && r || (typeof v == "string" ? v : void 0),
|
|
176
176
|
...d,
|
|
177
|
-
children: m ? /* @__PURE__ */ e(ot, { className: "loader-spin", "data-testid": "button-loader" }) : /* @__PURE__ */ l(
|
|
177
|
+
children: m ? /* @__PURE__ */ e(ot, { className: "loader-spin", "data-testid": "button-loader" }) : /* @__PURE__ */ l(K, { children: [
|
|
178
178
|
u && /* @__PURE__ */ e(u, { size: f === "large" ? 20 : 16 }),
|
|
179
179
|
v,
|
|
180
180
|
a,
|
|
@@ -233,7 +233,7 @@ const Ur = {
|
|
|
233
233
|
/* @__PURE__ */ e(
|
|
234
234
|
"div",
|
|
235
235
|
{
|
|
236
|
-
className:
|
|
236
|
+
className: W("checkbox-box", {
|
|
237
237
|
"checkbox-box--checked": m,
|
|
238
238
|
"checkbox-box--error": !!s
|
|
239
239
|
}),
|
|
@@ -259,7 +259,7 @@ const Ur = {
|
|
|
259
259
|
const f = (v) => {
|
|
260
260
|
v.stopPropagation(), v.preventDefault(), s?.();
|
|
261
261
|
};
|
|
262
|
-
return /* @__PURE__ */ l("div", { className:
|
|
262
|
+
return /* @__PURE__ */ l("div", { className: W("datepicker-wrapper", u), children: [
|
|
263
263
|
n && /* @__PURE__ */ e("label", { className: "datepicker-label", htmlFor: "datepicker-input", children: n }),
|
|
264
264
|
/* @__PURE__ */ l(Ea, { children: [
|
|
265
265
|
/* @__PURE__ */ e(Ra, { asChild: !0, children: /* @__PURE__ */ l("div", { className: "datepicker-input-container", children: [
|
|
@@ -268,15 +268,15 @@ const Ur = {
|
|
|
268
268
|
{
|
|
269
269
|
id: "datepicker-input",
|
|
270
270
|
type: "button",
|
|
271
|
-
className:
|
|
271
|
+
className: W("datepicker-trigger", {
|
|
272
272
|
"datepicker-trigger--error": !!m,
|
|
273
273
|
"datepicker-trigger--disabled": i
|
|
274
274
|
}),
|
|
275
275
|
disabled: i,
|
|
276
|
-
"aria-label": t ? `Selected date is ${
|
|
276
|
+
"aria-label": t ? `Selected date is ${Pe(t, "PPP")}` : o,
|
|
277
277
|
children: [
|
|
278
278
|
/* @__PURE__ */ e(pa, { className: "datepicker-icon" }),
|
|
279
|
-
t ? /* @__PURE__ */ e("span", { className: "datepicker-value", children:
|
|
279
|
+
t ? /* @__PURE__ */ e("span", { className: "datepicker-value", children: Pe(t, "PPP") }) : /* @__PURE__ */ e("span", { className: "datepicker-placeholder", children: o })
|
|
280
280
|
]
|
|
281
281
|
}
|
|
282
282
|
),
|
|
@@ -318,12 +318,12 @@ const Ur = {
|
|
|
318
318
|
}) => {
|
|
319
319
|
const f = t?.from, v = t?.to, a = (d) => {
|
|
320
320
|
d.stopPropagation(), d.preventDefault(), s?.();
|
|
321
|
-
}, k = f && v ? /* @__PURE__ */ l(
|
|
322
|
-
|
|
321
|
+
}, k = f && v ? /* @__PURE__ */ l(K, { children: [
|
|
322
|
+
Pe(f, "MMM d, y"),
|
|
323
323
|
" - ",
|
|
324
|
-
|
|
324
|
+
Pe(v, "MMM d, y")
|
|
325
325
|
] }) : /* @__PURE__ */ e("span", { className: "datepicker-placeholder", children: o });
|
|
326
|
-
return /* @__PURE__ */ l("div", { className:
|
|
326
|
+
return /* @__PURE__ */ l("div", { className: W("datepicker-wrapper", u), children: [
|
|
327
327
|
n && /* @__PURE__ */ e("label", { className: "datepicker-label", htmlFor: "daterangepicker-input", children: n }),
|
|
328
328
|
/* @__PURE__ */ l(Ea, { children: [
|
|
329
329
|
/* @__PURE__ */ e(Ra, { asChild: !0, children: /* @__PURE__ */ l("div", { className: "datepicker-input-container", children: [
|
|
@@ -332,7 +332,7 @@ const Ur = {
|
|
|
332
332
|
{
|
|
333
333
|
id: "daterangepicker-input",
|
|
334
334
|
type: "button",
|
|
335
|
-
className:
|
|
335
|
+
className: W("datepicker-trigger", {
|
|
336
336
|
"datepicker-trigger--error": !!m,
|
|
337
337
|
"datepicker-trigger--disabled": i
|
|
338
338
|
}),
|
|
@@ -633,7 +633,7 @@ const Ur = {
|
|
|
633
633
|
subHeading: p = "Supports PNG, JPG, PDF. Max size: 50MB."
|
|
634
634
|
}) => {
|
|
635
635
|
const T = i.length > 0 || u.length > 0;
|
|
636
|
-
return /* @__PURE__ */ e(oe, { appear: !0, show: t, as:
|
|
636
|
+
return /* @__PURE__ */ e(oe, { appear: !0, show: t, as: J, children: /* @__PURE__ */ l(
|
|
637
637
|
me,
|
|
638
638
|
{
|
|
639
639
|
as: "div",
|
|
@@ -644,7 +644,7 @@ const Ur = {
|
|
|
644
644
|
/* @__PURE__ */ e(
|
|
645
645
|
pe,
|
|
646
646
|
{
|
|
647
|
-
as:
|
|
647
|
+
as: J,
|
|
648
648
|
enter: "ease-out duration-300",
|
|
649
649
|
enterFrom: "opacity-0",
|
|
650
650
|
enterTo: "opacity-100",
|
|
@@ -657,7 +657,7 @@ const Ur = {
|
|
|
657
657
|
/* @__PURE__ */ e("div", { className: "dialog-positioner", children: /* @__PURE__ */ e(
|
|
658
658
|
pe,
|
|
659
659
|
{
|
|
660
|
-
as:
|
|
660
|
+
as: J,
|
|
661
661
|
enter: "ease-out duration-300",
|
|
662
662
|
enterFrom: "opacity-0 scale-95",
|
|
663
663
|
enterTo: "opacity-100 scale-100",
|
|
@@ -734,7 +734,7 @@ const Ur = {
|
|
|
734
734
|
type: "button",
|
|
735
735
|
onClick: () => y(R),
|
|
736
736
|
className: "remove-file-button",
|
|
737
|
-
children: /* @__PURE__ */ e(
|
|
737
|
+
children: /* @__PURE__ */ e(Be, { size: 16 })
|
|
738
738
|
}
|
|
739
739
|
)
|
|
740
740
|
]
|
|
@@ -765,7 +765,7 @@ const Ur = {
|
|
|
765
765
|
type: "button",
|
|
766
766
|
onClick: () => f(S),
|
|
767
767
|
className: "remove-file-button",
|
|
768
|
-
children: /* @__PURE__ */ e(
|
|
768
|
+
children: /* @__PURE__ */ e(Be, { size: 16 })
|
|
769
769
|
}
|
|
770
770
|
)
|
|
771
771
|
]
|
|
@@ -777,7 +777,7 @@ const Ur = {
|
|
|
777
777
|
] }),
|
|
778
778
|
/* @__PURE__ */ l("div", { className: "dialog-footer", children: [
|
|
779
779
|
/* @__PURE__ */ e(
|
|
780
|
-
|
|
780
|
+
Z,
|
|
781
781
|
{
|
|
782
782
|
type: "button",
|
|
783
783
|
category: "secondary",
|
|
@@ -786,7 +786,7 @@ const Ur = {
|
|
|
786
786
|
}
|
|
787
787
|
),
|
|
788
788
|
/* @__PURE__ */ e(
|
|
789
|
-
|
|
789
|
+
Z,
|
|
790
790
|
{
|
|
791
791
|
type: "submit",
|
|
792
792
|
label: a ? "Uploading..." : "Upload Files",
|
|
@@ -825,11 +825,11 @@ const Ur = {
|
|
|
825
825
|
// Deep copy
|
|
826
826
|
onSubmit: (S) => {
|
|
827
827
|
const A = {};
|
|
828
|
-
Object.keys(S).forEach((
|
|
829
|
-
A[
|
|
830
|
-
operator: S[
|
|
831
|
-
values: Array.isArray(S[
|
|
832
|
-
range: S[
|
|
828
|
+
Object.keys(S).forEach((P) => {
|
|
829
|
+
A[P] = {
|
|
830
|
+
operator: S[P].operator || "in",
|
|
831
|
+
values: Array.isArray(S[P].values) ? S[P].values : [],
|
|
832
|
+
range: S[P].range || null
|
|
833
833
|
};
|
|
834
834
|
}), console.log("[storybook filter] Applied Filters:", A), typeof s == "function" && s({
|
|
835
835
|
filters: A,
|
|
@@ -838,7 +838,7 @@ const Ur = {
|
|
|
838
838
|
},
|
|
839
839
|
enableReinitialize: !0
|
|
840
840
|
}), k = ne(() => n.reduce((S, A) => {
|
|
841
|
-
const
|
|
841
|
+
const P = A.key, I = a.values[P];
|
|
842
842
|
let V = !1;
|
|
843
843
|
if (I)
|
|
844
844
|
switch (A.type) {
|
|
@@ -850,26 +850,26 @@ const Ur = {
|
|
|
850
850
|
(I.range && I.range !== "" || Array.isArray(I.values) && I.values.length > 0) && (V = !0);
|
|
851
851
|
break;
|
|
852
852
|
}
|
|
853
|
-
return S[
|
|
853
|
+
return S[P] = V, S;
|
|
854
854
|
}, {}), [n, a.values]), d = Object.values(k).filter(Boolean).length, p = async (S, A) => {
|
|
855
855
|
try {
|
|
856
856
|
v((I) => ({ ...I, [S]: !0 }));
|
|
857
|
-
const
|
|
858
|
-
y((I) => ({ ...I, [S]:
|
|
859
|
-
} catch (
|
|
860
|
-
console.error(`Error fetching ${S} users:`,
|
|
857
|
+
const P = await i(S, A);
|
|
858
|
+
y((I) => ({ ...I, [S]: P }));
|
|
859
|
+
} catch (P) {
|
|
860
|
+
console.error(`Error fetching ${S} users:`, P);
|
|
861
861
|
} finally {
|
|
862
|
-
v((
|
|
862
|
+
v((P) => ({ ...P, [S]: !1 }));
|
|
863
863
|
}
|
|
864
864
|
}, T = (S) => {
|
|
865
|
-
const A = n[S].key,
|
|
866
|
-
n[S].type === "multiselect-users" && u[A].length === 0 && !f[A] && p(A,
|
|
865
|
+
const A = n[S].key, P = n[S].url;
|
|
866
|
+
n[S].type === "multiselect-users" && u[A].length === 0 && !f[A] && p(A, P);
|
|
867
867
|
}, L = () => {
|
|
868
868
|
a.resetForm(), y({ createdBy: [], updatedBy: [] }), o();
|
|
869
869
|
}, R = (S) => {
|
|
870
870
|
const A = n.find((V) => V.key === S);
|
|
871
871
|
if (!A) return null;
|
|
872
|
-
const
|
|
872
|
+
const P = a.values[S] || m[S], I = Array.isArray(P.values) ? P.values : [];
|
|
873
873
|
switch (A.type) {
|
|
874
874
|
case "multiselect":
|
|
875
875
|
return /* @__PURE__ */ l("div", { className: "filter-panel-content", children: [
|
|
@@ -878,7 +878,7 @@ const Ur = {
|
|
|
878
878
|
/* @__PURE__ */ e(
|
|
879
879
|
"select",
|
|
880
880
|
{
|
|
881
|
-
value:
|
|
881
|
+
value: P.operator || "in",
|
|
882
882
|
onChange: (c) => a.setFieldValue(`${S}.operator`, c.target.value),
|
|
883
883
|
className: "filter-select",
|
|
884
884
|
children: A.operators.map((c) => /* @__PURE__ */ e("option", { value: c, children: c === "in" ? "Includes" : "Excludes" }, c))
|
|
@@ -942,14 +942,14 @@ const Ur = {
|
|
|
942
942
|
/* @__PURE__ */ e(
|
|
943
943
|
"select",
|
|
944
944
|
{
|
|
945
|
-
value:
|
|
945
|
+
value: P.operator || "in",
|
|
946
946
|
onChange: (c) => a.setFieldValue(`${S}.operator`, c.target.value),
|
|
947
947
|
className: "filter-select",
|
|
948
948
|
children: A.operators.map((c) => /* @__PURE__ */ e("option", { value: c, children: c === "in" ? "Includes" : "Excludes" }, c))
|
|
949
949
|
}
|
|
950
950
|
)
|
|
951
951
|
] }),
|
|
952
|
-
z ? /* @__PURE__ */ e("div", { className: "loading-spinner", children: /* @__PURE__ */ e("div", {}) }) : /* @__PURE__ */ e("div", { className: "filter-checkbox-list", children: V.length > 0 ? /* @__PURE__ */ l(
|
|
952
|
+
z ? /* @__PURE__ */ e("div", { className: "loading-spinner", children: /* @__PURE__ */ e("div", {}) }) : /* @__PURE__ */ e("div", { className: "filter-checkbox-list", children: V.length > 0 ? /* @__PURE__ */ l(K, { children: [
|
|
953
953
|
/* @__PURE__ */ l("div", { className: "filter-checkbox-item", children: [
|
|
954
954
|
/* @__PURE__ */ e(
|
|
955
955
|
"input",
|
|
@@ -1008,7 +1008,7 @@ const Ur = {
|
|
|
1008
1008
|
] }) : /* @__PURE__ */ e("div", { className: "text-center py-4 text-gray-500 text-sm", children: "No users loaded." }) })
|
|
1009
1009
|
] });
|
|
1010
1010
|
case "date":
|
|
1011
|
-
const
|
|
1011
|
+
const B = P.values || [], [g, h] = B, N = g && h, w = {
|
|
1012
1012
|
startDate: g instanceof Date ? g : /* @__PURE__ */ new Date(),
|
|
1013
1013
|
// Fallback to today
|
|
1014
1014
|
endDate: h instanceof Date ? h : /* @__PURE__ */ new Date(),
|
|
@@ -1021,7 +1021,7 @@ const Ur = {
|
|
|
1021
1021
|
/* @__PURE__ */ e(
|
|
1022
1022
|
"select",
|
|
1023
1023
|
{
|
|
1024
|
-
value:
|
|
1024
|
+
value: P.operator,
|
|
1025
1025
|
onChange: (c) => a.setFieldValue(`${S}.operator`, c.target.value),
|
|
1026
1026
|
className: "filter-select",
|
|
1027
1027
|
children: A.operators.map((c) => /* @__PURE__ */ e("option", { value: c, children: c === "in" ? "Is" : "Is not" }, c))
|
|
@@ -1065,11 +1065,11 @@ const Ur = {
|
|
|
1065
1065
|
return null;
|
|
1066
1066
|
}
|
|
1067
1067
|
};
|
|
1068
|
-
return /* @__PURE__ */ e(oe, { appear: !0, show: t, as:
|
|
1068
|
+
return /* @__PURE__ */ e(oe, { appear: !0, show: t, as: J, children: /* @__PURE__ */ l(me, { as: "div", className: "relative z-50", onClose: r, children: [
|
|
1069
1069
|
/* @__PURE__ */ e(
|
|
1070
1070
|
pe,
|
|
1071
1071
|
{
|
|
1072
|
-
as:
|
|
1072
|
+
as: J,
|
|
1073
1073
|
enter: "ease-out duration-300",
|
|
1074
1074
|
enterFrom: "opacity-0",
|
|
1075
1075
|
enterTo: "opacity-100",
|
|
@@ -1082,7 +1082,7 @@ const Ur = {
|
|
|
1082
1082
|
/* @__PURE__ */ e("div", { className: "filter-modal-container", children: /* @__PURE__ */ e("div", { className: "filter-modal-positioner", children: /* @__PURE__ */ e(
|
|
1083
1083
|
pe,
|
|
1084
1084
|
{
|
|
1085
|
-
as:
|
|
1085
|
+
as: J,
|
|
1086
1086
|
enter: "ease-out duration-300",
|
|
1087
1087
|
enterFrom: "opacity-0 translate-x-full",
|
|
1088
1088
|
enterTo: "opacity-100 translate-x-0",
|
|
@@ -1146,32 +1146,25 @@ const Ur = {
|
|
|
1146
1146
|
) }),
|
|
1147
1147
|
/* @__PURE__ */ l("div", { className: "filter-footer", children: [
|
|
1148
1148
|
/* @__PURE__ */ e(
|
|
1149
|
-
|
|
1149
|
+
"button",
|
|
1150
1150
|
{
|
|
1151
|
-
|
|
1152
|
-
label: "Cancel",
|
|
1153
|
-
loader: !1,
|
|
1154
|
-
ariaLabel: "Cancel Button",
|
|
1151
|
+
type: "button",
|
|
1155
1152
|
onClick: r,
|
|
1156
|
-
|
|
1153
|
+
className: "filter-button cancel",
|
|
1154
|
+
children: "Cancel"
|
|
1157
1155
|
}
|
|
1158
1156
|
),
|
|
1159
|
-
/* @__PURE__ */
|
|
1160
|
-
|
|
1157
|
+
/* @__PURE__ */ l(
|
|
1158
|
+
"button",
|
|
1161
1159
|
{
|
|
1162
|
-
|
|
1160
|
+
type: "submit",
|
|
1161
|
+
disabled: !a.dirty,
|
|
1162
|
+
className: "filter-button apply",
|
|
1163
|
+
children: [
|
|
1163
1164
|
"Apply Filters",
|
|
1164
1165
|
" ",
|
|
1165
1166
|
d > 0 ? `(${d})` : ""
|
|
1166
|
-
]
|
|
1167
|
-
loader: !1,
|
|
1168
|
-
type: "submit",
|
|
1169
|
-
ariaLabel: "Apply Filter",
|
|
1170
|
-
className: "p-3 primaryButton !w-[70px]",
|
|
1171
|
-
"data-testid": "apply-filter",
|
|
1172
|
-
onClick: () => primaryAction?.onSubmit(),
|
|
1173
|
-
category: "primary",
|
|
1174
|
-
disabled: !a.dirty
|
|
1167
|
+
]
|
|
1175
1168
|
}
|
|
1176
1169
|
)
|
|
1177
1170
|
] })
|
|
@@ -1202,7 +1195,7 @@ const Ur = {
|
|
|
1202
1195
|
id: y,
|
|
1203
1196
|
type: s,
|
|
1204
1197
|
ref: i,
|
|
1205
|
-
className:
|
|
1198
|
+
className: W("input-field", {
|
|
1206
1199
|
"input-field--error": !!n,
|
|
1207
1200
|
"input-field--with-icon": !!o
|
|
1208
1201
|
}),
|
|
@@ -1214,7 +1207,7 @@ const Ur = {
|
|
|
1214
1207
|
] });
|
|
1215
1208
|
}, oa = {
|
|
1216
1209
|
delete: {
|
|
1217
|
-
icon:
|
|
1210
|
+
icon: Be,
|
|
1218
1211
|
iconClass: "icon--delete",
|
|
1219
1212
|
primaryButtonCategory: "danger"
|
|
1220
1213
|
// Assuming you add a 'danger' category to your Button
|
|
@@ -1248,11 +1241,11 @@ const Ur = {
|
|
|
1248
1241
|
}, k = () => {
|
|
1249
1242
|
r({ primary: !1, secondary: !0 });
|
|
1250
1243
|
};
|
|
1251
|
-
return /* @__PURE__ */ e(oe, { appear: !0, show: t, as:
|
|
1244
|
+
return /* @__PURE__ */ e(oe, { appear: !0, show: t, as: J, children: /* @__PURE__ */ l(me, { as: "div", className: "modal-dialog", onClose: () => r({}), children: [
|
|
1252
1245
|
/* @__PURE__ */ e(
|
|
1253
1246
|
pe,
|
|
1254
1247
|
{
|
|
1255
|
-
as:
|
|
1248
|
+
as: J,
|
|
1256
1249
|
enter: "ease-out duration-300",
|
|
1257
1250
|
enterFrom: "opacity-0",
|
|
1258
1251
|
enterTo: "opacity-100",
|
|
@@ -1265,7 +1258,7 @@ const Ur = {
|
|
|
1265
1258
|
/* @__PURE__ */ e("div", { className: "modal-positioner", children: /* @__PURE__ */ e(
|
|
1266
1259
|
pe,
|
|
1267
1260
|
{
|
|
1268
|
-
as:
|
|
1261
|
+
as: J,
|
|
1269
1262
|
enter: "ease-out duration-300",
|
|
1270
1263
|
enterFrom: "opacity-0 scale-95",
|
|
1271
1264
|
enterTo: "opacity-100 scale-100",
|
|
@@ -1282,7 +1275,7 @@ const Ur = {
|
|
|
1282
1275
|
] }),
|
|
1283
1276
|
/* @__PURE__ */ l("div", { className: "modal-footer", children: [
|
|
1284
1277
|
/* @__PURE__ */ e(
|
|
1285
|
-
|
|
1278
|
+
Z,
|
|
1286
1279
|
{
|
|
1287
1280
|
onClick: k,
|
|
1288
1281
|
label: m,
|
|
@@ -1290,7 +1283,7 @@ const Ur = {
|
|
|
1290
1283
|
}
|
|
1291
1284
|
),
|
|
1292
1285
|
/* @__PURE__ */ e(
|
|
1293
|
-
|
|
1286
|
+
Z,
|
|
1294
1287
|
{
|
|
1295
1288
|
onClick: a,
|
|
1296
1289
|
label: n,
|
|
@@ -1311,7 +1304,7 @@ const Ur = {
|
|
|
1311
1304
|
itemsPerPageOptions: m = [10, 15, 20]
|
|
1312
1305
|
}) => {
|
|
1313
1306
|
const i = Math.ceil(r / s), [u, y] = M(t);
|
|
1314
|
-
|
|
1307
|
+
Q(() => {
|
|
1315
1308
|
y(t);
|
|
1316
1309
|
}, [t]);
|
|
1317
1310
|
const f = Math.min((t - 1) * s + 1, r), v = Math.min(t * s, r), a = (k) => {
|
|
@@ -1398,7 +1391,7 @@ const Ur = {
|
|
|
1398
1391
|
)
|
|
1399
1392
|
] })
|
|
1400
1393
|
] });
|
|
1401
|
-
},
|
|
1394
|
+
}, Pa = ({
|
|
1402
1395
|
label: t,
|
|
1403
1396
|
value: r,
|
|
1404
1397
|
// The currently selected option's value (e.g., 'work')
|
|
@@ -1419,12 +1412,12 @@ const Ur = {
|
|
|
1419
1412
|
Te.Option,
|
|
1420
1413
|
{
|
|
1421
1414
|
value: i.value,
|
|
1422
|
-
className: ({ active: u, checked: y }) =>
|
|
1415
|
+
className: ({ active: u, checked: y }) => W("radiogroup-option", {
|
|
1423
1416
|
"radiogroup-option--active": u,
|
|
1424
1417
|
"radiogroup-option--checked": y,
|
|
1425
1418
|
"radiogroup-option--error": !!n
|
|
1426
1419
|
}),
|
|
1427
|
-
children: ({ checked: u }) => /* @__PURE__ */ l(
|
|
1420
|
+
children: ({ checked: u }) => /* @__PURE__ */ l(K, { children: [
|
|
1428
1421
|
/* @__PURE__ */ l("div", { className: "radiogroup-option-content", children: [
|
|
1429
1422
|
/* @__PURE__ */ e(Te.Label, { as: "p", className: "option-label", children: i.label }),
|
|
1430
1423
|
i.description && /* @__PURE__ */ e(
|
|
@@ -1455,7 +1448,7 @@ const Ur = {
|
|
|
1455
1448
|
...i
|
|
1456
1449
|
}) => {
|
|
1457
1450
|
const [u, y] = M(t);
|
|
1458
|
-
|
|
1451
|
+
Q(() => {
|
|
1459
1452
|
y(t);
|
|
1460
1453
|
}, [t]);
|
|
1461
1454
|
const f = ae(
|
|
@@ -1464,7 +1457,7 @@ const Ur = {
|
|
|
1464
1457
|
}, s),
|
|
1465
1458
|
[s, r]
|
|
1466
1459
|
);
|
|
1467
|
-
|
|
1460
|
+
Q(() => (u !== t && f(u), () => {
|
|
1468
1461
|
f.cancel();
|
|
1469
1462
|
}), [u, f, t]);
|
|
1470
1463
|
const v = (a) => {
|
|
@@ -1504,13 +1497,13 @@ const Ur = {
|
|
|
1504
1497
|
const [f, v] = M(""), a = f === "" ? o : o.filter(
|
|
1505
1498
|
(d) => d.label.toLowerCase().includes(f.toLowerCase())
|
|
1506
1499
|
), k = o.find((d) => r?.id ? d.id === r.id : d.id === r || d.value === r);
|
|
1507
|
-
return /* @__PURE__ */ e(
|
|
1500
|
+
return /* @__PURE__ */ e(X, { value: r, onChange: s, disabled: m, children: /* @__PURE__ */ l("div", { className: "select-wrapper", ref: u, children: [
|
|
1508
1501
|
t && /* @__PURE__ */ e("label", { className: "select-label", children: t }),
|
|
1509
1502
|
/* @__PURE__ */ l("div", { className: "select-button-container", children: [
|
|
1510
1503
|
/* @__PURE__ */ l(
|
|
1511
1504
|
or,
|
|
1512
1505
|
{
|
|
1513
|
-
className:
|
|
1506
|
+
className: W("select-button", {
|
|
1514
1507
|
"select-button--error": !!i
|
|
1515
1508
|
}),
|
|
1516
1509
|
children: [
|
|
@@ -1539,7 +1532,7 @@ const Ur = {
|
|
|
1539
1532
|
{
|
|
1540
1533
|
className: ({ active: p }) => `select-option ${p ? "active" : ""}`,
|
|
1541
1534
|
value: d,
|
|
1542
|
-
children: ({ selected: p }) => /* @__PURE__ */ l(
|
|
1535
|
+
children: ({ selected: p }) => /* @__PURE__ */ l(K, { children: [
|
|
1543
1536
|
/* @__PURE__ */ l("div", { className: "option-content", children: [
|
|
1544
1537
|
d.icon && /* @__PURE__ */ e(d.icon, { className: "option-icon" }),
|
|
1545
1538
|
/* @__PURE__ */ e(
|
|
@@ -1569,7 +1562,7 @@ const Ur = {
|
|
|
1569
1562
|
] }) });
|
|
1570
1563
|
}, Wr = () => {
|
|
1571
1564
|
const [t, r] = M(window.location.pathname);
|
|
1572
|
-
return
|
|
1565
|
+
return Q(() => {
|
|
1573
1566
|
const s = () => {
|
|
1574
1567
|
r(window.location.pathname);
|
|
1575
1568
|
};
|
|
@@ -1582,9 +1575,9 @@ const Ur = {
|
|
|
1582
1575
|
if ((s.href || s.url || s.path) === r || s.children && Ke(s.children, r))
|
|
1583
1576
|
return s;
|
|
1584
1577
|
return null;
|
|
1585
|
-
},
|
|
1578
|
+
}, Ba = ({ item: t, isCollapsed: r, level: s = 0 }) => {
|
|
1586
1579
|
const { pathname: o } = Wr(), n = t.href || t.url || t.path, [m, i] = M(!1), u = t.icon;
|
|
1587
|
-
|
|
1580
|
+
Q(() => {
|
|
1588
1581
|
Ke([t], o) && i(!0);
|
|
1589
1582
|
}, [t, o]);
|
|
1590
1583
|
const y = o === n, f = !y && !!Ke([t], o), v = (a) => {
|
|
@@ -1593,7 +1586,7 @@ const Ur = {
|
|
|
1593
1586
|
return /* @__PURE__ */ l(
|
|
1594
1587
|
"div",
|
|
1595
1588
|
{
|
|
1596
|
-
className:
|
|
1589
|
+
className: W("nav-item-container", {
|
|
1597
1590
|
"nav-item-container--parent-active": f,
|
|
1598
1591
|
[`nav-item-container--level-${s}`]: s > 0
|
|
1599
1592
|
}),
|
|
@@ -1604,7 +1597,7 @@ const Ur = {
|
|
|
1604
1597
|
href: n,
|
|
1605
1598
|
target: t.target,
|
|
1606
1599
|
rel: t.target === "_blank" ? "noopener noreferrer" : void 0,
|
|
1607
|
-
className:
|
|
1600
|
+
className: W("nav-item", {
|
|
1608
1601
|
"nav-item--active": y,
|
|
1609
1602
|
"nav-item--collapsed": r
|
|
1610
1603
|
}),
|
|
@@ -1622,7 +1615,7 @@ const Ur = {
|
|
|
1622
1615
|
children: /* @__PURE__ */ e(
|
|
1623
1616
|
ba,
|
|
1624
1617
|
{
|
|
1625
|
-
className:
|
|
1618
|
+
className: W("nav-chevron", {
|
|
1626
1619
|
"nav-chevron--open": m
|
|
1627
1620
|
})
|
|
1628
1621
|
}
|
|
@@ -1635,13 +1628,13 @@ const Ur = {
|
|
|
1635
1628
|
t.children && /* @__PURE__ */ e(
|
|
1636
1629
|
"div",
|
|
1637
1630
|
{
|
|
1638
|
-
className:
|
|
1631
|
+
className: W("sub-menu", {
|
|
1639
1632
|
"sub-menu--open": m,
|
|
1640
1633
|
"sub-menu--collapsed": r
|
|
1641
1634
|
}),
|
|
1642
1635
|
"aria-hidden": !m || r,
|
|
1643
1636
|
children: t.children.map((a) => /* @__PURE__ */ e(
|
|
1644
|
-
|
|
1637
|
+
Ba,
|
|
1645
1638
|
{
|
|
1646
1639
|
item: a,
|
|
1647
1640
|
isCollapsed: r,
|
|
@@ -1663,7 +1656,7 @@ const Ur = {
|
|
|
1663
1656
|
logoSmall: m,
|
|
1664
1657
|
logoLarge: i,
|
|
1665
1658
|
user: u = { name: "", email: "" }
|
|
1666
|
-
}) => /* @__PURE__ */ l(
|
|
1659
|
+
}) => /* @__PURE__ */ l(K, { children: [
|
|
1667
1660
|
o && /* @__PURE__ */ e(
|
|
1668
1661
|
"div",
|
|
1669
1662
|
{
|
|
@@ -1675,7 +1668,7 @@ const Ur = {
|
|
|
1675
1668
|
/* @__PURE__ */ l(
|
|
1676
1669
|
"aside",
|
|
1677
1670
|
{
|
|
1678
|
-
className:
|
|
1671
|
+
className: W("sidebar", {
|
|
1679
1672
|
"sidebar--collapsed": r,
|
|
1680
1673
|
"sidebar--mobile-open": o
|
|
1681
1674
|
}),
|
|
@@ -1705,7 +1698,7 @@ const Ur = {
|
|
|
1705
1698
|
}
|
|
1706
1699
|
)
|
|
1707
1700
|
] }),
|
|
1708
|
-
/* @__PURE__ */ e("nav", { className: "sidebar-nav", "aria-label": "Primary", children: /* @__PURE__ */ e("ul", { className: "sidebar-nav-list", children: t.map((y) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
1701
|
+
/* @__PURE__ */ e("nav", { className: "sidebar-nav", "aria-label": "Primary", children: /* @__PURE__ */ e("ul", { className: "sidebar-nav-list", children: t.map((y) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(Ba, { item: y, isCollapsed: r }) }, y.label || y.name)) }) }),
|
|
1709
1702
|
/* @__PURE__ */ l("div", { className: "sidebar-footer", children: [
|
|
1710
1703
|
/* @__PURE__ */ e(Ta, { src: u.avatar, name: u.name, size: "medium" }),
|
|
1711
1704
|
/* @__PURE__ */ l("div", { className: "user-info", children: [
|
|
@@ -1733,7 +1726,7 @@ const Ur = {
|
|
|
1733
1726
|
className: s,
|
|
1734
1727
|
...o
|
|
1735
1728
|
}) => {
|
|
1736
|
-
const n =
|
|
1729
|
+
const n = W(
|
|
1737
1730
|
"spinner",
|
|
1738
1731
|
`spinner--size-${t}`,
|
|
1739
1732
|
`spinner--color-${r}`,
|
|
@@ -1791,7 +1784,7 @@ const Ur = {
|
|
|
1791
1784
|
{
|
|
1792
1785
|
id: y,
|
|
1793
1786
|
ref: n,
|
|
1794
|
-
className:
|
|
1787
|
+
className: W("textarea-field", {
|
|
1795
1788
|
"textarea-field--error": !!s
|
|
1796
1789
|
}),
|
|
1797
1790
|
maxLength: m,
|
|
@@ -1816,7 +1809,7 @@ const Ur = {
|
|
|
1816
1809
|
{
|
|
1817
1810
|
checked: r,
|
|
1818
1811
|
onChange: s,
|
|
1819
|
-
className:
|
|
1812
|
+
className: W("switch-element", {
|
|
1820
1813
|
// Renamed from switch-wrapper
|
|
1821
1814
|
"switch-element--error": !!n
|
|
1822
1815
|
}),
|
|
@@ -1841,7 +1834,7 @@ const Ur = {
|
|
|
1841
1834
|
...i
|
|
1842
1835
|
}) => {
|
|
1843
1836
|
const u = re.useId();
|
|
1844
|
-
return /* @__PURE__ */ l(
|
|
1837
|
+
return /* @__PURE__ */ l(K, { children: [
|
|
1845
1838
|
re.cloneElement(t, { "data-tooltip-id": u }),
|
|
1846
1839
|
/* @__PURE__ */ e(
|
|
1847
1840
|
Nt,
|
|
@@ -1881,7 +1874,7 @@ const Ur = {
|
|
|
1881
1874
|
closeOnOverlayClick: f = !0
|
|
1882
1875
|
}) => {
|
|
1883
1876
|
const v = s[o], a = Object.keys(s), k = a.indexOf(o), d = (k + 1) / a.length * 100, p = k > 0 && m.onBack;
|
|
1884
|
-
return /* @__PURE__ */ e(oe, { show: t, as:
|
|
1877
|
+
return /* @__PURE__ */ e(oe, { show: t, as: J, children: /* @__PURE__ */ l(
|
|
1885
1878
|
me,
|
|
1886
1879
|
{
|
|
1887
1880
|
as: "div",
|
|
@@ -1892,7 +1885,7 @@ const Ur = {
|
|
|
1892
1885
|
/* @__PURE__ */ e(
|
|
1893
1886
|
pe,
|
|
1894
1887
|
{
|
|
1895
|
-
as:
|
|
1888
|
+
as: J,
|
|
1896
1889
|
enter: "ease-out duration-300",
|
|
1897
1890
|
enterFrom: "opacity-0",
|
|
1898
1891
|
enterTo: "opacity-100",
|
|
@@ -1905,7 +1898,7 @@ const Ur = {
|
|
|
1905
1898
|
/* @__PURE__ */ e("div", { className: "wizard-container", children: /* @__PURE__ */ e("div", { className: "wizard-positioner", children: /* @__PURE__ */ e(
|
|
1906
1899
|
pe,
|
|
1907
1900
|
{
|
|
1908
|
-
as:
|
|
1901
|
+
as: J,
|
|
1909
1902
|
enter: "transform transition ease-in-out duration-500",
|
|
1910
1903
|
enterFrom: "translate-x-full",
|
|
1911
1904
|
enterTo: "translate-x-0",
|
|
@@ -1990,7 +1983,7 @@ const Ur = {
|
|
|
1990
1983
|
// A clearer prop name
|
|
1991
1984
|
...u
|
|
1992
1985
|
}) => {
|
|
1993
|
-
const y =
|
|
1986
|
+
const y = W(
|
|
1994
1987
|
"page-layout",
|
|
1995
1988
|
{
|
|
1996
1989
|
"page-layout--with-footer": r,
|
|
@@ -2002,7 +1995,7 @@ const Ur = {
|
|
|
2002
1995
|
/* @__PURE__ */ e("div", { className: "page-layout-content", children: t }),
|
|
2003
1996
|
r && /* @__PURE__ */ e("footer", { className: "page-layout-footer", children: s || /* @__PURE__ */ l("div", { className: "footer-actions", children: [
|
|
2004
1997
|
m?.show && /* @__PURE__ */ e(
|
|
2005
|
-
|
|
1998
|
+
Z,
|
|
2006
1999
|
{
|
|
2007
2000
|
category: "secondary",
|
|
2008
2001
|
label: m.label || "Tertiary",
|
|
@@ -2010,7 +2003,7 @@ const Ur = {
|
|
|
2010
2003
|
}
|
|
2011
2004
|
),
|
|
2012
2005
|
n?.show && /* @__PURE__ */ e(
|
|
2013
|
-
|
|
2006
|
+
Z,
|
|
2014
2007
|
{
|
|
2015
2008
|
category: "secondary",
|
|
2016
2009
|
label: n.label || "Cancel",
|
|
@@ -2018,7 +2011,7 @@ const Ur = {
|
|
|
2018
2011
|
}
|
|
2019
2012
|
),
|
|
2020
2013
|
o?.show && /* @__PURE__ */ e(
|
|
2021
|
-
|
|
2014
|
+
Z,
|
|
2022
2015
|
{
|
|
2023
2016
|
category: "primary",
|
|
2024
2017
|
label: o.label || "Save",
|
|
@@ -2064,7 +2057,7 @@ const Ur = {
|
|
|
2064
2057
|
/* @__PURE__ */ e(hr, { children: /* @__PURE__ */ e(
|
|
2065
2058
|
oe,
|
|
2066
2059
|
{
|
|
2067
|
-
as:
|
|
2060
|
+
as: J,
|
|
2068
2061
|
enter: "transition ease-out duration-100",
|
|
2069
2062
|
enterFrom: "transform opacity-0 scale-95",
|
|
2070
2063
|
enterTo: "transform opacity-100 scale-100",
|
|
@@ -2423,7 +2416,7 @@ const ke = nn(), Fe = ke.axiosGet, sn = ke.axiosDelete, $e = ke.axiosPost, ln =
|
|
|
2423
2416
|
}
|
|
2424
2417
|
}, ta = (t, r) => {
|
|
2425
2418
|
const [s, o] = M(t);
|
|
2426
|
-
return
|
|
2419
|
+
return Q(
|
|
2427
2420
|
() => {
|
|
2428
2421
|
const n = br.debounce(() => {
|
|
2429
2422
|
o(t);
|
|
@@ -2494,11 +2487,11 @@ const ke = nn(), Fe = ke.axiosGet, sn = ke.axiosDelete, $e = ke.axiosPost, ln =
|
|
|
2494
2487
|
},
|
|
2495
2488
|
isChanged: u = !1
|
|
2496
2489
|
}) => {
|
|
2497
|
-
const [y, f] = M(da[0]), [v, a] = M(""), k = ta(v, 400), [d, p] = M([]), [T, L] = M(/* @__PURE__ */ new Set()), [R, S] = M(!1), [A,
|
|
2490
|
+
const [y, f] = M(da[0]), [v, a] = M(""), k = ta(v, 400), [d, p] = M([]), [T, L] = M(/* @__PURE__ */ new Set()), [R, S] = M(!1), [A, P] = M(ua[0]), {
|
|
2498
2491
|
control: I,
|
|
2499
2492
|
handleSubmit: V,
|
|
2500
2493
|
watch: z,
|
|
2501
|
-
formState: { errors:
|
|
2494
|
+
formState: { errors: B, isSubmitting: g }
|
|
2502
2495
|
} = At({
|
|
2503
2496
|
defaultValues: { pendingInvites: [] },
|
|
2504
2497
|
resolver: It(un)
|
|
@@ -2506,7 +2499,7 @@ const ke = nn(), Fe = ke.axiosGet, sn = ke.axiosDelete, $e = ke.axiosPost, ln =
|
|
|
2506
2499
|
control: I,
|
|
2507
2500
|
name: "pendingInvites"
|
|
2508
2501
|
}), b = z("pendingInvites");
|
|
2509
|
-
|
|
2502
|
+
Q(() => {
|
|
2510
2503
|
k.length > 1 ? (S(!0), on(y.name, k).then((F) => {
|
|
2511
2504
|
p(F);
|
|
2512
2505
|
}).catch((F) => console.error("Search failed:", F)).finally(() => S(!1))) : (p([]), L(/* @__PURE__ */ new Set()));
|
|
@@ -2521,7 +2514,7 @@ const ke = nn(), Fe = ke.axiosGet, sn = ke.axiosDelete, $e = ke.axiosPost, ln =
|
|
|
2521
2514
|
h.find((C) => C.id === F.id) || N({ ...F, permission: A.name });
|
|
2522
2515
|
}), L(/* @__PURE__ */ new Set()), a("");
|
|
2523
2516
|
}, q = (F) => {
|
|
2524
|
-
|
|
2517
|
+
P(F), h.forEach(
|
|
2525
2518
|
(C, E) => c(E, { ...h[E], permission: F.name })
|
|
2526
2519
|
);
|
|
2527
2520
|
}, G = async (F) => {
|
|
@@ -2609,8 +2602,8 @@ const ke = nn(), Fe = ke.axiosGet, sn = ke.axiosDelete, $e = ke.axiosPost, ln =
|
|
|
2609
2602
|
}
|
|
2610
2603
|
),
|
|
2611
2604
|
/* @__PURE__ */ l("div", { className: "relative grid grid-cols-3 gap-2 items-start", children: [
|
|
2612
|
-
/* @__PURE__ */ e("div", { className: "col-span-1", children: /* @__PURE__ */ e(
|
|
2613
|
-
/* @__PURE__ */ l(
|
|
2605
|
+
/* @__PURE__ */ e("div", { className: "col-span-1", children: /* @__PURE__ */ e(X, { value: y, onChange: f, children: /* @__PURE__ */ l("div", { className: "relative", children: [
|
|
2606
|
+
/* @__PURE__ */ l(X.Button, { className: "relative w-full border border-gray-300 rounded-md shadow-sm pl-3 pr-10 py-2 text-left hover:cursor-pointer focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 sm:text-sm", children: [
|
|
2614
2607
|
/* @__PURE__ */ l("span", { className: "flex items-center", children: [
|
|
2615
2608
|
/* @__PURE__ */ e(y.icon, { className: "h-5 w-5 text-gray-400 mr-2" }),
|
|
2616
2609
|
/* @__PURE__ */ e("span", { className: "truncate", children: y.name })
|
|
@@ -2620,16 +2613,16 @@ const ke = nn(), Fe = ke.axiosGet, sn = ke.axiosDelete, $e = ke.axiosPost, ln =
|
|
|
2620
2613
|
/* @__PURE__ */ e(
|
|
2621
2614
|
oe,
|
|
2622
2615
|
{
|
|
2623
|
-
as:
|
|
2616
|
+
as: J,
|
|
2624
2617
|
leave: "transition ease-in duration-100",
|
|
2625
2618
|
leaveFrom: "opacity-100",
|
|
2626
2619
|
leaveTo: "opacity-0",
|
|
2627
|
-
children: /* @__PURE__ */ e(
|
|
2628
|
-
|
|
2620
|
+
children: /* @__PURE__ */ e(X.Options, { className: "absolute z-10 mt-1 w-full bg-white shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm", children: da.map((F) => /* @__PURE__ */ e(
|
|
2621
|
+
X.Option,
|
|
2629
2622
|
{
|
|
2630
2623
|
value: F,
|
|
2631
2624
|
className: ({ active: C }) => `${C ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
|
|
2632
|
-
children: ({ selected: C }) => /* @__PURE__ */ l(
|
|
2625
|
+
children: ({ selected: C }) => /* @__PURE__ */ l(K, { children: [
|
|
2633
2626
|
/* @__PURE__ */ l(
|
|
2634
2627
|
"span",
|
|
2635
2628
|
{
|
|
@@ -2669,7 +2662,7 @@ const ke = nn(), Fe = ke.axiosGet, sn = ke.axiosDelete, $e = ke.axiosPost, ln =
|
|
|
2669
2662
|
exit: { opacity: 0, y: -10 },
|
|
2670
2663
|
transition: { duration: 0.2 },
|
|
2671
2664
|
className: "absolute top-full mt-2 w-full col-span-3 bg-white border border-gray-300 rounded-lg shadow-lg z-10",
|
|
2672
|
-
children: R ? /* @__PURE__ */ e("div", { className: "p-4 text-center text-gray-500", children: "Loading..." }) : /* @__PURE__ */ l(
|
|
2665
|
+
children: R ? /* @__PURE__ */ e("div", { className: "p-4 text-center text-gray-500", children: "Loading..." }) : /* @__PURE__ */ l(K, { children: [
|
|
2673
2666
|
/* @__PURE__ */ e("div", { className: "max-h-60 overflow-y-auto p-2 space-y-1", children: d.map((F) => {
|
|
2674
2667
|
const C = $(F);
|
|
2675
2668
|
return /* @__PURE__ */ l(
|
|
@@ -2697,7 +2690,7 @@ const ke = nn(), Fe = ke.axiosGet, sn = ke.axiosDelete, $e = ke.axiosPost, ln =
|
|
|
2697
2690
|
}
|
|
2698
2691
|
),
|
|
2699
2692
|
/* @__PURE__ */ e("span", { className: "text-md font-medium text-gray-800 truncate", children: F.name }),
|
|
2700
|
-
C ? /* @__PURE__ */ l(
|
|
2693
|
+
C ? /* @__PURE__ */ l(K, { children: [
|
|
2701
2694
|
/* @__PURE__ */ e("span", { className: "text-sm px-[12px] py-[2px] border border-dashed rounded-xl bg-teal-100 text-teal-700", children: C }),
|
|
2702
2695
|
/* @__PURE__ */ e("span", { className: "text-sm text-gray-400", children: "Already added" })
|
|
2703
2696
|
] }) : ""
|
|
@@ -2743,12 +2736,12 @@ const ke = nn(), Fe = ke.axiosGet, sn = ke.axiosDelete, $e = ke.axiosPost, ln =
|
|
|
2743
2736
|
")"
|
|
2744
2737
|
] }),
|
|
2745
2738
|
n === se.DRIVE && /* @__PURE__ */ e(
|
|
2746
|
-
|
|
2739
|
+
X,
|
|
2747
2740
|
{
|
|
2748
2741
|
value: A,
|
|
2749
2742
|
onChange: q,
|
|
2750
2743
|
children: /* @__PURE__ */ l("div", { className: "relative", children: [
|
|
2751
|
-
/* @__PURE__ */ l(
|
|
2744
|
+
/* @__PURE__ */ l(X.Button, { className: "relative w-full border border-gray-300 bg-white rounded-md shadow-sm pl-3 pr-10 py-2 text-left hover:cursor-pointer focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 sm:text-sm", children: [
|
|
2752
2745
|
/* @__PURE__ */ l("span", { className: "flex items-center", children: [
|
|
2753
2746
|
/* @__PURE__ */ e(A.icon, { className: "h-5 w-5 text-gray-400 mr-2" }),
|
|
2754
2747
|
/* @__PURE__ */ l("span", { className: "truncate", children: [
|
|
@@ -2761,16 +2754,16 @@ const ke = nn(), Fe = ke.axiosGet, sn = ke.axiosDelete, $e = ke.axiosPost, ln =
|
|
|
2761
2754
|
/* @__PURE__ */ e(
|
|
2762
2755
|
oe,
|
|
2763
2756
|
{
|
|
2764
|
-
as:
|
|
2757
|
+
as: J,
|
|
2765
2758
|
leave: "transition ease-in duration-100",
|
|
2766
2759
|
leaveFrom: "opacity-100",
|
|
2767
2760
|
leaveTo: "opacity-0",
|
|
2768
|
-
children: /* @__PURE__ */ e(
|
|
2769
|
-
|
|
2761
|
+
children: /* @__PURE__ */ e(X.Options, { className: "absolute z-10 mt-1 w-auto min-w-full bg-white shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm", children: ua.map((F) => /* @__PURE__ */ e(
|
|
2762
|
+
X.Option,
|
|
2770
2763
|
{
|
|
2771
2764
|
value: F,
|
|
2772
2765
|
className: ({ active: C }) => `${C ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
|
|
2773
|
-
children: ({ selected: C, active: E }) => /* @__PURE__ */ l(
|
|
2766
|
+
children: ({ selected: C, active: E }) => /* @__PURE__ */ l(K, { children: [
|
|
2774
2767
|
/* @__PURE__ */ l(
|
|
2775
2768
|
"span",
|
|
2776
2769
|
{
|
|
@@ -2892,11 +2885,11 @@ const ke = nn(), Fe = ke.axiosGet, sn = ke.axiosDelete, $e = ke.axiosPost, ln =
|
|
|
2892
2885
|
return (
|
|
2893
2886
|
// FIX: The <Listbox> component now wraps both the button and the portal.
|
|
2894
2887
|
// This provides the necessary context for both children.
|
|
2895
|
-
/* @__PURE__ */ l(
|
|
2888
|
+
/* @__PURE__ */ l(X, { value: k, onChange: (p) => {
|
|
2896
2889
|
s(p), n(!1);
|
|
2897
2890
|
}, children: [
|
|
2898
2891
|
/* @__PURE__ */ l(
|
|
2899
|
-
|
|
2892
|
+
X.Button,
|
|
2900
2893
|
{
|
|
2901
2894
|
ref: m.setReference,
|
|
2902
2895
|
...v(),
|
|
@@ -2910,7 +2903,7 @@ const ke = nn(), Fe = ke.axiosGet, sn = ke.axiosDelete, $e = ke.axiosPost, ln =
|
|
|
2910
2903
|
/* @__PURE__ */ e(kr, { children: /* @__PURE__ */ e(
|
|
2911
2904
|
oe,
|
|
2912
2905
|
{
|
|
2913
|
-
as:
|
|
2906
|
+
as: J,
|
|
2914
2907
|
show: o,
|
|
2915
2908
|
enter: "transition ease-out duration-100",
|
|
2916
2909
|
enterFrom: "transform opacity-0 scale-95",
|
|
@@ -2919,7 +2912,7 @@ const ke = nn(), Fe = ke.axiosGet, sn = ke.axiosDelete, $e = ke.axiosPost, ln =
|
|
|
2919
2912
|
leaveFrom: "transform opacity-100 scale-100",
|
|
2920
2913
|
leaveTo: "transform opacity-0 scale-95",
|
|
2921
2914
|
children: /* @__PURE__ */ e(
|
|
2922
|
-
|
|
2915
|
+
X.Options,
|
|
2923
2916
|
{
|
|
2924
2917
|
ref: m.setFloating,
|
|
2925
2918
|
style: i,
|
|
@@ -2927,7 +2920,7 @@ const ke = nn(), Fe = ke.axiosGet, sn = ke.axiosDelete, $e = ke.axiosPost, ln =
|
|
|
2927
2920
|
static: !0,
|
|
2928
2921
|
className: "z-50 w-48 bg-white shadow-lg rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm",
|
|
2929
2922
|
children: Je.filter((p) => r.includes(p.value)).map((p) => /* @__PURE__ */ e(
|
|
2930
|
-
|
|
2923
|
+
X.Option,
|
|
2931
2924
|
{
|
|
2932
2925
|
className: ({
|
|
2933
2926
|
active: T
|
|
@@ -2936,7 +2929,7 @@ const ke = nn(), Fe = ke.axiosGet, sn = ke.axiosDelete, $e = ke.axiosPost, ln =
|
|
|
2936
2929
|
${p.isDestructive && T ? "bg-red-100 text-red-900" : ""}
|
|
2937
2930
|
${p.isDestructive && !T ? "text-red-600" : ""}`,
|
|
2938
2931
|
value: p,
|
|
2939
|
-
children: ({ selected: T }) => /* @__PURE__ */ l(
|
|
2932
|
+
children: ({ selected: T }) => /* @__PURE__ */ l(K, { children: [
|
|
2940
2933
|
/* @__PURE__ */ l(
|
|
2941
2934
|
"span",
|
|
2942
2935
|
{
|
|
@@ -2977,7 +2970,7 @@ const ke = nn(), Fe = ke.axiosGet, sn = ke.axiosDelete, $e = ke.axiosPost, ln =
|
|
|
2977
2970
|
roles: i.roles.filter(
|
|
2978
2971
|
(R) => R.name.toLowerCase().includes(k.toLowerCase())
|
|
2979
2972
|
)
|
|
2980
|
-
}, p = async (R, S, A,
|
|
2973
|
+
}, p = async (R, S, A, P) => {
|
|
2981
2974
|
const I = S.value;
|
|
2982
2975
|
u(I === "Remove" ? (V) => ({
|
|
2983
2976
|
...V,
|
|
@@ -3044,7 +3037,7 @@ const ke = nn(), Fe = ke.axiosGet, sn = ke.axiosDelete, $e = ke.axiosPost, ln =
|
|
|
3044
3037
|
animate: { y: 0, opacity: 1 },
|
|
3045
3038
|
exit: { y: -10, opacity: 0 },
|
|
3046
3039
|
transition: { duration: 0.2 },
|
|
3047
|
-
children: /* @__PURE__ */ e(ee.Panels, { as:
|
|
3040
|
+
children: /* @__PURE__ */ e(ee.Panels, { as: J, children: T.map((R) => /* @__PURE__ */ e(
|
|
3048
3041
|
ee.Panel,
|
|
3049
3042
|
{
|
|
3050
3043
|
className: "space-y-3 focus:outline-none",
|
|
@@ -3167,7 +3160,7 @@ const ke = nn(), Fe = ke.axiosGet, sn = ke.axiosDelete, $e = ke.axiosPost, ln =
|
|
|
3167
3160
|
animate: { opacity: 1, scale: 1 },
|
|
3168
3161
|
className: "flex flex-col items-center justify-center text-center p-8 mt-10",
|
|
3169
3162
|
children: [
|
|
3170
|
-
/* @__PURE__ */ e(
|
|
3163
|
+
/* @__PURE__ */ e(Pt, { className: "h-12 w-12 text-gray-400" }),
|
|
3171
3164
|
/* @__PURE__ */ e("h3", { className: "mt-2 text-sm font-medium text-gray-900", children: "No Users Found" }),
|
|
3172
3165
|
/* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: y ? `No one found matching "${y}"` : `There are no users in this ${t.type}.` })
|
|
3173
3166
|
]
|
|
@@ -3264,7 +3257,7 @@ const ke = nn(), Fe = ke.axiosGet, sn = ke.axiosDelete, $e = ke.axiosPost, ln =
|
|
|
3264
3257
|
allowedPermissions: u = [],
|
|
3265
3258
|
...y
|
|
3266
3259
|
}) => {
|
|
3267
|
-
const [f, v] = M(de.INVITE), [a, k] = M(t), [d, p] = M(null), [T, L] = M(!1), [R, S] = M([]), [A,
|
|
3260
|
+
const [f, v] = M(de.INVITE), [a, k] = M(t), [d, p] = M(null), [T, L] = M(!1), [R, S] = M([]), [A, P] = M(de.MANAGE), I = () => {
|
|
3268
3261
|
v(de.INVITE), p(null), m();
|
|
3269
3262
|
}, V = () => {
|
|
3270
3263
|
v(de.MANAGE);
|
|
@@ -3277,8 +3270,8 @@ const ke = nn(), Fe = ke.axiosGet, sn = ke.axiosDelete, $e = ke.axiosPost, ln =
|
|
|
3277
3270
|
}
|
|
3278
3271
|
S(resp);
|
|
3279
3272
|
}
|
|
3280
|
-
p({ id: h, type: w, name: N }),
|
|
3281
|
-
},
|
|
3273
|
+
p({ id: h, type: w, name: N }), P(f), v(de.MEMBERS);
|
|
3274
|
+
}, B = (h) => {
|
|
3282
3275
|
console.log("changedExistingShares", h), k(h);
|
|
3283
3276
|
const N = !We.isEqual(
|
|
3284
3277
|
We.mapValues(t, (w) => w.map((c) => ({ id: c.id, permission: c.permission }))),
|
|
@@ -3286,7 +3279,7 @@ const ke = nn(), Fe = ke.axiosGet, sn = ke.axiosDelete, $e = ke.axiosPost, ln =
|
|
|
3286
3279
|
);
|
|
3287
3280
|
L(N), v(f === de.MEMBERS ? A : de.INVITE);
|
|
3288
3281
|
};
|
|
3289
|
-
return /* @__PURE__ */ e(oe, { appear: !0, show: r, as:
|
|
3282
|
+
return /* @__PURE__ */ e(oe, { appear: !0, show: r, as: J, children: /* @__PURE__ */ l(me, { as: "div", className: "relative z-50", onClose: I, children: [
|
|
3290
3283
|
/* @__PURE__ */ e("div", { className: "filter-modal-overlay", "aria-hidden": "true" }),
|
|
3291
3284
|
/* @__PURE__ */ e("div", { className: "filter-modal-container", children: /* @__PURE__ */ e("div", { className: "filter-modal-positioner", children: /* @__PURE__ */ e(Ne, { className: "filter-modal-panel", style: { background: "white" }, children: (() => {
|
|
3292
3285
|
switch (f) {
|
|
@@ -3303,7 +3296,7 @@ const ke = nn(), Fe = ke.axiosGet, sn = ke.axiosDelete, $e = ke.axiosPost, ln =
|
|
|
3303
3296
|
pn,
|
|
3304
3297
|
{
|
|
3305
3298
|
entity: o,
|
|
3306
|
-
onBack:
|
|
3299
|
+
onBack: B,
|
|
3307
3300
|
onClose: I,
|
|
3308
3301
|
onOpenMembers: z,
|
|
3309
3302
|
existingShares: a,
|
|
@@ -3327,7 +3320,7 @@ const ke = nn(), Fe = ke.axiosGet, sn = ke.axiosDelete, $e = ke.axiosPost, ln =
|
|
|
3327
3320
|
yn,
|
|
3328
3321
|
{
|
|
3329
3322
|
entity: d,
|
|
3330
|
-
onBack:
|
|
3323
|
+
onBack: B,
|
|
3331
3324
|
onClose: I,
|
|
3332
3325
|
calledBy: n,
|
|
3333
3326
|
existingShares: a,
|
|
@@ -3394,19 +3387,19 @@ function qe({
|
|
|
3394
3387
|
getOptionId: d = (T) => String(T.id),
|
|
3395
3388
|
getOptionLabel: p = (T) => T.name
|
|
3396
3389
|
}) {
|
|
3397
|
-
const T = Qe(), L = Qe(), [R, S] = M(""), A = ue(""),
|
|
3390
|
+
const T = Qe(), L = Qe(), [R, S] = M(""), A = ue(""), P = ne(() => {
|
|
3398
3391
|
const h = /* @__PURE__ */ new Map();
|
|
3399
3392
|
for (const N of r) h.set(d(N), N);
|
|
3400
3393
|
return h;
|
|
3401
|
-
}, [r, d]), I = ne(() => Array.isArray(s) ? s.map((h) => h && typeof h == "object" ?
|
|
3394
|
+
}, [r, d]), I = ne(() => Array.isArray(s) ? s.map((h) => h && typeof h == "object" ? P.get(d(h)) || null : P.get(String(h))).filter(Boolean) : [], [s, P, d]), V = ne(() => {
|
|
3402
3395
|
if (!R) return r;
|
|
3403
3396
|
const h = R.toLowerCase();
|
|
3404
3397
|
return r.filter((N) => p(N).toLowerCase().includes(h));
|
|
3405
3398
|
}, [r, R, p]);
|
|
3406
|
-
|
|
3399
|
+
Q(() => {
|
|
3407
3400
|
f === "server" && R.length >= k && R !== A.current && (A.current = R, v && v(R));
|
|
3408
3401
|
}, [R, f, k, v]);
|
|
3409
|
-
const z = f === "client" ? V : r,
|
|
3402
|
+
const z = f === "client" ? V : r, B = () => {
|
|
3410
3403
|
if (!I.length)
|
|
3411
3404
|
return /* @__PURE__ */ e("span", { className: "text-gray-500", children: m });
|
|
3412
3405
|
const h = I.slice(0, u), N = I.length - u;
|
|
@@ -3426,12 +3419,12 @@ function qe({
|
|
|
3426
3419
|
] })
|
|
3427
3420
|
] });
|
|
3428
3421
|
};
|
|
3429
|
-
return /* @__PURE__ */ e(
|
|
3422
|
+
return /* @__PURE__ */ e(X, { value: I, onChange: (h) => {
|
|
3430
3423
|
const N = Array.from(new Set(h.map((w) => d(w))));
|
|
3431
3424
|
y !== -1 && N.length > y || o(N);
|
|
3432
3425
|
}, multiple: !0, by: "id", children: ({ open: h }) => /* @__PURE__ */ l("div", { children: [
|
|
3433
3426
|
/* @__PURE__ */ e(
|
|
3434
|
-
|
|
3427
|
+
X.Label,
|
|
3435
3428
|
{
|
|
3436
3429
|
id: T,
|
|
3437
3430
|
className: "block text-sm font-medium leading-6 text-gray-900",
|
|
@@ -3440,7 +3433,7 @@ function qe({
|
|
|
3440
3433
|
),
|
|
3441
3434
|
/* @__PURE__ */ l("div", { className: "relative mt-2", children: [
|
|
3442
3435
|
/* @__PURE__ */ l(
|
|
3443
|
-
|
|
3436
|
+
X.Button,
|
|
3444
3437
|
{
|
|
3445
3438
|
"aria-labelledby": T,
|
|
3446
3439
|
"aria-invalid": !!i,
|
|
@@ -3451,7 +3444,7 @@ function qe({
|
|
|
3451
3444
|
i ? "ring-red-500" : "ring-gray-300"
|
|
3452
3445
|
),
|
|
3453
3446
|
children: [
|
|
3454
|
-
/* @__PURE__ */ e("span", { className: "block truncate", children:
|
|
3447
|
+
/* @__PURE__ */ e("span", { className: "block truncate", children: B() }),
|
|
3455
3448
|
/* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ e(fa, { className: "w-5 h-5 text-gray-400", "aria-hidden": "true" }) })
|
|
3456
3449
|
]
|
|
3457
3450
|
}
|
|
@@ -3459,12 +3452,12 @@ function qe({
|
|
|
3459
3452
|
/* @__PURE__ */ e(
|
|
3460
3453
|
oe,
|
|
3461
3454
|
{
|
|
3462
|
-
as:
|
|
3455
|
+
as: J,
|
|
3463
3456
|
show: h,
|
|
3464
3457
|
leave: "transition ease-in duration-100",
|
|
3465
3458
|
leaveFrom: "opacity-100",
|
|
3466
3459
|
leaveTo: "opacity-0",
|
|
3467
|
-
children: /* @__PURE__ */ l(
|
|
3460
|
+
children: /* @__PURE__ */ l(X.Options, { className: "absolute z-10 w-full py-1 mt-1 overflow-auto text-base bg-white rounded-md shadow-lg max-h-60 ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm", children: [
|
|
3468
3461
|
/* @__PURE__ */ e("div", { className: "p-2 sticky top-0 bg-white z-20 shadow-sm", children: /* @__PURE__ */ e(
|
|
3469
3462
|
he,
|
|
3470
3463
|
{
|
|
@@ -3477,7 +3470,7 @@ function qe({
|
|
|
3477
3470
|
z.length === 0 && !a ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: f === "server" ? R.length < k ? `Type at least ${k} characters to search.` : "No results." : "No options found." }) : z.map((N) => {
|
|
3478
3471
|
const w = d(N), c = p(N), b = I.some((D) => d(D) === w), x = y !== -1 && I.length >= y && !b;
|
|
3479
3472
|
return /* @__PURE__ */ e(
|
|
3480
|
-
|
|
3473
|
+
X.Option,
|
|
3481
3474
|
{
|
|
3482
3475
|
value: N,
|
|
3483
3476
|
disabled: x,
|
|
@@ -3485,7 +3478,7 @@ function qe({
|
|
|
3485
3478
|
x ? " text-gray-400 bg-white cursor-not-allowed" : D ? " bg-gray-200 text-gray-900" : " text-gray-900",
|
|
3486
3479
|
" relative cursor-default select-none py-2 pl-3 pr-9"
|
|
3487
3480
|
),
|
|
3488
|
-
children: ({ selected: D, active: q }) => /* @__PURE__ */ l(
|
|
3481
|
+
children: ({ selected: D, active: q }) => /* @__PURE__ */ l(K, { children: [
|
|
3489
3482
|
/* @__PURE__ */ e(
|
|
3490
3483
|
"span",
|
|
3491
3484
|
{
|
|
@@ -3610,7 +3603,7 @@ const ss = ({
|
|
|
3610
3603
|
),
|
|
3611
3604
|
n?.show && !n?.customFooter && /* @__PURE__ */ l("div", { className: "border-t flex justify-end border-gray-200 p-6 flex-shrink-0", children: [
|
|
3612
3605
|
i?.onCancel && /* @__PURE__ */ e(
|
|
3613
|
-
|
|
3606
|
+
Z,
|
|
3614
3607
|
{
|
|
3615
3608
|
"data-testid": "cancel-button",
|
|
3616
3609
|
label: i?.label,
|
|
@@ -3622,7 +3615,7 @@ const ss = ({
|
|
|
3622
3615
|
}
|
|
3623
3616
|
),
|
|
3624
3617
|
m?.onSubmit && /* @__PURE__ */ e(
|
|
3625
|
-
|
|
3618
|
+
Z,
|
|
3626
3619
|
{
|
|
3627
3620
|
label: m?.label,
|
|
3628
3621
|
loader: m?.loader,
|
|
@@ -3672,7 +3665,7 @@ function vn({
|
|
|
3672
3665
|
dropId: v,
|
|
3673
3666
|
indent: a = 24
|
|
3674
3667
|
}) {
|
|
3675
|
-
const { setNodeRef: k, isOver: d } =
|
|
3668
|
+
const { setNodeRef: k, isOver: d } = Bt({ id: v }), { attributes: p, listeners: T, setNodeRef: L, transform: R, isDragging: S } = Lt({ id: f }), A = R ? { transform: `translate3d(${Math.round(R.x)}px, ${Math.round(R.y)}px, 0)` } : void 0, [P, I] = M(!1), [V, z] = M(t.name), B = () => {
|
|
3676
3669
|
const h = V.trim();
|
|
3677
3670
|
I(!1), h && h !== t.name ? i?.(t, h) : z(t.name);
|
|
3678
3671
|
}, g = ne(() => /* @__PURE__ */ e(
|
|
@@ -3700,15 +3693,15 @@ function vn({
|
|
|
3700
3693
|
children: [
|
|
3701
3694
|
/* @__PURE__ */ e("button", { className: "tv-toggle", onClick: o, "aria-label": "toggle", children: t.children?.length ? s ? /* @__PURE__ */ e(ba, { size: 16 }) : /* @__PURE__ */ e(Oe, { size: 16 }) : /* @__PURE__ */ e("span", { className: "tv-spacer" }) }),
|
|
3702
3695
|
/* @__PURE__ */ e(wa, { size: 16, className: "tv-folder-ic" }),
|
|
3703
|
-
/* @__PURE__ */ e("div", { className: "tv-name", ref: L, children:
|
|
3696
|
+
/* @__PURE__ */ e("div", { className: "tv-name", ref: L, children: P ? /* @__PURE__ */ e(
|
|
3704
3697
|
"input",
|
|
3705
3698
|
{
|
|
3706
3699
|
className: "tv-input",
|
|
3707
3700
|
value: V,
|
|
3708
3701
|
onChange: (h) => z(h.target.value),
|
|
3709
|
-
onBlur:
|
|
3702
|
+
onBlur: B,
|
|
3710
3703
|
onKeyDown: (h) => {
|
|
3711
|
-
h.key === "Enter" &&
|
|
3704
|
+
h.key === "Enter" && B(), h.key === "Escape" && (I(!1), z(t.name));
|
|
3712
3705
|
},
|
|
3713
3706
|
autoFocus: !0
|
|
3714
3707
|
}
|
|
@@ -3831,11 +3824,11 @@ function ls({
|
|
|
3831
3824
|
const A = ae(
|
|
3832
3825
|
(x) => R((D) => ({ ...D, [x]: !D[x] })),
|
|
3833
3826
|
[]
|
|
3834
|
-
), [
|
|
3827
|
+
), [P, I] = M(() => Se(T));
|
|
3835
3828
|
re.useEffect(() => I(Se(T)), [T]);
|
|
3836
3829
|
const V = Ot(
|
|
3837
3830
|
Mt(jt, { activationConstraint: { delay: 250, tolerance: 5 } })
|
|
3838
|
-
), z = ue(null), [
|
|
3831
|
+
), z = ue(null), [B, g] = M(null), h = ue(0), N = () => {
|
|
3839
3832
|
}, w = ({ delta: x }) => {
|
|
3840
3833
|
h.current = x?.x ?? 0;
|
|
3841
3834
|
}, c = ae(
|
|
@@ -3847,27 +3840,27 @@ function ls({
|
|
|
3847
3840
|
let O = $;
|
|
3848
3841
|
const U = Math.max(0, Math.floor(-q / p));
|
|
3849
3842
|
if (U > 0) {
|
|
3850
|
-
let
|
|
3843
|
+
let H = $;
|
|
3851
3844
|
for (let ie = 0; ie < U; ie++) {
|
|
3852
|
-
const ce = Ja(
|
|
3845
|
+
const ce = Ja(P, H, null);
|
|
3853
3846
|
if (!ce) break;
|
|
3854
3847
|
if (!ce.parentId) {
|
|
3855
3848
|
O = r;
|
|
3856
3849
|
break;
|
|
3857
3850
|
}
|
|
3858
|
-
O = ce.parentId,
|
|
3851
|
+
O = ce.parentId, H = ce.parentId;
|
|
3859
3852
|
}
|
|
3860
3853
|
}
|
|
3861
3854
|
if (d && O === r) {
|
|
3862
3855
|
I(Se(T));
|
|
3863
3856
|
return;
|
|
3864
3857
|
}
|
|
3865
|
-
const F = Se(
|
|
3858
|
+
const F = Se(P), { newRoots: C, removed: E } = Dn(F, G);
|
|
3866
3859
|
if (!E) return;
|
|
3867
3860
|
const j = Fn(C, O, E);
|
|
3868
3861
|
I(j), a?.({ sourceId: G, destParentId: O, newTree: j });
|
|
3869
3862
|
},
|
|
3870
|
-
[
|
|
3863
|
+
[P, T, r, d, p, a]
|
|
3871
3864
|
), b = ae(
|
|
3872
3865
|
(x, D = 0) => x.map((q) => /* @__PURE__ */ l(re.Fragment, { children: [
|
|
3873
3866
|
/* @__PURE__ */ e(
|
|
@@ -3892,8 +3885,8 @@ function ls({
|
|
|
3892
3885
|
[L, p, y, v, f, i, k, A]
|
|
3893
3886
|
);
|
|
3894
3887
|
return re.useMemo(() => {
|
|
3895
|
-
if (!
|
|
3896
|
-
const x = String(
|
|
3888
|
+
if (!B) return null;
|
|
3889
|
+
const x = String(B).replace(/^drag-/, "");
|
|
3897
3890
|
function D(q) {
|
|
3898
3891
|
for (const G of q) {
|
|
3899
3892
|
if (G.id === x) return G;
|
|
@@ -3902,8 +3895,8 @@ function ls({
|
|
|
3902
3895
|
}
|
|
3903
3896
|
return null;
|
|
3904
3897
|
}
|
|
3905
|
-
return D(
|
|
3906
|
-
}, [
|
|
3898
|
+
return D(P);
|
|
3899
|
+
}, [B, P]), /* @__PURE__ */ l("div", { className: "tv", children: [
|
|
3907
3900
|
s !== !1 && /* @__PURE__ */ l("div", { className: "tv-header", children: [
|
|
3908
3901
|
/* @__PURE__ */ e("div", { className: "tv-title", children: s }),
|
|
3909
3902
|
/* @__PURE__ */ e("button", { className: "tv-btn", onClick: u, children: "+ New folder" })
|
|
@@ -3922,7 +3915,7 @@ function ls({
|
|
|
3922
3915
|
onDragMove: w,
|
|
3923
3916
|
onDragEnd: c,
|
|
3924
3917
|
modifiers: [Ut],
|
|
3925
|
-
children: /* @__PURE__ */ e("div", { ref: z, className: "tv-list", children: b(
|
|
3918
|
+
children: /* @__PURE__ */ e("div", { ref: z, className: "tv-list", children: b(P, 0) })
|
|
3926
3919
|
}
|
|
3927
3920
|
)
|
|
3928
3921
|
] });
|
|
@@ -3951,7 +3944,7 @@ const os = ({
|
|
|
3951
3944
|
return /* @__PURE__ */ e(ee.Group, { vertical: y, ...u, children: y ? /* @__PURE__ */ l("div", { className: ye("flex gap-4", o), children: [
|
|
3952
3945
|
/* @__PURE__ */ e(ee.List, { className: ye("w-[150px] flex flex-col gap-1 border-r border-gray-300 pr-2", n), children: t.map((k) => /* @__PURE__ */ e(ee, { className: a, children: k.label }, k.key)) }),
|
|
3953
3946
|
/* @__PURE__ */ e(ee.Panels, { unmount: !r, className: ye("flex-1", m), children: t.map((k) => /* @__PURE__ */ e(ee.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: k.content }) }, k.key)) })
|
|
3954
|
-
] }) : /* @__PURE__ */ l(
|
|
3947
|
+
] }) : /* @__PURE__ */ l(K, { children: [
|
|
3955
3948
|
/* @__PURE__ */ e(ee.List, { className: ye("flex gap-6 border-b border-gray-300 mb-3", n), children: t.map((k) => /* @__PURE__ */ e(ee, { className: a, children: k.label }, k.key)) }),
|
|
3956
3949
|
/* @__PURE__ */ e(ee.Panels, { unmount: !r, className: ye("mt-2", m), children: t.map((k) => /* @__PURE__ */ e(ee.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: k.content }) }, k.key)) })
|
|
3957
3950
|
] }) });
|
|
@@ -3962,7 +3955,7 @@ function $n({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
|
|
|
3962
3955
|
const a = r && r[t.key] || {};
|
|
3963
3956
|
return console.log("Initial Section data for", t.key, a), a;
|
|
3964
3957
|
}), y = ue(r);
|
|
3965
|
-
|
|
3958
|
+
Q(() => {
|
|
3966
3959
|
if (y.current !== r) {
|
|
3967
3960
|
y.current = r;
|
|
3968
3961
|
const a = r && r[t.key] || {};
|
|
@@ -3970,7 +3963,7 @@ function $n({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
|
|
|
3970
3963
|
}
|
|
3971
3964
|
}, [r, t.key]), console.log("Section data", i);
|
|
3972
3965
|
const f = ue(i);
|
|
3973
|
-
|
|
3966
|
+
Q(() => {
|
|
3974
3967
|
f.current !== i && s && typeof s == "function" && (f.current = i, s(n.key, i));
|
|
3975
3968
|
}, [n.key, i, s]);
|
|
3976
3969
|
const v = (a) => {
|
|
@@ -4248,7 +4241,7 @@ function $n({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4248
4241
|
) }),
|
|
4249
4242
|
a.fieldtype === "radio" && /* @__PURE__ */ l("div", { children: [
|
|
4250
4243
|
/* @__PURE__ */ e(
|
|
4251
|
-
|
|
4244
|
+
Pa,
|
|
4252
4245
|
{
|
|
4253
4246
|
selectedValue: typeof i[a.key] < "u" ? i[a.key] : a.default || "",
|
|
4254
4247
|
onValueChange: (d) => {
|
|
@@ -4443,7 +4436,7 @@ function An({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4443
4436
|
const g = r && r[n.key] || [], h = g.length > 0 ? g : [{ id: 0 }];
|
|
4444
4437
|
return console.log(`[DataTableRenderer] ${n.key} - Initial data:`, h), h;
|
|
4445
4438
|
}), k = ue(r);
|
|
4446
|
-
|
|
4439
|
+
Q(() => {
|
|
4447
4440
|
if (console.log(`[DataTableRenderer] ${n.key} - Checking for initialData changes`), console.log(`[DataTableRenderer] ${n.key} - Previous:`, k.current), console.log(`[DataTableRenderer] ${n.key} - Current:`, r), k.current !== r) {
|
|
4448
4441
|
k.current = r;
|
|
4449
4442
|
const g = r && r[n.key] || [], h = g.length > 0 ? g : [{ id: 0 }];
|
|
@@ -4451,11 +4444,11 @@ function An({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4451
4444
|
}
|
|
4452
4445
|
}, [r, n.key]);
|
|
4453
4446
|
const d = ue(v), p = ue(null);
|
|
4454
|
-
|
|
4447
|
+
Q(() => {
|
|
4455
4448
|
d.current !== v && s && typeof s == "function" && (d.current = v, p.current && clearTimeout(p.current), p.current = setTimeout(() => {
|
|
4456
4449
|
s(n.key, v);
|
|
4457
4450
|
}, 300));
|
|
4458
|
-
}, [n.key, v, s]),
|
|
4451
|
+
}, [n.key, v, s]), Q(() => () => {
|
|
4459
4452
|
p.current && clearTimeout(p.current);
|
|
4460
4453
|
}, []);
|
|
4461
4454
|
const T = (g) => {
|
|
@@ -4677,7 +4670,7 @@ function An({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4677
4670
|
);
|
|
4678
4671
|
case "radio":
|
|
4679
4672
|
return (c, b) => /* @__PURE__ */ e(
|
|
4680
|
-
|
|
4673
|
+
Pa,
|
|
4681
4674
|
{
|
|
4682
4675
|
selectedValue: c[g.key] || "",
|
|
4683
4676
|
onValueChange: (x) => h(b, x),
|
|
@@ -4808,7 +4801,7 @@ function An({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4808
4801
|
const N = [...h];
|
|
4809
4802
|
return N.splice(g, 1), N;
|
|
4810
4803
|
});
|
|
4811
|
-
}, []), [S, A] = M(null),
|
|
4804
|
+
}, []), [S, A] = M(null), P = ae((g, h) => {
|
|
4812
4805
|
A(h), g.dataTransfer.effectAllowed = "move", g.dataTransfer.setData("text/html", "");
|
|
4813
4806
|
}, []), I = ae((g) => {
|
|
4814
4807
|
g.preventDefault(), g.dataTransfer.dropEffect = "move";
|
|
@@ -4819,7 +4812,7 @@ function An({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4819
4812
|
}), A(null));
|
|
4820
4813
|
}, [S]), z = ae(() => {
|
|
4821
4814
|
A(null);
|
|
4822
|
-
}, []),
|
|
4815
|
+
}, []), B = ae((g) => {
|
|
4823
4816
|
console.log("[DataTableRenderer] handleAddAudience called with:", g), a((h) => {
|
|
4824
4817
|
const N = [...h];
|
|
4825
4818
|
if (i !== null && y && N[i]) {
|
|
@@ -4866,7 +4859,7 @@ function An({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4866
4859
|
{
|
|
4867
4860
|
className: `hover:bg-gray-50 ${S === h ? "opacity-50" : ""}`,
|
|
4868
4861
|
draggable: !0,
|
|
4869
|
-
onDragStart: (N) =>
|
|
4862
|
+
onDragStart: (N) => P(N, h),
|
|
4870
4863
|
onDragOver: I,
|
|
4871
4864
|
onDrop: (N) => V(N, h),
|
|
4872
4865
|
onDragEnd: z,
|
|
@@ -4900,7 +4893,7 @@ function An({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4900
4893
|
onClose: () => {
|
|
4901
4894
|
u(null), f(null);
|
|
4902
4895
|
},
|
|
4903
|
-
onFinalSubmit:
|
|
4896
|
+
onFinalSubmit: B,
|
|
4904
4897
|
existingShares: g,
|
|
4905
4898
|
allowedPermissions: ["view", "remove"]
|
|
4906
4899
|
}
|
|
@@ -4975,7 +4968,7 @@ const ma = () => {
|
|
|
4975
4968
|
initialData: y = null
|
|
4976
4969
|
// Add prop for initial demo data
|
|
4977
4970
|
}) => {
|
|
4978
|
-
const [f, v] = M(null), [a, k] = M(""), [d, p] = M(() => Array.isArray(y) ? y : []), [T, L] = M(null), [R, S] = M(null), [A,
|
|
4971
|
+
const [f, v] = M(null), [a, k] = M(""), [d, p] = M(() => Array.isArray(y) ? y : []), [T, L] = M(null), [R, S] = M(null), [A, P] = M(""), I = async () => {
|
|
4979
4972
|
try {
|
|
4980
4973
|
const $ = await Fe(t.collectionList);
|
|
4981
4974
|
if ($) {
|
|
@@ -4989,9 +4982,9 @@ const ma = () => {
|
|
|
4989
4982
|
console.log("Error loading collections:", $), typeof window < "u" && !window.location.pathname.includes("iframe.html") && le.error("Failed to load collections");
|
|
4990
4983
|
}
|
|
4991
4984
|
};
|
|
4992
|
-
|
|
4985
|
+
Q(() => {
|
|
4993
4986
|
(!y || y.length === 0) && I();
|
|
4994
|
-
}, [y]),
|
|
4987
|
+
}, [y]), Q(() => {
|
|
4995
4988
|
Array.isArray(y) && p(y);
|
|
4996
4989
|
}, [y]);
|
|
4997
4990
|
const V = ($) => {
|
|
@@ -5009,7 +5002,7 @@ const ma = () => {
|
|
|
5009
5002
|
_temp: !0
|
|
5010
5003
|
}
|
|
5011
5004
|
]), v($), k("");
|
|
5012
|
-
},
|
|
5005
|
+
}, B = () => {
|
|
5013
5006
|
f != null && (p(($) => {
|
|
5014
5007
|
const O = $.find((F) => F.id === f), U = O && O._temp ? $.filter((F) => F.id !== f) : $;
|
|
5015
5008
|
return s?.(U), U;
|
|
@@ -5051,10 +5044,10 @@ const ma = () => {
|
|
|
5051
5044
|
}
|
|
5052
5045
|
}, N = ($, O, U) => {
|
|
5053
5046
|
if (!u || !O || !U || O === U) return $;
|
|
5054
|
-
const F = $.findIndex((
|
|
5047
|
+
const F = $.findIndex((H) => H.id === O), C = $.findIndex((H) => H.id === U);
|
|
5055
5048
|
if (F === -1 || C === -1) return $;
|
|
5056
5049
|
const E = [...$], [j] = E.splice(F, 1);
|
|
5057
|
-
return E.splice(C, 0, j), E.map((
|
|
5050
|
+
return E.splice(C, 0, j), E.map((H, ie) => ({ ...H, order: ie + 1 }));
|
|
5058
5051
|
}, w = async ($) => {
|
|
5059
5052
|
const O = $.map((U) => ({
|
|
5060
5053
|
id: U.id,
|
|
@@ -5090,7 +5083,7 @@ const ma = () => {
|
|
|
5090
5083
|
he,
|
|
5091
5084
|
{
|
|
5092
5085
|
value: A,
|
|
5093
|
-
onDebouncedChange:
|
|
5086
|
+
onDebouncedChange: P,
|
|
5094
5087
|
placeholder: "Search Collection",
|
|
5095
5088
|
customClass: "mr-4 searchmanagecollection"
|
|
5096
5089
|
}
|
|
@@ -5123,7 +5116,7 @@ const ma = () => {
|
|
|
5123
5116
|
C ? "ring-2 ring-gray-800/20" : "",
|
|
5124
5117
|
F ? "opacity-60" : ""
|
|
5125
5118
|
].join(" "),
|
|
5126
|
-
children: O ? /* @__PURE__ */ l(
|
|
5119
|
+
children: O ? /* @__PURE__ */ l(K, { children: [
|
|
5127
5120
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 flex-1", children: /* @__PURE__ */ e(
|
|
5128
5121
|
"input",
|
|
5129
5122
|
{
|
|
@@ -5133,7 +5126,7 @@ const ma = () => {
|
|
|
5133
5126
|
placeholder: $._temp ? "New collection name" : "Edit collection name",
|
|
5134
5127
|
onChange: (E) => k(E.target.value),
|
|
5135
5128
|
onKeyDown: (E) => {
|
|
5136
|
-
E.key === "Enter" && g(), E.key === "Escape" &&
|
|
5129
|
+
E.key === "Enter" && g(), E.key === "Escape" && B();
|
|
5137
5130
|
},
|
|
5138
5131
|
autoFocus: !0
|
|
5139
5132
|
}
|
|
@@ -5143,7 +5136,7 @@ const ma = () => {
|
|
|
5143
5136
|
"button",
|
|
5144
5137
|
{
|
|
5145
5138
|
className: "cursor-pointer border border-gray-300 p-2 rounded-2xl",
|
|
5146
|
-
onClick:
|
|
5139
|
+
onClick: B,
|
|
5147
5140
|
"aria-label": "Cancel edit",
|
|
5148
5141
|
children: /* @__PURE__ */ e(ge, { color: "#767676" })
|
|
5149
5142
|
}
|
|
@@ -5163,7 +5156,7 @@ const ma = () => {
|
|
|
5163
5156
|
}
|
|
5164
5157
|
)
|
|
5165
5158
|
] })
|
|
5166
|
-
] }) : /* @__PURE__ */ l(
|
|
5159
|
+
] }) : /* @__PURE__ */ l(K, { children: [
|
|
5167
5160
|
/* @__PURE__ */ l("div", { className: "flex gap-2 items-center", children: [
|
|
5168
5161
|
u && /* @__PURE__ */ e(
|
|
5169
5162
|
"span",
|
|
@@ -5195,7 +5188,7 @@ const ma = () => {
|
|
|
5195
5188
|
className: U === 0 && !$.protected ? "cursor-pointer" : "cursor-not-allowed",
|
|
5196
5189
|
title: U === 0 && !$.protected ? "Delete" : "Cannot delete this collection",
|
|
5197
5190
|
onClick: U === 0 ? () => h($) : null,
|
|
5198
|
-
children: /* @__PURE__ */ e(
|
|
5191
|
+
children: /* @__PURE__ */ e(Be, { color: U === 0 ? "#767676" : "#C2C2C2" })
|
|
5199
5192
|
}
|
|
5200
5193
|
)
|
|
5201
5194
|
] })
|
|
@@ -5256,7 +5249,7 @@ function zn(t) {
|
|
|
5256
5249
|
const r = In(t);
|
|
5257
5250
|
return xe[r] || xe[r.toLowerCase?.()] || Rn;
|
|
5258
5251
|
}
|
|
5259
|
-
function
|
|
5252
|
+
function Pn({
|
|
5260
5253
|
appid: t,
|
|
5261
5254
|
configdata: r = null,
|
|
5262
5255
|
disableApi: s = !1,
|
|
@@ -5311,7 +5304,7 @@ function Bn({
|
|
|
5311
5304
|
}), u(h);
|
|
5312
5305
|
}
|
|
5313
5306
|
};
|
|
5314
|
-
|
|
5307
|
+
Q(() => {
|
|
5315
5308
|
if (s) {
|
|
5316
5309
|
f(!1);
|
|
5317
5310
|
return;
|
|
@@ -5339,7 +5332,7 @@ function Bn({
|
|
|
5339
5332
|
};
|
|
5340
5333
|
r && (m(r), t ? h() : A());
|
|
5341
5334
|
}, [r, L, t, s]);
|
|
5342
|
-
const
|
|
5335
|
+
const P = (h, N) => {
|
|
5343
5336
|
u((w) => ({
|
|
5344
5337
|
...w,
|
|
5345
5338
|
[h]: N
|
|
@@ -5420,7 +5413,7 @@ function Bn({
|
|
|
5420
5413
|
a(!1);
|
|
5421
5414
|
}
|
|
5422
5415
|
})();
|
|
5423
|
-
},
|
|
5416
|
+
}, B = () => {
|
|
5424
5417
|
if (o) {
|
|
5425
5418
|
o();
|
|
5426
5419
|
return;
|
|
@@ -5432,7 +5425,7 @@ function Bn({
|
|
|
5432
5425
|
if (!n?.configuration && !r?.configuration)
|
|
5433
5426
|
return /* @__PURE__ */ e("div", { className: "min-h-screen flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "text-gray-500", children: "No configuration available" }) });
|
|
5434
5427
|
const g = r?.configuration || n?.configuration;
|
|
5435
|
-
return
|
|
5428
|
+
return Q(() => {
|
|
5436
5429
|
s && r ? (!i || Object.keys(i).length === 0) && A() : s && !r && A();
|
|
5437
5430
|
}, [s, r]), /* @__PURE__ */ l("div", { children: [
|
|
5438
5431
|
/* @__PURE__ */ l(
|
|
@@ -5450,7 +5443,7 @@ function Bn({
|
|
|
5450
5443
|
{
|
|
5451
5444
|
item: h,
|
|
5452
5445
|
data: i,
|
|
5453
|
-
updateHandler:
|
|
5446
|
+
updateHandler: P,
|
|
5454
5447
|
validationErrors: k
|
|
5455
5448
|
},
|
|
5456
5449
|
N
|
|
@@ -5461,16 +5454,16 @@ function Bn({
|
|
|
5461
5454
|
),
|
|
5462
5455
|
/* @__PURE__ */ l("div", { className: "w-full gap-5 bg-white flex justify-end py-3 px-7 rounded-t-md rounded-b-2xl border border-gray-300", style: { boxShadow: "0 -2px 10px 0 rgba(0, 0, 0, 0.20)", marginTop: "20px" }, children: [
|
|
5463
5456
|
/* @__PURE__ */ e(
|
|
5464
|
-
|
|
5457
|
+
Z,
|
|
5465
5458
|
{
|
|
5466
5459
|
category: "secondary",
|
|
5467
|
-
onClick:
|
|
5460
|
+
onClick: B,
|
|
5468
5461
|
label: "Cancel",
|
|
5469
5462
|
disabled: v
|
|
5470
5463
|
}
|
|
5471
5464
|
),
|
|
5472
5465
|
/* @__PURE__ */ e(
|
|
5473
|
-
|
|
5466
|
+
Z,
|
|
5474
5467
|
{
|
|
5475
5468
|
category: "primary",
|
|
5476
5469
|
onClick: z,
|
|
@@ -5495,19 +5488,19 @@ const is = ({
|
|
|
5495
5488
|
configuration: a = []
|
|
5496
5489
|
} = t, k = a.map((z) => {
|
|
5497
5490
|
if (z.type === "section" && z.fields) {
|
|
5498
|
-
const
|
|
5491
|
+
const B = [...z.fields], g = B.findIndex((h) => h.key === "appkey");
|
|
5499
5492
|
if (g !== -1) {
|
|
5500
|
-
const h =
|
|
5501
|
-
if (
|
|
5493
|
+
const h = B[g];
|
|
5494
|
+
if (B[g] = {
|
|
5502
5495
|
...h,
|
|
5503
5496
|
default: r,
|
|
5504
5497
|
value: r,
|
|
5505
5498
|
disabled: !0,
|
|
5506
5499
|
placeholder: r
|
|
5507
|
-
},
|
|
5508
|
-
const w =
|
|
5509
|
-
|
|
5510
|
-
...
|
|
5500
|
+
}, B.some((w) => w.key === "displayname")) {
|
|
5501
|
+
const w = B.findIndex((c) => c.key === "displayname");
|
|
5502
|
+
B[w] = {
|
|
5503
|
+
...B[w],
|
|
5511
5504
|
default: r,
|
|
5512
5505
|
value: r
|
|
5513
5506
|
};
|
|
@@ -5521,12 +5514,12 @@ const is = ({
|
|
|
5521
5514
|
placeholder: "Enter display name",
|
|
5522
5515
|
required: !1
|
|
5523
5516
|
};
|
|
5524
|
-
|
|
5517
|
+
B.splice(g + 1, 0, w);
|
|
5525
5518
|
}
|
|
5526
5519
|
}
|
|
5527
5520
|
return {
|
|
5528
5521
|
...z,
|
|
5529
|
-
fields:
|
|
5522
|
+
fields: B
|
|
5530
5523
|
};
|
|
5531
5524
|
}
|
|
5532
5525
|
return z;
|
|
@@ -5547,9 +5540,9 @@ const is = ({
|
|
|
5547
5540
|
heading: (() => {
|
|
5548
5541
|
for (const z of k)
|
|
5549
5542
|
if (z.type === "section" && z.fields) {
|
|
5550
|
-
const
|
|
5551
|
-
if (
|
|
5552
|
-
return
|
|
5543
|
+
const B = z.fields.find((g) => g.key === "displayname");
|
|
5544
|
+
if (B)
|
|
5545
|
+
return B.default || B.value || r;
|
|
5553
5546
|
}
|
|
5554
5547
|
return r;
|
|
5555
5548
|
})(),
|
|
@@ -5574,9 +5567,9 @@ const is = ({
|
|
|
5574
5567
|
}
|
|
5575
5568
|
],
|
|
5576
5569
|
...v
|
|
5577
|
-
},
|
|
5570
|
+
}, P = [
|
|
5578
5571
|
{ label: "Overview", content: V(A) },
|
|
5579
|
-
{ label: "Configuration", content: /* @__PURE__ */ e(
|
|
5572
|
+
{ label: "Configuration", content: /* @__PURE__ */ e(Pn, { appid: r, configdata: { configuration: k }, disableApi: s, onCancel: T }) }
|
|
5580
5573
|
];
|
|
5581
5574
|
function I(z) {
|
|
5582
5575
|
return z ? z.includes("<svg") ? /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: z } }) : z : "📱";
|
|
@@ -5615,10 +5608,10 @@ const is = ({
|
|
|
5615
5608
|
] }),
|
|
5616
5609
|
/* @__PURE__ */ l("section", { children: [
|
|
5617
5610
|
/* @__PURE__ */ e("h3", { className: "text-lg font-semibold mb-4", children: "Key Features" }),
|
|
5618
|
-
/* @__PURE__ */ e("ul", { className: "space-y-3", children: z.features.map((
|
|
5619
|
-
/* @__PURE__ */ e("span", { className: "font-semibold", children:
|
|
5611
|
+
/* @__PURE__ */ e("ul", { className: "space-y-3", children: z.features.map((B, g) => /* @__PURE__ */ l("li", { children: [
|
|
5612
|
+
/* @__PURE__ */ e("span", { className: "font-semibold", children: B.title }),
|
|
5620
5613
|
/* @__PURE__ */ e("br", {}),
|
|
5621
|
-
/* @__PURE__ */ e("span", { className: "text-gray-700", children:
|
|
5614
|
+
/* @__PURE__ */ e("span", { className: "text-gray-700", children: B.description })
|
|
5622
5615
|
] }, g)) })
|
|
5623
5616
|
] })
|
|
5624
5617
|
] });
|
|
@@ -5639,27 +5632,27 @@ const is = ({
|
|
|
5639
5632
|
/* @__PURE__ */ l("div", { className: "flex flex-col min-w-0", children: [
|
|
5640
5633
|
/* @__PURE__ */ e("h2", { className: "text-[24px] font-semibold m-0 leading-tight truncate", children: S.heading }),
|
|
5641
5634
|
/* @__PURE__ */ e("p", { className: "text-[13px] text-[#101112] mt-1 mb-0 max-w-[800px] leading-normal", children: S.subHeading }),
|
|
5642
|
-
/* @__PURE__ */ e("div", { className: "mt-2 flex flex-wrap gap-2", children: S.tags && S.tags.map((z,
|
|
5635
|
+
/* @__PURE__ */ e("div", { className: "mt-2 flex flex-wrap gap-2", children: S.tags && S.tags.map((z, B) => /* @__PURE__ */ e(
|
|
5643
5636
|
"span",
|
|
5644
5637
|
{
|
|
5645
5638
|
className: "pill inline-block px-[10px] py-[6px] rounded-[14px] text-[11px] border border-[#e6e9ee] text-[#767676] font-semibold mt-1",
|
|
5646
5639
|
children: z
|
|
5647
5640
|
},
|
|
5648
|
-
|
|
5641
|
+
B
|
|
5649
5642
|
)) })
|
|
5650
5643
|
] })
|
|
5651
5644
|
] }),
|
|
5652
5645
|
/* @__PURE__ */ l("div", { className: "bg-white border border-gray-300 rounded-2xl w-full mt-5 ", children: [
|
|
5653
|
-
/* @__PURE__ */ e("div", { className: "border-b border-gray-200", children: /* @__PURE__ */ e("nav", { className: "flex space-x-8", "aria-label": "Tabs", children:
|
|
5646
|
+
/* @__PURE__ */ e("div", { className: "border-b border-gray-200", children: /* @__PURE__ */ e("nav", { className: "flex space-x-8", "aria-label": "Tabs", children: P.map((z, B) => /* @__PURE__ */ e(
|
|
5654
5647
|
"button",
|
|
5655
5648
|
{
|
|
5656
|
-
onClick: () => n(
|
|
5657
|
-
className: `${o ===
|
|
5649
|
+
onClick: () => n(B),
|
|
5650
|
+
className: `${o === B ? "border-black text-black" : "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"} whitespace-nowrap py-3 px-6 border-b-2 font-medium text-sm transition-colors duration-200`,
|
|
5658
5651
|
children: z.label
|
|
5659
5652
|
},
|
|
5660
|
-
|
|
5653
|
+
B
|
|
5661
5654
|
)) }) }),
|
|
5662
|
-
/* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children:
|
|
5655
|
+
/* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children: P[o].content })
|
|
5663
5656
|
] }),
|
|
5664
5657
|
/* @__PURE__ */ e(
|
|
5665
5658
|
Yr,
|
|
@@ -5676,7 +5669,7 @@ const is = ({
|
|
|
5676
5669
|
] });
|
|
5677
5670
|
};
|
|
5678
5671
|
function cs({ children: t }) {
|
|
5679
|
-
return /* @__PURE__ */ l(
|
|
5672
|
+
return /* @__PURE__ */ l(K, { children: [
|
|
5680
5673
|
t,
|
|
5681
5674
|
/* @__PURE__ */ e(
|
|
5682
5675
|
Yt,
|
|
@@ -5729,9 +5722,9 @@ const ds = ({
|
|
|
5729
5722
|
},
|
|
5730
5723
|
// Optional: override export file names
|
|
5731
5724
|
excelFileName: A,
|
|
5732
|
-
pdfFileName:
|
|
5725
|
+
pdfFileName: P
|
|
5733
5726
|
}) => {
|
|
5734
|
-
const I = () => n?.current || o?.current, [V, z] = re.useState(""),
|
|
5727
|
+
const I = () => n?.current || o?.current, [V, z] = re.useState(""), B = (t || "export").toString().trim() || "export", g = `${A || B}.xlsx`, h = `${P || B}.pdf`, N = (b, x, D) => Math.max(x, Math.min(b, D)), w = ae(
|
|
5735
5728
|
(b) => {
|
|
5736
5729
|
const x = I();
|
|
5737
5730
|
if (console.log("openColumnChooserNear", x), !!x?.openColumnChooser) {
|
|
@@ -5798,7 +5791,7 @@ const ds = ({
|
|
|
5798
5791
|
/* @__PURE__ */ l("div", { className: "flex gap-3", children: [
|
|
5799
5792
|
/* @__PURE__ */ l("div", { className: "flex items-center gap-1.5", children: [
|
|
5800
5793
|
f && /* @__PURE__ */ e(
|
|
5801
|
-
|
|
5794
|
+
Z,
|
|
5802
5795
|
{
|
|
5803
5796
|
icon: Jt,
|
|
5804
5797
|
onClick: (b) => c("ColumnChooser", b),
|
|
@@ -5809,7 +5802,7 @@ const ds = ({
|
|
|
5809
5802
|
}
|
|
5810
5803
|
),
|
|
5811
5804
|
v && /* @__PURE__ */ e(
|
|
5812
|
-
|
|
5805
|
+
Z,
|
|
5813
5806
|
{
|
|
5814
5807
|
icon: Qt,
|
|
5815
5808
|
onClick: i,
|
|
@@ -5820,7 +5813,7 @@ const ds = ({
|
|
|
5820
5813
|
}
|
|
5821
5814
|
),
|
|
5822
5815
|
a && /* @__PURE__ */ e(
|
|
5823
|
-
|
|
5816
|
+
Z,
|
|
5824
5817
|
{
|
|
5825
5818
|
icon: Xt,
|
|
5826
5819
|
onClick: () => c("Print"),
|
|
@@ -5831,7 +5824,7 @@ const ds = ({
|
|
|
5831
5824
|
}
|
|
5832
5825
|
),
|
|
5833
5826
|
k && /* @__PURE__ */ e(
|
|
5834
|
-
|
|
5827
|
+
Z,
|
|
5835
5828
|
{
|
|
5836
5829
|
icon: Zt,
|
|
5837
5830
|
onClick: () => c("Excel"),
|
|
@@ -5842,7 +5835,7 @@ const ds = ({
|
|
|
5842
5835
|
}
|
|
5843
5836
|
),
|
|
5844
5837
|
d && /* @__PURE__ */ e(
|
|
5845
|
-
|
|
5838
|
+
Z,
|
|
5846
5839
|
{
|
|
5847
5840
|
icon: Ht,
|
|
5848
5841
|
onClick: () => c("Pdf"),
|
|
@@ -5853,7 +5846,7 @@ const ds = ({
|
|
|
5853
5846
|
}
|
|
5854
5847
|
),
|
|
5855
5848
|
p && /* @__PURE__ */ e(
|
|
5856
|
-
|
|
5849
|
+
Z,
|
|
5857
5850
|
{
|
|
5858
5851
|
icon: Kt,
|
|
5859
5852
|
onClick: () => c("Refresh"),
|
|
@@ -5865,7 +5858,7 @@ const ds = ({
|
|
|
5865
5858
|
)
|
|
5866
5859
|
] }),
|
|
5867
5860
|
T && m && /* @__PURE__ */ e(
|
|
5868
|
-
|
|
5861
|
+
Z,
|
|
5869
5862
|
{
|
|
5870
5863
|
label: u,
|
|
5871
5864
|
icon: er,
|
|
@@ -5901,11 +5894,11 @@ function us(t) {
|
|
|
5901
5894
|
selectionSettings: R = { type: "Multiple", mode: "Row" },
|
|
5902
5895
|
enableCheckbox: S = !1,
|
|
5903
5896
|
columns: A = [],
|
|
5904
|
-
onGridStateChange:
|
|
5897
|
+
onGridStateChange: P,
|
|
5905
5898
|
onRowSelected: I,
|
|
5906
5899
|
onRowDeselected: V,
|
|
5907
5900
|
onRowDoubleClick: z,
|
|
5908
|
-
apiRef:
|
|
5901
|
+
apiRef: B,
|
|
5909
5902
|
gridProps: g = {}
|
|
5910
5903
|
} = t, h = ue(null), {
|
|
5911
5904
|
pageSettings: N,
|
|
@@ -5915,8 +5908,8 @@ function us(t) {
|
|
|
5915
5908
|
const C = [wr];
|
|
5916
5909
|
return u && C.push(Cr), y && C.push(Sr), f && C.push(Dr), T && C.push(Fr), k && C.push($r), d && C.push(Tr), p && C.push(Ar), a && C.push(Er), v && C.push(Rr), C.push(Ir), C;
|
|
5917
5910
|
}, [u, y, f, T, k, d, p, a, v]), x = ne(() => {
|
|
5918
|
-
const C = () => h.current, E = (j,
|
|
5919
|
-
!
|
|
5911
|
+
const C = () => h.current, E = (j, H) => {
|
|
5912
|
+
!H && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${j} requested but related service/feature is disabled.`);
|
|
5920
5913
|
};
|
|
5921
5914
|
return {
|
|
5922
5915
|
getInstance: () => C(),
|
|
@@ -5935,15 +5928,15 @@ function us(t) {
|
|
|
5935
5928
|
pdfExport: (j) => {
|
|
5936
5929
|
E("pdfExport()", d), C()?.pdfExport?.(j);
|
|
5937
5930
|
},
|
|
5938
|
-
openColumnChooser: (j,
|
|
5939
|
-
E("openColumnChooser()", p), C()?.columnChooserModule?.openColumnChooser?.(j,
|
|
5931
|
+
openColumnChooser: (j, H) => {
|
|
5932
|
+
E("openColumnChooser()", p), C()?.columnChooserModule?.openColumnChooser?.(j, H);
|
|
5940
5933
|
}
|
|
5941
5934
|
};
|
|
5942
5935
|
}, []);
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
}, [
|
|
5946
|
-
|
|
5936
|
+
Q(() => {
|
|
5937
|
+
B && (B.current = x);
|
|
5938
|
+
}, [B, x]), Q(() => () => {
|
|
5939
|
+
B && (B.current = null);
|
|
5947
5940
|
}, []);
|
|
5948
5941
|
const D = (C) => {
|
|
5949
5942
|
const E = String(C || "");
|
|
@@ -5962,12 +5955,12 @@ function us(t) {
|
|
|
5962
5955
|
}));
|
|
5963
5956
|
return { allowUnsort: !0, ...w, columns: C };
|
|
5964
5957
|
}, [w, u]), $ = (C) => {
|
|
5965
|
-
const E = h.current, j = C?.requestType,
|
|
5958
|
+
const E = h.current, j = C?.requestType, H = j === "paging" ? "paging" : j === "sorting" ? "sorting" : j === "searching" ? "searching" : j === "filtering" ? "filtering" : j === "grouping" ? "grouping" : j === "reorder" ? "reorder" : j === "columnstate" ? "columnstate" : "other", ie = C?.pageSize ?? E?.pageSettings?.pageSize ?? m, ce = C?.currentPage ?? E?.pageSettings?.currentPage ?? n, je = C?.columnName && C?.direction ? [{ field: C.columnName, dir: D(C.direction) }] : (E?.sortSettings?.columns || []).map((we) => ({
|
|
5966
5959
|
field: we.field,
|
|
5967
5960
|
dir: D(we.direction ?? we.dir)
|
|
5968
5961
|
})), Ge = C?.searchString ?? "", _e = C?.columns ?? E?.filterSettings?.columns ?? [];
|
|
5969
5962
|
return {
|
|
5970
|
-
reason:
|
|
5963
|
+
reason: H,
|
|
5971
5964
|
page: { index: ce, size: ie, skip: (ce - 1) * ie, take: ie },
|
|
5972
5965
|
sort: je,
|
|
5973
5966
|
// [{ field, dir: 'Ascending'|'Descending' }]
|
|
@@ -5994,9 +5987,9 @@ function us(t) {
|
|
|
5994
5987
|
pageSettings: q,
|
|
5995
5988
|
sortSettings: G,
|
|
5996
5989
|
actionBegin: (C) => {
|
|
5997
|
-
if (["paging", "sorting", "searching", "filtering", "grouping", "reorder", "columnstate"].includes(C?.requestType) && (C.cancel = !0), typeof
|
|
5990
|
+
if (["paging", "sorting", "searching", "filtering", "grouping", "reorder", "columnstate"].includes(C?.requestType) && (C.cancel = !0), typeof P == "function") {
|
|
5998
5991
|
const j = $(C);
|
|
5999
|
-
|
|
5992
|
+
P(j, C);
|
|
6000
5993
|
}
|
|
6001
5994
|
},
|
|
6002
5995
|
rowSelected: I,
|
|
@@ -6006,11 +5999,11 @@ function us(t) {
|
|
|
6006
5999
|
},
|
|
6007
6000
|
...c,
|
|
6008
6001
|
children: [
|
|
6009
|
-
/* @__PURE__ */ e(
|
|
6002
|
+
/* @__PURE__ */ e(Pr, { children: (() => {
|
|
6010
6003
|
const C = [];
|
|
6011
6004
|
return S && C.push(/* @__PURE__ */ e(ra, { type: "checkbox", width: "50" }, "__checkbox__")), A.forEach((E, j) => {
|
|
6012
6005
|
const {
|
|
6013
|
-
field:
|
|
6006
|
+
field: H,
|
|
6014
6007
|
headerText: ie,
|
|
6015
6008
|
width: ce,
|
|
6016
6009
|
textAlign: je = "Left",
|
|
@@ -6031,7 +6024,7 @@ function us(t) {
|
|
|
6031
6024
|
/* @__PURE__ */ e(
|
|
6032
6025
|
ra,
|
|
6033
6026
|
{
|
|
6034
|
-
field:
|
|
6027
|
+
field: H,
|
|
6035
6028
|
headerText: ie,
|
|
6036
6029
|
width: ce,
|
|
6037
6030
|
textAlign: je,
|
|
@@ -6048,12 +6041,12 @@ function us(t) {
|
|
|
6048
6041
|
customAttributes: nt,
|
|
6049
6042
|
...st
|
|
6050
6043
|
},
|
|
6051
|
-
|
|
6044
|
+
H || `col-${j}`
|
|
6052
6045
|
)
|
|
6053
6046
|
);
|
|
6054
6047
|
}), C;
|
|
6055
6048
|
})() }),
|
|
6056
|
-
/* @__PURE__ */ e(
|
|
6049
|
+
/* @__PURE__ */ e(Br, { services: b })
|
|
6057
6050
|
]
|
|
6058
6051
|
}
|
|
6059
6052
|
);
|
|
@@ -6072,7 +6065,7 @@ export {
|
|
|
6072
6065
|
os as CustomTab,
|
|
6073
6066
|
za as DatePicker,
|
|
6074
6067
|
Gr as DateRangePicker,
|
|
6075
|
-
|
|
6068
|
+
Pn as DynamicConfig,
|
|
6076
6069
|
Yn as FileUploadModal,
|
|
6077
6070
|
is as FullConfigPage,
|
|
6078
6071
|
Xn as FullScreenLoader,
|
|
@@ -6085,7 +6078,7 @@ export {
|
|
|
6085
6078
|
Qr as PageHeader,
|
|
6086
6079
|
Kn as PageLayout,
|
|
6087
6080
|
Jn as Pagination,
|
|
6088
|
-
|
|
6081
|
+
Pa as RadioGroup,
|
|
6089
6082
|
he as SearchBar,
|
|
6090
6083
|
He as Select,
|
|
6091
6084
|
Qn as Sidebar,
|
|
@@ -6095,7 +6088,7 @@ export {
|
|
|
6095
6088
|
Ma as ToggleSwitch,
|
|
6096
6089
|
Zn as Tooltip,
|
|
6097
6090
|
ls as TreeView,
|
|
6098
|
-
|
|
6091
|
+
Z as UnifyedCoreButton,
|
|
6099
6092
|
Hn as WizardModal,
|
|
6100
6093
|
Ga as adGroupsListSearchApi,
|
|
6101
6094
|
sn as axiosDelete,
|