@epam/statgpt-ui-components 0.5.0-rc.3 → 0.5.0-rc.30
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/components/Alert/Alert.d.ts +2 -0
- package/constants/alert.d.ts +1 -0
- package/index.css +1 -1
- package/index.js +1 -1
- package/index.mjs +515 -462
- package/models/alert.d.ts +14 -0
- package/package.json +2 -2
package/index.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { useEffect as
|
|
4
|
-
import
|
|
5
|
-
import { IconX as
|
|
6
|
-
import { extendTailwindMerge as
|
|
7
|
-
import
|
|
8
|
-
import { CalendarResolution as
|
|
9
|
-
import { useFloating as
|
|
10
|
-
import { useSensors as
|
|
11
|
-
import { useSortable as
|
|
12
|
-
import { CSS as
|
|
13
|
-
const
|
|
1
|
+
import { jsx as r, jsxs as u, Fragment as q } from "react/jsx-runtime";
|
|
2
|
+
import * as ue from "react";
|
|
3
|
+
import { useEffect as O, useState as j, useRef as W, useCallback as P, useMemo as U, useId as me, createContext as Q, useContext as K } from "react";
|
|
4
|
+
import p from "classnames";
|
|
5
|
+
import { IconX as he, IconCalendarEvent as fe, IconSquareCheckFilled as pe, IconChevronDown as ge, IconGripVertical as X, IconChevronRight as Z, IconDatabase as xe } from "@tabler/icons-react";
|
|
6
|
+
import { extendTailwindMerge as be } from "tailwind-merge";
|
|
7
|
+
import Ne from "react-flatpickr";
|
|
8
|
+
import { CalendarResolution as A } from "@epam/statgpt-shared-toolkit";
|
|
9
|
+
import { useFloating as J, useRole as we, useDismiss as ee, useInteractions as te, FloatingPortal as ne, FloatingOverlay as ve, FloatingFocusManager as Ce, autoUpdate as ye, offset as Ee, flip as Ie, size as Se, shift as ke, useClick as De } from "@floating-ui/react";
|
|
10
|
+
import { useSensors as Le, useSensor as Oe, PointerSensor as Fe, DndContext as Re, closestCenter as _e, DragOverlay as Ae } from "@dnd-kit/core";
|
|
11
|
+
import { useSortable as Me, SortableContext as Te, verticalListSortingStrategy as Pe, arrayMove as Ye } from "@dnd-kit/sortable";
|
|
12
|
+
import { CSS as je } from "@dnd-kit/utilities";
|
|
13
|
+
const re = ({
|
|
14
14
|
title: e,
|
|
15
15
|
btnClassNames: t,
|
|
16
16
|
iconWidth: n,
|
|
@@ -24,40 +24,52 @@ const ee = () => /* @__PURE__ */ r("div", { className: "flex h-full items-center
|
|
|
24
24
|
className: t,
|
|
25
25
|
title: e,
|
|
26
26
|
onClick: l,
|
|
27
|
-
children: /* @__PURE__ */ r(
|
|
27
|
+
children: /* @__PURE__ */ r(he, { height: s || 20, width: n || 20 })
|
|
28
28
|
}
|
|
29
29
|
);
|
|
30
|
-
var
|
|
31
|
-
const
|
|
30
|
+
var _ = /* @__PURE__ */ ((e) => (e.INFO = "info", e.ERROR = "error", e.SUCCESS = "success", e.IN_PROGRESS = "in_progress", e))(_ || {});
|
|
31
|
+
const ze = 3e4, bt = ({
|
|
32
32
|
alertDetails: e,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
infoIcon: t,
|
|
34
|
+
successIcon: n,
|
|
35
|
+
errorIcon: s,
|
|
36
|
+
onClose: l,
|
|
37
|
+
closeButtonTitle: a,
|
|
38
|
+
children: c
|
|
37
39
|
}) => {
|
|
38
|
-
const
|
|
39
|
-
return
|
|
40
|
-
e
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
const i = e?.type, m = i === _.IN_PROGRESS || i === _.INFO, h = () => m ? "alert-in-progress" : i === _.SUCCESS ? "alert-success" : "alert-error", f = m ? t : i === _.SUCCESS ? n : i === _.ERROR ? s : null, g = e?.text;
|
|
41
|
+
return O(() => {
|
|
42
|
+
if (!e || m)
|
|
43
|
+
return;
|
|
44
|
+
const C = setTimeout(() => {
|
|
45
|
+
l?.();
|
|
46
|
+
}, ze);
|
|
47
|
+
return () => clearTimeout(C);
|
|
48
|
+
}, [e, m, l]), /* @__PURE__ */ r(
|
|
44
49
|
"div",
|
|
45
50
|
{
|
|
46
|
-
className:
|
|
47
|
-
"alert alert-shadow fixed bottom-3 right-3 z-10",
|
|
48
|
-
|
|
51
|
+
className: p(
|
|
52
|
+
"alert alert-shadow fixed bottom-3 right-3 z-10 w-[min(380px,calc(100vw-24px))] max-w-[calc(100vw-24px)]",
|
|
53
|
+
h()
|
|
49
54
|
),
|
|
50
|
-
children: /* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */ r("div", { className: "alert-icon", children:
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */ r("h3", { className: "truncate", children: e?.title }),
|
|
54
|
-
|
|
55
|
+
children: /* @__PURE__ */ u("div", { className: "alert-content flex items-start", children: [
|
|
56
|
+
f && /* @__PURE__ */ r("div", { className: "alert-icon", children: f }),
|
|
57
|
+
/* @__PURE__ */ u("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
|
|
58
|
+
/* @__PURE__ */ r("h3", { className: "alert-title truncate", children: e?.title }),
|
|
59
|
+
c ?? (g && /* @__PURE__ */ r(
|
|
60
|
+
"div",
|
|
61
|
+
{
|
|
62
|
+
className: "alert-text whitespace-pre-line break-words",
|
|
63
|
+
title: g,
|
|
64
|
+
children: g
|
|
65
|
+
}
|
|
66
|
+
))
|
|
55
67
|
] }),
|
|
56
|
-
/* @__PURE__ */ r(
|
|
68
|
+
/* @__PURE__ */ r(re, { title: a, onClick: l })
|
|
57
69
|
] })
|
|
58
70
|
}
|
|
59
71
|
);
|
|
60
|
-
},
|
|
72
|
+
}, He = () => /* @__PURE__ */ r("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ r("div", { className: "loader" }) }), $e = be({
|
|
61
73
|
extend: {
|
|
62
74
|
classGroups: {
|
|
63
75
|
typography: [
|
|
@@ -74,61 +86,61 @@ const mt = ({
|
|
|
74
86
|
}
|
|
75
87
|
}
|
|
76
88
|
});
|
|
77
|
-
function
|
|
78
|
-
return
|
|
89
|
+
function F(...e) {
|
|
90
|
+
return $e(p(...e));
|
|
79
91
|
}
|
|
80
|
-
const
|
|
92
|
+
const Ge = ({
|
|
81
93
|
buttonClassName: e,
|
|
82
94
|
textClassName: t,
|
|
83
95
|
isLoading: n = !1,
|
|
84
96
|
title: s,
|
|
85
97
|
disabled: l,
|
|
86
98
|
iconAfter: a,
|
|
87
|
-
iconBefore:
|
|
88
|
-
onClick:
|
|
89
|
-
isSmallButton:
|
|
99
|
+
iconBefore: c,
|
|
100
|
+
onClick: i,
|
|
101
|
+
isSmallButton: m
|
|
90
102
|
}) => {
|
|
91
|
-
const
|
|
92
|
-
|
|
103
|
+
const h = F([
|
|
104
|
+
m ? "font-semibold" : "",
|
|
93
105
|
a ? "mr-2" : "",
|
|
94
|
-
|
|
106
|
+
c ? "ml-2" : "",
|
|
95
107
|
t
|
|
96
108
|
]);
|
|
97
|
-
return /* @__PURE__ */
|
|
109
|
+
return /* @__PURE__ */ u(
|
|
98
110
|
"button",
|
|
99
111
|
{
|
|
100
112
|
type: "button",
|
|
101
|
-
className:
|
|
113
|
+
className: p(
|
|
102
114
|
"base-button",
|
|
103
115
|
e,
|
|
104
|
-
|
|
116
|
+
m ? "small-button" : ""
|
|
105
117
|
),
|
|
106
118
|
disabled: l || n,
|
|
107
119
|
"aria-label": "button",
|
|
108
|
-
onClick: (
|
|
120
|
+
onClick: (f) => i?.(f),
|
|
109
121
|
title: s,
|
|
110
122
|
children: [
|
|
111
|
-
|
|
112
|
-
n && /* @__PURE__ */ r(
|
|
113
|
-
s ?
|
|
123
|
+
c,
|
|
124
|
+
n && /* @__PURE__ */ r(He, {}),
|
|
125
|
+
s ? m ? /* @__PURE__ */ r("h4", { className: h, children: s }) : /* @__PURE__ */ r("h3", { className: h, children: s }) : null,
|
|
114
126
|
a
|
|
115
127
|
]
|
|
116
128
|
}
|
|
117
129
|
);
|
|
118
130
|
};
|
|
119
|
-
function
|
|
131
|
+
function Be(e = 719) {
|
|
120
132
|
const [t, n] = j(
|
|
121
133
|
() => typeof window < "u" ? window.innerWidth < e : !1
|
|
122
134
|
);
|
|
123
|
-
return
|
|
135
|
+
return O(() => {
|
|
124
136
|
const s = window.matchMedia(`(max-width: ${e}px)`), l = (a) => {
|
|
125
137
|
n(a.matches);
|
|
126
138
|
};
|
|
127
139
|
return n(s.matches), s.addEventListener("change", l), () => s.removeEventListener("change", l);
|
|
128
140
|
}, [e]), t;
|
|
129
141
|
}
|
|
130
|
-
function
|
|
131
|
-
const n =
|
|
142
|
+
function Nt(e, t) {
|
|
143
|
+
const n = W(null);
|
|
132
144
|
return P(
|
|
133
145
|
(...l) => {
|
|
134
146
|
n.current && clearTimeout(n.current), n.current = setTimeout(() => {
|
|
@@ -138,65 +150,65 @@ function ht(e, t) {
|
|
|
138
150
|
[e, t]
|
|
139
151
|
);
|
|
140
152
|
}
|
|
141
|
-
const
|
|
153
|
+
const wt = 24, vt = 24, V = 1e3, We = 24, Ct = ({
|
|
142
154
|
label: e,
|
|
143
155
|
onChange: t,
|
|
144
156
|
value: n,
|
|
145
157
|
options: s,
|
|
146
|
-
calendarResolution: l =
|
|
158
|
+
calendarResolution: l = A.DAY,
|
|
147
159
|
id: a,
|
|
148
|
-
icon:
|
|
149
|
-
isEndDate:
|
|
160
|
+
icon: c,
|
|
161
|
+
isEndDate: i
|
|
150
162
|
}) => {
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
const
|
|
154
|
-
|
|
163
|
+
const m = W(null), h = Be();
|
|
164
|
+
O(() => {
|
|
165
|
+
const N = m?.current;
|
|
166
|
+
N && N.querySelector("input")?.setAttribute("aria-label", e);
|
|
155
167
|
}, [e]);
|
|
156
|
-
const
|
|
168
|
+
const f = {
|
|
157
169
|
...s,
|
|
158
170
|
disableMobile: !0,
|
|
159
|
-
defaultDate: l ===
|
|
160
|
-
}, g = (
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
}, C = (
|
|
164
|
-
if (l ===
|
|
165
|
-
const
|
|
171
|
+
defaultDate: l === A.MONTH ? new Date(n.getFullYear(), n.getMonth()) : n
|
|
172
|
+
}, g = (N, v, b) => {
|
|
173
|
+
const d = `calendar__${l === A.MONTH ? "month" : "day"}`;
|
|
174
|
+
b.calendarContainer && b.calendarContainer.classList.add(d);
|
|
175
|
+
}, C = (N, v, b) => {
|
|
176
|
+
if (l === A.MONTH && N.length > 0) {
|
|
177
|
+
const d = s.minDate, o = s.maxDate, x = N[0].getFullYear(), w = b.calendarContainer, S = "flatpickr-disabled", y = w.querySelectorAll(
|
|
166
178
|
".flatpickr-monthSelect-month"
|
|
167
|
-
),
|
|
179
|
+
), E = w.querySelectorAll(
|
|
168
180
|
".flatpickr-next-month"
|
|
169
|
-
)[0], D =
|
|
181
|
+
)[0], D = w.querySelectorAll(
|
|
170
182
|
".flatpickr-prev-month"
|
|
171
183
|
)[0];
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
const
|
|
175
|
-
|
|
184
|
+
x === o.getFullYear() && E.classList.add(S), x === d.getFullYear() && D.classList.add(S), (x === d.getFullYear() || x === o.getFullYear()) && y.forEach((k) => {
|
|
185
|
+
k.classList.remove(S);
|
|
186
|
+
const I = new Date(k.getAttribute("aria-label")), R = I.getFullYear() === d.getFullYear() && I.getMonth() === d.getMonth(), z = I.getFullYear() === o.getFullYear() && I.getMonth() === o.getMonth();
|
|
187
|
+
R || z || (I < d || I > o) && k.classList.add(S);
|
|
176
188
|
});
|
|
177
189
|
}
|
|
178
190
|
setTimeout(() => {
|
|
179
|
-
const
|
|
180
|
-
|
|
191
|
+
const d = b.calendarContainer, o = b._input?.getBoundingClientRect();
|
|
192
|
+
d && (d.style.top = `${o.top - d.offsetHeight - 8}px`, d.style.width = `${d.style.width}px`, i ? (d.style.right = `${window.innerWidth - o.right - (h ? We : 0)}px`, d.style.left = "auto") : d.style.left = `${o.left}px`);
|
|
181
193
|
}, 0);
|
|
182
194
|
};
|
|
183
|
-
return /* @__PURE__ */
|
|
195
|
+
return /* @__PURE__ */ u("div", { className: "calendar relative", ref: m, children: [
|
|
184
196
|
/* @__PURE__ */ r("div", { className: "calendar-title mb-1", children: e }),
|
|
185
197
|
/* @__PURE__ */ r(
|
|
186
198
|
"label",
|
|
187
199
|
{
|
|
188
200
|
htmlFor: a,
|
|
189
201
|
className: "absolute right-[11px] top-[29px] cursor-pointer",
|
|
190
|
-
children:
|
|
202
|
+
children: c || /* @__PURE__ */ r(fe, {})
|
|
191
203
|
}
|
|
192
204
|
),
|
|
193
205
|
/* @__PURE__ */ r(
|
|
194
|
-
|
|
206
|
+
Ne,
|
|
195
207
|
{
|
|
196
|
-
defaultValue: (l ===
|
|
197
|
-
options:
|
|
198
|
-
onChange: (
|
|
199
|
-
t(
|
|
208
|
+
defaultValue: (l === A.MONTH ? new Date(n.getFullYear(), n.getMonth()) : n)?.toDateString(),
|
|
209
|
+
options: f,
|
|
210
|
+
onChange: (N) => {
|
|
211
|
+
t(N[0]);
|
|
200
212
|
},
|
|
201
213
|
onOpen: [C],
|
|
202
214
|
onReady: [g],
|
|
@@ -204,55 +216,55 @@ const ft = 24, pt = 24, q = 1e3, Ge = 24, gt = ({
|
|
|
204
216
|
}
|
|
205
217
|
)
|
|
206
218
|
] });
|
|
207
|
-
},
|
|
219
|
+
}, se = ({
|
|
208
220
|
label: e,
|
|
209
221
|
id: t,
|
|
210
222
|
checked: n,
|
|
211
223
|
checkboxIcon: s,
|
|
212
224
|
onChange: l,
|
|
213
225
|
disabled: a = !1,
|
|
214
|
-
className:
|
|
215
|
-
stopPropagation:
|
|
226
|
+
className: c,
|
|
227
|
+
stopPropagation: i = !0
|
|
216
228
|
}) => {
|
|
217
|
-
const
|
|
229
|
+
const m = P(
|
|
218
230
|
(g) => {
|
|
219
|
-
|
|
231
|
+
i && g.stopPropagation();
|
|
220
232
|
},
|
|
221
|
-
[
|
|
222
|
-
),
|
|
233
|
+
[i]
|
|
234
|
+
), h = P(
|
|
223
235
|
(g) => {
|
|
224
|
-
|
|
236
|
+
i && g.stopPropagation(), l?.(t, g.target.checked);
|
|
225
237
|
},
|
|
226
|
-
[l, t,
|
|
227
|
-
),
|
|
238
|
+
[l, t, i]
|
|
239
|
+
), f = () => {
|
|
228
240
|
if (n)
|
|
229
|
-
return s || /* @__PURE__ */ r(
|
|
241
|
+
return s || /* @__PURE__ */ r(pe, { className: "absolute size-4" });
|
|
230
242
|
};
|
|
231
|
-
return /* @__PURE__ */
|
|
243
|
+
return /* @__PURE__ */ u(
|
|
232
244
|
"label",
|
|
233
245
|
{
|
|
234
246
|
htmlFor: t,
|
|
235
|
-
onClick:
|
|
236
|
-
className:
|
|
247
|
+
onClick: m,
|
|
248
|
+
className: F(
|
|
237
249
|
"flex min-w-0 items-center py-1 shrink-0",
|
|
238
250
|
a ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
239
|
-
|
|
251
|
+
c
|
|
240
252
|
),
|
|
241
253
|
children: [
|
|
242
254
|
/* @__PURE__ */ r(
|
|
243
255
|
"span",
|
|
244
256
|
{
|
|
245
|
-
className:
|
|
257
|
+
className: p(
|
|
246
258
|
"checkbox-button relative flex size-[14px] items-center justify-center"
|
|
247
259
|
),
|
|
248
260
|
"aria-hidden": !0,
|
|
249
|
-
children:
|
|
261
|
+
children: f()
|
|
250
262
|
}
|
|
251
263
|
),
|
|
252
264
|
e ? /* @__PURE__ */ r(
|
|
253
265
|
"p",
|
|
254
266
|
{
|
|
255
|
-
className:
|
|
267
|
+
className: p(
|
|
256
268
|
"checkbox-button-text text-neutrals-1000 min-w-0 ml-2 flex-1 truncate pr-2"
|
|
257
269
|
),
|
|
258
270
|
title: e,
|
|
@@ -266,33 +278,33 @@ const ft = 24, pt = 24, q = 1e3, Ge = 24, gt = ({
|
|
|
266
278
|
type: "checkbox",
|
|
267
279
|
checked: n,
|
|
268
280
|
disabled: a,
|
|
269
|
-
onChange:
|
|
281
|
+
onChange: h,
|
|
270
282
|
className: "hidden"
|
|
271
283
|
}
|
|
272
284
|
)
|
|
273
285
|
]
|
|
274
286
|
}
|
|
275
287
|
);
|
|
276
|
-
},
|
|
288
|
+
}, yt = ({
|
|
277
289
|
title: e,
|
|
278
290
|
icon: t,
|
|
279
291
|
children: n,
|
|
280
292
|
value: s
|
|
281
293
|
}) => {
|
|
282
294
|
const [l, a] = j(!1);
|
|
283
|
-
return /* @__PURE__ */
|
|
295
|
+
return /* @__PURE__ */ u(
|
|
284
296
|
"div",
|
|
285
297
|
{
|
|
286
298
|
className: `collapsible-block flex flex-col border-t-2 border-neutrals-600 ${l ? "collapsible-block-open" : ""}`,
|
|
287
299
|
children: [
|
|
288
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ u(
|
|
289
301
|
"div",
|
|
290
302
|
{
|
|
291
303
|
className: "collapsible-block-title flex cursor-pointer items-center py-4",
|
|
292
304
|
onClick: () => a(!l),
|
|
293
305
|
children: [
|
|
294
|
-
/* @__PURE__ */ r("div", { className: `${l ? "rotate-180" : ""} transition-transform`, children: t || /* @__PURE__ */ r(
|
|
295
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ r("div", { className: `${l ? "rotate-180" : ""} transition-transform`, children: t || /* @__PURE__ */ r(ge, { className: "mr-3 size-5" }) }),
|
|
307
|
+
/* @__PURE__ */ u("div", { className: "flex flex-1 items-center justify-between", children: [
|
|
296
308
|
/* @__PURE__ */ r("span", { children: e }),
|
|
297
309
|
s && /* @__PURE__ */ r("p", { className: "body-1 text-neutrals-800", children: s })
|
|
298
310
|
] })
|
|
@@ -303,41 +315,41 @@ const ft = 24, pt = 24, q = 1e3, Ge = 24, gt = ({
|
|
|
303
315
|
]
|
|
304
316
|
}
|
|
305
317
|
);
|
|
306
|
-
},
|
|
307
|
-
const n =
|
|
318
|
+
}, Et = ({ text: e, highlightText: t }) => {
|
|
319
|
+
const n = U(() => {
|
|
308
320
|
const s = [];
|
|
309
321
|
if (!t)
|
|
310
322
|
return [{ id: 0, text: e, highlight: !1 }];
|
|
311
323
|
const l = t?.toLowerCase() || "", a = e?.toLowerCase()?.split(l) || "";
|
|
312
|
-
for (let
|
|
313
|
-
const
|
|
314
|
-
|
|
324
|
+
for (let c = 0, i = 0; c < a?.length; c++) {
|
|
325
|
+
const m = a?.[c], h = m.length;
|
|
326
|
+
m !== "" && s.push({
|
|
315
327
|
id: s.length,
|
|
316
328
|
highlight: !1,
|
|
317
329
|
text: e?.substring(
|
|
318
|
-
|
|
319
|
-
|
|
330
|
+
i,
|
|
331
|
+
i + h
|
|
320
332
|
)
|
|
321
|
-
}),
|
|
333
|
+
}), i += h, c !== a?.length - 1 && (s.push({
|
|
322
334
|
id: s.length,
|
|
323
335
|
highlight: !0,
|
|
324
336
|
text: e?.substring(
|
|
325
|
-
|
|
326
|
-
|
|
337
|
+
i,
|
|
338
|
+
i + t.length
|
|
327
339
|
)
|
|
328
|
-
}),
|
|
340
|
+
}), i += t.length);
|
|
329
341
|
}
|
|
330
342
|
return s;
|
|
331
343
|
}, [t, e]);
|
|
332
|
-
return /* @__PURE__ */ r(
|
|
344
|
+
return /* @__PURE__ */ r(q, { children: n.map((s) => /* @__PURE__ */ r(
|
|
333
345
|
"span",
|
|
334
346
|
{
|
|
335
|
-
className:
|
|
347
|
+
className: p(s?.highlight && "bg-highlight"),
|
|
336
348
|
children: s?.text
|
|
337
349
|
},
|
|
338
350
|
s?.id
|
|
339
351
|
)) });
|
|
340
|
-
},
|
|
352
|
+
}, It = ({
|
|
341
353
|
icon: e,
|
|
342
354
|
onClick: t,
|
|
343
355
|
buttonClassName: n,
|
|
@@ -348,33 +360,33 @@ const ft = 24, pt = 24, q = 1e3, Ge = 24, gt = ({
|
|
|
348
360
|
"button",
|
|
349
361
|
{
|
|
350
362
|
type: "button",
|
|
351
|
-
className:
|
|
363
|
+
className: p(
|
|
352
364
|
a && "base-icon-button",
|
|
353
365
|
n
|
|
354
366
|
),
|
|
355
|
-
onClick: (
|
|
367
|
+
onClick: (c) => t?.(c),
|
|
356
368
|
disabled: s,
|
|
357
369
|
title: l,
|
|
358
370
|
"aria-label": "button",
|
|
359
371
|
children: e
|
|
360
372
|
}
|
|
361
|
-
),
|
|
373
|
+
), Ue = ({
|
|
362
374
|
value: e,
|
|
363
375
|
inputId: t,
|
|
364
376
|
placeholder: n = "",
|
|
365
377
|
cssClass: s = "",
|
|
366
378
|
type: l = "text",
|
|
367
379
|
disabled: a,
|
|
368
|
-
readonly:
|
|
369
|
-
onChange:
|
|
370
|
-
onKeyDown:
|
|
371
|
-
onFocus:
|
|
372
|
-
onBlur:
|
|
380
|
+
readonly: c,
|
|
381
|
+
onChange: i,
|
|
382
|
+
onKeyDown: m,
|
|
383
|
+
onFocus: h,
|
|
384
|
+
onBlur: f
|
|
373
385
|
}) => {
|
|
374
|
-
const g =
|
|
386
|
+
const g = p(
|
|
375
387
|
"truncate outline-none shadow-none body-1",
|
|
376
388
|
s,
|
|
377
|
-
|
|
389
|
+
c ? "pointer-events-none" : ""
|
|
378
390
|
);
|
|
379
391
|
return /* @__PURE__ */ r(
|
|
380
392
|
"input",
|
|
@@ -387,24 +399,24 @@ const ft = 24, pt = 24, q = 1e3, Ge = 24, gt = ({
|
|
|
387
399
|
title: e ? String(e) : "",
|
|
388
400
|
disabled: a,
|
|
389
401
|
className: g,
|
|
390
|
-
onKeyDown:
|
|
391
|
-
onFocus:
|
|
392
|
-
onBlur:
|
|
393
|
-
onChange: (C) =>
|
|
402
|
+
onKeyDown: m,
|
|
403
|
+
onFocus: h,
|
|
404
|
+
onBlur: f,
|
|
405
|
+
onChange: (C) => i?.(C.currentTarget.value)
|
|
394
406
|
}
|
|
395
407
|
);
|
|
396
|
-
},
|
|
408
|
+
}, St = ({
|
|
397
409
|
iconBeforeInput: e,
|
|
398
410
|
iconAfterInput: t,
|
|
399
411
|
containerClasses: n,
|
|
400
412
|
cssClass: s,
|
|
401
413
|
...l
|
|
402
|
-
}) => /* @__PURE__ */
|
|
414
|
+
}) => /* @__PURE__ */ u("div", { className: p("input w-full flex flex-row", n), children: [
|
|
403
415
|
e,
|
|
404
416
|
/* @__PURE__ */ r(
|
|
405
|
-
|
|
417
|
+
Ue,
|
|
406
418
|
{
|
|
407
|
-
cssClass:
|
|
419
|
+
cssClass: p(
|
|
408
420
|
"border-0 bg-transparent p-0 h-full shadow-none flex-1 min-w-0 rounded-none",
|
|
409
421
|
s
|
|
410
422
|
),
|
|
@@ -412,24 +424,24 @@ const ft = 24, pt = 24, q = 1e3, Ge = 24, gt = ({
|
|
|
412
424
|
}
|
|
413
425
|
),
|
|
414
426
|
t
|
|
415
|
-
] }),
|
|
427
|
+
] }), kt = ({
|
|
416
428
|
url: e,
|
|
417
429
|
title: t,
|
|
418
430
|
linkClassName: n = "",
|
|
419
431
|
iconBefore: s,
|
|
420
432
|
iconAfter: l
|
|
421
433
|
}) => {
|
|
422
|
-
const a =
|
|
434
|
+
const a = p(
|
|
423
435
|
l ? "mr-2" : "",
|
|
424
436
|
s ? "ml-2" : ""
|
|
425
437
|
);
|
|
426
|
-
return /* @__PURE__ */
|
|
438
|
+
return /* @__PURE__ */ u(
|
|
427
439
|
"a",
|
|
428
440
|
{
|
|
429
441
|
href: e,
|
|
430
442
|
target: "_blank",
|
|
431
443
|
rel: "noopener noreferrer",
|
|
432
|
-
className:
|
|
444
|
+
className: p("base-link", n),
|
|
433
445
|
title: t,
|
|
434
446
|
children: [
|
|
435
447
|
s,
|
|
@@ -438,11 +450,11 @@ const ft = 24, pt = 24, q = 1e3, Ge = 24, gt = ({
|
|
|
438
450
|
]
|
|
439
451
|
}
|
|
440
452
|
);
|
|
441
|
-
},
|
|
453
|
+
}, Dt = ({ title: e, text: t, disabled: n, onClick: s }) => /* @__PURE__ */ r(
|
|
442
454
|
"button",
|
|
443
455
|
{
|
|
444
456
|
type: "button",
|
|
445
|
-
className:
|
|
457
|
+
className: p(
|
|
446
458
|
"tag flex items-center justify-center",
|
|
447
459
|
"disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-neutrals-100"
|
|
448
460
|
),
|
|
@@ -451,7 +463,7 @@ const ft = 24, pt = 24, q = 1e3, Ge = 24, gt = ({
|
|
|
451
463
|
"aria-label": "button",
|
|
452
464
|
children: /* @__PURE__ */ r("h4", { children: e })
|
|
453
465
|
}
|
|
454
|
-
),
|
|
466
|
+
), Lt = ({
|
|
455
467
|
label: e,
|
|
456
468
|
id: t,
|
|
457
469
|
checked: n,
|
|
@@ -459,23 +471,23 @@ const ft = 24, pt = 24, q = 1e3, Ge = 24, gt = ({
|
|
|
459
471
|
description: l,
|
|
460
472
|
onChange: a
|
|
461
473
|
}) => {
|
|
462
|
-
const
|
|
463
|
-
(
|
|
464
|
-
|
|
474
|
+
const c = P(
|
|
475
|
+
(i) => {
|
|
476
|
+
i.stopPropagation(), a?.(t, i.target.checked);
|
|
465
477
|
},
|
|
466
478
|
[a, t]
|
|
467
479
|
);
|
|
468
|
-
return /* @__PURE__ */
|
|
480
|
+
return /* @__PURE__ */ u(
|
|
469
481
|
"label",
|
|
470
482
|
{
|
|
471
483
|
className: "flex min-w-0 cursor-pointer flex-col py-[6px]",
|
|
472
484
|
htmlFor: t,
|
|
473
485
|
children: [
|
|
474
|
-
/* @__PURE__ */
|
|
486
|
+
/* @__PURE__ */ u("p", { className: "radio-label flex min-w-0 items-center", children: [
|
|
475
487
|
/* @__PURE__ */ r(
|
|
476
488
|
"span",
|
|
477
489
|
{
|
|
478
|
-
className:
|
|
490
|
+
className: p(
|
|
479
491
|
"flex justify-center items-center w-4 h-4 mr-2 relative",
|
|
480
492
|
"radio-button",
|
|
481
493
|
n ? "radio-button-active" : ""
|
|
@@ -504,7 +516,7 @@ const ft = 24, pt = 24, q = 1e3, Ge = 24, gt = ({
|
|
|
504
516
|
"input",
|
|
505
517
|
{
|
|
506
518
|
type: "radio",
|
|
507
|
-
onChange:
|
|
519
|
+
onChange: c,
|
|
508
520
|
id: t,
|
|
509
521
|
checked: n,
|
|
510
522
|
className: "hidden"
|
|
@@ -514,175 +526,216 @@ const ft = 24, pt = 24, q = 1e3, Ge = 24, gt = ({
|
|
|
514
526
|
}
|
|
515
527
|
);
|
|
516
528
|
};
|
|
517
|
-
var
|
|
518
|
-
const
|
|
529
|
+
var T = /* @__PURE__ */ ((e) => (e.Closed = "Closed", e.Opened = "Opened", e))(T || {}), G = /* @__PURE__ */ ((e) => (e.LG = "Large", e.SM = "Small", e))(G || {});
|
|
530
|
+
const Ve = ({
|
|
519
531
|
portalId: e,
|
|
520
|
-
state: t =
|
|
532
|
+
state: t = T.Opened,
|
|
521
533
|
heading: n,
|
|
522
534
|
size: s,
|
|
523
535
|
onClose: l,
|
|
524
536
|
children: a,
|
|
525
|
-
overlayClassName:
|
|
526
|
-
containerClassName:
|
|
527
|
-
dividers:
|
|
528
|
-
closeButtonTitle:
|
|
537
|
+
overlayClassName: c,
|
|
538
|
+
containerClassName: i,
|
|
539
|
+
dividers: m = !0,
|
|
540
|
+
closeButtonTitle: h
|
|
529
541
|
}) => {
|
|
530
|
-
const { refs:
|
|
531
|
-
open: t !==
|
|
542
|
+
const { refs: f, context: g } = J({
|
|
543
|
+
open: t !== T.Closed && !!t,
|
|
532
544
|
onOpenChange: l
|
|
533
|
-
}), C =
|
|
534
|
-
(
|
|
535
|
-
|
|
545
|
+
}), C = we(g, { role: "dialog" }), N = ee(g, { outsidePress: !0 }), { getFloatingProps: v } = te([C, N]), b = P(
|
|
546
|
+
(d) => {
|
|
547
|
+
d?.preventDefault(), d?.stopPropagation(), l();
|
|
536
548
|
},
|
|
537
549
|
[l]
|
|
538
550
|
);
|
|
539
|
-
return /* @__PURE__ */ r(
|
|
540
|
-
|
|
551
|
+
return /* @__PURE__ */ r(ne, { id: e, children: t !== T.Closed && /* @__PURE__ */ r(
|
|
552
|
+
ve,
|
|
541
553
|
{
|
|
542
|
-
className:
|
|
554
|
+
className: p(
|
|
543
555
|
"z-modal flex items-center justify-center bg-blackout p-4",
|
|
544
|
-
|
|
556
|
+
c
|
|
545
557
|
),
|
|
546
|
-
children: /* @__PURE__ */ r(Ce, { context: g, children: /* @__PURE__ */
|
|
558
|
+
children: /* @__PURE__ */ r(Ce, { context: g, children: /* @__PURE__ */ u(
|
|
547
559
|
"div",
|
|
548
560
|
{
|
|
549
|
-
className:
|
|
561
|
+
className: p(
|
|
550
562
|
"relative max-h-full modal rounded bg-white flex flex-col shadow w-full",
|
|
551
|
-
s ===
|
|
552
|
-
s ===
|
|
553
|
-
|
|
554
|
-
|
|
563
|
+
s === G.LG && "max-w-[65%]",
|
|
564
|
+
s === G.SM && "max-w-[30%]",
|
|
565
|
+
m && "divide-neutrals-400 divide-y",
|
|
566
|
+
i,
|
|
555
567
|
"sm:w-full sm:max-w-full sm:px-4 sm:py-6"
|
|
556
568
|
),
|
|
557
|
-
ref:
|
|
558
|
-
...
|
|
559
|
-
onClick(
|
|
560
|
-
|
|
569
|
+
ref: f.setFloating,
|
|
570
|
+
...v({
|
|
571
|
+
onClick(d) {
|
|
572
|
+
d.stopPropagation();
|
|
561
573
|
}
|
|
562
574
|
}),
|
|
563
575
|
children: [
|
|
564
|
-
/* @__PURE__ */
|
|
576
|
+
/* @__PURE__ */ u("div", { className: "modal-heading mb-2 flex flex-row items-center justify-between px-6 py-3 sm:p-0 sm:pb-2", children: [
|
|
565
577
|
n && (typeof n == "string" ? /* @__PURE__ */ r("h2", { className: "modal-heading-title sm:h3 mr-3 min-w-0 flex-1", children: n }) : n),
|
|
566
578
|
/* @__PURE__ */ r(
|
|
567
|
-
|
|
579
|
+
re,
|
|
568
580
|
{
|
|
569
|
-
title:
|
|
570
|
-
onClick:
|
|
581
|
+
title: h,
|
|
582
|
+
onClick: b,
|
|
571
583
|
btnClassNames: "sm:h-[24px] sm:w-[24px] sm:top-4"
|
|
572
584
|
}
|
|
573
585
|
)
|
|
574
586
|
] }),
|
|
575
|
-
a.map((
|
|
587
|
+
a.map((d) => d)
|
|
576
588
|
]
|
|
577
589
|
}
|
|
578
590
|
) })
|
|
579
591
|
}
|
|
580
592
|
) });
|
|
581
|
-
},
|
|
593
|
+
}, Ot = (e) => e.state === T.Closed ? null : /* @__PURE__ */ r(Ve, { ...e }), H = "statgpt-dropdown-open", L = 8, qe = {
|
|
594
|
+
name: "keepDropdownWithinViewport",
|
|
595
|
+
fn({ y: e, rects: t }) {
|
|
596
|
+
if (typeof window > "u")
|
|
597
|
+
return {};
|
|
598
|
+
const n = document.documentElement.clientHeight || window.innerHeight, s = Math.min(
|
|
599
|
+
t.floating.height,
|
|
600
|
+
Math.max(0, n - L * 2)
|
|
601
|
+
), l = L, a = n - s - L;
|
|
602
|
+
return {
|
|
603
|
+
y: Math.min(Math.max(e, l), Math.max(l, a))
|
|
604
|
+
};
|
|
605
|
+
}
|
|
606
|
+
}, Ft = ({
|
|
582
607
|
triggerButton: e,
|
|
583
608
|
options: t,
|
|
584
609
|
content: n,
|
|
585
610
|
selectedOption: s,
|
|
586
611
|
disabled: l,
|
|
587
612
|
containerClassName: a,
|
|
588
|
-
openedClassName:
|
|
589
|
-
onOptionSelect:
|
|
613
|
+
openedClassName: c,
|
|
614
|
+
onOptionSelect: i
|
|
590
615
|
}) => {
|
|
591
|
-
const [h,
|
|
616
|
+
const m = me(), [h, f] = j(!1), { refs: g, floatingStyles: C, context: N } = J({
|
|
592
617
|
open: h,
|
|
593
|
-
onOpenChange: l ? void 0 :
|
|
618
|
+
onOpenChange: l ? void 0 : f,
|
|
594
619
|
placement: "bottom-end",
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
620
|
+
strategy: "fixed",
|
|
621
|
+
middleware: [
|
|
622
|
+
Ee(L),
|
|
623
|
+
Ie({ padding: L }),
|
|
624
|
+
Se({
|
|
625
|
+
padding: L,
|
|
626
|
+
apply({ availableHeight: x, elements: w }) {
|
|
627
|
+
w.floating.style.maxHeight = `${Math.max(
|
|
628
|
+
0,
|
|
629
|
+
x
|
|
630
|
+
)}px`;
|
|
631
|
+
}
|
|
632
|
+
}),
|
|
633
|
+
ke({ padding: L }),
|
|
634
|
+
qe
|
|
635
|
+
],
|
|
636
|
+
whileElementsMounted: ye
|
|
637
|
+
}), v = De(N), b = ee(N, { outsidePress: !0 }), { getReferenceProps: d, getFloatingProps: o } = te([
|
|
638
|
+
v,
|
|
639
|
+
b
|
|
600
640
|
]);
|
|
601
|
-
return
|
|
641
|
+
return O(() => {
|
|
642
|
+
h && window.dispatchEvent(
|
|
643
|
+
new CustomEvent(H, { detail: m })
|
|
644
|
+
);
|
|
645
|
+
}, [m, h]), O(() => {
|
|
646
|
+
const x = (w) => {
|
|
647
|
+
w instanceof CustomEvent && w.detail !== m && f(!1);
|
|
648
|
+
};
|
|
649
|
+
return window.addEventListener(H, x), () => {
|
|
650
|
+
window.removeEventListener(H, x);
|
|
651
|
+
};
|
|
652
|
+
}, [m]), O(() => {
|
|
653
|
+
l && f(!1);
|
|
654
|
+
}, [l]), /* @__PURE__ */ u(q, { children: [
|
|
602
655
|
/* @__PURE__ */ r(
|
|
603
656
|
"div",
|
|
604
657
|
{
|
|
605
|
-
ref:
|
|
606
|
-
...
|
|
607
|
-
onClick(
|
|
608
|
-
|
|
658
|
+
ref: g.setReference,
|
|
659
|
+
...d({
|
|
660
|
+
onClick(x) {
|
|
661
|
+
x.stopPropagation();
|
|
609
662
|
}
|
|
610
663
|
}),
|
|
611
|
-
className:
|
|
664
|
+
className: p(a, h && c),
|
|
612
665
|
children: e
|
|
613
666
|
}
|
|
614
667
|
),
|
|
615
|
-
h && /* @__PURE__ */
|
|
668
|
+
h && /* @__PURE__ */ r(ne, { children: /* @__PURE__ */ u(
|
|
616
669
|
"div",
|
|
617
670
|
{
|
|
618
|
-
ref:
|
|
619
|
-
style:
|
|
620
|
-
className: "dropdown-menu-shadow dropdown-container z-
|
|
621
|
-
...
|
|
671
|
+
ref: g.setFloating,
|
|
672
|
+
style: { ...C, overflowY: "auto" },
|
|
673
|
+
className: "dropdown-menu-shadow dropdown-container z-dropdown flex flex-col rounded bg-white",
|
|
674
|
+
...o(),
|
|
622
675
|
children: [
|
|
623
676
|
n && n,
|
|
624
|
-
t && t.map((
|
|
677
|
+
t && t.map((x) => /* @__PURE__ */ r(
|
|
625
678
|
"div",
|
|
626
679
|
{
|
|
627
|
-
onClick: (
|
|
628
|
-
|
|
680
|
+
onClick: (w) => {
|
|
681
|
+
w.stopPropagation(), i?.(x.key), f(!1);
|
|
629
682
|
},
|
|
630
|
-
className:
|
|
683
|
+
className: p(
|
|
631
684
|
"text-neutrals-900 body-3 cursor-pointer dropdown-item min-w-[200px]",
|
|
632
|
-
s ===
|
|
685
|
+
s === x.key && "bg-hues-100"
|
|
633
686
|
),
|
|
634
|
-
children: /* @__PURE__ */
|
|
687
|
+
children: /* @__PURE__ */ u(
|
|
635
688
|
"div",
|
|
636
689
|
{
|
|
637
690
|
className: "dropdown-item-text flex h-full items-center gap-x-2 p-2 hover:bg-hues-100",
|
|
638
|
-
title:
|
|
691
|
+
title: x.title,
|
|
639
692
|
children: [
|
|
640
|
-
|
|
641
|
-
/* @__PURE__ */ r("p", { children:
|
|
693
|
+
x.icon ? x.icon : null,
|
|
694
|
+
/* @__PURE__ */ r("p", { children: x?.title })
|
|
642
695
|
]
|
|
643
696
|
}
|
|
644
697
|
)
|
|
645
698
|
},
|
|
646
|
-
|
|
699
|
+
x.key
|
|
647
700
|
))
|
|
648
701
|
]
|
|
649
702
|
}
|
|
650
|
-
)
|
|
703
|
+
) })
|
|
651
704
|
] });
|
|
652
|
-
},
|
|
653
|
-
/* @__PURE__ */ r("div", { className: "flex gap-x-[4px]", children: /* @__PURE__ */ r("div", { className: "flex flex-col", children: /* @__PURE__ */
|
|
654
|
-
/* @__PURE__ */
|
|
705
|
+
}, Rt = ({ limitMessages: e, query: t }) => /* @__PURE__ */ u("div", { className: "flex flex-wrap items-center justify-between bg-hues-100 px-2 py-1", children: [
|
|
706
|
+
/* @__PURE__ */ r("div", { className: "flex gap-x-[4px]", children: /* @__PURE__ */ r("div", { className: "flex flex-col", children: /* @__PURE__ */ u("div", { className: "flex gap-x-[4px]", children: [
|
|
707
|
+
/* @__PURE__ */ u("span", { className: "h5 text-primary", children: [
|
|
655
708
|
e?.excelFormatTitle,
|
|
656
709
|
" "
|
|
657
710
|
] }),
|
|
658
711
|
/* @__PURE__ */ r("span", { className: "body-3 text-neutrals-800", children: e?.excelFormatText })
|
|
659
712
|
] }) }) }),
|
|
660
|
-
/* @__PURE__ */ r("a", { href: t, target: "_blank", rel: "noreferrer", children: /* @__PURE__ */
|
|
713
|
+
/* @__PURE__ */ r("a", { href: t, target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ u("span", { className: "body-3 flex cursor-pointer items-center gap-x-[4px]", children: [
|
|
661
714
|
e?.dataExplorerIcon,
|
|
662
715
|
e?.dataExplorer
|
|
663
716
|
] }) })
|
|
664
|
-
] }),
|
|
717
|
+
] }), _t = ({
|
|
665
718
|
limitMessages: e,
|
|
666
719
|
isDownload: t,
|
|
667
720
|
showAdvancedViewButton: n,
|
|
668
721
|
onAdvancedViewClick: s,
|
|
669
722
|
query: l
|
|
670
|
-
}) => /* @__PURE__ */
|
|
723
|
+
}) => /* @__PURE__ */ u(
|
|
671
724
|
"div",
|
|
672
725
|
{
|
|
673
|
-
className:
|
|
726
|
+
className: p(
|
|
674
727
|
"bg-semantic-warning-light px-2 py-1 flex justify-between flex-wrap items-center",
|
|
675
728
|
e?.containerClassName
|
|
676
729
|
),
|
|
677
730
|
children: [
|
|
678
|
-
/* @__PURE__ */
|
|
731
|
+
/* @__PURE__ */ u("div", { className: "flex items-center gap-x-2", children: [
|
|
679
732
|
/* @__PURE__ */ r("span", { children: e?.warningIcon }),
|
|
680
|
-
/* @__PURE__ */
|
|
681
|
-
/* @__PURE__ */
|
|
682
|
-
/* @__PURE__ */
|
|
733
|
+
/* @__PURE__ */ u("div", { className: "flex flex-col gap-1", children: [
|
|
734
|
+
/* @__PURE__ */ u("div", { className: "flex gap-x-[4px]", children: [
|
|
735
|
+
/* @__PURE__ */ u(
|
|
683
736
|
"span",
|
|
684
737
|
{
|
|
685
|
-
className:
|
|
738
|
+
className: p(
|
|
686
739
|
"text-primary h5",
|
|
687
740
|
e?.largeQueryClassName
|
|
688
741
|
),
|
|
@@ -696,18 +749,18 @@ const $e = ({
|
|
|
696
749
|
/* @__PURE__ */ r(
|
|
697
750
|
"span",
|
|
698
751
|
{
|
|
699
|
-
className:
|
|
752
|
+
className: p(
|
|
700
753
|
"text-neutrals-800 body-3",
|
|
701
754
|
e?.limitMessageClassName
|
|
702
755
|
),
|
|
703
|
-
children: t ? e?.downloadMessage?.(
|
|
756
|
+
children: t ? e?.downloadMessage?.(V) : e?.showingLimit?.(V)
|
|
704
757
|
}
|
|
705
758
|
)
|
|
706
759
|
] }),
|
|
707
760
|
t && /* @__PURE__ */ r(
|
|
708
761
|
"span",
|
|
709
762
|
{
|
|
710
|
-
className:
|
|
763
|
+
className: p(
|
|
711
764
|
"text-neutrals-800 body-3",
|
|
712
765
|
e?.limitMessageClassName
|
|
713
766
|
),
|
|
@@ -716,7 +769,7 @@ const $e = ({
|
|
|
716
769
|
)
|
|
717
770
|
] })
|
|
718
771
|
] }),
|
|
719
|
-
n && /* @__PURE__ */
|
|
772
|
+
n && /* @__PURE__ */ u(
|
|
720
773
|
"span",
|
|
721
774
|
{
|
|
722
775
|
onClick: () => s?.(),
|
|
@@ -727,118 +780,118 @@ const $e = ({
|
|
|
727
780
|
]
|
|
728
781
|
}
|
|
729
782
|
),
|
|
730
|
-
t && /* @__PURE__ */ r("a", { href: l || "", target: "_blank", rel: "noreferrer", children: /* @__PURE__ */
|
|
783
|
+
t && /* @__PURE__ */ r("a", { href: l || "", target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ u("span", { className: "body-3 flex cursor-pointer items-center gap-x-[4px]", children: [
|
|
731
784
|
e?.dataExplorerIcon,
|
|
732
785
|
e?.dataExplorer
|
|
733
786
|
] }) })
|
|
734
787
|
]
|
|
735
788
|
}
|
|
736
|
-
),
|
|
737
|
-
function
|
|
789
|
+
), le = Q(null);
|
|
790
|
+
function At({
|
|
738
791
|
value: e,
|
|
739
792
|
children: t
|
|
740
793
|
}) {
|
|
741
|
-
const n =
|
|
742
|
-
return /* @__PURE__ */ r(
|
|
794
|
+
const n = U(() => e ?? {}, [e]);
|
|
795
|
+
return /* @__PURE__ */ r(le.Provider, { value: n, children: t });
|
|
743
796
|
}
|
|
744
|
-
function
|
|
745
|
-
return
|
|
797
|
+
function Qe() {
|
|
798
|
+
return K(le);
|
|
746
799
|
}
|
|
747
|
-
var
|
|
748
|
-
const
|
|
749
|
-
[
|
|
750
|
-
[
|
|
751
|
-
[
|
|
752
|
-
[
|
|
753
|
-
},
|
|
754
|
-
function
|
|
800
|
+
var M = /* @__PURE__ */ ((e) => (e.Info = "info", e.Error = "error", e.Warning = "warning", e.Note = "note", e))(M || {});
|
|
801
|
+
const Ke = {
|
|
802
|
+
[M.Info]: "border-neutrals-800 bg-neutrals-300 text-neutrals-1000",
|
|
803
|
+
[M.Error]: "border-semantic-error bg-semantic-error-light text-neutrals-1000",
|
|
804
|
+
[M.Warning]: "border-semantic-warning bg-semantic-warning-light text-neutrals-1000",
|
|
805
|
+
[M.Note]: "border-hues-900 bg-neutrals-200 text-neutrals-1000"
|
|
806
|
+
}, Xe = "shrink-0", Ze = "min-w-0 body-2", Je = "flex items-start gap-2 min-w-0 border-l-2 rounded py-2 px-4 items-center";
|
|
807
|
+
function Mt({
|
|
755
808
|
type: e,
|
|
756
809
|
icon: t,
|
|
757
810
|
children: n,
|
|
758
811
|
className: s,
|
|
759
812
|
contentClassName: l
|
|
760
813
|
}) {
|
|
761
|
-
const a =
|
|
762
|
-
|
|
814
|
+
const a = Qe(), c = t ?? a?.icons?.[e], i = a?.classes?.container ?? Je, m = a?.classes?.types?.[e] ?? Ke[e], h = F(i, m, s), f = F(Xe, a?.classes?.icon), g = F(
|
|
815
|
+
Ze,
|
|
763
816
|
a?.classes?.content,
|
|
764
817
|
l
|
|
765
818
|
);
|
|
766
|
-
return /* @__PURE__ */
|
|
767
|
-
|
|
819
|
+
return /* @__PURE__ */ u("div", { "data-type": e, className: h, children: [
|
|
820
|
+
c ? /* @__PURE__ */ r("span", { className: f, children: c }) : null,
|
|
768
821
|
n ? /* @__PURE__ */ r("div", { className: g, children: n }) : null
|
|
769
822
|
] });
|
|
770
823
|
}
|
|
771
|
-
const
|
|
824
|
+
const Tt = ({
|
|
772
825
|
title: e,
|
|
773
826
|
copiedTitle: t,
|
|
774
827
|
tooltip: n,
|
|
775
828
|
icon: s,
|
|
776
829
|
copiedIcon: l,
|
|
777
830
|
className: a,
|
|
778
|
-
buttonTextClassName:
|
|
779
|
-
onClick:
|
|
831
|
+
buttonTextClassName: c,
|
|
832
|
+
onClick: i
|
|
780
833
|
}) => {
|
|
781
|
-
const [
|
|
782
|
-
|
|
783
|
-
|
|
834
|
+
const [m, h] = j(!1), f = W(null), g = () => {
|
|
835
|
+
i(), h(!0), f.current && clearTimeout(f.current), f.current = setTimeout(() => {
|
|
836
|
+
h(!1);
|
|
784
837
|
}, 1e3);
|
|
785
838
|
};
|
|
786
|
-
return
|
|
787
|
-
|
|
788
|
-
}, []), /* @__PURE__ */
|
|
839
|
+
return O(() => () => {
|
|
840
|
+
f.current && clearTimeout(f.current);
|
|
841
|
+
}, []), /* @__PURE__ */ u("div", { className: "relative w-fit", children: [
|
|
789
842
|
/* @__PURE__ */ r(
|
|
790
|
-
|
|
843
|
+
Ge,
|
|
791
844
|
{
|
|
792
|
-
title:
|
|
845
|
+
title: m ? t : e,
|
|
793
846
|
isSmallButton: !0,
|
|
794
|
-
disabled:
|
|
795
|
-
buttonClassName:
|
|
847
|
+
disabled: m,
|
|
848
|
+
buttonClassName: F([
|
|
796
849
|
"text-button-tertiary small-icon-button !h-6 !p-0",
|
|
797
850
|
a
|
|
798
851
|
]),
|
|
799
|
-
textClassName:
|
|
852
|
+
textClassName: F(["ml-1", c]),
|
|
800
853
|
onClick: g,
|
|
801
|
-
iconBefore:
|
|
854
|
+
iconBefore: m ? l : s
|
|
802
855
|
}
|
|
803
856
|
),
|
|
804
|
-
n &&
|
|
857
|
+
n && m && /* @__PURE__ */ r("div", { className: "h4 absolute left-1/2 top-full z-50 mt-1 -translate-x-1/2 whitespace-nowrap rounded border border-neutrals-400 bg-white px-3 py-4 text-neutrals-900 shadow", children: n })
|
|
805
858
|
] });
|
|
806
859
|
};
|
|
807
|
-
function
|
|
860
|
+
function et({
|
|
808
861
|
id: e,
|
|
809
862
|
label: t,
|
|
810
863
|
hasChildren: n,
|
|
811
864
|
showDragHandle: s,
|
|
812
865
|
showCheckbox: l,
|
|
813
866
|
isChecked: a,
|
|
814
|
-
isExpanded:
|
|
867
|
+
isExpanded: c
|
|
815
868
|
}) {
|
|
816
|
-
return /* @__PURE__ */
|
|
869
|
+
return /* @__PURE__ */ u("div", { className: "relative cursor-grabbing rounded bg-neutrals-200 shadow", children: [
|
|
817
870
|
/* @__PURE__ */ r("div", { className: "absolute -left-[0.5px] top-0.5 h-5 w-0.5 rounded-full bg-gradients-light" }),
|
|
818
|
-
/* @__PURE__ */
|
|
819
|
-
s ? /* @__PURE__ */ r("div", { className: "flex w-6 items-center justify-center", children: /* @__PURE__ */ r("span", { "aria-hidden": !0, className: "rounded p-1", children: /* @__PURE__ */ r(
|
|
820
|
-
/* @__PURE__ */
|
|
821
|
-
l ? /* @__PURE__ */ r(
|
|
871
|
+
/* @__PURE__ */ u("div", { className: "flex items-stretch overflow-hidden rounded", children: [
|
|
872
|
+
s ? /* @__PURE__ */ r("div", { className: "flex w-6 items-center justify-center", children: /* @__PURE__ */ r("span", { "aria-hidden": !0, className: "rounded p-1", children: /* @__PURE__ */ r(X, { size: 16 }) }) }) : null,
|
|
873
|
+
/* @__PURE__ */ u("div", { className: "flex min-w-0 flex-1 items-center gap-2 p-1", children: [
|
|
874
|
+
l ? /* @__PURE__ */ r(se, { id: e, checked: !!a, className: "p-0" }) : null,
|
|
822
875
|
/* @__PURE__ */ r("span", { className: "body-3 truncate", children: t })
|
|
823
876
|
] }),
|
|
824
877
|
n ? /* @__PURE__ */ r("div", { className: "flex w-8 items-center justify-center", children: /* @__PURE__ */ r(
|
|
825
878
|
"span",
|
|
826
879
|
{
|
|
827
880
|
"aria-hidden": !0,
|
|
828
|
-
className:
|
|
881
|
+
className: p(
|
|
829
882
|
"transition-transform",
|
|
830
|
-
|
|
883
|
+
c ? "rotate-90" : "rotate-0"
|
|
831
884
|
),
|
|
832
|
-
children: /* @__PURE__ */ r(
|
|
885
|
+
children: /* @__PURE__ */ r(Z, { size: 16 })
|
|
833
886
|
}
|
|
834
887
|
) }) : null
|
|
835
888
|
] })
|
|
836
889
|
] });
|
|
837
890
|
}
|
|
838
|
-
function
|
|
891
|
+
function ae(e, t) {
|
|
839
892
|
return `i:${[...e, t].join("/")}`;
|
|
840
893
|
}
|
|
841
|
-
function
|
|
894
|
+
function $(e) {
|
|
842
895
|
if (!e.startsWith("i:")) return null;
|
|
843
896
|
const n = e.slice(2).split("/").filter(Boolean);
|
|
844
897
|
return n.length ? {
|
|
@@ -846,59 +899,59 @@ function G(e) {
|
|
|
846
899
|
itemId: n[n.length - 1]
|
|
847
900
|
} : null;
|
|
848
901
|
}
|
|
849
|
-
function
|
|
850
|
-
const s =
|
|
902
|
+
function tt(e, t, n) {
|
|
903
|
+
const s = oe(e, t);
|
|
851
904
|
return s ? s.find((l) => l.id === n) ?? null : null;
|
|
852
905
|
}
|
|
853
|
-
function
|
|
906
|
+
function ie(e, t) {
|
|
854
907
|
if (t.length === 0) return e;
|
|
855
908
|
const [n, ...s] = t, l = e.find((a) => a.id === n);
|
|
856
|
-
return l?.items ?
|
|
909
|
+
return l?.items ? ie(l.items, s) : null;
|
|
857
910
|
}
|
|
858
|
-
function
|
|
859
|
-
const n =
|
|
911
|
+
function oe(e, t) {
|
|
912
|
+
const n = ie(e, t);
|
|
860
913
|
return n ? n.filter(
|
|
861
914
|
(s) => s.type === "item"
|
|
862
915
|
) : null;
|
|
863
916
|
}
|
|
864
|
-
function
|
|
917
|
+
function ce(e, t, n) {
|
|
865
918
|
if (t.length === 0)
|
|
866
919
|
return n(e);
|
|
867
920
|
const [s, ...l] = t;
|
|
868
921
|
return e.map((a) => a.id !== s || !a.items ? a : {
|
|
869
922
|
...a,
|
|
870
|
-
items:
|
|
923
|
+
items: ce(a.items, l, n)
|
|
871
924
|
});
|
|
872
925
|
}
|
|
873
|
-
function
|
|
926
|
+
function nt({
|
|
874
927
|
parentPath: e,
|
|
875
928
|
item: t,
|
|
876
929
|
showDragHandle: n,
|
|
877
930
|
showCheckbox: s,
|
|
878
931
|
renderLabel: l,
|
|
879
932
|
onItemClick: a,
|
|
880
|
-
onToggleExpanded:
|
|
881
|
-
onToggleChecked:
|
|
933
|
+
onToggleExpanded: c,
|
|
934
|
+
onToggleChecked: i
|
|
882
935
|
}) {
|
|
883
|
-
const
|
|
884
|
-
attributes:
|
|
885
|
-
listeners:
|
|
886
|
-
setNodeRef:
|
|
887
|
-
setActivatorNodeRef:
|
|
888
|
-
transform:
|
|
889
|
-
transition:
|
|
890
|
-
isDragging:
|
|
891
|
-
} =
|
|
892
|
-
transform:
|
|
893
|
-
transition:
|
|
894
|
-
opacity:
|
|
895
|
-
}, y = !!t.isDisabled,
|
|
896
|
-
return /* @__PURE__ */
|
|
936
|
+
const m = !!t.items?.length, h = !!t.isExpanded, f = t.isDisabled ? !1 : t.draggable ?? !0, g = t.isDisabled ? !1 : t.checkable ?? !0, C = ae(e, t.id), {
|
|
937
|
+
attributes: N,
|
|
938
|
+
listeners: v,
|
|
939
|
+
setNodeRef: b,
|
|
940
|
+
setActivatorNodeRef: d,
|
|
941
|
+
transform: o,
|
|
942
|
+
transition: x,
|
|
943
|
+
isDragging: w
|
|
944
|
+
} = Me({ id: C, disabled: !f }), S = {
|
|
945
|
+
transform: je.Transform.toString(o),
|
|
946
|
+
transition: x,
|
|
947
|
+
opacity: w ? 0.6 : void 0
|
|
948
|
+
}, y = !!t.isDisabled, E = y || !g, D = [...e, t.id];
|
|
949
|
+
return /* @__PURE__ */ u(
|
|
897
950
|
"div",
|
|
898
951
|
{
|
|
899
|
-
ref:
|
|
952
|
+
ref: b,
|
|
900
953
|
style: S,
|
|
901
|
-
className:
|
|
954
|
+
className: p([
|
|
902
955
|
"group flex items-stretch overflow-hidden rounded bg-white",
|
|
903
956
|
"select-none",
|
|
904
957
|
y ? "opacity-50" : ""
|
|
@@ -907,24 +960,24 @@ function Ke({
|
|
|
907
960
|
n ? /* @__PURE__ */ r(
|
|
908
961
|
"div",
|
|
909
962
|
{
|
|
910
|
-
className:
|
|
963
|
+
className: p([
|
|
911
964
|
"group/drag-handle flex w-6 items-center justify-center rounded",
|
|
912
965
|
y ? "" : "hover:bg-neutrals-100 cursor-grab"
|
|
913
966
|
]),
|
|
914
967
|
children: /* @__PURE__ */ r(
|
|
915
968
|
"span",
|
|
916
969
|
{
|
|
917
|
-
ref:
|
|
970
|
+
ref: d,
|
|
918
971
|
"aria-hidden": !0,
|
|
919
|
-
className:
|
|
972
|
+
className: p([
|
|
920
973
|
"rounded p-1",
|
|
921
|
-
|
|
974
|
+
f ? "cursor-grab" : "cursor-default",
|
|
922
975
|
"transition-opacity"
|
|
923
976
|
]),
|
|
924
|
-
...
|
|
925
|
-
...
|
|
977
|
+
...f ? v : {},
|
|
978
|
+
...f ? N : {},
|
|
926
979
|
children: /* @__PURE__ */ r(
|
|
927
|
-
|
|
980
|
+
X,
|
|
928
981
|
{
|
|
929
982
|
size: 16,
|
|
930
983
|
className: "text-neutrals-800 group-hover/drag-handle:text-primary"
|
|
@@ -934,20 +987,20 @@ function Ke({
|
|
|
934
987
|
)
|
|
935
988
|
}
|
|
936
989
|
) : null,
|
|
937
|
-
/* @__PURE__ */
|
|
990
|
+
/* @__PURE__ */ u(
|
|
938
991
|
"button",
|
|
939
992
|
{
|
|
940
993
|
type: "button",
|
|
941
994
|
disabled: y,
|
|
942
|
-
"aria-disabled":
|
|
943
|
-
onClick: (
|
|
944
|
-
|
|
995
|
+
"aria-disabled": E,
|
|
996
|
+
onClick: (k) => {
|
|
997
|
+
E || a?.({
|
|
945
998
|
itemId: t.id,
|
|
946
999
|
path: D,
|
|
947
|
-
nativeEvent:
|
|
1000
|
+
nativeEvent: k
|
|
948
1001
|
});
|
|
949
1002
|
},
|
|
950
|
-
className:
|
|
1003
|
+
className: p([
|
|
951
1004
|
"flex min-w-0 flex-1 items-center gap-2 p-1 text-left rounded",
|
|
952
1005
|
y ? "" : "hover:bg-neutrals-100",
|
|
953
1006
|
y ? "" : "hover:text-blue-700",
|
|
@@ -955,17 +1008,17 @@ function Ke({
|
|
|
955
1008
|
]),
|
|
956
1009
|
children: [
|
|
957
1010
|
s ? /* @__PURE__ */ r(
|
|
958
|
-
|
|
1011
|
+
se,
|
|
959
1012
|
{
|
|
960
1013
|
id: `draggable-list-${D.join("-")}`,
|
|
961
1014
|
checked: !!t.isChecked,
|
|
962
1015
|
disabled: !g,
|
|
963
1016
|
className: "p-0",
|
|
964
1017
|
stopPropagation: !0,
|
|
965
|
-
onChange: (
|
|
1018
|
+
onChange: (k, I) => i?.({
|
|
966
1019
|
itemId: t.id,
|
|
967
1020
|
path: D,
|
|
968
|
-
nextChecked: !!
|
|
1021
|
+
nextChecked: !!I
|
|
969
1022
|
})
|
|
970
1023
|
}
|
|
971
1024
|
) : null,
|
|
@@ -973,20 +1026,20 @@ function Ke({
|
|
|
973
1026
|
]
|
|
974
1027
|
}
|
|
975
1028
|
),
|
|
976
|
-
|
|
1029
|
+
m ? /* @__PURE__ */ r(
|
|
977
1030
|
"button",
|
|
978
1031
|
{
|
|
979
1032
|
type: "button",
|
|
980
1033
|
disabled: y,
|
|
981
|
-
onClick: (
|
|
982
|
-
|
|
1034
|
+
onClick: (k) => {
|
|
1035
|
+
k.stopPropagation(), c?.({
|
|
983
1036
|
itemId: t.id,
|
|
984
1037
|
path: D,
|
|
985
|
-
nextExpanded: !
|
|
1038
|
+
nextExpanded: !h
|
|
986
1039
|
});
|
|
987
1040
|
},
|
|
988
|
-
"aria-label":
|
|
989
|
-
className:
|
|
1041
|
+
"aria-label": h ? "Collapse" : "Expand",
|
|
1042
|
+
className: p([
|
|
990
1043
|
"flex w-8 items-center justify-center rounded",
|
|
991
1044
|
y ? "" : "hover:bg-neutrals-100",
|
|
992
1045
|
"focus:outline-none"
|
|
@@ -995,11 +1048,11 @@ function Ke({
|
|
|
995
1048
|
"span",
|
|
996
1049
|
{
|
|
997
1050
|
"aria-hidden": !0,
|
|
998
|
-
className:
|
|
1051
|
+
className: p(
|
|
999
1052
|
"transition-transform duration-150 ease-out",
|
|
1000
|
-
|
|
1053
|
+
h ? "rotate-90" : "rotate-0"
|
|
1001
1054
|
),
|
|
1002
|
-
children: /* @__PURE__ */ r(
|
|
1055
|
+
children: /* @__PURE__ */ r(Z, { size: 16 })
|
|
1003
1056
|
}
|
|
1004
1057
|
)
|
|
1005
1058
|
}
|
|
@@ -1008,155 +1061,155 @@ function Ke({
|
|
|
1008
1061
|
}
|
|
1009
1062
|
);
|
|
1010
1063
|
}
|
|
1011
|
-
function
|
|
1064
|
+
function Pt({
|
|
1012
1065
|
items: e,
|
|
1013
1066
|
showDragHandle: t = !0,
|
|
1014
1067
|
showCheckbox: n = !0,
|
|
1015
1068
|
onItemsChange: s,
|
|
1016
1069
|
onToggleExpanded: l,
|
|
1017
1070
|
onToggleChecked: a,
|
|
1018
|
-
onItemClick:
|
|
1019
|
-
renderLabel:
|
|
1071
|
+
onItemClick: c,
|
|
1072
|
+
renderLabel: i
|
|
1020
1073
|
}) {
|
|
1021
|
-
const
|
|
1022
|
-
|
|
1023
|
-
), [
|
|
1024
|
-
const
|
|
1025
|
-
if (!
|
|
1026
|
-
const
|
|
1027
|
-
!
|
|
1028
|
-
id:
|
|
1029
|
-
label:
|
|
1030
|
-
hasChildren: !!
|
|
1031
|
-
isChecked:
|
|
1032
|
-
isExpanded:
|
|
1074
|
+
const m = Le(
|
|
1075
|
+
Oe(Fe, { activationConstraint: { distance: 6 } })
|
|
1076
|
+
), [h, f] = ue.useState(null), g = (v) => {
|
|
1077
|
+
const b = String(v.active.id), d = $(b);
|
|
1078
|
+
if (!d) return;
|
|
1079
|
+
const o = tt(e, d.parentPath, d.itemId);
|
|
1080
|
+
!o || o.type !== "item" || f({
|
|
1081
|
+
id: b,
|
|
1082
|
+
label: o.label,
|
|
1083
|
+
hasChildren: !!o.items?.length,
|
|
1084
|
+
isChecked: o.isChecked,
|
|
1085
|
+
isExpanded: o.isExpanded
|
|
1033
1086
|
});
|
|
1034
|
-
}, C = (
|
|
1035
|
-
|
|
1036
|
-
const
|
|
1087
|
+
}, C = (v) => {
|
|
1088
|
+
f(null);
|
|
1089
|
+
const b = v.over;
|
|
1090
|
+
if (!b) return;
|
|
1091
|
+
const d = $(String(v.active.id)), o = $(String(b.id));
|
|
1092
|
+
if (!d || !o || d.parentPath.join("/") !== o.parentPath.join("/")) return;
|
|
1093
|
+
const x = oe(e, d.parentPath);
|
|
1037
1094
|
if (!x) return;
|
|
1038
|
-
const
|
|
1039
|
-
if (
|
|
1040
|
-
const
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
(
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
return w.map((L) => {
|
|
1050
|
-
if (L.type !== "item") return L;
|
|
1051
|
-
const Y = I[E];
|
|
1052
|
-
return E += 1, Y;
|
|
1095
|
+
const w = x.findIndex((E) => E.id === d.itemId), S = x.findIndex((E) => E.id === o.itemId);
|
|
1096
|
+
if (w === -1 || S === -1 || w === S) return;
|
|
1097
|
+
const y = ce(e, d.parentPath, (E) => {
|
|
1098
|
+
const D = E.filter(
|
|
1099
|
+
(R) => R.type === "item"
|
|
1100
|
+
), k = Ye(D, w, S);
|
|
1101
|
+
let I = 0;
|
|
1102
|
+
return E.map((R) => {
|
|
1103
|
+
if (R.type !== "item") return R;
|
|
1104
|
+
const z = k[I];
|
|
1105
|
+
return I += 1, z;
|
|
1053
1106
|
});
|
|
1054
1107
|
});
|
|
1055
1108
|
s(y);
|
|
1056
|
-
},
|
|
1057
|
-
const
|
|
1109
|
+
}, N = (v, b = []) => {
|
|
1110
|
+
const d = v.filter((o) => o.type === "item").map((o) => ae(b, o.id));
|
|
1058
1111
|
return /* @__PURE__ */ r(
|
|
1059
|
-
|
|
1112
|
+
Te,
|
|
1060
1113
|
{
|
|
1061
|
-
items:
|
|
1062
|
-
strategy:
|
|
1063
|
-
children: /* @__PURE__ */ r("ul", { className: "m-0 flex list-none flex-col gap-2 p-0", children:
|
|
1114
|
+
items: d,
|
|
1115
|
+
strategy: Pe,
|
|
1116
|
+
children: /* @__PURE__ */ r("ul", { className: "m-0 flex list-none flex-col gap-2 p-0", children: v.map((o) => o.type === "group" ? /* @__PURE__ */ u(
|
|
1064
1117
|
"li",
|
|
1065
1118
|
{
|
|
1066
1119
|
className: "m-0 mt-2 flex flex-col gap-2 p-0 first:mt-0",
|
|
1067
1120
|
children: [
|
|
1068
|
-
/* @__PURE__ */
|
|
1069
|
-
/* @__PURE__ */ r(
|
|
1070
|
-
|
|
1121
|
+
/* @__PURE__ */ u("div", { className: "h5 flex items-center gap-2 py-1 text-neutrals-1000", children: [
|
|
1122
|
+
/* @__PURE__ */ r(xe, { size: 12, className: "shrink-0" }),
|
|
1123
|
+
o.label
|
|
1071
1124
|
] }),
|
|
1072
|
-
/* @__PURE__ */ r("div", { className: "border-l border-neutrals-600 pl-2", children:
|
|
1125
|
+
/* @__PURE__ */ r("div", { className: "border-l border-neutrals-600 pl-2", children: N(o.items, [...b, o.id]) })
|
|
1073
1126
|
]
|
|
1074
1127
|
},
|
|
1075
|
-
|
|
1076
|
-
) : /* @__PURE__ */
|
|
1128
|
+
o.id
|
|
1129
|
+
) : /* @__PURE__ */ u("li", { className: "m-0 flex flex-col gap-2 p-0", children: [
|
|
1077
1130
|
/* @__PURE__ */ r(
|
|
1078
|
-
|
|
1131
|
+
nt,
|
|
1079
1132
|
{
|
|
1080
|
-
parentPath:
|
|
1081
|
-
item:
|
|
1133
|
+
parentPath: b,
|
|
1134
|
+
item: o,
|
|
1082
1135
|
showDragHandle: t,
|
|
1083
1136
|
showCheckbox: n,
|
|
1084
|
-
renderLabel:
|
|
1085
|
-
onItemClick:
|
|
1137
|
+
renderLabel: i,
|
|
1138
|
+
onItemClick: c,
|
|
1086
1139
|
onToggleExpanded: l,
|
|
1087
1140
|
onToggleChecked: a
|
|
1088
1141
|
}
|
|
1089
1142
|
),
|
|
1090
|
-
|
|
1091
|
-
] },
|
|
1143
|
+
o.items?.length && o.isExpanded ? /* @__PURE__ */ r("div", { className: "pl-7", children: N(o.items, [...b, o.id]) }) : null
|
|
1144
|
+
] }, o.id)) })
|
|
1092
1145
|
}
|
|
1093
1146
|
);
|
|
1094
1147
|
};
|
|
1095
|
-
return /* @__PURE__ */
|
|
1148
|
+
return /* @__PURE__ */ u(
|
|
1096
1149
|
Re,
|
|
1097
1150
|
{
|
|
1098
|
-
sensors:
|
|
1099
|
-
collisionDetection:
|
|
1151
|
+
sensors: m,
|
|
1152
|
+
collisionDetection: _e,
|
|
1100
1153
|
onDragStart: g,
|
|
1101
1154
|
onDragEnd: C,
|
|
1102
1155
|
children: [
|
|
1103
|
-
/* @__PURE__ */ r("div", { className: "flex flex-col", children:
|
|
1104
|
-
/* @__PURE__ */ r(
|
|
1105
|
-
|
|
1156
|
+
/* @__PURE__ */ r("div", { className: "flex flex-col", children: N(e) }),
|
|
1157
|
+
/* @__PURE__ */ r(Ae, { children: h ? /* @__PURE__ */ r(
|
|
1158
|
+
et,
|
|
1106
1159
|
{
|
|
1107
|
-
id:
|
|
1108
|
-
label:
|
|
1109
|
-
hasChildren:
|
|
1160
|
+
id: h.id,
|
|
1161
|
+
label: h.label,
|
|
1162
|
+
hasChildren: h.hasChildren,
|
|
1110
1163
|
showDragHandle: t,
|
|
1111
1164
|
showCheckbox: n,
|
|
1112
|
-
isChecked:
|
|
1113
|
-
isExpanded:
|
|
1165
|
+
isChecked: h.isChecked,
|
|
1166
|
+
isExpanded: h.isExpanded
|
|
1114
1167
|
}
|
|
1115
1168
|
) : null })
|
|
1116
1169
|
]
|
|
1117
1170
|
}
|
|
1118
1171
|
);
|
|
1119
1172
|
}
|
|
1120
|
-
const
|
|
1121
|
-
function
|
|
1122
|
-
const s =
|
|
1173
|
+
const rt = (e, t) => e.label.toLowerCase().includes(t);
|
|
1174
|
+
function Yt(e, t, n = {}) {
|
|
1175
|
+
const s = lt(t);
|
|
1123
1176
|
if (!s)
|
|
1124
1177
|
return e;
|
|
1125
1178
|
const {
|
|
1126
1179
|
expandMatchedBranches: l = !0,
|
|
1127
1180
|
includeGroupDescendantsOnMatch: a = !0,
|
|
1128
|
-
includeItemDescendantsOnMatch:
|
|
1129
|
-
match:
|
|
1181
|
+
includeItemDescendantsOnMatch: c = !1,
|
|
1182
|
+
match: i = rt
|
|
1130
1183
|
} = n;
|
|
1131
|
-
return
|
|
1184
|
+
return B(e, s, {
|
|
1132
1185
|
expandMatchedBranches: l,
|
|
1133
1186
|
includeGroupDescendantsOnMatch: a,
|
|
1134
|
-
includeItemDescendantsOnMatch:
|
|
1135
|
-
match:
|
|
1187
|
+
includeItemDescendantsOnMatch: c,
|
|
1188
|
+
match: i
|
|
1136
1189
|
}) ?? [];
|
|
1137
1190
|
}
|
|
1138
|
-
function
|
|
1191
|
+
function B(e, t, n) {
|
|
1139
1192
|
const s = [];
|
|
1140
1193
|
for (const l of e) {
|
|
1141
|
-
const a =
|
|
1194
|
+
const a = st(l, t, n);
|
|
1142
1195
|
a && s.push(a);
|
|
1143
1196
|
}
|
|
1144
1197
|
return s.length ? s : null;
|
|
1145
1198
|
}
|
|
1146
|
-
function
|
|
1199
|
+
function st(e, t, n) {
|
|
1147
1200
|
const s = n.match(e, t);
|
|
1148
1201
|
if (e.type === "group") {
|
|
1149
1202
|
if (s && n.includeGroupDescendantsOnMatch)
|
|
1150
|
-
return
|
|
1151
|
-
const
|
|
1152
|
-
return !s && !
|
|
1203
|
+
return Y(e, n.expandMatchedBranches);
|
|
1204
|
+
const c = e.items?.length ? B(e.items, t, n) : null;
|
|
1205
|
+
return !s && !c ? null : {
|
|
1153
1206
|
...e,
|
|
1154
|
-
items:
|
|
1207
|
+
items: c ?? []
|
|
1155
1208
|
};
|
|
1156
1209
|
}
|
|
1157
|
-
const l = e.items?.length ?
|
|
1210
|
+
const l = e.items?.length ? B(e.items, t, n) : null;
|
|
1158
1211
|
if (s && n.includeItemDescendantsOnMatch)
|
|
1159
|
-
return
|
|
1212
|
+
return Y(e, n.expandMatchedBranches);
|
|
1160
1213
|
if (!s && !l)
|
|
1161
1214
|
return null;
|
|
1162
1215
|
const a = {
|
|
@@ -1164,32 +1217,32 @@ function Ze(e, t, n) {
|
|
|
1164
1217
|
};
|
|
1165
1218
|
return l ? (a.items = l, n.expandMatchedBranches && (a.isExpanded = !0)) : delete a.items, a;
|
|
1166
1219
|
}
|
|
1167
|
-
function
|
|
1220
|
+
function Y(e, t) {
|
|
1168
1221
|
return e.type === "group" ? {
|
|
1169
1222
|
...e,
|
|
1170
1223
|
items: e.items.map(
|
|
1171
|
-
(n) =>
|
|
1224
|
+
(n) => Y(n, t)
|
|
1172
1225
|
)
|
|
1173
1226
|
} : {
|
|
1174
1227
|
...e,
|
|
1175
1228
|
isExpanded: t && e.items?.length ? !0 : e.isExpanded,
|
|
1176
|
-
items: e.items?.map((n) =>
|
|
1229
|
+
items: e.items?.map((n) => Y(n, t))
|
|
1177
1230
|
};
|
|
1178
1231
|
}
|
|
1179
|
-
function
|
|
1232
|
+
function lt(e) {
|
|
1180
1233
|
return e.trim().toLowerCase();
|
|
1181
1234
|
}
|
|
1182
|
-
var
|
|
1183
|
-
const
|
|
1184
|
-
function
|
|
1235
|
+
var at = /* @__PURE__ */ ((e) => (e.Enter = "Enter", e))(at || {});
|
|
1236
|
+
const de = Q(null);
|
|
1237
|
+
function jt({
|
|
1185
1238
|
children: e,
|
|
1186
1239
|
isAgentAvailable: t
|
|
1187
1240
|
}) {
|
|
1188
|
-
const n =
|
|
1189
|
-
return /* @__PURE__ */ r(
|
|
1241
|
+
const n = U(() => ({ isAgentAvailable: t }), [t]);
|
|
1242
|
+
return /* @__PURE__ */ r(de.Provider, { value: n, children: e });
|
|
1190
1243
|
}
|
|
1191
|
-
function
|
|
1192
|
-
const e =
|
|
1244
|
+
function zt() {
|
|
1245
|
+
const e = K(de);
|
|
1193
1246
|
if (!e)
|
|
1194
1247
|
throw new Error(
|
|
1195
1248
|
"useAgentAvailability must be used within AgentAvailabilityProvider"
|
|
@@ -1197,40 +1250,40 @@ function At() {
|
|
|
1197
1250
|
return e;
|
|
1198
1251
|
}
|
|
1199
1252
|
export {
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1253
|
+
jt as AgentAvailabilityProvider,
|
|
1254
|
+
bt as Alert,
|
|
1255
|
+
_ as AlertType,
|
|
1256
|
+
Ge as Button,
|
|
1257
|
+
We as CALENDAR_MOBILE_PADDING,
|
|
1258
|
+
Ct as Calendar,
|
|
1259
|
+
se as Checkbox,
|
|
1260
|
+
re as CloseButton,
|
|
1261
|
+
yt as CollapsibleBlock,
|
|
1262
|
+
Tt as CopyButton,
|
|
1263
|
+
Rt as DownloadFormatMessage,
|
|
1264
|
+
Pt as DraggableList,
|
|
1265
|
+
Ft as Dropdown,
|
|
1266
|
+
Et as HighlightText,
|
|
1267
|
+
It as IconButton,
|
|
1268
|
+
Mt as InlineAlert,
|
|
1269
|
+
At as InlineAlertProvider,
|
|
1270
|
+
M as InlineAlertType,
|
|
1271
|
+
Ue as Input,
|
|
1272
|
+
St as InputWithIcon,
|
|
1273
|
+
at as KeyboardKey,
|
|
1274
|
+
kt as Link,
|
|
1275
|
+
He as Loader,
|
|
1276
|
+
G as PopUpSize,
|
|
1277
|
+
T as PopUpState,
|
|
1278
|
+
Ot as Popup,
|
|
1279
|
+
Lt as Radio,
|
|
1280
|
+
_t as RequestLimitMessage,
|
|
1281
|
+
V as SERIES_LIMIT,
|
|
1282
|
+
wt as TREE_NODE_ARROW_SIZE,
|
|
1283
|
+
vt as TREE_NODE_PADDING,
|
|
1284
|
+
Dt as Tag,
|
|
1285
|
+
Yt as filterDraggableListNodes,
|
|
1286
|
+
zt as useAgentAvailability,
|
|
1287
|
+
Nt as useDebounce,
|
|
1288
|
+
Be as useIsMobile
|
|
1236
1289
|
};
|