@epam/ai-dial-conversation-panel 1.3.0-dev.159 → 1.3.0-dev.160
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/ConversationPanel/ConversationPanel.d.ts.map +1 -1
- package/components/RenameConversationPopup/RenameConversationPopup.d.ts.map +1 -1
- package/index.js +231 -213
- package/models/conversation-list.d.ts +4 -0
- package/models/conversation-list.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationList.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationList/ConversationList.tsx"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,EAAE,EAQR,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AA8B5E,wFAAwF;AACxF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"ConversationList.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationList/ConversationList.tsx"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,EAAE,EAQR,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AA8B5E,wFAAwF;AACxF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAiZtD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationPanel.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationPanel/ConversationPanel.tsx"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,EAAE,EAMR,MAAM,OAAO,CAAC;AAMf,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAMlE,sEAAsE;AACtE,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,
|
|
1
|
+
{"version":3,"file":"ConversationPanel.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationPanel/ConversationPanel.tsx"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,EAAE,EAMR,MAAM,OAAO,CAAC;AAMf,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAMlE,sEAAsE;AACtE,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAoMxD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenameConversationPopup.d.ts","sourceRoot":"","sources":["../../../src/components/RenameConversationPopup/RenameConversationPopup.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAML,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AAE3F,8FAA8F;AAC9F,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,
|
|
1
|
+
{"version":3,"file":"RenameConversationPopup.d.ts","sourceRoot":"","sources":["../../../src/components/RenameConversationPopup/RenameConversationPopup.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAML,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AAE3F,8FAA8F;AAC9F,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CAqKpE,CAAC"}
|
package/index.js
CHANGED
|
@@ -12,16 +12,16 @@ var ce = {
|
|
|
12
12
|
listHeader: "dial-cp-list-header",
|
|
13
13
|
listSection: "dial-cp-list-section"
|
|
14
14
|
}, K = typeof window < "u" ? L : P;
|
|
15
|
-
function
|
|
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
|
|
21
|
+
function le({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
|
|
22
22
|
let { styleHeight: s, styleWidth: c } = R(() => ({
|
|
23
|
-
styleHeight:
|
|
24
|
-
styleWidth:
|
|
23
|
+
styleHeight: q(o?.height),
|
|
24
|
+
styleWidth: q(o?.width)
|
|
25
25
|
}), [o?.height, o?.width]), [l, u] = B({
|
|
26
26
|
height: t,
|
|
27
27
|
width: n
|
|
@@ -55,7 +55,7 @@ function ue({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
|
|
|
55
55
|
c
|
|
56
56
|
]);
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function ue(e) {
|
|
59
59
|
let t = z(() => {
|
|
60
60
|
throw Error("Cannot call during render.");
|
|
61
61
|
});
|
|
@@ -63,18 +63,18 @@ function de(e) {
|
|
|
63
63
|
t.current = e;
|
|
64
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 me({ 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
|
|
@@ -133,11 +133,11 @@ function _e({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemC
|
|
|
133
133
|
stopIndexOverscan: l
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function Y({ 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 ve({ 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 ve({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
return R(() =>
|
|
171
|
+
function ve({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
172
|
+
return R(() => Y({
|
|
173
173
|
itemCount: e,
|
|
174
174
|
itemProps: t,
|
|
175
175
|
itemSize: n
|
|
@@ -179,18 +179,18 @@ function ye({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
|
179
179
|
n
|
|
180
180
|
]);
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function ye({ 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 be({ 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,
|
|
@@ -199,7 +199,7 @@ function xe({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
199
199
|
}), f = z({
|
|
200
200
|
height: 0,
|
|
201
201
|
width: 0
|
|
202
|
-
}), p = r === "vertical" ? u : d, m =
|
|
202
|
+
}), p = r === "vertical" ? u : d, m = ye({
|
|
203
203
|
containerSize: p,
|
|
204
204
|
itemSize: s
|
|
205
205
|
});
|
|
@@ -216,7 +216,7 @@ function xe({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
216
216
|
c,
|
|
217
217
|
d
|
|
218
218
|
]);
|
|
219
|
-
let h =
|
|
219
|
+
let h = ve({
|
|
220
220
|
itemCount: a,
|
|
221
221
|
itemProps: o,
|
|
222
222
|
itemSize: m
|
|
@@ -231,7 +231,7 @@ function xe({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
231
231
|
startIndexOverscan: Math.min(a - 1, _.startIndexOverscan),
|
|
232
232
|
stopIndexVisible: Math.min(a - 1, _.stopIndexVisible),
|
|
233
233
|
stopIndexOverscan: Math.min(a - 1, _.stopIndexOverscan)
|
|
234
|
-
}, C = N(() =>
|
|
234
|
+
}, C = N(() => he({
|
|
235
235
|
cachedBounds: h,
|
|
236
236
|
itemCount: a,
|
|
237
237
|
itemSize: m
|
|
@@ -240,7 +240,7 @@ function xe({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
240
240
|
a,
|
|
241
241
|
m
|
|
242
242
|
]), w = N((t) => {
|
|
243
|
-
let n =
|
|
243
|
+
let n = pe({
|
|
244
244
|
containerElement: e,
|
|
245
245
|
direction: r,
|
|
246
246
|
isRtl: i,
|
|
@@ -273,7 +273,7 @@ function xe({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
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,
|
|
@@ -285,7 +285,7 @@ function xe({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
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), () => {
|
|
@@ -301,8 +301,8 @@ function xe({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
301
301
|
]), {
|
|
302
302
|
getCellBounds: g,
|
|
303
303
|
getEstimatedSize: C,
|
|
304
|
-
scrollToIndex:
|
|
305
|
-
let s =
|
|
304
|
+
scrollToIndex: ue(({ align: t = "auto", containerScrollOffset: n, index: o }) => {
|
|
305
|
+
let s = ge({
|
|
306
306
|
align: t,
|
|
307
307
|
cachedBounds: h,
|
|
308
308
|
containerScrollOffset: n,
|
|
@@ -312,14 +312,14 @@ function xe({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
312
312
|
itemSize: m
|
|
313
313
|
});
|
|
314
314
|
if (e) {
|
|
315
|
-
if (s =
|
|
315
|
+
if (s = 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,19 +330,19 @@ function xe({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
330
330
|
stopIndexVisible: x
|
|
331
331
|
};
|
|
332
332
|
}
|
|
333
|
-
function
|
|
333
|
+
function xe(e) {
|
|
334
334
|
return R(() => e, Object.values(e));
|
|
335
335
|
}
|
|
336
336
|
function Se(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 X(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 Ce = "data-react-window-index";
|
|
344
|
+
function we({ 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 = xe(u), h = R(() => M(s, Se), [s]), [g, _] = B(null), v = X(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = be({
|
|
346
346
|
containerElement: g,
|
|
347
347
|
containerStyle: f,
|
|
348
348
|
defaultContainerSize: n,
|
|
@@ -373,7 +373,7 @@ function Te({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
|
|
|
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(Ce, n), !0;
|
|
377
377
|
});
|
|
378
378
|
if (v) return l.observeRowElements(e);
|
|
379
379
|
}, [
|
|
@@ -452,19 +452,19 @@ function Te({ 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 Z = /* @__PURE__ */ function(e) {
|
|
456
456
|
return e.All = "all", e.Chat = "chat", e.Task = "task", e;
|
|
457
|
-
}({}), Z = /* @__PURE__ */ function(e) {
|
|
458
|
-
return e.Avatar = "avatar", e.Indicator = "indicator", e;
|
|
459
457
|
}({}), Q = /* @__PURE__ */ function(e) {
|
|
458
|
+
return e.Avatar = "avatar", e.Indicator = "indicator", e;
|
|
459
|
+
}({}), Te = /* @__PURE__ */ function(e) {
|
|
460
460
|
return e.Header = "header", e.Item = "item", e;
|
|
461
461
|
}({}), Ee = (e, t) => t === n.All || e.source === t, De = (t, n) => {
|
|
462
|
-
if (n ===
|
|
462
|
+
if (n === Z.All) return !0;
|
|
463
463
|
let r = t.kind ?? e.Chat;
|
|
464
|
-
return n ===
|
|
464
|
+
return n === Z.Task ? r === e.Task : r === e.Chat;
|
|
465
465
|
}, Oe = (e, t) => !t || e.title.toLowerCase().includes(t.toLowerCase()), ke = (e) => `${60 + e * 23 % 35}%`, Ae = (e, t) => e ? t ? "pe-9" : "pe-2 group-focus-within/conversation:pe-9 group-hover/conversation:pe-9" : "pe-3", je = (e, t) => {
|
|
466
466
|
let n = t.rows[e];
|
|
467
|
-
return t.rowVariant ===
|
|
467
|
+
return t.rowVariant === Q.Indicator ? n.kind === Te.Item ? 34 : e === 0 ? 32 : 40 : n.kind === Te.Item ? 36 : e === 0 ? 24 : 56;
|
|
468
468
|
}, Me = 5, Ne = (e) => Math.max(Me, Math.ceil(Math.ceil(e / 36) / 2)), Pe = (e) => {
|
|
469
469
|
switch (e) {
|
|
470
470
|
case n.Shared: return n.Shared;
|
|
@@ -473,7 +473,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
473
473
|
}
|
|
474
474
|
}, Fe = (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 === Te.Header) n = r.groupKey;
|
|
477
477
|
else if (r.item.id === t) return n;
|
|
478
478
|
return null;
|
|
479
479
|
}, Ie = (e, t, r) => {
|
|
@@ -487,7 +487,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
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 === Te.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;
|
|
@@ -506,8 +506,8 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
506
506
|
unreadDot: "_unreadDot_gcqru_51",
|
|
507
507
|
search: "_search_gcqru_59",
|
|
508
508
|
list: "_list_gcqru_70"
|
|
509
|
-
}, Re = ({ label: e, isExpanded: t, onToggle: n, listId: r, className: i = "dial-tiny-lead-text", variant: o =
|
|
510
|
-
let f = s != null, p = o ===
|
|
509
|
+
}, Re = ({ label: e, isExpanded: t, onToggle: n, listId: r, className: i = "dial-tiny-lead-text", variant: o = Q.Avatar, dropZoneGroupKey: s, isDragOver: c, onDragOver: l, onDragLeave: u, onDrop: d }) => {
|
|
510
|
+
let f = s != null, p = o === Q.Indicator;
|
|
511
511
|
return /* @__PURE__ */ H("button", {
|
|
512
512
|
type: "button",
|
|
513
513
|
"aria-expanded": t,
|
|
@@ -550,10 +550,10 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
550
550
|
}))
|
|
551
551
|
]
|
|
552
552
|
});
|
|
553
|
-
}, ze = 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 =
|
|
553
|
+
}, ze = 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 = Q.Avatar, rowGroupKey: v, rows: y, draggingId: S, dragOverId: C, allowedDropGroups: w, onDragStart: T, onDragEnd: E, onDragOver: k, onDragLeave: A, onDrop: j }) => {
|
|
554
554
|
let [M, P] = B(!1), F = z(null), I = N((t) => {
|
|
555
555
|
P(t), t && F.current && s?.(e, F.current);
|
|
556
|
-
}, [e, s]), L = R(() => o?.(e) ?? [], [o, e]), ee = L.length > 0, te = R(() => ({ tooltip: e.iconTooltip }), [e.iconTooltip]), ne = R(() => ({ badgeClassName: u }), [u]), U = p ===
|
|
556
|
+
}, [e, s]), L = R(() => o?.(e) ?? [], [o, e]), ee = L.length > 0, te = R(() => ({ tooltip: e.iconTooltip }), [e.iconTooltip]), ne = R(() => ({ badgeClassName: u }), [u]), U = p === Q.Indicator, re = e.leadingIcon ? /* @__PURE__ */ V("span", {
|
|
557
557
|
className: "flex size-6 shrink-0 items-center justify-center",
|
|
558
558
|
children: e.leadingIcon
|
|
559
559
|
}) : e.isIconLoading ? /* @__PURE__ */ V(D, {
|
|
@@ -598,9 +598,9 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
598
598
|
y,
|
|
599
599
|
v,
|
|
600
600
|
j
|
|
601
|
-
]), K = e.id === S,
|
|
601
|
+
]), K = e.id === S, q = e.id === C, le = v != null && (w?.has(v) ?? !1), ue = S != null;
|
|
602
602
|
return /* @__PURE__ */ H("li", {
|
|
603
|
-
className: a("group/conversation relative", K && "cursor-grabbing opacity-50",
|
|
603
|
+
className: a("group/conversation relative", K && "cursor-grabbing opacity-50", q && le && "rounded", q && le && $.dropZoneActive, ue && !K && !le && "cursor-not-allowed"),
|
|
604
604
|
draggable: G || void 0,
|
|
605
605
|
onDragStart: G ? () => T?.(e.id) : void 0,
|
|
606
606
|
onDragEnd: G ? E : void 0,
|
|
@@ -652,9 +652,9 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
652
652
|
})
|
|
653
653
|
})]
|
|
654
654
|
});
|
|
655
|
-
}), Be = (e, t) => t ? e === 0 ? "pt-2" : "pt-4" : e === 0 ? "pt-0" : "pt-8", Ve = ({ 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 =
|
|
656
|
-
let w = r[e], T = h ===
|
|
657
|
-
if (w.kind ===
|
|
655
|
+
}), Be = (e, t) => t ? e === 0 ? "pt-2" : "pt-4" : e === 0 ? "pt-0" : "pt-8", Ve = ({ 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 = Q.Avatar, draggingId: g, dragOverId: _, allowedDropGroups: v, onDragStart: y, onDragEnd: b, onDragOver: x, onDragLeave: S, onDrop: C }) => {
|
|
656
|
+
let w = r[e], T = h === Q.Indicator;
|
|
657
|
+
if (w.kind === Te.Header) {
|
|
658
658
|
let r = w.groupKey === n.Pinned;
|
|
659
659
|
return /* @__PURE__ */ V("div", {
|
|
660
660
|
role: "listitem",
|
|
@@ -708,33 +708,33 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
708
708
|
n.MyChats,
|
|
709
709
|
n.Shared,
|
|
710
710
|
n.Organization
|
|
711
|
-
]), Ue = M(({ conversations: e, isLoading: t, onSelectConversation: i, activeConversationId: o, labels: s, searchQuery: u = "", activeFilter: d = n.All, activeTypeFilter: f =
|
|
712
|
-
let { colors: x, typography: S, itemIconBadgeClassName: C } = v ?? {}, { emptyLabel: w,
|
|
713
|
-
|
|
714
|
-
}, []),
|
|
715
|
-
|
|
711
|
+
]), Ue = M(({ conversations: e, isLoading: t, onSelectConversation: i, activeConversationId: o, labels: s, searchQuery: u = "", activeFilter: d = n.All, activeTypeFilter: f = Z.All, hiddenSources: p, rowVariant: m, getActions: h, onActionMenuOpen: g, onMoveConversation: _, styles: v, id: y, className: b }) => {
|
|
712
|
+
let { colors: x, typography: S, itemIconBadgeClassName: C } = v ?? {}, { emptyLabel: w, emptyDescription: T, noResultsLabel: E, noResultsDescription: O, loadingLabel: k = "Loading conversations", groupLabels: A, actionsLabel: j, unreadIndicatorLabel: M } = s, I = R(() => p?.length ? e.filter((e) => e.source == null || !p.includes(e.source)) : e, [e, p]), [L, ee] = B(() => He), [te, ne] = B(5), U = F(), re = z(null), ie = z(null), [ae, W] = B(null), [oe, G] = B(null), [se, K] = B(null), q = z(null), le = z(null), ue = N(({ height: e }) => {
|
|
713
|
+
ne(Ne(e));
|
|
714
|
+
}, []), de = N((e) => {
|
|
715
|
+
ee((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 = Ie(e, Fe(t, e),
|
|
723
|
-
|
|
724
|
-
}, [
|
|
725
|
-
|
|
726
|
-
}, [
|
|
727
|
-
|
|
728
|
-
}, []),
|
|
729
|
-
|
|
730
|
-
}, []),
|
|
731
|
-
let r =
|
|
732
|
-
|
|
719
|
+
}, []), fe = N(() => {
|
|
720
|
+
q.current = null, le.current = null, W(null), G(null), K(null);
|
|
721
|
+
}, []), pe = N((e, t) => {
|
|
722
|
+
let n = Ie(e, Fe(t, e), I);
|
|
723
|
+
q.current = e, le.current = n, W(e), K(n);
|
|
724
|
+
}, [I]), J = N(() => {
|
|
725
|
+
fe();
|
|
726
|
+
}, [fe]), me = N((e) => {
|
|
727
|
+
G(e);
|
|
728
|
+
}, []), he = N(() => {
|
|
729
|
+
G(null);
|
|
730
|
+
}, []), ge = N((e, t, n) => {
|
|
731
|
+
let r = q.current, i = le.current;
|
|
732
|
+
fe(), r != null && r !== e && i?.has(t) && _?.({
|
|
733
733
|
draggedId: r,
|
|
734
734
|
targetGroupKey: t,
|
|
735
735
|
afterId: n
|
|
736
736
|
});
|
|
737
|
-
}, [
|
|
737
|
+
}, [fe, _]), _e = r({
|
|
738
738
|
"--cp-item-hover": x?.itemHover,
|
|
739
739
|
"--cp-item-active": x?.itemActive,
|
|
740
740
|
"--cp-text": x?.text,
|
|
@@ -747,129 +747,129 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
747
747
|
"--cp-unread-dot": x?.unreadDot,
|
|
748
748
|
"--cp-indicator-dot": x?.indicatorDot,
|
|
749
749
|
"--cp-list-font-family": S?.fontFamily
|
|
750
|
-
}),
|
|
751
|
-
|
|
750
|
+
}), Y = R(() => I.filter((e) => Ee(e, d) && De(e, f) && Oe(e, u)), [
|
|
751
|
+
I,
|
|
752
752
|
d,
|
|
753
753
|
f,
|
|
754
754
|
u
|
|
755
|
-
]),
|
|
755
|
+
]), ve = R(() => Y.filter((e) => e.isPinned), [Y]), ye = R(() => Y.filter((e) => !e.isPinned && e.source !== n.Shared && e.source !== n.Organization), [Y]), be = R(() => Y.filter((e) => !e.isPinned && e.source === n.Shared), [Y]), xe = R(() => Y.filter((e) => !e.isPinned && e.source === n.Organization), [Y]), Se = R(() => [
|
|
756
756
|
{
|
|
757
757
|
key: n.Pinned,
|
|
758
|
-
label:
|
|
759
|
-
items:
|
|
758
|
+
label: A?.pinned ?? "Pinned",
|
|
759
|
+
items: ve
|
|
760
760
|
},
|
|
761
761
|
{
|
|
762
762
|
key: n.MyChats,
|
|
763
|
-
label:
|
|
764
|
-
items:
|
|
763
|
+
label: A?.myChats ?? "My chats",
|
|
764
|
+
items: ye
|
|
765
765
|
},
|
|
766
766
|
{
|
|
767
767
|
key: n.Shared,
|
|
768
|
-
label:
|
|
769
|
-
items:
|
|
768
|
+
label: A?.shared ?? "Shared",
|
|
769
|
+
items: be
|
|
770
770
|
},
|
|
771
771
|
{
|
|
772
772
|
key: n.Organization,
|
|
773
|
-
label:
|
|
774
|
-
items:
|
|
773
|
+
label: A?.organization ?? "Organization",
|
|
774
|
+
items: xe
|
|
775
775
|
}
|
|
776
776
|
], [
|
|
777
|
-
|
|
778
|
-
_e,
|
|
777
|
+
A,
|
|
779
778
|
ve,
|
|
780
779
|
ye,
|
|
781
|
-
be
|
|
782
|
-
|
|
780
|
+
be,
|
|
781
|
+
xe
|
|
782
|
+
]), X = R(() => {
|
|
783
783
|
let e = [];
|
|
784
|
-
for (let t of
|
|
785
|
-
kind:
|
|
784
|
+
for (let t of Se) if (t.items.length !== 0 && (e.push({
|
|
785
|
+
kind: Te.Header,
|
|
786
786
|
groupKey: t.key,
|
|
787
787
|
label: t.label
|
|
788
|
-
}),
|
|
789
|
-
kind:
|
|
788
|
+
}), L.has(t.key))) for (let n of t.items) e.push({
|
|
789
|
+
kind: Te.Item,
|
|
790
790
|
item: n,
|
|
791
791
|
groupKey: t.key
|
|
792
792
|
});
|
|
793
793
|
return e;
|
|
794
|
-
}, [
|
|
794
|
+
}, [Se, L]);
|
|
795
795
|
P(() => {
|
|
796
|
-
if (!o ||
|
|
797
|
-
let e =
|
|
798
|
-
e >= 0 && (
|
|
796
|
+
if (!o || ie.current === o) return;
|
|
797
|
+
let e = X.findIndex((e) => e.kind === Te.Item && e.item.id === o);
|
|
798
|
+
e >= 0 && (re.current?.scrollToRow({
|
|
799
799
|
index: e,
|
|
800
800
|
align: "smart",
|
|
801
801
|
behavior: "smooth"
|
|
802
|
-
}),
|
|
802
|
+
}), ie.current = o);
|
|
803
803
|
}, [
|
|
804
804
|
o,
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
805
|
+
Se,
|
|
806
|
+
L,
|
|
807
|
+
X
|
|
808
808
|
]);
|
|
809
|
-
let
|
|
809
|
+
let Ce = z(X);
|
|
810
810
|
P(() => {
|
|
811
|
-
|
|
812
|
-
}, [
|
|
813
|
-
let
|
|
814
|
-
rows:
|
|
815
|
-
expandedGroups:
|
|
816
|
-
onToggleGroup:
|
|
817
|
-
listId:
|
|
811
|
+
Ce.current = X;
|
|
812
|
+
}, [X]);
|
|
813
|
+
let Ae = N((e) => pe(e, Ce.current), [pe]), Me = R(() => ({
|
|
814
|
+
rows: X,
|
|
815
|
+
expandedGroups: L,
|
|
816
|
+
onToggleGroup: de,
|
|
817
|
+
listId: U,
|
|
818
818
|
activeConversationId: o,
|
|
819
819
|
searchQuery: u,
|
|
820
820
|
onSelectConversation: i,
|
|
821
821
|
getActions: h,
|
|
822
822
|
onActionMenuOpen: g,
|
|
823
|
-
actionsLabel:
|
|
824
|
-
unreadIndicatorLabel:
|
|
823
|
+
actionsLabel: j,
|
|
824
|
+
unreadIndicatorLabel: M,
|
|
825
825
|
rowVariant: m,
|
|
826
826
|
styles: {
|
|
827
827
|
groupHeaderClassName: S?.groupHeaderClassName,
|
|
828
828
|
itemTitleClassName: S?.itemTitleClassName,
|
|
829
829
|
itemIconBadgeClassName: C
|
|
830
830
|
},
|
|
831
|
-
draggingId:
|
|
832
|
-
dragOverId:
|
|
833
|
-
allowedDropGroups:
|
|
834
|
-
onDragStart:
|
|
835
|
-
onDragEnd:
|
|
831
|
+
draggingId: ae,
|
|
832
|
+
dragOverId: oe,
|
|
833
|
+
allowedDropGroups: se,
|
|
834
|
+
onDragStart: Ae,
|
|
835
|
+
onDragEnd: J,
|
|
836
836
|
onDragOver: me,
|
|
837
|
-
onDragLeave:
|
|
838
|
-
onDrop:
|
|
837
|
+
onDragLeave: he,
|
|
838
|
+
onDrop: ge
|
|
839
839
|
}), [
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
840
|
+
X,
|
|
841
|
+
L,
|
|
842
|
+
de,
|
|
843
|
+
U,
|
|
844
844
|
o,
|
|
845
845
|
u,
|
|
846
846
|
i,
|
|
847
847
|
h,
|
|
848
848
|
g,
|
|
849
|
-
|
|
850
|
-
|
|
849
|
+
j,
|
|
850
|
+
M,
|
|
851
851
|
m,
|
|
852
852
|
S?.groupHeaderClassName,
|
|
853
853
|
S?.itemTitleClassName,
|
|
854
854
|
C,
|
|
855
|
-
re,
|
|
856
855
|
ae,
|
|
857
856
|
oe,
|
|
858
|
-
|
|
859
|
-
|
|
857
|
+
se,
|
|
858
|
+
Ae,
|
|
859
|
+
J,
|
|
860
860
|
me,
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
]),
|
|
861
|
+
he,
|
|
862
|
+
ge
|
|
863
|
+
]), Pe = I.length === 0, Le = I.length > 0 && Y.length === 0;
|
|
864
864
|
return /* @__PURE__ */ H("div", {
|
|
865
865
|
id: y,
|
|
866
|
-
style:
|
|
867
|
-
className: a("flex-1 overflow-hidden px-3", $.list, S?.fontClassName, m !==
|
|
866
|
+
style: _e,
|
|
867
|
+
className: a("flex-1 overflow-hidden px-3", $.list, S?.fontClassName, m !== Q.Indicator && "py-1", b, ce.list),
|
|
868
868
|
children: [/* @__PURE__ */ V("span", {
|
|
869
869
|
role: "status",
|
|
870
870
|
"aria-live": "polite",
|
|
871
871
|
className: "sr-only",
|
|
872
|
-
children: t ?
|
|
872
|
+
children: t ? k : Pe ? w : Le ? E : ""
|
|
873
873
|
}), t ? /* @__PURE__ */ V("div", {
|
|
874
874
|
className: "flex flex-col gap-3 px-2 py-3",
|
|
875
875
|
children: Array.from({ length: 15 }, (e, t) => /* @__PURE__ */ V(D, {
|
|
@@ -879,17 +879,23 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
879
879
|
active: !0,
|
|
880
880
|
color: $.skeletonColor
|
|
881
881
|
}, t))
|
|
882
|
-
}) :
|
|
883
|
-
|
|
884
|
-
|
|
882
|
+
}) : Pe ? /* @__PURE__ */ V(c, {
|
|
883
|
+
label: w,
|
|
884
|
+
description: T
|
|
885
|
+
}) : Le ? /* @__PURE__ */ V(l, {
|
|
886
|
+
label: E,
|
|
887
|
+
description: O
|
|
888
|
+
}) : /* @__PURE__ */ V(we, {
|
|
889
|
+
listRef: re,
|
|
890
|
+
id: U,
|
|
885
891
|
role: "list",
|
|
886
892
|
style: { height: "100%" },
|
|
887
893
|
rowComponent: Ve,
|
|
888
|
-
rowCount:
|
|
894
|
+
rowCount: X.length,
|
|
889
895
|
rowHeight: je,
|
|
890
|
-
overscanCount:
|
|
891
|
-
onResize:
|
|
892
|
-
rowProps:
|
|
896
|
+
overscanCount: te,
|
|
897
|
+
onResize: ue,
|
|
898
|
+
rowProps: Me
|
|
893
899
|
})]
|
|
894
900
|
});
|
|
895
901
|
}), We = { title: "_title_ewicn_2" }, Ge = "!size-6 !min-h-0 !min-w-0 !p-1", Ke = [
|
|
@@ -911,18 +917,18 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
911
917
|
}
|
|
912
918
|
], qe = [
|
|
913
919
|
{
|
|
914
|
-
value:
|
|
920
|
+
value: Z.All,
|
|
915
921
|
getLabel: (e) => e.all
|
|
916
922
|
},
|
|
917
923
|
{
|
|
918
|
-
value:
|
|
924
|
+
value: Z.Chat,
|
|
919
925
|
getLabel: (e) => e.chat ?? "Chat"
|
|
920
926
|
},
|
|
921
927
|
{
|
|
922
|
-
value:
|
|
928
|
+
value: Z.Task,
|
|
923
929
|
getLabel: (e) => e.task ?? "Task"
|
|
924
930
|
}
|
|
925
|
-
], 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 =
|
|
931
|
+
], 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 = Z.All, onTypeFilterChange: v, hiddenSources: y, actions: x, styles: S, className: w }) => {
|
|
926
932
|
let T = S?.typography?.titleClassName ?? "dial-tiny-lead-semi-text", D = S?.typography?.searchTextClassName ?? "dial-tiny-text", O = z(null), k = z(null), A = z(c), j = e.filterLabels.groupAriaLabel ?? "Filter chats", M = l != null && u != null;
|
|
927
933
|
P(() => {
|
|
928
934
|
c ? k.current?.focus() : A.current && O.current?.focus(), A.current = c;
|
|
@@ -1073,7 +1079,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1073
1079
|
})]
|
|
1074
1080
|
});
|
|
1075
1081
|
}), Ye = M(({ conversations: e, isLoading: t, onSelectConversation: r, activeConversationId: i, labels: o, requestedFilter: s, isFilterHidden: c = !1, onFilterChange: l, isTypeFilterHidden: u = !1, onTypeFilterChange: d, hiddenSources: f, headerActions: p, getActions: m, onActionMenuOpen: h, onMoveConversation: g, styles: _, listClassName: v, className: y }) => {
|
|
1076
|
-
let b = F(), [x, S] = B(""), [C, w] = B(!1), [T, E] = B(!0), [D, O] = B(n.All), [k, A] = B(
|
|
1082
|
+
let b = F(), [x, S] = B(""), [C, w] = B(!1), [T, E] = B(!0), [D, O] = B(n.All), [k, A] = B(Z.All);
|
|
1077
1083
|
P(() => {
|
|
1078
1084
|
s != null && O(s);
|
|
1079
1085
|
}, [s]);
|
|
@@ -1123,7 +1129,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1123
1129
|
activeFilter: D,
|
|
1124
1130
|
activeTypeFilter: k,
|
|
1125
1131
|
hiddenSources: f,
|
|
1126
|
-
rowVariant:
|
|
1132
|
+
rowVariant: Q.Indicator,
|
|
1127
1133
|
getActions: m,
|
|
1128
1134
|
onActionMenuOpen: h,
|
|
1129
1135
|
onMoveConversation: g,
|
|
@@ -1186,32 +1192,36 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1186
1192
|
})
|
|
1187
1193
|
});
|
|
1188
1194
|
}), et = M(({ conversations: e, isLoading: t, isOpen: i, onSelectConversation: o, activeConversationId: s, labels: c, onNewChat: l, styles: f, className: p, isOverlay: m = !1, getActions: h, onActionMenuOpen: g, onToggle: _, headerActions: v, onMoveConversation: y, activeFilter: b, onActiveFilterChange: x, isFilterTabsHidden: S = !1, hiddenSources: C }) => {
|
|
1189
|
-
let { colors: w, typography: T, newChatButton: D, searchWrapperClassName: O, headerClassName: k, headerActionsClassName: A, newChatButtonClassName: j } = f ?? {}, { title: M, emptyLabel: F,
|
|
1195
|
+
let { colors: w, typography: T, newChatButton: D, searchWrapperClassName: O, headerClassName: k, headerActionsClassName: A, newChatButtonClassName: j } = f ?? {}, { title: M, emptyLabel: F, emptyDescription: I, noResultsLabel: L, noResultsDescription: z, loadingLabel: ee, newChatLabel: te, searchPlaceholder: ne, searchClearLabel: U, filterLabels: re, groupLabels: ie, actionsLabel: ae, unreadIndicatorLabel: W, closeAriaLabel: oe } = c, [G, se] = B(""), [K, q] = B(n.All);
|
|
1190
1196
|
P(() => {
|
|
1191
|
-
b != null &&
|
|
1197
|
+
b != null && q(b);
|
|
1192
1198
|
}, [b]);
|
|
1193
|
-
let
|
|
1194
|
-
|
|
1195
|
-
}, []),
|
|
1199
|
+
let le = N((e) => {
|
|
1200
|
+
se(e ?? "");
|
|
1201
|
+
}, []), ue = r({
|
|
1196
1202
|
"--cp-text": w?.text,
|
|
1197
1203
|
"--cp-new-chat-bg": D?.background,
|
|
1198
1204
|
"--cp-new-chat-text": D?.text,
|
|
1199
1205
|
"--cp-new-chat-focus-outline": D?.focusOutline
|
|
1200
|
-
}),
|
|
1206
|
+
}), de = R(() => ({
|
|
1201
1207
|
emptyLabel: F,
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1208
|
+
emptyDescription: I,
|
|
1209
|
+
noResultsLabel: L,
|
|
1210
|
+
noResultsDescription: z,
|
|
1211
|
+
loadingLabel: ee,
|
|
1212
|
+
groupLabels: ie,
|
|
1213
|
+
actionsLabel: ae,
|
|
1214
|
+
unreadIndicatorLabel: W
|
|
1207
1215
|
}), [
|
|
1208
1216
|
F,
|
|
1209
1217
|
I,
|
|
1210
1218
|
L,
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
ie
|
|
1214
|
-
|
|
1219
|
+
z,
|
|
1220
|
+
ee,
|
|
1221
|
+
ie,
|
|
1222
|
+
ae,
|
|
1223
|
+
W
|
|
1224
|
+
]), fe = R(() => ({
|
|
1215
1225
|
colors: w,
|
|
1216
1226
|
typography: {
|
|
1217
1227
|
fontFamily: T?.fontFamily,
|
|
@@ -1233,7 +1243,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1233
1243
|
title: M,
|
|
1234
1244
|
labels: {
|
|
1235
1245
|
ariaLabel: M,
|
|
1236
|
-
closeLabel:
|
|
1246
|
+
closeLabel: oe
|
|
1237
1247
|
},
|
|
1238
1248
|
onClose: _,
|
|
1239
1249
|
styles: {
|
|
@@ -1243,7 +1253,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1243
1253
|
},
|
|
1244
1254
|
typography: { fontClassName: T?.fontClassName },
|
|
1245
1255
|
bodyClassName: "flex flex-col overflow-hidden p-0 gap-3",
|
|
1246
|
-
cssVars:
|
|
1256
|
+
cssVars: ue,
|
|
1247
1257
|
titleClassName: T?.fontClassName,
|
|
1248
1258
|
headerClassName: a("h-[64px]", k),
|
|
1249
1259
|
headerActionsClassName: A,
|
|
@@ -1252,7 +1262,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1252
1262
|
rightActions: v,
|
|
1253
1263
|
children: [
|
|
1254
1264
|
/* @__PURE__ */ V($e, {
|
|
1255
|
-
label:
|
|
1265
|
+
label: te,
|
|
1256
1266
|
onClick: l,
|
|
1257
1267
|
labelClassName: T?.newChatLabelClassName,
|
|
1258
1268
|
colors: D,
|
|
@@ -1263,18 +1273,18 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1263
1273
|
className: a("px-3 py-2", ce.search),
|
|
1264
1274
|
children: /* @__PURE__ */ V(E, {
|
|
1265
1275
|
wrapperClassName: a($.search, O),
|
|
1266
|
-
value:
|
|
1267
|
-
onChange:
|
|
1268
|
-
placeholder:
|
|
1269
|
-
clearLabel:
|
|
1270
|
-
"aria-label":
|
|
1276
|
+
value: G,
|
|
1277
|
+
onChange: le,
|
|
1278
|
+
placeholder: ne,
|
|
1279
|
+
clearLabel: U,
|
|
1280
|
+
"aria-label": ne
|
|
1271
1281
|
})
|
|
1272
1282
|
}),
|
|
1273
1283
|
!S && /* @__PURE__ */ V(Ze, {
|
|
1274
|
-
activeTab:
|
|
1275
|
-
labels:
|
|
1284
|
+
activeTab: K,
|
|
1285
|
+
labels: re,
|
|
1276
1286
|
onChange: (e) => {
|
|
1277
|
-
|
|
1287
|
+
q(e), x?.(e);
|
|
1278
1288
|
},
|
|
1279
1289
|
tabClassName: T?.tabClassName,
|
|
1280
1290
|
hiddenSources: C
|
|
@@ -1284,14 +1294,14 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1284
1294
|
isLoading: t,
|
|
1285
1295
|
onSelectConversation: o,
|
|
1286
1296
|
activeConversationId: s,
|
|
1287
|
-
labels:
|
|
1288
|
-
searchQuery:
|
|
1289
|
-
activeFilter:
|
|
1297
|
+
labels: de,
|
|
1298
|
+
searchQuery: G,
|
|
1299
|
+
activeFilter: K,
|
|
1290
1300
|
hiddenSources: C,
|
|
1291
1301
|
getActions: h,
|
|
1292
1302
|
onActionMenuOpen: g,
|
|
1293
1303
|
onMoveConversation: y,
|
|
1294
|
-
styles:
|
|
1304
|
+
styles: fe
|
|
1295
1305
|
})
|
|
1296
1306
|
]
|
|
1297
1307
|
});
|
|
@@ -1336,8 +1346,8 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1336
1346
|
_,
|
|
1337
1347
|
l,
|
|
1338
1348
|
u.renameWithAiError
|
|
1339
|
-
]), L;
|
|
1340
|
-
return
|
|
1349
|
+
]), L = y ?? r ?? void 0, R;
|
|
1350
|
+
return R = A ? u.nameTooLongError : L, /* @__PURE__ */ V(w, {
|
|
1341
1351
|
open: e,
|
|
1342
1352
|
header: u.popupTitle,
|
|
1343
1353
|
size: T.Sm,
|
|
@@ -1359,36 +1369,44 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1359
1369
|
children: /* @__PURE__ */ V(k, { size: 50 })
|
|
1360
1370
|
}) : /* @__PURE__ */ H("div", {
|
|
1361
1371
|
className: "flex items-start gap-2 px-6 py-3",
|
|
1362
|
-
children: [
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
"aria-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
"
|
|
1372
|
+
children: [
|
|
1373
|
+
/* @__PURE__ */ V("span", {
|
|
1374
|
+
role: "alert",
|
|
1375
|
+
className: "sr-only",
|
|
1376
|
+
children: A ? "" : L ?? ""
|
|
1377
|
+
}),
|
|
1378
|
+
/* @__PURE__ */ V("div", {
|
|
1379
|
+
className: "min-w-0 flex-1",
|
|
1380
|
+
children: /* @__PURE__ */ V(S, {
|
|
1381
|
+
inputRef: C,
|
|
1382
|
+
value: f,
|
|
1383
|
+
placeholder: u.inputPlaceholder,
|
|
1384
|
+
error: R,
|
|
1385
|
+
onChange: (e) => g(o(e ?? "")),
|
|
1386
|
+
onKeyDown: F
|
|
1387
|
+
})
|
|
1388
|
+
}),
|
|
1389
|
+
/* @__PURE__ */ V(b, {
|
|
1390
|
+
"aria-label": u.renameWithAiLabel,
|
|
1391
|
+
tooltipProps: { tooltip: u.renameWithAiLabel },
|
|
1392
|
+
disabled: _ || n,
|
|
1393
|
+
"aria-busy": _,
|
|
1394
|
+
onClick: I,
|
|
1395
|
+
icon: _ ? /* @__PURE__ */ V("span", {
|
|
1396
|
+
className: "flex",
|
|
1397
|
+
"aria-hidden": !0,
|
|
1398
|
+
children: /* @__PURE__ */ V(k, { size: m.MD })
|
|
1399
|
+
}) : /* @__PURE__ */ V(G, {
|
|
1400
|
+
size: m.MD,
|
|
1401
|
+
stroke: h,
|
|
1402
|
+
"aria-hidden": !0
|
|
1403
|
+
})
|
|
1386
1404
|
})
|
|
1387
|
-
|
|
1405
|
+
]
|
|
1388
1406
|
})
|
|
1389
1407
|
})
|
|
1390
1408
|
});
|
|
1391
1409
|
});
|
|
1392
1410
|
tt.displayName = "RenameConversationPopup";
|
|
1393
1411
|
//#endregion
|
|
1394
|
-
export { ce as CONVERSATION_PANEL_CLASS, Ue as ConversationList, Je as ConversationListHeader, Ye as ConversationListSection, et as ConversationPanel,
|
|
1412
|
+
export { ce as CONVERSATION_PANEL_CLASS, Ue as ConversationList, Je as ConversationListHeader, Ye as ConversationListSection, et as ConversationPanel, Q as ConversationRowVariant, Z as ConversationTypeFilter, tt as RenameConversationPopup };
|
|
@@ -52,8 +52,12 @@ export interface ConversationListStyles {
|
|
|
52
52
|
export interface ConversationListLabels {
|
|
53
53
|
/** Message shown when `conversations` is empty. */
|
|
54
54
|
emptyLabel: string;
|
|
55
|
+
/** Secondary line under `emptyLabel`, e.g. what will fill the list. Omitted when not set. */
|
|
56
|
+
emptyDescription?: string;
|
|
55
57
|
/** Message shown when conversations exist but none match the filter and search. */
|
|
56
58
|
noResultsLabel: string;
|
|
59
|
+
/** Secondary line under `noResultsLabel`, e.g. how to widen the search. Omitted when not set. */
|
|
60
|
+
noResultsDescription?: string;
|
|
57
61
|
/** Status message announced to assistive tech while conversations are loading. Defaults to `'Loading conversations'`. */
|
|
58
62
|
loadingLabel?: string;
|
|
59
63
|
/** Labels for collapsible group section headings. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-list.d.ts","sourceRoot":"","sources":["../../src/models/conversation-list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAExE,4EAA4E;AAC5E,MAAM,WAAW,sBAAsB;IACrC,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0BAA0B;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+EAA+E;IAC/E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iEAAiE;IACjE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iEAAiE;IACjE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sEAAsE;IACtE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oDAAoD;IACpD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gKAAgK;IAChK,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,sDAAsD;AACtD,MAAM,WAAW,0BAA0B;IACzC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AC;IACV,2DAA2D;IAC3D,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACtD,qEAAqE;IACrE,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC,0EAA0E;IAC1E,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-conversation-panel",
|
|
3
3
|
"description": "Virtualized sidebar panel for browsing conversation history with grouping, tabs, and search",
|
|
4
|
-
"version": "1.3.0-dev.
|
|
4
|
+
"version": "1.3.0-dev.160",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"react-window": "^2.2.7",
|
|
21
21
|
"@tabler/icons-react": "^3.44.0",
|
|
22
|
-
"@epam/ai-dial-sidebar": "1.3.0-dev.
|
|
22
|
+
"@epam/ai-dial-sidebar": "1.3.0-dev.160"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": "^19.2.8",
|
|
26
|
-
"@epam/ai-dial-chat-shared": "1.3.0-dev.
|
|
27
|
-
"@epam/ai-dial-ui-kit": "^0.16.0-dev.
|
|
26
|
+
"@epam/ai-dial-chat-shared": "1.3.0-dev.160",
|
|
27
|
+
"@epam/ai-dial-ui-kit": "^0.16.0-dev.33"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|
|
30
30
|
"type": "git",
|