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