@epam/ai-dial-conversation-panel 1.3.0-dev.246 → 1.3.0-dev.249
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/index.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { ConversationKind as e, DeploymentIcon as t, FilterTab as n, buildCssVars as r, getUtf8ByteLength as i, mergeClasses as a, sanitizeConversationName as o, stripTrailingDots as s } from "@epam/ai-dial-chat-shared";
|
|
2
2
|
import { PanelEmpty as c, PanelNoResults as l, SidebarOrientation as u, SidebarPanel as d } from "@epam/ai-dial-sidebar";
|
|
3
|
-
import { Button as f, ButtonVariant as p, DIAL_ICON_SIZE as m, DIAL_KIT_ICON_STROKE as h, Dropdown as g, ElementSize as _, EllipsisTooltip as v, FilterChips as y, GhostIconButton as b, Highlight as x, Input as S,
|
|
4
|
-
import { createElement as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { IconCaretDownFilled as
|
|
3
|
+
import { Button as f, ButtonVariant as p, DIAL_ICON_SIZE as m, DIAL_KIT_ICON_STROKE as h, Dropdown as g, ElementSize as _, EllipsisTooltip as v, FilterChips as y, GhostIconButton as b, Highlight as x, Input as S, LiveRegion as C, LiveRegionElement as w, LiveRegionPoliteness as T, MenuItemMark as E, Popup as D, PopupSize as O, Search as k, Skeleton as A, SkeletonVariant as j, Spinner as M, mergeClasses as N } from "@epam/ai-dial-ui-kit";
|
|
4
|
+
import { createElement as P, memo as F, useCallback as I, useEffect as L, useId as ee, useImperativeHandle as te, useLayoutEffect as R, useMemo as z, useRef as B, useState as V } from "react";
|
|
5
|
+
import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
|
|
6
|
+
import { IconCaretDownFilled as ne, IconCaretRightFilled as re, IconChevronDown as G, IconChevronRight as ie, IconDotsVertical as ae, IconFilter2 as K, IconPlus as oe, IconSearch as se, IconSparkles as q, IconX as ce } from "@tabler/icons-react";
|
|
7
7
|
//#region src/constants/public-class-names.ts
|
|
8
|
-
var
|
|
8
|
+
var le = {
|
|
9
9
|
newChatButton: "dial-cp-new-chat-button",
|
|
10
10
|
search: "dial-cp-search",
|
|
11
11
|
list: "dial-cp-list",
|
|
12
12
|
listHeader: "dial-cp-list-header",
|
|
13
13
|
listSection: "dial-cp-list-section"
|
|
14
|
-
},
|
|
15
|
-
function
|
|
14
|
+
}, ue = typeof window < "u" ? R : L;
|
|
15
|
+
function de(e) {
|
|
16
16
|
if (e !== void 0) switch (typeof e) {
|
|
17
17
|
case "number": return e;
|
|
18
18
|
case "string": if (e.endsWith("px")) return parseFloat(e);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
let { styleHeight: s, styleWidth: c } =
|
|
23
|
-
styleHeight:
|
|
24
|
-
styleWidth:
|
|
25
|
-
}), [o?.height, o?.width]), [l, u] =
|
|
21
|
+
function fe({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
|
|
22
|
+
let { styleHeight: s, styleWidth: c } = z(() => ({
|
|
23
|
+
styleHeight: de(o?.height),
|
|
24
|
+
styleWidth: de(o?.width)
|
|
25
|
+
}), [o?.height, o?.width]), [l, u] = V({
|
|
26
26
|
height: t,
|
|
27
27
|
width: n
|
|
28
28
|
}), d = r || a === "only-height" && s !== void 0 || a === "only-width" && c !== void 0 || s !== void 0 && c !== void 0;
|
|
29
|
-
return
|
|
29
|
+
return ue(() => {
|
|
30
30
|
if (i === null || d) return;
|
|
31
31
|
let t = new ResizeObserver((e) => {
|
|
32
32
|
for (let t of e) {
|
|
@@ -46,7 +46,7 @@ function K({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i,
|
|
|
46
46
|
i,
|
|
47
47
|
s,
|
|
48
48
|
c
|
|
49
|
-
]),
|
|
49
|
+
]), z(() => ({
|
|
50
50
|
height: s ?? l.height,
|
|
51
51
|
width: c ?? l.width
|
|
52
52
|
}), [
|
|
@@ -55,26 +55,26 @@ function K({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i,
|
|
|
55
55
|
c
|
|
56
56
|
]);
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
let t =
|
|
58
|
+
function pe(e) {
|
|
59
|
+
let t = B(() => {
|
|
60
60
|
throw Error("Cannot call during render.");
|
|
61
61
|
});
|
|
62
|
-
return
|
|
62
|
+
return ue(() => {
|
|
63
63
|
t.current = e;
|
|
64
|
-
}, [e]),
|
|
64
|
+
}, [e]), I((e) => t.current?.(e), [t]);
|
|
65
65
|
}
|
|
66
|
-
var
|
|
67
|
-
function
|
|
68
|
-
if (
|
|
66
|
+
var me = null;
|
|
67
|
+
function he(e = !1) {
|
|
68
|
+
if (me === null || e) {
|
|
69
69
|
let e = document.createElement("div"), t = e.style;
|
|
70
70
|
t.width = "50px", t.height = "50px", t.overflow = "scroll", t.direction = "rtl";
|
|
71
71
|
let n = document.createElement("div"), r = n.style;
|
|
72
|
-
return r.width = "100px", r.height = "100px", e.appendChild(n), document.body.appendChild(e), e.scrollLeft > 0 ?
|
|
72
|
+
return r.width = "100px", r.height = "100px", e.appendChild(n), document.body.appendChild(e), e.scrollLeft > 0 ? me = "positive-descending" : (e.scrollLeft = 1, me = e.scrollLeft === 0 ? "negative" : "positive-ascending"), document.body.removeChild(e), me;
|
|
73
73
|
}
|
|
74
|
-
return
|
|
74
|
+
return me;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
if (t === "horizontal" && n) switch (
|
|
76
|
+
function ge({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
|
|
77
|
+
if (t === "horizontal" && n) switch (he()) {
|
|
78
78
|
case "negative": return -r;
|
|
79
79
|
case "positive-descending": if (e) {
|
|
80
80
|
let { clientWidth: t, scrollLeft: n, scrollWidth: r } = e;
|
|
@@ -86,13 +86,13 @@ function pe({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
|
|
|
86
86
|
function J(e, t = "Assertion error") {
|
|
87
87
|
if (!e) throw console.error(t), Error(t);
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function _e(e, t) {
|
|
90
90
|
if (e === t) return !0;
|
|
91
91
|
if (!!e != !!t || (J(e !== void 0), J(t !== void 0), Object.keys(e).length !== Object.keys(t).length)) return !1;
|
|
92
92
|
for (let n in e) if (!Object.is(t[n], e[n])) return !1;
|
|
93
93
|
return !0;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function ve({ cachedBounds: e, itemCount: t, itemSize: n }) {
|
|
96
96
|
if (t === 0) return 0;
|
|
97
97
|
if (typeof n == "number") return t * n;
|
|
98
98
|
{
|
|
@@ -100,9 +100,9 @@ function he({ cachedBounds: e, itemCount: t, itemSize: n }) {
|
|
|
100
100
|
return J(n !== void 0, "Unexpected bounds cache miss"), t * ((n.scrollOffset + n.size) / e.size);
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function ye({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, containerScrollOffset: a, containerSize: o }) {
|
|
104
104
|
if (n < 0 || n >= r) throw RangeError(`Invalid index specified: ${n}`, { cause: `Index ${n} is not within the range of 0 - ${r - 1}` });
|
|
105
|
-
let s =
|
|
105
|
+
let s = ve({
|
|
106
106
|
cachedBounds: t,
|
|
107
107
|
itemCount: r,
|
|
108
108
|
itemSize: i
|
|
@@ -114,7 +114,7 @@ function ge({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, co
|
|
|
114
114
|
default: return a >= u && a <= l ? a : a < u ? u : l;
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function be({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemCount: r, overscanCount: i }) {
|
|
118
118
|
let a = r - 1, o = 0, s = -1, c = 0, l = -1, u = 0;
|
|
119
119
|
for (; u < a;) {
|
|
120
120
|
let n = e.get(u);
|
|
@@ -133,7 +133,7 @@ function _e({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemC
|
|
|
133
133
|
stopIndexOverscan: l
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function xe({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
137
137
|
let r = /* @__PURE__ */ new Map();
|
|
138
138
|
return {
|
|
139
139
|
get(i) {
|
|
@@ -168,8 +168,8 @@ function ve({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
return
|
|
171
|
+
function Se({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
172
|
+
return z(() => xe({
|
|
173
173
|
itemCount: e,
|
|
174
174
|
itemProps: t,
|
|
175
175
|
itemSize: n
|
|
@@ -179,7 +179,7 @@ function ye({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
|
179
179
|
n
|
|
180
180
|
]);
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function Ce({ containerSize: e, itemSize: t }) {
|
|
183
183
|
let n;
|
|
184
184
|
switch (typeof t) {
|
|
185
185
|
case "string":
|
|
@@ -189,21 +189,21 @@ function be({ containerSize: e, itemSize: t }) {
|
|
|
189
189
|
}
|
|
190
190
|
return n;
|
|
191
191
|
}
|
|
192
|
-
function
|
|
193
|
-
let { height: u = n, width: d = n } =
|
|
192
|
+
function we({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0, direction: r, isRtl: i = !1, itemCount: a, itemProps: o, itemSize: s, onResize: c, overscanCount: l }) {
|
|
193
|
+
let { height: u = n, width: d = n } = fe({
|
|
194
194
|
defaultHeight: r === "vertical" ? n : void 0,
|
|
195
195
|
defaultWidth: r === "horizontal" ? n : void 0,
|
|
196
196
|
element: e,
|
|
197
197
|
mode: r === "vertical" ? "only-height" : "only-width",
|
|
198
198
|
style: t
|
|
199
|
-
}), f =
|
|
199
|
+
}), f = B({
|
|
200
200
|
height: 0,
|
|
201
201
|
width: 0
|
|
202
|
-
}), p = r === "vertical" ? u : d, m =
|
|
202
|
+
}), p = r === "vertical" ? u : d, m = Ce({
|
|
203
203
|
containerSize: p,
|
|
204
204
|
itemSize: s
|
|
205
205
|
});
|
|
206
|
-
|
|
206
|
+
R(() => {
|
|
207
207
|
if (typeof c == "function") {
|
|
208
208
|
let e = f.current;
|
|
209
209
|
(e.height !== u || e.width !== d) && (c({
|
|
@@ -216,11 +216,11 @@ function xe({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
216
216
|
c,
|
|
217
217
|
d
|
|
218
218
|
]);
|
|
219
|
-
let h =
|
|
219
|
+
let h = Se({
|
|
220
220
|
itemCount: a,
|
|
221
221
|
itemProps: o,
|
|
222
222
|
itemSize: m
|
|
223
|
-
}), g =
|
|
223
|
+
}), g = I((e) => h.get(e), [h]), [_, v] = V(() => be({
|
|
224
224
|
cachedBounds: h,
|
|
225
225
|
containerScrollOffset: 0,
|
|
226
226
|
containerSize: p,
|
|
@@ -231,7 +231,7 @@ function xe({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
231
231
|
startIndexOverscan: Math.min(a - 1, _.startIndexOverscan),
|
|
232
232
|
stopIndexVisible: Math.min(a - 1, _.stopIndexVisible),
|
|
233
233
|
stopIndexOverscan: Math.min(a - 1, _.stopIndexOverscan)
|
|
234
|
-
}, C =
|
|
234
|
+
}, C = I(() => ve({
|
|
235
235
|
cachedBounds: h,
|
|
236
236
|
itemCount: a,
|
|
237
237
|
itemSize: m
|
|
@@ -239,14 +239,14 @@ function xe({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
239
239
|
h,
|
|
240
240
|
a,
|
|
241
241
|
m
|
|
242
|
-
]), w =
|
|
243
|
-
let n =
|
|
242
|
+
]), w = I((t) => {
|
|
243
|
+
let n = ge({
|
|
244
244
|
containerElement: e,
|
|
245
245
|
direction: r,
|
|
246
246
|
isRtl: i,
|
|
247
247
|
scrollOffset: t
|
|
248
248
|
});
|
|
249
|
-
return
|
|
249
|
+
return be({
|
|
250
250
|
cachedBounds: h,
|
|
251
251
|
containerScrollOffset: n,
|
|
252
252
|
containerSize: p,
|
|
@@ -262,30 +262,30 @@ function xe({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
262
262
|
a,
|
|
263
263
|
l
|
|
264
264
|
]);
|
|
265
|
-
return
|
|
265
|
+
return ue(() => {
|
|
266
266
|
let t = (r === "vertical" ? e?.scrollTop : e?.scrollLeft) ?? 0;
|
|
267
267
|
v(w(t));
|
|
268
268
|
}, [
|
|
269
269
|
e,
|
|
270
270
|
r,
|
|
271
271
|
w
|
|
272
|
-
]),
|
|
272
|
+
]), ue(() => {
|
|
273
273
|
if (!e) return;
|
|
274
274
|
let t = () => {
|
|
275
275
|
v((t) => {
|
|
276
|
-
let { scrollLeft: n, scrollTop: o } = e, s =
|
|
276
|
+
let { scrollLeft: n, scrollTop: o } = e, s = ge({
|
|
277
277
|
containerElement: e,
|
|
278
278
|
direction: r,
|
|
279
279
|
isRtl: i,
|
|
280
280
|
scrollOffset: r === "vertical" ? o : n
|
|
281
|
-
}), c =
|
|
281
|
+
}), c = be({
|
|
282
282
|
cachedBounds: h,
|
|
283
283
|
containerScrollOffset: s,
|
|
284
284
|
containerSize: p,
|
|
285
285
|
itemCount: a,
|
|
286
286
|
overscanCount: l
|
|
287
287
|
});
|
|
288
|
-
return
|
|
288
|
+
return _e(c, t) ? t : c;
|
|
289
289
|
});
|
|
290
290
|
};
|
|
291
291
|
return e.addEventListener("scroll", t), () => {
|
|
@@ -301,8 +301,8 @@ function xe({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
301
301
|
]), {
|
|
302
302
|
getCellBounds: g,
|
|
303
303
|
getEstimatedSize: C,
|
|
304
|
-
scrollToIndex:
|
|
305
|
-
let s =
|
|
304
|
+
scrollToIndex: pe(({ align: t = "auto", containerScrollOffset: n, index: o }) => {
|
|
305
|
+
let s = ye({
|
|
306
306
|
align: t,
|
|
307
307
|
cachedBounds: h,
|
|
308
308
|
containerScrollOffset: n,
|
|
@@ -312,14 +312,14 @@ function xe({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
312
312
|
itemSize: m
|
|
313
313
|
});
|
|
314
314
|
if (e) {
|
|
315
|
-
if (s =
|
|
315
|
+
if (s = ge({
|
|
316
316
|
containerElement: e,
|
|
317
317
|
direction: r,
|
|
318
318
|
isRtl: i,
|
|
319
319
|
scrollOffset: s
|
|
320
320
|
}), typeof e.scrollTo != "function") {
|
|
321
321
|
let e = w(s);
|
|
322
|
-
|
|
322
|
+
_e(_, e) || v(e);
|
|
323
323
|
}
|
|
324
324
|
return s;
|
|
325
325
|
}
|
|
@@ -330,30 +330,30 @@ function xe({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
330
330
|
stopIndexVisible: x
|
|
331
331
|
};
|
|
332
332
|
}
|
|
333
|
-
function
|
|
334
|
-
return
|
|
333
|
+
function Te(e) {
|
|
334
|
+
return z(() => e, Object.values(e));
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function Ee(e, t) {
|
|
337
337
|
let { ariaAttributes: n, style: r, ...i } = e, { ariaAttributes: a, style: o, ...s } = t;
|
|
338
|
-
return
|
|
338
|
+
return _e(n, a) && _e(r, o) && _e(i, s);
|
|
339
339
|
}
|
|
340
|
-
function
|
|
340
|
+
function De(e) {
|
|
341
341
|
return typeof e == "object" && !!e && "getAverageRowHeight" in e && typeof e.getAverageRowHeight == "function";
|
|
342
342
|
}
|
|
343
|
-
var
|
|
344
|
-
function
|
|
345
|
-
let m =
|
|
343
|
+
var Oe = "data-react-window-index";
|
|
344
|
+
function ke({ 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 }) {
|
|
345
|
+
let m = Te(u), h = z(() => F(s, Ee), [s]), [g, _] = V(null), v = De(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = we({
|
|
346
346
|
containerElement: g,
|
|
347
347
|
containerStyle: f,
|
|
348
348
|
defaultContainerSize: n,
|
|
349
349
|
direction: "vertical",
|
|
350
350
|
itemCount: c,
|
|
351
351
|
itemProps: m,
|
|
352
|
-
itemSize:
|
|
352
|
+
itemSize: z(() => v ? (e) => l.getRowHeight(e) ?? l.getAverageRowHeight() : l, [v, l]),
|
|
353
353
|
onResize: i,
|
|
354
354
|
overscanCount: o
|
|
355
355
|
});
|
|
356
|
-
|
|
356
|
+
te(r, () => ({
|
|
357
357
|
get element() {
|
|
358
358
|
return g;
|
|
359
359
|
},
|
|
@@ -368,12 +368,12 @@ function Ee({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
|
|
|
368
368
|
top: r
|
|
369
369
|
});
|
|
370
370
|
}
|
|
371
|
-
}), [g, x]),
|
|
371
|
+
}), [g, x]), ue(() => {
|
|
372
372
|
if (!g) return;
|
|
373
373
|
let e = Array.from(g.children).filter((e, t) => {
|
|
374
374
|
if (e.hasAttribute("aria-hidden")) return !1;
|
|
375
375
|
let n = `${S + t}`;
|
|
376
|
-
return e.setAttribute(
|
|
376
|
+
return e.setAttribute(Oe, n), !0;
|
|
377
377
|
});
|
|
378
378
|
if (v) return l.observeRowElements(e);
|
|
379
379
|
}, [
|
|
@@ -382,7 +382,7 @@ function Ee({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
|
|
|
382
382
|
l,
|
|
383
383
|
S,
|
|
384
384
|
w
|
|
385
|
-
]),
|
|
385
|
+
]), L(() => {
|
|
386
386
|
S >= 0 && w >= 0 && a && a({
|
|
387
387
|
startIndex: C,
|
|
388
388
|
stopIndex: T
|
|
@@ -397,11 +397,11 @@ function Ee({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
|
|
|
397
397
|
w,
|
|
398
398
|
T
|
|
399
399
|
]);
|
|
400
|
-
let
|
|
400
|
+
let E = z(() => {
|
|
401
401
|
let e = [];
|
|
402
402
|
if (c > 0) for (let t = S; t <= w; t++) {
|
|
403
403
|
let n = y(t);
|
|
404
|
-
e.push(/* @__PURE__ */
|
|
404
|
+
e.push(/* @__PURE__ */ P(h, {
|
|
405
405
|
...m,
|
|
406
406
|
ariaAttributes: {
|
|
407
407
|
"aria-posinset": t + 1,
|
|
@@ -428,7 +428,7 @@ function Ee({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
|
|
|
428
428
|
m,
|
|
429
429
|
S,
|
|
430
430
|
w
|
|
431
|
-
]),
|
|
431
|
+
]), D = /* @__PURE__ */ U("div", {
|
|
432
432
|
"aria-hidden": !0,
|
|
433
433
|
style: {
|
|
434
434
|
height: b(),
|
|
@@ -436,7 +436,7 @@ function Ee({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
|
|
|
436
436
|
zIndex: -1
|
|
437
437
|
}
|
|
438
438
|
});
|
|
439
|
-
return
|
|
439
|
+
return P(d, {
|
|
440
440
|
role: "list",
|
|
441
441
|
...p,
|
|
442
442
|
className: t,
|
|
@@ -448,7 +448,7 @@ function Ee({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
|
|
|
448
448
|
overflowY: "auto",
|
|
449
449
|
...f
|
|
450
450
|
}
|
|
451
|
-
},
|
|
451
|
+
}, E, e, D);
|
|
452
452
|
}
|
|
453
453
|
//#endregion
|
|
454
454
|
//#region src/types/conversation-kind.ts
|
|
@@ -456,45 +456,45 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
456
456
|
return e.All = "all", e.Chat = "chat", e.Task = "task", e;
|
|
457
457
|
}({}), X = /* @__PURE__ */ function(e) {
|
|
458
458
|
return e.Avatar = "avatar", e.Indicator = "indicator", e;
|
|
459
|
-
}({}),
|
|
459
|
+
}({}), Ae = /* @__PURE__ */ function(e) {
|
|
460
460
|
return e.Header = "header", e.Item = "item", e;
|
|
461
|
-
}({}),
|
|
461
|
+
}({}), je = (e, t) => t === n.All || e.source === t, Me = (t, n) => {
|
|
462
462
|
if (n === Y.All) return !0;
|
|
463
463
|
let r = t.kind ?? e.Chat;
|
|
464
464
|
return n === Y.Task ? r === e.Task : r === e.Chat;
|
|
465
|
-
},
|
|
465
|
+
}, Ne = (e, t) => !t || e.title.toLowerCase().includes(t.toLowerCase()), Pe = (e) => `${60 + e * 23 % 35}%`, Fe = (e, t) => e ? t ? "pe-9" : "pe-2 group-focus-within/conversation:pe-9 group-hover/conversation:pe-9" : "pe-3", Ie = (e, t) => {
|
|
466
466
|
let n = t.rows[e];
|
|
467
|
-
return t.rowVariant === X.Indicator ? n.kind ===
|
|
468
|
-
},
|
|
467
|
+
return t.rowVariant === X.Indicator ? n.kind === Ae.Item ? 34 : e === 0 ? 32 : 40 : n.kind === Ae.Item ? 36 : e === 0 ? 24 : 56;
|
|
468
|
+
}, Z = 5, Le = (e) => Math.max(Z, Math.ceil(Math.ceil(e / 36) / 2)), Re = (e, { startIndex: t, stopIndex: n }) => {
|
|
469
469
|
let r = /* @__PURE__ */ new Set();
|
|
470
470
|
for (let i = Math.max(0, t); i <= Math.min(n, e.length - 1); i++) {
|
|
471
471
|
let t = e[i];
|
|
472
|
-
t.kind ===
|
|
472
|
+
t.kind === Ae.Item && r.add(t.item.id);
|
|
473
473
|
}
|
|
474
474
|
return [...r];
|
|
475
|
-
},
|
|
475
|
+
}, ze = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), Be = (e) => {
|
|
476
476
|
switch (e) {
|
|
477
477
|
case n.Shared: return n.Shared;
|
|
478
478
|
case n.Organization: return n.Organization;
|
|
479
479
|
default: return n.MyChats;
|
|
480
480
|
}
|
|
481
|
-
},
|
|
481
|
+
}, Ve = (e, t) => {
|
|
482
482
|
let n = null;
|
|
483
|
-
for (let r of e) if (r.kind ===
|
|
483
|
+
for (let r of e) if (r.kind === Ae.Header) n = r.groupKey;
|
|
484
484
|
else if (r.item.id === t) return n;
|
|
485
485
|
return null;
|
|
486
|
-
},
|
|
486
|
+
}, He = (e, t, r) => {
|
|
487
487
|
let i = /* @__PURE__ */ new Set();
|
|
488
488
|
if (t != null && i.add(t), t === n.Pinned) {
|
|
489
489
|
let t = r.find((t) => t.id === e);
|
|
490
|
-
t && i.add(
|
|
490
|
+
t && i.add(Be(t.source));
|
|
491
491
|
} else i.add(n.Pinned);
|
|
492
492
|
return i;
|
|
493
|
-
},
|
|
493
|
+
}, Ue = (e, t, n, r) => {
|
|
494
494
|
let i = e.currentTarget.getBoundingClientRect();
|
|
495
495
|
if (e.clientY >= i.top + i.height / 2) return t;
|
|
496
496
|
let a = null, o = !1;
|
|
497
|
-
for (let e of n) if (e.kind ===
|
|
497
|
+
for (let e of n) if (e.kind === Ae.Header) o = e.groupKey === r;
|
|
498
498
|
else if (o) {
|
|
499
499
|
if (e.item.id === t) return a;
|
|
500
500
|
a = e.item.id;
|
|
@@ -513,9 +513,9 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
513
513
|
unreadDot: "_unreadDot_gcqru_51",
|
|
514
514
|
search: "_search_gcqru_59",
|
|
515
515
|
list: "_list_gcqru_70"
|
|
516
|
-
},
|
|
516
|
+
}, We = ({ label: e, isExpanded: t, onToggle: n, listId: r, className: i = "dial-tiny-lead-text", variant: o = X.Avatar, dropZoneGroupKey: s, isDragOver: c, onDragOver: l, onDragLeave: u, onDrop: d }) => {
|
|
517
517
|
let f = s != null, p = o === X.Indicator;
|
|
518
|
-
return /* @__PURE__ */
|
|
518
|
+
return /* @__PURE__ */ W("button", {
|
|
519
519
|
type: "button",
|
|
520
520
|
"aria-expanded": t,
|
|
521
521
|
"aria-controls": r,
|
|
@@ -531,25 +531,25 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
531
531
|
} : void 0,
|
|
532
532
|
className: a("group flex h-6 w-full items-center gap-1 rounded text-start", p ? "px-2" : "py-1 pe-3", i, Q.groupHeader, c && Q.dropZoneActive),
|
|
533
533
|
children: [
|
|
534
|
-
!p && (t ? /* @__PURE__ */
|
|
534
|
+
!p && (t ? /* @__PURE__ */ U(ne, {
|
|
535
535
|
size: 12,
|
|
536
536
|
className: "shrink-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-visible:opacity-100",
|
|
537
537
|
"aria-hidden": !0
|
|
538
|
-
}) : /* @__PURE__ */
|
|
538
|
+
}) : /* @__PURE__ */ U(re, {
|
|
539
539
|
size: 12,
|
|
540
540
|
className: "shrink-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-visible:opacity-100 rtl:scale-x-[-1]",
|
|
541
541
|
"aria-hidden": !0
|
|
542
542
|
})),
|
|
543
|
-
p ? /* @__PURE__ */
|
|
543
|
+
p ? /* @__PURE__ */ U("span", {
|
|
544
544
|
className: "max-w-full min-w-0",
|
|
545
|
-
children: /* @__PURE__ */
|
|
546
|
-
}) : /* @__PURE__ */
|
|
547
|
-
p && (t ? /* @__PURE__ */
|
|
545
|
+
children: /* @__PURE__ */ U(v, { text: e })
|
|
546
|
+
}) : /* @__PURE__ */ U(v, { text: e }),
|
|
547
|
+
p && (t ? /* @__PURE__ */ U(G, {
|
|
548
548
|
size: m.SM,
|
|
549
549
|
stroke: h,
|
|
550
550
|
className: "shrink-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-visible:opacity-100",
|
|
551
551
|
"aria-hidden": !0
|
|
552
|
-
}) : /* @__PURE__ */
|
|
552
|
+
}) : /* @__PURE__ */ U(ie, {
|
|
553
553
|
size: m.SM,
|
|
554
554
|
stroke: h,
|
|
555
555
|
className: "shrink-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-visible:opacity-100 rtl:scale-x-[-1]",
|
|
@@ -557,117 +557,117 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
557
557
|
}))
|
|
558
558
|
]
|
|
559
559
|
});
|
|
560
|
-
},
|
|
561
|
-
let [
|
|
562
|
-
N(t), t &&
|
|
563
|
-
}, [e, s]),
|
|
560
|
+
}, Ge = F(({ item: e, isActive: n, onSelectConversation: r, searchQuery: i = "", getActions: o, onActionMenuOpen: s, actionsLabel: c = "More actions", itemTitleClassName: l = "dial-small-text", itemIconBadgeClassName: u, unreadIndicatorLabel: d = "Unread", variant: p = X.Avatar, rowGroupKey: v, rows: y, draggingId: S, dragOverId: C, allowedDropGroups: w, onDragStart: T, onDragEnd: E, onDragOver: D, onDragLeave: O, onDrop: k }) => {
|
|
561
|
+
let [M, N] = V(!1), P = B(null), F = I((t) => {
|
|
562
|
+
N(t), t && P.current && s?.(e, P.current);
|
|
563
|
+
}, [e, s]), L = z(() => o?.(e) ?? [], [o, e]), ee = L.length > 0, te = z(() => ({ tooltip: e.iconTooltip }), [e.iconTooltip]), R = z(() => ({ badgeClassName: u }), [u]), H = p === X.Indicator, ne = e.leadingIcon ? /* @__PURE__ */ U("span", {
|
|
564
564
|
className: "flex size-6 shrink-0 items-center justify-center",
|
|
565
565
|
children: e.leadingIcon
|
|
566
|
-
}) : e.isIconLoading ? /* @__PURE__ */
|
|
567
|
-
variant:
|
|
566
|
+
}) : e.isIconLoading ? /* @__PURE__ */ U(A, {
|
|
567
|
+
variant: j.Circular,
|
|
568
568
|
width: m.LG,
|
|
569
569
|
height: m.LG,
|
|
570
570
|
color: Q.skeletonColor,
|
|
571
571
|
"aria-hidden": !0
|
|
572
|
-
}) : /* @__PURE__ */
|
|
572
|
+
}) : /* @__PURE__ */ U(t, {
|
|
573
573
|
src: e.iconUrl,
|
|
574
574
|
size: m.LG,
|
|
575
575
|
initialsName: e.iconTooltip ?? "",
|
|
576
|
-
labels:
|
|
577
|
-
styles:
|
|
578
|
-
}),
|
|
576
|
+
labels: te,
|
|
577
|
+
styles: R
|
|
578
|
+
}), re = Fe(ee, M), G = /* @__PURE__ */ W("span", {
|
|
579
579
|
className: "flex size-6 shrink-0 items-center justify-center",
|
|
580
|
-
children: [/* @__PURE__ */
|
|
580
|
+
children: [/* @__PURE__ */ U("span", {
|
|
581
581
|
className: a("size-2 rounded-full", e.isUnread ? a("size-[7.11px]", Q.unreadDot) : Q.indicatorDot),
|
|
582
582
|
"aria-hidden": !0
|
|
583
|
-
}), e.isUnread && /* @__PURE__ */
|
|
583
|
+
}), e.isUnread && /* @__PURE__ */ U("span", {
|
|
584
584
|
className: "sr-only",
|
|
585
585
|
children: d
|
|
586
586
|
})]
|
|
587
|
-
}),
|
|
587
|
+
}), ie = e.isUnread && !H ? /* @__PURE__ */ W("span", {
|
|
588
588
|
className: "flex size-6 shrink-0 items-center justify-center",
|
|
589
|
-
children: [/* @__PURE__ */
|
|
590
|
-
className: a("size-[7.11px] rounded-full", Q.unreadDot,
|
|
589
|
+
children: [/* @__PURE__ */ U("span", {
|
|
590
|
+
className: a("size-[7.11px] rounded-full", Q.unreadDot, ee && (M ? "opacity-0" : "group-focus-within/conversation:opacity-0 group-hover/conversation:opacity-0")),
|
|
591
591
|
"aria-hidden": !0
|
|
592
|
-
}), /* @__PURE__ */
|
|
592
|
+
}), /* @__PURE__ */ U("span", {
|
|
593
593
|
className: "sr-only",
|
|
594
594
|
children: d
|
|
595
595
|
})]
|
|
596
|
-
}) : void 0,
|
|
597
|
-
e.currentTarget.contains(e.relatedTarget) ||
|
|
598
|
-
}, [
|
|
599
|
-
if (!v || !y || !
|
|
596
|
+
}) : void 0, K = v != null, oe = I((e) => {
|
|
597
|
+
e.currentTarget.contains(e.relatedTarget) || O?.();
|
|
598
|
+
}, [O]), se = I((t) => {
|
|
599
|
+
if (!v || !y || !k) return;
|
|
600
600
|
t.preventDefault();
|
|
601
|
-
let n =
|
|
602
|
-
|
|
601
|
+
let n = Ue(t, e.id, y, v);
|
|
602
|
+
k(e.id, v, n);
|
|
603
603
|
}, [
|
|
604
604
|
e.id,
|
|
605
605
|
y,
|
|
606
606
|
v,
|
|
607
|
-
|
|
608
|
-
]),
|
|
609
|
-
return /* @__PURE__ */
|
|
610
|
-
className: a("group/conversation relative",
|
|
611
|
-
draggable:
|
|
612
|
-
onDragStart:
|
|
613
|
-
onDragEnd:
|
|
614
|
-
onDragOver:
|
|
615
|
-
t.preventDefault(),
|
|
607
|
+
k
|
|
608
|
+
]), q = e.id === S, ce = e.id === C, le = v != null && (w?.has(v) ?? !1), ue = S != null;
|
|
609
|
+
return /* @__PURE__ */ W("li", {
|
|
610
|
+
className: a("group/conversation relative", q && "cursor-grabbing opacity-50", ce && le && "rounded", ce && le && Q.dropZoneActive, ue && !q && !le && "cursor-not-allowed"),
|
|
611
|
+
draggable: K || void 0,
|
|
612
|
+
onDragStart: K ? () => T?.(e.id) : void 0,
|
|
613
|
+
onDragEnd: K ? E : void 0,
|
|
614
|
+
onDragOver: K ? (t) => {
|
|
615
|
+
t.preventDefault(), D?.(e.id);
|
|
616
616
|
} : void 0,
|
|
617
|
-
onDragLeave:
|
|
618
|
-
onDrop:
|
|
619
|
-
children: [/* @__PURE__ */
|
|
617
|
+
onDragLeave: K ? oe : void 0,
|
|
618
|
+
onDrop: K ? se : void 0,
|
|
619
|
+
children: [/* @__PURE__ */ U("a", {
|
|
620
620
|
href: e.href,
|
|
621
621
|
className: "contents",
|
|
622
622
|
onClick: (t) => {
|
|
623
623
|
e.href && (t.preventDefault(), r(e.id));
|
|
624
624
|
},
|
|
625
|
-
children: /* @__PURE__ */
|
|
626
|
-
iconBefore:
|
|
627
|
-
label: /* @__PURE__ */
|
|
625
|
+
children: /* @__PURE__ */ U(f, {
|
|
626
|
+
iconBefore: H ? G : ne,
|
|
627
|
+
label: /* @__PURE__ */ U(x, {
|
|
628
628
|
text: e.title,
|
|
629
629
|
query: i,
|
|
630
630
|
className: e.isUnread ? "dial-small-semi-text" : l,
|
|
631
631
|
maxLines: 1
|
|
632
632
|
}),
|
|
633
|
-
iconAfter:
|
|
633
|
+
iconAfter: ie,
|
|
634
634
|
textClassName: "min-w-0 flex-1",
|
|
635
635
|
"aria-current": n ? "page" : void 0,
|
|
636
636
|
onClick: e.href ? void 0 : () => r(e.id),
|
|
637
637
|
tabIndex: e.href ? -1 : void 0,
|
|
638
|
-
className: a("h-8 w-full justify-start py-2 after:pointer-events-none",
|
|
638
|
+
className: a("h-8 w-full justify-start py-2 after:pointer-events-none", H ? "gap-0.5 ps-0" : "gap-2 ps-3", re, Q.item, H && Q.itemIndicator, n && Q.itemActive, M && Q.itemActive)
|
|
639
639
|
})
|
|
640
|
-
}),
|
|
641
|
-
className: a("absolute inset-y-0 flex items-center",
|
|
642
|
-
children: /* @__PURE__ */
|
|
643
|
-
items:
|
|
644
|
-
onOpenChange:
|
|
640
|
+
}), ee && /* @__PURE__ */ U("div", {
|
|
641
|
+
className: a("absolute inset-y-0 flex items-center", H ? "end-2" : "end-1", M ? "opacity-100" : "opacity-0 group-focus-within/conversation:opacity-100 group-hover/conversation:opacity-100"),
|
|
642
|
+
children: /* @__PURE__ */ U(g, {
|
|
643
|
+
items: L,
|
|
644
|
+
onOpenChange: F,
|
|
645
645
|
matchReferenceWidth: !1,
|
|
646
646
|
listClassName: "w-[200px]",
|
|
647
|
-
children: /* @__PURE__ */
|
|
648
|
-
ref:
|
|
649
|
-
icon: /* @__PURE__ */
|
|
650
|
-
size:
|
|
647
|
+
children: /* @__PURE__ */ U(b, {
|
|
648
|
+
ref: P,
|
|
649
|
+
icon: /* @__PURE__ */ U(ae, {
|
|
650
|
+
size: H ? m.SM : m.MD,
|
|
651
651
|
className: Q.triggerIcon,
|
|
652
652
|
"aria-hidden": !0,
|
|
653
653
|
stroke: h
|
|
654
654
|
}),
|
|
655
655
|
size: _.Small,
|
|
656
656
|
"aria-label": c,
|
|
657
|
-
className: a(
|
|
657
|
+
className: a(H && "!size-6 !min-h-0 !min-w-0 !p-1", M && Q.triggerActive)
|
|
658
658
|
})
|
|
659
659
|
})
|
|
660
660
|
})]
|
|
661
661
|
});
|
|
662
|
-
}),
|
|
662
|
+
}), Ke = (e, t) => t ? e === 0 ? "pt-2" : "pt-4" : e === 0 ? "pt-0" : "pt-8", qe = ({ index: e, style: t, rows: r, expandedGroups: i, onToggleGroup: a, listId: o, activeConversationId: s, searchQuery: c, onSelectConversation: l, getActions: u, onActionMenuOpen: d, actionsLabel: f, unreadIndicatorLabel: p, styles: m, rowVariant: h = X.Avatar, draggingId: g, dragOverId: _, allowedDropGroups: v, onDragStart: y, onDragEnd: b, onDragOver: x, onDragLeave: S, onDrop: C }) => {
|
|
663
663
|
let w = r[e], T = h === X.Indicator;
|
|
664
|
-
if (w.kind ===
|
|
664
|
+
if (w.kind === Ae.Header) {
|
|
665
665
|
let r = w.groupKey === n.Pinned;
|
|
666
|
-
return /* @__PURE__ */
|
|
666
|
+
return /* @__PURE__ */ U("div", {
|
|
667
667
|
role: "listitem",
|
|
668
668
|
style: t,
|
|
669
|
-
className:
|
|
670
|
-
children: /* @__PURE__ */
|
|
669
|
+
className: Ke(e, T),
|
|
670
|
+
children: /* @__PURE__ */ U(We, {
|
|
671
671
|
variant: h,
|
|
672
672
|
label: w.label,
|
|
673
673
|
isExpanded: i.has(w.groupKey),
|
|
@@ -682,11 +682,11 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
682
682
|
})
|
|
683
683
|
});
|
|
684
684
|
}
|
|
685
|
-
return /* @__PURE__ */
|
|
685
|
+
return /* @__PURE__ */ U("div", {
|
|
686
686
|
role: "presentation",
|
|
687
687
|
style: t,
|
|
688
688
|
className: T ? "pt-0.5" : "pt-1",
|
|
689
|
-
children: /* @__PURE__ */
|
|
689
|
+
children: /* @__PURE__ */ U(Ge, {
|
|
690
690
|
variant: h,
|
|
691
691
|
item: w.item,
|
|
692
692
|
isActive: w.item.id === s,
|
|
@@ -710,58 +710,58 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
710
710
|
onDrop: C
|
|
711
711
|
})
|
|
712
712
|
});
|
|
713
|
-
},
|
|
713
|
+
}, Je = /* @__PURE__ */ new Set([
|
|
714
714
|
n.Pinned,
|
|
715
715
|
n.MyChats,
|
|
716
716
|
n.Shared,
|
|
717
717
|
n.Organization
|
|
718
|
-
]),
|
|
719
|
-
let { colors:
|
|
720
|
-
|
|
721
|
-
}, []),
|
|
722
|
-
|
|
718
|
+
]), $ = F(({ conversations: e, isLoading: t, isUpdatingTitles: i = !1, preserveActiveSearchResult: o = !1, onSelectConversation: s, activeConversationId: u, labels: d, searchQuery: f = "", activeFilter: p = n.All, activeTypeFilter: m = Y.All, hiddenSources: h, rowVariant: g, getActions: _, onActionMenuOpen: v, onMoveConversation: y, onVisibleConversationIdsChange: b, styles: x, id: S, className: T }) => {
|
|
719
|
+
let { colors: E, typography: D, itemIconBadgeClassName: O } = x ?? {}, { emptyLabel: k, emptyDescription: j, noResultsLabel: M, noResultsDescription: N, sharedEmptyDescription: P = N, tabEmptyLabels: F, loadingLabel: te = "Loading conversations", updatingTitlesLabel: R = "Updating conversation names", groupLabels: H, actionsLabel: ne, unreadIndicatorLabel: re } = d, G = z(() => h?.length ? e.filter((e) => e.source == null || !h.includes(e.source)) : e, [e, h]), [ie, ae] = V(() => Je), [K, oe] = V(5), se = ee(), q = B(null), ce = B(null), [ue, de] = V(null), [fe, pe] = V(null), [me, he] = V(null), ge = B(null), J = B(null), _e = I(({ height: e }) => {
|
|
720
|
+
oe(Le(e));
|
|
721
|
+
}, []), ve = I((e) => {
|
|
722
|
+
ae((t) => {
|
|
723
723
|
let n = new Set(t);
|
|
724
724
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
725
725
|
});
|
|
726
|
-
}, []),
|
|
727
|
-
|
|
728
|
-
}, []),
|
|
729
|
-
let n =
|
|
730
|
-
|
|
731
|
-
}, [
|
|
732
|
-
|
|
733
|
-
}, [
|
|
734
|
-
|
|
735
|
-
}, []),
|
|
736
|
-
|
|
737
|
-
}, []),
|
|
738
|
-
let r =
|
|
739
|
-
|
|
726
|
+
}, []), ye = I(() => {
|
|
727
|
+
ge.current = null, J.current = null, de(null), pe(null), he(null);
|
|
728
|
+
}, []), be = I((e, t) => {
|
|
729
|
+
let n = He(e, Ve(t, e), G);
|
|
730
|
+
ge.current = e, J.current = n, de(e), he(n);
|
|
731
|
+
}, [G]), xe = I(() => {
|
|
732
|
+
ye();
|
|
733
|
+
}, [ye]), Se = I((e) => {
|
|
734
|
+
pe(e);
|
|
735
|
+
}, []), Ce = I(() => {
|
|
736
|
+
pe(null);
|
|
737
|
+
}, []), we = I((e, t, n) => {
|
|
738
|
+
let r = ge.current, i = J.current;
|
|
739
|
+
ye(), r != null && r !== e && i?.has(t) && y?.({
|
|
740
740
|
draggedId: r,
|
|
741
741
|
targetGroupKey: t,
|
|
742
742
|
afterId: n
|
|
743
743
|
});
|
|
744
|
-
}, [
|
|
745
|
-
"--cp-item-hover":
|
|
746
|
-
"--cp-item-active":
|
|
747
|
-
"--cp-text":
|
|
748
|
-
"--cp-text-secondary":
|
|
749
|
-
"--cp-drop-zone-ring":
|
|
750
|
-
"--cp-trigger-bg":
|
|
751
|
-
"--cp-trigger-icon":
|
|
752
|
-
"--cp-trigger-icon-idle":
|
|
753
|
-
"--cp-skeleton-color":
|
|
754
|
-
"--cp-unread-dot":
|
|
755
|
-
"--cp-indicator-dot":
|
|
756
|
-
"--cp-list-font-family":
|
|
757
|
-
}), [
|
|
758
|
-
|
|
744
|
+
}, [ye, y]), Te = r({
|
|
745
|
+
"--cp-item-hover": E?.itemHover,
|
|
746
|
+
"--cp-item-active": E?.itemActive,
|
|
747
|
+
"--cp-text": E?.text,
|
|
748
|
+
"--cp-text-secondary": E?.textSecondary,
|
|
749
|
+
"--cp-drop-zone-ring": E?.dropZoneRing,
|
|
750
|
+
"--cp-trigger-bg": E?.triggerBackground,
|
|
751
|
+
"--cp-trigger-icon": E?.triggerIcon,
|
|
752
|
+
"--cp-trigger-icon-idle": E?.triggerIconIdle,
|
|
753
|
+
"--cp-skeleton-color": E?.skeletonColor,
|
|
754
|
+
"--cp-unread-dot": E?.unreadDot,
|
|
755
|
+
"--cp-indicator-dot": E?.indicatorDot,
|
|
756
|
+
"--cp-list-font-family": D?.fontFamily
|
|
757
|
+
}), [Ee, De] = V(null);
|
|
758
|
+
L(() => {
|
|
759
759
|
if (!o || !f || !u) {
|
|
760
|
-
|
|
760
|
+
De(null);
|
|
761
761
|
return;
|
|
762
762
|
}
|
|
763
|
-
let e =
|
|
764
|
-
|
|
763
|
+
let e = G.find((e) => e.id === u);
|
|
764
|
+
De((t) => e && Ne(e, f) ? t?.id === e.id && t.query === f ? t : {
|
|
765
765
|
id: e.id,
|
|
766
766
|
query: f
|
|
767
767
|
} : t?.id === u && t.query === f ? t : null);
|
|
@@ -769,10 +769,10 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
769
769
|
o,
|
|
770
770
|
f,
|
|
771
771
|
u,
|
|
772
|
-
|
|
772
|
+
G
|
|
773
773
|
]);
|
|
774
|
-
let
|
|
775
|
-
o && f &&
|
|
774
|
+
let Oe = I((e) => {
|
|
775
|
+
o && f && De({
|
|
776
776
|
id: e,
|
|
777
777
|
query: f
|
|
778
778
|
}), s(e);
|
|
@@ -780,177 +780,176 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
780
780
|
o,
|
|
781
781
|
f,
|
|
782
782
|
s
|
|
783
|
-
]),
|
|
784
|
-
|
|
783
|
+
]), Fe = o && f !== "" && Ee?.query === f && Ee.id === u ? Ee.id : void 0, Z = z(() => G.filter((e) => je(e, p) && Me(e, m) && (Ne(e, f) || e.id === Fe)), [
|
|
784
|
+
G,
|
|
785
785
|
p,
|
|
786
786
|
m,
|
|
787
787
|
f,
|
|
788
|
-
|
|
789
|
-
]), Be =
|
|
788
|
+
Fe
|
|
789
|
+
]), Be = z(() => Z.filter((e) => e.isPinned), [Z]), Ue = z(() => Z.filter((e) => !e.isPinned && e.source !== n.Shared && e.source !== n.Organization), [Z]), We = z(() => Z.filter((e) => !e.isPinned && e.source === n.Shared), [Z]), Ge = z(() => Z.filter((e) => !e.isPinned && e.source === n.Organization), [Z]), Ke = z(() => [
|
|
790
790
|
{
|
|
791
791
|
key: n.Pinned,
|
|
792
|
-
label:
|
|
792
|
+
label: H?.pinned ?? "Pinned",
|
|
793
793
|
items: Be
|
|
794
794
|
},
|
|
795
795
|
{
|
|
796
796
|
key: n.MyChats,
|
|
797
|
-
label:
|
|
798
|
-
items:
|
|
797
|
+
label: H?.myChats ?? "My chats",
|
|
798
|
+
items: Ue
|
|
799
799
|
},
|
|
800
800
|
{
|
|
801
801
|
key: n.Shared,
|
|
802
|
-
label:
|
|
803
|
-
items:
|
|
802
|
+
label: H?.shared ?? "Shared",
|
|
803
|
+
items: We
|
|
804
804
|
},
|
|
805
805
|
{
|
|
806
806
|
key: n.Organization,
|
|
807
|
-
label:
|
|
808
|
-
items:
|
|
807
|
+
label: H?.organization ?? "Organization",
|
|
808
|
+
items: Ge
|
|
809
809
|
}
|
|
810
810
|
], [
|
|
811
|
-
|
|
811
|
+
H,
|
|
812
812
|
Be,
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
]), $ =
|
|
813
|
+
Ue,
|
|
814
|
+
We,
|
|
815
|
+
Ge
|
|
816
|
+
]), $ = z(() => {
|
|
817
817
|
let e = [];
|
|
818
818
|
for (let t of Ke) if (t.items.length !== 0 && (e.push({
|
|
819
|
-
kind:
|
|
819
|
+
kind: Ae.Header,
|
|
820
820
|
groupKey: t.key,
|
|
821
821
|
label: t.label
|
|
822
|
-
}),
|
|
823
|
-
kind:
|
|
822
|
+
}), ie.has(t.key))) for (let n of t.items) e.push({
|
|
823
|
+
kind: Ae.Item,
|
|
824
824
|
item: n,
|
|
825
825
|
groupKey: t.key
|
|
826
826
|
});
|
|
827
827
|
return e;
|
|
828
|
-
}, [Ke,
|
|
829
|
-
|
|
830
|
-
if (!u ||
|
|
831
|
-
let e = $.findIndex((e) => e.kind ===
|
|
832
|
-
e >= 0 && (
|
|
828
|
+
}, [Ke, ie]);
|
|
829
|
+
L(() => {
|
|
830
|
+
if (!u || ce.current === u) return;
|
|
831
|
+
let e = $.findIndex((e) => e.kind === Ae.Item && e.item.id === u);
|
|
832
|
+
e >= 0 && (q.current?.scrollToRow({
|
|
833
833
|
index: e,
|
|
834
834
|
align: "smart",
|
|
835
835
|
behavior: "smooth"
|
|
836
|
-
}),
|
|
836
|
+
}), ce.current = u);
|
|
837
837
|
}, [
|
|
838
838
|
u,
|
|
839
839
|
Ke,
|
|
840
|
-
|
|
840
|
+
ie,
|
|
841
841
|
$
|
|
842
842
|
]);
|
|
843
|
-
let
|
|
844
|
-
|
|
845
|
-
|
|
843
|
+
let Ye = B($);
|
|
844
|
+
L(() => {
|
|
845
|
+
Ye.current = $;
|
|
846
846
|
}, [$]);
|
|
847
|
-
let
|
|
847
|
+
let Xe = I((e) => be(e, Ye.current), [be]), Ze = z(() => ({
|
|
848
848
|
rows: $,
|
|
849
|
-
expandedGroups:
|
|
850
|
-
onToggleGroup:
|
|
851
|
-
listId:
|
|
849
|
+
expandedGroups: ie,
|
|
850
|
+
onToggleGroup: ve,
|
|
851
|
+
listId: se,
|
|
852
852
|
activeConversationId: u,
|
|
853
853
|
searchQuery: f,
|
|
854
|
-
onSelectConversation:
|
|
854
|
+
onSelectConversation: Oe,
|
|
855
855
|
getActions: _,
|
|
856
856
|
onActionMenuOpen: v,
|
|
857
|
-
actionsLabel:
|
|
858
|
-
unreadIndicatorLabel:
|
|
857
|
+
actionsLabel: ne,
|
|
858
|
+
unreadIndicatorLabel: re,
|
|
859
859
|
rowVariant: g,
|
|
860
860
|
styles: {
|
|
861
|
-
groupHeaderClassName:
|
|
862
|
-
itemTitleClassName:
|
|
863
|
-
itemIconBadgeClassName:
|
|
861
|
+
groupHeaderClassName: D?.groupHeaderClassName,
|
|
862
|
+
itemTitleClassName: D?.itemTitleClassName,
|
|
863
|
+
itemIconBadgeClassName: O
|
|
864
864
|
},
|
|
865
|
-
draggingId:
|
|
866
|
-
dragOverId:
|
|
867
|
-
allowedDropGroups:
|
|
868
|
-
onDragStart:
|
|
869
|
-
onDragEnd:
|
|
870
|
-
onDragOver:
|
|
871
|
-
onDragLeave:
|
|
872
|
-
onDrop:
|
|
865
|
+
draggingId: ue,
|
|
866
|
+
dragOverId: fe,
|
|
867
|
+
allowedDropGroups: me,
|
|
868
|
+
onDragStart: Xe,
|
|
869
|
+
onDragEnd: xe,
|
|
870
|
+
onDragOver: Se,
|
|
871
|
+
onDragLeave: Ce,
|
|
872
|
+
onDrop: we
|
|
873
873
|
}), [
|
|
874
874
|
$,
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
875
|
+
ie,
|
|
876
|
+
ve,
|
|
877
|
+
se,
|
|
878
878
|
u,
|
|
879
879
|
f,
|
|
880
|
-
|
|
880
|
+
Oe,
|
|
881
881
|
_,
|
|
882
882
|
v,
|
|
883
|
-
|
|
884
|
-
|
|
883
|
+
ne,
|
|
884
|
+
re,
|
|
885
885
|
g,
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
de,
|
|
886
|
+
D?.groupHeaderClassName,
|
|
887
|
+
D?.itemTitleClassName,
|
|
888
|
+
O,
|
|
889
|
+
ue,
|
|
891
890
|
fe,
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
be,
|
|
891
|
+
me,
|
|
892
|
+
Xe,
|
|
895
893
|
xe,
|
|
896
|
-
Se
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
894
|
+
Se,
|
|
895
|
+
Ce,
|
|
896
|
+
we
|
|
897
|
+
]), Qe = f !== "" || p !== n.All || m !== Y.All, $e = Z.length === 0, et = $e && Qe, tt = $e && !Qe, nt = et && f === "" && m === Y.All ? F?.[p] : void 0, rt = nt?.label ?? M, it = p === n.Shared && f === "" ? P : N, at = nt?.description ?? it, ot = !t && !$e, st = B(null), ct = B(null), lt = B(b);
|
|
898
|
+
L(() => {
|
|
899
|
+
lt.current = b;
|
|
900
900
|
}, [b]);
|
|
901
|
-
let
|
|
902
|
-
|
|
903
|
-
}, []),
|
|
904
|
-
|
|
905
|
-
}, [$,
|
|
906
|
-
return
|
|
907
|
-
|
|
901
|
+
let ut = I((e) => {
|
|
902
|
+
ct.current && ze(ct.current, e) || (ct.current = e, lt.current?.(e));
|
|
903
|
+
}, []), dt = I((e) => {
|
|
904
|
+
st.current = e, ut(Re($, e));
|
|
905
|
+
}, [$, ut]);
|
|
906
|
+
return L(() => {
|
|
907
|
+
ot ? st.current && ut(Re($, st.current)) : (st.current = null, ut([]));
|
|
908
908
|
}, [
|
|
909
|
-
|
|
909
|
+
ot,
|
|
910
910
|
$,
|
|
911
|
-
|
|
912
|
-
]), /* @__PURE__ */
|
|
911
|
+
ut
|
|
912
|
+
]), /* @__PURE__ */ W("div", {
|
|
913
913
|
id: S,
|
|
914
|
-
style:
|
|
915
|
-
className: a("flex-1 overflow-hidden px-3", Q.list,
|
|
916
|
-
children: [/* @__PURE__ */
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
}), t ? /* @__PURE__ */ R("div", {
|
|
914
|
+
style: Te,
|
|
915
|
+
className: a("flex-1 overflow-hidden px-3", Q.list, D?.fontClassName, g !== X.Indicator && "py-1", T, le.list),
|
|
916
|
+
children: [/* @__PURE__ */ U(C, {
|
|
917
|
+
visuallyHidden: !0,
|
|
918
|
+
as: w.Span,
|
|
919
|
+
children: t ? te : i ? R : tt ? k : et ? rt : ""
|
|
920
|
+
}), t ? /* @__PURE__ */ U("div", {
|
|
922
921
|
className: "flex flex-col gap-3 px-2 py-3",
|
|
923
|
-
children: Array.from({ length: 15 }, (e, t) => /* @__PURE__ */
|
|
922
|
+
children: Array.from({ length: 15 }, (e, t) => /* @__PURE__ */ U(A, {
|
|
924
923
|
avatar: { size: 24 },
|
|
925
|
-
showTitle: { width:
|
|
924
|
+
showTitle: { width: Pe(t) },
|
|
926
925
|
paragraph: !1,
|
|
927
926
|
active: !0,
|
|
928
927
|
color: Q.skeletonColor
|
|
929
928
|
}, t))
|
|
930
|
-
}) :
|
|
931
|
-
label:
|
|
932
|
-
description:
|
|
933
|
-
}) :
|
|
934
|
-
label:
|
|
935
|
-
description:
|
|
936
|
-
}) : /* @__PURE__ */
|
|
937
|
-
listRef:
|
|
938
|
-
id:
|
|
929
|
+
}) : tt ? /* @__PURE__ */ U(c, {
|
|
930
|
+
label: k,
|
|
931
|
+
description: j
|
|
932
|
+
}) : et && f !== "" && i ? /* @__PURE__ */ U(c, { label: R }) : et ? /* @__PURE__ */ U(l, {
|
|
933
|
+
label: rt,
|
|
934
|
+
description: at
|
|
935
|
+
}) : /* @__PURE__ */ U(ke, {
|
|
936
|
+
listRef: q,
|
|
937
|
+
id: se,
|
|
939
938
|
role: "list",
|
|
940
939
|
style: { height: "100%" },
|
|
941
|
-
rowComponent:
|
|
940
|
+
rowComponent: qe,
|
|
942
941
|
rowCount: $.length,
|
|
943
|
-
rowHeight:
|
|
944
|
-
overscanCount:
|
|
945
|
-
onResize:
|
|
946
|
-
onRowsRendered:
|
|
947
|
-
rowProps:
|
|
942
|
+
rowHeight: Ie,
|
|
943
|
+
overscanCount: K,
|
|
944
|
+
onResize: _e,
|
|
945
|
+
onRowsRendered: dt,
|
|
946
|
+
rowProps: Ze
|
|
948
947
|
})]
|
|
949
948
|
});
|
|
950
|
-
}),
|
|
949
|
+
}), Ye = {
|
|
951
950
|
title: "_title_r35fs_2",
|
|
952
951
|
filterIndicator: "_filterIndicator_r35fs_13"
|
|
953
|
-
},
|
|
952
|
+
}, Xe = "!size-6 !min-h-0 !min-w-0 !p-1", Ze = [
|
|
954
953
|
{
|
|
955
954
|
value: n.All,
|
|
956
955
|
getLabel: (e) => e.all
|
|
@@ -967,7 +966,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
967
966
|
value: n.Organization,
|
|
968
967
|
getLabel: (e) => e.organization
|
|
969
968
|
}
|
|
970
|
-
],
|
|
969
|
+
], Qe = [
|
|
971
970
|
{
|
|
972
971
|
value: Y.All,
|
|
973
972
|
getLabel: (e) => e.all
|
|
@@ -980,35 +979,35 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
980
979
|
value: Y.Task,
|
|
981
980
|
getLabel: (e) => e.task ?? "Task"
|
|
982
981
|
}
|
|
983
|
-
],
|
|
984
|
-
let
|
|
985
|
-
|
|
986
|
-
c ? O.current?.focus() :
|
|
982
|
+
], $e = F(({ labels: e, isExpanded: t = !0, onToggleExpanded: i, controlsId: o, searchQuery: s = "", isSearchOpen: c = !1, onSearchChange: l, onSearchOpenChange: u, activeFilter: d = n.All, onFilterChange: f, activeTypeFilter: p = Y.All, onTypeFilterChange: v, hiddenSources: y, actions: x, styles: S, className: C }) => {
|
|
983
|
+
let w = S?.typography?.titleClassName ?? "dial-tiny-lead-semi-text", T = S?.typography?.searchTextClassName ?? "dial-tiny-text", D = B(null), O = B(null), A = B(c), j = e.filterLabels.groupAriaLabel ?? "Filter chats", M = e.filterActiveLabel ?? "Filters applied", N = ee(), P = d !== n.All || p !== Y.All, F = l != null && u != null;
|
|
984
|
+
L(() => {
|
|
985
|
+
c ? O.current?.focus() : A.current && D.current?.focus(), A.current = c;
|
|
987
986
|
}, [c]);
|
|
988
|
-
let
|
|
987
|
+
let te = I(() => {
|
|
989
988
|
u?.(!0);
|
|
990
|
-
}, [u]),
|
|
989
|
+
}, [u]), R = I(() => {
|
|
991
990
|
l?.(""), u?.(!1);
|
|
992
|
-
}, [l, u]),
|
|
991
|
+
}, [l, u]), V = I((e) => {
|
|
993
992
|
l?.(e ?? "");
|
|
994
|
-
}, [l]),
|
|
995
|
-
e.key === "Escape" && (e.stopPropagation(),
|
|
996
|
-
}, [
|
|
997
|
-
let { filterLabels: t } = e, n = (e, t) => () => /* @__PURE__ */
|
|
993
|
+
}, [l]), ne = I((e) => {
|
|
994
|
+
e.key === "Escape" && (e.stopPropagation(), R());
|
|
995
|
+
}, [R]), re = z(() => {
|
|
996
|
+
let { filterLabels: t } = e, n = (e, t) => () => /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("span", {
|
|
998
997
|
className: "min-w-0 flex-1 truncate text-start",
|
|
999
998
|
children: e
|
|
1000
|
-
}), /* @__PURE__ */
|
|
999
|
+
}), /* @__PURE__ */ U("span", {
|
|
1001
1000
|
className: "shrink-0 text-secondary",
|
|
1002
1001
|
children: t
|
|
1003
1002
|
})] }), r = [];
|
|
1004
1003
|
if (v) {
|
|
1005
|
-
let e =
|
|
1004
|
+
let e = Qe.map(({ value: e, getLabel: n }) => ({
|
|
1006
1005
|
key: e,
|
|
1007
1006
|
label: n(t),
|
|
1008
|
-
mark:
|
|
1007
|
+
mark: E.Check,
|
|
1009
1008
|
checked: e === p,
|
|
1010
1009
|
onClick: () => v(e)
|
|
1011
|
-
})), i =
|
|
1010
|
+
})), i = Qe.find(({ value: e }) => e === p);
|
|
1012
1011
|
r.push({
|
|
1013
1012
|
key: "filter-type",
|
|
1014
1013
|
label: t.type ?? "Type",
|
|
@@ -1017,7 +1016,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1017
1016
|
});
|
|
1018
1017
|
}
|
|
1019
1018
|
if (f) {
|
|
1020
|
-
let e =
|
|
1019
|
+
let e = Ze.filter(({ value: e }) => !y?.includes(e)), i = e.find(({ value: e }) => e === d);
|
|
1021
1020
|
r.push({
|
|
1022
1021
|
key: "filter-origin",
|
|
1023
1022
|
label: t.origin ?? "Origin",
|
|
@@ -1025,7 +1024,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1025
1024
|
children: e.map(({ value: e, getLabel: n }) => ({
|
|
1026
1025
|
key: e,
|
|
1027
1026
|
label: n(t),
|
|
1028
|
-
mark:
|
|
1027
|
+
mark: E.Check,
|
|
1029
1028
|
checked: e === d,
|
|
1030
1029
|
onClick: () => f(e)
|
|
1031
1030
|
}))
|
|
@@ -1039,7 +1038,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1039
1038
|
p,
|
|
1040
1039
|
f,
|
|
1041
1040
|
v
|
|
1042
|
-
]),
|
|
1041
|
+
]), ae = z(() => r({
|
|
1043
1042
|
"--cp-list-header-title": S?.colors?.title,
|
|
1044
1043
|
"--cp-list-header-title-focus": S?.colors?.titleFocus,
|
|
1045
1044
|
"--cp-list-header-filter-indicator": S?.colors?.filterIndicator
|
|
@@ -1047,147 +1046,147 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1047
1046
|
S?.colors?.title,
|
|
1048
1047
|
S?.colors?.titleFocus,
|
|
1049
1048
|
S?.colors?.filterIndicator
|
|
1050
|
-
]),
|
|
1051
|
-
if (
|
|
1049
|
+
]), oe = (e) => a("flex min-h-6 items-center justify-between ps-2", e, C, le.listHeader);
|
|
1050
|
+
if (F && c) return /* @__PURE__ */ W("div", {
|
|
1052
1051
|
role: "search",
|
|
1053
|
-
style:
|
|
1054
|
-
className:
|
|
1055
|
-
onKeyDown:
|
|
1056
|
-
children: [/* @__PURE__ */
|
|
1052
|
+
style: ae,
|
|
1053
|
+
className: oe("gap-2"),
|
|
1054
|
+
onKeyDown: ne,
|
|
1055
|
+
children: [/* @__PURE__ */ U(k, {
|
|
1057
1056
|
containerClassName: "min-w-0 flex-1",
|
|
1058
|
-
wrapperClassName: a("!h-6 !min-h-0 !py-1 !pe-2 [&_svg]:!size-4",
|
|
1057
|
+
wrapperClassName: a("!h-6 !min-h-0 !py-1 !pe-2 [&_svg]:!size-4", T),
|
|
1059
1058
|
inputRef: O,
|
|
1060
1059
|
value: s,
|
|
1061
|
-
onChange:
|
|
1060
|
+
onChange: V,
|
|
1062
1061
|
placeholder: e.searchPlaceholder,
|
|
1063
1062
|
clearLabel: e.searchClearLabel,
|
|
1064
1063
|
"aria-label": e.searchPlaceholder
|
|
1065
|
-
}), /* @__PURE__ */
|
|
1066
|
-
icon: /* @__PURE__ */
|
|
1064
|
+
}), /* @__PURE__ */ U(b, {
|
|
1065
|
+
icon: /* @__PURE__ */ U(ce, {
|
|
1067
1066
|
size: m.SM,
|
|
1068
1067
|
stroke: h,
|
|
1069
1068
|
"aria-hidden": !0
|
|
1070
1069
|
}),
|
|
1071
1070
|
size: _.Small,
|
|
1072
|
-
className:
|
|
1071
|
+
className: Xe,
|
|
1073
1072
|
"aria-label": e.searchCloseLabel,
|
|
1074
|
-
onClick:
|
|
1073
|
+
onClick: R
|
|
1075
1074
|
})]
|
|
1076
1075
|
});
|
|
1077
|
-
let
|
|
1078
|
-
className:
|
|
1076
|
+
let q = /* @__PURE__ */ U("span", {
|
|
1077
|
+
className: w,
|
|
1079
1078
|
children: e.title
|
|
1080
1079
|
});
|
|
1081
|
-
return /* @__PURE__ */
|
|
1082
|
-
style:
|
|
1083
|
-
className:
|
|
1084
|
-
children: [i ? /* @__PURE__ */
|
|
1080
|
+
return /* @__PURE__ */ W("div", {
|
|
1081
|
+
style: ae,
|
|
1082
|
+
className: oe(),
|
|
1083
|
+
children: [i ? /* @__PURE__ */ W("button", {
|
|
1085
1084
|
type: "button",
|
|
1086
1085
|
"aria-expanded": t,
|
|
1087
1086
|
"aria-controls": o,
|
|
1088
1087
|
onClick: i,
|
|
1089
|
-
className: a("group flex items-center gap-1 rounded",
|
|
1090
|
-
children: [
|
|
1088
|
+
className: a("group flex items-center gap-1 rounded", Ye.title),
|
|
1089
|
+
children: [q, t ? /* @__PURE__ */ U(G, {
|
|
1091
1090
|
size: m.SM,
|
|
1092
1091
|
stroke: h,
|
|
1093
1092
|
className: "opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100",
|
|
1094
1093
|
"aria-hidden": !0
|
|
1095
|
-
}) : /* @__PURE__ */
|
|
1094
|
+
}) : /* @__PURE__ */ U(ie, {
|
|
1096
1095
|
size: m.SM,
|
|
1097
1096
|
stroke: h,
|
|
1098
1097
|
className: "opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100 rtl:scale-x-[-1]",
|
|
1099
1098
|
"aria-hidden": !0
|
|
1100
1099
|
})]
|
|
1101
|
-
}) : /* @__PURE__ */
|
|
1102
|
-
className:
|
|
1103
|
-
children:
|
|
1104
|
-
}), /* @__PURE__ */
|
|
1100
|
+
}) : /* @__PURE__ */ U("span", {
|
|
1101
|
+
className: Ye.title,
|
|
1102
|
+
children: q
|
|
1103
|
+
}), /* @__PURE__ */ W("div", {
|
|
1105
1104
|
className: "flex items-center gap-2",
|
|
1106
1105
|
children: [
|
|
1107
|
-
|
|
1106
|
+
F && /* @__PURE__ */ U(b, {
|
|
1108
1107
|
ref: D,
|
|
1109
|
-
icon: /* @__PURE__ */
|
|
1108
|
+
icon: /* @__PURE__ */ U(se, {
|
|
1110
1109
|
size: m.SM,
|
|
1111
1110
|
stroke: h,
|
|
1112
1111
|
"aria-hidden": !0
|
|
1113
1112
|
}),
|
|
1114
1113
|
size: _.Small,
|
|
1115
|
-
className:
|
|
1114
|
+
className: Xe,
|
|
1116
1115
|
"aria-label": e.searchOpenLabel,
|
|
1117
|
-
onClick:
|
|
1116
|
+
onClick: te
|
|
1118
1117
|
}),
|
|
1119
|
-
(f || v) && /* @__PURE__ */
|
|
1120
|
-
items:
|
|
1118
|
+
(f || v) && /* @__PURE__ */ U(g, {
|
|
1119
|
+
items: re,
|
|
1121
1120
|
placement: "bottom-end",
|
|
1122
1121
|
matchReferenceWidth: !1,
|
|
1123
|
-
children: /* @__PURE__ */
|
|
1124
|
-
icon: /* @__PURE__ */
|
|
1122
|
+
children: /* @__PURE__ */ U(b, {
|
|
1123
|
+
icon: /* @__PURE__ */ W("span", {
|
|
1125
1124
|
className: "relative inline-flex",
|
|
1126
|
-
children: [/* @__PURE__ */
|
|
1125
|
+
children: [/* @__PURE__ */ U(K, {
|
|
1127
1126
|
size: m.SM,
|
|
1128
1127
|
stroke: h,
|
|
1129
1128
|
"aria-hidden": !0
|
|
1130
|
-
}), P && /* @__PURE__ */
|
|
1129
|
+
}), P && /* @__PURE__ */ U("span", {
|
|
1131
1130
|
"aria-hidden": !0,
|
|
1132
|
-
className: a(
|
|
1131
|
+
className: a(Ye.filterIndicator, "absolute -end-0.5 -top-0.5 size-1.5 rounded-full")
|
|
1133
1132
|
})]
|
|
1134
1133
|
}),
|
|
1135
1134
|
size: _.Small,
|
|
1136
|
-
className:
|
|
1137
|
-
"aria-label":
|
|
1138
|
-
"aria-describedby": P ?
|
|
1135
|
+
className: Xe,
|
|
1136
|
+
"aria-label": j,
|
|
1137
|
+
"aria-describedby": P ? N : void 0
|
|
1139
1138
|
})
|
|
1140
1139
|
}),
|
|
1141
|
-
P && (f || v) && /* @__PURE__ */
|
|
1142
|
-
id:
|
|
1140
|
+
P && (f || v) && /* @__PURE__ */ U("span", {
|
|
1141
|
+
id: N,
|
|
1143
1142
|
className: "sr-only",
|
|
1144
|
-
children:
|
|
1143
|
+
children: M
|
|
1145
1144
|
}),
|
|
1146
1145
|
x
|
|
1147
1146
|
]
|
|
1148
1147
|
})]
|
|
1149
1148
|
});
|
|
1150
|
-
}),
|
|
1151
|
-
let C =
|
|
1152
|
-
|
|
1153
|
-
l != null &&
|
|
1149
|
+
}), et = F(({ conversations: e, isLoading: t, isUpdatingTitles: r, preserveActiveSearchResult: i, onSelectConversation: o, activeConversationId: s, labels: c, requestedFilter: l, isFilterHidden: u = !1, onFilterChange: d, isTypeFilterHidden: f = !1, onTypeFilterChange: p, hiddenSources: m, headerActions: h, getActions: g, onActionMenuOpen: _, onMoveConversation: v, onVisibleConversationIdsChange: y, styles: b, listClassName: x, className: S }) => {
|
|
1150
|
+
let C = ee(), [w, T] = V(""), [E, D] = V(!1), [O, k] = V(!0), [A, j] = V(n.All), [M, N] = V(Y.All);
|
|
1151
|
+
L(() => {
|
|
1152
|
+
l != null && j(l);
|
|
1154
1153
|
}, [l]);
|
|
1155
|
-
let P =
|
|
1156
|
-
|
|
1157
|
-
}, [d]), F =
|
|
1158
|
-
T(e), e !== "" &&
|
|
1159
|
-
}, []),
|
|
1160
|
-
|
|
1161
|
-
}, []),
|
|
1162
|
-
|
|
1163
|
-
}, [p]),
|
|
1164
|
-
return /* @__PURE__ */
|
|
1154
|
+
let P = I((e) => {
|
|
1155
|
+
j(e), d?.(e);
|
|
1156
|
+
}, [d]), F = I((e) => {
|
|
1157
|
+
T(e), e !== "" && k(!0);
|
|
1158
|
+
}, []), te = I((e) => {
|
|
1159
|
+
D(e), e && k(!0);
|
|
1160
|
+
}, []), R = I((e) => {
|
|
1161
|
+
N(e), p?.(e);
|
|
1162
|
+
}, [p]), z = I(() => k((e) => !e), []);
|
|
1163
|
+
return /* @__PURE__ */ W("section", {
|
|
1165
1164
|
"aria-label": c.title,
|
|
1166
|
-
className: a("flex min-h-0 flex-1 flex-col px-1 pt-4", S,
|
|
1167
|
-
children: [/* @__PURE__ */
|
|
1165
|
+
className: a("flex min-h-0 flex-1 flex-col px-1 pt-4", S, le.listSection),
|
|
1166
|
+
children: [/* @__PURE__ */ U("div", {
|
|
1168
1167
|
className: "px-3 pb-2",
|
|
1169
|
-
children: /* @__PURE__ */
|
|
1168
|
+
children: /* @__PURE__ */ U($e, {
|
|
1170
1169
|
labels: c,
|
|
1171
|
-
isExpanded:
|
|
1172
|
-
onToggleExpanded:
|
|
1170
|
+
isExpanded: O,
|
|
1171
|
+
onToggleExpanded: z,
|
|
1173
1172
|
controlsId: C,
|
|
1174
1173
|
searchQuery: w,
|
|
1175
|
-
isSearchOpen:
|
|
1174
|
+
isSearchOpen: E,
|
|
1176
1175
|
onSearchChange: F,
|
|
1177
|
-
onSearchOpenChange:
|
|
1178
|
-
activeFilter:
|
|
1176
|
+
onSearchOpenChange: te,
|
|
1177
|
+
activeFilter: A,
|
|
1179
1178
|
onFilterChange: u ? void 0 : P,
|
|
1180
|
-
activeTypeFilter:
|
|
1181
|
-
onTypeFilterChange: u || f ? void 0 :
|
|
1179
|
+
activeTypeFilter: M,
|
|
1180
|
+
onTypeFilterChange: u || f ? void 0 : R,
|
|
1182
1181
|
hiddenSources: m,
|
|
1183
1182
|
actions: h,
|
|
1184
1183
|
styles: b?.header
|
|
1185
1184
|
})
|
|
1186
|
-
}), /* @__PURE__ */
|
|
1187
|
-
hidden: !
|
|
1188
|
-
inert: !
|
|
1189
|
-
className:
|
|
1190
|
-
children: /* @__PURE__ */
|
|
1185
|
+
}), /* @__PURE__ */ U("div", {
|
|
1186
|
+
hidden: !O,
|
|
1187
|
+
inert: !O,
|
|
1188
|
+
className: O ? "flex min-h-0 flex-1 flex-col" : "hidden",
|
|
1189
|
+
children: /* @__PURE__ */ U($, {
|
|
1191
1190
|
id: C,
|
|
1192
1191
|
conversations: e,
|
|
1193
1192
|
isLoading: t,
|
|
@@ -1197,8 +1196,8 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1197
1196
|
activeConversationId: s,
|
|
1198
1197
|
labels: c,
|
|
1199
1198
|
searchQuery: w,
|
|
1200
|
-
activeFilter:
|
|
1201
|
-
activeTypeFilter:
|
|
1199
|
+
activeFilter: A,
|
|
1200
|
+
activeTypeFilter: M,
|
|
1202
1201
|
hiddenSources: m,
|
|
1203
1202
|
rowVariant: X.Indicator,
|
|
1204
1203
|
getActions: g,
|
|
@@ -1210,7 +1209,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1210
1209
|
})
|
|
1211
1210
|
})]
|
|
1212
1211
|
});
|
|
1213
|
-
}),
|
|
1212
|
+
}), tt = [
|
|
1214
1213
|
{
|
|
1215
1214
|
value: n.All,
|
|
1216
1215
|
labelKey: "all"
|
|
@@ -1227,79 +1226,79 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1227
1226
|
value: n.Organization,
|
|
1228
1227
|
labelKey: "organization"
|
|
1229
1228
|
}
|
|
1230
|
-
],
|
|
1231
|
-
let a =
|
|
1229
|
+
], nt = F(({ activeTab: e, labels: t, onChange: n, tabClassName: r = "dial-tiny-semi-text", hiddenSources: i }) => {
|
|
1230
|
+
let a = z(() => tt.filter(({ value: e }) => !i?.includes(e)).map(({ value: e, labelKey: n }) => ({
|
|
1232
1231
|
value: e,
|
|
1233
1232
|
label: t[n]
|
|
1234
1233
|
})), [t, i]);
|
|
1235
|
-
return /* @__PURE__ */
|
|
1234
|
+
return /* @__PURE__ */ U(y, {
|
|
1236
1235
|
items: a,
|
|
1237
1236
|
value: e,
|
|
1238
1237
|
onChange: n,
|
|
1239
1238
|
stretch: !0,
|
|
1240
1239
|
"aria-label": t.groupAriaLabel ?? "Filter chats",
|
|
1241
1240
|
className: "px-3 py-2",
|
|
1242
|
-
chipClassName:
|
|
1241
|
+
chipClassName: N("!px-2", r)
|
|
1243
1242
|
});
|
|
1244
|
-
}),
|
|
1243
|
+
}), rt = { button: "_button_vjird_1" }, it = F(({ label: e, onClick: t, labelClassName: n = "dial-small-semi-text", colors: i, className: o }) => {
|
|
1245
1244
|
let s = r({
|
|
1246
1245
|
"--cp-new-chat-bg": i?.background,
|
|
1247
1246
|
"--cp-new-chat-text": i?.text,
|
|
1248
1247
|
"--cp-new-chat-focus-outline": i?.focusOutline
|
|
1249
1248
|
});
|
|
1250
|
-
return /* @__PURE__ */
|
|
1249
|
+
return /* @__PURE__ */ U("div", {
|
|
1251
1250
|
className: "px-3 py-2",
|
|
1252
1251
|
style: s,
|
|
1253
|
-
children: /* @__PURE__ */
|
|
1252
|
+
children: /* @__PURE__ */ U(f, {
|
|
1254
1253
|
label: e,
|
|
1255
1254
|
textClassName: n,
|
|
1256
|
-
iconBefore: /* @__PURE__ */
|
|
1255
|
+
iconBefore: /* @__PURE__ */ U(oe, {
|
|
1257
1256
|
size: 18,
|
|
1258
1257
|
stroke: h,
|
|
1259
1258
|
className: "shrink-0",
|
|
1260
1259
|
"aria-hidden": !0
|
|
1261
1260
|
}),
|
|
1262
1261
|
onClick: t,
|
|
1263
|
-
className: a("h-[36px] w-full gap-2 px-3 py-1 shadow-chat-button hover:shadow-xs focus-visible:shadow-xs active:shadow-xs",
|
|
1262
|
+
className: a("h-[36px] w-full gap-2 px-3 py-1 shadow-chat-button hover:shadow-xs focus-visible:shadow-xs active:shadow-xs", rt.button, o, le.newChatButton)
|
|
1264
1263
|
})
|
|
1265
1264
|
});
|
|
1266
|
-
}),
|
|
1267
|
-
let { colors: D, typography: O, newChatButton:
|
|
1268
|
-
|
|
1269
|
-
C != null &&
|
|
1265
|
+
}), at = F(({ conversations: e, isLoading: t, isUpdatingTitles: i, preserveActiveSearchResult: o, isOpen: s, onSelectConversation: c, activeConversationId: l, labels: f, onNewChat: p, styles: m, className: h, isOverlay: g = !1, getActions: _, onActionMenuOpen: v, onToggle: y, headerActions: b, onMoveConversation: x, onVisibleConversationIdsChange: S, activeFilter: C, onActiveFilterChange: w, isFilterTabsHidden: T = !1, hiddenSources: E }) => {
|
|
1266
|
+
let { colors: D, typography: O, newChatButton: A, searchWrapperClassName: j, headerClassName: M, headerActionsClassName: N, newChatButtonClassName: P } = m ?? {}, { title: F, emptyLabel: ee, emptyDescription: te, noResultsLabel: R, noResultsDescription: B, sharedEmptyDescription: H, tabEmptyLabels: ne, loadingLabel: re, updatingTitlesLabel: G, newChatLabel: ie, searchPlaceholder: ae, searchClearLabel: K, filterLabels: oe, groupLabels: se, actionsLabel: q, unreadIndicatorLabel: ce, closeAriaLabel: ue } = f, [de, fe] = V(""), [pe, me] = V(n.All);
|
|
1267
|
+
L(() => {
|
|
1268
|
+
C != null && me(C);
|
|
1270
1269
|
}, [C]);
|
|
1271
|
-
let
|
|
1270
|
+
let he = I((e) => {
|
|
1272
1271
|
fe(e ?? "");
|
|
1273
|
-
}, []),
|
|
1272
|
+
}, []), ge = r({
|
|
1274
1273
|
"--cp-text": D?.text,
|
|
1275
|
-
"--cp-new-chat-bg":
|
|
1276
|
-
"--cp-new-chat-text":
|
|
1277
|
-
"--cp-new-chat-focus-outline":
|
|
1278
|
-
}),
|
|
1279
|
-
emptyLabel:
|
|
1280
|
-
emptyDescription:
|
|
1281
|
-
noResultsLabel:
|
|
1282
|
-
noResultsDescription:
|
|
1283
|
-
sharedEmptyDescription:
|
|
1284
|
-
tabEmptyLabels:
|
|
1285
|
-
loadingLabel:
|
|
1286
|
-
updatingTitlesLabel:
|
|
1287
|
-
groupLabels:
|
|
1288
|
-
actionsLabel:
|
|
1289
|
-
unreadIndicatorLabel:
|
|
1274
|
+
"--cp-new-chat-bg": A?.background,
|
|
1275
|
+
"--cp-new-chat-text": A?.text,
|
|
1276
|
+
"--cp-new-chat-focus-outline": A?.focusOutline
|
|
1277
|
+
}), J = z(() => ({
|
|
1278
|
+
emptyLabel: ee,
|
|
1279
|
+
emptyDescription: te,
|
|
1280
|
+
noResultsLabel: R,
|
|
1281
|
+
noResultsDescription: B,
|
|
1282
|
+
sharedEmptyDescription: H,
|
|
1283
|
+
tabEmptyLabels: ne,
|
|
1284
|
+
loadingLabel: re,
|
|
1285
|
+
updatingTitlesLabel: G,
|
|
1286
|
+
groupLabels: se,
|
|
1287
|
+
actionsLabel: q,
|
|
1288
|
+
unreadIndicatorLabel: ce
|
|
1290
1289
|
}), [
|
|
1291
|
-
|
|
1292
|
-
|
|
1290
|
+
ee,
|
|
1291
|
+
te,
|
|
1292
|
+
R,
|
|
1293
1293
|
B,
|
|
1294
|
-
ie,
|
|
1295
|
-
V,
|
|
1296
1294
|
H,
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
W,
|
|
1295
|
+
ne,
|
|
1296
|
+
re,
|
|
1300
1297
|
G,
|
|
1301
|
-
|
|
1302
|
-
|
|
1298
|
+
se,
|
|
1299
|
+
q,
|
|
1300
|
+
ce
|
|
1301
|
+
]), _e = z(() => ({
|
|
1303
1302
|
colors: D,
|
|
1304
1303
|
typography: {
|
|
1305
1304
|
fontFamily: O?.fontFamily,
|
|
@@ -1314,14 +1313,14 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1314
1313
|
O?.itemTitleClassName,
|
|
1315
1314
|
m?.itemIconBadgeClassName
|
|
1316
1315
|
]);
|
|
1317
|
-
return /* @__PURE__ */
|
|
1316
|
+
return /* @__PURE__ */ W(d, {
|
|
1318
1317
|
isOpen: s,
|
|
1319
1318
|
isOverlay: g,
|
|
1320
1319
|
orientation: u.Left,
|
|
1321
|
-
title:
|
|
1320
|
+
title: F,
|
|
1322
1321
|
labels: {
|
|
1323
|
-
ariaLabel:
|
|
1324
|
-
closeLabel:
|
|
1322
|
+
ariaLabel: F,
|
|
1323
|
+
closeLabel: ue
|
|
1325
1324
|
},
|
|
1326
1325
|
onClose: y,
|
|
1327
1326
|
styles: {
|
|
@@ -1331,51 +1330,51 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1331
1330
|
},
|
|
1332
1331
|
typography: { fontClassName: O?.fontClassName },
|
|
1333
1332
|
bodyClassName: "flex flex-col overflow-hidden p-0 gap-3",
|
|
1334
|
-
cssVars:
|
|
1333
|
+
cssVars: ge,
|
|
1335
1334
|
titleClassName: O?.fontClassName,
|
|
1336
|
-
headerClassName: a("h-[64px]",
|
|
1337
|
-
headerActionsClassName:
|
|
1335
|
+
headerClassName: a("h-[64px]", M),
|
|
1336
|
+
headerActionsClassName: N,
|
|
1338
1337
|
className: a(s ? "w-[324px] mobile:w-full" : "w-0", h)
|
|
1339
1338
|
},
|
|
1340
1339
|
rightActions: b,
|
|
1341
1340
|
children: [
|
|
1342
|
-
/* @__PURE__ */
|
|
1343
|
-
label:
|
|
1341
|
+
/* @__PURE__ */ U(it, {
|
|
1342
|
+
label: ie,
|
|
1344
1343
|
onClick: p,
|
|
1345
1344
|
labelClassName: O?.newChatLabelClassName,
|
|
1346
|
-
colors:
|
|
1347
|
-
className:
|
|
1345
|
+
colors: A,
|
|
1346
|
+
className: P
|
|
1348
1347
|
}),
|
|
1349
|
-
/* @__PURE__ */
|
|
1348
|
+
/* @__PURE__ */ U("div", {
|
|
1350
1349
|
role: "search",
|
|
1351
|
-
className: a("px-3 py-2",
|
|
1352
|
-
children: /* @__PURE__ */
|
|
1353
|
-
wrapperClassName: a(Q.search,
|
|
1354
|
-
value:
|
|
1355
|
-
onChange:
|
|
1356
|
-
placeholder:
|
|
1357
|
-
clearLabel:
|
|
1358
|
-
"aria-label":
|
|
1350
|
+
className: a("px-3 py-2", le.search),
|
|
1351
|
+
children: /* @__PURE__ */ U(k, {
|
|
1352
|
+
wrapperClassName: a(Q.search, j),
|
|
1353
|
+
value: de,
|
|
1354
|
+
onChange: he,
|
|
1355
|
+
placeholder: ae,
|
|
1356
|
+
clearLabel: K,
|
|
1357
|
+
"aria-label": ae
|
|
1359
1358
|
})
|
|
1360
1359
|
}),
|
|
1361
|
-
!T && /* @__PURE__ */
|
|
1360
|
+
!T && /* @__PURE__ */ U(nt, {
|
|
1362
1361
|
activeTab: pe,
|
|
1363
|
-
labels:
|
|
1362
|
+
labels: oe,
|
|
1364
1363
|
onChange: (e) => {
|
|
1365
|
-
|
|
1364
|
+
me(e), w?.(e);
|
|
1366
1365
|
},
|
|
1367
1366
|
tabClassName: O?.tabClassName,
|
|
1368
1367
|
hiddenSources: E
|
|
1369
1368
|
}),
|
|
1370
|
-
/* @__PURE__ */
|
|
1369
|
+
/* @__PURE__ */ U($, {
|
|
1371
1370
|
conversations: e,
|
|
1372
1371
|
isLoading: t,
|
|
1373
1372
|
isUpdatingTitles: i,
|
|
1374
1373
|
preserveActiveSearchResult: o,
|
|
1375
1374
|
onSelectConversation: c,
|
|
1376
1375
|
activeConversationId: l,
|
|
1377
|
-
labels:
|
|
1378
|
-
searchQuery:
|
|
1376
|
+
labels: J,
|
|
1377
|
+
searchQuery: de,
|
|
1379
1378
|
activeFilter: pe,
|
|
1380
1379
|
hiddenSources: E,
|
|
1381
1380
|
getActions: _,
|
|
@@ -1386,52 +1385,52 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1386
1385
|
})
|
|
1387
1386
|
]
|
|
1388
1387
|
});
|
|
1389
|
-
}),
|
|
1390
|
-
let [f, g] =
|
|
1391
|
-
|
|
1392
|
-
let n = e && !
|
|
1393
|
-
if (
|
|
1394
|
-
|
|
1388
|
+
}), ot = F(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: a, onCancel: c, onGenerateWithAi: l, labels: u, styles: d }) => {
|
|
1389
|
+
let [f, g] = V(t), [_, v] = V(!1), [y, x] = V(null), E = B(null), k = B(!1), A = B(0);
|
|
1390
|
+
L(() => {
|
|
1391
|
+
let n = e && !k.current;
|
|
1392
|
+
if (k.current = e, !e) {
|
|
1393
|
+
A.current += 1, v(!1);
|
|
1395
1394
|
return;
|
|
1396
1395
|
}
|
|
1397
1396
|
if (!n) return;
|
|
1398
|
-
|
|
1399
|
-
let r = setTimeout(() =>
|
|
1397
|
+
A.current += 1, g(t), x(null), v(!1);
|
|
1398
|
+
let r = setTimeout(() => E.current?.focus(), 0);
|
|
1400
1399
|
return () => clearTimeout(r);
|
|
1401
|
-
}, [e, t]),
|
|
1402
|
-
|
|
1400
|
+
}, [e, t]), L(() => () => {
|
|
1401
|
+
A.current += 1;
|
|
1403
1402
|
}, []);
|
|
1404
|
-
let
|
|
1405
|
-
|
|
1403
|
+
let j = s(f.trim()), N = i(j) > 255, P = n || j === "" || j === t.trim() || N, F = I(() => {
|
|
1404
|
+
P || a(j);
|
|
1406
1405
|
}, [
|
|
1407
|
-
|
|
1406
|
+
P,
|
|
1408
1407
|
a,
|
|
1409
|
-
|
|
1410
|
-
]),
|
|
1411
|
-
e.key === "Enter" &&
|
|
1412
|
-
}, [
|
|
1408
|
+
j
|
|
1409
|
+
]), ee = I((e) => {
|
|
1410
|
+
e.key === "Enter" && F();
|
|
1411
|
+
}, [F]), te = I(async () => {
|
|
1413
1412
|
if (_) return;
|
|
1414
|
-
let e = ++
|
|
1413
|
+
let e = ++A.current;
|
|
1415
1414
|
v(!0), x(null);
|
|
1416
1415
|
try {
|
|
1417
1416
|
let t = await l();
|
|
1418
|
-
if (e !==
|
|
1417
|
+
if (e !== A.current) return;
|
|
1419
1418
|
g(o(t));
|
|
1420
1419
|
} catch {
|
|
1421
|
-
if (e !==
|
|
1420
|
+
if (e !== A.current) return;
|
|
1422
1421
|
x(u.renameWithAiError);
|
|
1423
1422
|
} finally {
|
|
1424
|
-
e ===
|
|
1423
|
+
e === A.current && v(!1);
|
|
1425
1424
|
}
|
|
1426
1425
|
}, [
|
|
1427
1426
|
_,
|
|
1428
1427
|
l,
|
|
1429
1428
|
u.renameWithAiError
|
|
1430
|
-
]),
|
|
1431
|
-
return
|
|
1429
|
+
]), R = y ?? r ?? void 0, z;
|
|
1430
|
+
return z = N ? u.nameTooLongError : R, /* @__PURE__ */ U(D, {
|
|
1432
1431
|
open: e,
|
|
1433
1432
|
header: u.popupTitle,
|
|
1434
|
-
size:
|
|
1433
|
+
size: O.Sm,
|
|
1435
1434
|
onClose: c,
|
|
1436
1435
|
mainButtons: n ? void 0 : [{
|
|
1437
1436
|
label: u.cancelLabel,
|
|
@@ -1439,55 +1438,52 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1439
1438
|
}, {
|
|
1440
1439
|
label: u.saveLabel,
|
|
1441
1440
|
variant: p.Primary,
|
|
1442
|
-
disabled:
|
|
1443
|
-
onClick:
|
|
1441
|
+
disabled: P,
|
|
1442
|
+
onClick: F
|
|
1444
1443
|
}],
|
|
1445
|
-
children: /* @__PURE__ */
|
|
1444
|
+
children: /* @__PURE__ */ W("div", {
|
|
1446
1445
|
className: d?.bodyClassName,
|
|
1447
1446
|
style: d?.cssVars,
|
|
1448
|
-
children:
|
|
1447
|
+
children: [/* @__PURE__ */ U(C, {
|
|
1448
|
+
politeness: T.Assertive,
|
|
1449
|
+
visuallyHidden: !0,
|
|
1450
|
+
as: w.Span,
|
|
1451
|
+
children: !n && !N && R
|
|
1452
|
+
}), n ? /* @__PURE__ */ U("div", {
|
|
1449
1453
|
className: "h-[120px] px-6 py-4",
|
|
1450
|
-
children: /* @__PURE__ */
|
|
1451
|
-
}) : /* @__PURE__ */
|
|
1454
|
+
children: /* @__PURE__ */ U(M, { size: 50 })
|
|
1455
|
+
}) : /* @__PURE__ */ W("div", {
|
|
1452
1456
|
className: "flex items-start gap-2 px-6 py-3",
|
|
1453
|
-
children: [
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
inputRef: C,
|
|
1463
|
-
value: f,
|
|
1464
|
-
placeholder: u.inputPlaceholder,
|
|
1465
|
-
error: F,
|
|
1466
|
-
onChange: (e) => g(o(e ?? "")),
|
|
1467
|
-
onKeyDown: te
|
|
1468
|
-
})
|
|
1469
|
-
}),
|
|
1470
|
-
/* @__PURE__ */ R(b, {
|
|
1471
|
-
"aria-label": u.renameWithAiLabel,
|
|
1472
|
-
tooltipProps: { tooltip: u.renameWithAiLabel },
|
|
1473
|
-
disabled: _ || n,
|
|
1474
|
-
"aria-busy": _,
|
|
1475
|
-
onClick: ne,
|
|
1476
|
-
icon: _ ? /* @__PURE__ */ R("span", {
|
|
1477
|
-
className: "flex",
|
|
1478
|
-
"aria-hidden": !0,
|
|
1479
|
-
children: /* @__PURE__ */ R(O, { size: m.MD })
|
|
1480
|
-
}) : /* @__PURE__ */ R(U, {
|
|
1481
|
-
size: m.MD,
|
|
1482
|
-
stroke: h,
|
|
1483
|
-
"aria-hidden": !0
|
|
1484
|
-
})
|
|
1457
|
+
children: [/* @__PURE__ */ U("div", {
|
|
1458
|
+
className: "min-w-0 flex-1",
|
|
1459
|
+
children: /* @__PURE__ */ U(S, {
|
|
1460
|
+
inputRef: E,
|
|
1461
|
+
value: f,
|
|
1462
|
+
placeholder: u.inputPlaceholder,
|
|
1463
|
+
error: z,
|
|
1464
|
+
onChange: (e) => g(o(e ?? "")),
|
|
1465
|
+
onKeyDown: ee
|
|
1485
1466
|
})
|
|
1486
|
-
|
|
1487
|
-
|
|
1467
|
+
}), /* @__PURE__ */ U(b, {
|
|
1468
|
+
"aria-label": u.renameWithAiLabel,
|
|
1469
|
+
tooltipProps: { tooltip: u.renameWithAiLabel },
|
|
1470
|
+
disabled: _ || n,
|
|
1471
|
+
"aria-busy": _,
|
|
1472
|
+
onClick: te,
|
|
1473
|
+
icon: _ ? /* @__PURE__ */ U("span", {
|
|
1474
|
+
className: "flex",
|
|
1475
|
+
"aria-hidden": !0,
|
|
1476
|
+
children: /* @__PURE__ */ U(M, { size: m.MD })
|
|
1477
|
+
}) : /* @__PURE__ */ U(q, {
|
|
1478
|
+
size: m.MD,
|
|
1479
|
+
stroke: h,
|
|
1480
|
+
"aria-hidden": !0
|
|
1481
|
+
})
|
|
1482
|
+
})]
|
|
1483
|
+
})]
|
|
1488
1484
|
})
|
|
1489
1485
|
});
|
|
1490
1486
|
});
|
|
1491
|
-
|
|
1487
|
+
ot.displayName = "RenameConversationPopup";
|
|
1492
1488
|
//#endregion
|
|
1493
|
-
export {
|
|
1489
|
+
export { le as CONVERSATION_PANEL_CLASS, $ as ConversationList, $e as ConversationListHeader, et as ConversationListSection, at as ConversationPanel, X as ConversationRowVariant, Y as ConversationTypeFilter, ot as RenameConversationPopup };
|