@epam/ai-dial-conversation-panel 1.2.0-dev.11 → 1.2.0-dev.111
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/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/constants/public-class-names.d.ts +7 -0
- package/constants/public-class-names.d.ts.map +1 -0
- package/index.css +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +320 -317
- 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 +16 -0
- package/models/panel-props.d.ts.map +1 -1
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
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
|
|
5
|
-
import { Fragment as ae, jsx as
|
|
6
|
-
import { IconAlertCircleFilled as
|
|
7
|
-
//#region
|
|
8
|
-
var
|
|
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 te } from "@epam/ai-dial-ui-kit";
|
|
4
|
+
import { createElement as M, 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 { Fragment as ae, jsx as z, jsxs as B } from "react/jsx-runtime";
|
|
6
|
+
import { IconAlertCircleFilled as oe, IconAlertTriangleFilled as V, IconCaretDownFilled as se, IconCaretRightFilled as ce, IconCheck as H, IconChevronDown as le, IconChevronUp as ue, IconClock as de, IconDotsVertical as U, IconFile as fe, IconFileZip as pe, IconJson as me, IconPlus as W, IconSparkles as G, IconX as he } from "@tabler/icons-react";
|
|
7
|
+
//#region src/constants/public-class-names.ts
|
|
8
|
+
var ge = {
|
|
9
|
+
newChatButton: "dial-cp-new-chat-button",
|
|
10
|
+
search: "dial-cp-search"
|
|
11
|
+
}, _e = typeof window < "u" ? ie : F;
|
|
9
12
|
function ve(e) {
|
|
10
13
|
if (e !== void 0) switch (typeof e) {
|
|
11
14
|
case "number": return e;
|
|
@@ -15,14 +18,14 @@ function ve(e) {
|
|
|
15
18
|
}
|
|
16
19
|
}
|
|
17
20
|
function ye({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
|
|
18
|
-
let { styleHeight: s, styleWidth: c } =
|
|
21
|
+
let { styleHeight: s, styleWidth: c } = I(() => ({
|
|
19
22
|
styleHeight: ve(o?.height),
|
|
20
23
|
styleWidth: ve(o?.width)
|
|
21
|
-
}), [o?.height, o?.width]), [l, u] =
|
|
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;
|
|
25
|
-
return
|
|
28
|
+
return _e(() => {
|
|
26
29
|
if (i === null || d) return;
|
|
27
30
|
let t = new ResizeObserver((e) => {
|
|
28
31
|
for (let t of e) {
|
|
@@ -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
|
}), [
|
|
@@ -52,12 +55,12 @@ function ye({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
|
|
|
52
55
|
]);
|
|
53
56
|
}
|
|
54
57
|
function be(e) {
|
|
55
|
-
let t =
|
|
58
|
+
let t = L(() => {
|
|
56
59
|
throw Error("Cannot call during render.");
|
|
57
60
|
});
|
|
58
|
-
return
|
|
61
|
+
return _e(() => {
|
|
59
62
|
t.current = e;
|
|
60
|
-
}, [e]),
|
|
63
|
+
}, [e]), P((e) => t.current?.(e), [t]);
|
|
61
64
|
}
|
|
62
65
|
var K = null;
|
|
63
66
|
function xe(e = !1) {
|
|
@@ -169,7 +172,7 @@ function Ee({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
|
169
172
|
};
|
|
170
173
|
}
|
|
171
174
|
function De({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
172
|
-
return
|
|
175
|
+
return I(() => Ee({
|
|
173
176
|
itemCount: e,
|
|
174
177
|
itemProps: t,
|
|
175
178
|
itemSize: n
|
|
@@ -198,7 +201,7 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
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
207
|
}), p = r === "vertical" ? u : d, m = Oe({
|
|
@@ -222,7 +225,7 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
222
225
|
itemCount: a,
|
|
223
226
|
itemProps: o,
|
|
224
227
|
itemSize: m
|
|
225
|
-
}), g =
|
|
228
|
+
}), g = P((e) => h.get(e), [h]), [_, v] = R(() => Te({
|
|
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(() => Ce({
|
|
237
240
|
cachedBounds: h,
|
|
238
241
|
itemCount: a,
|
|
239
242
|
itemSize: m
|
|
@@ -241,7 +244,7 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
241
244
|
h,
|
|
242
245
|
a,
|
|
243
246
|
m
|
|
244
|
-
]), w =
|
|
247
|
+
]), w = P((t) => Te({
|
|
245
248
|
cachedBounds: h,
|
|
246
249
|
containerScrollOffset: Se({
|
|
247
250
|
containerElement: e,
|
|
@@ -261,13 +264,13 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
261
264
|
a,
|
|
262
265
|
l
|
|
263
266
|
]);
|
|
264
|
-
return
|
|
267
|
+
return _e(() => {
|
|
265
268
|
v(w((r === "vertical" ? e?.scrollTop : e?.scrollLeft) ?? 0));
|
|
266
269
|
}, [
|
|
267
270
|
e,
|
|
268
271
|
r,
|
|
269
272
|
w
|
|
270
|
-
]),
|
|
273
|
+
]), _e(() => {
|
|
271
274
|
if (!e) return;
|
|
272
275
|
let t = () => {
|
|
273
276
|
v((t) => {
|
|
@@ -329,7 +332,7 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
329
332
|
};
|
|
330
333
|
}
|
|
331
334
|
function Ae(e) {
|
|
332
|
-
return
|
|
335
|
+
return I(() => e, Object.values(e));
|
|
333
336
|
}
|
|
334
337
|
function je(e, t) {
|
|
335
338
|
let { ariaAttributes: n, style: r, ...i } = e, { ariaAttributes: a, style: o, ...s } = t;
|
|
@@ -338,16 +341,16 @@ function je(e, t) {
|
|
|
338
341
|
function Me(e) {
|
|
339
342
|
return typeof e == "object" && !!e && "getAverageRowHeight" in e && typeof e.getAverageRowHeight == "function";
|
|
340
343
|
}
|
|
341
|
-
var
|
|
342
|
-
function
|
|
343
|
-
let m = Ae(u), h =
|
|
344
|
+
var Ne = "data-react-window-index";
|
|
345
|
+
function Pe({ 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 = Ae(u), h = I(() => N(s, je), [s]), [g, _] = R(null), v = Me(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = ke({
|
|
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
|
});
|
|
@@ -366,12 +369,12 @@ function Ne({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
|
|
|
366
369
|
top: r
|
|
367
370
|
});
|
|
368
371
|
}
|
|
369
|
-
}), [g, x]),
|
|
372
|
+
}), [g, x]), _e(() => {
|
|
370
373
|
if (!g) return;
|
|
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(Ne, 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,11 +398,11 @@ 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);
|
|
402
|
-
e.push(/* @__PURE__ */
|
|
405
|
+
e.push(/* @__PURE__ */ M(h, {
|
|
403
406
|
...m,
|
|
404
407
|
ariaAttributes: {
|
|
405
408
|
"aria-posinset": t + 1,
|
|
@@ -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(),
|
|
@@ -434,7 +437,7 @@ function Ne({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
|
|
|
434
437
|
zIndex: -1
|
|
435
438
|
}
|
|
436
439
|
});
|
|
437
|
-
return
|
|
440
|
+
return M(d, {
|
|
438
441
|
role: "list",
|
|
439
442
|
...p,
|
|
440
443
|
className: t,
|
|
@@ -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
|
+
}({}), Fe = (e) => `${60 + e * 23 % 35}%`, Ie = (e, t) => e ? t ? "pe-9" : "pe-2 group-focus-within/conversation:pe-9 group-hover/conversation:pe-9" : "pe-3", Le = (e, t) => t.rows[e].kind === Y.Item ? 36 : e === 0 ? 24 : 56, Re = (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
|
+
}, ze = (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
|
+
}, Be = (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(Re(t.source));
|
|
471
474
|
} else i.add(n.Pinned);
|
|
472
475
|
return i;
|
|
473
|
-
},
|
|
476
|
+
}, Ve = (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
|
+
}, X = [
|
|
484
487
|
{
|
|
485
488
|
value: n.All,
|
|
486
489
|
labelKey: "all"
|
|
@@ -497,36 +500,34 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
497
500
|
value: n.Organization,
|
|
498
501
|
labelKey: "organization"
|
|
499
502
|
}
|
|
500
|
-
], He =
|
|
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
|
+
], He = N(({ activeTab: e, labels: t, onChange: n, tabClassName: r = "dial-tiny-semi-text", hiddenSources: i }) => /* @__PURE__ */ z(x, {
|
|
504
|
+
items: I(() => X.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: te("!px-2", r)
|
|
514
|
+
})), Ue = { button: "_button_1vksy_1" }, We = 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__ */
|
|
521
|
+
children: /* @__PURE__ */ B("button", {
|
|
522
522
|
onClick: t,
|
|
523
523
|
type: "button",
|
|
524
|
-
className: a("flex h-[36px] w-full cursor-pointer items-center justify-center gap-2 px-3 py-1 shadow-chat-button hover:shadow-xs focus-visible:shadow-xs active:shadow-xs", Ue.button),
|
|
525
|
-
children: [/* @__PURE__ */
|
|
524
|
+
className: a("flex h-[36px] w-full cursor-pointer items-center justify-center gap-2 px-3 py-1 shadow-chat-button hover:shadow-xs focus-visible:shadow-xs active:shadow-xs", Ue.button, o, ge.newChatButton),
|
|
525
|
+
children: [/* @__PURE__ */ z(W, {
|
|
526
526
|
size: 18,
|
|
527
527
|
stroke: _,
|
|
528
|
-
className: "shrink-0"
|
|
529
|
-
|
|
528
|
+
className: "shrink-0",
|
|
529
|
+
"aria-hidden": !0
|
|
530
|
+
}), /* @__PURE__ */ z("span", {
|
|
530
531
|
className: n,
|
|
531
532
|
children: e
|
|
532
533
|
})]
|
|
@@ -542,9 +543,9 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
542
543
|
triggerIcon: "_triggerIcon_i3lsf_38",
|
|
543
544
|
unreadDot: "_unreadDot_i3lsf_46",
|
|
544
545
|
search: "_search_i3lsf_54"
|
|
545
|
-
},
|
|
546
|
+
}, Ge = ({ 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
547
|
let d = o != null;
|
|
547
|
-
return /* @__PURE__ */
|
|
548
|
+
return /* @__PURE__ */ B("button", {
|
|
548
549
|
type: "button",
|
|
549
550
|
"aria-expanded": t,
|
|
550
551
|
"aria-controls": r,
|
|
@@ -558,105 +559,105 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
558
559
|
onDrop: d ? (e) => {
|
|
559
560
|
d && (e.preventDefault(), u?.(o, o, null));
|
|
560
561
|
} : void 0,
|
|
561
|
-
className: a("flex h-6 w-full items-center gap-1 rounded py-1 pe-3 text-start", i, Z.groupHeader, s && Z.dropZoneActive),
|
|
562
|
-
children: [t ? /* @__PURE__ */
|
|
562
|
+
className: a("group flex h-6 w-full items-center gap-1 rounded py-1 pe-3 text-start", i, Z.groupHeader, s && Z.dropZoneActive),
|
|
563
|
+
children: [t ? /* @__PURE__ */ z(se, {
|
|
563
564
|
size: 12,
|
|
564
|
-
className: "shrink-0",
|
|
565
|
+
className: "shrink-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-visible:opacity-100",
|
|
565
566
|
"aria-hidden": !0
|
|
566
|
-
}) : /* @__PURE__ */
|
|
567
|
+
}) : /* @__PURE__ */ z(ce, {
|
|
567
568
|
size: 12,
|
|
568
|
-
className: "shrink-0 rtl:scale-x-[-1]",
|
|
569
|
+
className: "shrink-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-visible:opacity-100 rtl:scale-x-[-1]",
|
|
569
570
|
"aria-hidden": !0
|
|
570
|
-
}), /* @__PURE__ */
|
|
571
|
+
}), /* @__PURE__ */ z(b, { text: e })]
|
|
571
572
|
});
|
|
572
|
-
},
|
|
573
|
-
let [
|
|
574
|
-
|
|
575
|
-
}, [e, s]),
|
|
573
|
+
}, Ke = ({ item: e, isActive: n, onSelectConversation: r, searchQuery: i = "", getActions: o, onActionMenuOpen: s, actionsLabel: c = "More actions", itemTitleClassName: l = "dial-small-text", itemIconBadgeClassName: u, taskBadgeClassName: d = "dial-caption-lead-semi-text", unreadIndicatorLabel: p = "Unread", rowGroupKey: m, rows: h, draggingId: b, dragOverId: x, allowedDropGroups: w, onDragStart: T, onDragEnd: E, onDragOver: D, onDragLeave: O, onDrop: A }) => {
|
|
574
|
+
let [j, te] = R(!1), M = L(null), N = P((t) => {
|
|
575
|
+
te(t), t && M.current && s?.(e, M.current);
|
|
576
|
+
}, [e, s]), F = o?.(e) ?? [], ne = F.length > 0, re = e.isIconLoading ? /* @__PURE__ */ z(ee, {
|
|
576
577
|
variant: k.Circular,
|
|
577
578
|
width: g.LG,
|
|
578
579
|
height: g.LG,
|
|
579
580
|
color: Z.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
|
-
}),
|
|
588
|
-
className: "flex shrink-0 items-center",
|
|
589
|
-
children: [/* @__PURE__ */
|
|
588
|
+
}), ie = /* @__PURE__ */ B("span", {
|
|
589
|
+
className: "flex shrink-0 items-center gap-0.5",
|
|
590
|
+
children: [/* @__PURE__ */ z("span", {
|
|
590
591
|
className: "relative flex size-3 shrink-0 items-center justify-center",
|
|
591
|
-
children: e.isUnread && /* @__PURE__ */
|
|
592
|
+
children: e.isUnread && /* @__PURE__ */ B(ae, { children: [/* @__PURE__ */ z("span", {
|
|
592
593
|
className: a("size-[5.33px] rounded-full", Z.unreadDot),
|
|
593
594
|
"aria-hidden": !0
|
|
594
|
-
}), /* @__PURE__ */
|
|
595
|
+
}), /* @__PURE__ */ z("span", {
|
|
595
596
|
className: "sr-only",
|
|
596
597
|
children: p
|
|
597
598
|
})] })
|
|
598
|
-
}),
|
|
599
|
-
}),
|
|
599
|
+
}), re]
|
|
600
|
+
}), I = Ie(ne, j), oe = e.showTaskBadge ? /* @__PURE__ */ B("span", {
|
|
600
601
|
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__ */
|
|
602
|
+
children: [/* @__PURE__ */ z(de, {
|
|
602
603
|
size: 12,
|
|
603
604
|
"aria-hidden": !0,
|
|
604
605
|
stroke: _
|
|
605
606
|
}), e.taskBadgeLabel]
|
|
606
|
-
}) : void 0,
|
|
607
|
-
e.currentTarget.contains(e.relatedTarget) ||
|
|
608
|
-
}, [
|
|
609
|
-
if (!m || !h || !
|
|
607
|
+
}) : void 0, V = m != null, se = P((e) => {
|
|
608
|
+
e.currentTarget.contains(e.relatedTarget) || O?.();
|
|
609
|
+
}, [O]), ce = P((t) => {
|
|
610
|
+
if (!m || !h || !A) return;
|
|
610
611
|
t.preventDefault();
|
|
611
|
-
let n =
|
|
612
|
-
|
|
612
|
+
let n = Ve(t, e.id, h, m);
|
|
613
|
+
A(e.id, m, n);
|
|
613
614
|
}, [
|
|
614
615
|
e.id,
|
|
615
616
|
h,
|
|
616
617
|
m,
|
|
617
|
-
|
|
618
|
-
]),
|
|
619
|
-
return /* @__PURE__ */
|
|
620
|
-
className: a("group/conversation relative",
|
|
621
|
-
draggable:
|
|
622
|
-
onDragStart:
|
|
623
|
-
onDragEnd:
|
|
624
|
-
onDragOver:
|
|
618
|
+
A
|
|
619
|
+
]), H = e.id === b, le = e.id === x, ue = m != null && (w?.has(m) ?? !1), fe = b != null;
|
|
620
|
+
return /* @__PURE__ */ B("li", {
|
|
621
|
+
className: a("group/conversation relative", H && "cursor-grabbing opacity-50", le && ue && "rounded", le && ue && Z.dropZoneActive, fe && !H && !ue && "cursor-not-allowed"),
|
|
622
|
+
draggable: V || void 0,
|
|
623
|
+
onDragStart: V ? () => T?.(e.id) : void 0,
|
|
624
|
+
onDragEnd: V ? E : void 0,
|
|
625
|
+
onDragOver: V ? (t) => {
|
|
625
626
|
t.preventDefault(), D?.(e.id);
|
|
626
627
|
} : void 0,
|
|
627
|
-
onDragLeave:
|
|
628
|
-
onDrop:
|
|
629
|
-
children: [/* @__PURE__ */
|
|
628
|
+
onDragLeave: V ? se : void 0,
|
|
629
|
+
onDrop: V ? ce : void 0,
|
|
630
|
+
children: [/* @__PURE__ */ z("a", {
|
|
630
631
|
href: e.href,
|
|
631
632
|
className: "contents",
|
|
632
633
|
onClick: (t) => {
|
|
633
634
|
e.href && (t.preventDefault(), r(e.id));
|
|
634
635
|
},
|
|
635
|
-
children: /* @__PURE__ */
|
|
636
|
-
iconBefore:
|
|
637
|
-
label: /* @__PURE__ */
|
|
636
|
+
children: /* @__PURE__ */ z(f, {
|
|
637
|
+
iconBefore: ie,
|
|
638
|
+
label: /* @__PURE__ */ z(C, {
|
|
638
639
|
text: e.title,
|
|
639
640
|
query: i,
|
|
640
641
|
className: l,
|
|
641
642
|
maxLines: 1
|
|
642
643
|
}),
|
|
643
|
-
iconAfter:
|
|
644
|
+
iconAfter: oe,
|
|
644
645
|
textClassName: "min-w-0 flex-1",
|
|
645
646
|
"aria-current": n ? "page" : void 0,
|
|
646
647
|
onClick: e.href ? void 0 : () => r(e.id),
|
|
647
648
|
tabIndex: e.href ? -1 : void 0,
|
|
648
|
-
className: a("h-8 w-full justify-start gap-2 py-2 ps-0 after:pointer-events-none",
|
|
649
|
+
className: a("h-8 w-full justify-start gap-2 py-2 ps-0 after:pointer-events-none", I, Z.item, n && Z.itemActive, j && Z.itemActive)
|
|
649
650
|
})
|
|
650
|
-
}),
|
|
651
|
-
className: a("absolute inset-y-0 end-1 flex items-center",
|
|
652
|
-
children: /* @__PURE__ */
|
|
653
|
-
items:
|
|
654
|
-
onOpenChange:
|
|
651
|
+
}), ne && /* @__PURE__ */ z("div", {
|
|
652
|
+
className: a("absolute inset-y-0 end-1 flex items-center", j ? "opacity-100" : "opacity-0 group-focus-within/conversation:opacity-100 group-hover/conversation:opacity-100"),
|
|
653
|
+
children: /* @__PURE__ */ z(v, {
|
|
654
|
+
items: F,
|
|
655
|
+
onOpenChange: N,
|
|
655
656
|
matchReferenceWidth: !1,
|
|
656
657
|
listClassName: "w-[200px]",
|
|
657
|
-
children: /* @__PURE__ */
|
|
658
|
-
ref:
|
|
659
|
-
icon: /* @__PURE__ */
|
|
658
|
+
children: /* @__PURE__ */ z(S, {
|
|
659
|
+
ref: M,
|
|
660
|
+
icon: /* @__PURE__ */ z(U, {
|
|
660
661
|
size: g.SM,
|
|
661
662
|
className: Z.triggerIcon,
|
|
662
663
|
"aria-hidden": !0,
|
|
@@ -664,20 +665,20 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
664
665
|
}),
|
|
665
666
|
size: y.Small,
|
|
666
667
|
"aria-label": c,
|
|
667
|
-
className: a(
|
|
668
|
+
className: a(j && Z.triggerActive)
|
|
668
669
|
})
|
|
669
670
|
})
|
|
670
671
|
})]
|
|
671
672
|
});
|
|
672
|
-
},
|
|
673
|
+
}, qe = ({ 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
674
|
let C = r[e];
|
|
674
|
-
if (C.kind ===
|
|
675
|
+
if (C.kind === Y.Header) {
|
|
675
676
|
let r = C.groupKey === n.Pinned;
|
|
676
|
-
return /* @__PURE__ */
|
|
677
|
+
return /* @__PURE__ */ z("div", {
|
|
677
678
|
role: "presentation",
|
|
678
679
|
style: t,
|
|
679
680
|
className: e === 0 ? "pt-0" : "pt-8",
|
|
680
|
-
children: /* @__PURE__ */
|
|
681
|
+
children: /* @__PURE__ */ z(Ge, {
|
|
681
682
|
label: C.label,
|
|
682
683
|
isExpanded: i.has(C.groupKey),
|
|
683
684
|
onToggle: () => a(C.groupKey),
|
|
@@ -691,11 +692,11 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
691
692
|
})
|
|
692
693
|
});
|
|
693
694
|
}
|
|
694
|
-
return /* @__PURE__ */
|
|
695
|
+
return /* @__PURE__ */ z("div", {
|
|
695
696
|
role: "presentation",
|
|
696
697
|
style: t,
|
|
697
698
|
className: "pt-1",
|
|
698
|
-
children: /* @__PURE__ */
|
|
699
|
+
children: /* @__PURE__ */ z(Ke, {
|
|
699
700
|
item: C.item,
|
|
700
701
|
isActive: C.item.id === s,
|
|
701
702
|
searchQuery: c,
|
|
@@ -719,51 +720,51 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
719
720
|
onDrop: S
|
|
720
721
|
})
|
|
721
722
|
});
|
|
722
|
-
},
|
|
723
|
+
}, Je = (e, t) => t === n.All ? !0 : e.source === t, Ye = (e, t) => t ? e.title.toLowerCase().includes(t.toLowerCase()) : !0, Xe = new Set([
|
|
723
724
|
n.Pinned,
|
|
724
725
|
n.MyChats,
|
|
725
726
|
n.Shared,
|
|
726
727
|
n.Organization
|
|
727
|
-
]),
|
|
728
|
-
let { colors: E, typography:
|
|
729
|
-
|
|
730
|
-
S != null &&
|
|
728
|
+
]), Ze = 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 }) => {
|
|
729
|
+
let { colors: E, typography: D, newChatButton: k, searchWrapperClassName: A, headerClassName: j, headerActionsClassName: te, newChatButtonClassName: M } = 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);
|
|
730
|
+
F(() => {
|
|
731
|
+
S != null && me(S);
|
|
731
732
|
}, [S]);
|
|
732
|
-
let W =
|
|
733
|
-
|
|
734
|
-
}, []),
|
|
735
|
-
|
|
736
|
-
}, []),
|
|
737
|
-
|
|
733
|
+
let W = I(() => T?.length ? e.filter((e) => e.source == null || !T.includes(e.source)) : e, [e, T]), [G, he] = R(() => Xe), [_e, ve] = R(5), ye = ne(), be = L(null), K = L(null), [xe, Se] = R(null), [q, J] = R(null), [Ce, we] = R(null), Te = L(null), Ee = L(null), De = P(({ height: e }) => {
|
|
734
|
+
ve(Math.ceil(e / 36 * 2));
|
|
735
|
+
}, []), Oe = P((e) => {
|
|
736
|
+
fe(e ?? "");
|
|
737
|
+
}, []), ke = P((e) => {
|
|
738
|
+
he((t) => {
|
|
738
739
|
let n = new Set(t);
|
|
739
740
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
740
741
|
});
|
|
741
|
-
}, []),
|
|
742
|
-
|
|
743
|
-
}, []),
|
|
744
|
-
let n =
|
|
745
|
-
|
|
746
|
-
}, [W]),
|
|
747
|
-
|
|
748
|
-
}, [
|
|
749
|
-
|
|
750
|
-
}, []),
|
|
751
|
-
|
|
752
|
-
}, []),
|
|
753
|
-
let r =
|
|
754
|
-
|
|
742
|
+
}, []), Ae = P(() => {
|
|
743
|
+
Te.current = null, Ee.current = null, Se(null), J(null), we(null);
|
|
744
|
+
}, []), je = P((e, t) => {
|
|
745
|
+
let n = Be(e, ze(t, e), W);
|
|
746
|
+
Te.current = e, Ee.current = n, Se(e), we(n);
|
|
747
|
+
}, [W]), Me = P(() => {
|
|
748
|
+
Ae();
|
|
749
|
+
}, [Ae]), Ne = P((e) => {
|
|
750
|
+
J(e);
|
|
751
|
+
}, []), Ie = P(() => {
|
|
752
|
+
J(null);
|
|
753
|
+
}, []), Re = P((e, t, n) => {
|
|
754
|
+
let r = Te.current, i = Ee.current;
|
|
755
|
+
Ae(), r != null && r !== e && i?.has(t) && x?.({
|
|
755
756
|
draggedId: r,
|
|
756
757
|
targetGroupKey: t,
|
|
757
758
|
afterId: n
|
|
758
759
|
});
|
|
759
|
-
}, [
|
|
760
|
+
}, [Ae, x]), Ve = r({
|
|
760
761
|
"--cp-item-hover": E?.itemHover,
|
|
761
762
|
"--cp-item-active": E?.itemActive,
|
|
762
763
|
"--cp-text": E?.text,
|
|
763
764
|
"--cp-text-secondary": E?.textSecondary,
|
|
764
|
-
"--cp-new-chat-bg":
|
|
765
|
-
"--cp-new-chat-text":
|
|
766
|
-
"--cp-new-chat-focus-outline":
|
|
765
|
+
"--cp-new-chat-bg": k?.background,
|
|
766
|
+
"--cp-new-chat-text": k?.text,
|
|
767
|
+
"--cp-new-chat-focus-outline": k?.focusOutline,
|
|
767
768
|
"--cp-drop-zone-ring": E?.dropZoneRing,
|
|
768
769
|
"--cp-trigger-bg": E?.triggerBackground,
|
|
769
770
|
"--cp-trigger-icon": E?.triggerIcon,
|
|
@@ -773,123 +774,123 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
773
774
|
"--cp-task-badge-bg": E?.taskBadgeBackground,
|
|
774
775
|
"--cp-task-badge-text": E?.taskBadgeText,
|
|
775
776
|
"--cp-unread-dot": E?.unreadDot
|
|
776
|
-
}),
|
|
777
|
+
}), X = I(() => W.filter((e) => Je(e, pe) && Ye(e, U)), [
|
|
777
778
|
W,
|
|
778
|
-
|
|
779
|
+
pe,
|
|
779
780
|
U
|
|
780
|
-
]),
|
|
781
|
+
]), Ue = I(() => X.filter((e) => e.isPinned), [X]), Ge = I(() => X.filter((e) => !e.isPinned && e.source !== n.Shared && e.source !== n.Organization), [X]), Ke = I(() => X.filter((e) => !e.isPinned && e.source === n.Shared), [X]), Ze = I(() => X.filter((e) => !e.isPinned && e.source === n.Organization), [X]), Qe = I(() => [
|
|
781
782
|
{
|
|
782
783
|
key: n.Pinned,
|
|
783
784
|
label: H?.pinned ?? "Pinned",
|
|
784
|
-
items:
|
|
785
|
+
items: Ue
|
|
785
786
|
},
|
|
786
787
|
{
|
|
787
788
|
key: n.MyChats,
|
|
788
789
|
label: H?.myChats ?? "My chats",
|
|
789
|
-
items:
|
|
790
|
+
items: Ge
|
|
790
791
|
},
|
|
791
792
|
{
|
|
792
793
|
key: n.Shared,
|
|
793
794
|
label: H?.shared ?? "Shared",
|
|
794
|
-
items:
|
|
795
|
+
items: Ke
|
|
795
796
|
},
|
|
796
797
|
{
|
|
797
798
|
key: n.Organization,
|
|
798
799
|
label: H?.organization ?? "Organization",
|
|
799
|
-
items:
|
|
800
|
+
items: Ze
|
|
800
801
|
}
|
|
801
802
|
], [
|
|
802
803
|
H,
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
]), Q =
|
|
804
|
+
Ue,
|
|
805
|
+
Ge,
|
|
806
|
+
Ke,
|
|
807
|
+
Ze
|
|
808
|
+
]), Q = I(() => {
|
|
808
809
|
let e = [];
|
|
809
|
-
for (let t of
|
|
810
|
-
kind:
|
|
810
|
+
for (let t of Qe) if (t.items.length !== 0 && (e.push({
|
|
811
|
+
kind: Y.Header,
|
|
811
812
|
groupKey: t.key,
|
|
812
813
|
label: t.label
|
|
813
|
-
}),
|
|
814
|
-
kind:
|
|
814
|
+
}), G.has(t.key))) for (let n of t.items) e.push({
|
|
815
|
+
kind: Y.Item,
|
|
815
816
|
item: n,
|
|
816
817
|
groupKey: t.key
|
|
817
818
|
});
|
|
818
819
|
return e;
|
|
819
|
-
}, [
|
|
820
|
-
|
|
821
|
-
if (!s ||
|
|
822
|
-
let e = Q.findIndex((e) => e.kind ===
|
|
823
|
-
e >= 0 && (
|
|
820
|
+
}, [Qe, G]);
|
|
821
|
+
F(() => {
|
|
822
|
+
if (!s || K.current === s) return;
|
|
823
|
+
let e = Q.findIndex((e) => e.kind === Y.Item && e.item.id === s);
|
|
824
|
+
e >= 0 && (be.current?.scrollToRow({
|
|
824
825
|
index: e,
|
|
825
826
|
align: "smart",
|
|
826
827
|
behavior: "smooth"
|
|
827
|
-
}),
|
|
828
|
+
}), K.current = s);
|
|
828
829
|
}, [
|
|
829
830
|
s,
|
|
830
|
-
|
|
831
|
-
|
|
831
|
+
Qe,
|
|
832
|
+
G,
|
|
832
833
|
Q
|
|
833
834
|
]);
|
|
834
|
-
let
|
|
835
|
+
let $ = I(() => ({
|
|
835
836
|
rows: Q,
|
|
836
|
-
expandedGroups:
|
|
837
|
-
onToggleGroup:
|
|
838
|
-
listId:
|
|
837
|
+
expandedGroups: G,
|
|
838
|
+
onToggleGroup: ke,
|
|
839
|
+
listId: ye,
|
|
839
840
|
activeConversationId: s,
|
|
840
841
|
searchQuery: U,
|
|
841
842
|
onSelectConversation: o,
|
|
842
843
|
getActions: _,
|
|
843
844
|
onActionMenuOpen: v,
|
|
844
|
-
actionsLabel:
|
|
845
|
-
unreadIndicatorLabel:
|
|
845
|
+
actionsLabel: le,
|
|
846
|
+
unreadIndicatorLabel: ue,
|
|
846
847
|
styles: {
|
|
847
|
-
groupHeaderClassName:
|
|
848
|
-
itemTitleClassName:
|
|
848
|
+
groupHeaderClassName: D?.groupHeaderClassName,
|
|
849
|
+
itemTitleClassName: D?.itemTitleClassName,
|
|
849
850
|
itemIconBadgeClassName: m?.itemIconBadgeClassName,
|
|
850
851
|
taskBadgeClassName: m?.taskBadgeClassName
|
|
851
852
|
},
|
|
852
|
-
draggingId:
|
|
853
|
-
dragOverId:
|
|
854
|
-
allowedDropGroups:
|
|
855
|
-
onDragStart: (e) =>
|
|
856
|
-
onDragEnd:
|
|
857
|
-
onDragOver:
|
|
858
|
-
onDragLeave:
|
|
859
|
-
onDrop:
|
|
853
|
+
draggingId: xe,
|
|
854
|
+
dragOverId: q,
|
|
855
|
+
allowedDropGroups: Ce,
|
|
856
|
+
onDragStart: (e) => je(e, Q),
|
|
857
|
+
onDragEnd: Me,
|
|
858
|
+
onDragOver: Ne,
|
|
859
|
+
onDragLeave: Ie,
|
|
860
|
+
onDrop: Re
|
|
860
861
|
}), [
|
|
861
862
|
Q,
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
863
|
+
G,
|
|
864
|
+
ke,
|
|
865
|
+
ye,
|
|
865
866
|
s,
|
|
866
867
|
U,
|
|
867
868
|
o,
|
|
868
869
|
_,
|
|
869
870
|
v,
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
871
|
+
le,
|
|
872
|
+
ue,
|
|
873
|
+
D?.groupHeaderClassName,
|
|
874
|
+
D?.itemTitleClassName,
|
|
874
875
|
m?.itemIconBadgeClassName,
|
|
875
876
|
m?.taskBadgeClassName,
|
|
876
|
-
ve,
|
|
877
|
-
be,
|
|
878
877
|
xe,
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
878
|
+
q,
|
|
879
|
+
Ce,
|
|
880
|
+
je,
|
|
881
|
+
Me,
|
|
882
|
+
Ne,
|
|
883
|
+
Ie,
|
|
884
|
+
Re
|
|
885
|
+
]), $e = W.length === 0, et = W.length > 0 && X.length === 0;
|
|
886
|
+
return /* @__PURE__ */ B(d, {
|
|
886
887
|
isOpen: i,
|
|
887
888
|
isOverlay: g,
|
|
888
889
|
orientation: u.Left,
|
|
889
|
-
title:
|
|
890
|
+
title: N,
|
|
890
891
|
labels: {
|
|
891
|
-
ariaLabel:
|
|
892
|
-
closeLabel:
|
|
892
|
+
ariaLabel: N,
|
|
893
|
+
closeLabel: de
|
|
893
894
|
},
|
|
894
895
|
onClose: y,
|
|
895
896
|
styles: {
|
|
@@ -897,75 +898,77 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
897
898
|
background: E?.background,
|
|
898
899
|
border: E?.border
|
|
899
900
|
},
|
|
900
|
-
typography: { fontClassName:
|
|
901
|
+
typography: { fontClassName: D?.fontClassName },
|
|
901
902
|
bodyClassName: "flex flex-col overflow-hidden p-0 gap-3",
|
|
902
|
-
cssVars:
|
|
903
|
-
titleClassName:
|
|
904
|
-
headerClassName: "h-[64px]",
|
|
903
|
+
cssVars: Ve,
|
|
904
|
+
titleClassName: D?.fontClassName,
|
|
905
|
+
headerClassName: a("h-[64px]", j),
|
|
906
|
+
headerActionsClassName: te,
|
|
905
907
|
className: a(i ? "w-[324px] mobile:w-full" : "w-0", h)
|
|
906
908
|
},
|
|
907
909
|
rightActions: b,
|
|
908
910
|
children: [
|
|
909
|
-
/* @__PURE__ */
|
|
910
|
-
label:
|
|
911
|
+
/* @__PURE__ */ z(We, {
|
|
912
|
+
label: oe,
|
|
911
913
|
onClick: p,
|
|
912
|
-
labelClassName:
|
|
913
|
-
colors:
|
|
914
|
+
labelClassName: D?.newChatLabelClassName,
|
|
915
|
+
colors: k,
|
|
916
|
+
className: M
|
|
914
917
|
}),
|
|
915
|
-
/* @__PURE__ */
|
|
918
|
+
/* @__PURE__ */ z("div", {
|
|
916
919
|
role: "search",
|
|
917
|
-
className: "px-3 py-2",
|
|
918
|
-
children: /* @__PURE__ */
|
|
919
|
-
wrapperClassName: a(Z.search,
|
|
920
|
+
className: a("px-3 py-2", ge.search),
|
|
921
|
+
children: /* @__PURE__ */ z(O, {
|
|
922
|
+
wrapperClassName: a(Z.search, A),
|
|
920
923
|
value: U,
|
|
921
|
-
onChange:
|
|
922
|
-
placeholder:
|
|
923
|
-
clearLabel:
|
|
924
|
-
"aria-label":
|
|
924
|
+
onChange: Oe,
|
|
925
|
+
placeholder: V,
|
|
926
|
+
clearLabel: se,
|
|
927
|
+
"aria-label": V
|
|
925
928
|
})
|
|
926
929
|
}),
|
|
927
|
-
!w && /* @__PURE__ */
|
|
928
|
-
activeTab:
|
|
929
|
-
labels:
|
|
930
|
+
!w && /* @__PURE__ */ z(He, {
|
|
931
|
+
activeTab: pe,
|
|
932
|
+
labels: ce,
|
|
930
933
|
onChange: (e) => {
|
|
931
|
-
|
|
934
|
+
me(e), C?.(e);
|
|
932
935
|
},
|
|
933
|
-
tabClassName:
|
|
936
|
+
tabClassName: D?.tabClassName,
|
|
934
937
|
hiddenSources: T
|
|
935
938
|
}),
|
|
936
|
-
/* @__PURE__ */
|
|
939
|
+
/* @__PURE__ */ z("span", {
|
|
937
940
|
role: "status",
|
|
938
941
|
"aria-live": "polite",
|
|
939
942
|
className: "sr-only",
|
|
940
|
-
children: t ?
|
|
943
|
+
children: t ? ae : $e ? re : et ? ie : ""
|
|
941
944
|
}),
|
|
942
|
-
/* @__PURE__ */
|
|
943
|
-
className: "flex-1 overflow-hidden px-
|
|
944
|
-
children: t ? /* @__PURE__ */
|
|
945
|
+
/* @__PURE__ */ z("div", {
|
|
946
|
+
className: "flex-1 overflow-hidden px-3 py-1",
|
|
947
|
+
children: t ? /* @__PURE__ */ z("div", {
|
|
945
948
|
className: "flex flex-col gap-3 px-2 py-3",
|
|
946
|
-
children: Array.from({ length: 15 }, (e, t) => /* @__PURE__ */
|
|
949
|
+
children: Array.from({ length: 15 }, (e, t) => /* @__PURE__ */ z(ee, {
|
|
947
950
|
avatar: { size: 24 },
|
|
948
|
-
showTitle: { width:
|
|
951
|
+
showTitle: { width: Fe(t) },
|
|
949
952
|
paragraph: !1,
|
|
950
953
|
active: !0,
|
|
951
954
|
color: Z.skeletonColor
|
|
952
955
|
}, t))
|
|
953
|
-
}) :
|
|
954
|
-
listRef:
|
|
955
|
-
id:
|
|
956
|
+
}) : $e ? /* @__PURE__ */ z(c, { label: re }) : et ? /* @__PURE__ */ z(l, { label: ie }) : /* @__PURE__ */ z(Pe, {
|
|
957
|
+
listRef: be,
|
|
958
|
+
id: ye,
|
|
956
959
|
role: "list",
|
|
957
960
|
style: { height: "100%" },
|
|
958
|
-
rowComponent:
|
|
961
|
+
rowComponent: qe,
|
|
959
962
|
rowCount: Q.length,
|
|
960
|
-
rowHeight:
|
|
961
|
-
overscanCount:
|
|
962
|
-
onResize:
|
|
963
|
-
rowProps:
|
|
963
|
+
rowHeight: Le,
|
|
964
|
+
overscanCount: _e,
|
|
965
|
+
onResize: De,
|
|
966
|
+
rowProps: $
|
|
964
967
|
})
|
|
965
968
|
})
|
|
966
969
|
]
|
|
967
970
|
});
|
|
968
|
-
}),
|
|
971
|
+
}), Qe = 8e3, Q = "flex size-7 shrink-0 items-center justify-center", $ = {
|
|
969
972
|
root: "_root_11lia_1",
|
|
970
973
|
text: "_text_11lia_5",
|
|
971
974
|
textSecondary: "_textSecondary_11lia_9",
|
|
@@ -976,43 +979,43 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
976
979
|
warningIcon: "_warningIcon_11lia_35"
|
|
977
980
|
}, $e = ({ title: e, failedCount: t, isCollapsed: n, jobsId: r, labels: i, styles: o, onToggleCollapse: s, onClose: c }) => {
|
|
978
981
|
let l = o?.typography;
|
|
979
|
-
return /* @__PURE__ */
|
|
982
|
+
return /* @__PURE__ */ B("div", {
|
|
980
983
|
className: a($.divider, "mx-4 flex items-center justify-between py-3"),
|
|
981
|
-
children: [/* @__PURE__ */
|
|
984
|
+
children: [/* @__PURE__ */ B("div", {
|
|
982
985
|
className: "flex min-w-0 items-center gap-2",
|
|
983
|
-
children: [/* @__PURE__ */
|
|
986
|
+
children: [/* @__PURE__ */ z("span", {
|
|
984
987
|
className: a($.text, "truncate", l?.titleClassName || "dial-small-paragraph-semi-text"),
|
|
985
988
|
children: e
|
|
986
|
-
}), t > 0 && /* @__PURE__ */
|
|
989
|
+
}), t > 0 && /* @__PURE__ */ z("span", {
|
|
987
990
|
className: a($.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
991
|
children: t
|
|
989
992
|
})]
|
|
990
|
-
}), /* @__PURE__ */
|
|
993
|
+
}), /* @__PURE__ */ B("div", {
|
|
991
994
|
className: "flex shrink-0 items-center gap-1",
|
|
992
|
-
children: [/* @__PURE__ */
|
|
995
|
+
children: [/* @__PURE__ */ z(S, {
|
|
993
996
|
"aria-label": n ? i.expandQueueAriaLabel : i.collapseQueueAriaLabel,
|
|
994
997
|
size: y.Small,
|
|
995
998
|
"aria-expanded": !n,
|
|
996
999
|
"aria-controls": r,
|
|
997
|
-
icon:
|
|
1000
|
+
icon: z(n ? ue : le, {
|
|
998
1001
|
size: g.SM,
|
|
999
1002
|
className: $.textSecondary,
|
|
1000
1003
|
stroke: _,
|
|
1001
1004
|
"aria-hidden": !0
|
|
1002
1005
|
}),
|
|
1003
1006
|
onClick: s,
|
|
1004
|
-
className:
|
|
1005
|
-
}), /* @__PURE__ */
|
|
1007
|
+
className: Q
|
|
1008
|
+
}), /* @__PURE__ */ z(S, {
|
|
1006
1009
|
"aria-label": i.closeQueueAriaLabel,
|
|
1007
1010
|
size: y.Small,
|
|
1008
|
-
icon: /* @__PURE__ */
|
|
1011
|
+
icon: /* @__PURE__ */ z(he, {
|
|
1009
1012
|
size: g.SM,
|
|
1010
1013
|
className: $.textSecondary,
|
|
1011
1014
|
stroke: _,
|
|
1012
1015
|
"aria-hidden": !0
|
|
1013
1016
|
}),
|
|
1014
1017
|
onClick: c,
|
|
1015
|
-
className:
|
|
1018
|
+
className: Q
|
|
1016
1019
|
})]
|
|
1017
1020
|
})]
|
|
1018
1021
|
});
|
|
@@ -1021,30 +1024,30 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1021
1024
|
return et.some((e) => t.endsWith(e)) ? pe : t.endsWith(".json") ? me : fe;
|
|
1022
1025
|
}, nt = ({ job: t, labels: n, onCancel: r, styles: i }) => {
|
|
1023
1026
|
let o = i?.typography, s = tt(t.fileName), c = t.status === e.Canceled;
|
|
1024
|
-
return /* @__PURE__ */
|
|
1027
|
+
return /* @__PURE__ */ B("div", {
|
|
1025
1028
|
className: "group flex items-center gap-2 px-4 py-2",
|
|
1026
1029
|
children: [
|
|
1027
|
-
/* @__PURE__ */
|
|
1030
|
+
/* @__PURE__ */ z(s, {
|
|
1028
1031
|
size: g.SM,
|
|
1029
1032
|
stroke: _,
|
|
1030
1033
|
className: $.textSecondary,
|
|
1031
1034
|
"aria-hidden": !0
|
|
1032
1035
|
}),
|
|
1033
|
-
/* @__PURE__ */
|
|
1036
|
+
/* @__PURE__ */ z(b, {
|
|
1034
1037
|
text: t.fileName,
|
|
1035
1038
|
className: a(c ? $.textSecondary : $.text, o?.jobLabelClassName || "dial-small-text"),
|
|
1036
1039
|
contentClassName: "!z-[80]"
|
|
1037
1040
|
}),
|
|
1038
|
-
t.status === e.InProgress && /* @__PURE__ */
|
|
1041
|
+
t.status === e.InProgress && /* @__PURE__ */ B("div", {
|
|
1039
1042
|
className: a("flex size-7 shrink-0 items-center justify-center", "grid"),
|
|
1040
|
-
children: [/* @__PURE__ */
|
|
1043
|
+
children: [/* @__PURE__ */ z(A, {
|
|
1041
1044
|
size: g.SM,
|
|
1042
1045
|
ariaLabel: n.jobProgressAriaLabel(t.fileName),
|
|
1043
1046
|
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__ */
|
|
1047
|
+
}), /* @__PURE__ */ z(S, {
|
|
1045
1048
|
"aria-label": n.cancelJobAriaLabel(t.fileName),
|
|
1046
1049
|
size: y.Small,
|
|
1047
|
-
icon: /* @__PURE__ */
|
|
1050
|
+
icon: /* @__PURE__ */ z(he, {
|
|
1048
1051
|
size: g.SM,
|
|
1049
1052
|
className: $.textSecondary,
|
|
1050
1053
|
stroke: _,
|
|
@@ -1054,55 +1057,55 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1054
1057
|
className: "col-start-1 row-start-1 opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100"
|
|
1055
1058
|
})]
|
|
1056
1059
|
}),
|
|
1057
|
-
t.status === e.Success && /* @__PURE__ */
|
|
1060
|
+
t.status === e.Success && /* @__PURE__ */ z("span", {
|
|
1058
1061
|
className: "flex size-7 shrink-0 items-center justify-center",
|
|
1059
|
-
children: /* @__PURE__ */
|
|
1062
|
+
children: /* @__PURE__ */ z(H, {
|
|
1060
1063
|
size: g.SM,
|
|
1061
1064
|
stroke: _,
|
|
1062
1065
|
className: $.successIcon,
|
|
1063
1066
|
"aria-hidden": !0
|
|
1064
1067
|
})
|
|
1065
1068
|
}),
|
|
1066
|
-
t.status === e.Warning && /* @__PURE__ */
|
|
1067
|
-
tooltip: n.jobWarningMessage(t.warningCode),
|
|
1069
|
+
t.status === e.Warning && /* @__PURE__ */ z(j, {
|
|
1070
|
+
tooltip: n.jobWarningMessage(t.warningCode, t.warningNames),
|
|
1068
1071
|
contentClassName: "!z-[80]",
|
|
1069
1072
|
asChild: !0,
|
|
1070
|
-
children: /* @__PURE__ */
|
|
1073
|
+
children: /* @__PURE__ */ z("span", {
|
|
1071
1074
|
className: "flex size-7 shrink-0 items-center justify-center",
|
|
1072
1075
|
role: "img",
|
|
1073
|
-
"aria-label": n.jobWarningMessage(t.warningCode),
|
|
1076
|
+
"aria-label": n.jobWarningMessage(t.warningCode, t.warningNames),
|
|
1074
1077
|
tabIndex: 0,
|
|
1075
|
-
children: /* @__PURE__ */
|
|
1078
|
+
children: /* @__PURE__ */ z(V, {
|
|
1076
1079
|
size: g.SM,
|
|
1077
1080
|
className: $.warningIcon,
|
|
1078
1081
|
"aria-hidden": !0
|
|
1079
1082
|
})
|
|
1080
1083
|
})
|
|
1081
1084
|
}),
|
|
1082
|
-
t.status === e.Failed && /* @__PURE__ */
|
|
1085
|
+
t.status === e.Failed && /* @__PURE__ */ z(j, {
|
|
1083
1086
|
tooltip: n.jobErrorMessage(t.errorCode),
|
|
1084
1087
|
contentClassName: "!z-[80]",
|
|
1085
1088
|
asChild: !0,
|
|
1086
|
-
children: /* @__PURE__ */
|
|
1089
|
+
children: /* @__PURE__ */ z("span", {
|
|
1087
1090
|
className: "flex size-7 shrink-0 items-center justify-center",
|
|
1088
1091
|
role: "img",
|
|
1089
1092
|
"aria-label": n.jobErrorMessage(t.errorCode),
|
|
1090
1093
|
tabIndex: 0,
|
|
1091
|
-
children: /* @__PURE__ */
|
|
1094
|
+
children: /* @__PURE__ */ z(oe, {
|
|
1092
1095
|
size: g.SM,
|
|
1093
1096
|
className: $.errorIcon,
|
|
1094
1097
|
"aria-hidden": !0
|
|
1095
1098
|
})
|
|
1096
1099
|
})
|
|
1097
1100
|
}),
|
|
1098
|
-
c && /* @__PURE__ */
|
|
1101
|
+
c && /* @__PURE__ */ z("span", {
|
|
1099
1102
|
className: a($.textSecondary, "shrink-0", o?.canceledLabelClassName || "dial-small-text"),
|
|
1100
1103
|
children: n.canceledLabel
|
|
1101
1104
|
})
|
|
1102
1105
|
]
|
|
1103
1106
|
});
|
|
1104
|
-
}, rt = (e) => Math.round(e.reduce((e, t) => e + t.progress.percent, 0) / e.length), it = (t) => t.filter((t) => t.status !== e.InProgress).length, at = (e, t, n) => e && t ? n.closeQueueConfirmDescriptionMixed : t ? n.closeQueueConfirmDescriptionFailed : n.closeQueueConfirmDescriptionInProgress, ot =
|
|
1105
|
-
let [l, u] =
|
|
1107
|
+
}, rt = (e) => Math.round(e.reduce((e, t) => e + t.progress.percent, 0) / e.length), it = (t) => t.filter((t) => t.status !== e.InProgress).length, at = (e, t, n) => e && t ? n.closeQueueConfirmDescriptionMixed : t ? n.closeQueueConfirmDescriptionFailed : n.closeQueueConfirmDescriptionInProgress, ot = N(({ title: t, jobs: n, onClose: i, onCancel: o, labels: s, styles: c }) => {
|
|
1108
|
+
let [l, u] = R(!1), d = ne(), [f, p] = R(!1), g = c?.colors, _ = {
|
|
1106
1109
|
...r({
|
|
1107
1110
|
"--cp-transfer-queue-bg": g?.background,
|
|
1108
1111
|
"--cp-transfer-queue-text": g?.text,
|
|
@@ -1115,30 +1118,30 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1115
1118
|
"--cp-transfer-queue-failure-count-text": g?.failureCountText
|
|
1116
1119
|
}),
|
|
1117
1120
|
...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 =
|
|
1121
|
+
}, 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
1122
|
v || b ? p(!0) : i();
|
|
1120
1123
|
}, [
|
|
1121
1124
|
v,
|
|
1122
1125
|
b,
|
|
1123
1126
|
i
|
|
1124
|
-
]), C =
|
|
1127
|
+
]), C = P(() => {
|
|
1125
1128
|
p(!1), i();
|
|
1126
|
-
}, [i]), w =
|
|
1129
|
+
}, [i]), w = P(() => {
|
|
1127
1130
|
u((e) => !e);
|
|
1128
1131
|
}, []);
|
|
1129
|
-
if (
|
|
1132
|
+
if (F(() => {
|
|
1130
1133
|
if (!x) return;
|
|
1131
|
-
let e = setTimeout(i,
|
|
1134
|
+
let e = setTimeout(i, Qe);
|
|
1132
1135
|
return () => clearTimeout(e);
|
|
1133
1136
|
}, [x, i]), n.length === 0) return null;
|
|
1134
1137
|
let T = n.filter((t) => t.status === e.Failed).length;
|
|
1135
|
-
return /* @__PURE__ */
|
|
1138
|
+
return /* @__PURE__ */ B("div", {
|
|
1136
1139
|
role: "status",
|
|
1137
1140
|
"aria-live": "polite",
|
|
1138
1141
|
style: _,
|
|
1139
1142
|
className: a($.root, "w-[370px] max-w-[calc(100vw-2rem)] rounded-xl shadow-md", c?.rootClassName),
|
|
1140
1143
|
children: [
|
|
1141
|
-
/* @__PURE__ */
|
|
1144
|
+
/* @__PURE__ */ z($e, {
|
|
1142
1145
|
title: t,
|
|
1143
1146
|
failedCount: T,
|
|
1144
1147
|
isCollapsed: l,
|
|
@@ -1148,23 +1151,23 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1148
1151
|
onToggleCollapse: w,
|
|
1149
1152
|
onClose: S
|
|
1150
1153
|
}),
|
|
1151
|
-
l && v && /* @__PURE__ */
|
|
1154
|
+
l && v && /* @__PURE__ */ z(D, {
|
|
1152
1155
|
value: rt(n),
|
|
1153
1156
|
size: y.Small,
|
|
1154
1157
|
"aria-label": s.queueProgressAriaLabel,
|
|
1155
1158
|
"aria-valuetext": s.queueProgressValueText(it(n), n.length)
|
|
1156
1159
|
}),
|
|
1157
|
-
!l && /* @__PURE__ */
|
|
1160
|
+
!l && /* @__PURE__ */ z("div", {
|
|
1158
1161
|
id: d,
|
|
1159
1162
|
className: a("flex max-h-[40vh] flex-col overflow-y-auto py-1", c?.bodyClassName),
|
|
1160
|
-
children: n.map((e) => /* @__PURE__ */
|
|
1163
|
+
children: n.map((e) => /* @__PURE__ */ z(nt, {
|
|
1161
1164
|
job: e,
|
|
1162
1165
|
labels: s,
|
|
1163
1166
|
onCancel: o,
|
|
1164
1167
|
styles: c
|
|
1165
1168
|
}, e.id))
|
|
1166
1169
|
}),
|
|
1167
|
-
/* @__PURE__ */
|
|
1170
|
+
/* @__PURE__ */ z(m, {
|
|
1168
1171
|
open: f,
|
|
1169
1172
|
header: s.closeQueueConfirmHeader,
|
|
1170
1173
|
description: at(v, b, s),
|
|
@@ -1180,30 +1183,30 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1180
1183
|
ot.displayName = "ImportExportQueue";
|
|
1181
1184
|
//#endregion
|
|
1182
1185
|
//#region src/components/RenameConversationPopup/RenameConversationPopup.tsx
|
|
1183
|
-
var st =
|
|
1184
|
-
let [f, m] =
|
|
1185
|
-
|
|
1186
|
-
let n = e && !
|
|
1187
|
-
if (
|
|
1186
|
+
var st = N(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: a, onCancel: c, onGenerateWithAi: l, labels: u, styles: d }) => {
|
|
1187
|
+
let [f, m] = R(t), [h, v] = R(!1), [y, b] = R(null), x = L(null), C = L(!1), D = L(0);
|
|
1188
|
+
F(() => {
|
|
1189
|
+
let n = e && !C.current;
|
|
1190
|
+
if (C.current = e, !e) {
|
|
1188
1191
|
D.current += 1, v(!1);
|
|
1189
1192
|
return;
|
|
1190
1193
|
}
|
|
1191
1194
|
if (!n) return;
|
|
1192
1195
|
D.current += 1, m(t), b(null), v(!1);
|
|
1193
|
-
let r = setTimeout(() =>
|
|
1196
|
+
let r = setTimeout(() => x.current?.focus(), 0);
|
|
1194
1197
|
return () => clearTimeout(r);
|
|
1195
|
-
}, [e, t]),
|
|
1198
|
+
}, [e, t]), F(() => () => {
|
|
1196
1199
|
D.current += 1;
|
|
1197
1200
|
}, []);
|
|
1198
|
-
let O = s(f.trim()),
|
|
1199
|
-
|
|
1201
|
+
let O = s(f.trim()), ee = i(O) > 255, k = n || O === "" || O === t.trim() || ee, j = P(() => {
|
|
1202
|
+
k || a(O);
|
|
1200
1203
|
}, [
|
|
1201
|
-
|
|
1204
|
+
k,
|
|
1202
1205
|
a,
|
|
1203
1206
|
O
|
|
1204
|
-
]),
|
|
1205
|
-
e.key === "Enter" &&
|
|
1206
|
-
}, [
|
|
1207
|
+
]), te = P((e) => {
|
|
1208
|
+
e.key === "Enter" && j();
|
|
1209
|
+
}, [j]), M = P(async () => {
|
|
1207
1210
|
if (h) return;
|
|
1208
1211
|
let e = ++D.current;
|
|
1209
1212
|
v(!0), b(null);
|
|
@@ -1221,11 +1224,11 @@ var st = P(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: a, onCa
|
|
|
1221
1224
|
h,
|
|
1222
1225
|
l,
|
|
1223
1226
|
u.renameWithAiError
|
|
1224
|
-
]),
|
|
1225
|
-
return
|
|
1227
|
+
]), N;
|
|
1228
|
+
return N = ee ? u.nameTooLongError : y ?? r ?? void 0, /* @__PURE__ */ z(T, {
|
|
1226
1229
|
open: e,
|
|
1227
1230
|
header: u.popupTitle,
|
|
1228
|
-
size:
|
|
1231
|
+
size: E.Sm,
|
|
1229
1232
|
onClose: c,
|
|
1230
1233
|
mainButtons: n ? void 0 : [{
|
|
1231
1234
|
label: u.cancelLabel,
|
|
@@ -1233,33 +1236,33 @@ var st = P(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: a, onCa
|
|
|
1233
1236
|
}, {
|
|
1234
1237
|
label: u.saveLabel,
|
|
1235
1238
|
variant: p.Primary,
|
|
1236
|
-
disabled:
|
|
1237
|
-
onClick:
|
|
1239
|
+
disabled: k,
|
|
1240
|
+
onClick: j
|
|
1238
1241
|
}],
|
|
1239
|
-
children: /* @__PURE__ */
|
|
1242
|
+
children: /* @__PURE__ */ z("div", {
|
|
1240
1243
|
className: d?.bodyClassName,
|
|
1241
1244
|
style: d?.cssVars,
|
|
1242
|
-
children: n ? /* @__PURE__ */
|
|
1245
|
+
children: n ? /* @__PURE__ */ z("div", {
|
|
1243
1246
|
className: "h-[120px] px-6 py-4",
|
|
1244
|
-
children: /* @__PURE__ */
|
|
1245
|
-
}) : /* @__PURE__ */
|
|
1247
|
+
children: /* @__PURE__ */ z(A, { size: 50 })
|
|
1248
|
+
}) : /* @__PURE__ */ B("div", {
|
|
1246
1249
|
className: "flex items-start gap-2 px-6 py-3",
|
|
1247
|
-
children: [/* @__PURE__ */
|
|
1250
|
+
children: [/* @__PURE__ */ z("div", {
|
|
1248
1251
|
className: "min-w-0 flex-1",
|
|
1249
|
-
children: /* @__PURE__ */
|
|
1250
|
-
inputRef:
|
|
1252
|
+
children: /* @__PURE__ */ z(w, {
|
|
1253
|
+
inputRef: x,
|
|
1251
1254
|
value: f,
|
|
1252
1255
|
placeholder: u.inputPlaceholder,
|
|
1253
|
-
error:
|
|
1256
|
+
error: N,
|
|
1254
1257
|
onChange: (e) => m(o(e ?? "")),
|
|
1255
|
-
onKeyDown:
|
|
1258
|
+
onKeyDown: te
|
|
1256
1259
|
})
|
|
1257
|
-
}), /* @__PURE__ */
|
|
1260
|
+
}), /* @__PURE__ */ z(S, {
|
|
1258
1261
|
"aria-label": u.renameWithAiLabel,
|
|
1259
1262
|
tooltipProps: { tooltip: u.renameWithAiLabel },
|
|
1260
1263
|
disabled: h || n,
|
|
1261
|
-
onClick:
|
|
1262
|
-
icon: h ? /* @__PURE__ */
|
|
1264
|
+
onClick: M,
|
|
1265
|
+
icon: h ? /* @__PURE__ */ z(A, { size: g.MD }) : /* @__PURE__ */ z(G, {
|
|
1263
1266
|
size: g.MD,
|
|
1264
1267
|
stroke: _
|
|
1265
1268
|
})
|
|
@@ -1270,4 +1273,4 @@ var st = P(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: a, onCa
|
|
|
1270
1273
|
});
|
|
1271
1274
|
st.displayName = "RenameConversationPopup";
|
|
1272
1275
|
//#endregion
|
|
1273
|
-
export {
|
|
1276
|
+
export { ge as CONVERSATION_PANEL_CLASS, Ze as ConversationPanel, ot as ImportExportQueue, st as RenameConversationPopup, tt as getTransferFileIcon };
|