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