@epam/ai-dial-conversation-panel 1.2.0-dev.15 → 1.2.0-dev.153
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/ConversationGroupHeader/ConversationGroupHeader.d.ts.map +1 -1
- package/components/ConversationPanel/ConversationPanel.d.ts.map +1 -1
- package/components/ConversationRow/ConversationRow.d.ts +0 -2
- package/components/ConversationRow/ConversationRow.d.ts.map +1 -1
- package/components/FilterTabs/FilterTabs.d.ts +5 -0
- package/components/FilterTabs/FilterTabs.d.ts.map +1 -1
- package/components/ImportExportQueueRow/ImportExportQueueRow.d.ts.map +1 -1
- package/components/NewChatButton/NewChatButton.d.ts +7 -0
- package/components/NewChatButton/NewChatButton.d.ts.map +1 -1
- package/components/RowRenderer/RowRenderer.d.ts.map +1 -1
- package/constants/public-class-names.d.ts +7 -0
- package/constants/public-class-names.d.ts.map +1 -0
- package/index.css +2 -2
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +390 -403
- package/models/import-export-queue.d.ts +2 -2
- package/models/import-export-queue.d.ts.map +1 -1
- package/models/panel-props.d.ts +27 -13
- package/models/panel-props.d.ts.map +1 -1
- package/models/virtual-row.d.ts +0 -2
- package/models/virtual-row.d.ts.map +1 -1
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { ConversationTransferJobStatus as e, DeploymentIcon as t, FilterTab as n, buildCssVars as r, getUtf8ByteLength as i, mergeClasses as a, sanitizeConversationName as o, stripTrailingDots as s } from "@epam/ai-dial-chat-shared";
|
|
2
2
|
import { PanelEmpty as c, PanelNoResults as l, SidebarOrientation as u, SidebarPanel as d } from "@epam/ai-dial-sidebar";
|
|
3
|
-
import { Button as f, ButtonVariant as p, ConfirmationPopup as m, ConfirmationPopupVariant as h, DIAL_ICON_SIZE as g, DIAL_KIT_ICON_STROKE as _, Dropdown as v, ElementSize as y, EllipsisTooltip as b,
|
|
4
|
-
import { createElement as te, memo as
|
|
5
|
-
import {
|
|
6
|
-
import { IconAlertCircleFilled as
|
|
7
|
-
//#region
|
|
8
|
-
var
|
|
9
|
-
|
|
3
|
+
import { Button as f, ButtonVariant as p, ConfirmationPopup as m, ConfirmationPopupVariant as h, DIAL_ICON_SIZE as g, DIAL_KIT_ICON_STROKE as _, Dropdown as v, ElementSize as y, EllipsisTooltip as b, FilterChips as x, GhostIconButton as S, Highlight as C, Input as w, Popup as T, PopupSize as E, ProgressBar as D, Search as O, Skeleton as ee, SkeletonVariant as k, Spinner as A, Tooltip as j, mergeClasses as M } from "@epam/ai-dial-ui-kit";
|
|
4
|
+
import { createElement as te, memo as N, useCallback as P, useEffect as F, useId as ne, useImperativeHandle as re, useLayoutEffect as ie, useMemo as I, useRef as L, useState as R } from "react";
|
|
5
|
+
import { jsx as z, jsxs as B } from "react/jsx-runtime";
|
|
6
|
+
import { IconAlertCircleFilled as ae, IconAlertTriangleFilled as oe, IconCaretDownFilled as V, IconCaretRightFilled as se, IconCheck as ce, IconChevronDown as H, IconChevronUp as le, IconDotsVertical as ue, IconFile as de, IconFileZip as U, IconJson as fe, IconPlus as pe, IconSparkles as me, IconX as W } from "@tabler/icons-react";
|
|
7
|
+
//#region src/constants/public-class-names.ts
|
|
8
|
+
var he = {
|
|
9
|
+
newChatButton: "dial-cp-new-chat-button",
|
|
10
|
+
search: "dial-cp-search"
|
|
11
|
+
}, G = typeof window < "u" ? ie : F;
|
|
12
|
+
function ge(e) {
|
|
10
13
|
if (e !== void 0) switch (typeof e) {
|
|
11
14
|
case "number": return e;
|
|
12
15
|
case "string":
|
|
@@ -14,11 +17,11 @@ function ve(e) {
|
|
|
14
17
|
break;
|
|
15
18
|
}
|
|
16
19
|
}
|
|
17
|
-
function
|
|
18
|
-
let { styleHeight: s, styleWidth: c } =
|
|
19
|
-
styleHeight:
|
|
20
|
-
styleWidth:
|
|
21
|
-
}), [o?.height, o?.width]), [l, u] =
|
|
20
|
+
function _e({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
|
|
21
|
+
let { styleHeight: s, styleWidth: c } = I(() => ({
|
|
22
|
+
styleHeight: ge(o?.height),
|
|
23
|
+
styleWidth: ge(o?.width)
|
|
24
|
+
}), [o?.height, o?.width]), [l, u] = R({
|
|
22
25
|
height: t,
|
|
23
26
|
width: n
|
|
24
27
|
}), d = r || a === "only-height" && s !== void 0 || a === "only-width" && c !== void 0 || s !== void 0 && c !== void 0;
|
|
@@ -42,7 +45,7 @@ function ye({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
|
|
|
42
45
|
i,
|
|
43
46
|
s,
|
|
44
47
|
c
|
|
45
|
-
]),
|
|
48
|
+
]), I(() => ({
|
|
46
49
|
height: s ?? l.height,
|
|
47
50
|
width: c ?? l.width
|
|
48
51
|
}), [
|
|
@@ -51,16 +54,16 @@ function ye({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
|
|
|
51
54
|
c
|
|
52
55
|
]);
|
|
53
56
|
}
|
|
54
|
-
function
|
|
55
|
-
let t =
|
|
57
|
+
function ve(e) {
|
|
58
|
+
let t = L(() => {
|
|
56
59
|
throw Error("Cannot call during render.");
|
|
57
60
|
});
|
|
58
61
|
return G(() => {
|
|
59
62
|
t.current = e;
|
|
60
|
-
}, [e]),
|
|
63
|
+
}, [e]), P((e) => t.current?.(e), [t]);
|
|
61
64
|
}
|
|
62
65
|
var K = null;
|
|
63
|
-
function
|
|
66
|
+
function ye(e = !1) {
|
|
64
67
|
if (K === null || e) {
|
|
65
68
|
let e = document.createElement("div"), t = e.style;
|
|
66
69
|
t.width = "50px", t.height = "50px", t.overflow = "scroll", t.direction = "rtl";
|
|
@@ -69,8 +72,8 @@ function xe(e = !1) {
|
|
|
69
72
|
}
|
|
70
73
|
return K;
|
|
71
74
|
}
|
|
72
|
-
function
|
|
73
|
-
if (t === "horizontal" && n) switch (
|
|
75
|
+
function be({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
|
|
76
|
+
if (t === "horizontal" && n) switch (ye()) {
|
|
74
77
|
case "negative": return -r;
|
|
75
78
|
case "positive-descending":
|
|
76
79
|
if (e) {
|
|
@@ -90,7 +93,7 @@ function J(e, t) {
|
|
|
90
93
|
for (let n in e) if (!Object.is(t[n], e[n])) return !1;
|
|
91
94
|
return !0;
|
|
92
95
|
}
|
|
93
|
-
function
|
|
96
|
+
function xe({ cachedBounds: e, itemCount: t, itemSize: n }) {
|
|
94
97
|
if (t === 0) return 0;
|
|
95
98
|
if (typeof n == "number") return t * n;
|
|
96
99
|
{
|
|
@@ -98,9 +101,9 @@ function Ce({ cachedBounds: e, itemCount: t, itemSize: n }) {
|
|
|
98
101
|
return q(n !== void 0, "Unexpected bounds cache miss"), t * ((n.scrollOffset + n.size) / e.size);
|
|
99
102
|
}
|
|
100
103
|
}
|
|
101
|
-
function
|
|
104
|
+
function Se({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, containerScrollOffset: a, containerSize: o }) {
|
|
102
105
|
if (n < 0 || n >= r) throw RangeError(`Invalid index specified: ${n}`, { cause: `Index ${n} is not within the range of 0 - ${r - 1}` });
|
|
103
|
-
let s =
|
|
106
|
+
let s = xe({
|
|
104
107
|
cachedBounds: t,
|
|
105
108
|
itemCount: r,
|
|
106
109
|
itemSize: i
|
|
@@ -112,7 +115,7 @@ function we({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, co
|
|
|
112
115
|
default: return a >= u && a <= l ? a : a < u ? u : l;
|
|
113
116
|
}
|
|
114
117
|
}
|
|
115
|
-
function
|
|
118
|
+
function Ce({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemCount: r, overscanCount: i }) {
|
|
116
119
|
let a = r - 1, o = 0, s = -1, c = 0, l = -1, u = 0;
|
|
117
120
|
for (; u < a;) {
|
|
118
121
|
let n = e.get(u);
|
|
@@ -131,7 +134,7 @@ function Te({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemC
|
|
|
131
134
|
stopIndexOverscan: l
|
|
132
135
|
};
|
|
133
136
|
}
|
|
134
|
-
function
|
|
137
|
+
function we({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
135
138
|
let r = /* @__PURE__ */ new Map();
|
|
136
139
|
return {
|
|
137
140
|
get(i) {
|
|
@@ -168,8 +171,8 @@ function Ee({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
|
168
171
|
}
|
|
169
172
|
};
|
|
170
173
|
}
|
|
171
|
-
function
|
|
172
|
-
return
|
|
174
|
+
function Te({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
175
|
+
return I(() => we({
|
|
173
176
|
itemCount: e,
|
|
174
177
|
itemProps: t,
|
|
175
178
|
itemSize: n
|
|
@@ -179,7 +182,7 @@ function De({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
|
179
182
|
n
|
|
180
183
|
]);
|
|
181
184
|
}
|
|
182
|
-
function
|
|
185
|
+
function Ee({ containerSize: e, itemSize: t }) {
|
|
183
186
|
let n;
|
|
184
187
|
switch (typeof t) {
|
|
185
188
|
case "string":
|
|
@@ -191,17 +194,17 @@ function Oe({ containerSize: e, itemSize: t }) {
|
|
|
191
194
|
}
|
|
192
195
|
return n;
|
|
193
196
|
}
|
|
194
|
-
function
|
|
195
|
-
let { height: u = n, width: d = n } =
|
|
197
|
+
function De({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0, direction: r, isRtl: i = !1, itemCount: a, itemProps: o, itemSize: s, onResize: c, overscanCount: l }) {
|
|
198
|
+
let { height: u = n, width: d = n } = _e({
|
|
196
199
|
defaultHeight: r === "vertical" ? n : void 0,
|
|
197
200
|
defaultWidth: r === "horizontal" ? n : void 0,
|
|
198
201
|
element: e,
|
|
199
202
|
mode: r === "vertical" ? "only-height" : "only-width",
|
|
200
203
|
style: t
|
|
201
|
-
}), f =
|
|
204
|
+
}), f = L({
|
|
202
205
|
height: 0,
|
|
203
206
|
width: 0
|
|
204
|
-
}), p = r === "vertical" ? u : d, m =
|
|
207
|
+
}), p = r === "vertical" ? u : d, m = Ee({
|
|
205
208
|
containerSize: p,
|
|
206
209
|
itemSize: s
|
|
207
210
|
});
|
|
@@ -218,11 +221,11 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
218
221
|
c,
|
|
219
222
|
d
|
|
220
223
|
]);
|
|
221
|
-
let h =
|
|
224
|
+
let h = Te({
|
|
222
225
|
itemCount: a,
|
|
223
226
|
itemProps: o,
|
|
224
227
|
itemSize: m
|
|
225
|
-
}), g =
|
|
228
|
+
}), g = P((e) => h.get(e), [h]), [_, v] = R(() => Ce({
|
|
226
229
|
cachedBounds: h,
|
|
227
230
|
containerScrollOffset: 0,
|
|
228
231
|
containerSize: p,
|
|
@@ -233,7 +236,7 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
233
236
|
startIndexOverscan: Math.min(a - 1, _.startIndexOverscan),
|
|
234
237
|
stopIndexVisible: Math.min(a - 1, _.stopIndexVisible),
|
|
235
238
|
stopIndexOverscan: Math.min(a - 1, _.stopIndexOverscan)
|
|
236
|
-
}, C =
|
|
239
|
+
}, C = P(() => xe({
|
|
237
240
|
cachedBounds: h,
|
|
238
241
|
itemCount: a,
|
|
239
242
|
itemSize: m
|
|
@@ -241,9 +244,9 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
241
244
|
h,
|
|
242
245
|
a,
|
|
243
246
|
m
|
|
244
|
-
]), w =
|
|
247
|
+
]), w = P((t) => Ce({
|
|
245
248
|
cachedBounds: h,
|
|
246
|
-
containerScrollOffset:
|
|
249
|
+
containerScrollOffset: be({
|
|
247
250
|
containerElement: e,
|
|
248
251
|
direction: r,
|
|
249
252
|
isRtl: i,
|
|
@@ -271,9 +274,9 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
271
274
|
if (!e) return;
|
|
272
275
|
let t = () => {
|
|
273
276
|
v((t) => {
|
|
274
|
-
let { scrollLeft: n, scrollTop: o } = e, s =
|
|
277
|
+
let { scrollLeft: n, scrollTop: o } = e, s = Ce({
|
|
275
278
|
cachedBounds: h,
|
|
276
|
-
containerScrollOffset:
|
|
279
|
+
containerScrollOffset: be({
|
|
277
280
|
containerElement: e,
|
|
278
281
|
direction: r,
|
|
279
282
|
isRtl: i,
|
|
@@ -299,8 +302,8 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
299
302
|
]), {
|
|
300
303
|
getCellBounds: g,
|
|
301
304
|
getEstimatedSize: C,
|
|
302
|
-
scrollToIndex:
|
|
303
|
-
let s =
|
|
305
|
+
scrollToIndex: ve(({ align: t = "auto", containerScrollOffset: n, index: o }) => {
|
|
306
|
+
let s = Se({
|
|
304
307
|
align: t,
|
|
305
308
|
cachedBounds: h,
|
|
306
309
|
containerScrollOffset: n,
|
|
@@ -310,7 +313,7 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
310
313
|
itemSize: m
|
|
311
314
|
});
|
|
312
315
|
if (e) {
|
|
313
|
-
if (s =
|
|
316
|
+
if (s = be({
|
|
314
317
|
containerElement: e,
|
|
315
318
|
direction: r,
|
|
316
319
|
isRtl: i,
|
|
@@ -328,26 +331,26 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
328
331
|
stopIndexVisible: x
|
|
329
332
|
};
|
|
330
333
|
}
|
|
331
|
-
function
|
|
332
|
-
return
|
|
334
|
+
function Oe(e) {
|
|
335
|
+
return I(() => e, Object.values(e));
|
|
333
336
|
}
|
|
334
|
-
function
|
|
337
|
+
function ke(e, t) {
|
|
335
338
|
let { ariaAttributes: n, style: r, ...i } = e, { ariaAttributes: a, style: o, ...s } = t;
|
|
336
339
|
return J(n, a) && J(r, o) && J(i, s);
|
|
337
340
|
}
|
|
338
|
-
function
|
|
341
|
+
function Ae(e) {
|
|
339
342
|
return typeof e == "object" && !!e && "getAverageRowHeight" in e && typeof e.getAverageRowHeight == "function";
|
|
340
343
|
}
|
|
341
|
-
var
|
|
342
|
-
function
|
|
343
|
-
let m =
|
|
344
|
+
var je = "data-react-window-index";
|
|
345
|
+
function Me({ children: e, className: t, defaultHeight: n = 0, listRef: r, onResize: i, onRowsRendered: a, overscanCount: o = 3, rowComponent: s, rowCount: c, rowHeight: l, rowProps: u, tagName: d = "div", style: f, ...p }) {
|
|
346
|
+
let m = Oe(u), h = I(() => N(s, ke), [s]), [g, _] = R(null), v = Ae(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = De({
|
|
344
347
|
containerElement: g,
|
|
345
348
|
containerStyle: f,
|
|
346
349
|
defaultContainerSize: n,
|
|
347
350
|
direction: "vertical",
|
|
348
351
|
itemCount: c,
|
|
349
352
|
itemProps: m,
|
|
350
|
-
itemSize:
|
|
353
|
+
itemSize: I(() => v ? (e) => l.getRowHeight(e) ?? l.getAverageRowHeight() : l, [v, l]),
|
|
351
354
|
onResize: i,
|
|
352
355
|
overscanCount: o
|
|
353
356
|
});
|
|
@@ -371,7 +374,7 @@ function Ne({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
|
|
|
371
374
|
let e = Array.from(g.children).filter((e, t) => {
|
|
372
375
|
if (e.hasAttribute("aria-hidden")) return !1;
|
|
373
376
|
let n = `${S + t}`;
|
|
374
|
-
return e.setAttribute(
|
|
377
|
+
return e.setAttribute(je, n), !0;
|
|
375
378
|
});
|
|
376
379
|
if (v) return l.observeRowElements(e);
|
|
377
380
|
}, [
|
|
@@ -380,7 +383,7 @@ function Ne({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
|
|
|
380
383
|
l,
|
|
381
384
|
S,
|
|
382
385
|
w
|
|
383
|
-
]),
|
|
386
|
+
]), F(() => {
|
|
384
387
|
S >= 0 && w >= 0 && a && a({
|
|
385
388
|
startIndex: C,
|
|
386
389
|
stopIndex: T
|
|
@@ -395,7 +398,7 @@ function Ne({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
|
|
|
395
398
|
w,
|
|
396
399
|
T
|
|
397
400
|
]);
|
|
398
|
-
let E =
|
|
401
|
+
let E = I(() => {
|
|
399
402
|
let e = [];
|
|
400
403
|
if (c > 0) for (let t = S; t <= w; t++) {
|
|
401
404
|
let n = y(t);
|
|
@@ -426,7 +429,7 @@ function Ne({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
|
|
|
426
429
|
m,
|
|
427
430
|
S,
|
|
428
431
|
w
|
|
429
|
-
]), D = /* @__PURE__ */
|
|
432
|
+
]), D = /* @__PURE__ */ z("div", {
|
|
430
433
|
"aria-hidden": !0,
|
|
431
434
|
style: {
|
|
432
435
|
height: b(),
|
|
@@ -450,37 +453,37 @@ function Ne({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
|
|
|
450
453
|
}
|
|
451
454
|
//#endregion
|
|
452
455
|
//#region src/types/virtual-row.ts
|
|
453
|
-
var
|
|
456
|
+
var Y = /* @__PURE__ */ function(e) {
|
|
454
457
|
return e.Header = "header", e.Item = "item", e;
|
|
455
|
-
}({}),
|
|
458
|
+
}({}), Ne = (e) => `${60 + e * 23 % 35}%`, Pe = (e, t) => e ? t ? "pe-9" : "pe-2 group-focus-within/conversation:pe-9 group-hover/conversation:pe-9" : "pe-3", Fe = (e, t) => t.rows[e].kind === Y.Item ? 36 : e === 0 ? 24 : 56, Ie = (e) => {
|
|
456
459
|
switch (e) {
|
|
457
460
|
case n.Shared: return n.Shared;
|
|
458
461
|
case n.Organization: return n.Organization;
|
|
459
462
|
default: return n.MyChats;
|
|
460
463
|
}
|
|
461
|
-
},
|
|
464
|
+
}, Le = (e, t) => {
|
|
462
465
|
let n = null;
|
|
463
|
-
for (let r of e) if (r.kind ===
|
|
466
|
+
for (let r of e) if (r.kind === Y.Header) n = r.groupKey;
|
|
464
467
|
else if (r.item.id === t) return n;
|
|
465
468
|
return null;
|
|
466
|
-
},
|
|
469
|
+
}, Re = (e, t, r) => {
|
|
467
470
|
let i = /* @__PURE__ */ new Set();
|
|
468
471
|
if (t != null && i.add(t), t === n.Pinned) {
|
|
469
472
|
let t = r.find((t) => t.id === e);
|
|
470
|
-
t && i.add(
|
|
473
|
+
t && i.add(Ie(t.source));
|
|
471
474
|
} else i.add(n.Pinned);
|
|
472
475
|
return i;
|
|
473
|
-
},
|
|
476
|
+
}, ze = (e, t, n, r) => {
|
|
474
477
|
let i = e.currentTarget.getBoundingClientRect();
|
|
475
478
|
if (e.clientY >= i.top + i.height / 2) return t;
|
|
476
479
|
let a = null, o = !1;
|
|
477
|
-
for (let e of n) if (e.kind ===
|
|
480
|
+
for (let e of n) if (e.kind === Y.Header) o = e.groupKey === r;
|
|
478
481
|
else if (o) {
|
|
479
482
|
if (e.item.id === t) return a;
|
|
480
483
|
a = e.item.id;
|
|
481
484
|
}
|
|
482
485
|
return null;
|
|
483
|
-
},
|
|
486
|
+
}, Be = [
|
|
484
487
|
{
|
|
485
488
|
value: n.All,
|
|
486
489
|
labelKey: "all"
|
|
@@ -497,54 +500,49 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
497
500
|
value: n.Organization,
|
|
498
501
|
labelKey: "organization"
|
|
499
502
|
}
|
|
500
|
-
],
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
}, i))
|
|
513
|
-
});
|
|
514
|
-
}), Ue = { button: "_button_1vksy_1" }, We = P(({ label: e, onClick: t, labelClassName: n = "dial-small-semi-text", colors: i }) => /* @__PURE__ */ B("div", {
|
|
503
|
+
], Ve = N(({ activeTab: e, labels: t, onChange: n, tabClassName: r = "dial-tiny-semi-text", hiddenSources: i }) => /* @__PURE__ */ z(x, {
|
|
504
|
+
items: I(() => Be.filter(({ value: e }) => !i?.includes(e)).map(({ value: e, labelKey: n }) => ({
|
|
505
|
+
value: e,
|
|
506
|
+
label: t[n]
|
|
507
|
+
})), [t, i]),
|
|
508
|
+
value: e,
|
|
509
|
+
onChange: n,
|
|
510
|
+
stretch: !0,
|
|
511
|
+
"aria-label": t.groupAriaLabel ?? "Filter chats",
|
|
512
|
+
className: "px-3 py-2",
|
|
513
|
+
chipClassName: M("!px-2", r)
|
|
514
|
+
})), He = { button: "_button_1pnt8_1" }, Ue = N(({ label: e, onClick: t, labelClassName: n = "dial-small-semi-text", colors: i, className: o }) => /* @__PURE__ */ z("div", {
|
|
515
515
|
className: "px-3 py-2",
|
|
516
516
|
style: r({
|
|
517
517
|
"--cp-new-chat-bg": i?.background,
|
|
518
518
|
"--cp-new-chat-text": i?.text,
|
|
519
519
|
"--cp-new-chat-focus-outline": i?.focusOutline
|
|
520
520
|
}),
|
|
521
|
-
children: /* @__PURE__ */
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
children: [/* @__PURE__ */ B(he, {
|
|
521
|
+
children: /* @__PURE__ */ z(f, {
|
|
522
|
+
label: e,
|
|
523
|
+
textClassName: n,
|
|
524
|
+
iconBefore: /* @__PURE__ */ z(pe, {
|
|
526
525
|
size: 18,
|
|
527
526
|
stroke: _,
|
|
528
|
-
className: "shrink-0"
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
527
|
+
className: "shrink-0",
|
|
528
|
+
"aria-hidden": !0
|
|
529
|
+
}),
|
|
530
|
+
onClick: t,
|
|
531
|
+
className: a("h-[36px] w-full gap-2 px-3 py-1 shadow-chat-button hover:shadow-xs focus-visible:shadow-xs active:shadow-xs", He.button, o, he.newChatButton)
|
|
533
532
|
})
|
|
534
|
-
})),
|
|
533
|
+
})), X = {
|
|
535
534
|
skeletonColor: "var(--cp-skeleton-color, var(--bg-control-disable-primary, #dce0e8))",
|
|
536
|
-
item: "
|
|
537
|
-
itemActive: "
|
|
538
|
-
groupHeader: "
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
}, Q = ({ label: e, isExpanded: t, onToggle: n, listId: r, className: i = "dial-tiny-lead-text", dropZoneGroupKey: o, isDragOver: s, onDragOver: c, onDragLeave: l, onDrop: u }) => {
|
|
535
|
+
item: "_item_j0zft_2",
|
|
536
|
+
itemActive: "_itemActive_j0zft_15",
|
|
537
|
+
groupHeader: "_groupHeader_j0zft_20",
|
|
538
|
+
dropZoneActive: "_dropZoneActive_j0zft_24",
|
|
539
|
+
triggerActive: "_triggerActive_j0zft_29",
|
|
540
|
+
triggerIcon: "_triggerIcon_j0zft_32",
|
|
541
|
+
unreadDot: "_unreadDot_j0zft_40",
|
|
542
|
+
search: "_search_j0zft_48"
|
|
543
|
+
}, Z = ({ label: e, isExpanded: t, onToggle: n, listId: r, className: i = "dial-tiny-lead-text", dropZoneGroupKey: o, isDragOver: s, onDragOver: c, onDragLeave: l, onDrop: u }) => {
|
|
546
544
|
let d = o != null;
|
|
547
|
-
return /* @__PURE__ */
|
|
545
|
+
return /* @__PURE__ */ B("button", {
|
|
548
546
|
type: "button",
|
|
549
547
|
"aria-expanded": t,
|
|
550
548
|
"aria-controls": r,
|
|
@@ -558,126 +556,119 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
558
556
|
onDrop: d ? (e) => {
|
|
559
557
|
d && (e.preventDefault(), u?.(o, o, null));
|
|
560
558
|
} : void 0,
|
|
561
|
-
className: a("flex h-6 w-full items-center gap-1 rounded py-1 pe-3 text-start", i,
|
|
562
|
-
children: [t ? /* @__PURE__ */
|
|
559
|
+
className: a("group flex h-6 w-full items-center gap-1 rounded py-1 pe-3 text-start", i, X.groupHeader, s && X.dropZoneActive),
|
|
560
|
+
children: [t ? /* @__PURE__ */ z(V, {
|
|
563
561
|
size: 12,
|
|
564
|
-
className: "shrink-0",
|
|
562
|
+
className: "shrink-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-visible:opacity-100",
|
|
565
563
|
"aria-hidden": !0
|
|
566
|
-
}) : /* @__PURE__ */
|
|
564
|
+
}) : /* @__PURE__ */ z(se, {
|
|
567
565
|
size: 12,
|
|
568
|
-
className: "shrink-0 rtl:scale-x-[-1]",
|
|
566
|
+
className: "shrink-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-visible:opacity-100 rtl:scale-x-[-1]",
|
|
569
567
|
"aria-hidden": !0
|
|
570
|
-
}), /* @__PURE__ */
|
|
568
|
+
}), /* @__PURE__ */ z(b, { text: e })]
|
|
571
569
|
});
|
|
572
|
-
},
|
|
573
|
-
let [
|
|
574
|
-
|
|
575
|
-
}, [e, s]),
|
|
570
|
+
}, We = ({ item: e, isActive: n, onSelectConversation: r, searchQuery: i = "", getActions: o, onActionMenuOpen: s, actionsLabel: c = "More actions", itemTitleClassName: l = "dial-small-text", itemIconBadgeClassName: u, unreadIndicatorLabel: d = "Unread", rowGroupKey: p, rows: m, draggingId: h, dragOverId: b, allowedDropGroups: x, onDragStart: w, onDragEnd: T, onDragOver: E, onDragLeave: D, onDrop: O }) => {
|
|
571
|
+
let [A, j] = R(!1), M = L(null), te = P((t) => {
|
|
572
|
+
j(t), t && M.current && s?.(e, M.current);
|
|
573
|
+
}, [e, s]), N = o?.(e) ?? [], F = N.length > 0, ne = e.leadingIcon ? /* @__PURE__ */ z("span", {
|
|
574
|
+
className: "flex size-6 shrink-0 items-center justify-center",
|
|
575
|
+
children: e.leadingIcon
|
|
576
|
+
}) : e.isIconLoading ? /* @__PURE__ */ z(ee, {
|
|
576
577
|
variant: k.Circular,
|
|
577
578
|
width: g.LG,
|
|
578
579
|
height: g.LG,
|
|
579
|
-
color:
|
|
580
|
+
color: X.skeletonColor,
|
|
580
581
|
"aria-hidden": !0
|
|
581
|
-
}) : /* @__PURE__ */
|
|
582
|
+
}) : /* @__PURE__ */ z(t, {
|
|
582
583
|
src: e.iconUrl,
|
|
583
584
|
size: g.LG,
|
|
584
585
|
initialsName: e.iconTooltip ?? "",
|
|
585
586
|
labels: { tooltip: e.iconTooltip },
|
|
586
587
|
styles: { badgeClassName: u }
|
|
587
|
-
}), re = /* @__PURE__ */
|
|
588
|
-
className: "flex shrink-0 items-center",
|
|
589
|
-
children: [/* @__PURE__ */
|
|
590
|
-
className: "
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
className: a("flex h-5 shrink-0 items-center justify-center gap-0.5 rounded-full border pe-2 ps-1", Z.taskBadge, d),
|
|
601
|
-
children: [/* @__PURE__ */ B(de, {
|
|
602
|
-
size: 12,
|
|
603
|
-
"aria-hidden": !0,
|
|
604
|
-
stroke: _
|
|
605
|
-
}), e.taskBadgeLabel]
|
|
606
|
-
}) : void 0, H = m != null, oe = F((e) => {
|
|
607
|
-
e.currentTarget.contains(e.relatedTarget) || A?.();
|
|
608
|
-
}, [A]), se = F((t) => {
|
|
609
|
-
if (!m || !h || !j) return;
|
|
588
|
+
}), re = Pe(F, A), ie = e.isUnread ? /* @__PURE__ */ B("span", {
|
|
589
|
+
className: "flex size-6 shrink-0 items-center justify-center",
|
|
590
|
+
children: [/* @__PURE__ */ z("span", {
|
|
591
|
+
className: a("size-[7.11px] rounded-full", X.unreadDot, F && (A ? "opacity-0" : "group-focus-within/conversation:opacity-0 group-hover/conversation:opacity-0")),
|
|
592
|
+
"aria-hidden": !0
|
|
593
|
+
}), /* @__PURE__ */ z("span", {
|
|
594
|
+
className: "sr-only",
|
|
595
|
+
children: d
|
|
596
|
+
})]
|
|
597
|
+
}) : void 0, I = p != null, ae = P((e) => {
|
|
598
|
+
e.currentTarget.contains(e.relatedTarget) || D?.();
|
|
599
|
+
}, [D]), oe = P((t) => {
|
|
600
|
+
if (!p || !m || !O) return;
|
|
610
601
|
t.preventDefault();
|
|
611
|
-
let n =
|
|
612
|
-
|
|
602
|
+
let n = ze(t, e.id, m, p);
|
|
603
|
+
O(e.id, p, n);
|
|
613
604
|
}, [
|
|
614
605
|
e.id,
|
|
615
|
-
h,
|
|
616
606
|
m,
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
607
|
+
p,
|
|
608
|
+
O
|
|
609
|
+
]), V = e.id === h, se = e.id === b, ce = p != null && (x?.has(p) ?? !1), H = h != null;
|
|
610
|
+
return /* @__PURE__ */ B("li", {
|
|
611
|
+
className: a("group/conversation relative", V && "cursor-grabbing opacity-50", se && ce && "rounded", se && ce && X.dropZoneActive, H && !V && !ce && "cursor-not-allowed"),
|
|
612
|
+
draggable: I || void 0,
|
|
613
|
+
onDragStart: I ? () => w?.(e.id) : void 0,
|
|
614
|
+
onDragEnd: I ? T : void 0,
|
|
615
|
+
onDragOver: I ? (t) => {
|
|
616
|
+
t.preventDefault(), E?.(e.id);
|
|
626
617
|
} : void 0,
|
|
627
|
-
onDragLeave:
|
|
628
|
-
onDrop:
|
|
629
|
-
children: [/* @__PURE__ */
|
|
618
|
+
onDragLeave: I ? ae : void 0,
|
|
619
|
+
onDrop: I ? oe : void 0,
|
|
620
|
+
children: [/* @__PURE__ */ z("a", {
|
|
630
621
|
href: e.href,
|
|
631
622
|
className: "contents",
|
|
632
623
|
onClick: (t) => {
|
|
633
624
|
e.href && (t.preventDefault(), r(e.id));
|
|
634
625
|
},
|
|
635
|
-
children: /* @__PURE__ */
|
|
636
|
-
iconBefore:
|
|
637
|
-
label: /* @__PURE__ */
|
|
626
|
+
children: /* @__PURE__ */ z(f, {
|
|
627
|
+
iconBefore: ne,
|
|
628
|
+
label: /* @__PURE__ */ z(C, {
|
|
638
629
|
text: e.title,
|
|
639
630
|
query: i,
|
|
640
|
-
className: l,
|
|
631
|
+
className: e.isUnread ? "dial-small-semi-text" : l,
|
|
641
632
|
maxLines: 1
|
|
642
633
|
}),
|
|
643
|
-
iconAfter:
|
|
634
|
+
iconAfter: ie,
|
|
644
635
|
textClassName: "min-w-0 flex-1",
|
|
645
636
|
"aria-current": n ? "page" : void 0,
|
|
646
637
|
onClick: e.href ? void 0 : () => r(e.id),
|
|
647
638
|
tabIndex: e.href ? -1 : void 0,
|
|
648
|
-
className: a("h-8 w-full justify-start gap-2 py-2 ps-
|
|
639
|
+
className: a("h-8 w-full justify-start gap-2 py-2 ps-3 after:pointer-events-none", re, X.item, n && X.itemActive, A && X.itemActive)
|
|
649
640
|
})
|
|
650
|
-
}),
|
|
651
|
-
className: a("absolute inset-y-0 end-1 flex items-center",
|
|
652
|
-
children: /* @__PURE__ */
|
|
653
|
-
items:
|
|
641
|
+
}), F && /* @__PURE__ */ z("div", {
|
|
642
|
+
className: a("absolute inset-y-0 end-1 flex items-center", A ? "opacity-100" : "opacity-0 group-focus-within/conversation:opacity-100 group-hover/conversation:opacity-100"),
|
|
643
|
+
children: /* @__PURE__ */ z(v, {
|
|
644
|
+
items: N,
|
|
654
645
|
onOpenChange: te,
|
|
655
646
|
matchReferenceWidth: !1,
|
|
656
647
|
listClassName: "w-[200px]",
|
|
657
|
-
children: /* @__PURE__ */
|
|
658
|
-
ref:
|
|
659
|
-
icon: /* @__PURE__ */
|
|
648
|
+
children: /* @__PURE__ */ z(S, {
|
|
649
|
+
ref: M,
|
|
650
|
+
icon: /* @__PURE__ */ z(ue, {
|
|
660
651
|
size: g.SM,
|
|
661
|
-
className:
|
|
652
|
+
className: X.triggerIcon,
|
|
662
653
|
"aria-hidden": !0,
|
|
663
654
|
stroke: _
|
|
664
655
|
}),
|
|
665
656
|
size: y.Small,
|
|
666
657
|
"aria-label": c,
|
|
667
|
-
className: a(
|
|
658
|
+
className: a(A && X.triggerActive)
|
|
668
659
|
})
|
|
669
660
|
})
|
|
670
661
|
})]
|
|
671
662
|
});
|
|
672
|
-
},
|
|
663
|
+
}, Ge = ({ index: e, style: t, rows: r, expandedGroups: i, onToggleGroup: a, listId: o, activeConversationId: s, searchQuery: c, onSelectConversation: l, getActions: u, onActionMenuOpen: d, actionsLabel: f, unreadIndicatorLabel: p, styles: m, draggingId: h, dragOverId: g, allowedDropGroups: _, onDragStart: v, onDragEnd: y, onDragOver: b, onDragLeave: x, onDrop: S }) => {
|
|
673
664
|
let C = r[e];
|
|
674
|
-
if (C.kind ===
|
|
665
|
+
if (C.kind === Y.Header) {
|
|
675
666
|
let r = C.groupKey === n.Pinned;
|
|
676
|
-
return /* @__PURE__ */
|
|
667
|
+
return /* @__PURE__ */ z("div", {
|
|
677
668
|
role: "presentation",
|
|
678
669
|
style: t,
|
|
679
670
|
className: e === 0 ? "pt-0" : "pt-8",
|
|
680
|
-
children: /* @__PURE__ */
|
|
671
|
+
children: /* @__PURE__ */ z(Z, {
|
|
681
672
|
label: C.label,
|
|
682
673
|
isExpanded: i.has(C.groupKey),
|
|
683
674
|
onToggle: () => a(C.groupKey),
|
|
@@ -691,11 +682,11 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
691
682
|
})
|
|
692
683
|
});
|
|
693
684
|
}
|
|
694
|
-
return /* @__PURE__ */
|
|
685
|
+
return /* @__PURE__ */ z("div", {
|
|
695
686
|
role: "presentation",
|
|
696
687
|
style: t,
|
|
697
688
|
className: "pt-1",
|
|
698
|
-
children: /* @__PURE__ */
|
|
689
|
+
children: /* @__PURE__ */ z(We, {
|
|
699
690
|
item: C.item,
|
|
700
691
|
isActive: C.item.id === s,
|
|
701
692
|
searchQuery: c,
|
|
@@ -706,7 +697,6 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
706
697
|
unreadIndicatorLabel: p,
|
|
707
698
|
itemTitleClassName: m?.itemTitleClassName,
|
|
708
699
|
itemIconBadgeClassName: m?.itemIconBadgeClassName,
|
|
709
|
-
taskBadgeClassName: m?.taskBadgeClassName,
|
|
710
700
|
rowGroupKey: C.groupKey,
|
|
711
701
|
rows: r,
|
|
712
702
|
draggingId: h,
|
|
@@ -719,177 +709,172 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
719
709
|
onDrop: S
|
|
720
710
|
})
|
|
721
711
|
});
|
|
722
|
-
},
|
|
712
|
+
}, Ke = (e, t) => t === n.All ? !0 : e.source === t, qe = (e, t) => t ? e.title.toLowerCase().includes(t.toLowerCase()) : !0, Je = new Set([
|
|
723
713
|
n.Pinned,
|
|
724
714
|
n.MyChats,
|
|
725
715
|
n.Shared,
|
|
726
716
|
n.Organization
|
|
727
|
-
]),
|
|
728
|
-
let { colors: E, typography:
|
|
729
|
-
|
|
730
|
-
S != null &&
|
|
717
|
+
]), Ye = N(({ conversations: e, isLoading: t, isOpen: i, onSelectConversation: o, activeConversationId: s, labels: f, onNewChat: p, styles: m, className: h, isOverlay: g = !1, getActions: _, onActionMenuOpen: v, onToggle: y, headerActions: b, onMoveConversation: x, activeFilter: S, onActiveFilterChange: C, isFilterTabsHidden: w = !1, hiddenSources: T }) => {
|
|
718
|
+
let { colors: E, typography: D, newChatButton: k, searchWrapperClassName: A, headerClassName: j, headerActionsClassName: M, newChatButtonClassName: te } = m ?? {}, { title: N, emptyLabel: re, noResultsLabel: ie, loadingLabel: ae = "Loading conversations", newChatLabel: oe, searchPlaceholder: V, searchClearLabel: se, filterLabels: ce, groupLabels: H, actionsLabel: le, unreadIndicatorLabel: ue, closeAriaLabel: de } = f, [U, fe] = R(""), [pe, me] = R(n.All);
|
|
719
|
+
F(() => {
|
|
720
|
+
S != null && me(S);
|
|
731
721
|
}, [S]);
|
|
732
|
-
let W =
|
|
733
|
-
|
|
734
|
-
}, []),
|
|
735
|
-
|
|
736
|
-
}, []),
|
|
737
|
-
|
|
722
|
+
let W = I(() => T?.length ? e.filter((e) => e.source == null || !T.includes(e.source)) : e, [e, T]), [G, ge] = R(() => Je), [_e, ve] = R(5), K = ne(), ye = L(null), be = L(null), [q, J] = R(null), [xe, Se] = R(null), [Ce, we] = R(null), Te = L(null), Ee = L(null), De = P(({ height: e }) => {
|
|
723
|
+
ve(Math.ceil(e / 36 * 2));
|
|
724
|
+
}, []), Oe = P((e) => {
|
|
725
|
+
fe(e ?? "");
|
|
726
|
+
}, []), ke = P((e) => {
|
|
727
|
+
ge((t) => {
|
|
738
728
|
let n = new Set(t);
|
|
739
729
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
740
730
|
});
|
|
741
|
-
}, []),
|
|
742
|
-
|
|
743
|
-
}, []),
|
|
744
|
-
let n =
|
|
745
|
-
|
|
746
|
-
}, [W]),
|
|
747
|
-
|
|
748
|
-
}, [
|
|
749
|
-
|
|
750
|
-
}, []),
|
|
751
|
-
|
|
752
|
-
}, []),
|
|
753
|
-
let r =
|
|
754
|
-
|
|
731
|
+
}, []), Ae = P(() => {
|
|
732
|
+
Te.current = null, Ee.current = null, J(null), Se(null), we(null);
|
|
733
|
+
}, []), je = P((e, t) => {
|
|
734
|
+
let n = Re(e, Le(t, e), W);
|
|
735
|
+
Te.current = e, Ee.current = n, J(e), we(n);
|
|
736
|
+
}, [W]), Pe = P(() => {
|
|
737
|
+
Ae();
|
|
738
|
+
}, [Ae]), Ie = P((e) => {
|
|
739
|
+
Se(e);
|
|
740
|
+
}, []), ze = P(() => {
|
|
741
|
+
Se(null);
|
|
742
|
+
}, []), Be = P((e, t, n) => {
|
|
743
|
+
let r = Te.current, i = Ee.current;
|
|
744
|
+
Ae(), r != null && r !== e && i?.has(t) && x?.({
|
|
755
745
|
draggedId: r,
|
|
756
746
|
targetGroupKey: t,
|
|
757
747
|
afterId: n
|
|
758
748
|
});
|
|
759
|
-
}, [
|
|
749
|
+
}, [Ae, x]), He = r({
|
|
760
750
|
"--cp-item-hover": E?.itemHover,
|
|
761
751
|
"--cp-item-active": E?.itemActive,
|
|
762
752
|
"--cp-text": E?.text,
|
|
763
753
|
"--cp-text-secondary": E?.textSecondary,
|
|
764
|
-
"--cp-new-chat-bg":
|
|
765
|
-
"--cp-new-chat-text":
|
|
766
|
-
"--cp-new-chat-focus-outline":
|
|
754
|
+
"--cp-new-chat-bg": k?.background,
|
|
755
|
+
"--cp-new-chat-text": k?.text,
|
|
756
|
+
"--cp-new-chat-focus-outline": k?.focusOutline,
|
|
767
757
|
"--cp-drop-zone-ring": E?.dropZoneRing,
|
|
768
758
|
"--cp-trigger-bg": E?.triggerBackground,
|
|
769
759
|
"--cp-trigger-icon": E?.triggerIcon,
|
|
770
760
|
"--cp-trigger-icon-idle": E?.triggerIconIdle,
|
|
771
761
|
"--cp-skeleton-color": E?.skeletonColor,
|
|
772
|
-
"--cp-task-badge-border": E?.taskBadgeBorder,
|
|
773
|
-
"--cp-task-badge-bg": E?.taskBadgeBackground,
|
|
774
|
-
"--cp-task-badge-text": E?.taskBadgeText,
|
|
775
762
|
"--cp-unread-dot": E?.unreadDot
|
|
776
|
-
}),
|
|
763
|
+
}), Z = I(() => W.filter((e) => Ke(e, pe) && qe(e, U)), [
|
|
777
764
|
W,
|
|
778
|
-
|
|
765
|
+
pe,
|
|
779
766
|
U
|
|
780
|
-
]),
|
|
767
|
+
]), We = I(() => Z.filter((e) => e.isPinned), [Z]), Ye = I(() => Z.filter((e) => !e.isPinned && e.source !== n.Shared && e.source !== n.Organization), [Z]), Xe = I(() => Z.filter((e) => !e.isPinned && e.source === n.Shared), [Z]), Ze = I(() => Z.filter((e) => !e.isPinned && e.source === n.Organization), [Z]), Q = I(() => [
|
|
781
768
|
{
|
|
782
769
|
key: n.Pinned,
|
|
783
770
|
label: H?.pinned ?? "Pinned",
|
|
784
|
-
items:
|
|
771
|
+
items: We
|
|
785
772
|
},
|
|
786
773
|
{
|
|
787
774
|
key: n.MyChats,
|
|
788
775
|
label: H?.myChats ?? "My chats",
|
|
789
|
-
items:
|
|
776
|
+
items: Ye
|
|
790
777
|
},
|
|
791
778
|
{
|
|
792
779
|
key: n.Shared,
|
|
793
780
|
label: H?.shared ?? "Shared",
|
|
794
|
-
items:
|
|
781
|
+
items: Xe
|
|
795
782
|
},
|
|
796
783
|
{
|
|
797
784
|
key: n.Organization,
|
|
798
785
|
label: H?.organization ?? "Organization",
|
|
799
|
-
items:
|
|
786
|
+
items: Ze
|
|
800
787
|
}
|
|
801
788
|
], [
|
|
802
789
|
H,
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
]),
|
|
790
|
+
We,
|
|
791
|
+
Ye,
|
|
792
|
+
Xe,
|
|
793
|
+
Ze
|
|
794
|
+
]), $ = I(() => {
|
|
808
795
|
let e = [];
|
|
809
|
-
for (let t of
|
|
810
|
-
kind:
|
|
796
|
+
for (let t of Q) if (t.items.length !== 0 && (e.push({
|
|
797
|
+
kind: Y.Header,
|
|
811
798
|
groupKey: t.key,
|
|
812
799
|
label: t.label
|
|
813
|
-
}),
|
|
814
|
-
kind:
|
|
800
|
+
}), G.has(t.key))) for (let n of t.items) e.push({
|
|
801
|
+
kind: Y.Item,
|
|
815
802
|
item: n,
|
|
816
803
|
groupKey: t.key
|
|
817
804
|
});
|
|
818
805
|
return e;
|
|
819
|
-
}, [
|
|
820
|
-
|
|
821
|
-
if (!s ||
|
|
822
|
-
let e =
|
|
823
|
-
e >= 0 && (
|
|
806
|
+
}, [Q, G]);
|
|
807
|
+
F(() => {
|
|
808
|
+
if (!s || be.current === s) return;
|
|
809
|
+
let e = $.findIndex((e) => e.kind === Y.Item && e.item.id === s);
|
|
810
|
+
e >= 0 && (ye.current?.scrollToRow({
|
|
824
811
|
index: e,
|
|
825
812
|
align: "smart",
|
|
826
813
|
behavior: "smooth"
|
|
827
|
-
}),
|
|
814
|
+
}), be.current = s);
|
|
828
815
|
}, [
|
|
829
816
|
s,
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
817
|
+
Q,
|
|
818
|
+
G,
|
|
819
|
+
$
|
|
833
820
|
]);
|
|
834
|
-
let
|
|
835
|
-
rows:
|
|
836
|
-
expandedGroups:
|
|
837
|
-
onToggleGroup:
|
|
838
|
-
listId:
|
|
821
|
+
let Qe = I(() => ({
|
|
822
|
+
rows: $,
|
|
823
|
+
expandedGroups: G,
|
|
824
|
+
onToggleGroup: ke,
|
|
825
|
+
listId: K,
|
|
839
826
|
activeConversationId: s,
|
|
840
827
|
searchQuery: U,
|
|
841
828
|
onSelectConversation: o,
|
|
842
829
|
getActions: _,
|
|
843
830
|
onActionMenuOpen: v,
|
|
844
|
-
actionsLabel:
|
|
845
|
-
unreadIndicatorLabel:
|
|
831
|
+
actionsLabel: le,
|
|
832
|
+
unreadIndicatorLabel: ue,
|
|
846
833
|
styles: {
|
|
847
|
-
groupHeaderClassName:
|
|
848
|
-
itemTitleClassName:
|
|
849
|
-
itemIconBadgeClassName: m?.itemIconBadgeClassName
|
|
850
|
-
taskBadgeClassName: m?.taskBadgeClassName
|
|
834
|
+
groupHeaderClassName: D?.groupHeaderClassName,
|
|
835
|
+
itemTitleClassName: D?.itemTitleClassName,
|
|
836
|
+
itemIconBadgeClassName: m?.itemIconBadgeClassName
|
|
851
837
|
},
|
|
852
|
-
draggingId:
|
|
853
|
-
dragOverId:
|
|
854
|
-
allowedDropGroups:
|
|
855
|
-
onDragStart: (e) =>
|
|
856
|
-
onDragEnd:
|
|
857
|
-
onDragOver:
|
|
858
|
-
onDragLeave:
|
|
859
|
-
onDrop:
|
|
838
|
+
draggingId: q,
|
|
839
|
+
dragOverId: xe,
|
|
840
|
+
allowedDropGroups: Ce,
|
|
841
|
+
onDragStart: (e) => je(e, $),
|
|
842
|
+
onDragEnd: Pe,
|
|
843
|
+
onDragOver: Ie,
|
|
844
|
+
onDragLeave: ze,
|
|
845
|
+
onDrop: Be
|
|
860
846
|
}), [
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
847
|
+
$,
|
|
848
|
+
G,
|
|
849
|
+
ke,
|
|
850
|
+
K,
|
|
865
851
|
s,
|
|
866
852
|
U,
|
|
867
853
|
o,
|
|
868
854
|
_,
|
|
869
855
|
v,
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
856
|
+
le,
|
|
857
|
+
ue,
|
|
858
|
+
D?.groupHeaderClassName,
|
|
859
|
+
D?.itemTitleClassName,
|
|
874
860
|
m?.itemIconBadgeClassName,
|
|
875
|
-
|
|
876
|
-
ve,
|
|
877
|
-
be,
|
|
861
|
+
q,
|
|
878
862
|
xe,
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
863
|
+
Ce,
|
|
864
|
+
je,
|
|
865
|
+
Pe,
|
|
866
|
+
Ie,
|
|
867
|
+
ze,
|
|
868
|
+
Be
|
|
869
|
+
]), $e = W.length === 0, et = W.length > 0 && Z.length === 0;
|
|
870
|
+
return /* @__PURE__ */ B(d, {
|
|
886
871
|
isOpen: i,
|
|
887
872
|
isOverlay: g,
|
|
888
873
|
orientation: u.Left,
|
|
889
|
-
title:
|
|
874
|
+
title: N,
|
|
890
875
|
labels: {
|
|
891
|
-
ariaLabel:
|
|
892
|
-
closeLabel:
|
|
876
|
+
ariaLabel: N,
|
|
877
|
+
closeLabel: de
|
|
893
878
|
},
|
|
894
879
|
onClose: y,
|
|
895
880
|
styles: {
|
|
@@ -897,75 +882,77 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
897
882
|
background: E?.background,
|
|
898
883
|
border: E?.border
|
|
899
884
|
},
|
|
900
|
-
typography: { fontClassName:
|
|
885
|
+
typography: { fontClassName: D?.fontClassName },
|
|
901
886
|
bodyClassName: "flex flex-col overflow-hidden p-0 gap-3",
|
|
902
|
-
cssVars:
|
|
903
|
-
titleClassName:
|
|
904
|
-
headerClassName: "h-[64px]",
|
|
887
|
+
cssVars: He,
|
|
888
|
+
titleClassName: D?.fontClassName,
|
|
889
|
+
headerClassName: a("h-[64px]", j),
|
|
890
|
+
headerActionsClassName: M,
|
|
905
891
|
className: a(i ? "w-[324px] mobile:w-full" : "w-0", h)
|
|
906
892
|
},
|
|
907
893
|
rightActions: b,
|
|
908
894
|
children: [
|
|
909
|
-
/* @__PURE__ */
|
|
910
|
-
label:
|
|
895
|
+
/* @__PURE__ */ z(Ue, {
|
|
896
|
+
label: oe,
|
|
911
897
|
onClick: p,
|
|
912
|
-
labelClassName:
|
|
913
|
-
colors:
|
|
898
|
+
labelClassName: D?.newChatLabelClassName,
|
|
899
|
+
colors: k,
|
|
900
|
+
className: te
|
|
914
901
|
}),
|
|
915
|
-
/* @__PURE__ */
|
|
902
|
+
/* @__PURE__ */ z("div", {
|
|
916
903
|
role: "search",
|
|
917
|
-
className: "px-3 py-2",
|
|
918
|
-
children: /* @__PURE__ */
|
|
919
|
-
wrapperClassName: a(
|
|
904
|
+
className: a("px-3 py-2", he.search),
|
|
905
|
+
children: /* @__PURE__ */ z(O, {
|
|
906
|
+
wrapperClassName: a(X.search, A),
|
|
920
907
|
value: U,
|
|
921
|
-
onChange:
|
|
922
|
-
placeholder:
|
|
923
|
-
clearLabel:
|
|
924
|
-
"aria-label":
|
|
908
|
+
onChange: Oe,
|
|
909
|
+
placeholder: V,
|
|
910
|
+
clearLabel: se,
|
|
911
|
+
"aria-label": V
|
|
925
912
|
})
|
|
926
913
|
}),
|
|
927
|
-
!w && /* @__PURE__ */
|
|
928
|
-
activeTab:
|
|
929
|
-
labels:
|
|
914
|
+
!w && /* @__PURE__ */ z(Ve, {
|
|
915
|
+
activeTab: pe,
|
|
916
|
+
labels: ce,
|
|
930
917
|
onChange: (e) => {
|
|
931
|
-
|
|
918
|
+
me(e), C?.(e);
|
|
932
919
|
},
|
|
933
|
-
tabClassName:
|
|
920
|
+
tabClassName: D?.tabClassName,
|
|
934
921
|
hiddenSources: T
|
|
935
922
|
}),
|
|
936
|
-
/* @__PURE__ */
|
|
923
|
+
/* @__PURE__ */ z("span", {
|
|
937
924
|
role: "status",
|
|
938
925
|
"aria-live": "polite",
|
|
939
926
|
className: "sr-only",
|
|
940
|
-
children: t ?
|
|
927
|
+
children: t ? ae : $e ? re : et ? ie : ""
|
|
941
928
|
}),
|
|
942
|
-
/* @__PURE__ */
|
|
943
|
-
className: "flex-1 overflow-hidden px-
|
|
944
|
-
children: t ? /* @__PURE__ */
|
|
929
|
+
/* @__PURE__ */ z("div", {
|
|
930
|
+
className: "flex-1 overflow-hidden px-3 py-1",
|
|
931
|
+
children: t ? /* @__PURE__ */ z("div", {
|
|
945
932
|
className: "flex flex-col gap-3 px-2 py-3",
|
|
946
|
-
children: Array.from({ length: 15 }, (e, t) => /* @__PURE__ */
|
|
933
|
+
children: Array.from({ length: 15 }, (e, t) => /* @__PURE__ */ z(ee, {
|
|
947
934
|
avatar: { size: 24 },
|
|
948
|
-
showTitle: { width:
|
|
935
|
+
showTitle: { width: Ne(t) },
|
|
949
936
|
paragraph: !1,
|
|
950
937
|
active: !0,
|
|
951
|
-
color:
|
|
938
|
+
color: X.skeletonColor
|
|
952
939
|
}, t))
|
|
953
|
-
}) :
|
|
954
|
-
listRef:
|
|
955
|
-
id:
|
|
940
|
+
}) : $e ? /* @__PURE__ */ z(c, { label: re }) : et ? /* @__PURE__ */ z(l, { label: ie }) : /* @__PURE__ */ z(Me, {
|
|
941
|
+
listRef: ye,
|
|
942
|
+
id: K,
|
|
956
943
|
role: "list",
|
|
957
944
|
style: { height: "100%" },
|
|
958
|
-
rowComponent:
|
|
959
|
-
rowCount:
|
|
960
|
-
rowHeight:
|
|
961
|
-
overscanCount:
|
|
962
|
-
onResize:
|
|
963
|
-
rowProps:
|
|
945
|
+
rowComponent: Ge,
|
|
946
|
+
rowCount: $.length,
|
|
947
|
+
rowHeight: Fe,
|
|
948
|
+
overscanCount: _e,
|
|
949
|
+
onResize: De,
|
|
950
|
+
rowProps: Qe
|
|
964
951
|
})
|
|
965
952
|
})
|
|
966
953
|
]
|
|
967
954
|
});
|
|
968
|
-
}),
|
|
955
|
+
}), Xe = 8e3, Ze = "flex size-7 shrink-0 items-center justify-center", Q = {
|
|
969
956
|
root: "_root_11lia_1",
|
|
970
957
|
text: "_text_11lia_5",
|
|
971
958
|
textSecondary: "_textSecondary_11lia_9",
|
|
@@ -974,79 +961,79 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
974
961
|
errorIcon: "_errorIcon_11lia_21",
|
|
975
962
|
failureCount: "_failureCount_11lia_25",
|
|
976
963
|
warningIcon: "_warningIcon_11lia_35"
|
|
977
|
-
}, $
|
|
964
|
+
}, $ = ({ title: e, failedCount: t, isCollapsed: n, jobsId: r, labels: i, styles: o, onToggleCollapse: s, onClose: c }) => {
|
|
978
965
|
let l = o?.typography;
|
|
979
|
-
return /* @__PURE__ */
|
|
980
|
-
className: a(
|
|
981
|
-
children: [/* @__PURE__ */
|
|
966
|
+
return /* @__PURE__ */ B("div", {
|
|
967
|
+
className: a(Q.divider, "mx-4 flex items-center justify-between py-3"),
|
|
968
|
+
children: [/* @__PURE__ */ B("div", {
|
|
982
969
|
className: "flex min-w-0 items-center gap-2",
|
|
983
|
-
children: [/* @__PURE__ */
|
|
984
|
-
className: a(
|
|
970
|
+
children: [/* @__PURE__ */ z("span", {
|
|
971
|
+
className: a(Q.text, "truncate", l?.titleClassName || "dial-small-paragraph-semi-text"),
|
|
985
972
|
children: e
|
|
986
|
-
}), t > 0 && /* @__PURE__ */
|
|
987
|
-
className: a(
|
|
973
|
+
}), t > 0 && /* @__PURE__ */ z("span", {
|
|
974
|
+
className: a(Q.failureCount, "inline-flex h-4 min-w-4 shrink-0 items-center justify-center rounded-full px-1", l?.failureCountClassName || "dial-small-paragraph-semi-text"),
|
|
988
975
|
children: t
|
|
989
976
|
})]
|
|
990
|
-
}), /* @__PURE__ */
|
|
977
|
+
}), /* @__PURE__ */ B("div", {
|
|
991
978
|
className: "flex shrink-0 items-center gap-1",
|
|
992
|
-
children: [/* @__PURE__ */
|
|
979
|
+
children: [/* @__PURE__ */ z(S, {
|
|
993
980
|
"aria-label": n ? i.expandQueueAriaLabel : i.collapseQueueAriaLabel,
|
|
994
981
|
size: y.Small,
|
|
995
982
|
"aria-expanded": !n,
|
|
996
983
|
"aria-controls": r,
|
|
997
|
-
icon:
|
|
984
|
+
icon: z(n ? le : H, {
|
|
998
985
|
size: g.SM,
|
|
999
|
-
className:
|
|
986
|
+
className: Q.textSecondary,
|
|
1000
987
|
stroke: _,
|
|
1001
988
|
"aria-hidden": !0
|
|
1002
989
|
}),
|
|
1003
990
|
onClick: s,
|
|
1004
|
-
className:
|
|
1005
|
-
}), /* @__PURE__ */
|
|
991
|
+
className: Ze
|
|
992
|
+
}), /* @__PURE__ */ z(S, {
|
|
1006
993
|
"aria-label": i.closeQueueAriaLabel,
|
|
1007
994
|
size: y.Small,
|
|
1008
|
-
icon: /* @__PURE__ */
|
|
995
|
+
icon: /* @__PURE__ */ z(W, {
|
|
1009
996
|
size: g.SM,
|
|
1010
|
-
className:
|
|
997
|
+
className: Q.textSecondary,
|
|
1011
998
|
stroke: _,
|
|
1012
999
|
"aria-hidden": !0
|
|
1013
1000
|
}),
|
|
1014
1001
|
onClick: c,
|
|
1015
|
-
className:
|
|
1002
|
+
className: Ze
|
|
1016
1003
|
})]
|
|
1017
1004
|
})]
|
|
1018
1005
|
});
|
|
1019
|
-
},
|
|
1006
|
+
}, Qe = [".dial", ".zip"], $e = (e) => {
|
|
1020
1007
|
let t = e.toLowerCase();
|
|
1021
|
-
return
|
|
1022
|
-
},
|
|
1023
|
-
let o = i?.typography, s =
|
|
1024
|
-
return /* @__PURE__ */
|
|
1008
|
+
return Qe.some((e) => t.endsWith(e)) ? U : t.endsWith(".json") ? fe : de;
|
|
1009
|
+
}, et = ({ job: t, labels: n, onCancel: r, styles: i }) => {
|
|
1010
|
+
let o = i?.typography, s = $e(t.fileName), c = t.status === e.Canceled;
|
|
1011
|
+
return /* @__PURE__ */ B("div", {
|
|
1025
1012
|
className: "group flex items-center gap-2 px-4 py-2",
|
|
1026
1013
|
children: [
|
|
1027
|
-
/* @__PURE__ */
|
|
1014
|
+
/* @__PURE__ */ z(s, {
|
|
1028
1015
|
size: g.SM,
|
|
1029
1016
|
stroke: _,
|
|
1030
|
-
className:
|
|
1017
|
+
className: Q.textSecondary,
|
|
1031
1018
|
"aria-hidden": !0
|
|
1032
1019
|
}),
|
|
1033
|
-
/* @__PURE__ */
|
|
1020
|
+
/* @__PURE__ */ z(b, {
|
|
1034
1021
|
text: t.fileName,
|
|
1035
|
-
className: a(c ?
|
|
1022
|
+
className: a(c ? Q.textSecondary : Q.text, o?.jobLabelClassName || "dial-small-text"),
|
|
1036
1023
|
contentClassName: "!z-[80]"
|
|
1037
1024
|
}),
|
|
1038
|
-
t.status === e.InProgress && /* @__PURE__ */
|
|
1025
|
+
t.status === e.InProgress && /* @__PURE__ */ B("div", {
|
|
1039
1026
|
className: a("flex size-7 shrink-0 items-center justify-center", "grid"),
|
|
1040
|
-
children: [/* @__PURE__ */
|
|
1027
|
+
children: [/* @__PURE__ */ z(A, {
|
|
1041
1028
|
size: g.SM,
|
|
1042
1029
|
ariaLabel: n.jobProgressAriaLabel(t.fileName),
|
|
1043
1030
|
className: "pointer-events-none col-start-1 row-start-1 opacity-100 transition-opacity group-focus-within:opacity-0 group-hover:opacity-0"
|
|
1044
|
-
}), /* @__PURE__ */
|
|
1031
|
+
}), /* @__PURE__ */ z(S, {
|
|
1045
1032
|
"aria-label": n.cancelJobAriaLabel(t.fileName),
|
|
1046
1033
|
size: y.Small,
|
|
1047
|
-
icon: /* @__PURE__ */
|
|
1034
|
+
icon: /* @__PURE__ */ z(W, {
|
|
1048
1035
|
size: g.SM,
|
|
1049
|
-
className:
|
|
1036
|
+
className: Q.textSecondary,
|
|
1050
1037
|
stroke: _,
|
|
1051
1038
|
"aria-hidden": !0
|
|
1052
1039
|
}),
|
|
@@ -1054,55 +1041,55 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1054
1041
|
className: "col-start-1 row-start-1 opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100"
|
|
1055
1042
|
})]
|
|
1056
1043
|
}),
|
|
1057
|
-
t.status === e.Success && /* @__PURE__ */
|
|
1044
|
+
t.status === e.Success && /* @__PURE__ */ z("span", {
|
|
1058
1045
|
className: "flex size-7 shrink-0 items-center justify-center",
|
|
1059
|
-
children: /* @__PURE__ */
|
|
1046
|
+
children: /* @__PURE__ */ z(ce, {
|
|
1060
1047
|
size: g.SM,
|
|
1061
1048
|
stroke: _,
|
|
1062
|
-
className:
|
|
1049
|
+
className: Q.successIcon,
|
|
1063
1050
|
"aria-hidden": !0
|
|
1064
1051
|
})
|
|
1065
1052
|
}),
|
|
1066
|
-
t.status === e.Warning && /* @__PURE__ */
|
|
1067
|
-
tooltip: n.jobWarningMessage(t.warningCode),
|
|
1053
|
+
t.status === e.Warning && /* @__PURE__ */ z(j, {
|
|
1054
|
+
tooltip: n.jobWarningMessage(t.warningCode, t.warningNames),
|
|
1068
1055
|
contentClassName: "!z-[80]",
|
|
1069
1056
|
asChild: !0,
|
|
1070
|
-
children: /* @__PURE__ */
|
|
1057
|
+
children: /* @__PURE__ */ z("span", {
|
|
1071
1058
|
className: "flex size-7 shrink-0 items-center justify-center",
|
|
1072
1059
|
role: "img",
|
|
1073
|
-
"aria-label": n.jobWarningMessage(t.warningCode),
|
|
1060
|
+
"aria-label": n.jobWarningMessage(t.warningCode, t.warningNames),
|
|
1074
1061
|
tabIndex: 0,
|
|
1075
|
-
children: /* @__PURE__ */
|
|
1062
|
+
children: /* @__PURE__ */ z(oe, {
|
|
1076
1063
|
size: g.SM,
|
|
1077
|
-
className:
|
|
1064
|
+
className: Q.warningIcon,
|
|
1078
1065
|
"aria-hidden": !0
|
|
1079
1066
|
})
|
|
1080
1067
|
})
|
|
1081
1068
|
}),
|
|
1082
|
-
t.status === e.Failed && /* @__PURE__ */
|
|
1069
|
+
t.status === e.Failed && /* @__PURE__ */ z(j, {
|
|
1083
1070
|
tooltip: n.jobErrorMessage(t.errorCode),
|
|
1084
1071
|
contentClassName: "!z-[80]",
|
|
1085
1072
|
asChild: !0,
|
|
1086
|
-
children: /* @__PURE__ */
|
|
1073
|
+
children: /* @__PURE__ */ z("span", {
|
|
1087
1074
|
className: "flex size-7 shrink-0 items-center justify-center",
|
|
1088
1075
|
role: "img",
|
|
1089
1076
|
"aria-label": n.jobErrorMessage(t.errorCode),
|
|
1090
1077
|
tabIndex: 0,
|
|
1091
|
-
children: /* @__PURE__ */
|
|
1078
|
+
children: /* @__PURE__ */ z(ae, {
|
|
1092
1079
|
size: g.SM,
|
|
1093
|
-
className:
|
|
1080
|
+
className: Q.errorIcon,
|
|
1094
1081
|
"aria-hidden": !0
|
|
1095
1082
|
})
|
|
1096
1083
|
})
|
|
1097
1084
|
}),
|
|
1098
|
-
c && /* @__PURE__ */
|
|
1099
|
-
className: a(
|
|
1085
|
+
c && /* @__PURE__ */ z("span", {
|
|
1086
|
+
className: a(Q.textSecondary, "shrink-0", o?.canceledLabelClassName || "dial-small-text"),
|
|
1100
1087
|
children: n.canceledLabel
|
|
1101
1088
|
})
|
|
1102
1089
|
]
|
|
1103
1090
|
});
|
|
1104
|
-
},
|
|
1105
|
-
let [l, u] =
|
|
1091
|
+
}, tt = (e) => Math.round(e.reduce((e, t) => e + t.progress.percent, 0) / e.length), nt = (t) => t.filter((t) => t.status !== e.InProgress).length, rt = (e, t, n) => e && t ? n.closeQueueConfirmDescriptionMixed : t ? n.closeQueueConfirmDescriptionFailed : n.closeQueueConfirmDescriptionInProgress, it = N(({ title: t, jobs: n, onClose: i, onCancel: o, labels: s, styles: c }) => {
|
|
1092
|
+
let [l, u] = R(!1), d = ne(), [f, p] = R(!1), g = c?.colors, _ = {
|
|
1106
1093
|
...r({
|
|
1107
1094
|
"--cp-transfer-queue-bg": g?.background,
|
|
1108
1095
|
"--cp-transfer-queue-text": g?.text,
|
|
@@ -1115,30 +1102,30 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1115
1102
|
"--cp-transfer-queue-failure-count-text": g?.failureCountText
|
|
1116
1103
|
}),
|
|
1117
1104
|
...c?.cssVars
|
|
1118
|
-
}, v = n.some((t) => t.status === e.InProgress), b = n.some((t) => t.status === e.Failed), x = n.length > 0 && n.every((t) => t.status === e.Success), S =
|
|
1105
|
+
}, v = n.some((t) => t.status === e.InProgress), b = n.some((t) => t.status === e.Failed), x = n.length > 0 && n.every((t) => t.status === e.Success), S = P(() => {
|
|
1119
1106
|
v || b ? p(!0) : i();
|
|
1120
1107
|
}, [
|
|
1121
1108
|
v,
|
|
1122
1109
|
b,
|
|
1123
1110
|
i
|
|
1124
|
-
]), C =
|
|
1111
|
+
]), C = P(() => {
|
|
1125
1112
|
p(!1), i();
|
|
1126
|
-
}, [i]), w =
|
|
1113
|
+
}, [i]), w = P(() => {
|
|
1127
1114
|
u((e) => !e);
|
|
1128
1115
|
}, []);
|
|
1129
|
-
if (
|
|
1116
|
+
if (F(() => {
|
|
1130
1117
|
if (!x) return;
|
|
1131
|
-
let e = setTimeout(i,
|
|
1118
|
+
let e = setTimeout(i, Xe);
|
|
1132
1119
|
return () => clearTimeout(e);
|
|
1133
1120
|
}, [x, i]), n.length === 0) return null;
|
|
1134
1121
|
let T = n.filter((t) => t.status === e.Failed).length;
|
|
1135
|
-
return /* @__PURE__ */
|
|
1122
|
+
return /* @__PURE__ */ B("div", {
|
|
1136
1123
|
role: "status",
|
|
1137
1124
|
"aria-live": "polite",
|
|
1138
1125
|
style: _,
|
|
1139
|
-
className: a(
|
|
1126
|
+
className: a(Q.root, "w-[370px] max-w-[calc(100vw-2rem)] rounded-xl shadow-md", c?.rootClassName),
|
|
1140
1127
|
children: [
|
|
1141
|
-
/* @__PURE__ */
|
|
1128
|
+
/* @__PURE__ */ z($, {
|
|
1142
1129
|
title: t,
|
|
1143
1130
|
failedCount: T,
|
|
1144
1131
|
isCollapsed: l,
|
|
@@ -1148,26 +1135,26 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1148
1135
|
onToggleCollapse: w,
|
|
1149
1136
|
onClose: S
|
|
1150
1137
|
}),
|
|
1151
|
-
l && v && /* @__PURE__ */
|
|
1152
|
-
value:
|
|
1138
|
+
l && v && /* @__PURE__ */ z(D, {
|
|
1139
|
+
value: tt(n),
|
|
1153
1140
|
size: y.Small,
|
|
1154
1141
|
"aria-label": s.queueProgressAriaLabel,
|
|
1155
|
-
"aria-valuetext": s.queueProgressValueText(
|
|
1142
|
+
"aria-valuetext": s.queueProgressValueText(nt(n), n.length)
|
|
1156
1143
|
}),
|
|
1157
|
-
!l && /* @__PURE__ */
|
|
1144
|
+
!l && /* @__PURE__ */ z("div", {
|
|
1158
1145
|
id: d,
|
|
1159
1146
|
className: a("flex max-h-[40vh] flex-col overflow-y-auto py-1", c?.bodyClassName),
|
|
1160
|
-
children: n.map((e) => /* @__PURE__ */
|
|
1147
|
+
children: n.map((e) => /* @__PURE__ */ z(et, {
|
|
1161
1148
|
job: e,
|
|
1162
1149
|
labels: s,
|
|
1163
1150
|
onCancel: o,
|
|
1164
1151
|
styles: c
|
|
1165
1152
|
}, e.id))
|
|
1166
1153
|
}),
|
|
1167
|
-
/* @__PURE__ */
|
|
1154
|
+
/* @__PURE__ */ z(m, {
|
|
1168
1155
|
open: f,
|
|
1169
1156
|
header: s.closeQueueConfirmHeader,
|
|
1170
|
-
description:
|
|
1157
|
+
description: rt(v, b, s),
|
|
1171
1158
|
confirmLabel: s.closeLabel,
|
|
1172
1159
|
cancelLabel: s.cancelLabel,
|
|
1173
1160
|
variant: h.Danger,
|
|
@@ -1177,33 +1164,33 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1177
1164
|
]
|
|
1178
1165
|
});
|
|
1179
1166
|
});
|
|
1180
|
-
|
|
1167
|
+
it.displayName = "ImportExportQueue";
|
|
1181
1168
|
//#endregion
|
|
1182
1169
|
//#region src/components/RenameConversationPopup/RenameConversationPopup.tsx
|
|
1183
|
-
var
|
|
1184
|
-
let [f, m] =
|
|
1185
|
-
|
|
1186
|
-
let n = e && !
|
|
1187
|
-
if (
|
|
1170
|
+
var at = N(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: a, onCancel: c, onGenerateWithAi: l, labels: u, styles: d }) => {
|
|
1171
|
+
let [f, m] = R(t), [h, v] = R(!1), [y, b] = R(null), x = L(null), C = L(!1), D = L(0);
|
|
1172
|
+
F(() => {
|
|
1173
|
+
let n = e && !C.current;
|
|
1174
|
+
if (C.current = e, !e) {
|
|
1188
1175
|
D.current += 1, v(!1);
|
|
1189
1176
|
return;
|
|
1190
1177
|
}
|
|
1191
1178
|
if (!n) return;
|
|
1192
1179
|
D.current += 1, m(t), b(null), v(!1);
|
|
1193
|
-
let r = setTimeout(() =>
|
|
1180
|
+
let r = setTimeout(() => x.current?.focus(), 0);
|
|
1194
1181
|
return () => clearTimeout(r);
|
|
1195
|
-
}, [e, t]),
|
|
1182
|
+
}, [e, t]), F(() => () => {
|
|
1196
1183
|
D.current += 1;
|
|
1197
1184
|
}, []);
|
|
1198
|
-
let O = s(f.trim()),
|
|
1199
|
-
|
|
1185
|
+
let O = s(f.trim()), ee = i(O) > 255, k = n || O === "" || O === t.trim() || ee, j = P(() => {
|
|
1186
|
+
k || a(O);
|
|
1200
1187
|
}, [
|
|
1201
|
-
|
|
1188
|
+
k,
|
|
1202
1189
|
a,
|
|
1203
1190
|
O
|
|
1204
|
-
]),
|
|
1205
|
-
e.key === "Enter" &&
|
|
1206
|
-
}, [
|
|
1191
|
+
]), M = P((e) => {
|
|
1192
|
+
e.key === "Enter" && j();
|
|
1193
|
+
}, [j]), te = P(async () => {
|
|
1207
1194
|
if (h) return;
|
|
1208
1195
|
let e = ++D.current;
|
|
1209
1196
|
v(!0), b(null);
|
|
@@ -1221,11 +1208,11 @@ var st = P(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: a, onCa
|
|
|
1221
1208
|
h,
|
|
1222
1209
|
l,
|
|
1223
1210
|
u.renameWithAiError
|
|
1224
|
-
]),
|
|
1225
|
-
return
|
|
1211
|
+
]), N;
|
|
1212
|
+
return N = ee ? u.nameTooLongError : y ?? r ?? void 0, /* @__PURE__ */ z(T, {
|
|
1226
1213
|
open: e,
|
|
1227
1214
|
header: u.popupTitle,
|
|
1228
|
-
size:
|
|
1215
|
+
size: E.Sm,
|
|
1229
1216
|
onClose: c,
|
|
1230
1217
|
mainButtons: n ? void 0 : [{
|
|
1231
1218
|
label: u.cancelLabel,
|
|
@@ -1233,33 +1220,33 @@ var st = P(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: a, onCa
|
|
|
1233
1220
|
}, {
|
|
1234
1221
|
label: u.saveLabel,
|
|
1235
1222
|
variant: p.Primary,
|
|
1236
|
-
disabled:
|
|
1237
|
-
onClick:
|
|
1223
|
+
disabled: k,
|
|
1224
|
+
onClick: j
|
|
1238
1225
|
}],
|
|
1239
|
-
children: /* @__PURE__ */
|
|
1226
|
+
children: /* @__PURE__ */ z("div", {
|
|
1240
1227
|
className: d?.bodyClassName,
|
|
1241
1228
|
style: d?.cssVars,
|
|
1242
|
-
children: n ? /* @__PURE__ */
|
|
1229
|
+
children: n ? /* @__PURE__ */ z("div", {
|
|
1243
1230
|
className: "h-[120px] px-6 py-4",
|
|
1244
|
-
children: /* @__PURE__ */
|
|
1245
|
-
}) : /* @__PURE__ */
|
|
1231
|
+
children: /* @__PURE__ */ z(A, { size: 50 })
|
|
1232
|
+
}) : /* @__PURE__ */ B("div", {
|
|
1246
1233
|
className: "flex items-start gap-2 px-6 py-3",
|
|
1247
|
-
children: [/* @__PURE__ */
|
|
1234
|
+
children: [/* @__PURE__ */ z("div", {
|
|
1248
1235
|
className: "min-w-0 flex-1",
|
|
1249
|
-
children: /* @__PURE__ */
|
|
1250
|
-
inputRef:
|
|
1236
|
+
children: /* @__PURE__ */ z(w, {
|
|
1237
|
+
inputRef: x,
|
|
1251
1238
|
value: f,
|
|
1252
1239
|
placeholder: u.inputPlaceholder,
|
|
1253
|
-
error:
|
|
1240
|
+
error: N,
|
|
1254
1241
|
onChange: (e) => m(o(e ?? "")),
|
|
1255
|
-
onKeyDown:
|
|
1242
|
+
onKeyDown: M
|
|
1256
1243
|
})
|
|
1257
|
-
}), /* @__PURE__ */
|
|
1244
|
+
}), /* @__PURE__ */ z(S, {
|
|
1258
1245
|
"aria-label": u.renameWithAiLabel,
|
|
1259
1246
|
tooltipProps: { tooltip: u.renameWithAiLabel },
|
|
1260
1247
|
disabled: h || n,
|
|
1261
|
-
onClick:
|
|
1262
|
-
icon: h ? /* @__PURE__ */
|
|
1248
|
+
onClick: te,
|
|
1249
|
+
icon: h ? /* @__PURE__ */ z(A, { size: g.MD }) : /* @__PURE__ */ z(me, {
|
|
1263
1250
|
size: g.MD,
|
|
1264
1251
|
stroke: _
|
|
1265
1252
|
})
|
|
@@ -1268,6 +1255,6 @@ var st = P(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: a, onCa
|
|
|
1268
1255
|
})
|
|
1269
1256
|
});
|
|
1270
1257
|
});
|
|
1271
|
-
|
|
1258
|
+
at.displayName = "RenameConversationPopup";
|
|
1272
1259
|
//#endregion
|
|
1273
|
-
export {
|
|
1260
|
+
export { he as CONVERSATION_PANEL_CLASS, Ye as ConversationPanel, it as ImportExportQueue, at as RenameConversationPopup, $e as getTransferFileIcon };
|