@epam/ai-dial-conversation-panel 1.3.0-dev.253 → 1.3.0-dev.256
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/ConversationListHeader/ConversationListHeader.d.ts.map +1 -1
- package/components/ConversationPanel/ConversationPanel.d.ts.map +1 -1
- package/components/ConversationRow/ConversationRow.d.ts +2 -0
- package/components/ConversationRow/ConversationRow.d.ts.map +1 -1
- package/components/RowRenderer/RowRenderer.d.ts.map +1 -1
- package/index.css +2 -2
- package/index.js +330 -322
- package/models/conversation-list-header.d.ts +2 -0
- package/models/conversation-list-header.d.ts.map +1 -1
- package/models/conversation-list.d.ts +3 -1
- package/models/conversation-list.d.ts.map +1 -1
- package/models/virtual-row.d.ts +2 -0
- package/models/virtual-row.d.ts.map +1 -1
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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
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
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { IconCaretDownFilled as
|
|
4
|
+
import { createElement as P, memo as F, useCallback as I, useEffect as L, useId as ee, useImperativeHandle as R, useLayoutEffect as z, useMemo as B, useRef as V, useState as H } from "react";
|
|
5
|
+
import { Fragment as te, jsx as U, jsxs as W } from "react/jsx-runtime";
|
|
6
|
+
import { IconCaretDownFilled as G, IconCaretRightFilled as ne, IconChevronDown as K, IconChevronRight as re, IconDotsVertical as ie, IconFilter2 as ae, IconPlus as q, IconSearch as oe, IconSparkles as se, IconX as ce } from "@tabler/icons-react";
|
|
7
7
|
//#region src/constants/public-class-names.ts
|
|
8
8
|
var le = {
|
|
9
9
|
newChatButton: "dial-cp-new-chat-button",
|
|
@@ -11,22 +11,22 @@ var le = {
|
|
|
11
11
|
list: "dial-cp-list",
|
|
12
12
|
listHeader: "dial-cp-list-header",
|
|
13
13
|
listSection: "dial-cp-list-section"
|
|
14
|
-
},
|
|
15
|
-
function
|
|
14
|
+
}, J = typeof window < "u" ? z : L;
|
|
15
|
+
function ue(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 de({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
|
|
22
|
+
let { styleHeight: s, styleWidth: c } = B(() => ({
|
|
23
|
+
styleHeight: ue(o?.height),
|
|
24
|
+
styleWidth: ue(o?.width)
|
|
25
|
+
}), [o?.height, o?.width]), [l, u] = H({
|
|
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 J(() => {
|
|
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 fe({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
|
|
|
46
46
|
i,
|
|
47
47
|
s,
|
|
48
48
|
c
|
|
49
|
-
]),
|
|
49
|
+
]), B(() => ({
|
|
50
50
|
height: s ?? l.height,
|
|
51
51
|
width: c ?? l.width
|
|
52
52
|
}), [
|
|
@@ -55,26 +55,26 @@ function fe({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
|
|
|
55
55
|
c
|
|
56
56
|
]);
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
let t =
|
|
58
|
+
function fe(e) {
|
|
59
|
+
let t = V(() => {
|
|
60
60
|
throw Error("Cannot call during render.");
|
|
61
61
|
});
|
|
62
|
-
return
|
|
62
|
+
return J(() => {
|
|
63
63
|
t.current = e;
|
|
64
64
|
}, [e]), I((e) => t.current?.(e), [t]);
|
|
65
65
|
}
|
|
66
|
-
var
|
|
67
|
-
function
|
|
68
|
-
if (
|
|
66
|
+
var pe = null;
|
|
67
|
+
function me(e = !1) {
|
|
68
|
+
if (pe === 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 ? pe = "positive-descending" : (e.scrollLeft = 1, pe = e.scrollLeft === 0 ? "negative" : "positive-ascending"), document.body.removeChild(e), pe;
|
|
73
73
|
}
|
|
74
|
-
return
|
|
74
|
+
return pe;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
if (t === "horizontal" && n) switch (
|
|
76
|
+
function he({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
|
|
77
|
+
if (t === "horizontal" && n) switch (me()) {
|
|
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 ge({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
|
|
|
83
83
|
}
|
|
84
84
|
return r;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function Y(e, t = "Assertion error") {
|
|
87
87
|
if (!e) throw console.error(t), Error(t);
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function ge(e, t) {
|
|
90
90
|
if (e === t) return !0;
|
|
91
|
-
if (!!e != !!t || (
|
|
91
|
+
if (!!e != !!t || (Y(e !== void 0), Y(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 _e({ 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 Y(n !== void 0, "Unexpected bounds cache miss"), t * ((n.scrollOffset + n.size) / e.size);
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function ve({ 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 = _e({
|
|
106
106
|
cachedBounds: t,
|
|
107
107
|
itemCount: r,
|
|
108
108
|
itemSize: i
|
|
@@ -114,7 +114,7 @@ function ye({ 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 ye({ 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 be({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemC
|
|
|
133
133
|
stopIndexOverscan: l
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function be({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
137
137
|
let r = /* @__PURE__ */ new Map();
|
|
138
138
|
return {
|
|
139
139
|
get(i) {
|
|
140
|
-
for (
|
|
140
|
+
for (Y(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 xe({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
|
151
151
|
});
|
|
152
152
|
else {
|
|
153
153
|
let t = r.get(e - 1);
|
|
154
|
-
|
|
154
|
+
Y(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 Y(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 xe({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
return
|
|
171
|
+
function xe({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
172
|
+
return B(() => be({
|
|
173
173
|
itemCount: e,
|
|
174
174
|
itemProps: t,
|
|
175
175
|
itemSize: n
|
|
@@ -179,31 +179,31 @@ function Se({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
|
179
179
|
n
|
|
180
180
|
]);
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function Se({ containerSize: e, itemSize: t }) {
|
|
183
183
|
let n;
|
|
184
184
|
switch (typeof t) {
|
|
185
185
|
case "string":
|
|
186
|
-
|
|
186
|
+
Y(t.endsWith("%"), `Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`), Y(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 Ce({ 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 } = de({
|
|
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 = V({
|
|
200
200
|
height: 0,
|
|
201
201
|
width: 0
|
|
202
|
-
}), p = r === "vertical" ? u : d, m =
|
|
202
|
+
}), p = r === "vertical" ? u : d, m = Se({
|
|
203
203
|
containerSize: p,
|
|
204
204
|
itemSize: s
|
|
205
205
|
});
|
|
206
|
-
|
|
206
|
+
z(() => {
|
|
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 we({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
216
216
|
c,
|
|
217
217
|
d
|
|
218
218
|
]);
|
|
219
|
-
let h =
|
|
219
|
+
let h = xe({
|
|
220
220
|
itemCount: a,
|
|
221
221
|
itemProps: o,
|
|
222
222
|
itemSize: m
|
|
223
|
-
}), g = I((e) => h.get(e), [h]), [_, v] =
|
|
223
|
+
}), g = I((e) => h.get(e), [h]), [_, v] = H(() => ye({
|
|
224
224
|
cachedBounds: h,
|
|
225
225
|
containerScrollOffset: 0,
|
|
226
226
|
containerSize: p,
|
|
@@ -231,7 +231,7 @@ function we({ 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 = I(() =>
|
|
234
|
+
}, C = I(() => _e({
|
|
235
235
|
cachedBounds: h,
|
|
236
236
|
itemCount: a,
|
|
237
237
|
itemSize: m
|
|
@@ -240,13 +240,13 @@ function we({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
240
240
|
a,
|
|
241
241
|
m
|
|
242
242
|
]), w = I((t) => {
|
|
243
|
-
let n =
|
|
243
|
+
let n = he({
|
|
244
244
|
containerElement: e,
|
|
245
245
|
direction: r,
|
|
246
246
|
isRtl: i,
|
|
247
247
|
scrollOffset: t
|
|
248
248
|
});
|
|
249
|
-
return
|
|
249
|
+
return ye({
|
|
250
250
|
cachedBounds: h,
|
|
251
251
|
containerScrollOffset: n,
|
|
252
252
|
containerSize: p,
|
|
@@ -262,30 +262,30 @@ function we({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
262
262
|
a,
|
|
263
263
|
l
|
|
264
264
|
]);
|
|
265
|
-
return
|
|
265
|
+
return J(() => {
|
|
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
|
+
]), J(() => {
|
|
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 = he({
|
|
277
277
|
containerElement: e,
|
|
278
278
|
direction: r,
|
|
279
279
|
isRtl: i,
|
|
280
280
|
scrollOffset: r === "vertical" ? o : n
|
|
281
|
-
}), c =
|
|
281
|
+
}), c = ye({
|
|
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 ge(c, t) ? t : c;
|
|
289
289
|
});
|
|
290
290
|
};
|
|
291
291
|
return e.addEventListener("scroll", t), () => {
|
|
@@ -301,8 +301,8 @@ function we({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
301
301
|
]), {
|
|
302
302
|
getCellBounds: g,
|
|
303
303
|
getEstimatedSize: C,
|
|
304
|
-
scrollToIndex:
|
|
305
|
-
let s =
|
|
304
|
+
scrollToIndex: fe(({ align: t = "auto", containerScrollOffset: n, index: o }) => {
|
|
305
|
+
let s = ve({
|
|
306
306
|
align: t,
|
|
307
307
|
cachedBounds: h,
|
|
308
308
|
containerScrollOffset: n,
|
|
@@ -312,14 +312,14 @@ function we({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
312
312
|
itemSize: m
|
|
313
313
|
});
|
|
314
314
|
if (e) {
|
|
315
|
-
if (s =
|
|
315
|
+
if (s = he({
|
|
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
|
+
ge(_, e) || v(e);
|
|
323
323
|
}
|
|
324
324
|
return s;
|
|
325
325
|
}
|
|
@@ -330,30 +330,30 @@ function we({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
330
330
|
stopIndexVisible: x
|
|
331
331
|
};
|
|
332
332
|
}
|
|
333
|
-
function
|
|
334
|
-
return
|
|
333
|
+
function we(e) {
|
|
334
|
+
return B(() => e, Object.values(e));
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function Te(e, t) {
|
|
337
337
|
let { ariaAttributes: n, style: r, ...i } = e, { ariaAttributes: a, style: o, ...s } = t;
|
|
338
|
-
return
|
|
338
|
+
return ge(n, a) && ge(r, o) && ge(i, s);
|
|
339
339
|
}
|
|
340
|
-
function
|
|
340
|
+
function Ee(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 De = "data-react-window-index";
|
|
344
|
+
function Oe({ 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 = we(u), h = B(() => F(s, Te), [s]), [g, _] = H(null), v = Ee(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = Ce({
|
|
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: B(() => v ? (e) => l.getRowHeight(e) ?? l.getAverageRowHeight() : l, [v, l]),
|
|
353
353
|
onResize: i,
|
|
354
354
|
overscanCount: o
|
|
355
355
|
});
|
|
356
|
-
|
|
356
|
+
R(r, () => ({
|
|
357
357
|
get element() {
|
|
358
358
|
return g;
|
|
359
359
|
},
|
|
@@ -368,12 +368,12 @@ function ke({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
|
|
|
368
368
|
top: r
|
|
369
369
|
});
|
|
370
370
|
}
|
|
371
|
-
}), [g, x]),
|
|
371
|
+
}), [g, x]), J(() => {
|
|
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(De, n), !0;
|
|
377
377
|
});
|
|
378
378
|
if (v) return l.observeRowElements(e);
|
|
379
379
|
}, [
|
|
@@ -397,7 +397,7 @@ function ke({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
|
|
|
397
397
|
w,
|
|
398
398
|
T
|
|
399
399
|
]);
|
|
400
|
-
let E =
|
|
400
|
+
let E = B(() => {
|
|
401
401
|
let e = [];
|
|
402
402
|
if (c > 0) for (let t = S; t <= w; t++) {
|
|
403
403
|
let n = y(t);
|
|
@@ -452,24 +452,24 @@ function ke({ 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 X = /* @__PURE__ */ function(e) {
|
|
456
456
|
return e.All = "all", e.Chat = "chat", e.Task = "task", e;
|
|
457
|
-
}({}),
|
|
457
|
+
}({}), Z = /* @__PURE__ */ function(e) {
|
|
458
458
|
return e.Avatar = "avatar", e.Indicator = "indicator", e;
|
|
459
|
-
}({}),
|
|
459
|
+
}({}), ke = /* @__PURE__ */ function(e) {
|
|
460
460
|
return e.Header = "header", e.Item = "item", e;
|
|
461
|
-
}({}),
|
|
462
|
-
if (n ===
|
|
461
|
+
}({}), Ae = (e, t) => t === n.All || e.source === t, je = (t, n) => {
|
|
462
|
+
if (n === X.All) return !0;
|
|
463
463
|
let r = t.kind ?? e.Chat;
|
|
464
|
-
return n ===
|
|
465
|
-
},
|
|
464
|
+
return n === X.Task ? r === e.Task : r === e.Chat;
|
|
465
|
+
}, Me = (e, t) => !t || e.title.toLowerCase().includes(t.toLowerCase()), Ne = (e) => `${60 + e * 23 % 35}%`, Pe = (e, t) => e ? t ? "pe-9" : "pe-2 group-focus-within/conversation:pe-9 group-hover/conversation:pe-9" : "pe-3", Fe = (e, t) => {
|
|
466
466
|
let n = t.rows[e];
|
|
467
|
-
return t.rowVariant ===
|
|
468
|
-
},
|
|
467
|
+
return t.rowVariant === Z.Indicator ? n.kind === ke.Item ? 34 : e === 0 ? 32 : 40 : n.kind === ke.Item ? 36 : e === 0 ? 24 : 56;
|
|
468
|
+
}, Ie = 5, Le = (e) => Math.max(Ie, 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 === ke.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) => {
|
|
@@ -480,7 +480,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
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 === ke.Header) n = r.groupKey;
|
|
484
484
|
else if (r.item.id === t) return n;
|
|
485
485
|
return null;
|
|
486
486
|
}, He = (e, t, r) => {
|
|
@@ -494,7 +494,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
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 === ke.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,8 +513,8 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
513
513
|
unreadDot: "_unreadDot_gcqru_51",
|
|
514
514
|
search: "_search_gcqru_59",
|
|
515
515
|
list: "_list_gcqru_70"
|
|
516
|
-
}, We = ({ label: e, isExpanded: t, onToggle: n, listId: r, className: i = "dial-tiny-lead-text", variant: o =
|
|
517
|
-
let f = s != null, p = o ===
|
|
516
|
+
}, We = ({ label: e, isExpanded: t, onToggle: n, listId: r, className: i = "dial-tiny-lead-text", variant: o = Z.Avatar, dropZoneGroupKey: s, isDragOver: c, onDragOver: l, onDragLeave: u, onDrop: d }) => {
|
|
517
|
+
let f = s != null, p = o === Z.Indicator;
|
|
518
518
|
return /* @__PURE__ */ W("button", {
|
|
519
519
|
type: "button",
|
|
520
520
|
"aria-expanded": t,
|
|
@@ -531,11 +531,11 @@ 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__ */ U(
|
|
534
|
+
!p && (t ? /* @__PURE__ */ U(G, {
|
|
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__ */ U(
|
|
538
|
+
}) : /* @__PURE__ */ U(ne, {
|
|
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
|
|
@@ -544,12 +544,12 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
544
544
|
className: "max-w-full min-w-0",
|
|
545
545
|
children: /* @__PURE__ */ U(v, { text: e })
|
|
546
546
|
}) : /* @__PURE__ */ U(v, { text: e }),
|
|
547
|
-
p && (t ? /* @__PURE__ */ U(
|
|
547
|
+
p && (t ? /* @__PURE__ */ U(K, {
|
|
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__ */ U(
|
|
552
|
+
}) : /* @__PURE__ */ U(re, {
|
|
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,10 +557,10 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
557
557
|
}))
|
|
558
558
|
]
|
|
559
559
|
});
|
|
560
|
-
}, Ge = F(({ item: e, isActive: n, onSelectConversation: r, searchQuery: i = "", getActions: o, onActionMenuOpen: s, actionsLabel: c = "More actions", itemTitleClassName: l = "dial-small-text",
|
|
561
|
-
let [
|
|
562
|
-
|
|
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", unreadItemTitleClassName: u = "dial-small-semi-text", itemIconBadgeClassName: d, unreadIndicatorLabel: p = "Unread", variant: v = Z.Avatar, rowGroupKey: y, rows: S, draggingId: C, dragOverId: w, allowedDropGroups: T, onDragStart: E, onDragEnd: D, onDragOver: O, onDragLeave: k, onDrop: M }) => {
|
|
561
|
+
let [N, P] = H(!1), F = V(null), L = I((t) => {
|
|
562
|
+
P(t), t && F.current && s?.(e, F.current);
|
|
563
|
+
}, [e, s]), ee = B(() => o?.(e) ?? [], [o, e]), R = ee.length > 0, z = B(() => ({ tooltip: e.iconTooltip }), [e.iconTooltip]), te = B(() => ({ badgeClassName: d }), [d]), G = v === Z.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
566
|
}) : e.isIconLoading ? /* @__PURE__ */ U(A, {
|
|
@@ -573,49 +573,49 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
573
573
|
src: e.iconUrl,
|
|
574
574
|
size: m.LG,
|
|
575
575
|
initialsName: e.iconTooltip ?? "",
|
|
576
|
-
labels:
|
|
577
|
-
styles:
|
|
578
|
-
}),
|
|
576
|
+
labels: z,
|
|
577
|
+
styles: te
|
|
578
|
+
}), K = Pe(R, N), re = /* @__PURE__ */ W("span", {
|
|
579
579
|
className: "flex size-6 shrink-0 items-center justify-center",
|
|
580
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
583
|
}), e.isUnread && /* @__PURE__ */ U("span", {
|
|
584
584
|
className: "sr-only",
|
|
585
|
-
children:
|
|
585
|
+
children: p
|
|
586
586
|
})]
|
|
587
|
-
}),
|
|
587
|
+
}), ae = e.isUnread && !G ? /* @__PURE__ */ W("span", {
|
|
588
588
|
className: "flex size-6 shrink-0 items-center justify-center",
|
|
589
589
|
children: [/* @__PURE__ */ U("span", {
|
|
590
|
-
className: a("size-[7.11px] rounded-full", Q.unreadDot,
|
|
590
|
+
className: a("size-[7.11px] rounded-full", Q.unreadDot, R && (N ? "opacity-0" : "group-focus-within/conversation:opacity-0 group-hover/conversation:opacity-0")),
|
|
591
591
|
"aria-hidden": !0
|
|
592
592
|
}), /* @__PURE__ */ U("span", {
|
|
593
593
|
className: "sr-only",
|
|
594
|
-
children:
|
|
594
|
+
children: p
|
|
595
595
|
})]
|
|
596
|
-
}) : void 0,
|
|
597
|
-
e.currentTarget.contains(e.relatedTarget) ||
|
|
598
|
-
}, [
|
|
599
|
-
if (!
|
|
596
|
+
}) : void 0, q = y != null, oe = I((e) => {
|
|
597
|
+
e.currentTarget.contains(e.relatedTarget) || k?.();
|
|
598
|
+
}, [k]), se = I((t) => {
|
|
599
|
+
if (!y || !S || !M) return;
|
|
600
600
|
t.preventDefault();
|
|
601
|
-
let n = Ue(t, e.id,
|
|
602
|
-
|
|
601
|
+
let n = Ue(t, e.id, S, y);
|
|
602
|
+
M(e.id, y, n);
|
|
603
603
|
}, [
|
|
604
604
|
e.id,
|
|
605
|
+
S,
|
|
605
606
|
y,
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
]), q = e.id === S, ce = e.id === C, le = v != null && (w?.has(v) ?? !1), ue = S != null;
|
|
607
|
+
M
|
|
608
|
+
]), ce = e.id === C, le = e.id === w, J = y != null && (T?.has(y) ?? !1), ue = C != null;
|
|
609
609
|
return /* @__PURE__ */ W("li", {
|
|
610
|
-
className: a("group/conversation relative",
|
|
611
|
-
draggable:
|
|
612
|
-
onDragStart:
|
|
613
|
-
onDragEnd:
|
|
614
|
-
onDragOver:
|
|
615
|
-
t.preventDefault(),
|
|
610
|
+
className: a("group/conversation relative", ce && "cursor-grabbing opacity-50", le && J && "rounded", le && J && Q.dropZoneActive, ue && !ce && !J && "cursor-not-allowed"),
|
|
611
|
+
draggable: q || void 0,
|
|
612
|
+
onDragStart: q ? () => E?.(e.id) : void 0,
|
|
613
|
+
onDragEnd: q ? D : void 0,
|
|
614
|
+
onDragOver: q ? (t) => {
|
|
615
|
+
t.preventDefault(), O?.(e.id);
|
|
616
616
|
} : void 0,
|
|
617
|
-
onDragLeave:
|
|
618
|
-
onDrop:
|
|
617
|
+
onDragLeave: q ? oe : void 0,
|
|
618
|
+
onDrop: q ? se : void 0,
|
|
619
619
|
children: [/* @__PURE__ */ U("a", {
|
|
620
620
|
href: e.href,
|
|
621
621
|
className: "contents",
|
|
@@ -623,45 +623,45 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
623
623
|
e.href && (t.preventDefault(), r(e.id));
|
|
624
624
|
},
|
|
625
625
|
children: /* @__PURE__ */ U(f, {
|
|
626
|
-
iconBefore:
|
|
626
|
+
iconBefore: G ? re : ne,
|
|
627
627
|
label: /* @__PURE__ */ U(x, {
|
|
628
628
|
text: e.title,
|
|
629
629
|
query: i,
|
|
630
|
-
className: e.isUnread ?
|
|
630
|
+
className: e.isUnread ? u : l,
|
|
631
631
|
maxLines: 1
|
|
632
632
|
}),
|
|
633
|
-
iconAfter:
|
|
633
|
+
iconAfter: ae,
|
|
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", G ? "gap-0.5 ps-0" : "gap-2 ps-3", K, Q.item, G && Q.itemIndicator, n && Q.itemActive, N && Q.itemActive)
|
|
639
639
|
})
|
|
640
|
-
}),
|
|
641
|
-
className: a("absolute inset-y-0 flex items-center",
|
|
640
|
+
}), R && /* @__PURE__ */ U("div", {
|
|
641
|
+
className: a("absolute inset-y-0 flex items-center", G ? "inset-e-2" : "inset-e-1", N ? "opacity-100" : "opacity-0 group-focus-within/conversation:opacity-100 group-hover/conversation:opacity-100"),
|
|
642
642
|
children: /* @__PURE__ */ U(g, {
|
|
643
|
-
items:
|
|
644
|
-
onOpenChange:
|
|
643
|
+
items: ee,
|
|
644
|
+
onOpenChange: L,
|
|
645
645
|
matchReferenceWidth: !1,
|
|
646
646
|
listClassName: "w-[200px]",
|
|
647
647
|
children: /* @__PURE__ */ U(b, {
|
|
648
|
-
ref:
|
|
649
|
-
icon: /* @__PURE__ */ U(
|
|
650
|
-
size:
|
|
648
|
+
ref: F,
|
|
649
|
+
icon: /* @__PURE__ */ U(ie, {
|
|
650
|
+
size: G ? 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(G && "size-6! min-h-0! min-w-0! p-1!", N && Q.triggerActive)
|
|
658
658
|
})
|
|
659
659
|
})
|
|
660
660
|
})]
|
|
661
661
|
});
|
|
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 =
|
|
663
|
-
let w = r[e], T = h ===
|
|
664
|
-
if (w.kind ===
|
|
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 = Z.Avatar, draggingId: g, dragOverId: _, allowedDropGroups: v, onDragStart: y, onDragEnd: b, onDragOver: x, onDragLeave: S, onDrop: C }) => {
|
|
663
|
+
let w = r[e], T = h === Z.Indicator;
|
|
664
|
+
if (w.kind === ke.Header) {
|
|
665
665
|
let r = w.groupKey === n.Pinned;
|
|
666
666
|
return /* @__PURE__ */ U("div", {
|
|
667
667
|
role: "listitem",
|
|
@@ -697,6 +697,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
697
697
|
actionsLabel: f,
|
|
698
698
|
unreadIndicatorLabel: p,
|
|
699
699
|
itemTitleClassName: m?.itemTitleClassName,
|
|
700
|
+
unreadItemTitleClassName: m?.unreadItemTitleClassName,
|
|
700
701
|
itemIconBadgeClassName: m?.itemIconBadgeClassName,
|
|
701
702
|
rowGroupKey: w.groupKey,
|
|
702
703
|
rows: r,
|
|
@@ -715,33 +716,33 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
715
716
|
n.MyChats,
|
|
716
717
|
n.Shared,
|
|
717
718
|
n.Organization
|
|
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 =
|
|
719
|
-
let { colors: E, typography: D, itemIconBadgeClassName: O } = x ?? {}, { emptyLabel: k, emptyDescription: j, noResultsLabel: M, noResultsDescription: N, sharedEmptyDescription: P = N, tabEmptyLabels: F, loadingLabel:
|
|
720
|
-
|
|
721
|
-
}, []),
|
|
722
|
-
|
|
719
|
+
]), $ = 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 = X.All, hiddenSources: h, rowVariant: g, getActions: _, onActionMenuOpen: v, onMoveConversation: y, onVisibleConversationIdsChange: b, styles: x, id: S, className: T }) => {
|
|
720
|
+
let { colors: E, typography: D, itemIconBadgeClassName: O } = x ?? {}, { emptyLabel: k, emptyDescription: j, noResultsLabel: M, noResultsDescription: N, sharedEmptyDescription: P = N, tabEmptyLabels: F, loadingLabel: R = "Loading conversations", updatingTitlesLabel: z = "Updating conversation names", groupLabels: te, actionsLabel: G, unreadIndicatorLabel: ne } = d, K = B(() => h?.length ? e.filter((e) => e.source == null || !h.includes(e.source)) : e, [e, h]), [re, ie] = H(() => Je), [ae, q] = H(5), oe = ee(), se = V(null), ce = V(null), [J, ue] = H(null), [de, fe] = H(null), [pe, me] = H(null), he = V(null), Y = V(null), ge = I(({ height: e }) => {
|
|
721
|
+
q(Le(e));
|
|
722
|
+
}, []), _e = I((e) => {
|
|
723
|
+
ie((t) => {
|
|
723
724
|
let n = new Set(t);
|
|
724
725
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
725
726
|
});
|
|
726
|
-
}, []),
|
|
727
|
-
|
|
728
|
-
}, []),
|
|
729
|
-
let n = He(e, Ve(t, e),
|
|
730
|
-
|
|
731
|
-
}, [
|
|
732
|
-
|
|
733
|
-
}, [
|
|
734
|
-
|
|
735
|
-
}, []),
|
|
736
|
-
|
|
737
|
-
}, []),
|
|
738
|
-
let r =
|
|
739
|
-
|
|
727
|
+
}, []), ve = I(() => {
|
|
728
|
+
he.current = null, Y.current = null, ue(null), fe(null), me(null);
|
|
729
|
+
}, []), ye = I((e, t) => {
|
|
730
|
+
let n = He(e, Ve(t, e), K);
|
|
731
|
+
he.current = e, Y.current = n, ue(e), me(n);
|
|
732
|
+
}, [K]), be = I(() => {
|
|
733
|
+
ve();
|
|
734
|
+
}, [ve]), xe = I((e) => {
|
|
735
|
+
fe(e);
|
|
736
|
+
}, []), Se = I(() => {
|
|
737
|
+
fe(null);
|
|
738
|
+
}, []), Ce = I((e, t, n) => {
|
|
739
|
+
let r = he.current, i = Y.current;
|
|
740
|
+
ve(), r != null && r !== e && i?.has(t) && y?.({
|
|
740
741
|
draggedId: r,
|
|
741
742
|
targetGroupKey: t,
|
|
742
743
|
afterId: n
|
|
743
744
|
});
|
|
744
|
-
}, [
|
|
745
|
+
}, [ve, y]), we = r({
|
|
745
746
|
"--cp-item-hover": E?.itemHover,
|
|
746
747
|
"--cp-item-active": E?.itemActive,
|
|
747
748
|
"--cp-text": E?.text,
|
|
@@ -754,14 +755,14 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
754
755
|
"--cp-unread-dot": E?.unreadDot,
|
|
755
756
|
"--cp-indicator-dot": E?.indicatorDot,
|
|
756
757
|
"--cp-list-font-family": D?.fontFamily
|
|
757
|
-
}), [
|
|
758
|
+
}), [Te, Ee] = H(null);
|
|
758
759
|
L(() => {
|
|
759
760
|
if (!o || !f || !u) {
|
|
760
|
-
|
|
761
|
+
Ee(null);
|
|
761
762
|
return;
|
|
762
763
|
}
|
|
763
|
-
let e =
|
|
764
|
-
|
|
764
|
+
let e = K.find((e) => e.id === u);
|
|
765
|
+
Ee((t) => e && Me(e, f) ? t?.id === e.id && t.query === f ? t : {
|
|
765
766
|
id: e.id,
|
|
766
767
|
query: f
|
|
767
768
|
} : t?.id === u && t.query === f ? t : null);
|
|
@@ -769,10 +770,10 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
769
770
|
o,
|
|
770
771
|
f,
|
|
771
772
|
u,
|
|
772
|
-
|
|
773
|
+
K
|
|
773
774
|
]);
|
|
774
|
-
let
|
|
775
|
-
o && f &&
|
|
775
|
+
let De = I((e) => {
|
|
776
|
+
o && f && Ee({
|
|
776
777
|
id: e,
|
|
777
778
|
query: f
|
|
778
779
|
}), s(e);
|
|
@@ -780,56 +781,56 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
780
781
|
o,
|
|
781
782
|
f,
|
|
782
783
|
s
|
|
783
|
-
]),
|
|
784
|
-
|
|
784
|
+
]), Pe = o && f !== "" && Te?.query === f && Te.id === u ? Te.id : void 0, Ie = B(() => K.filter((e) => Ae(e, p) && je(e, m) && (Me(e, f) || e.id === Pe)), [
|
|
785
|
+
K,
|
|
785
786
|
p,
|
|
786
787
|
m,
|
|
787
788
|
f,
|
|
788
|
-
|
|
789
|
-
]), Be =
|
|
789
|
+
Pe
|
|
790
|
+
]), Be = B(() => Ie.filter((e) => e.isPinned), [Ie]), Ue = B(() => Ie.filter((e) => !e.isPinned && e.source !== n.Shared && e.source !== n.Organization), [Ie]), We = B(() => Ie.filter((e) => !e.isPinned && e.source === n.Shared), [Ie]), Ge = B(() => Ie.filter((e) => !e.isPinned && e.source === n.Organization), [Ie]), Ke = B(() => [
|
|
790
791
|
{
|
|
791
792
|
key: n.Pinned,
|
|
792
|
-
label:
|
|
793
|
+
label: te?.pinned ?? "Pinned",
|
|
793
794
|
items: Be
|
|
794
795
|
},
|
|
795
796
|
{
|
|
796
797
|
key: n.MyChats,
|
|
797
|
-
label:
|
|
798
|
+
label: te?.myChats ?? "My chats",
|
|
798
799
|
items: Ue
|
|
799
800
|
},
|
|
800
801
|
{
|
|
801
802
|
key: n.Shared,
|
|
802
|
-
label:
|
|
803
|
+
label: te?.shared ?? "Shared",
|
|
803
804
|
items: We
|
|
804
805
|
},
|
|
805
806
|
{
|
|
806
807
|
key: n.Organization,
|
|
807
|
-
label:
|
|
808
|
+
label: te?.organization ?? "Organization",
|
|
808
809
|
items: Ge
|
|
809
810
|
}
|
|
810
811
|
], [
|
|
811
|
-
|
|
812
|
+
te,
|
|
812
813
|
Be,
|
|
813
814
|
Ue,
|
|
814
815
|
We,
|
|
815
816
|
Ge
|
|
816
|
-
]), $ =
|
|
817
|
+
]), $ = B(() => {
|
|
817
818
|
let e = [];
|
|
818
819
|
for (let t of Ke) if (t.items.length !== 0 && (e.push({
|
|
819
|
-
kind:
|
|
820
|
+
kind: ke.Header,
|
|
820
821
|
groupKey: t.key,
|
|
821
822
|
label: t.label
|
|
822
|
-
}),
|
|
823
|
-
kind:
|
|
823
|
+
}), re.has(t.key))) for (let n of t.items) e.push({
|
|
824
|
+
kind: ke.Item,
|
|
824
825
|
item: n,
|
|
825
826
|
groupKey: t.key
|
|
826
827
|
});
|
|
827
828
|
return e;
|
|
828
|
-
}, [Ke,
|
|
829
|
+
}, [Ke, re]);
|
|
829
830
|
L(() => {
|
|
830
831
|
if (!u || ce.current === u) return;
|
|
831
|
-
let e = $.findIndex((e) => e.kind ===
|
|
832
|
-
e >= 0 && (
|
|
832
|
+
let e = $.findIndex((e) => e.kind === ke.Item && e.item.id === u);
|
|
833
|
+
e >= 0 && (se.current?.scrollToRow({
|
|
833
834
|
index: e,
|
|
834
835
|
align: "smart",
|
|
835
836
|
behavior: "smooth"
|
|
@@ -837,64 +838,66 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
837
838
|
}, [
|
|
838
839
|
u,
|
|
839
840
|
Ke,
|
|
840
|
-
|
|
841
|
+
re,
|
|
841
842
|
$
|
|
842
843
|
]);
|
|
843
|
-
let Ye =
|
|
844
|
+
let Ye = V($);
|
|
844
845
|
L(() => {
|
|
845
846
|
Ye.current = $;
|
|
846
847
|
}, [$]);
|
|
847
|
-
let Xe = I((e) =>
|
|
848
|
+
let Xe = I((e) => ye(e, Ye.current), [ye]), Ze = B(() => ({
|
|
848
849
|
rows: $,
|
|
849
|
-
expandedGroups:
|
|
850
|
-
onToggleGroup:
|
|
851
|
-
listId:
|
|
850
|
+
expandedGroups: re,
|
|
851
|
+
onToggleGroup: _e,
|
|
852
|
+
listId: oe,
|
|
852
853
|
activeConversationId: u,
|
|
853
854
|
searchQuery: f,
|
|
854
|
-
onSelectConversation:
|
|
855
|
+
onSelectConversation: De,
|
|
855
856
|
getActions: _,
|
|
856
857
|
onActionMenuOpen: v,
|
|
857
|
-
actionsLabel:
|
|
858
|
-
unreadIndicatorLabel:
|
|
858
|
+
actionsLabel: G,
|
|
859
|
+
unreadIndicatorLabel: ne,
|
|
859
860
|
rowVariant: g,
|
|
860
861
|
styles: {
|
|
861
862
|
groupHeaderClassName: D?.groupHeaderClassName,
|
|
862
863
|
itemTitleClassName: D?.itemTitleClassName,
|
|
864
|
+
unreadItemTitleClassName: D?.unreadItemTitleClassName,
|
|
863
865
|
itemIconBadgeClassName: O
|
|
864
866
|
},
|
|
865
|
-
draggingId:
|
|
866
|
-
dragOverId:
|
|
867
|
-
allowedDropGroups:
|
|
867
|
+
draggingId: J,
|
|
868
|
+
dragOverId: de,
|
|
869
|
+
allowedDropGroups: pe,
|
|
868
870
|
onDragStart: Xe,
|
|
869
|
-
onDragEnd:
|
|
870
|
-
onDragOver:
|
|
871
|
-
onDragLeave:
|
|
872
|
-
onDrop:
|
|
871
|
+
onDragEnd: be,
|
|
872
|
+
onDragOver: xe,
|
|
873
|
+
onDragLeave: Se,
|
|
874
|
+
onDrop: Ce
|
|
873
875
|
}), [
|
|
874
876
|
$,
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
877
|
+
re,
|
|
878
|
+
_e,
|
|
879
|
+
oe,
|
|
878
880
|
u,
|
|
879
881
|
f,
|
|
880
|
-
|
|
882
|
+
De,
|
|
881
883
|
_,
|
|
882
884
|
v,
|
|
885
|
+
G,
|
|
883
886
|
ne,
|
|
884
|
-
re,
|
|
885
887
|
g,
|
|
886
888
|
D?.groupHeaderClassName,
|
|
887
889
|
D?.itemTitleClassName,
|
|
890
|
+
D?.unreadItemTitleClassName,
|
|
888
891
|
O,
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
+
J,
|
|
893
|
+
de,
|
|
894
|
+
pe,
|
|
892
895
|
Xe,
|
|
896
|
+
be,
|
|
893
897
|
xe,
|
|
894
898
|
Se,
|
|
895
|
-
Ce
|
|
896
|
-
|
|
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);
|
|
899
|
+
Ce
|
|
900
|
+
]), Qe = f !== "" || p !== n.All || m !== X.All, $e = Ie.length === 0, et = $e && Qe, tt = $e && !Qe, nt = et && f === "" && m === X.All ? F?.[p] : void 0, rt = nt?.label ?? M, it = p === n.Shared && f === "" ? P : N, at = nt?.description ?? it, ot = !t && !$e, st = V(null), ct = V(null), lt = V(b);
|
|
898
901
|
L(() => {
|
|
899
902
|
lt.current = b;
|
|
900
903
|
}, [b]);
|
|
@@ -911,17 +914,17 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
911
914
|
ut
|
|
912
915
|
]), /* @__PURE__ */ W("div", {
|
|
913
916
|
id: S,
|
|
914
|
-
style:
|
|
915
|
-
className: a("flex-1 overflow-hidden px-3", Q.list, D?.fontClassName, g !==
|
|
917
|
+
style: we,
|
|
918
|
+
className: a("flex-1 overflow-hidden px-3", Q.list, D?.fontClassName, g !== Z.Indicator && "py-1", T, le.list),
|
|
916
919
|
children: [/* @__PURE__ */ U(C, {
|
|
917
920
|
visuallyHidden: !0,
|
|
918
921
|
as: w.Span,
|
|
919
|
-
children: t ?
|
|
922
|
+
children: t ? R : i ? z : tt ? k : et ? rt : ""
|
|
920
923
|
}), t ? /* @__PURE__ */ U("div", {
|
|
921
924
|
className: "flex flex-col gap-3 px-2 py-3",
|
|
922
925
|
children: Array.from({ length: 15 }, (e, t) => /* @__PURE__ */ U(A, {
|
|
923
926
|
avatar: { size: 24 },
|
|
924
|
-
showTitle: { width:
|
|
927
|
+
showTitle: { width: Ne(t) },
|
|
925
928
|
paragraph: !1,
|
|
926
929
|
active: !0,
|
|
927
930
|
color: Q.skeletonColor
|
|
@@ -929,26 +932,27 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
929
932
|
}) : tt ? /* @__PURE__ */ U(c, {
|
|
930
933
|
label: k,
|
|
931
934
|
description: j
|
|
932
|
-
}) : et && f !== "" && i ? /* @__PURE__ */ U(c, { label:
|
|
935
|
+
}) : et && f !== "" && i ? /* @__PURE__ */ U(c, { label: z }) : et ? /* @__PURE__ */ U(l, {
|
|
933
936
|
label: rt,
|
|
934
937
|
description: at
|
|
935
|
-
}) : /* @__PURE__ */ U(
|
|
936
|
-
listRef:
|
|
937
|
-
id:
|
|
938
|
+
}) : /* @__PURE__ */ U(Oe, {
|
|
939
|
+
listRef: se,
|
|
940
|
+
id: oe,
|
|
938
941
|
role: "list",
|
|
939
942
|
style: { height: "100%" },
|
|
940
943
|
rowComponent: qe,
|
|
941
944
|
rowCount: $.length,
|
|
942
|
-
rowHeight:
|
|
943
|
-
overscanCount:
|
|
944
|
-
onResize:
|
|
945
|
+
rowHeight: Fe,
|
|
946
|
+
overscanCount: ae,
|
|
947
|
+
onResize: ge,
|
|
945
948
|
onRowsRendered: dt,
|
|
946
949
|
rowProps: Ze
|
|
947
950
|
})]
|
|
948
951
|
});
|
|
949
952
|
}), Ye = {
|
|
950
|
-
title: "
|
|
951
|
-
|
|
953
|
+
title: "_title_mvx21_2",
|
|
954
|
+
filterValue: "_filterValue_mvx21_12",
|
|
955
|
+
filterIndicator: "_filterIndicator_mvx21_17"
|
|
952
956
|
}, Xe = "!size-6 !min-h-0 !min-w-0 !p-1", Ze = [
|
|
953
957
|
{
|
|
954
958
|
value: n.All,
|
|
@@ -968,38 +972,39 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
968
972
|
}
|
|
969
973
|
], Qe = [
|
|
970
974
|
{
|
|
971
|
-
value:
|
|
975
|
+
value: X.All,
|
|
972
976
|
getLabel: (e) => e.all
|
|
973
977
|
},
|
|
974
978
|
{
|
|
975
|
-
value:
|
|
979
|
+
value: X.Chat,
|
|
976
980
|
getLabel: (e) => e.chat ?? "Chat"
|
|
977
981
|
},
|
|
978
982
|
{
|
|
979
|
-
value:
|
|
983
|
+
value: X.Task,
|
|
980
984
|
getLabel: (e) => e.task ?? "Task"
|
|
981
985
|
}
|
|
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 =
|
|
983
|
-
let w = S?.typography?.titleClassName ?? "dial-tiny-lead-semi-text", T = S?.typography?.searchTextClassName ?? "dial-tiny-text", D =
|
|
986
|
+
], $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 = X.All, onTypeFilterChange: v, hiddenSources: y, actions: x, styles: S, className: C }) => {
|
|
987
|
+
let w = S?.typography?.titleClassName ?? "dial-tiny-lead-semi-text", T = S?.typography?.searchTextClassName ?? "dial-tiny-text", D = S?.colors?.filterValue, O = V(null), A = V(null), j = V(c), M = e.filterLabels.groupAriaLabel ?? "Filter chats", N = e.filterActiveLabel ?? "Filters applied", P = ee(), F = d !== n.All || p !== X.All, R = l != null && u != null;
|
|
984
988
|
L(() => {
|
|
985
|
-
c ?
|
|
989
|
+
c ? A.current?.focus() : j.current && O.current?.focus(), j.current = c;
|
|
986
990
|
}, [c]);
|
|
987
|
-
let
|
|
991
|
+
let z = I(() => {
|
|
988
992
|
u?.(!0);
|
|
989
|
-
}, [u]),
|
|
993
|
+
}, [u]), H = I(() => {
|
|
990
994
|
l?.(""), u?.(!1);
|
|
991
|
-
}, [l, u]),
|
|
995
|
+
}, [l, u]), G = I((e) => {
|
|
992
996
|
l?.(e ?? "");
|
|
993
997
|
}, [l]), ne = I((e) => {
|
|
994
|
-
e.key === "Escape" && (e.stopPropagation(),
|
|
995
|
-
}, [
|
|
996
|
-
let { filterLabels: t } = e, n = (e, t) => () => /* @__PURE__ */ W(
|
|
998
|
+
e.key === "Escape" && (e.stopPropagation(), H());
|
|
999
|
+
}, [H]), ie = B(() => {
|
|
1000
|
+
let { filterLabels: t } = e, n = r({ "--cp-list-header-filter-value": D }), i = (e, t) => () => /* @__PURE__ */ W(te, { children: [/* @__PURE__ */ U("span", {
|
|
997
1001
|
className: "min-w-0 flex-1 truncate text-start",
|
|
998
1002
|
children: e
|
|
999
1003
|
}), /* @__PURE__ */ U("span", {
|
|
1000
|
-
className: "shrink-0
|
|
1004
|
+
className: a("shrink-0", Ye.filterValue),
|
|
1005
|
+
style: n,
|
|
1001
1006
|
children: t
|
|
1002
|
-
})] }),
|
|
1007
|
+
})] }), o = [];
|
|
1003
1008
|
if (v) {
|
|
1004
1009
|
let e = Qe.map(({ value: e, getLabel: n }) => ({
|
|
1005
1010
|
key: e,
|
|
@@ -1007,20 +1012,20 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1007
1012
|
mark: E.Check,
|
|
1008
1013
|
checked: e === p,
|
|
1009
1014
|
onClick: () => v(e)
|
|
1010
|
-
})),
|
|
1011
|
-
|
|
1015
|
+
})), n = Qe.find(({ value: e }) => e === p);
|
|
1016
|
+
o.push({
|
|
1012
1017
|
key: "filter-type",
|
|
1013
1018
|
label: t.type ?? "Type",
|
|
1014
|
-
renderItem:
|
|
1019
|
+
renderItem: i(t.type ?? "Type", n ? n.getLabel(t) : t.all),
|
|
1015
1020
|
children: e
|
|
1016
1021
|
});
|
|
1017
1022
|
}
|
|
1018
1023
|
if (f) {
|
|
1019
|
-
let e = Ze.filter(({ value: e }) => !y?.includes(e)),
|
|
1020
|
-
|
|
1024
|
+
let e = Ze.filter(({ value: e }) => !y?.includes(e)), n = e.find(({ value: e }) => e === d);
|
|
1025
|
+
o.push({
|
|
1021
1026
|
key: "filter-origin",
|
|
1022
1027
|
label: t.origin ?? "Origin",
|
|
1023
|
-
renderItem:
|
|
1028
|
+
renderItem: i(t.origin ?? "Origin", n ? n.getLabel(t) : t.all),
|
|
1024
1029
|
children: e.map(({ value: e, getLabel: n }) => ({
|
|
1025
1030
|
key: e,
|
|
1026
1031
|
label: n(t),
|
|
@@ -1030,15 +1035,16 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1030
1035
|
}))
|
|
1031
1036
|
});
|
|
1032
1037
|
}
|
|
1033
|
-
return
|
|
1038
|
+
return o;
|
|
1034
1039
|
}, [
|
|
1035
1040
|
e,
|
|
1036
1041
|
y,
|
|
1037
1042
|
d,
|
|
1038
1043
|
p,
|
|
1039
1044
|
f,
|
|
1040
|
-
v
|
|
1041
|
-
|
|
1045
|
+
v,
|
|
1046
|
+
D
|
|
1047
|
+
]), q = B(() => r({
|
|
1042
1048
|
"--cp-list-header-title": S?.colors?.title,
|
|
1043
1049
|
"--cp-list-header-title-focus": S?.colors?.titleFocus,
|
|
1044
1050
|
"--cp-list-header-filter-indicator": S?.colors?.filterIndicator
|
|
@@ -1046,18 +1052,18 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1046
1052
|
S?.colors?.title,
|
|
1047
1053
|
S?.colors?.titleFocus,
|
|
1048
1054
|
S?.colors?.filterIndicator
|
|
1049
|
-
]),
|
|
1050
|
-
if (
|
|
1055
|
+
]), se = (e) => a("flex min-h-6 items-center justify-between ps-2", e, C, le.listHeader);
|
|
1056
|
+
if (R && c) return /* @__PURE__ */ W("div", {
|
|
1051
1057
|
role: "search",
|
|
1052
|
-
style:
|
|
1053
|
-
className:
|
|
1058
|
+
style: q,
|
|
1059
|
+
className: se("gap-2"),
|
|
1054
1060
|
onKeyDown: ne,
|
|
1055
1061
|
children: [/* @__PURE__ */ U(k, {
|
|
1056
1062
|
containerClassName: "min-w-0 flex-1",
|
|
1057
|
-
wrapperClassName: a("
|
|
1058
|
-
inputRef:
|
|
1063
|
+
wrapperClassName: a("h-6! min-h-0! py-1! pe-2! [&_svg]:size-4!", T),
|
|
1064
|
+
inputRef: A,
|
|
1059
1065
|
value: s,
|
|
1060
|
-
onChange:
|
|
1066
|
+
onChange: G,
|
|
1061
1067
|
placeholder: e.searchPlaceholder,
|
|
1062
1068
|
clearLabel: e.searchClearLabel,
|
|
1063
1069
|
"aria-label": e.searchPlaceholder
|
|
@@ -1070,28 +1076,28 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1070
1076
|
size: _.Small,
|
|
1071
1077
|
className: Xe,
|
|
1072
1078
|
"aria-label": e.searchCloseLabel,
|
|
1073
|
-
onClick:
|
|
1079
|
+
onClick: H
|
|
1074
1080
|
})]
|
|
1075
1081
|
});
|
|
1076
|
-
let
|
|
1082
|
+
let J = /* @__PURE__ */ U("span", {
|
|
1077
1083
|
className: w,
|
|
1078
1084
|
children: e.title
|
|
1079
1085
|
});
|
|
1080
1086
|
return /* @__PURE__ */ W("div", {
|
|
1081
|
-
style:
|
|
1082
|
-
className:
|
|
1087
|
+
style: q,
|
|
1088
|
+
className: se(),
|
|
1083
1089
|
children: [i ? /* @__PURE__ */ W("button", {
|
|
1084
1090
|
type: "button",
|
|
1085
1091
|
"aria-expanded": t,
|
|
1086
1092
|
"aria-controls": o,
|
|
1087
1093
|
onClick: i,
|
|
1088
1094
|
className: a("group flex items-center gap-1 rounded", Ye.title),
|
|
1089
|
-
children: [
|
|
1095
|
+
children: [J, t ? /* @__PURE__ */ U(K, {
|
|
1090
1096
|
size: m.SM,
|
|
1091
1097
|
stroke: h,
|
|
1092
1098
|
className: "opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100",
|
|
1093
1099
|
"aria-hidden": !0
|
|
1094
|
-
}) : /* @__PURE__ */ U(
|
|
1100
|
+
}) : /* @__PURE__ */ U(re, {
|
|
1095
1101
|
size: m.SM,
|
|
1096
1102
|
stroke: h,
|
|
1097
1103
|
className: "opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100 rtl:scale-x-[-1]",
|
|
@@ -1099,13 +1105,13 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1099
1105
|
})]
|
|
1100
1106
|
}) : /* @__PURE__ */ U("span", {
|
|
1101
1107
|
className: Ye.title,
|
|
1102
|
-
children:
|
|
1108
|
+
children: J
|
|
1103
1109
|
}), /* @__PURE__ */ W("div", {
|
|
1104
1110
|
className: "flex items-center gap-2",
|
|
1105
1111
|
children: [
|
|
1106
|
-
|
|
1107
|
-
ref:
|
|
1108
|
-
icon: /* @__PURE__ */ U(
|
|
1112
|
+
R && /* @__PURE__ */ U(b, {
|
|
1113
|
+
ref: O,
|
|
1114
|
+
icon: /* @__PURE__ */ U(oe, {
|
|
1109
1115
|
size: m.SM,
|
|
1110
1116
|
stroke: h,
|
|
1111
1117
|
"aria-hidden": !0
|
|
@@ -1113,41 +1119,41 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1113
1119
|
size: _.Small,
|
|
1114
1120
|
className: Xe,
|
|
1115
1121
|
"aria-label": e.searchOpenLabel,
|
|
1116
|
-
onClick:
|
|
1122
|
+
onClick: z
|
|
1117
1123
|
}),
|
|
1118
1124
|
(f || v) && /* @__PURE__ */ U(g, {
|
|
1119
|
-
items:
|
|
1125
|
+
items: ie,
|
|
1120
1126
|
placement: "bottom-end",
|
|
1121
1127
|
matchReferenceWidth: !1,
|
|
1122
1128
|
children: /* @__PURE__ */ U(b, {
|
|
1123
1129
|
icon: /* @__PURE__ */ W("span", {
|
|
1124
1130
|
className: "relative inline-flex",
|
|
1125
|
-
children: [/* @__PURE__ */ U(
|
|
1131
|
+
children: [/* @__PURE__ */ U(ae, {
|
|
1126
1132
|
size: m.SM,
|
|
1127
1133
|
stroke: h,
|
|
1128
1134
|
"aria-hidden": !0
|
|
1129
|
-
}),
|
|
1135
|
+
}), F && /* @__PURE__ */ U("span", {
|
|
1130
1136
|
"aria-hidden": !0,
|
|
1131
|
-
className: a(Ye.filterIndicator, "absolute -
|
|
1137
|
+
className: a(Ye.filterIndicator, "absolute -inset-e-0.5 -top-0.5 size-1.5 rounded-full")
|
|
1132
1138
|
})]
|
|
1133
1139
|
}),
|
|
1134
1140
|
size: _.Small,
|
|
1135
1141
|
className: Xe,
|
|
1136
|
-
"aria-label":
|
|
1137
|
-
"aria-describedby":
|
|
1142
|
+
"aria-label": M,
|
|
1143
|
+
"aria-describedby": F ? P : void 0
|
|
1138
1144
|
})
|
|
1139
1145
|
}),
|
|
1140
|
-
|
|
1141
|
-
id:
|
|
1146
|
+
F && (f || v) && /* @__PURE__ */ U("span", {
|
|
1147
|
+
id: P,
|
|
1142
1148
|
className: "sr-only",
|
|
1143
|
-
children:
|
|
1149
|
+
children: N
|
|
1144
1150
|
}),
|
|
1145
1151
|
x
|
|
1146
1152
|
]
|
|
1147
1153
|
})]
|
|
1148
1154
|
});
|
|
1149
1155
|
}), 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] =
|
|
1156
|
+
let C = ee(), [w, T] = H(""), [E, D] = H(!1), [O, k] = H(!0), [A, j] = H(n.All), [M, N] = H(X.All);
|
|
1151
1157
|
L(() => {
|
|
1152
1158
|
l != null && j(l);
|
|
1153
1159
|
}, [l]);
|
|
@@ -1155,11 +1161,11 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1155
1161
|
j(e), d?.(e);
|
|
1156
1162
|
}, [d]), F = I((e) => {
|
|
1157
1163
|
T(e), e !== "" && k(!0);
|
|
1158
|
-
}, []), te = I((e) => {
|
|
1159
|
-
D(e), e && k(!0);
|
|
1160
1164
|
}, []), R = I((e) => {
|
|
1165
|
+
D(e), e && k(!0);
|
|
1166
|
+
}, []), z = I((e) => {
|
|
1161
1167
|
N(e), p?.(e);
|
|
1162
|
-
}, [p]),
|
|
1168
|
+
}, [p]), B = I(() => k((e) => !e), []);
|
|
1163
1169
|
return /* @__PURE__ */ W("section", {
|
|
1164
1170
|
"aria-label": c.title,
|
|
1165
1171
|
className: a("flex min-h-0 flex-1 flex-col px-1 pt-4", S, le.listSection),
|
|
@@ -1168,16 +1174,16 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1168
1174
|
children: /* @__PURE__ */ U($e, {
|
|
1169
1175
|
labels: c,
|
|
1170
1176
|
isExpanded: O,
|
|
1171
|
-
onToggleExpanded:
|
|
1177
|
+
onToggleExpanded: B,
|
|
1172
1178
|
controlsId: C,
|
|
1173
1179
|
searchQuery: w,
|
|
1174
1180
|
isSearchOpen: E,
|
|
1175
1181
|
onSearchChange: F,
|
|
1176
|
-
onSearchOpenChange:
|
|
1182
|
+
onSearchOpenChange: R,
|
|
1177
1183
|
activeFilter: A,
|
|
1178
1184
|
onFilterChange: u ? void 0 : P,
|
|
1179
1185
|
activeTypeFilter: M,
|
|
1180
|
-
onTypeFilterChange: u || f ? void 0 :
|
|
1186
|
+
onTypeFilterChange: u || f ? void 0 : z,
|
|
1181
1187
|
hiddenSources: m,
|
|
1182
1188
|
actions: h,
|
|
1183
1189
|
styles: b?.header
|
|
@@ -1199,7 +1205,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1199
1205
|
activeFilter: A,
|
|
1200
1206
|
activeTypeFilter: M,
|
|
1201
1207
|
hiddenSources: m,
|
|
1202
|
-
rowVariant:
|
|
1208
|
+
rowVariant: Z.Indicator,
|
|
1203
1209
|
getActions: g,
|
|
1204
1210
|
onActionMenuOpen: _,
|
|
1205
1211
|
onMoveConversation: v,
|
|
@@ -1227,7 +1233,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1227
1233
|
labelKey: "organization"
|
|
1228
1234
|
}
|
|
1229
1235
|
], nt = F(({ activeTab: e, labels: t, onChange: n, tabClassName: r = "dial-tiny-semi-text", hiddenSources: i }) => {
|
|
1230
|
-
let a =
|
|
1236
|
+
let a = B(() => tt.filter(({ value: e }) => !i?.includes(e)).map(({ value: e, labelKey: n }) => ({
|
|
1231
1237
|
value: e,
|
|
1232
1238
|
label: t[n]
|
|
1233
1239
|
})), [t, i]);
|
|
@@ -1238,7 +1244,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1238
1244
|
stretch: !0,
|
|
1239
1245
|
"aria-label": t.groupAriaLabel ?? "Filter chats",
|
|
1240
1246
|
className: "px-3 py-2",
|
|
1241
|
-
chipClassName: N("
|
|
1247
|
+
chipClassName: N("px-2!", r)
|
|
1242
1248
|
});
|
|
1243
1249
|
}), rt = { button: "_button_vjird_1" }, it = F(({ label: e, onClick: t, labelClassName: n = "dial-small-semi-text", colors: i, className: o }) => {
|
|
1244
1250
|
let s = r({
|
|
@@ -1252,7 +1258,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1252
1258
|
children: /* @__PURE__ */ U(f, {
|
|
1253
1259
|
label: e,
|
|
1254
1260
|
textClassName: n,
|
|
1255
|
-
iconBefore: /* @__PURE__ */ U(
|
|
1261
|
+
iconBefore: /* @__PURE__ */ U(q, {
|
|
1256
1262
|
size: 18,
|
|
1257
1263
|
stroke: h,
|
|
1258
1264
|
className: "shrink-0",
|
|
@@ -1263,47 +1269,48 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1263
1269
|
})
|
|
1264
1270
|
});
|
|
1265
1271
|
}), 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:
|
|
1272
|
+
let { colors: D, typography: O, newChatButton: A, searchWrapperClassName: j, headerClassName: M, headerActionsClassName: N, newChatButtonClassName: P } = m ?? {}, { title: F, emptyLabel: ee, emptyDescription: R, noResultsLabel: z, noResultsDescription: V, sharedEmptyDescription: te, tabEmptyLabels: G, loadingLabel: ne, updatingTitlesLabel: K, newChatLabel: re, searchPlaceholder: ie, searchClearLabel: ae, filterLabels: q, groupLabels: oe, actionsLabel: se, unreadIndicatorLabel: ce, closeAriaLabel: J } = f, [ue, de] = H(""), [fe, pe] = H(n.All);
|
|
1267
1273
|
L(() => {
|
|
1268
|
-
C != null &&
|
|
1274
|
+
C != null && pe(C);
|
|
1269
1275
|
}, [C]);
|
|
1270
|
-
let
|
|
1271
|
-
|
|
1272
|
-
}, []),
|
|
1276
|
+
let me = I((e) => {
|
|
1277
|
+
de(e ?? "");
|
|
1278
|
+
}, []), he = r({
|
|
1273
1279
|
"--cp-text": D?.text,
|
|
1274
1280
|
"--cp-new-chat-bg": A?.background,
|
|
1275
1281
|
"--cp-new-chat-text": A?.text,
|
|
1276
1282
|
"--cp-new-chat-focus-outline": A?.focusOutline
|
|
1277
|
-
}),
|
|
1283
|
+
}), Y = B(() => ({
|
|
1278
1284
|
emptyLabel: ee,
|
|
1279
|
-
emptyDescription:
|
|
1280
|
-
noResultsLabel:
|
|
1281
|
-
noResultsDescription:
|
|
1282
|
-
sharedEmptyDescription:
|
|
1283
|
-
tabEmptyLabels:
|
|
1284
|
-
loadingLabel:
|
|
1285
|
-
updatingTitlesLabel:
|
|
1286
|
-
groupLabels:
|
|
1287
|
-
actionsLabel:
|
|
1285
|
+
emptyDescription: R,
|
|
1286
|
+
noResultsLabel: z,
|
|
1287
|
+
noResultsDescription: V,
|
|
1288
|
+
sharedEmptyDescription: te,
|
|
1289
|
+
tabEmptyLabels: G,
|
|
1290
|
+
loadingLabel: ne,
|
|
1291
|
+
updatingTitlesLabel: K,
|
|
1292
|
+
groupLabels: oe,
|
|
1293
|
+
actionsLabel: se,
|
|
1288
1294
|
unreadIndicatorLabel: ce
|
|
1289
1295
|
}), [
|
|
1290
1296
|
ee,
|
|
1291
|
-
te,
|
|
1292
1297
|
R,
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
re,
|
|
1298
|
+
z,
|
|
1299
|
+
V,
|
|
1300
|
+
te,
|
|
1297
1301
|
G,
|
|
1302
|
+
ne,
|
|
1303
|
+
K,
|
|
1304
|
+
oe,
|
|
1298
1305
|
se,
|
|
1299
|
-
q,
|
|
1300
1306
|
ce
|
|
1301
|
-
]),
|
|
1307
|
+
]), ge = B(() => ({
|
|
1302
1308
|
colors: D,
|
|
1303
1309
|
typography: {
|
|
1304
1310
|
fontFamily: O?.fontFamily,
|
|
1305
1311
|
groupHeaderClassName: O?.groupHeaderClassName,
|
|
1306
|
-
itemTitleClassName: O?.itemTitleClassName
|
|
1312
|
+
itemTitleClassName: O?.itemTitleClassName,
|
|
1313
|
+
unreadItemTitleClassName: O?.unreadItemTitleClassName
|
|
1307
1314
|
},
|
|
1308
1315
|
itemIconBadgeClassName: m?.itemIconBadgeClassName
|
|
1309
1316
|
}), [
|
|
@@ -1311,6 +1318,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1311
1318
|
O?.fontFamily,
|
|
1312
1319
|
O?.groupHeaderClassName,
|
|
1313
1320
|
O?.itemTitleClassName,
|
|
1321
|
+
O?.unreadItemTitleClassName,
|
|
1314
1322
|
m?.itemIconBadgeClassName
|
|
1315
1323
|
]);
|
|
1316
1324
|
return /* @__PURE__ */ W(d, {
|
|
@@ -1320,7 +1328,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1320
1328
|
title: F,
|
|
1321
1329
|
labels: {
|
|
1322
1330
|
ariaLabel: F,
|
|
1323
|
-
closeLabel:
|
|
1331
|
+
closeLabel: J
|
|
1324
1332
|
},
|
|
1325
1333
|
onClose: y,
|
|
1326
1334
|
styles: {
|
|
@@ -1330,7 +1338,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1330
1338
|
},
|
|
1331
1339
|
typography: { fontClassName: O?.fontClassName },
|
|
1332
1340
|
bodyClassName: "flex flex-col overflow-hidden p-0 gap-3",
|
|
1333
|
-
cssVars:
|
|
1341
|
+
cssVars: he,
|
|
1334
1342
|
titleClassName: O?.fontClassName,
|
|
1335
1343
|
headerClassName: a("h-[64px]", M),
|
|
1336
1344
|
headerActionsClassName: N,
|
|
@@ -1339,7 +1347,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1339
1347
|
rightActions: b,
|
|
1340
1348
|
children: [
|
|
1341
1349
|
/* @__PURE__ */ U(it, {
|
|
1342
|
-
label:
|
|
1350
|
+
label: re,
|
|
1343
1351
|
onClick: p,
|
|
1344
1352
|
labelClassName: O?.newChatLabelClassName,
|
|
1345
1353
|
colors: A,
|
|
@@ -1350,18 +1358,18 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1350
1358
|
className: a("px-3 py-2", le.search),
|
|
1351
1359
|
children: /* @__PURE__ */ U(k, {
|
|
1352
1360
|
wrapperClassName: a(Q.search, j),
|
|
1353
|
-
value:
|
|
1354
|
-
onChange:
|
|
1355
|
-
placeholder:
|
|
1356
|
-
clearLabel:
|
|
1357
|
-
"aria-label":
|
|
1361
|
+
value: ue,
|
|
1362
|
+
onChange: me,
|
|
1363
|
+
placeholder: ie,
|
|
1364
|
+
clearLabel: ae,
|
|
1365
|
+
"aria-label": ie
|
|
1358
1366
|
})
|
|
1359
1367
|
}),
|
|
1360
1368
|
!T && /* @__PURE__ */ U(nt, {
|
|
1361
|
-
activeTab:
|
|
1362
|
-
labels:
|
|
1369
|
+
activeTab: fe,
|
|
1370
|
+
labels: q,
|
|
1363
1371
|
onChange: (e) => {
|
|
1364
|
-
|
|
1372
|
+
pe(e), w?.(e);
|
|
1365
1373
|
},
|
|
1366
1374
|
tabClassName: O?.tabClassName,
|
|
1367
1375
|
hiddenSources: E
|
|
@@ -1373,20 +1381,20 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1373
1381
|
preserveActiveSearchResult: o,
|
|
1374
1382
|
onSelectConversation: c,
|
|
1375
1383
|
activeConversationId: l,
|
|
1376
|
-
labels:
|
|
1377
|
-
searchQuery:
|
|
1378
|
-
activeFilter:
|
|
1384
|
+
labels: Y,
|
|
1385
|
+
searchQuery: ue,
|
|
1386
|
+
activeFilter: fe,
|
|
1379
1387
|
hiddenSources: E,
|
|
1380
1388
|
getActions: _,
|
|
1381
1389
|
onActionMenuOpen: v,
|
|
1382
1390
|
onMoveConversation: x,
|
|
1383
1391
|
onVisibleConversationIdsChange: S,
|
|
1384
|
-
styles:
|
|
1392
|
+
styles: ge
|
|
1385
1393
|
})
|
|
1386
1394
|
]
|
|
1387
1395
|
});
|
|
1388
1396
|
}), ot = F(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: a, onCancel: c, onGenerateWithAi: l, labels: u, styles: d }) => {
|
|
1389
|
-
let [f, g] =
|
|
1397
|
+
let [f, g] = H(t), [_, v] = H(!1), [y, x] = H(null), E = V(null), k = V(!1), A = V(0);
|
|
1390
1398
|
L(() => {
|
|
1391
1399
|
let n = e && !k.current;
|
|
1392
1400
|
if (k.current = e, !e) {
|
|
@@ -1408,7 +1416,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1408
1416
|
j
|
|
1409
1417
|
]), ee = I((e) => {
|
|
1410
1418
|
e.key === "Enter" && F();
|
|
1411
|
-
}, [F]),
|
|
1419
|
+
}, [F]), R = I(async () => {
|
|
1412
1420
|
if (_) return;
|
|
1413
1421
|
let e = ++A.current;
|
|
1414
1422
|
v(!0), x(null);
|
|
@@ -1426,8 +1434,8 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1426
1434
|
_,
|
|
1427
1435
|
l,
|
|
1428
1436
|
u.renameWithAiError
|
|
1429
|
-
]),
|
|
1430
|
-
return
|
|
1437
|
+
]), z = y ?? r ?? void 0, B;
|
|
1438
|
+
return B = N ? u.nameTooLongError : z, /* @__PURE__ */ U(D, {
|
|
1431
1439
|
open: e,
|
|
1432
1440
|
header: u.popupTitle,
|
|
1433
1441
|
size: O.Sm,
|
|
@@ -1448,7 +1456,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1448
1456
|
politeness: T.Assertive,
|
|
1449
1457
|
visuallyHidden: !0,
|
|
1450
1458
|
as: w.Span,
|
|
1451
|
-
children: !n && !N &&
|
|
1459
|
+
children: !n && !N && z
|
|
1452
1460
|
}), n ? /* @__PURE__ */ U("div", {
|
|
1453
1461
|
className: "h-[120px] px-6 py-4",
|
|
1454
1462
|
children: /* @__PURE__ */ U(M, { size: 50 })
|
|
@@ -1460,7 +1468,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1460
1468
|
inputRef: E,
|
|
1461
1469
|
value: f,
|
|
1462
1470
|
placeholder: u.inputPlaceholder,
|
|
1463
|
-
error:
|
|
1471
|
+
error: B,
|
|
1464
1472
|
onChange: (e) => g(o(e ?? "")),
|
|
1465
1473
|
onKeyDown: ee
|
|
1466
1474
|
})
|
|
@@ -1469,12 +1477,12 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1469
1477
|
tooltipProps: { tooltip: u.renameWithAiLabel },
|
|
1470
1478
|
disabled: _ || n,
|
|
1471
1479
|
"aria-busy": _,
|
|
1472
|
-
onClick:
|
|
1480
|
+
onClick: R,
|
|
1473
1481
|
icon: _ ? /* @__PURE__ */ U("span", {
|
|
1474
1482
|
className: "flex",
|
|
1475
1483
|
"aria-hidden": !0,
|
|
1476
1484
|
children: /* @__PURE__ */ U(M, { size: m.MD })
|
|
1477
|
-
}) : /* @__PURE__ */ U(
|
|
1485
|
+
}) : /* @__PURE__ */ U(se, {
|
|
1478
1486
|
size: m.MD,
|
|
1479
1487
|
stroke: h,
|
|
1480
1488
|
"aria-hidden": !0
|
|
@@ -1486,4 +1494,4 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1486
1494
|
});
|
|
1487
1495
|
ot.displayName = "RenameConversationPopup";
|
|
1488
1496
|
//#endregion
|
|
1489
|
-
export { le as CONVERSATION_PANEL_CLASS, $ as ConversationList, $e as ConversationListHeader, et as ConversationListSection, at as ConversationPanel,
|
|
1497
|
+
export { le as CONVERSATION_PANEL_CLASS, $ as ConversationList, $e as ConversationListHeader, et as ConversationListSection, at as ConversationPanel, Z as ConversationRowVariant, X as ConversationTypeFilter, ot as RenameConversationPopup };
|