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