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