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