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