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