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