@epam/ai-dial-conversation-panel 1.1.0-dev.297 → 1.1.0-dev.299
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/ConversationRow/ConversationRow.d.ts.map +1 -1
- package/components/ImportExportQueue/ImportExportQueue.d.ts.map +1 -1
- package/components/NewChatButton/NewChatButton.d.ts.map +1 -1
- package/components/RenameConversationPopup/RenameConversationPopup.d.ts.map +1 -1
- package/index.css +1 -1
- package/index.js +350 -346
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ConversationTransferJobStatus as e, ConversationTransferSubjectKind as t, DeploymentIcon as n, FilterTab as r, buildCssVars as i, getUtf8ByteLength as a, mergeClasses as o, sanitizeConversationName as s, stripTrailingDots as c } from "@epam/ai-dial-chat-shared";
|
|
2
2
|
import { PanelEmpty as l, PanelNoResults as u, SidebarOrientation as d, SidebarPanel as f } from "@epam/ai-dial-sidebar";
|
|
3
|
-
import { Button as p, ButtonVariant as m, ConfirmationPopup as h, ConfirmationPopupVariant as g, DIAL_ICON_SIZE as _,
|
|
4
|
-
import { createElement as
|
|
5
|
-
import { Fragment as ae, jsx as
|
|
6
|
-
import { IconAlertCircleFilled as
|
|
3
|
+
import { Button as p, ButtonVariant as m, ConfirmationPopup as h, ConfirmationPopupVariant as g, DIAL_ICON_SIZE as _, DIAL_KIT_ICON_STROKE as v, Dropdown as y, ElementSize as b, EllipsisTooltip 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, Tag as j, TagAppearance as te, mergeClasses as M } from "@epam/ai-dial-ui-kit";
|
|
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
|
+
import { Fragment as ae, jsx as B, jsxs as V } from "react/jsx-runtime";
|
|
6
|
+
import { IconAlertCircleFilled as H, IconCaretDownFilled as U, IconCaretRightFilled as oe, IconChevronDown as se, IconChevronUp as ce, IconCircleCheckFilled as W, IconClock as le, IconDotsVertical as ue, IconPlus as de, IconRefresh as fe, IconSparkles as pe, IconX as me } from "@tabler/icons-react";
|
|
7
7
|
//#region ../../node_modules/react-window/dist/react-window.js
|
|
8
|
-
var G = typeof window < "u" ?
|
|
9
|
-
function
|
|
8
|
+
var G = typeof window < "u" ? ie : F;
|
|
9
|
+
function he(e) {
|
|
10
10
|
if (e !== void 0) switch (typeof e) {
|
|
11
11
|
case "number": return e;
|
|
12
12
|
case "string":
|
|
@@ -14,11 +14,11 @@ function me(e) {
|
|
|
14
14
|
break;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
let { styleHeight: s, styleWidth: c } =
|
|
19
|
-
styleHeight:
|
|
20
|
-
styleWidth:
|
|
21
|
-
}), [o?.height, o?.width]), [l, u] =
|
|
17
|
+
function ge({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
|
|
18
|
+
let { styleHeight: s, styleWidth: c } = L(() => ({
|
|
19
|
+
styleHeight: he(o?.height),
|
|
20
|
+
styleWidth: he(o?.width)
|
|
21
|
+
}), [o?.height, o?.width]), [l, u] = z({
|
|
22
22
|
height: t,
|
|
23
23
|
width: n
|
|
24
24
|
}), d = r || a === "only-height" && s !== void 0 || a === "only-width" && c !== void 0 || s !== void 0 && c !== void 0;
|
|
@@ -42,7 +42,7 @@ function he({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
|
|
|
42
42
|
i,
|
|
43
43
|
s,
|
|
44
44
|
c
|
|
45
|
-
]),
|
|
45
|
+
]), L(() => ({
|
|
46
46
|
height: s ?? l.height,
|
|
47
47
|
width: c ?? l.width
|
|
48
48
|
}), [
|
|
@@ -51,16 +51,16 @@ function he({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
|
|
|
51
51
|
c
|
|
52
52
|
]);
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
let t =
|
|
54
|
+
function _e(e) {
|
|
55
|
+
let t = R(() => {
|
|
56
56
|
throw Error("Cannot call during render.");
|
|
57
57
|
});
|
|
58
58
|
return G(() => {
|
|
59
59
|
t.current = e;
|
|
60
|
-
}, [e]),
|
|
60
|
+
}, [e]), P((e) => t.current?.(e), [t]);
|
|
61
61
|
}
|
|
62
62
|
var K = null;
|
|
63
|
-
function
|
|
63
|
+
function ve(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 _e(e = !1) {
|
|
|
69
69
|
}
|
|
70
70
|
return K;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
if (t === "horizontal" && n) switch (
|
|
72
|
+
function ye({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
|
|
73
|
+
if (t === "horizontal" && n) switch (ve()) {
|
|
74
74
|
case "negative": return -r;
|
|
75
75
|
case "positive-descending":
|
|
76
76
|
if (e) {
|
|
@@ -84,13 +84,13 @@ function ve({ 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 be(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 xe({ 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 ye({ 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 Se({ 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 = xe({
|
|
104
104
|
cachedBounds: t,
|
|
105
105
|
itemCount: r,
|
|
106
106
|
itemSize: i
|
|
@@ -112,7 +112,7 @@ function be({ 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 J({ 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 xe({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemC
|
|
|
131
131
|
stopIndexOverscan: l
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function Ce({ 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 Se({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
return
|
|
171
|
+
function we({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
172
|
+
return L(() => Ce({
|
|
173
173
|
itemCount: e,
|
|
174
174
|
itemProps: t,
|
|
175
175
|
itemSize: n
|
|
@@ -179,7 +179,7 @@ function Ce({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
|
179
179
|
n
|
|
180
180
|
]);
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function Te({ containerSize: e, itemSize: t }) {
|
|
183
183
|
let n;
|
|
184
184
|
switch (typeof t) {
|
|
185
185
|
case "string":
|
|
@@ -191,21 +191,21 @@ function we({ containerSize: e, itemSize: t }) {
|
|
|
191
191
|
}
|
|
192
192
|
return n;
|
|
193
193
|
}
|
|
194
|
-
function
|
|
195
|
-
let { height: u = n, width: d = n } =
|
|
194
|
+
function Ee({ 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 } = ge({
|
|
196
196
|
defaultHeight: r === "vertical" ? n : void 0,
|
|
197
197
|
defaultWidth: r === "horizontal" ? n : void 0,
|
|
198
198
|
element: e,
|
|
199
199
|
mode: r === "vertical" ? "only-height" : "only-width",
|
|
200
200
|
style: t
|
|
201
|
-
}), f =
|
|
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 = Te({
|
|
205
205
|
containerSize: p,
|
|
206
206
|
itemSize: s
|
|
207
207
|
});
|
|
208
|
-
|
|
208
|
+
ie(() => {
|
|
209
209
|
if (typeof c == "function") {
|
|
210
210
|
let e = f.current;
|
|
211
211
|
(e.height !== u || e.width !== d) && (c({
|
|
@@ -218,11 +218,11 @@ function Te({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
218
218
|
c,
|
|
219
219
|
d
|
|
220
220
|
]);
|
|
221
|
-
let h =
|
|
221
|
+
let h = we({
|
|
222
222
|
itemCount: a,
|
|
223
223
|
itemProps: o,
|
|
224
224
|
itemSize: m
|
|
225
|
-
}), g =
|
|
225
|
+
}), g = P((e) => h.get(e), [h]), [_, v] = z(() => J({
|
|
226
226
|
cachedBounds: h,
|
|
227
227
|
containerScrollOffset: 0,
|
|
228
228
|
containerSize: p,
|
|
@@ -233,7 +233,7 @@ function Te({ 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 =
|
|
236
|
+
}, C = P(() => xe({
|
|
237
237
|
cachedBounds: h,
|
|
238
238
|
itemCount: a,
|
|
239
239
|
itemSize: m
|
|
@@ -241,9 +241,9 @@ function Te({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
241
241
|
h,
|
|
242
242
|
a,
|
|
243
243
|
m
|
|
244
|
-
]), w =
|
|
244
|
+
]), w = P((t) => J({
|
|
245
245
|
cachedBounds: h,
|
|
246
|
-
containerScrollOffset:
|
|
246
|
+
containerScrollOffset: ye({
|
|
247
247
|
containerElement: e,
|
|
248
248
|
direction: r,
|
|
249
249
|
isRtl: i,
|
|
@@ -271,9 +271,9 @@ function Te({ 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 = J({
|
|
275
275
|
cachedBounds: h,
|
|
276
|
-
containerScrollOffset:
|
|
276
|
+
containerScrollOffset: ye({
|
|
277
277
|
containerElement: e,
|
|
278
278
|
direction: r,
|
|
279
279
|
isRtl: i,
|
|
@@ -283,7 +283,7 @@ function Te({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
283
283
|
itemCount: a,
|
|
284
284
|
overscanCount: l
|
|
285
285
|
});
|
|
286
|
-
return
|
|
286
|
+
return be(s, t) ? t : s;
|
|
287
287
|
});
|
|
288
288
|
};
|
|
289
289
|
return e.addEventListener("scroll", t), () => {
|
|
@@ -299,8 +299,8 @@ function Te({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
299
299
|
]), {
|
|
300
300
|
getCellBounds: g,
|
|
301
301
|
getEstimatedSize: C,
|
|
302
|
-
scrollToIndex:
|
|
303
|
-
let s =
|
|
302
|
+
scrollToIndex: _e(({ align: t = "auto", containerScrollOffset: n, index: o }) => {
|
|
303
|
+
let s = Se({
|
|
304
304
|
align: t,
|
|
305
305
|
cachedBounds: h,
|
|
306
306
|
containerScrollOffset: n,
|
|
@@ -310,14 +310,14 @@ function Te({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
310
310
|
itemSize: m
|
|
311
311
|
});
|
|
312
312
|
if (e) {
|
|
313
|
-
if (s =
|
|
313
|
+
if (s = ye({
|
|
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
|
+
be(_, e) || v(e);
|
|
321
321
|
}
|
|
322
322
|
return s;
|
|
323
323
|
}
|
|
@@ -328,30 +328,30 @@ function Te({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
328
328
|
stopIndexVisible: x
|
|
329
329
|
};
|
|
330
330
|
}
|
|
331
|
-
function
|
|
332
|
-
return
|
|
331
|
+
function De(e) {
|
|
332
|
+
return L(() => e, Object.values(e));
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function Oe(e, t) {
|
|
335
335
|
let { ariaAttributes: n, style: r, ...i } = e, { ariaAttributes: a, style: o, ...s } = t;
|
|
336
|
-
return
|
|
336
|
+
return be(n, a) && be(r, o) && be(i, s);
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function Y(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 ke = "data-react-window-index";
|
|
342
|
+
function Ae({ 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 = De(u), h = L(() => N(s, Oe), [s]), [g, _] = z(null), v = Y(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = Ee({
|
|
344
344
|
containerElement: g,
|
|
345
345
|
containerStyle: f,
|
|
346
346
|
defaultContainerSize: n,
|
|
347
347
|
direction: "vertical",
|
|
348
348
|
itemCount: c,
|
|
349
349
|
itemProps: m,
|
|
350
|
-
itemSize:
|
|
350
|
+
itemSize: L(() => v ? (e) => l.getRowHeight(e) ?? l.getAverageRowHeight() : l, [v, l]),
|
|
351
351
|
onResize: i,
|
|
352
352
|
overscanCount: o
|
|
353
353
|
});
|
|
354
|
-
|
|
354
|
+
I(r, () => ({
|
|
355
355
|
get element() {
|
|
356
356
|
return g;
|
|
357
357
|
},
|
|
@@ -371,7 +371,7 @@ function ke({ 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(ke, n), !0;
|
|
375
375
|
});
|
|
376
376
|
if (v) return l.observeRowElements(e);
|
|
377
377
|
}, [
|
|
@@ -380,7 +380,7 @@ function ke({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
|
|
|
380
380
|
l,
|
|
381
381
|
S,
|
|
382
382
|
w
|
|
383
|
-
]),
|
|
383
|
+
]), F(() => {
|
|
384
384
|
S >= 0 && w >= 0 && a && a({
|
|
385
385
|
startIndex: C,
|
|
386
386
|
stopIndex: T
|
|
@@ -395,11 +395,11 @@ function ke({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
|
|
|
395
395
|
w,
|
|
396
396
|
T
|
|
397
397
|
]);
|
|
398
|
-
let E =
|
|
398
|
+
let E = L(() => {
|
|
399
399
|
let e = [];
|
|
400
400
|
if (c > 0) for (let t = S; t <= w; t++) {
|
|
401
401
|
let n = y(t);
|
|
402
|
-
e.push(/* @__PURE__ */
|
|
402
|
+
e.push(/* @__PURE__ */ ne(h, {
|
|
403
403
|
...m,
|
|
404
404
|
ariaAttributes: {
|
|
405
405
|
"aria-posinset": t + 1,
|
|
@@ -426,7 +426,7 @@ function ke({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
|
|
|
426
426
|
m,
|
|
427
427
|
S,
|
|
428
428
|
w
|
|
429
|
-
]), D = /* @__PURE__ */
|
|
429
|
+
]), D = /* @__PURE__ */ B("div", {
|
|
430
430
|
"aria-hidden": !0,
|
|
431
431
|
style: {
|
|
432
432
|
height: b(),
|
|
@@ -434,7 +434,7 @@ function ke({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
|
|
|
434
434
|
zIndex: -1
|
|
435
435
|
}
|
|
436
436
|
});
|
|
437
|
-
return
|
|
437
|
+
return ne(d, {
|
|
438
438
|
role: "list",
|
|
439
439
|
...p,
|
|
440
440
|
className: t,
|
|
@@ -452,25 +452,25 @@ function ke({ 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
|
+
}({}), je = (e) => `${60 + e * 23 % 35}%`, Me = (e, t) => e ? t ? "pe-9" : "pe-2 group-hover/conversation:pe-9" : "pe-3", Ne = (e, t) => t.rows[e].kind === X.Item ? 36 : e === 0 ? 24 : 56, Pe = (e) => {
|
|
456
456
|
switch (e) {
|
|
457
457
|
case r.Shared: return r.Shared;
|
|
458
458
|
case r.Organization: return r.Organization;
|
|
459
459
|
default: return r.MyChats;
|
|
460
460
|
}
|
|
461
|
-
},
|
|
461
|
+
}, Fe = (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
|
+
}, Ie = (e, t, n) => {
|
|
467
467
|
let i = /* @__PURE__ */ new Set();
|
|
468
468
|
if (t != null && i.add(t), t === r.Pinned) {
|
|
469
469
|
let t = n.find((t) => t.id === e);
|
|
470
|
-
t && i.add(
|
|
470
|
+
t && i.add(Pe(t.source));
|
|
471
471
|
} else i.add(r.Pinned);
|
|
472
472
|
return i;
|
|
473
|
-
},
|
|
473
|
+
}, Le = (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,7 +480,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
480
480
|
a = e.item.id;
|
|
481
481
|
}
|
|
482
482
|
return null;
|
|
483
|
-
},
|
|
483
|
+
}, Re = [
|
|
484
484
|
{
|
|
485
485
|
value: r.All,
|
|
486
486
|
labelKey: "all"
|
|
@@ -497,50 +497,50 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
497
497
|
value: r.Organization,
|
|
498
498
|
labelKey: "organization"
|
|
499
499
|
}
|
|
500
|
-
],
|
|
500
|
+
], ze = 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: Re.map(({ value: i, labelKey: a }) => /* @__PURE__ */ B(j, {
|
|
505
505
|
label: t[a],
|
|
506
506
|
appearance: te.Selectable,
|
|
507
507
|
selected: e === i,
|
|
508
508
|
onClick: () => n(i),
|
|
509
|
-
className:
|
|
509
|
+
className: M("flex-1 justify-center rounded-full", r)
|
|
510
510
|
}, i))
|
|
511
|
-
})),
|
|
511
|
+
})), Z = { button: "_button_8xsgo_1" }, Be = N(({ label: e, onClick: t, labelClassName: n = "dial-small-semi-text", colors: r }) => /* @__PURE__ */ B("div", {
|
|
512
512
|
className: "px-3 py-2",
|
|
513
513
|
style: i({
|
|
514
514
|
"--cp-new-chat-bg": r?.background,
|
|
515
515
|
"--cp-new-chat-text": r?.text,
|
|
516
516
|
"--cp-new-chat-focus-outline": r?.focusOutline
|
|
517
517
|
}),
|
|
518
|
-
children: /* @__PURE__ */
|
|
518
|
+
children: /* @__PURE__ */ V("button", {
|
|
519
519
|
onClick: t,
|
|
520
520
|
type: "button",
|
|
521
|
-
className: o("flex h-[36px] w-full cursor-pointer items-center justify-center gap-2 rounded-full px-3 py-1 shadow-
|
|
522
|
-
children: [/* @__PURE__ */
|
|
521
|
+
className: o("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", Z.button),
|
|
522
|
+
children: [/* @__PURE__ */ B(de, {
|
|
523
523
|
size: 18,
|
|
524
|
-
stroke:
|
|
524
|
+
stroke: v,
|
|
525
525
|
className: "shrink-0"
|
|
526
|
-
}), /* @__PURE__ */
|
|
526
|
+
}), /* @__PURE__ */ B("span", {
|
|
527
527
|
className: n,
|
|
528
528
|
children: e
|
|
529
529
|
})]
|
|
530
530
|
})
|
|
531
|
-
})),
|
|
531
|
+
})), Q = {
|
|
532
532
|
skeletonColor: "var(--cp-skeleton-color, var(--bg-control-disable-primary, #dce0e8))",
|
|
533
|
-
item: "
|
|
534
|
-
itemActive: "
|
|
535
|
-
groupHeader: "
|
|
536
|
-
taskBadge: "
|
|
537
|
-
dropZoneActive: "
|
|
538
|
-
triggerActive: "
|
|
539
|
-
triggerIcon: "
|
|
540
|
-
unreadDot: "
|
|
541
|
-
},
|
|
533
|
+
item: "_item_1c8qk_1",
|
|
534
|
+
itemActive: "_itemActive_1c8qk_7",
|
|
535
|
+
groupHeader: "_groupHeader_1c8qk_12",
|
|
536
|
+
taskBadge: "_taskBadge_1c8qk_16",
|
|
537
|
+
dropZoneActive: "_dropZoneActive_1c8qk_22",
|
|
538
|
+
triggerActive: "_triggerActive_1c8qk_27",
|
|
539
|
+
triggerIcon: "_triggerIcon_1c8qk_30",
|
|
540
|
+
unreadDot: "_unreadDot_1c8qk_38"
|
|
541
|
+
}, Ve = ({ label: e, isExpanded: t, onToggle: n, listId: r, className: i = "dial-tiny-lead-text", dropZoneGroupKey: a, isDragOver: s, onDragOver: c, onDragLeave: l, onDrop: u }) => {
|
|
542
542
|
let d = a != null;
|
|
543
|
-
return /* @__PURE__ */
|
|
543
|
+
return /* @__PURE__ */ V("button", {
|
|
544
544
|
type: "button",
|
|
545
545
|
"aria-expanded": t,
|
|
546
546
|
"aria-controls": r,
|
|
@@ -554,126 +554,126 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
554
554
|
onDrop: d ? (e) => {
|
|
555
555
|
d && (e.preventDefault(), u?.(a, a, null));
|
|
556
556
|
} : void 0,
|
|
557
|
-
className: o("flex h-6 w-full items-center gap-1 rounded py-1 pe-3 text-start", i,
|
|
558
|
-
children: [t ? /* @__PURE__ */
|
|
559
|
-
stroke: .5,
|
|
557
|
+
className: o("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(U, {
|
|
560
559
|
size: 12,
|
|
561
560
|
className: "shrink-0",
|
|
562
561
|
"aria-hidden": !0
|
|
563
|
-
}) : /* @__PURE__ */
|
|
564
|
-
stroke: .5,
|
|
562
|
+
}) : /* @__PURE__ */ B(oe, {
|
|
565
563
|
size: 12,
|
|
566
564
|
className: "shrink-0 rtl:scale-x-[-1]",
|
|
567
565
|
"aria-hidden": !0
|
|
568
|
-
}), /* @__PURE__ */
|
|
566
|
+
}), /* @__PURE__ */ B(x, { text: e })]
|
|
569
567
|
});
|
|
570
|
-
},
|
|
571
|
-
let [
|
|
572
|
-
te(t), t &&
|
|
573
|
-
}, [e, s]),
|
|
574
|
-
variant:
|
|
568
|
+
}, He = ({ item: e, isActive: t, onSelectConversation: r, searchQuery: i = "", getActions: a, onActionMenuOpen: s, actionsLabel: c = "More actions", itemTitleClassName: l = "dial-small-text", itemIconBadgeClassName: u, taskBadgeClassName: d = "dial-caption-lead-semi-text", unreadIndicatorLabel: f = "Unread", rowGroupKey: m, rows: h, draggingId: g, dragOverId: x, allowedDropGroups: w, onDragStart: T, onDragEnd: E, onDragOver: D, onDragLeave: O, onDrop: A }) => {
|
|
569
|
+
let [j, te] = z(!1), M = R(null), ne = P((t) => {
|
|
570
|
+
te(t), t && M.current && s?.(e, M.current);
|
|
571
|
+
}, [e, s]), N = a?.(e) ?? [], F = N.length > 0, re = e.isIconLoading ? /* @__PURE__ */ B(ee, {
|
|
572
|
+
variant: k.Circular,
|
|
575
573
|
width: _.LG,
|
|
576
574
|
height: _.LG,
|
|
577
|
-
color:
|
|
575
|
+
color: Q.skeletonColor,
|
|
578
576
|
"aria-hidden": !0
|
|
579
|
-
}) : /* @__PURE__ */
|
|
577
|
+
}) : /* @__PURE__ */ B(n, {
|
|
580
578
|
src: e.iconUrl,
|
|
581
579
|
size: _.LG,
|
|
582
580
|
initialsName: e.iconTooltip ?? "",
|
|
583
581
|
labels: { tooltip: e.iconTooltip },
|
|
584
582
|
styles: { badgeClassName: u }
|
|
585
|
-
}),
|
|
583
|
+
}), I = /* @__PURE__ */ V("span", {
|
|
586
584
|
className: "flex shrink-0 items-center",
|
|
587
|
-
children: [/* @__PURE__ */
|
|
585
|
+
children: [/* @__PURE__ */ B("span", {
|
|
588
586
|
className: "relative flex size-3 shrink-0 items-center justify-center",
|
|
589
|
-
children: e.isUnread && /* @__PURE__ */
|
|
590
|
-
className: o("size-[5.33px] rounded-full",
|
|
587
|
+
children: e.isUnread && /* @__PURE__ */ V(ae, { children: [/* @__PURE__ */ B("span", {
|
|
588
|
+
className: o("size-[5.33px] rounded-full", Q.unreadDot),
|
|
591
589
|
"aria-hidden": !0
|
|
592
|
-
}), /* @__PURE__ */
|
|
590
|
+
}), /* @__PURE__ */ B("span", {
|
|
593
591
|
className: "sr-only",
|
|
594
592
|
children: f
|
|
595
593
|
})] })
|
|
596
594
|
}), re]
|
|
597
|
-
}),
|
|
598
|
-
className: o("flex h-5 shrink-0 items-center justify-center gap-0.5 rounded-full border pe-2 ps-1",
|
|
599
|
-
children: [/* @__PURE__ */
|
|
595
|
+
}), ie = Me(F, j), L = e.showTaskBadge ? /* @__PURE__ */ V("span", {
|
|
596
|
+
className: o("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(le, {
|
|
600
598
|
size: 12,
|
|
601
|
-
"aria-hidden": !0
|
|
599
|
+
"aria-hidden": !0,
|
|
600
|
+
stroke: v
|
|
602
601
|
}), e.taskBadgeLabel]
|
|
603
|
-
}) : void 0,
|
|
604
|
-
e.currentTarget.contains(e.relatedTarget) ||
|
|
605
|
-
}, [
|
|
606
|
-
if (!m || !h || !
|
|
602
|
+
}) : void 0, H = m != null, U = P((e) => {
|
|
603
|
+
e.currentTarget.contains(e.relatedTarget) || O?.();
|
|
604
|
+
}, [O]), oe = P((t) => {
|
|
605
|
+
if (!m || !h || !A) return;
|
|
607
606
|
t.preventDefault();
|
|
608
|
-
let n =
|
|
609
|
-
|
|
607
|
+
let n = Le(t, e.id, h, m);
|
|
608
|
+
A(e.id, m, n);
|
|
610
609
|
}, [
|
|
611
610
|
e.id,
|
|
612
611
|
h,
|
|
613
612
|
m,
|
|
614
|
-
|
|
615
|
-
]), se = e.id === g, ce = e.id ===
|
|
616
|
-
return /* @__PURE__ */
|
|
617
|
-
className: o("group/conversation relative", se && "cursor-grabbing opacity-50", ce &&
|
|
618
|
-
draggable:
|
|
619
|
-
onDragStart:
|
|
620
|
-
onDragEnd:
|
|
621
|
-
onDragOver:
|
|
622
|
-
t.preventDefault(),
|
|
613
|
+
A
|
|
614
|
+
]), se = e.id === g, ce = e.id === x, W = m != null && (w?.has(m) ?? !1), de = g != null;
|
|
615
|
+
return /* @__PURE__ */ V("li", {
|
|
616
|
+
className: o("group/conversation relative", se && "cursor-grabbing opacity-50", ce && W && "rounded", ce && W && Q.dropZoneActive, de && !se && !W && "cursor-not-allowed"),
|
|
617
|
+
draggable: H || void 0,
|
|
618
|
+
onDragStart: H ? () => T?.(e.id) : void 0,
|
|
619
|
+
onDragEnd: H ? E : void 0,
|
|
620
|
+
onDragOver: H ? (t) => {
|
|
621
|
+
t.preventDefault(), D?.(e.id);
|
|
623
622
|
} : void 0,
|
|
624
|
-
onDragLeave:
|
|
625
|
-
onDrop:
|
|
626
|
-
children: [/* @__PURE__ */
|
|
623
|
+
onDragLeave: H ? U : void 0,
|
|
624
|
+
onDrop: H ? oe : void 0,
|
|
625
|
+
children: [/* @__PURE__ */ B("a", {
|
|
627
626
|
href: e.href,
|
|
628
627
|
className: "contents",
|
|
629
628
|
onClick: (t) => {
|
|
630
629
|
e.href && (t.preventDefault(), r(e.id));
|
|
631
630
|
},
|
|
632
|
-
children: /* @__PURE__ */
|
|
633
|
-
iconBefore:
|
|
634
|
-
label: /* @__PURE__ */
|
|
631
|
+
children: /* @__PURE__ */ B(p, {
|
|
632
|
+
iconBefore: I,
|
|
633
|
+
label: /* @__PURE__ */ B(C, {
|
|
635
634
|
text: e.title,
|
|
636
635
|
query: i,
|
|
637
636
|
className: l,
|
|
638
637
|
maxLines: 1
|
|
639
638
|
}),
|
|
640
|
-
iconAfter:
|
|
639
|
+
iconAfter: L,
|
|
641
640
|
textClassName: "min-w-0 flex-1",
|
|
642
641
|
"aria-current": t ? "page" : void 0,
|
|
643
642
|
onClick: e.href ? void 0 : () => r(e.id),
|
|
644
643
|
tabIndex: e.href ? -1 : void 0,
|
|
645
|
-
className: o("h-8 w-full justify-start gap-2 rounded-xl py-2 ps-0 after:pointer-events-none",
|
|
644
|
+
className: o("h-8 w-full justify-start gap-2 rounded-xl py-2 ps-0 after:pointer-events-none", ie, Q.item, t && Q.itemActive, j && Q.itemActive)
|
|
646
645
|
})
|
|
647
|
-
}),
|
|
648
|
-
className: o("absolute inset-y-0 end-1 flex items-center",
|
|
649
|
-
children: /* @__PURE__ */
|
|
650
|
-
items:
|
|
651
|
-
onOpenChange:
|
|
646
|
+
}), F && /* @__PURE__ */ B("div", {
|
|
647
|
+
className: o("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(y, {
|
|
649
|
+
items: N,
|
|
650
|
+
onOpenChange: ne,
|
|
652
651
|
matchReferenceWidth: !1,
|
|
653
652
|
listClassName: "w-[200px]",
|
|
654
|
-
children: /* @__PURE__ */
|
|
655
|
-
ref:
|
|
656
|
-
icon: /* @__PURE__ */
|
|
653
|
+
children: /* @__PURE__ */ B(S, {
|
|
654
|
+
ref: M,
|
|
655
|
+
icon: /* @__PURE__ */ B(ue, {
|
|
657
656
|
size: _.SM,
|
|
658
|
-
className:
|
|
659
|
-
"aria-hidden": !0
|
|
657
|
+
className: Q.triggerIcon,
|
|
658
|
+
"aria-hidden": !0,
|
|
659
|
+
stroke: v
|
|
660
660
|
}),
|
|
661
|
-
size:
|
|
661
|
+
size: b.Small,
|
|
662
662
|
"aria-label": c,
|
|
663
|
-
className: o(
|
|
663
|
+
className: o(j && Q.triggerActive)
|
|
664
664
|
})
|
|
665
665
|
})
|
|
666
666
|
})]
|
|
667
667
|
});
|
|
668
|
-
},
|
|
668
|
+
}, Ue = ({ index: e, style: t, rows: n, 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
669
|
let C = n[e];
|
|
670
670
|
if (C.kind === X.Header) {
|
|
671
671
|
let n = C.groupKey === r.Pinned;
|
|
672
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
676
|
+
children: /* @__PURE__ */ B(Ve, {
|
|
677
677
|
label: C.label,
|
|
678
678
|
isExpanded: i.has(C.groupKey),
|
|
679
679
|
onToggle: () => a(C.groupKey),
|
|
@@ -687,11 +687,11 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
687
687
|
})
|
|
688
688
|
});
|
|
689
689
|
}
|
|
690
|
-
return /* @__PURE__ */
|
|
690
|
+
return /* @__PURE__ */ B("div", {
|
|
691
691
|
role: "presentation",
|
|
692
692
|
style: t,
|
|
693
693
|
className: "pt-1",
|
|
694
|
-
children: /* @__PURE__ */
|
|
694
|
+
children: /* @__PURE__ */ B(He, {
|
|
695
695
|
item: C.item,
|
|
696
696
|
isActive: C.item.id === s,
|
|
697
697
|
searchQuery: c,
|
|
@@ -715,44 +715,44 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
715
715
|
onDrop: S
|
|
716
716
|
})
|
|
717
717
|
});
|
|
718
|
-
},
|
|
718
|
+
}, We = (e, t) => t === r.All ? !0 : e.source === t, Ge = (e, t) => t ? e.title.toLowerCase().includes(t.toLowerCase()) : !0, Ke = new Set([
|
|
719
719
|
r.Pinned,
|
|
720
720
|
r.MyChats,
|
|
721
721
|
r.Shared,
|
|
722
722
|
r.Organization
|
|
723
|
-
]),
|
|
724
|
-
let { colors: w, typography: T, newChatButton: E } = m ?? {}, { title:
|
|
725
|
-
|
|
726
|
-
x != null &&
|
|
723
|
+
]), qe = N(({ conversations: e, isLoading: t, isOpen: n, onSelectConversation: a, activeConversationId: s, labels: c, 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: D, emptyLabel: k, noResultsLabel: A, loadingLabel: j = "Loading conversations", newChatLabel: te, searchPlaceholder: M, searchClearLabel: ne, filterLabels: N, groupLabels: I, actionsLabel: ie, unreadIndicatorLabel: ae, closeAriaLabel: H } = c, [U, oe] = z(""), [se, ce] = z(r.All);
|
|
725
|
+
F(() => {
|
|
726
|
+
x != null && ce(x);
|
|
727
727
|
}, [x]);
|
|
728
|
-
let [W, le] =
|
|
728
|
+
let [W, le] = z(() => Ke), [ue, de] = z(5), fe = re(), pe = R(null), me = R(null), [G, he] = z(null), [ge, _e] = z(null), [K, ve] = z(null), ye = R(null), q = R(null), be = P(({ height: e }) => {
|
|
729
729
|
de(Math.ceil(e / 36 * 2));
|
|
730
|
-
}, []),
|
|
731
|
-
|
|
732
|
-
}, []),
|
|
730
|
+
}, []), xe = P((e) => {
|
|
731
|
+
oe(e ?? "");
|
|
732
|
+
}, []), Se = 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
|
-
}, []),
|
|
738
|
-
|
|
739
|
-
}, []), Ce =
|
|
740
|
-
let r =
|
|
741
|
-
|
|
742
|
-
}, [e]), we =
|
|
743
|
-
|
|
744
|
-
}, [
|
|
745
|
-
|
|
746
|
-
}, []), Ee =
|
|
747
|
-
|
|
748
|
-
}, []), De =
|
|
749
|
-
let r =
|
|
750
|
-
|
|
737
|
+
}, []), J = P(() => {
|
|
738
|
+
ye.current = null, q.current = null, he(null), _e(null), ve(null);
|
|
739
|
+
}, []), Ce = P((t, n) => {
|
|
740
|
+
let r = Ie(t, Fe(n, t), e);
|
|
741
|
+
ye.current = t, q.current = r, he(t), ve(r);
|
|
742
|
+
}, [e]), we = P(() => {
|
|
743
|
+
J();
|
|
744
|
+
}, [J]), Te = P((e) => {
|
|
745
|
+
_e(e);
|
|
746
|
+
}, []), Ee = P(() => {
|
|
747
|
+
_e(null);
|
|
748
|
+
}, []), De = P((e, t, n) => {
|
|
749
|
+
let r = ye.current, i = q.current;
|
|
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
|
-
}, [
|
|
755
|
+
}, [J, b]), Oe = i({
|
|
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 =
|
|
772
|
+
}), Y = L(() => e.filter((e) => We(e, se) && Ge(e, U)), [
|
|
773
773
|
e,
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
]),
|
|
774
|
+
se,
|
|
775
|
+
U
|
|
776
|
+
]), ke = L(() => Y.filter((e) => e.isPinned), [Y]), Me = L(() => Y.filter((e) => !e.isPinned && e.source !== r.Shared && e.source !== r.Organization), [Y]), Pe = L(() => Y.filter((e) => !e.isPinned && e.source === r.Shared), [Y]), Le = L(() => Y.filter((e) => !e.isPinned && e.source === r.Organization), [Y]), Re = L(() => [
|
|
777
777
|
{
|
|
778
778
|
key: r.Pinned,
|
|
779
|
-
label:
|
|
780
|
-
items:
|
|
779
|
+
label: I?.pinned ?? "Pinned",
|
|
780
|
+
items: ke
|
|
781
781
|
},
|
|
782
782
|
{
|
|
783
783
|
key: r.MyChats,
|
|
784
|
-
label:
|
|
785
|
-
items:
|
|
784
|
+
label: I?.myChats ?? "My chats",
|
|
785
|
+
items: Me
|
|
786
786
|
},
|
|
787
787
|
{
|
|
788
788
|
key: r.Shared,
|
|
789
|
-
label:
|
|
790
|
-
items:
|
|
789
|
+
label: I?.shared ?? "Shared",
|
|
790
|
+
items: Pe
|
|
791
791
|
},
|
|
792
792
|
{
|
|
793
793
|
key: r.Organization,
|
|
794
|
-
label:
|
|
794
|
+
label: I?.organization ?? "Organization",
|
|
795
795
|
items: Le
|
|
796
796
|
}
|
|
797
797
|
], [
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
798
|
+
I,
|
|
799
|
+
ke,
|
|
800
|
+
Me,
|
|
801
|
+
Pe,
|
|
802
802
|
Le
|
|
803
|
-
]),
|
|
803
|
+
]), Z = L(() => {
|
|
804
804
|
let e = [];
|
|
805
|
-
for (let t of
|
|
805
|
+
for (let t of Re) if (t.items.length !== 0 && (e.push({
|
|
806
806
|
kind: X.Header,
|
|
807
807
|
groupKey: t.key,
|
|
808
808
|
label: t.label
|
|
@@ -812,79 +812,79 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
812
812
|
groupKey: t.key
|
|
813
813
|
});
|
|
814
814
|
return e;
|
|
815
|
-
}, [
|
|
816
|
-
|
|
817
|
-
if (!s ||
|
|
818
|
-
let e =
|
|
815
|
+
}, [Re, W]);
|
|
816
|
+
F(() => {
|
|
817
|
+
if (!s || me.current === s) return;
|
|
818
|
+
let e = Z.findIndex((e) => e.kind === X.Item && e.item.id === s);
|
|
819
819
|
e >= 0 && (pe.current?.scrollToRow({
|
|
820
820
|
index: e,
|
|
821
821
|
align: "smart",
|
|
822
822
|
behavior: "smooth"
|
|
823
|
-
}),
|
|
823
|
+
}), me.current = s);
|
|
824
824
|
}, [
|
|
825
825
|
s,
|
|
826
|
-
|
|
826
|
+
Re,
|
|
827
827
|
W,
|
|
828
|
-
|
|
828
|
+
Z
|
|
829
829
|
]);
|
|
830
|
-
let Ve =
|
|
831
|
-
rows:
|
|
830
|
+
let Ve = L(() => ({
|
|
831
|
+
rows: Z,
|
|
832
832
|
expandedGroups: W,
|
|
833
|
-
onToggleGroup:
|
|
833
|
+
onToggleGroup: Se,
|
|
834
834
|
listId: fe,
|
|
835
835
|
activeConversationId: s,
|
|
836
|
-
searchQuery:
|
|
836
|
+
searchQuery: U,
|
|
837
837
|
onSelectConversation: a,
|
|
838
838
|
getActions: g,
|
|
839
839
|
onActionMenuOpen: _,
|
|
840
|
-
actionsLabel:
|
|
841
|
-
unreadIndicatorLabel:
|
|
840
|
+
actionsLabel: ie,
|
|
841
|
+
unreadIndicatorLabel: ae,
|
|
842
842
|
styles: {
|
|
843
843
|
groupHeaderClassName: T?.groupHeaderClassName,
|
|
844
844
|
itemTitleClassName: T?.itemTitleClassName,
|
|
845
845
|
itemIconBadgeClassName: m?.itemIconBadgeClassName,
|
|
846
846
|
taskBadgeClassName: m?.taskBadgeClassName
|
|
847
847
|
},
|
|
848
|
-
draggingId:
|
|
848
|
+
draggingId: G,
|
|
849
849
|
dragOverId: ge,
|
|
850
|
-
allowedDropGroups:
|
|
851
|
-
onDragStart: (e) => Ce(e,
|
|
850
|
+
allowedDropGroups: K,
|
|
851
|
+
onDragStart: (e) => Ce(e, Z),
|
|
852
852
|
onDragEnd: we,
|
|
853
853
|
onDragOver: Te,
|
|
854
854
|
onDragLeave: Ee,
|
|
855
855
|
onDrop: De
|
|
856
856
|
}), [
|
|
857
|
-
|
|
857
|
+
Z,
|
|
858
858
|
W,
|
|
859
|
-
|
|
859
|
+
Se,
|
|
860
860
|
fe,
|
|
861
861
|
s,
|
|
862
|
-
|
|
862
|
+
U,
|
|
863
863
|
a,
|
|
864
864
|
g,
|
|
865
865
|
_,
|
|
866
|
+
ie,
|
|
866
867
|
ae,
|
|
867
|
-
V,
|
|
868
868
|
T?.groupHeaderClassName,
|
|
869
869
|
T?.itemTitleClassName,
|
|
870
870
|
m?.itemIconBadgeClassName,
|
|
871
871
|
m?.taskBadgeClassName,
|
|
872
|
-
|
|
872
|
+
G,
|
|
873
873
|
ge,
|
|
874
|
-
|
|
874
|
+
K,
|
|
875
875
|
Ce,
|
|
876
876
|
we,
|
|
877
877
|
Te,
|
|
878
878
|
Ee,
|
|
879
879
|
De
|
|
880
|
-
]),
|
|
881
|
-
return /* @__PURE__ */
|
|
880
|
+
]), He = e.length === 0, qe = e.length > 0 && Y.length === 0;
|
|
881
|
+
return /* @__PURE__ */ V(f, {
|
|
882
882
|
isOpen: n,
|
|
883
883
|
orientation: d.Left,
|
|
884
|
-
title:
|
|
884
|
+
title: D,
|
|
885
885
|
labels: {
|
|
886
|
-
ariaLabel:
|
|
887
|
-
closeLabel:
|
|
886
|
+
ariaLabel: D,
|
|
887
|
+
closeLabel: H
|
|
888
888
|
},
|
|
889
889
|
onClose: v,
|
|
890
890
|
styles: {
|
|
@@ -901,59 +901,59 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
901
901
|
},
|
|
902
902
|
rightActions: y,
|
|
903
903
|
children: [
|
|
904
|
-
/* @__PURE__ */
|
|
905
|
-
label:
|
|
904
|
+
/* @__PURE__ */ B(Be, {
|
|
905
|
+
label: te,
|
|
906
906
|
onClick: p,
|
|
907
907
|
labelClassName: T?.newChatLabelClassName,
|
|
908
908
|
colors: E
|
|
909
909
|
}),
|
|
910
|
-
/* @__PURE__ */
|
|
910
|
+
/* @__PURE__ */ B("div", {
|
|
911
911
|
role: "search",
|
|
912
912
|
className: "px-3 py-2",
|
|
913
|
-
children: /* @__PURE__ */
|
|
913
|
+
children: /* @__PURE__ */ B(O, {
|
|
914
914
|
wrapperClassName: "rounded-full",
|
|
915
|
-
value:
|
|
916
|
-
onChange:
|
|
917
|
-
placeholder:
|
|
918
|
-
clearLabel:
|
|
919
|
-
"aria-label":
|
|
915
|
+
value: U,
|
|
916
|
+
onChange: xe,
|
|
917
|
+
placeholder: M,
|
|
918
|
+
clearLabel: ne,
|
|
919
|
+
"aria-label": M
|
|
920
920
|
})
|
|
921
921
|
}),
|
|
922
|
-
!C && /* @__PURE__ */
|
|
923
|
-
activeTab:
|
|
924
|
-
labels:
|
|
922
|
+
!C && /* @__PURE__ */ B(ze, {
|
|
923
|
+
activeTab: se,
|
|
924
|
+
labels: N,
|
|
925
925
|
onChange: (e) => {
|
|
926
|
-
|
|
926
|
+
ce(e), S?.(e);
|
|
927
927
|
},
|
|
928
928
|
tabClassName: T?.tabClassName
|
|
929
929
|
}),
|
|
930
|
-
/* @__PURE__ */
|
|
930
|
+
/* @__PURE__ */ B("span", {
|
|
931
931
|
role: "status",
|
|
932
932
|
"aria-live": "polite",
|
|
933
933
|
className: "sr-only",
|
|
934
|
-
children: t ?
|
|
934
|
+
children: t ? j : He ? k : qe ? A : ""
|
|
935
935
|
}),
|
|
936
|
-
/* @__PURE__ */
|
|
936
|
+
/* @__PURE__ */ B("div", {
|
|
937
937
|
className: "flex-1 overflow-hidden px-2 py-1",
|
|
938
|
-
children: t ? /* @__PURE__ */
|
|
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__ */
|
|
940
|
+
children: Array.from({ length: 15 }, (e, t) => /* @__PURE__ */ B(ee, {
|
|
941
941
|
avatar: { size: 24 },
|
|
942
|
-
showTitle: { width:
|
|
942
|
+
showTitle: { width: je(t) },
|
|
943
943
|
paragraph: !1,
|
|
944
944
|
active: !0,
|
|
945
|
-
color:
|
|
945
|
+
color: Q.skeletonColor
|
|
946
946
|
}, t))
|
|
947
|
-
}) :
|
|
947
|
+
}) : He ? /* @__PURE__ */ B(l, { label: k }) : qe ? /* @__PURE__ */ B(u, { label: A }) : /* @__PURE__ */ B(Ae, {
|
|
948
948
|
listRef: pe,
|
|
949
949
|
id: fe,
|
|
950
950
|
role: "list",
|
|
951
951
|
style: { height: "100%" },
|
|
952
|
-
rowComponent:
|
|
953
|
-
rowCount:
|
|
954
|
-
rowHeight:
|
|
952
|
+
rowComponent: Ue,
|
|
953
|
+
rowCount: Z.length,
|
|
954
|
+
rowHeight: Ne,
|
|
955
955
|
overscanCount: ue,
|
|
956
|
-
onResize:
|
|
956
|
+
onResize: be,
|
|
957
957
|
rowProps: Ve
|
|
958
958
|
})
|
|
959
959
|
})
|
|
@@ -966,60 +966,62 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
966
966
|
successIcon: "_successIcon_fgzx8_13",
|
|
967
967
|
errorIcon: "_errorIcon_fgzx8_17",
|
|
968
968
|
failureCount: "_failureCount_fgzx8_21"
|
|
969
|
-
},
|
|
970
|
-
let s =
|
|
971
|
-
return /* @__PURE__ */
|
|
969
|
+
}, Je = 8e3, Ye = "flex size-7 shrink-0 items-center justify-center", Xe = (e, n) => e.subject.kind === t.Single ? e.subject.title : n, Ze = (e) => e.subject.kind === t.Single ? e.subject.sourceBreadcrumb : void 0, Qe = (e, t, n) => e && t ? n.closeQueueConfirmDescriptionMixed : t ? n.closeQueueConfirmDescriptionFailed : n.closeQueueConfirmDescriptionInProgress, $e = ({ job: t, labels: n, onDismiss: r, onRetry: i, styles: a }) => {
|
|
970
|
+
let s = Xe(t, n.allConversationsJobLabel), c = Ze(t), l = a?.typography;
|
|
971
|
+
return /* @__PURE__ */ V("div", {
|
|
972
972
|
className: "flex items-center gap-2 px-3 py-2",
|
|
973
|
-
children: [/* @__PURE__ */
|
|
973
|
+
children: [/* @__PURE__ */ V("div", {
|
|
974
974
|
className: "min-w-0 flex-1",
|
|
975
|
-
children: [c && /* @__PURE__ */
|
|
975
|
+
children: [c && /* @__PURE__ */ B(x, {
|
|
976
976
|
text: c,
|
|
977
977
|
className: o($.textSecondary, l?.jobDescriptionClassName || "dial-caption-text"),
|
|
978
978
|
contentClassName: "!z-[80]"
|
|
979
|
-
}), /* @__PURE__ */
|
|
979
|
+
}), /* @__PURE__ */ B(x, {
|
|
980
980
|
text: s,
|
|
981
981
|
className: o($.text, l?.jobLabelClassName || "dial-small-text"),
|
|
982
982
|
contentClassName: "!z-[80]"
|
|
983
983
|
})]
|
|
984
|
-
}), /* @__PURE__ */
|
|
984
|
+
}), /* @__PURE__ */ V("div", {
|
|
985
985
|
className: "flex shrink-0 items-center gap-1",
|
|
986
986
|
children: [
|
|
987
|
-
t.status === e.Success && /* @__PURE__ */
|
|
988
|
-
className:
|
|
989
|
-
children: /* @__PURE__ */
|
|
987
|
+
t.status === e.Success && /* @__PURE__ */ B("span", {
|
|
988
|
+
className: Ye,
|
|
989
|
+
children: /* @__PURE__ */ B(W, {
|
|
990
990
|
size: 16,
|
|
991
991
|
className: $.successIcon
|
|
992
992
|
})
|
|
993
993
|
}),
|
|
994
|
-
t.status === e.Failed && /* @__PURE__ */
|
|
994
|
+
t.status === e.Failed && /* @__PURE__ */ V(ae, { children: [/* @__PURE__ */ B(S, {
|
|
995
995
|
"aria-label": n.retryJobAriaLabel(s),
|
|
996
|
-
icon: /* @__PURE__ */
|
|
996
|
+
icon: /* @__PURE__ */ B(fe, {
|
|
997
997
|
size: _.SM,
|
|
998
|
-
className: $.textSecondary
|
|
998
|
+
className: $.textSecondary,
|
|
999
|
+
stroke: v
|
|
999
1000
|
}),
|
|
1000
1001
|
onClick: () => i(t.id)
|
|
1001
|
-
}), /* @__PURE__ */
|
|
1002
|
-
className:
|
|
1003
|
-
children: /* @__PURE__ */
|
|
1002
|
+
}), /* @__PURE__ */ B("span", {
|
|
1003
|
+
className: Ye,
|
|
1004
|
+
children: /* @__PURE__ */ B(H, {
|
|
1004
1005
|
size: 16,
|
|
1005
1006
|
className: $.errorIcon
|
|
1006
1007
|
})
|
|
1007
1008
|
})] }),
|
|
1008
|
-
t.status === e.InProgress && /* @__PURE__ */
|
|
1009
|
+
t.status === e.InProgress && /* @__PURE__ */ B(S, {
|
|
1009
1010
|
"aria-label": n.closeJobAriaLabel(s),
|
|
1010
|
-
size:
|
|
1011
|
-
icon: /* @__PURE__ */
|
|
1011
|
+
size: b.Small,
|
|
1012
|
+
icon: /* @__PURE__ */ B(me, {
|
|
1012
1013
|
size: _.SM,
|
|
1013
|
-
className: $.textSecondary
|
|
1014
|
+
className: $.textSecondary,
|
|
1015
|
+
stroke: v
|
|
1014
1016
|
}),
|
|
1015
1017
|
onClick: () => r(t.id),
|
|
1016
|
-
className:
|
|
1018
|
+
className: Ye
|
|
1017
1019
|
})
|
|
1018
1020
|
]
|
|
1019
1021
|
})]
|
|
1020
1022
|
});
|
|
1021
|
-
},
|
|
1022
|
-
let [u, d] =
|
|
1023
|
+
}, et = N(({ title: t, jobs: n, onClose: r, onDismiss: a, onRetry: s, labels: c, styles: l }) => {
|
|
1024
|
+
let [u, d] = z(!1), [f, p] = z(!1), m = l?.colors, y = l?.typography, x = {
|
|
1023
1025
|
...i({
|
|
1024
1026
|
"--cp-transfer-queue-bg": m?.background,
|
|
1025
1027
|
"--cp-transfer-queue-text": m?.text,
|
|
@@ -1030,73 +1032,75 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1030
1032
|
"--cp-transfer-queue-failure-count-text": m?.failureCountText
|
|
1031
1033
|
}),
|
|
1032
1034
|
...l?.cssVars
|
|
1033
|
-
},
|
|
1034
|
-
|
|
1035
|
+
}, C = n.some((t) => t.status === e.InProgress), w = n.some((t) => t.status === e.Failed), T = n.length > 0 && !C && !w, E = P(() => {
|
|
1036
|
+
C || w ? p(!0) : r();
|
|
1035
1037
|
}, [
|
|
1036
|
-
S,
|
|
1037
1038
|
C,
|
|
1039
|
+
w,
|
|
1038
1040
|
r
|
|
1039
|
-
]),
|
|
1041
|
+
]), O = P(() => {
|
|
1040
1042
|
p(!1), r();
|
|
1041
1043
|
}, [r]);
|
|
1042
|
-
if (
|
|
1043
|
-
if (!
|
|
1044
|
-
let e = setTimeout(r,
|
|
1044
|
+
if (F(() => {
|
|
1045
|
+
if (!T) return;
|
|
1046
|
+
let e = setTimeout(r, Je);
|
|
1045
1047
|
return () => clearTimeout(e);
|
|
1046
|
-
}, [
|
|
1047
|
-
let ee = n.filter((t) => t.status !== e.InProgress).length,
|
|
1048
|
-
return /* @__PURE__ */
|
|
1048
|
+
}, [T, r]), n.length === 0) return null;
|
|
1049
|
+
let ee = n.filter((t) => t.status !== e.InProgress).length, k = n.filter((t) => t.status === e.Failed).length, A = Math.round(ee / n.length * 100);
|
|
1050
|
+
return /* @__PURE__ */ V("div", {
|
|
1049
1051
|
role: "status",
|
|
1050
1052
|
"aria-live": "polite",
|
|
1051
|
-
style:
|
|
1053
|
+
style: x,
|
|
1052
1054
|
className: o($.root, "w-[320px] rounded-lg shadow-lg", l?.rootClassName),
|
|
1053
1055
|
children: [
|
|
1054
|
-
/* @__PURE__ */
|
|
1056
|
+
/* @__PURE__ */ V("div", {
|
|
1055
1057
|
className: "flex items-center justify-between px-3 py-2",
|
|
1056
|
-
children: [/* @__PURE__ */
|
|
1058
|
+
children: [/* @__PURE__ */ V("div", {
|
|
1057
1059
|
className: "flex items-center gap-2",
|
|
1058
|
-
children: [/* @__PURE__ */
|
|
1059
|
-
className: o($.text,
|
|
1060
|
+
children: [/* @__PURE__ */ B("span", {
|
|
1061
|
+
className: o($.text, y?.titleClassName || "dial-small-semi-text"),
|
|
1060
1062
|
children: t
|
|
1061
|
-
}),
|
|
1062
|
-
className: o($.failureCount, "inline-flex h-4 min-w-4 items-center justify-center rounded-full px-1",
|
|
1063
|
-
children:
|
|
1063
|
+
}), k > 0 && /* @__PURE__ */ B("span", {
|
|
1064
|
+
className: o($.failureCount, "inline-flex h-4 min-w-4 items-center justify-center rounded-full px-1", y?.failureCountClassName || "dial-small-semi-text"),
|
|
1065
|
+
children: k
|
|
1064
1066
|
})]
|
|
1065
|
-
}), /* @__PURE__ */
|
|
1067
|
+
}), /* @__PURE__ */ V("div", {
|
|
1066
1068
|
className: "flex items-center gap-1",
|
|
1067
|
-
children: [/* @__PURE__ */
|
|
1069
|
+
children: [/* @__PURE__ */ B(S, {
|
|
1068
1070
|
"aria-label": u ? c.expandQueueAriaLabel : c.collapseQueueAriaLabel,
|
|
1069
|
-
size:
|
|
1070
|
-
icon:
|
|
1071
|
+
size: b.Small,
|
|
1072
|
+
icon: B(u ? ce : se, {
|
|
1071
1073
|
size: _.SM,
|
|
1072
|
-
className: $.textSecondary
|
|
1074
|
+
className: $.textSecondary,
|
|
1075
|
+
stroke: v
|
|
1073
1076
|
}),
|
|
1074
1077
|
onClick: () => d((e) => !e),
|
|
1075
|
-
className:
|
|
1076
|
-
}), /* @__PURE__ */
|
|
1078
|
+
className: Ye
|
|
1079
|
+
}), /* @__PURE__ */ B(S, {
|
|
1077
1080
|
"aria-label": c.closeQueueAriaLabel,
|
|
1078
|
-
size:
|
|
1079
|
-
icon: /* @__PURE__ */
|
|
1081
|
+
size: b.Small,
|
|
1082
|
+
icon: /* @__PURE__ */ B(me, {
|
|
1080
1083
|
size: _.SM,
|
|
1081
|
-
className: $.textSecondary
|
|
1084
|
+
className: $.textSecondary,
|
|
1085
|
+
stroke: v
|
|
1082
1086
|
}),
|
|
1083
|
-
onClick:
|
|
1084
|
-
className:
|
|
1087
|
+
onClick: E,
|
|
1088
|
+
className: Ye
|
|
1085
1089
|
})]
|
|
1086
1090
|
})]
|
|
1087
1091
|
}),
|
|
1088
|
-
/* @__PURE__ */
|
|
1092
|
+
/* @__PURE__ */ B("div", {
|
|
1089
1093
|
className: "px-3 pb-2",
|
|
1090
|
-
children: /* @__PURE__ */
|
|
1091
|
-
value:
|
|
1092
|
-
size:
|
|
1094
|
+
children: /* @__PURE__ */ B(D, {
|
|
1095
|
+
value: A,
|
|
1096
|
+
size: b.Small,
|
|
1093
1097
|
"aria-label": t,
|
|
1094
1098
|
className: "w-full"
|
|
1095
1099
|
})
|
|
1096
1100
|
}),
|
|
1097
|
-
!u && /* @__PURE__ */
|
|
1101
|
+
!u && /* @__PURE__ */ B("div", {
|
|
1098
1102
|
className: o("flex max-h-[40vh] flex-col overflow-y-auto", l?.bodyClassName),
|
|
1099
|
-
children: n.map((e) => /* @__PURE__ */
|
|
1103
|
+
children: n.map((e) => /* @__PURE__ */ B($e, {
|
|
1100
1104
|
job: e,
|
|
1101
1105
|
labels: c,
|
|
1102
1106
|
onDismiss: a,
|
|
@@ -1104,68 +1108,68 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1104
1108
|
styles: l
|
|
1105
1109
|
}, e.id))
|
|
1106
1110
|
}),
|
|
1107
|
-
/* @__PURE__ */
|
|
1111
|
+
/* @__PURE__ */ B(h, {
|
|
1108
1112
|
open: f,
|
|
1109
1113
|
header: c.closeQueueConfirmHeader,
|
|
1110
|
-
description:
|
|
1114
|
+
description: Qe(C, w, c),
|
|
1111
1115
|
confirmLabel: c.closeLabel,
|
|
1112
1116
|
cancelLabel: c.cancelLabel,
|
|
1113
1117
|
variant: g.Danger,
|
|
1114
|
-
onConfirm:
|
|
1118
|
+
onConfirm: O,
|
|
1115
1119
|
onClose: () => p(!1)
|
|
1116
1120
|
})
|
|
1117
1121
|
]
|
|
1118
1122
|
});
|
|
1119
1123
|
});
|
|
1120
|
-
|
|
1124
|
+
et.displayName = "ImportExportQueue";
|
|
1121
1125
|
//#endregion
|
|
1122
1126
|
//#region src/components/RenameConversationPopup/RenameConversationPopup.tsx
|
|
1123
|
-
var
|
|
1124
|
-
let [f, p] =
|
|
1125
|
-
|
|
1126
|
-
let n = e && !
|
|
1127
|
-
if (
|
|
1128
|
-
|
|
1127
|
+
var tt = N(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: i, onCancel: o, onGenerateWithAi: l, labels: u, styles: d }) => {
|
|
1128
|
+
let [f, p] = z(t), [h, g] = z(!1), [y, b] = z(null), x = R(null), C = R(!1), D = R(0);
|
|
1129
|
+
F(() => {
|
|
1130
|
+
let n = e && !C.current;
|
|
1131
|
+
if (C.current = e, !e) {
|
|
1132
|
+
D.current += 1, g(!1);
|
|
1129
1133
|
return;
|
|
1130
1134
|
}
|
|
1131
1135
|
if (!n) return;
|
|
1132
|
-
|
|
1133
|
-
let r = setTimeout(() =>
|
|
1136
|
+
D.current += 1, p(t), b(null), g(!1);
|
|
1137
|
+
let r = setTimeout(() => x.current?.focus(), 0);
|
|
1134
1138
|
return () => clearTimeout(r);
|
|
1135
|
-
}, [e, t]),
|
|
1136
|
-
|
|
1139
|
+
}, [e, t]), F(() => () => {
|
|
1140
|
+
D.current += 1;
|
|
1137
1141
|
}, []);
|
|
1138
|
-
let
|
|
1139
|
-
|
|
1142
|
+
let O = c(f.trim()), ee = a(O) > 255, k = n || O === "" || O === t.trim() || ee, j = P(() => {
|
|
1143
|
+
k || i(O);
|
|
1140
1144
|
}, [
|
|
1141
|
-
|
|
1145
|
+
k,
|
|
1142
1146
|
i,
|
|
1143
|
-
|
|
1144
|
-
]), te =
|
|
1145
|
-
e.key === "Enter" &&
|
|
1146
|
-
}, [
|
|
1147
|
+
O
|
|
1148
|
+
]), te = P((e) => {
|
|
1149
|
+
e.key === "Enter" && j();
|
|
1150
|
+
}, [j]), M = P(async () => {
|
|
1147
1151
|
if (h) return;
|
|
1148
|
-
let e = ++
|
|
1149
|
-
g(!0),
|
|
1152
|
+
let e = ++D.current;
|
|
1153
|
+
g(!0), b(null);
|
|
1150
1154
|
try {
|
|
1151
1155
|
let t = await l();
|
|
1152
|
-
if (e !==
|
|
1156
|
+
if (e !== D.current) return;
|
|
1153
1157
|
p(s(t));
|
|
1154
1158
|
} catch {
|
|
1155
|
-
if (e !==
|
|
1156
|
-
|
|
1159
|
+
if (e !== D.current) return;
|
|
1160
|
+
b(u.renameWithAiError);
|
|
1157
1161
|
} finally {
|
|
1158
|
-
e ===
|
|
1162
|
+
e === D.current && g(!1);
|
|
1159
1163
|
}
|
|
1160
1164
|
}, [
|
|
1161
1165
|
h,
|
|
1162
1166
|
l,
|
|
1163
1167
|
u.renameWithAiError
|
|
1164
|
-
]),
|
|
1165
|
-
return
|
|
1168
|
+
]), ne;
|
|
1169
|
+
return ne = ee ? u.nameTooLongError : y ?? r ?? void 0, /* @__PURE__ */ B(T, {
|
|
1166
1170
|
open: e,
|
|
1167
1171
|
header: u.popupTitle,
|
|
1168
|
-
size:
|
|
1172
|
+
size: E.Sm,
|
|
1169
1173
|
onClose: o,
|
|
1170
1174
|
mainButtons: n ? void 0 : [{
|
|
1171
1175
|
label: u.cancelLabel,
|
|
@@ -1173,41 +1177,41 @@ var et = M(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: i, onCa
|
|
|
1173
1177
|
}, {
|
|
1174
1178
|
label: u.saveLabel,
|
|
1175
1179
|
variant: m.Primary,
|
|
1176
|
-
disabled:
|
|
1177
|
-
onClick:
|
|
1180
|
+
disabled: k,
|
|
1181
|
+
onClick: j
|
|
1178
1182
|
}],
|
|
1179
|
-
children: /* @__PURE__ */
|
|
1183
|
+
children: /* @__PURE__ */ B("div", {
|
|
1180
1184
|
className: d?.bodyClassName,
|
|
1181
1185
|
style: d?.cssVars,
|
|
1182
|
-
children: n ? /* @__PURE__ */
|
|
1186
|
+
children: n ? /* @__PURE__ */ B("div", {
|
|
1183
1187
|
className: "h-[120px] px-6 py-4",
|
|
1184
|
-
children: /* @__PURE__ */
|
|
1185
|
-
}) : /* @__PURE__ */
|
|
1188
|
+
children: /* @__PURE__ */ B(A, { size: 50 })
|
|
1189
|
+
}) : /* @__PURE__ */ V("div", {
|
|
1186
1190
|
className: "flex items-start gap-2 px-6 py-3",
|
|
1187
|
-
children: [/* @__PURE__ */
|
|
1191
|
+
children: [/* @__PURE__ */ B("div", {
|
|
1188
1192
|
className: "min-w-0 flex-1",
|
|
1189
|
-
children: /* @__PURE__ */
|
|
1190
|
-
inputRef:
|
|
1193
|
+
children: /* @__PURE__ */ B(w, {
|
|
1194
|
+
inputRef: x,
|
|
1191
1195
|
value: f,
|
|
1192
1196
|
placeholder: u.inputPlaceholder,
|
|
1193
|
-
error:
|
|
1197
|
+
error: ne,
|
|
1194
1198
|
onChange: (e) => p(s(e ?? "")),
|
|
1195
1199
|
onKeyDown: te
|
|
1196
1200
|
})
|
|
1197
|
-
}), /* @__PURE__ */
|
|
1201
|
+
}), /* @__PURE__ */ B(S, {
|
|
1198
1202
|
"aria-label": u.renameWithAiLabel,
|
|
1199
1203
|
tooltipProps: { tooltip: u.renameWithAiLabel },
|
|
1200
1204
|
disabled: h || n,
|
|
1201
|
-
onClick:
|
|
1202
|
-
icon: h ? /* @__PURE__ */
|
|
1205
|
+
onClick: M,
|
|
1206
|
+
icon: h ? /* @__PURE__ */ B(A, { size: _.MD }) : /* @__PURE__ */ B(pe, {
|
|
1203
1207
|
size: _.MD,
|
|
1204
|
-
stroke:
|
|
1208
|
+
stroke: v
|
|
1205
1209
|
})
|
|
1206
1210
|
})]
|
|
1207
1211
|
})
|
|
1208
1212
|
})
|
|
1209
1213
|
});
|
|
1210
1214
|
});
|
|
1211
|
-
|
|
1215
|
+
tt.displayName = "RenameConversationPopup";
|
|
1212
1216
|
//#endregion
|
|
1213
|
-
export {
|
|
1217
|
+
export { qe as ConversationPanel, et as ImportExportQueue, tt as RenameConversationPopup };
|