@epam/statgpt-ui-components 0.2.0-rc.8 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Button/Button.d.ts +1 -0
- package/components/Calendar/Calendar.d.ts +1 -0
- package/components/CopyButton/CopyButton.d.ts +43 -0
- package/components/InlineAlert/InlineAlert.d.ts +55 -0
- package/components/InlineAlert/InlineAlert.test.d.ts +1 -0
- package/components/InlineAlert/InlineAlertContext.d.ts +8 -0
- package/components/InlineAlert/types.d.ts +21 -0
- package/components/RequestLimit/RequestLimit.d.ts +3 -0
- package/components/index.d.ts +4 -0
- package/constants/calendar.d.ts +1 -0
- package/constants/index.d.ts +1 -0
- package/contexts/AgentAvailabilityContext.d.ts +9 -0
- package/index.css +1 -1
- package/index.d.ts +1 -0
- package/index.js +1 -1
- package/index.mjs +577 -425
- package/package.json +8 -5
- package/styles-tailwind.scss +98 -0
- package/utils/mergeClasses.d.ts +2 -0
package/index.mjs
CHANGED
|
@@ -1,435 +1,484 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useEffect as
|
|
3
|
-
import
|
|
4
|
-
import { IconX as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsx as r, jsxs as o, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as _, useState as A, useRef as P, useCallback as L, useMemo as D, createContext as j, useContext as G } from "react";
|
|
3
|
+
import m from "classnames";
|
|
4
|
+
import { IconX as K, IconCalendarEvent as ee, IconChevronDown as te } from "@tabler/icons-react";
|
|
5
|
+
import { extendTailwindMerge as ne } from "tailwind-merge";
|
|
6
|
+
import re from "react-flatpickr";
|
|
7
|
+
import { CalendarResolution as k } from "@epam/statgpt-shared-toolkit";
|
|
8
|
+
import { useFloating as $, useRole as le, useDismiss as H, useInteractions as B, FloatingPortal as se, FloatingOverlay as ae, FloatingFocusManager as oe, autoUpdate as ce, offset as ie, flip as de, shift as ue, useClick as me } from "@floating-ui/react";
|
|
9
|
+
const U = () => /* @__PURE__ */ r("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ r("div", { className: "loader" }) }), W = ({
|
|
10
|
+
title: e,
|
|
11
|
+
btnClassNames: t,
|
|
12
|
+
iconWidth: n,
|
|
13
|
+
iconHeight: l,
|
|
14
|
+
onClick: s
|
|
15
|
+
}) => /* @__PURE__ */ r(
|
|
15
16
|
"button",
|
|
16
17
|
{
|
|
17
18
|
type: "button",
|
|
18
19
|
"aria-label": "button",
|
|
19
|
-
className:
|
|
20
|
-
title:
|
|
21
|
-
onClick:
|
|
22
|
-
children: /* @__PURE__ */
|
|
20
|
+
className: t,
|
|
21
|
+
title: e,
|
|
22
|
+
onClick: s,
|
|
23
|
+
children: /* @__PURE__ */ r(K, { height: l || 20, width: n || 20 })
|
|
23
24
|
}
|
|
24
25
|
);
|
|
25
|
-
var
|
|
26
|
-
const
|
|
27
|
-
alertDetails:
|
|
28
|
-
successIcon:
|
|
29
|
-
errorIcon:
|
|
30
|
-
onClose:
|
|
31
|
-
closeButtonTitle:
|
|
26
|
+
var y = /* @__PURE__ */ ((e) => (e.ERROR = "error", e.SUCCESS = "success", e.IN_PROGRESS = "in_progress", e))(y || {});
|
|
27
|
+
const Oe = ({
|
|
28
|
+
alertDetails: e,
|
|
29
|
+
successIcon: t,
|
|
30
|
+
errorIcon: n,
|
|
31
|
+
onClose: l,
|
|
32
|
+
closeButtonTitle: s
|
|
32
33
|
}) => {
|
|
33
|
-
const a = () =>
|
|
34
|
-
return
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
const a = () => e?.type === y.IN_PROGRESS ? "alert-in-progress" : e?.type === y.SUCCESS ? "alert-success" : "alert-error";
|
|
35
|
+
return _(() => {
|
|
36
|
+
e?.type !== y.IN_PROGRESS && setTimeout(() => {
|
|
37
|
+
l?.();
|
|
37
38
|
}, 5e3);
|
|
38
|
-
}, [
|
|
39
|
+
}, [e?.type, l]), /* @__PURE__ */ r(
|
|
39
40
|
"div",
|
|
40
41
|
{
|
|
41
|
-
className:
|
|
42
|
+
className: m(
|
|
42
43
|
"alert alert-shadow fixed bottom-3 right-3 z-10",
|
|
43
44
|
a()
|
|
44
45
|
),
|
|
45
|
-
children: /* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
|
|
46
|
+
children: /* @__PURE__ */ o("div", { className: "alert-content flex items-start", children: [
|
|
47
|
+
/* @__PURE__ */ r("div", { className: "alert-icon", children: e?.type === y.IN_PROGRESS ? /* @__PURE__ */ r(U, {}) : e?.type === y.SUCCESS ? t : n }),
|
|
48
|
+
/* @__PURE__ */ o("div", { className: "flex flex-col gap-2 max-w-[300px]", children: [
|
|
49
|
+
/* @__PURE__ */ r("h3", { className: "truncate", children: e?.title }),
|
|
50
|
+
e?.text && /* @__PURE__ */ r("div", { className: "alert-text truncate", title: e?.text, children: e?.text })
|
|
50
51
|
] }),
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ r(W, { title: s, onClick: l })
|
|
52
53
|
] })
|
|
53
54
|
}
|
|
54
55
|
);
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
}, he = ne({
|
|
57
|
+
extend: {
|
|
58
|
+
classGroups: {
|
|
59
|
+
typography: [
|
|
60
|
+
"h1",
|
|
61
|
+
"h2",
|
|
62
|
+
"h3",
|
|
63
|
+
"h4",
|
|
64
|
+
"h5",
|
|
65
|
+
"body-1",
|
|
66
|
+
"body-2",
|
|
67
|
+
"body-3",
|
|
68
|
+
"caption"
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
function v(...e) {
|
|
74
|
+
return he(m(...e));
|
|
75
|
+
}
|
|
76
|
+
const pe = ({
|
|
77
|
+
buttonClassName: e,
|
|
78
|
+
textClassName: t,
|
|
79
|
+
isLoading: n = !1,
|
|
80
|
+
title: l,
|
|
81
|
+
disabled: s,
|
|
82
|
+
iconAfter: a,
|
|
83
|
+
iconBefore: c,
|
|
62
84
|
onClick: u,
|
|
63
85
|
isSmallButton: d
|
|
64
86
|
}) => {
|
|
65
|
-
const
|
|
87
|
+
const h = v([
|
|
66
88
|
d ? "font-semibold" : "",
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
89
|
+
a ? "mr-2" : "",
|
|
90
|
+
c ? "ml-2" : "",
|
|
91
|
+
t
|
|
92
|
+
]);
|
|
93
|
+
return /* @__PURE__ */ o(
|
|
71
94
|
"button",
|
|
72
95
|
{
|
|
73
96
|
type: "button",
|
|
74
|
-
className:
|
|
97
|
+
className: m(
|
|
75
98
|
"base-button",
|
|
76
|
-
|
|
99
|
+
e,
|
|
77
100
|
d ? "small-button" : ""
|
|
78
101
|
),
|
|
79
|
-
disabled:
|
|
102
|
+
disabled: s || n,
|
|
80
103
|
"aria-label": "button",
|
|
81
|
-
onClick: (
|
|
82
|
-
title:
|
|
104
|
+
onClick: (f) => u?.(f),
|
|
105
|
+
title: l,
|
|
83
106
|
children: [
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
107
|
+
c,
|
|
108
|
+
n && /* @__PURE__ */ r(U, {}),
|
|
109
|
+
l ? d ? /* @__PURE__ */ r("h4", { className: h, children: l }) : /* @__PURE__ */ r("h3", { className: h, children: l }) : null,
|
|
110
|
+
a
|
|
88
111
|
]
|
|
89
112
|
}
|
|
90
113
|
);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
114
|
+
};
|
|
115
|
+
function fe(e = 719) {
|
|
116
|
+
const [t, n] = A(
|
|
117
|
+
() => typeof window < "u" ? window.innerWidth < e : !1
|
|
118
|
+
);
|
|
119
|
+
return _(() => {
|
|
120
|
+
const l = window.matchMedia(`(max-width: ${e}px)`), s = (a) => {
|
|
121
|
+
n(a.matches);
|
|
122
|
+
};
|
|
123
|
+
return n(l.matches), l.addEventListener("change", s), () => l.removeEventListener("change", s);
|
|
124
|
+
}, [e]), t;
|
|
125
|
+
}
|
|
126
|
+
function Te(e, t) {
|
|
127
|
+
const n = P(null);
|
|
128
|
+
return L(
|
|
129
|
+
(...s) => {
|
|
130
|
+
n.current && clearTimeout(n.current), n.current = setTimeout(() => {
|
|
131
|
+
e(...s);
|
|
132
|
+
}, t);
|
|
133
|
+
},
|
|
134
|
+
[e, t]
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
const Pe = 24, De = 24, M = 1e3, xe = 24, Me = ({
|
|
138
|
+
label: e,
|
|
139
|
+
onChange: t,
|
|
140
|
+
value: n,
|
|
141
|
+
options: l,
|
|
142
|
+
calendarResolution: s = k.DAY,
|
|
97
143
|
id: a,
|
|
98
|
-
icon:
|
|
144
|
+
icon: c,
|
|
145
|
+
isEndDate: u
|
|
99
146
|
}) => {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
const x = r.minDate, p = r.maxDate, f = b[0].getFullYear(), F = y.calendarContainer, _ = "flatpickr-disabled", $ = F.querySelectorAll(
|
|
147
|
+
const d = P(null), h = fe();
|
|
148
|
+
_(() => {
|
|
149
|
+
const x = d?.current;
|
|
150
|
+
x && x.querySelector("input")?.setAttribute("aria-label", e);
|
|
151
|
+
}, [e]);
|
|
152
|
+
const f = {
|
|
153
|
+
...l,
|
|
154
|
+
disableMobile: !0,
|
|
155
|
+
defaultDate: s === k.MONTH ? new Date(n.getFullYear(), n.getMonth()) : n
|
|
156
|
+
}, g = (x, E, b) => {
|
|
157
|
+
const i = `calendar__${s === k.MONTH ? "month" : "day"}`;
|
|
158
|
+
b.calendarContainer && b.calendarContainer.classList.add(i);
|
|
159
|
+
}, N = (x, E, b) => {
|
|
160
|
+
if (s === k.MONTH && x.length > 0) {
|
|
161
|
+
const i = l.minDate, p = l.maxDate, C = x[0].getFullYear(), R = b.calendarContainer, F = "flatpickr-disabled", V = R.querySelectorAll(
|
|
116
162
|
".flatpickr-monthSelect-month"
|
|
117
|
-
),
|
|
163
|
+
), z = R.querySelectorAll(
|
|
118
164
|
".flatpickr-next-month"
|
|
119
|
-
)[0],
|
|
165
|
+
)[0], X = R.querySelectorAll(
|
|
120
166
|
".flatpickr-prev-month"
|
|
121
167
|
)[0];
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
const
|
|
125
|
-
|
|
168
|
+
C === p.getFullYear() && z.classList.add(F), C === i.getFullYear() && X.classList.add(F), (C === i.getFullYear() || C === p.getFullYear()) && V.forEach((O) => {
|
|
169
|
+
O.classList.remove(F);
|
|
170
|
+
const w = new Date(O.getAttribute("aria-label")), Z = w.getFullYear() === i.getFullYear() && w.getMonth() === i.getMonth(), J = w.getFullYear() === p.getFullYear() && w.getMonth() === p.getMonth();
|
|
171
|
+
Z || J || (w < i || w > p) && O.classList.add(F);
|
|
126
172
|
});
|
|
127
173
|
}
|
|
174
|
+
setTimeout(() => {
|
|
175
|
+
const i = b.calendarContainer, p = b._input?.getBoundingClientRect();
|
|
176
|
+
i && (i.style.top = `${p.top - i.offsetHeight - 8}px`, i.style.width = `${i.style.width}px`, u ? (i.style.right = `${window.innerWidth - p.right - (h ? xe : 0)}px`, i.style.left = "auto") : i.style.left = `${p.left}px`);
|
|
177
|
+
}, 0);
|
|
128
178
|
};
|
|
129
|
-
return /* @__PURE__ */
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
-
/* @__PURE__ */
|
|
179
|
+
return /* @__PURE__ */ o("div", { className: "relative calendar", ref: d, children: [
|
|
180
|
+
/* @__PURE__ */ r("div", { className: "mb-1 calendar-title", children: e }),
|
|
181
|
+
/* @__PURE__ */ r(
|
|
132
182
|
"label",
|
|
133
183
|
{
|
|
134
184
|
htmlFor: a,
|
|
135
185
|
className: "absolute cursor-pointer right-[11px] top-[29px]",
|
|
136
|
-
children:
|
|
186
|
+
children: c || /* @__PURE__ */ r(ee, {})
|
|
137
187
|
}
|
|
138
188
|
),
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
-
|
|
189
|
+
/* @__PURE__ */ r(
|
|
190
|
+
re,
|
|
141
191
|
{
|
|
142
|
-
defaultValue: (
|
|
143
|
-
options:
|
|
144
|
-
onChange: (
|
|
145
|
-
|
|
192
|
+
defaultValue: (s === k.MONTH ? new Date(n.getFullYear(), n.getMonth()) : n)?.toDateString(),
|
|
193
|
+
options: f,
|
|
194
|
+
onChange: (x) => {
|
|
195
|
+
t(x[0]);
|
|
146
196
|
},
|
|
147
|
-
onOpen: [
|
|
148
|
-
onReady: [
|
|
197
|
+
onOpen: [N],
|
|
198
|
+
onReady: [g],
|
|
149
199
|
id: a
|
|
150
200
|
}
|
|
151
201
|
)
|
|
152
202
|
] });
|
|
153
|
-
},
|
|
154
|
-
label:
|
|
155
|
-
id:
|
|
156
|
-
checked:
|
|
157
|
-
checkboxIcon:
|
|
158
|
-
onChange:
|
|
203
|
+
}, Ye = ({
|
|
204
|
+
label: e,
|
|
205
|
+
id: t,
|
|
206
|
+
checked: n,
|
|
207
|
+
checkboxIcon: l,
|
|
208
|
+
onChange: s
|
|
159
209
|
}) => {
|
|
160
|
-
const a =
|
|
161
|
-
(
|
|
162
|
-
|
|
210
|
+
const a = L(
|
|
211
|
+
(c) => {
|
|
212
|
+
c.stopPropagation(), s?.(t, c.target.checked);
|
|
163
213
|
},
|
|
164
|
-
[
|
|
214
|
+
[s, t]
|
|
165
215
|
);
|
|
166
|
-
return /* @__PURE__ */
|
|
216
|
+
return /* @__PURE__ */ o(
|
|
167
217
|
"label",
|
|
168
218
|
{
|
|
169
219
|
className: "flex items-center cursor-pointer min-w-0 py-1",
|
|
170
|
-
htmlFor:
|
|
220
|
+
htmlFor: t,
|
|
171
221
|
children: [
|
|
172
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ r(
|
|
173
223
|
"span",
|
|
174
224
|
{
|
|
175
|
-
className:
|
|
225
|
+
className: m(
|
|
176
226
|
"flex justify-center items-center w-4 h-4 mr-2 relative",
|
|
177
227
|
"checkbox-button"
|
|
178
228
|
),
|
|
179
|
-
children:
|
|
229
|
+
children: n && l
|
|
180
230
|
}
|
|
181
231
|
),
|
|
182
|
-
|
|
232
|
+
e && /* @__PURE__ */ r(
|
|
183
233
|
"p",
|
|
184
234
|
{
|
|
185
|
-
className:
|
|
235
|
+
className: m(
|
|
186
236
|
"text-neutrals-1000 flex-1 min-w-0 truncate pr-2",
|
|
187
237
|
"checkbox-button-text"
|
|
188
238
|
),
|
|
189
|
-
title:
|
|
190
|
-
children:
|
|
239
|
+
title: e,
|
|
240
|
+
children: e
|
|
191
241
|
}
|
|
192
242
|
),
|
|
193
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ r(
|
|
194
244
|
"input",
|
|
195
245
|
{
|
|
196
246
|
type: "checkbox",
|
|
197
247
|
onChange: a,
|
|
198
|
-
id:
|
|
199
|
-
checked:
|
|
248
|
+
id: t,
|
|
249
|
+
checked: n,
|
|
200
250
|
className: "hidden"
|
|
201
251
|
}
|
|
202
252
|
)
|
|
203
253
|
]
|
|
204
254
|
}
|
|
205
255
|
);
|
|
206
|
-
},
|
|
207
|
-
title:
|
|
208
|
-
icon:
|
|
209
|
-
children:
|
|
210
|
-
value:
|
|
256
|
+
}, je = ({
|
|
257
|
+
title: e,
|
|
258
|
+
icon: t,
|
|
259
|
+
children: n,
|
|
260
|
+
value: l
|
|
211
261
|
}) => {
|
|
212
|
-
const [
|
|
213
|
-
return /* @__PURE__ */
|
|
262
|
+
const [s, a] = A(!1);
|
|
263
|
+
return /* @__PURE__ */ o(
|
|
214
264
|
"div",
|
|
215
265
|
{
|
|
216
|
-
className: `collapsible-block flex flex-col border-t-2 border-neutrals-600 ${
|
|
266
|
+
className: `collapsible-block flex flex-col border-t-2 border-neutrals-600 ${s ? "collapsible-block-open" : ""}`,
|
|
217
267
|
children: [
|
|
218
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ o(
|
|
219
269
|
"div",
|
|
220
270
|
{
|
|
221
271
|
className: "collapsible-block-title flex cursor-pointer items-center py-4",
|
|
222
|
-
onClick: () => a(!
|
|
272
|
+
onClick: () => a(!s),
|
|
223
273
|
children: [
|
|
224
|
-
/* @__PURE__ */
|
|
225
|
-
/* @__PURE__ */
|
|
226
|
-
/* @__PURE__ */
|
|
227
|
-
|
|
274
|
+
/* @__PURE__ */ r("div", { className: `${s ? "rotate-180" : ""} transition-transform`, children: t || /* @__PURE__ */ r(te, { className: "w-5 h-5 mr-3" }) }),
|
|
275
|
+
/* @__PURE__ */ o("div", { className: "flex flex-1 items-center justify-between", children: [
|
|
276
|
+
/* @__PURE__ */ r("span", { children: e }),
|
|
277
|
+
l && /* @__PURE__ */ r("p", { className: "body-1 text-neutrals-800", children: l })
|
|
228
278
|
] })
|
|
229
279
|
]
|
|
230
280
|
}
|
|
231
281
|
),
|
|
232
|
-
|
|
282
|
+
s && /* @__PURE__ */ r("div", { className: "collapsible-block-content pb-4", children: n })
|
|
233
283
|
]
|
|
234
284
|
}
|
|
235
285
|
);
|
|
236
|
-
},
|
|
237
|
-
const
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
id: r.length,
|
|
286
|
+
}, Ge = ({ text: e, highlightText: t }) => {
|
|
287
|
+
const n = D(() => {
|
|
288
|
+
const l = [];
|
|
289
|
+
if (!t)
|
|
290
|
+
return [{ id: 0, text: e, highlight: !1 }];
|
|
291
|
+
const s = t?.toLowerCase() || "", a = e?.toLowerCase()?.split(s) || "";
|
|
292
|
+
for (let c = 0, u = 0; c < a?.length; c++) {
|
|
293
|
+
const d = a?.[c], h = d.length;
|
|
294
|
+
d !== "" && l.push({
|
|
295
|
+
id: l.length,
|
|
247
296
|
highlight: !1,
|
|
248
|
-
text:
|
|
249
|
-
|
|
250
|
-
|
|
297
|
+
text: e?.substring(
|
|
298
|
+
u,
|
|
299
|
+
u + h
|
|
251
300
|
)
|
|
252
|
-
}),
|
|
253
|
-
id:
|
|
301
|
+
}), u += h, c !== a?.length - 1 && (l.push({
|
|
302
|
+
id: l.length,
|
|
254
303
|
highlight: !0,
|
|
255
|
-
text:
|
|
256
|
-
|
|
257
|
-
|
|
304
|
+
text: e?.substring(
|
|
305
|
+
u,
|
|
306
|
+
u + t.length
|
|
258
307
|
)
|
|
259
|
-
}),
|
|
308
|
+
}), u += t.length);
|
|
260
309
|
}
|
|
261
|
-
return
|
|
262
|
-
}, [
|
|
263
|
-
return /* @__PURE__ */
|
|
310
|
+
return l;
|
|
311
|
+
}, [t, e]);
|
|
312
|
+
return /* @__PURE__ */ r(Y, { children: n.map((l) => /* @__PURE__ */ r(
|
|
264
313
|
"span",
|
|
265
314
|
{
|
|
266
|
-
className:
|
|
267
|
-
children:
|
|
315
|
+
className: m(l?.highlight && "bg-highlight"),
|
|
316
|
+
children: l?.text
|
|
268
317
|
},
|
|
269
|
-
|
|
318
|
+
l?.id
|
|
270
319
|
)) });
|
|
271
|
-
},
|
|
272
|
-
icon:
|
|
273
|
-
onClick:
|
|
274
|
-
buttonClassName:
|
|
275
|
-
disabled:
|
|
276
|
-
title:
|
|
320
|
+
}, $e = ({
|
|
321
|
+
icon: e,
|
|
322
|
+
onClick: t,
|
|
323
|
+
buttonClassName: n,
|
|
324
|
+
disabled: l,
|
|
325
|
+
title: s,
|
|
277
326
|
isBaseIconStyles: a = !0
|
|
278
|
-
}) => /* @__PURE__ */
|
|
327
|
+
}) => /* @__PURE__ */ r(
|
|
279
328
|
"button",
|
|
280
329
|
{
|
|
281
330
|
type: "button",
|
|
282
|
-
className:
|
|
331
|
+
className: m(
|
|
283
332
|
a && "base-icon-button",
|
|
284
|
-
|
|
333
|
+
n
|
|
285
334
|
),
|
|
286
|
-
onClick: (
|
|
287
|
-
disabled:
|
|
288
|
-
title:
|
|
335
|
+
onClick: (c) => t?.(c),
|
|
336
|
+
disabled: l,
|
|
337
|
+
title: s,
|
|
289
338
|
"aria-label": "button",
|
|
290
|
-
children:
|
|
339
|
+
children: e
|
|
291
340
|
}
|
|
292
|
-
),
|
|
293
|
-
value:
|
|
294
|
-
inputId:
|
|
295
|
-
placeholder:
|
|
296
|
-
cssClass:
|
|
297
|
-
type:
|
|
341
|
+
), ge = ({
|
|
342
|
+
value: e,
|
|
343
|
+
inputId: t,
|
|
344
|
+
placeholder: n = "",
|
|
345
|
+
cssClass: l = "",
|
|
346
|
+
type: s = "text",
|
|
298
347
|
disabled: a,
|
|
299
|
-
readonly:
|
|
300
|
-
onChange:
|
|
301
|
-
onKeyDown:
|
|
348
|
+
readonly: c,
|
|
349
|
+
onChange: u,
|
|
350
|
+
onKeyDown: d
|
|
302
351
|
}) => {
|
|
303
|
-
const
|
|
352
|
+
const h = m(
|
|
304
353
|
"truncate outline-none shadow-none body-1",
|
|
305
|
-
|
|
306
|
-
|
|
354
|
+
l,
|
|
355
|
+
c ? "pointer-events-none" : ""
|
|
307
356
|
);
|
|
308
|
-
return /* @__PURE__ */
|
|
357
|
+
return /* @__PURE__ */ r(
|
|
309
358
|
"input",
|
|
310
359
|
{
|
|
311
|
-
type:
|
|
360
|
+
type: s,
|
|
312
361
|
autoComplete: "off",
|
|
313
|
-
id:
|
|
314
|
-
placeholder:
|
|
315
|
-
value:
|
|
316
|
-
title:
|
|
362
|
+
id: t,
|
|
363
|
+
placeholder: n,
|
|
364
|
+
value: e || "",
|
|
365
|
+
title: e ? String(e) : "",
|
|
317
366
|
disabled: a,
|
|
318
|
-
className:
|
|
319
|
-
onKeyDown:
|
|
320
|
-
onChange: (
|
|
367
|
+
className: h,
|
|
368
|
+
onKeyDown: d,
|
|
369
|
+
onChange: (f) => u?.(f.currentTarget.value)
|
|
321
370
|
}
|
|
322
371
|
);
|
|
323
|
-
},
|
|
324
|
-
iconBeforeInput:
|
|
325
|
-
iconAfterInput:
|
|
326
|
-
containerClasses:
|
|
327
|
-
cssClass:
|
|
328
|
-
...
|
|
329
|
-
}) => /* @__PURE__ */
|
|
330
|
-
|
|
331
|
-
/* @__PURE__ */
|
|
332
|
-
|
|
372
|
+
}, He = ({
|
|
373
|
+
iconBeforeInput: e,
|
|
374
|
+
iconAfterInput: t,
|
|
375
|
+
containerClasses: n,
|
|
376
|
+
cssClass: l,
|
|
377
|
+
...s
|
|
378
|
+
}) => /* @__PURE__ */ o("div", { className: m("input w-full flex flex-row", n), children: [
|
|
379
|
+
e,
|
|
380
|
+
/* @__PURE__ */ r(
|
|
381
|
+
ge,
|
|
333
382
|
{
|
|
334
|
-
cssClass:
|
|
383
|
+
cssClass: m(
|
|
335
384
|
"border-0 bg-transparent p-0 h-full shadow-none flex-1 min-w-0 rounded-none",
|
|
336
|
-
|
|
385
|
+
l
|
|
337
386
|
),
|
|
338
|
-
...
|
|
387
|
+
...s
|
|
339
388
|
}
|
|
340
389
|
),
|
|
341
|
-
|
|
342
|
-
] }),
|
|
343
|
-
url:
|
|
344
|
-
title:
|
|
345
|
-
linkClassName:
|
|
346
|
-
iconBefore:
|
|
347
|
-
iconAfter:
|
|
390
|
+
t
|
|
391
|
+
] }), Be = ({
|
|
392
|
+
url: e,
|
|
393
|
+
title: t,
|
|
394
|
+
linkClassName: n = "",
|
|
395
|
+
iconBefore: l,
|
|
396
|
+
iconAfter: s
|
|
348
397
|
}) => {
|
|
349
|
-
const a =
|
|
350
|
-
|
|
351
|
-
|
|
398
|
+
const a = m(
|
|
399
|
+
s ? "mr-2" : "",
|
|
400
|
+
l ? "ml-2" : ""
|
|
352
401
|
);
|
|
353
|
-
return /* @__PURE__ */
|
|
402
|
+
return /* @__PURE__ */ o(
|
|
354
403
|
"a",
|
|
355
404
|
{
|
|
356
|
-
href:
|
|
405
|
+
href: e,
|
|
357
406
|
target: "_blank",
|
|
358
407
|
rel: "noopener noreferrer",
|
|
359
|
-
className:
|
|
360
|
-
title:
|
|
408
|
+
className: m("base-link", n),
|
|
409
|
+
title: t,
|
|
361
410
|
children: [
|
|
362
|
-
|
|
363
|
-
/* @__PURE__ */
|
|
364
|
-
|
|
411
|
+
l,
|
|
412
|
+
/* @__PURE__ */ r("span", { className: a, children: t }),
|
|
413
|
+
s
|
|
365
414
|
]
|
|
366
415
|
}
|
|
367
416
|
);
|
|
368
|
-
},
|
|
417
|
+
}, Ue = ({ title: e, text: t, onClick: n }) => /* @__PURE__ */ r(
|
|
369
418
|
"button",
|
|
370
419
|
{
|
|
371
420
|
type: "button",
|
|
372
421
|
className: "tag flex items-center justify-center",
|
|
373
|
-
onClick: () =>
|
|
422
|
+
onClick: () => n?.(t || e),
|
|
374
423
|
"aria-label": "button",
|
|
375
|
-
children: /* @__PURE__ */
|
|
424
|
+
children: /* @__PURE__ */ r("h4", { children: e })
|
|
376
425
|
}
|
|
377
|
-
),
|
|
378
|
-
label:
|
|
379
|
-
id:
|
|
380
|
-
checked:
|
|
381
|
-
radioIcon:
|
|
382
|
-
description:
|
|
426
|
+
), We = ({
|
|
427
|
+
label: e,
|
|
428
|
+
id: t,
|
|
429
|
+
checked: n,
|
|
430
|
+
radioIcon: l,
|
|
431
|
+
description: s,
|
|
383
432
|
onChange: a
|
|
384
433
|
}) => {
|
|
385
|
-
const
|
|
386
|
-
(
|
|
387
|
-
|
|
434
|
+
const c = L(
|
|
435
|
+
(u) => {
|
|
436
|
+
u.stopPropagation(), a?.(t, u.target.checked);
|
|
388
437
|
},
|
|
389
|
-
[a,
|
|
438
|
+
[a, t]
|
|
390
439
|
);
|
|
391
|
-
return /* @__PURE__ */
|
|
440
|
+
return /* @__PURE__ */ o(
|
|
392
441
|
"label",
|
|
393
442
|
{
|
|
394
443
|
className: "flex flex-col cursor-pointer min-w-0 py-[6px]",
|
|
395
|
-
htmlFor:
|
|
444
|
+
htmlFor: t,
|
|
396
445
|
children: [
|
|
397
|
-
/* @__PURE__ */
|
|
398
|
-
/* @__PURE__ */
|
|
446
|
+
/* @__PURE__ */ o("p", { className: "radio-label flex items-center min-w-0", children: [
|
|
447
|
+
/* @__PURE__ */ r(
|
|
399
448
|
"span",
|
|
400
449
|
{
|
|
401
|
-
className:
|
|
450
|
+
className: m(
|
|
402
451
|
"flex justify-center items-center w-4 h-4 mr-2 relative",
|
|
403
452
|
"radio-button",
|
|
404
|
-
|
|
453
|
+
n ? "radio-button-active" : ""
|
|
405
454
|
),
|
|
406
|
-
children:
|
|
455
|
+
children: n && l
|
|
407
456
|
}
|
|
408
457
|
),
|
|
409
|
-
|
|
458
|
+
e && /* @__PURE__ */ r(
|
|
410
459
|
"span",
|
|
411
460
|
{
|
|
412
461
|
className: "radio-title body-1 text-neutrals-1000 flex-1 min-w-0 truncate pr-2",
|
|
413
|
-
title:
|
|
414
|
-
children:
|
|
462
|
+
title: e,
|
|
463
|
+
children: e
|
|
415
464
|
}
|
|
416
465
|
)
|
|
417
466
|
] }),
|
|
418
|
-
|
|
467
|
+
s && /* @__PURE__ */ r(
|
|
419
468
|
"span",
|
|
420
469
|
{
|
|
421
470
|
className: "radio-description ml-6 text-neutrals-800 body-2 w-auto flex items-center",
|
|
422
|
-
title:
|
|
423
|
-
children:
|
|
471
|
+
title: s,
|
|
472
|
+
children: s
|
|
424
473
|
}
|
|
425
474
|
),
|
|
426
|
-
/* @__PURE__ */
|
|
475
|
+
/* @__PURE__ */ r(
|
|
427
476
|
"input",
|
|
428
477
|
{
|
|
429
478
|
type: "radio",
|
|
430
|
-
onChange:
|
|
431
|
-
id:
|
|
432
|
-
checked:
|
|
479
|
+
onChange: c,
|
|
480
|
+
id: t,
|
|
481
|
+
checked: n,
|
|
433
482
|
className: "hidden"
|
|
434
483
|
}
|
|
435
484
|
)
|
|
@@ -437,242 +486,345 @@ const bn = ({
|
|
|
437
486
|
}
|
|
438
487
|
);
|
|
439
488
|
};
|
|
440
|
-
var
|
|
441
|
-
const
|
|
442
|
-
portalId:
|
|
443
|
-
state:
|
|
444
|
-
heading:
|
|
445
|
-
size:
|
|
446
|
-
onClose:
|
|
489
|
+
var S = /* @__PURE__ */ ((e) => (e.Closed = "Closed", e.Opened = "Opened", e))(S || {}), T = /* @__PURE__ */ ((e) => (e.LG = "Large", e.SM = "Small", e))(T || {});
|
|
490
|
+
const be = ({
|
|
491
|
+
portalId: e,
|
|
492
|
+
state: t = S.Opened,
|
|
493
|
+
heading: n,
|
|
494
|
+
size: l,
|
|
495
|
+
onClose: s,
|
|
447
496
|
children: a,
|
|
448
|
-
overlayClassName:
|
|
449
|
-
containerClassName:
|
|
450
|
-
dividers:
|
|
451
|
-
closeButtonTitle:
|
|
497
|
+
overlayClassName: c,
|
|
498
|
+
containerClassName: u,
|
|
499
|
+
dividers: d = !0,
|
|
500
|
+
closeButtonTitle: h
|
|
452
501
|
}) => {
|
|
453
|
-
const { refs:
|
|
454
|
-
open:
|
|
455
|
-
onOpenChange:
|
|
456
|
-
}),
|
|
457
|
-
(
|
|
458
|
-
|
|
502
|
+
const { refs: f, context: g } = $({
|
|
503
|
+
open: t !== S.Closed && !!t,
|
|
504
|
+
onOpenChange: s
|
|
505
|
+
}), N = le(g, { role: "dialog" }), x = H(g, { outsidePress: !0 }), { getFloatingProps: E } = B([N, x]), b = L(
|
|
506
|
+
(i) => {
|
|
507
|
+
i?.preventDefault(), i?.stopPropagation(), s();
|
|
459
508
|
},
|
|
460
|
-
[
|
|
509
|
+
[s]
|
|
461
510
|
);
|
|
462
|
-
return /* @__PURE__ */
|
|
463
|
-
|
|
511
|
+
return /* @__PURE__ */ r(se, { id: e, children: t !== S.Closed && /* @__PURE__ */ r(
|
|
512
|
+
ae,
|
|
464
513
|
{
|
|
465
|
-
className:
|
|
514
|
+
className: m(
|
|
466
515
|
"z-modal flex items-center justify-center bg-blackout p-4",
|
|
467
|
-
|
|
516
|
+
c
|
|
468
517
|
),
|
|
469
|
-
children: /* @__PURE__ */
|
|
518
|
+
children: /* @__PURE__ */ r(oe, { context: g, children: /* @__PURE__ */ o(
|
|
470
519
|
"div",
|
|
471
520
|
{
|
|
472
|
-
className:
|
|
521
|
+
className: m(
|
|
473
522
|
"relative max-h-full modal rounded bg-white flex flex-col shadow w-full",
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
523
|
+
l === T.LG && "max-w-[65%]",
|
|
524
|
+
l === T.SM && "max-w-[30%]",
|
|
525
|
+
d && "divide-neutrals-400 divide-y",
|
|
526
|
+
u,
|
|
478
527
|
"sm:w-full sm:max-w-full sm:px-4 sm:py-6"
|
|
479
528
|
),
|
|
480
|
-
ref:
|
|
481
|
-
...
|
|
482
|
-
onClick(
|
|
483
|
-
|
|
529
|
+
ref: f.setFloating,
|
|
530
|
+
...E({
|
|
531
|
+
onClick(i) {
|
|
532
|
+
i.stopPropagation();
|
|
484
533
|
}
|
|
485
534
|
}),
|
|
486
535
|
children: [
|
|
487
|
-
/* @__PURE__ */
|
|
488
|
-
|
|
489
|
-
/* @__PURE__ */
|
|
490
|
-
|
|
536
|
+
/* @__PURE__ */ o("div", { className: "flex flex-row justify-between py-3 px-6 items-center mb-2 modal-heading sm:p-0 sm:pb-2", children: [
|
|
537
|
+
n && (typeof n == "string" ? /* @__PURE__ */ r("h2", { className: "flex-1 min-w-0 mr-3 modal-heading-title sm:h3", children: n }) : n),
|
|
538
|
+
/* @__PURE__ */ r(
|
|
539
|
+
W,
|
|
491
540
|
{
|
|
492
|
-
title:
|
|
493
|
-
onClick:
|
|
541
|
+
title: h,
|
|
542
|
+
onClick: b,
|
|
494
543
|
btnClassNames: "sm:h-[24px] sm:w-[24px] sm:top-4"
|
|
495
544
|
}
|
|
496
545
|
)
|
|
497
546
|
] }),
|
|
498
|
-
a.map((
|
|
547
|
+
a.map((i) => i)
|
|
499
548
|
]
|
|
500
549
|
}
|
|
501
550
|
) })
|
|
502
551
|
}
|
|
503
552
|
) });
|
|
504
|
-
},
|
|
505
|
-
triggerButton:
|
|
506
|
-
options:
|
|
507
|
-
content:
|
|
508
|
-
selectedOption:
|
|
509
|
-
disabled:
|
|
553
|
+
}, qe = (e) => e.state === S.Closed ? null : /* @__PURE__ */ r(be, { ...e }), Qe = ({
|
|
554
|
+
triggerButton: e,
|
|
555
|
+
options: t,
|
|
556
|
+
content: n,
|
|
557
|
+
selectedOption: l,
|
|
558
|
+
disabled: s,
|
|
510
559
|
containerClassName: a,
|
|
511
|
-
openedClassName:
|
|
512
|
-
onOptionSelect:
|
|
560
|
+
openedClassName: c,
|
|
561
|
+
onOptionSelect: u
|
|
513
562
|
}) => {
|
|
514
|
-
const [
|
|
515
|
-
open:
|
|
516
|
-
onOpenChange:
|
|
563
|
+
const [d, h] = A(!1), { refs: f, floatingStyles: g, context: N } = $({
|
|
564
|
+
open: d,
|
|
565
|
+
onOpenChange: s ? void 0 : h,
|
|
517
566
|
placement: "bottom-end",
|
|
518
|
-
middleware: [
|
|
519
|
-
whileElementsMounted:
|
|
520
|
-
}),
|
|
521
|
-
|
|
522
|
-
|
|
567
|
+
middleware: [ie(8), de(), ue()],
|
|
568
|
+
whileElementsMounted: ce
|
|
569
|
+
}), x = me(N), E = H(N, { outsidePress: !0 }), { getReferenceProps: b, getFloatingProps: i } = B([
|
|
570
|
+
x,
|
|
571
|
+
E
|
|
523
572
|
]);
|
|
524
|
-
return /* @__PURE__ */
|
|
525
|
-
/* @__PURE__ */
|
|
573
|
+
return /* @__PURE__ */ o(Y, { children: [
|
|
574
|
+
/* @__PURE__ */ r(
|
|
526
575
|
"div",
|
|
527
576
|
{
|
|
528
|
-
ref:
|
|
529
|
-
...
|
|
530
|
-
onClick(
|
|
531
|
-
|
|
577
|
+
ref: f.setReference,
|
|
578
|
+
...b({
|
|
579
|
+
onClick(p) {
|
|
580
|
+
p.stopPropagation();
|
|
532
581
|
}
|
|
533
582
|
}),
|
|
534
|
-
className:
|
|
535
|
-
children:
|
|
583
|
+
className: m(a, d && c),
|
|
584
|
+
children: e
|
|
536
585
|
}
|
|
537
586
|
),
|
|
538
|
-
|
|
587
|
+
d && /* @__PURE__ */ o(
|
|
539
588
|
"div",
|
|
540
589
|
{
|
|
541
|
-
ref:
|
|
542
|
-
style:
|
|
590
|
+
ref: f.setFloating,
|
|
591
|
+
style: g,
|
|
543
592
|
className: "flex flex-col z-10 dropdown-menu-shadow bg-white dropdown-container rounded",
|
|
544
|
-
...
|
|
593
|
+
...i(),
|
|
545
594
|
children: [
|
|
546
|
-
|
|
547
|
-
|
|
595
|
+
n && n,
|
|
596
|
+
t && t.map((p) => /* @__PURE__ */ r(
|
|
548
597
|
"div",
|
|
549
598
|
{
|
|
550
|
-
onClick: (
|
|
551
|
-
|
|
599
|
+
onClick: (C) => {
|
|
600
|
+
C.stopPropagation(), u?.(p.key), h(!1);
|
|
552
601
|
},
|
|
553
|
-
className:
|
|
602
|
+
className: m(
|
|
554
603
|
"text-neutrals-900 body-3 cursor-pointer dropdown-item min-w-[200px]",
|
|
555
|
-
|
|
604
|
+
l === p.key && "bg-hues-100"
|
|
556
605
|
),
|
|
557
|
-
children: /* @__PURE__ */
|
|
606
|
+
children: /* @__PURE__ */ o(
|
|
558
607
|
"div",
|
|
559
608
|
{
|
|
560
609
|
className: "p-2 hover:bg-hues-100 h-full dropdown-item-text flex items-center gap-x-2",
|
|
561
|
-
title:
|
|
610
|
+
title: p.title,
|
|
562
611
|
children: [
|
|
563
|
-
|
|
564
|
-
/* @__PURE__ */
|
|
612
|
+
p.icon ? p.icon : null,
|
|
613
|
+
/* @__PURE__ */ r("p", { children: p?.title })
|
|
565
614
|
]
|
|
566
615
|
}
|
|
567
616
|
)
|
|
568
617
|
},
|
|
569
|
-
|
|
618
|
+
p.key
|
|
570
619
|
))
|
|
571
620
|
]
|
|
572
621
|
}
|
|
573
622
|
)
|
|
574
623
|
] });
|
|
575
|
-
},
|
|
576
|
-
/* @__PURE__ */
|
|
577
|
-
/* @__PURE__ */
|
|
578
|
-
|
|
624
|
+
}, Ve = ({ limitMessages: e, query: t }) => /* @__PURE__ */ o("div", { className: "bg-hues-100 px-2 py-1 flex justify-between flex-wrap items-center", children: [
|
|
625
|
+
/* @__PURE__ */ r("div", { className: "flex gap-x-[4px]", children: /* @__PURE__ */ r("div", { className: "flex flex-col", children: /* @__PURE__ */ o("div", { className: "flex gap-x-[4px]", children: [
|
|
626
|
+
/* @__PURE__ */ o("span", { className: "text-primary h5", children: [
|
|
627
|
+
e?.excelFormatTitle,
|
|
579
628
|
" "
|
|
580
629
|
] }),
|
|
581
|
-
/* @__PURE__ */
|
|
630
|
+
/* @__PURE__ */ r("span", { className: "text-neutrals-800 body-3", children: e?.excelFormatText })
|
|
582
631
|
] }) }) }),
|
|
583
|
-
/* @__PURE__ */
|
|
584
|
-
|
|
585
|
-
|
|
632
|
+
/* @__PURE__ */ r("a", { href: t, target: "_blank", children: /* @__PURE__ */ o("span", { className: "flex gap-x-[4px] body-3 cursor-pointer items-center", children: [
|
|
633
|
+
e?.dataExplorerIcon,
|
|
634
|
+
e?.dataExplorer
|
|
586
635
|
] }) })
|
|
587
|
-
] }),
|
|
588
|
-
limitMessages:
|
|
589
|
-
isDownload:
|
|
590
|
-
showAdvancedViewButton:
|
|
591
|
-
onAdvancedViewClick:
|
|
592
|
-
query:
|
|
593
|
-
}) =>
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
636
|
+
] }), ze = ({
|
|
637
|
+
limitMessages: e,
|
|
638
|
+
isDownload: t,
|
|
639
|
+
showAdvancedViewButton: n,
|
|
640
|
+
onAdvancedViewClick: l,
|
|
641
|
+
query: s
|
|
642
|
+
}) => /* @__PURE__ */ o(
|
|
643
|
+
"div",
|
|
644
|
+
{
|
|
645
|
+
className: m(
|
|
646
|
+
"bg-semantic-warning-light px-2 py-1 flex justify-between flex-wrap items-center",
|
|
647
|
+
e?.containerClassName
|
|
648
|
+
),
|
|
649
|
+
children: [
|
|
650
|
+
/* @__PURE__ */ o("div", { className: "flex gap-x-2 items-center", children: [
|
|
651
|
+
/* @__PURE__ */ r("span", { children: e?.warningIcon }),
|
|
652
|
+
/* @__PURE__ */ o("div", { className: "flex flex-col gap-1", children: [
|
|
653
|
+
/* @__PURE__ */ o("div", { className: "flex gap-x-[4px]", children: [
|
|
654
|
+
/* @__PURE__ */ o(
|
|
655
|
+
"span",
|
|
656
|
+
{
|
|
657
|
+
className: m(
|
|
658
|
+
"text-primary h5",
|
|
659
|
+
e?.largeQueryClassName
|
|
660
|
+
),
|
|
661
|
+
children: [
|
|
662
|
+
e?.largeQuery,
|
|
663
|
+
":",
|
|
664
|
+
" "
|
|
665
|
+
]
|
|
666
|
+
}
|
|
667
|
+
),
|
|
668
|
+
/* @__PURE__ */ r(
|
|
669
|
+
"span",
|
|
670
|
+
{
|
|
671
|
+
className: m(
|
|
672
|
+
"text-neutrals-800 body-3",
|
|
673
|
+
e?.limitMessageClassName
|
|
674
|
+
),
|
|
675
|
+
children: t ? e?.downloadMessage?.(M) : e?.showingLimit?.(M)
|
|
676
|
+
}
|
|
677
|
+
)
|
|
604
678
|
] }),
|
|
605
|
-
/* @__PURE__ */
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
679
|
+
t && /* @__PURE__ */ r(
|
|
680
|
+
"span",
|
|
681
|
+
{
|
|
682
|
+
className: m(
|
|
683
|
+
"text-neutrals-800 body-3",
|
|
684
|
+
e?.limitMessageClassName
|
|
685
|
+
),
|
|
686
|
+
children: e?.fullLimitMessage
|
|
687
|
+
}
|
|
688
|
+
)
|
|
689
|
+
] })
|
|
690
|
+
] }),
|
|
691
|
+
n && /* @__PURE__ */ o(
|
|
692
|
+
"span",
|
|
693
|
+
{
|
|
694
|
+
onClick: () => l?.(),
|
|
695
|
+
className: "flex gap-x-[4px] h4 cursor-pointer items-center text-primary",
|
|
696
|
+
children: [
|
|
697
|
+
e?.editIcon,
|
|
698
|
+
e?.refineInAdvancedView
|
|
699
|
+
]
|
|
700
|
+
}
|
|
701
|
+
),
|
|
702
|
+
t && /* @__PURE__ */ r("a", { href: s || "", target: "_blank", children: /* @__PURE__ */ o("span", { className: "flex gap-x-[4px] body-3 cursor-pointer items-center", children: [
|
|
703
|
+
e?.dataExplorerIcon,
|
|
704
|
+
e?.dataExplorer
|
|
705
|
+
] }) })
|
|
706
|
+
]
|
|
707
|
+
}
|
|
708
|
+
), q = j(null);
|
|
709
|
+
function Xe({
|
|
710
|
+
value: e,
|
|
711
|
+
children: t
|
|
712
|
+
}) {
|
|
713
|
+
const n = D(() => e ?? {}, [e]);
|
|
714
|
+
return /* @__PURE__ */ r(q.Provider, { value: n, children: t });
|
|
715
|
+
}
|
|
716
|
+
function Ne() {
|
|
717
|
+
return G(q);
|
|
718
|
+
}
|
|
719
|
+
var I = /* @__PURE__ */ ((e) => (e.Info = "info", e.Error = "error", e.Warning = "warning", e))(I || {});
|
|
720
|
+
const Ce = {
|
|
721
|
+
[I.Info]: "border-neutrals-800 bg-neutrals-300 text-neutrals-1000",
|
|
722
|
+
[I.Error]: "border-semantic-error bg-semantic-error-light text-neutrals-1000",
|
|
723
|
+
[I.Warning]: "border-semantic-warning bg-semantic-warning-light text-neutrals-1000"
|
|
724
|
+
}, we = "shrink-0", ye = "min-w-0 body-2", ve = "flex items-start gap-2 min-w-0 border-l-2 rounded py-2 px-4 items-center";
|
|
725
|
+
function Ze({
|
|
726
|
+
type: e,
|
|
727
|
+
icon: t,
|
|
728
|
+
children: n,
|
|
729
|
+
className: l,
|
|
730
|
+
contentClassName: s
|
|
731
|
+
}) {
|
|
732
|
+
const a = Ne(), c = t ?? a?.icons?.[e], u = a?.classes?.container ?? ve, d = a?.classes?.types?.[e] ?? Ce[e], h = v(u, d, l), f = v(we, a?.classes?.icon), g = v(
|
|
733
|
+
ye,
|
|
734
|
+
a?.classes?.content,
|
|
735
|
+
s
|
|
736
|
+
);
|
|
737
|
+
return /* @__PURE__ */ o("div", { "data-type": e, className: h, children: [
|
|
738
|
+
c ? /* @__PURE__ */ r("span", { className: f, children: c }) : null,
|
|
739
|
+
n ? /* @__PURE__ */ r("div", { className: g, children: n }) : null
|
|
740
|
+
] });
|
|
741
|
+
}
|
|
742
|
+
const Je = ({
|
|
743
|
+
title: e,
|
|
744
|
+
copiedTitle: t,
|
|
745
|
+
tooltip: n,
|
|
746
|
+
icon: l,
|
|
747
|
+
copiedIcon: s,
|
|
748
|
+
className: a,
|
|
749
|
+
buttonTextClassName: c,
|
|
750
|
+
onClick: u
|
|
751
|
+
}) => {
|
|
752
|
+
const [d, h] = A(!1), f = P(null), g = () => {
|
|
753
|
+
u(), h(!0), f.current && clearTimeout(f.current), f.current = setTimeout(() => {
|
|
754
|
+
h(!1);
|
|
755
|
+
}, 1e3);
|
|
756
|
+
};
|
|
757
|
+
return _(() => () => {
|
|
758
|
+
f.current && clearTimeout(f.current);
|
|
759
|
+
}, []), /* @__PURE__ */ o("div", { className: "relative w-fit", children: [
|
|
760
|
+
/* @__PURE__ */ r(
|
|
761
|
+
pe,
|
|
612
762
|
{
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
763
|
+
title: d ? t : e,
|
|
764
|
+
isSmallButton: !0,
|
|
765
|
+
disabled: d,
|
|
766
|
+
buttonClassName: v([
|
|
767
|
+
"text-button-tertiary small-icon-button !h-6 !p-0",
|
|
768
|
+
a
|
|
769
|
+
]),
|
|
770
|
+
textClassName: v(["ml-1", c]),
|
|
771
|
+
onClick: g,
|
|
772
|
+
iconBefore: d ? s : l
|
|
619
773
|
}
|
|
620
774
|
),
|
|
621
|
-
|
|
622
|
-
n == null ? void 0 : n.dataExplorerIcon,
|
|
623
|
-
n == null ? void 0 : n.dataExplorer
|
|
624
|
-
] }) })
|
|
775
|
+
n && d && /* @__PURE__ */ r("div", { className: "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 h4 shadow", children: n })
|
|
625
776
|
] });
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
return c(r.matches), r.addEventListener("change", o), () => r.removeEventListener("change", o);
|
|
636
|
-
}, [n]), e;
|
|
777
|
+
};
|
|
778
|
+
var Ee = /* @__PURE__ */ ((e) => (e.Enter = "Enter", e))(Ee || {});
|
|
779
|
+
const Q = j(null);
|
|
780
|
+
function Ke({
|
|
781
|
+
children: e,
|
|
782
|
+
isAgentAvailable: t
|
|
783
|
+
}) {
|
|
784
|
+
const n = D(() => ({ isAgentAvailable: t }), [t]);
|
|
785
|
+
return /* @__PURE__ */ r(Q.Provider, { value: n, children: e });
|
|
637
786
|
}
|
|
638
|
-
function
|
|
639
|
-
const
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
},
|
|
646
|
-
[n, e]
|
|
647
|
-
);
|
|
787
|
+
function et() {
|
|
788
|
+
const e = G(Q);
|
|
789
|
+
if (!e)
|
|
790
|
+
throw new Error(
|
|
791
|
+
"useAgentAvailability must be used within AgentAvailabilityProvider"
|
|
792
|
+
);
|
|
793
|
+
return e;
|
|
648
794
|
}
|
|
649
|
-
var ln = /* @__PURE__ */ ((n) => (n.Enter = "Enter", n))(ln || {});
|
|
650
795
|
export {
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
796
|
+
Ke as AgentAvailabilityProvider,
|
|
797
|
+
Oe as Alert,
|
|
798
|
+
y as AlertType,
|
|
799
|
+
pe as Button,
|
|
800
|
+
xe as CALENDAR_MOBILE_PADDING,
|
|
801
|
+
Me as Calendar,
|
|
802
|
+
Ye as Checkbox,
|
|
803
|
+
W as CloseButton,
|
|
804
|
+
je as CollapsibleBlock,
|
|
805
|
+
Je as CopyButton,
|
|
806
|
+
Ve as DownloadFormatMessage,
|
|
807
|
+
Qe as Dropdown,
|
|
808
|
+
Ge as HighlightText,
|
|
809
|
+
$e as IconButton,
|
|
810
|
+
Ze as InlineAlert,
|
|
811
|
+
Xe as InlineAlertProvider,
|
|
812
|
+
I as InlineAlertType,
|
|
813
|
+
ge as Input,
|
|
814
|
+
He as InputWithIcon,
|
|
815
|
+
Ee as KeyboardKey,
|
|
816
|
+
Be as Link,
|
|
817
|
+
U as Loader,
|
|
818
|
+
T as PopUpSize,
|
|
819
|
+
S as PopUpState,
|
|
820
|
+
qe as Popup,
|
|
821
|
+
We as Radio,
|
|
822
|
+
ze as RequestLimitMessage,
|
|
823
|
+
M as SERIES_LIMIT,
|
|
824
|
+
Pe as TREE_NODE_ARROW_SIZE,
|
|
825
|
+
De as TREE_NODE_PADDING,
|
|
826
|
+
Ue as Tag,
|
|
827
|
+
et as useAgentAvailability,
|
|
828
|
+
Te as useDebounce,
|
|
829
|
+
fe as useIsMobile
|
|
678
830
|
};
|