@epam/statgpt-ui-components 0.5.0-rc.4 → 0.5.0-rc.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Alert/Alert.d.ts +2 -0
- package/components/CopyButton/CopyButton.d.ts +3 -1
- package/components/DraggableList/DraggableList.d.ts +1 -1
- package/components/DraggableList/DraggableListOverlay.d.ts +1 -1
- package/components/DraggableList/DraggableListRow.d.ts +1 -1
- package/components/InlineAlert/InlineAlert.d.ts +2 -2
- package/components/InlineAlert/InlineAlertContext.d.ts +1 -1
- package/components/Loader/Loader.d.ts +1 -1
- package/constants/alert.d.ts +1 -0
- package/contexts/AgentAvailabilityContext.d.ts +2 -2
- package/index.css +1 -1
- package/index.js +1 -1
- package/index.mjs +510 -456
- 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 m, 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 g 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, h = i === _.IN_PROGRESS || i === _.INFO, d = () => h ? "alert-in-progress" : i === _.SUCCESS ? "alert-success" : "alert-error", p = h ? t : i === _.SUCCESS ? n : i === _.ERROR ? s : null, f = e?.text;
|
|
41
|
+
return O(() => {
|
|
42
|
+
if (!e || h)
|
|
43
|
+
return;
|
|
44
|
+
const v = setTimeout(() => {
|
|
45
|
+
l?.();
|
|
46
|
+
}, ze);
|
|
47
|
+
return () => clearTimeout(v);
|
|
48
|
+
}, [e, h, l]), /* @__PURE__ */ r(
|
|
44
49
|
"div",
|
|
45
50
|
{
|
|
46
|
-
className:
|
|
47
|
-
"alert alert-shadow fixed bottom-3 right-3 z-10",
|
|
48
|
-
|
|
51
|
+
className: g(
|
|
52
|
+
"alert alert-shadow fixed bottom-3 right-3 z-10 w-[min(380px,calc(100vw-24px))] max-w-[calc(100vw-24px)]",
|
|
53
|
+
d()
|
|
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__ */ m("div", { className: "alert-content flex items-start", children: [
|
|
56
|
+
p && /* @__PURE__ */ r("div", { className: "alert-icon", children: p }),
|
|
57
|
+
/* @__PURE__ */ m("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 ?? (f && /* @__PURE__ */ r(
|
|
60
|
+
"div",
|
|
61
|
+
{
|
|
62
|
+
className: "alert-text whitespace-pre-line break-words",
|
|
63
|
+
title: f,
|
|
64
|
+
children: f
|
|
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(g(...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:
|
|
99
|
+
iconBefore: c,
|
|
100
|
+
onClick: i,
|
|
89
101
|
isSmallButton: h
|
|
90
102
|
}) => {
|
|
91
|
-
const
|
|
103
|
+
const d = F([
|
|
92
104
|
h ? "font-semibold" : "",
|
|
93
105
|
a ? "mr-2" : "",
|
|
94
|
-
|
|
106
|
+
c ? "ml-2" : "",
|
|
95
107
|
t
|
|
96
108
|
]);
|
|
97
|
-
return /* @__PURE__ */
|
|
109
|
+
return /* @__PURE__ */ m(
|
|
98
110
|
"button",
|
|
99
111
|
{
|
|
100
112
|
type: "button",
|
|
101
|
-
className:
|
|
113
|
+
className: g(
|
|
102
114
|
"base-button",
|
|
103
115
|
e,
|
|
104
116
|
h ? "small-button" : ""
|
|
105
117
|
),
|
|
106
118
|
disabled: l || n,
|
|
107
119
|
"aria-label": "button",
|
|
108
|
-
onClick: (p) =>
|
|
120
|
+
onClick: (p) => i?.(p),
|
|
109
121
|
title: s,
|
|
110
122
|
children: [
|
|
111
|
-
|
|
112
|
-
n && /* @__PURE__ */ r(
|
|
113
|
-
s ? h ? /* @__PURE__ */ r("h4", { className:
|
|
123
|
+
c,
|
|
124
|
+
n && /* @__PURE__ */ r(He, {}),
|
|
125
|
+
s ? h ? /* @__PURE__ */ r("h4", { className: d, children: s }) : /* @__PURE__ */ r("h3", { className: d, 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,111 +150,111 @@ 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 h =
|
|
152
|
-
|
|
153
|
-
const
|
|
154
|
-
|
|
163
|
+
const h = W(null), d = Be();
|
|
164
|
+
O(() => {
|
|
165
|
+
const N = h?.current;
|
|
166
|
+
N && N.querySelector("input")?.setAttribute("aria-label", e);
|
|
155
167
|
}, [e]);
|
|
156
168
|
const p = {
|
|
157
169
|
...s,
|
|
158
170
|
disableMobile: !0,
|
|
159
|
-
defaultDate: l ===
|
|
160
|
-
},
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
},
|
|
164
|
-
if (l ===
|
|
165
|
-
const
|
|
171
|
+
defaultDate: l === A.MONTH ? new Date(n.getFullYear(), n.getMonth()) : n
|
|
172
|
+
}, f = (N, C, b) => {
|
|
173
|
+
const u = `calendar__${l === A.MONTH ? "month" : "day"}`;
|
|
174
|
+
b.calendarContainer && b.calendarContainer.classList.add(u);
|
|
175
|
+
}, v = (N, C, b) => {
|
|
176
|
+
if (l === A.MONTH && N.length > 0) {
|
|
177
|
+
const u = 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 === u.getFullYear() && D.classList.add(S), (x === u.getFullYear() || x === o.getFullYear()) && y.forEach((k) => {
|
|
185
|
+
k.classList.remove(S);
|
|
186
|
+
const I = new Date(k.getAttribute("aria-label")), R = I.getFullYear() === u.getFullYear() && I.getMonth() === u.getMonth(), z = I.getFullYear() === o.getFullYear() && I.getMonth() === o.getMonth();
|
|
187
|
+
R || z || (I < u || I > o) && k.classList.add(S);
|
|
176
188
|
});
|
|
177
189
|
}
|
|
178
190
|
setTimeout(() => {
|
|
179
|
-
const
|
|
180
|
-
|
|
191
|
+
const u = b.calendarContainer, o = b._input?.getBoundingClientRect();
|
|
192
|
+
u && (u.style.top = `${o.top - u.offsetHeight - 8}px`, u.style.width = `${u.style.width}px`, i ? (u.style.right = `${window.innerWidth - o.right - (d ? We : 0)}px`, u.style.left = "auto") : u.style.left = `${o.left}px`);
|
|
181
193
|
}, 0);
|
|
182
194
|
};
|
|
183
|
-
return /* @__PURE__ */
|
|
195
|
+
return /* @__PURE__ */ m("div", { className: "calendar relative", ref: h, 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 ===
|
|
208
|
+
defaultValue: (l === A.MONTH ? new Date(n.getFullYear(), n.getMonth()) : n)?.toDateString(),
|
|
197
209
|
options: p,
|
|
198
|
-
onChange: (
|
|
199
|
-
t(
|
|
210
|
+
onChange: (N) => {
|
|
211
|
+
t(N[0]);
|
|
200
212
|
},
|
|
201
|
-
onOpen: [
|
|
202
|
-
onReady: [
|
|
213
|
+
onOpen: [v],
|
|
214
|
+
onReady: [f],
|
|
203
215
|
id: a
|
|
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
229
|
const h = P(
|
|
218
|
-
(
|
|
219
|
-
|
|
230
|
+
(f) => {
|
|
231
|
+
i && f.stopPropagation();
|
|
220
232
|
},
|
|
221
|
-
[
|
|
222
|
-
),
|
|
223
|
-
(
|
|
224
|
-
|
|
233
|
+
[i]
|
|
234
|
+
), d = P(
|
|
235
|
+
(f) => {
|
|
236
|
+
i && f.stopPropagation(), l?.(t, f.target.checked);
|
|
225
237
|
},
|
|
226
|
-
[l, t,
|
|
238
|
+
[l, t, i]
|
|
227
239
|
), p = () => {
|
|
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__ */ m(
|
|
232
244
|
"label",
|
|
233
245
|
{
|
|
234
246
|
htmlFor: t,
|
|
235
247
|
onClick: h,
|
|
236
|
-
className:
|
|
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: g(
|
|
246
258
|
"checkbox-button relative flex size-[14px] items-center justify-center"
|
|
247
259
|
),
|
|
248
260
|
"aria-hidden": !0,
|
|
@@ -252,7 +264,7 @@ const ft = 24, pt = 24, q = 1e3, Ge = 24, gt = ({
|
|
|
252
264
|
e ? /* @__PURE__ */ r(
|
|
253
265
|
"p",
|
|
254
266
|
{
|
|
255
|
-
className:
|
|
267
|
+
className: g(
|
|
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: d,
|
|
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__ */ m(
|
|
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__ */ m(
|
|
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__ */ m("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 h = a?.[
|
|
324
|
+
for (let c = 0, i = 0; c < a?.length; c++) {
|
|
325
|
+
const h = a?.[c], d = h.length;
|
|
314
326
|
h !== "" && s.push({
|
|
315
327
|
id: s.length,
|
|
316
328
|
highlight: !1,
|
|
317
329
|
text: e?.substring(
|
|
318
|
-
|
|
319
|
-
|
|
330
|
+
i,
|
|
331
|
+
i + d
|
|
320
332
|
)
|
|
321
|
-
}),
|
|
333
|
+
}), i += d, 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: g(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: g(
|
|
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:
|
|
380
|
+
readonly: c,
|
|
381
|
+
onChange: i,
|
|
370
382
|
onKeyDown: h,
|
|
371
|
-
onFocus:
|
|
383
|
+
onFocus: d,
|
|
372
384
|
onBlur: p
|
|
373
385
|
}) => {
|
|
374
|
-
const
|
|
386
|
+
const f = g(
|
|
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",
|
|
@@ -386,25 +398,25 @@ const ft = 24, pt = 24, q = 1e3, Ge = 24, gt = ({
|
|
|
386
398
|
value: e || "",
|
|
387
399
|
title: e ? String(e) : "",
|
|
388
400
|
disabled: a,
|
|
389
|
-
className:
|
|
401
|
+
className: f,
|
|
390
402
|
onKeyDown: h,
|
|
391
|
-
onFocus:
|
|
403
|
+
onFocus: d,
|
|
392
404
|
onBlur: p,
|
|
393
|
-
onChange: (
|
|
405
|
+
onChange: (v) => i?.(v.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__ */ m("div", { className: g("input w-full flex flex-row", n), children: [
|
|
403
415
|
e,
|
|
404
416
|
/* @__PURE__ */ r(
|
|
405
|
-
|
|
417
|
+
Ue,
|
|
406
418
|
{
|
|
407
|
-
cssClass:
|
|
419
|
+
cssClass: g(
|
|
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 = g(
|
|
423
435
|
l ? "mr-2" : "",
|
|
424
436
|
s ? "ml-2" : ""
|
|
425
437
|
);
|
|
426
|
-
return /* @__PURE__ */
|
|
438
|
+
return /* @__PURE__ */ m(
|
|
427
439
|
"a",
|
|
428
440
|
{
|
|
429
441
|
href: e,
|
|
430
442
|
target: "_blank",
|
|
431
443
|
rel: "noopener noreferrer",
|
|
432
|
-
className:
|
|
444
|
+
className: g("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: g(
|
|
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__ */ m(
|
|
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__ */ m("p", { className: "radio-label flex min-w-0 items-center", children: [
|
|
475
487
|
/* @__PURE__ */ r(
|
|
476
488
|
"span",
|
|
477
489
|
{
|
|
478
|
-
className:
|
|
490
|
+
className: g(
|
|
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:
|
|
537
|
+
overlayClassName: c,
|
|
538
|
+
containerClassName: i,
|
|
527
539
|
dividers: h = !0,
|
|
528
|
-
closeButtonTitle:
|
|
540
|
+
closeButtonTitle: d
|
|
529
541
|
}) => {
|
|
530
|
-
const { refs: p, context:
|
|
531
|
-
open: t !==
|
|
542
|
+
const { refs: p, context: f } = J({
|
|
543
|
+
open: t !== T.Closed && !!t,
|
|
532
544
|
onOpenChange: l
|
|
533
|
-
}),
|
|
534
|
-
(
|
|
535
|
-
|
|
545
|
+
}), v = we(f, { role: "dialog" }), N = ee(f, { outsidePress: !0 }), { getFloatingProps: C } = te([v, N]), b = P(
|
|
546
|
+
(u) => {
|
|
547
|
+
u?.preventDefault(), u?.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: g(
|
|
543
555
|
"z-modal flex items-center justify-center bg-blackout p-4",
|
|
544
|
-
|
|
556
|
+
c
|
|
545
557
|
),
|
|
546
|
-
children: /* @__PURE__ */ r(Ce, { context:
|
|
558
|
+
children: /* @__PURE__ */ r(Ce, { context: f, children: /* @__PURE__ */ m(
|
|
547
559
|
"div",
|
|
548
560
|
{
|
|
549
|
-
className:
|
|
561
|
+
className: g(
|
|
550
562
|
"relative max-h-full modal rounded bg-white flex flex-col shadow w-full",
|
|
551
|
-
s ===
|
|
552
|
-
s ===
|
|
563
|
+
s === G.LG && "max-w-[65%]",
|
|
564
|
+
s === G.SM && "max-w-[30%]",
|
|
553
565
|
h && "divide-neutrals-400 divide-y",
|
|
554
|
-
|
|
566
|
+
i,
|
|
555
567
|
"sm:w-full sm:max-w-full sm:px-4 sm:py-6"
|
|
556
568
|
),
|
|
557
569
|
ref: p.setFloating,
|
|
558
|
-
...
|
|
559
|
-
onClick(
|
|
560
|
-
|
|
570
|
+
...C({
|
|
571
|
+
onClick(u) {
|
|
572
|
+
u.stopPropagation();
|
|
561
573
|
}
|
|
562
574
|
}),
|
|
563
575
|
children: [
|
|
564
|
-
/* @__PURE__ */
|
|
576
|
+
/* @__PURE__ */ m("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: d,
|
|
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((u) => u)
|
|
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
|
|
592
|
-
open:
|
|
593
|
-
onOpenChange: l ? void 0 :
|
|
616
|
+
const h = me(), [d, p] = j(!1), { refs: f, floatingStyles: v, context: N } = J({
|
|
617
|
+
open: d,
|
|
618
|
+
onOpenChange: l ? void 0 : p,
|
|
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
|
+
}), C = De(N), b = ee(N, { outsidePress: !0 }), { getReferenceProps: u, getFloatingProps: o } = te([
|
|
638
|
+
C,
|
|
639
|
+
b
|
|
600
640
|
]);
|
|
601
|
-
return
|
|
641
|
+
return O(() => {
|
|
642
|
+
d && window.dispatchEvent(
|
|
643
|
+
new CustomEvent(H, { detail: h })
|
|
644
|
+
);
|
|
645
|
+
}, [h, d]), O(() => {
|
|
646
|
+
const x = (w) => {
|
|
647
|
+
w instanceof CustomEvent && w.detail !== h && p(!1);
|
|
648
|
+
};
|
|
649
|
+
return window.addEventListener(H, x), () => {
|
|
650
|
+
window.removeEventListener(H, x);
|
|
651
|
+
};
|
|
652
|
+
}, [h]), O(() => {
|
|
653
|
+
l && p(!1);
|
|
654
|
+
}, [l]), /* @__PURE__ */ m(q, { children: [
|
|
602
655
|
/* @__PURE__ */ r(
|
|
603
656
|
"div",
|
|
604
657
|
{
|
|
605
|
-
ref:
|
|
606
|
-
...
|
|
607
|
-
onClick(
|
|
608
|
-
|
|
658
|
+
ref: f.setReference,
|
|
659
|
+
...u({
|
|
660
|
+
onClick(x) {
|
|
661
|
+
x.stopPropagation();
|
|
609
662
|
}
|
|
610
663
|
}),
|
|
611
|
-
className:
|
|
664
|
+
className: g(a, d && c),
|
|
612
665
|
children: e
|
|
613
666
|
}
|
|
614
667
|
),
|
|
615
|
-
|
|
668
|
+
d && /* @__PURE__ */ r(ne, { children: /* @__PURE__ */ m(
|
|
616
669
|
"div",
|
|
617
670
|
{
|
|
618
|
-
ref:
|
|
619
|
-
style:
|
|
620
|
-
className: "dropdown-menu-shadow dropdown-container z-
|
|
621
|
-
...
|
|
671
|
+
ref: f.setFloating,
|
|
672
|
+
style: { ...v, 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), p(!1);
|
|
629
682
|
},
|
|
630
|
-
className:
|
|
683
|
+
className: g(
|
|
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__ */ m(
|
|
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__ */ m("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__ */ m("div", { className: "flex gap-x-[4px]", children: [
|
|
707
|
+
/* @__PURE__ */ m("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__ */ m("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__ */ m(
|
|
671
724
|
"div",
|
|
672
725
|
{
|
|
673
|
-
className:
|
|
726
|
+
className: g(
|
|
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__ */ m("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__ */ m("div", { className: "flex flex-col gap-1", children: [
|
|
734
|
+
/* @__PURE__ */ m("div", { className: "flex gap-x-[4px]", children: [
|
|
735
|
+
/* @__PURE__ */ m(
|
|
683
736
|
"span",
|
|
684
737
|
{
|
|
685
|
-
className:
|
|
738
|
+
className: g(
|
|
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: g(
|
|
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: g(
|
|
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__ */ m(
|
|
720
773
|
"span",
|
|
721
774
|
{
|
|
722
775
|
onClick: () => s?.(),
|
|
@@ -727,118 +780,119 @@ 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__ */ m("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, h = a?.classes?.types?.[e] ?? Ke[e], d = F(i, h, s), p = F(Xe, a?.classes?.icon), f = F(
|
|
815
|
+
Ze,
|
|
763
816
|
a?.classes?.content,
|
|
764
817
|
l
|
|
765
818
|
);
|
|
766
|
-
return /* @__PURE__ */
|
|
767
|
-
|
|
768
|
-
n ? /* @__PURE__ */ r("div", { className:
|
|
819
|
+
return /* @__PURE__ */ m("div", { "data-type": e, className: d, children: [
|
|
820
|
+
c ? /* @__PURE__ */ r("span", { className: p, children: c }) : null,
|
|
821
|
+
n ? /* @__PURE__ */ r("div", { className: f, 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
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
828
|
+
hoverTooltip: s,
|
|
829
|
+
icon: l,
|
|
830
|
+
copiedIcon: a,
|
|
831
|
+
className: c,
|
|
832
|
+
buttonTextClassName: i,
|
|
833
|
+
onClick: h
|
|
780
834
|
}) => {
|
|
781
|
-
const [
|
|
782
|
-
|
|
783
|
-
|
|
835
|
+
const [d, p] = j(!1), f = W(null), v = () => {
|
|
836
|
+
h(), p(!0), f.current && clearTimeout(f.current), f.current = setTimeout(() => {
|
|
837
|
+
p(!1);
|
|
784
838
|
}, 1e3);
|
|
785
839
|
};
|
|
786
|
-
return
|
|
787
|
-
|
|
788
|
-
}, []), /* @__PURE__ */
|
|
840
|
+
return O(() => () => {
|
|
841
|
+
f.current && clearTimeout(f.current);
|
|
842
|
+
}, []), /* @__PURE__ */ m("div", { className: "relative w-fit", title: s, children: [
|
|
789
843
|
/* @__PURE__ */ r(
|
|
790
|
-
|
|
844
|
+
Ge,
|
|
791
845
|
{
|
|
792
|
-
title:
|
|
846
|
+
title: d ? t : e,
|
|
793
847
|
isSmallButton: !0,
|
|
794
|
-
disabled:
|
|
795
|
-
buttonClassName:
|
|
848
|
+
disabled: d,
|
|
849
|
+
buttonClassName: F([
|
|
796
850
|
"text-button-tertiary small-icon-button !h-6 !p-0",
|
|
797
|
-
|
|
851
|
+
c
|
|
798
852
|
]),
|
|
799
|
-
textClassName:
|
|
800
|
-
onClick:
|
|
801
|
-
iconBefore:
|
|
853
|
+
textClassName: F(["ml-1", i]),
|
|
854
|
+
onClick: v,
|
|
855
|
+
iconBefore: d ? a : l
|
|
802
856
|
}
|
|
803
857
|
),
|
|
804
|
-
n &&
|
|
858
|
+
n && d && /* @__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
859
|
] });
|
|
806
860
|
};
|
|
807
|
-
function
|
|
861
|
+
function et({
|
|
808
862
|
id: e,
|
|
809
863
|
label: t,
|
|
810
864
|
hasChildren: n,
|
|
811
865
|
showDragHandle: s,
|
|
812
866
|
showCheckbox: l,
|
|
813
867
|
isChecked: a,
|
|
814
|
-
isExpanded:
|
|
868
|
+
isExpanded: c
|
|
815
869
|
}) {
|
|
816
|
-
return /* @__PURE__ */
|
|
870
|
+
return /* @__PURE__ */ m("div", { className: "relative cursor-grabbing rounded bg-neutrals-200 shadow", children: [
|
|
817
871
|
/* @__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(
|
|
872
|
+
/* @__PURE__ */ m("div", { className: "flex items-stretch overflow-hidden rounded", children: [
|
|
873
|
+
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,
|
|
874
|
+
/* @__PURE__ */ m("div", { className: "flex min-w-0 flex-1 items-center gap-2 p-1", children: [
|
|
875
|
+
l ? /* @__PURE__ */ r(se, { id: e, checked: !!a, className: "p-0" }) : null,
|
|
822
876
|
/* @__PURE__ */ r("span", { className: "body-3 truncate", children: t })
|
|
823
877
|
] }),
|
|
824
878
|
n ? /* @__PURE__ */ r("div", { className: "flex w-8 items-center justify-center", children: /* @__PURE__ */ r(
|
|
825
879
|
"span",
|
|
826
880
|
{
|
|
827
881
|
"aria-hidden": !0,
|
|
828
|
-
className:
|
|
882
|
+
className: g(
|
|
829
883
|
"transition-transform",
|
|
830
|
-
|
|
884
|
+
c ? "rotate-90" : "rotate-0"
|
|
831
885
|
),
|
|
832
|
-
children: /* @__PURE__ */ r(
|
|
886
|
+
children: /* @__PURE__ */ r(Z, { size: 16 })
|
|
833
887
|
}
|
|
834
888
|
) }) : null
|
|
835
889
|
] })
|
|
836
890
|
] });
|
|
837
891
|
}
|
|
838
|
-
function
|
|
892
|
+
function ae(e, t) {
|
|
839
893
|
return `i:${[...e, t].join("/")}`;
|
|
840
894
|
}
|
|
841
|
-
function
|
|
895
|
+
function $(e) {
|
|
842
896
|
if (!e.startsWith("i:")) return null;
|
|
843
897
|
const n = e.slice(2).split("/").filter(Boolean);
|
|
844
898
|
return n.length ? {
|
|
@@ -846,59 +900,59 @@ function G(e) {
|
|
|
846
900
|
itemId: n[n.length - 1]
|
|
847
901
|
} : null;
|
|
848
902
|
}
|
|
849
|
-
function
|
|
850
|
-
const s =
|
|
903
|
+
function tt(e, t, n) {
|
|
904
|
+
const s = oe(e, t);
|
|
851
905
|
return s ? s.find((l) => l.id === n) ?? null : null;
|
|
852
906
|
}
|
|
853
|
-
function
|
|
907
|
+
function ie(e, t) {
|
|
854
908
|
if (t.length === 0) return e;
|
|
855
909
|
const [n, ...s] = t, l = e.find((a) => a.id === n);
|
|
856
|
-
return l?.items ?
|
|
910
|
+
return l?.items ? ie(l.items, s) : null;
|
|
857
911
|
}
|
|
858
|
-
function
|
|
859
|
-
const n =
|
|
912
|
+
function oe(e, t) {
|
|
913
|
+
const n = ie(e, t);
|
|
860
914
|
return n ? n.filter(
|
|
861
915
|
(s) => s.type === "item"
|
|
862
916
|
) : null;
|
|
863
917
|
}
|
|
864
|
-
function
|
|
918
|
+
function ce(e, t, n) {
|
|
865
919
|
if (t.length === 0)
|
|
866
920
|
return n(e);
|
|
867
921
|
const [s, ...l] = t;
|
|
868
922
|
return e.map((a) => a.id !== s || !a.items ? a : {
|
|
869
923
|
...a,
|
|
870
|
-
items:
|
|
924
|
+
items: ce(a.items, l, n)
|
|
871
925
|
});
|
|
872
926
|
}
|
|
873
|
-
function
|
|
927
|
+
function nt({
|
|
874
928
|
parentPath: e,
|
|
875
929
|
item: t,
|
|
876
930
|
showDragHandle: n,
|
|
877
931
|
showCheckbox: s,
|
|
878
932
|
renderLabel: l,
|
|
879
933
|
onItemClick: a,
|
|
880
|
-
onToggleExpanded:
|
|
881
|
-
onToggleChecked:
|
|
934
|
+
onToggleExpanded: c,
|
|
935
|
+
onToggleChecked: i
|
|
882
936
|
}) {
|
|
883
|
-
const h = !!t.items?.length,
|
|
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__ */
|
|
937
|
+
const h = !!t.items?.length, d = !!t.isExpanded, p = t.isDisabled ? !1 : t.draggable ?? !0, f = t.isDisabled ? !1 : t.checkable ?? !0, v = ae(e, t.id), {
|
|
938
|
+
attributes: N,
|
|
939
|
+
listeners: C,
|
|
940
|
+
setNodeRef: b,
|
|
941
|
+
setActivatorNodeRef: u,
|
|
942
|
+
transform: o,
|
|
943
|
+
transition: x,
|
|
944
|
+
isDragging: w
|
|
945
|
+
} = Me({ id: v, disabled: !p }), S = {
|
|
946
|
+
transform: je.Transform.toString(o),
|
|
947
|
+
transition: x,
|
|
948
|
+
opacity: w ? 0.6 : void 0
|
|
949
|
+
}, y = !!t.isDisabled, E = y || !f, D = [...e, t.id];
|
|
950
|
+
return /* @__PURE__ */ m(
|
|
897
951
|
"div",
|
|
898
952
|
{
|
|
899
|
-
ref:
|
|
953
|
+
ref: b,
|
|
900
954
|
style: S,
|
|
901
|
-
className:
|
|
955
|
+
className: g([
|
|
902
956
|
"group flex items-stretch overflow-hidden rounded bg-white",
|
|
903
957
|
"select-none",
|
|
904
958
|
y ? "opacity-50" : ""
|
|
@@ -907,24 +961,24 @@ function Ke({
|
|
|
907
961
|
n ? /* @__PURE__ */ r(
|
|
908
962
|
"div",
|
|
909
963
|
{
|
|
910
|
-
className:
|
|
964
|
+
className: g([
|
|
911
965
|
"group/drag-handle flex w-6 items-center justify-center rounded",
|
|
912
966
|
y ? "" : "hover:bg-neutrals-100 cursor-grab"
|
|
913
967
|
]),
|
|
914
968
|
children: /* @__PURE__ */ r(
|
|
915
969
|
"span",
|
|
916
970
|
{
|
|
917
|
-
ref:
|
|
971
|
+
ref: u,
|
|
918
972
|
"aria-hidden": !0,
|
|
919
|
-
className:
|
|
973
|
+
className: g([
|
|
920
974
|
"rounded p-1",
|
|
921
975
|
p ? "cursor-grab" : "cursor-default",
|
|
922
976
|
"transition-opacity"
|
|
923
977
|
]),
|
|
978
|
+
...p ? C : {},
|
|
924
979
|
...p ? N : {},
|
|
925
|
-
...p ? b : {},
|
|
926
980
|
children: /* @__PURE__ */ r(
|
|
927
|
-
|
|
981
|
+
X,
|
|
928
982
|
{
|
|
929
983
|
size: 16,
|
|
930
984
|
className: "text-neutrals-800 group-hover/drag-handle:text-primary"
|
|
@@ -934,20 +988,20 @@ function Ke({
|
|
|
934
988
|
)
|
|
935
989
|
}
|
|
936
990
|
) : null,
|
|
937
|
-
/* @__PURE__ */
|
|
991
|
+
/* @__PURE__ */ m(
|
|
938
992
|
"button",
|
|
939
993
|
{
|
|
940
994
|
type: "button",
|
|
941
995
|
disabled: y,
|
|
942
|
-
"aria-disabled":
|
|
943
|
-
onClick: (
|
|
944
|
-
|
|
996
|
+
"aria-disabled": E,
|
|
997
|
+
onClick: (k) => {
|
|
998
|
+
E || a?.({
|
|
945
999
|
itemId: t.id,
|
|
946
1000
|
path: D,
|
|
947
|
-
nativeEvent:
|
|
1001
|
+
nativeEvent: k
|
|
948
1002
|
});
|
|
949
1003
|
},
|
|
950
|
-
className:
|
|
1004
|
+
className: g([
|
|
951
1005
|
"flex min-w-0 flex-1 items-center gap-2 p-1 text-left rounded",
|
|
952
1006
|
y ? "" : "hover:bg-neutrals-100",
|
|
953
1007
|
y ? "" : "hover:text-blue-700",
|
|
@@ -955,21 +1009,21 @@ function Ke({
|
|
|
955
1009
|
]),
|
|
956
1010
|
children: [
|
|
957
1011
|
s ? /* @__PURE__ */ r(
|
|
958
|
-
|
|
1012
|
+
se,
|
|
959
1013
|
{
|
|
960
1014
|
id: `draggable-list-${D.join("-")}`,
|
|
961
1015
|
checked: !!t.isChecked,
|
|
962
|
-
disabled: !
|
|
1016
|
+
disabled: !f,
|
|
963
1017
|
className: "p-0",
|
|
964
1018
|
stopPropagation: !0,
|
|
965
|
-
onChange: (
|
|
1019
|
+
onChange: (k, I) => i?.({
|
|
966
1020
|
itemId: t.id,
|
|
967
1021
|
path: D,
|
|
968
|
-
nextChecked: !!
|
|
1022
|
+
nextChecked: !!I
|
|
969
1023
|
})
|
|
970
1024
|
}
|
|
971
1025
|
) : null,
|
|
972
|
-
/* @__PURE__ */ r("span", { className: "body-3 truncate text-neutrals-800", children: l ? l(t) : t.label })
|
|
1026
|
+
/* @__PURE__ */ r("span", { className: "body-3 w-full truncate text-neutrals-800", children: l ? l(t) : t.label })
|
|
973
1027
|
]
|
|
974
1028
|
}
|
|
975
1029
|
),
|
|
@@ -978,15 +1032,15 @@ function Ke({
|
|
|
978
1032
|
{
|
|
979
1033
|
type: "button",
|
|
980
1034
|
disabled: y,
|
|
981
|
-
onClick: (
|
|
982
|
-
|
|
1035
|
+
onClick: (k) => {
|
|
1036
|
+
k.stopPropagation(), c?.({
|
|
983
1037
|
itemId: t.id,
|
|
984
1038
|
path: D,
|
|
985
|
-
nextExpanded: !
|
|
1039
|
+
nextExpanded: !d
|
|
986
1040
|
});
|
|
987
1041
|
},
|
|
988
|
-
"aria-label":
|
|
989
|
-
className:
|
|
1042
|
+
"aria-label": d ? "Collapse" : "Expand",
|
|
1043
|
+
className: g([
|
|
990
1044
|
"flex w-8 items-center justify-center rounded",
|
|
991
1045
|
y ? "" : "hover:bg-neutrals-100",
|
|
992
1046
|
"focus:outline-none"
|
|
@@ -995,11 +1049,11 @@ function Ke({
|
|
|
995
1049
|
"span",
|
|
996
1050
|
{
|
|
997
1051
|
"aria-hidden": !0,
|
|
998
|
-
className:
|
|
1052
|
+
className: g(
|
|
999
1053
|
"transition-transform duration-150 ease-out",
|
|
1000
|
-
|
|
1054
|
+
d ? "rotate-90" : "rotate-0"
|
|
1001
1055
|
),
|
|
1002
|
-
children: /* @__PURE__ */ r(
|
|
1056
|
+
children: /* @__PURE__ */ r(Z, { size: 16 })
|
|
1003
1057
|
}
|
|
1004
1058
|
)
|
|
1005
1059
|
}
|
|
@@ -1008,155 +1062,155 @@ function Ke({
|
|
|
1008
1062
|
}
|
|
1009
1063
|
);
|
|
1010
1064
|
}
|
|
1011
|
-
function
|
|
1065
|
+
function Pt({
|
|
1012
1066
|
items: e,
|
|
1013
1067
|
showDragHandle: t = !0,
|
|
1014
1068
|
showCheckbox: n = !0,
|
|
1015
1069
|
onItemsChange: s,
|
|
1016
1070
|
onToggleExpanded: l,
|
|
1017
1071
|
onToggleChecked: a,
|
|
1018
|
-
onItemClick:
|
|
1019
|
-
renderLabel:
|
|
1072
|
+
onItemClick: c,
|
|
1073
|
+
renderLabel: i
|
|
1020
1074
|
}) {
|
|
1021
|
-
const h =
|
|
1022
|
-
|
|
1023
|
-
), [
|
|
1024
|
-
const
|
|
1025
|
-
if (!
|
|
1026
|
-
const
|
|
1027
|
-
!
|
|
1028
|
-
id:
|
|
1029
|
-
label:
|
|
1030
|
-
hasChildren: !!
|
|
1031
|
-
isChecked:
|
|
1032
|
-
isExpanded:
|
|
1075
|
+
const h = Le(
|
|
1076
|
+
Oe(Fe, { activationConstraint: { distance: 6 } })
|
|
1077
|
+
), [d, p] = ue.useState(null), f = (C) => {
|
|
1078
|
+
const b = String(C.active.id), u = $(b);
|
|
1079
|
+
if (!u) return;
|
|
1080
|
+
const o = tt(e, u.parentPath, u.itemId);
|
|
1081
|
+
!o || o.type !== "item" || p({
|
|
1082
|
+
id: b,
|
|
1083
|
+
label: o.label,
|
|
1084
|
+
hasChildren: !!o.items?.length,
|
|
1085
|
+
isChecked: o.isChecked,
|
|
1086
|
+
isExpanded: o.isExpanded
|
|
1033
1087
|
});
|
|
1034
|
-
},
|
|
1088
|
+
}, v = (C) => {
|
|
1035
1089
|
p(null);
|
|
1036
|
-
const
|
|
1090
|
+
const b = C.over;
|
|
1091
|
+
if (!b) return;
|
|
1092
|
+
const u = $(String(C.active.id)), o = $(String(b.id));
|
|
1093
|
+
if (!u || !o || u.parentPath.join("/") !== o.parentPath.join("/")) return;
|
|
1094
|
+
const x = oe(e, u.parentPath);
|
|
1037
1095
|
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;
|
|
1096
|
+
const w = x.findIndex((E) => E.id === u.itemId), S = x.findIndex((E) => E.id === o.itemId);
|
|
1097
|
+
if (w === -1 || S === -1 || w === S) return;
|
|
1098
|
+
const y = ce(e, u.parentPath, (E) => {
|
|
1099
|
+
const D = E.filter(
|
|
1100
|
+
(R) => R.type === "item"
|
|
1101
|
+
), k = Ye(D, w, S);
|
|
1102
|
+
let I = 0;
|
|
1103
|
+
return E.map((R) => {
|
|
1104
|
+
if (R.type !== "item") return R;
|
|
1105
|
+
const z = k[I];
|
|
1106
|
+
return I += 1, z;
|
|
1053
1107
|
});
|
|
1054
1108
|
});
|
|
1055
1109
|
s(y);
|
|
1056
|
-
},
|
|
1057
|
-
const
|
|
1110
|
+
}, N = (C, b = []) => {
|
|
1111
|
+
const u = C.filter((o) => o.type === "item").map((o) => ae(b, o.id));
|
|
1058
1112
|
return /* @__PURE__ */ r(
|
|
1059
|
-
|
|
1113
|
+
Te,
|
|
1060
1114
|
{
|
|
1061
|
-
items:
|
|
1062
|
-
strategy:
|
|
1063
|
-
children: /* @__PURE__ */ r("ul", { className: "m-0 flex list-none flex-col gap-2 p-0", children:
|
|
1115
|
+
items: u,
|
|
1116
|
+
strategy: Pe,
|
|
1117
|
+
children: /* @__PURE__ */ r("ul", { className: "m-0 flex list-none flex-col gap-2 p-0", children: C.map((o) => o.type === "group" ? /* @__PURE__ */ m(
|
|
1064
1118
|
"li",
|
|
1065
1119
|
{
|
|
1066
1120
|
className: "m-0 mt-2 flex flex-col gap-2 p-0 first:mt-0",
|
|
1067
1121
|
children: [
|
|
1068
|
-
/* @__PURE__ */
|
|
1069
|
-
/* @__PURE__ */ r(
|
|
1070
|
-
|
|
1122
|
+
/* @__PURE__ */ m("div", { className: "h5 flex items-center gap-2 py-1 text-neutrals-1000", children: [
|
|
1123
|
+
/* @__PURE__ */ r(xe, { size: 12, className: "shrink-0" }),
|
|
1124
|
+
o.label
|
|
1071
1125
|
] }),
|
|
1072
|
-
/* @__PURE__ */ r("div", { className: "border-l border-neutrals-600 pl-2", children:
|
|
1126
|
+
/* @__PURE__ */ r("div", { className: "border-l border-neutrals-600 pl-2", children: N(o.items, [...b, o.id]) })
|
|
1073
1127
|
]
|
|
1074
1128
|
},
|
|
1075
|
-
|
|
1076
|
-
) : /* @__PURE__ */
|
|
1129
|
+
o.id
|
|
1130
|
+
) : /* @__PURE__ */ m("li", { className: "m-0 flex flex-col gap-2 p-0", children: [
|
|
1077
1131
|
/* @__PURE__ */ r(
|
|
1078
|
-
|
|
1132
|
+
nt,
|
|
1079
1133
|
{
|
|
1080
|
-
parentPath:
|
|
1081
|
-
item:
|
|
1134
|
+
parentPath: b,
|
|
1135
|
+
item: o,
|
|
1082
1136
|
showDragHandle: t,
|
|
1083
1137
|
showCheckbox: n,
|
|
1084
|
-
renderLabel:
|
|
1085
|
-
onItemClick:
|
|
1138
|
+
renderLabel: i,
|
|
1139
|
+
onItemClick: c,
|
|
1086
1140
|
onToggleExpanded: l,
|
|
1087
1141
|
onToggleChecked: a
|
|
1088
1142
|
}
|
|
1089
1143
|
),
|
|
1090
|
-
|
|
1091
|
-
] },
|
|
1144
|
+
o.items?.length && o.isExpanded ? /* @__PURE__ */ r("div", { className: "pl-7", children: N(o.items, [...b, o.id]) }) : null
|
|
1145
|
+
] }, o.id)) })
|
|
1092
1146
|
}
|
|
1093
1147
|
);
|
|
1094
1148
|
};
|
|
1095
|
-
return /* @__PURE__ */
|
|
1149
|
+
return /* @__PURE__ */ m(
|
|
1096
1150
|
Re,
|
|
1097
1151
|
{
|
|
1098
1152
|
sensors: h,
|
|
1099
|
-
collisionDetection:
|
|
1100
|
-
onDragStart:
|
|
1101
|
-
onDragEnd:
|
|
1153
|
+
collisionDetection: _e,
|
|
1154
|
+
onDragStart: f,
|
|
1155
|
+
onDragEnd: v,
|
|
1102
1156
|
children: [
|
|
1103
|
-
/* @__PURE__ */ r("div", { className: "flex flex-col", children:
|
|
1104
|
-
/* @__PURE__ */ r(
|
|
1105
|
-
|
|
1157
|
+
/* @__PURE__ */ r("div", { className: "flex flex-col", children: N(e) }),
|
|
1158
|
+
/* @__PURE__ */ r(Ae, { children: d ? /* @__PURE__ */ r(
|
|
1159
|
+
et,
|
|
1106
1160
|
{
|
|
1107
|
-
id:
|
|
1108
|
-
label:
|
|
1109
|
-
hasChildren:
|
|
1161
|
+
id: d.id,
|
|
1162
|
+
label: d.label,
|
|
1163
|
+
hasChildren: d.hasChildren,
|
|
1110
1164
|
showDragHandle: t,
|
|
1111
1165
|
showCheckbox: n,
|
|
1112
|
-
isChecked:
|
|
1113
|
-
isExpanded:
|
|
1166
|
+
isChecked: d.isChecked,
|
|
1167
|
+
isExpanded: d.isExpanded
|
|
1114
1168
|
}
|
|
1115
1169
|
) : null })
|
|
1116
1170
|
]
|
|
1117
1171
|
}
|
|
1118
1172
|
);
|
|
1119
1173
|
}
|
|
1120
|
-
const
|
|
1121
|
-
function
|
|
1122
|
-
const s =
|
|
1174
|
+
const rt = (e, t) => e.label.toLowerCase().includes(t);
|
|
1175
|
+
function Yt(e, t, n = {}) {
|
|
1176
|
+
const s = lt(t);
|
|
1123
1177
|
if (!s)
|
|
1124
1178
|
return e;
|
|
1125
1179
|
const {
|
|
1126
1180
|
expandMatchedBranches: l = !0,
|
|
1127
1181
|
includeGroupDescendantsOnMatch: a = !0,
|
|
1128
|
-
includeItemDescendantsOnMatch:
|
|
1129
|
-
match:
|
|
1182
|
+
includeItemDescendantsOnMatch: c = !1,
|
|
1183
|
+
match: i = rt
|
|
1130
1184
|
} = n;
|
|
1131
|
-
return
|
|
1185
|
+
return B(e, s, {
|
|
1132
1186
|
expandMatchedBranches: l,
|
|
1133
1187
|
includeGroupDescendantsOnMatch: a,
|
|
1134
|
-
includeItemDescendantsOnMatch:
|
|
1135
|
-
match:
|
|
1188
|
+
includeItemDescendantsOnMatch: c,
|
|
1189
|
+
match: i
|
|
1136
1190
|
}) ?? [];
|
|
1137
1191
|
}
|
|
1138
|
-
function
|
|
1192
|
+
function B(e, t, n) {
|
|
1139
1193
|
const s = [];
|
|
1140
1194
|
for (const l of e) {
|
|
1141
|
-
const a =
|
|
1195
|
+
const a = st(l, t, n);
|
|
1142
1196
|
a && s.push(a);
|
|
1143
1197
|
}
|
|
1144
1198
|
return s.length ? s : null;
|
|
1145
1199
|
}
|
|
1146
|
-
function
|
|
1200
|
+
function st(e, t, n) {
|
|
1147
1201
|
const s = n.match(e, t);
|
|
1148
1202
|
if (e.type === "group") {
|
|
1149
1203
|
if (s && n.includeGroupDescendantsOnMatch)
|
|
1150
|
-
return
|
|
1151
|
-
const
|
|
1152
|
-
return !s && !
|
|
1204
|
+
return Y(e, n.expandMatchedBranches);
|
|
1205
|
+
const c = e.items?.length ? B(e.items, t, n) : null;
|
|
1206
|
+
return !s && !c ? null : {
|
|
1153
1207
|
...e,
|
|
1154
|
-
items:
|
|
1208
|
+
items: c ?? []
|
|
1155
1209
|
};
|
|
1156
1210
|
}
|
|
1157
|
-
const l = e.items?.length ?
|
|
1211
|
+
const l = e.items?.length ? B(e.items, t, n) : null;
|
|
1158
1212
|
if (s && n.includeItemDescendantsOnMatch)
|
|
1159
|
-
return
|
|
1213
|
+
return Y(e, n.expandMatchedBranches);
|
|
1160
1214
|
if (!s && !l)
|
|
1161
1215
|
return null;
|
|
1162
1216
|
const a = {
|
|
@@ -1164,32 +1218,32 @@ function Ze(e, t, n) {
|
|
|
1164
1218
|
};
|
|
1165
1219
|
return l ? (a.items = l, n.expandMatchedBranches && (a.isExpanded = !0)) : delete a.items, a;
|
|
1166
1220
|
}
|
|
1167
|
-
function
|
|
1221
|
+
function Y(e, t) {
|
|
1168
1222
|
return e.type === "group" ? {
|
|
1169
1223
|
...e,
|
|
1170
1224
|
items: e.items.map(
|
|
1171
|
-
(n) =>
|
|
1225
|
+
(n) => Y(n, t)
|
|
1172
1226
|
)
|
|
1173
1227
|
} : {
|
|
1174
1228
|
...e,
|
|
1175
1229
|
isExpanded: t && e.items?.length ? !0 : e.isExpanded,
|
|
1176
|
-
items: e.items?.map((n) =>
|
|
1230
|
+
items: e.items?.map((n) => Y(n, t))
|
|
1177
1231
|
};
|
|
1178
1232
|
}
|
|
1179
|
-
function
|
|
1233
|
+
function lt(e) {
|
|
1180
1234
|
return e.trim().toLowerCase();
|
|
1181
1235
|
}
|
|
1182
|
-
var
|
|
1183
|
-
const
|
|
1184
|
-
function
|
|
1236
|
+
var at = /* @__PURE__ */ ((e) => (e.Enter = "Enter", e))(at || {});
|
|
1237
|
+
const de = Q(null);
|
|
1238
|
+
function jt({
|
|
1185
1239
|
children: e,
|
|
1186
1240
|
isAgentAvailable: t
|
|
1187
1241
|
}) {
|
|
1188
|
-
const n =
|
|
1189
|
-
return /* @__PURE__ */ r(
|
|
1242
|
+
const n = U(() => ({ isAgentAvailable: t }), [t]);
|
|
1243
|
+
return /* @__PURE__ */ r(de.Provider, { value: n, children: e });
|
|
1190
1244
|
}
|
|
1191
|
-
function
|
|
1192
|
-
const e =
|
|
1245
|
+
function zt() {
|
|
1246
|
+
const e = K(de);
|
|
1193
1247
|
if (!e)
|
|
1194
1248
|
throw new Error(
|
|
1195
1249
|
"useAgentAvailability must be used within AgentAvailabilityProvider"
|
|
@@ -1197,40 +1251,40 @@ function At() {
|
|
|
1197
1251
|
return e;
|
|
1198
1252
|
}
|
|
1199
1253
|
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
|
-
|
|
1254
|
+
jt as AgentAvailabilityProvider,
|
|
1255
|
+
bt as Alert,
|
|
1256
|
+
_ as AlertType,
|
|
1257
|
+
Ge as Button,
|
|
1258
|
+
We as CALENDAR_MOBILE_PADDING,
|
|
1259
|
+
Ct as Calendar,
|
|
1260
|
+
se as Checkbox,
|
|
1261
|
+
re as CloseButton,
|
|
1262
|
+
yt as CollapsibleBlock,
|
|
1263
|
+
Tt as CopyButton,
|
|
1264
|
+
Rt as DownloadFormatMessage,
|
|
1265
|
+
Pt as DraggableList,
|
|
1266
|
+
Ft as Dropdown,
|
|
1267
|
+
Et as HighlightText,
|
|
1268
|
+
It as IconButton,
|
|
1269
|
+
Mt as InlineAlert,
|
|
1270
|
+
At as InlineAlertProvider,
|
|
1271
|
+
M as InlineAlertType,
|
|
1272
|
+
Ue as Input,
|
|
1273
|
+
St as InputWithIcon,
|
|
1274
|
+
at as KeyboardKey,
|
|
1275
|
+
kt as Link,
|
|
1276
|
+
He as Loader,
|
|
1277
|
+
G as PopUpSize,
|
|
1278
|
+
T as PopUpState,
|
|
1279
|
+
Ot as Popup,
|
|
1280
|
+
Lt as Radio,
|
|
1281
|
+
_t as RequestLimitMessage,
|
|
1282
|
+
V as SERIES_LIMIT,
|
|
1283
|
+
wt as TREE_NODE_ARROW_SIZE,
|
|
1284
|
+
vt as TREE_NODE_PADDING,
|
|
1285
|
+
Dt as Tag,
|
|
1286
|
+
Yt as filterDraggableListNodes,
|
|
1287
|
+
zt as useAgentAvailability,
|
|
1288
|
+
Nt as useDebounce,
|
|
1289
|
+
Be as useIsMobile
|
|
1236
1290
|
};
|