@epam/ai-dial-conversation-panel 1.1.0-dev.44 → 1.1.0-dev.49
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/ConversationGroup/ConversationGroup.d.ts +1 -5
- package/components/ConversationGroup/ConversationGroup.d.ts.map +1 -1
- package/components/ConversationGroup/ConversationRow.d.ts +2 -9
- package/components/ConversationGroup/ConversationRow.d.ts.map +1 -1
- package/components/ConversationGroupHeader/ConversationGroupHeader.d.ts +1 -4
- package/components/ConversationGroupHeader/ConversationGroupHeader.d.ts.map +1 -1
- package/components/ConversationPanel/ConversationPanel.d.ts.map +1 -1
- package/components/NewChatButton/NewChatButton.d.ts +4 -1
- package/components/NewChatButton/NewChatButton.d.ts.map +1 -1
- package/index.css +1 -1
- package/index.d.ts +1 -1
- package/index.d.ts.map +1 -1
- package/index.js +247 -229
- package/models/panel-props.d.ts +38 -66
- package/models/panel-props.d.ts.map +1 -1
- package/models/virtual-row.d.ts +1 -6
- package/models/virtual-row.d.ts.map +1 -1
- package/package.json +4 -4
- package/types/conversation-classification.d.ts +1 -4
- package/types/conversation-classification.d.ts.map +1 -1
- package/utils/conversation-row.d.ts +1 -7
- package/utils/conversation-row.d.ts.map +1 -1
- package/utils/drag.d.ts +2 -14
- package/utils/drag.d.ts.map +1 -1
package/index.js
CHANGED
|
@@ -60,7 +60,7 @@ function ee(e) {
|
|
|
60
60
|
}, [e]), S((e) => t.current?.(e), [t]);
|
|
61
61
|
}
|
|
62
62
|
var z = null;
|
|
63
|
-
function
|
|
63
|
+
function B(e = !1) {
|
|
64
64
|
if (z === null || e) {
|
|
65
65
|
let e = document.createElement("div"), t = e.style;
|
|
66
66
|
t.width = "50px", t.height = "50px", t.overflow = "scroll", t.direction = "rtl";
|
|
@@ -69,8 +69,8 @@ function te(e = !1) {
|
|
|
69
69
|
}
|
|
70
70
|
return z;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
if (t === "horizontal" && n) switch (
|
|
72
|
+
function V({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
|
|
73
|
+
if (t === "horizontal" && n) switch (B()) {
|
|
74
74
|
case "negative": return -r;
|
|
75
75
|
case "positive-descending":
|
|
76
76
|
if (e) {
|
|
@@ -81,26 +81,26 @@ function B({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
|
|
|
81
81
|
}
|
|
82
82
|
return r;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function H(e, t = "Assertion error") {
|
|
85
85
|
if (!e) throw console.error(t), Error(t);
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function U(e, t) {
|
|
88
88
|
if (e === t) return !0;
|
|
89
|
-
if (!!e != !!t || (
|
|
89
|
+
if (!!e != !!t || (H(e !== void 0), H(t !== void 0), Object.keys(e).length !== Object.keys(t).length)) return !1;
|
|
90
90
|
for (let n in e) if (!Object.is(t[n], e[n])) return !1;
|
|
91
91
|
return !0;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function te({ cachedBounds: e, itemCount: t, itemSize: n }) {
|
|
94
94
|
if (t === 0) return 0;
|
|
95
95
|
if (typeof n == "number") return t * n;
|
|
96
96
|
{
|
|
97
97
|
let n = e.get(e.size === 0 ? 0 : e.size - 1);
|
|
98
|
-
return
|
|
98
|
+
return H(n !== void 0, "Unexpected bounds cache miss"), t * ((n.scrollOffset + n.size) / e.size);
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function W({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, containerScrollOffset: a, containerSize: o }) {
|
|
102
102
|
if (n < 0 || n >= r) throw RangeError(`Invalid index specified: ${n}`, { cause: `Index ${n} is not within the range of 0 - ${r - 1}` });
|
|
103
|
-
let s =
|
|
103
|
+
let s = te({
|
|
104
104
|
cachedBounds: t,
|
|
105
105
|
itemCount: r,
|
|
106
106
|
itemSize: i
|
|
@@ -112,7 +112,7 @@ function ne({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, co
|
|
|
112
112
|
default: return a >= u && a <= l ? a : a < u ? u : l;
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function G({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemCount: r, overscanCount: i }) {
|
|
116
116
|
let a = r - 1, o = 0, s = -1, c = 0, l = -1, u = 0;
|
|
117
117
|
for (; u < a;) {
|
|
118
118
|
let n = e.get(u);
|
|
@@ -131,11 +131,11 @@ function W({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemCo
|
|
|
131
131
|
stopIndexOverscan: l
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function K({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
135
135
|
let r = /* @__PURE__ */ new Map();
|
|
136
136
|
return {
|
|
137
137
|
get(i) {
|
|
138
|
-
for (
|
|
138
|
+
for (H(i < e, `Invalid index ${i}`); r.size - 1 < i;) {
|
|
139
139
|
let e = r.size, a;
|
|
140
140
|
switch (typeof n) {
|
|
141
141
|
case "function":
|
|
@@ -151,14 +151,14 @@ function G({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
|
151
151
|
});
|
|
152
152
|
else {
|
|
153
153
|
let t = r.get(e - 1);
|
|
154
|
-
|
|
154
|
+
H(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 H(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 G({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
return D(() =>
|
|
171
|
+
function q({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
172
|
+
return D(() => K({
|
|
173
173
|
itemCount: e,
|
|
174
174
|
itemProps: t,
|
|
175
175
|
itemSize: n
|
|
@@ -179,11 +179,11 @@ function K({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
|
179
179
|
n
|
|
180
180
|
]);
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function J({ containerSize: e, itemSize: t }) {
|
|
183
183
|
let n;
|
|
184
184
|
switch (typeof t) {
|
|
185
185
|
case "string":
|
|
186
|
-
|
|
186
|
+
H(t.endsWith("%"), `Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`), H(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:
|
|
189
189
|
n = t;
|
|
@@ -191,7 +191,7 @@ function re({ containerSize: e, itemSize: t }) {
|
|
|
191
191
|
}
|
|
192
192
|
return n;
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function ne({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0, direction: r, isRtl: i = !1, itemCount: a, itemProps: o, itemSize: s, onResize: c, overscanCount: l }) {
|
|
195
195
|
let { height: u = n, width: d = n } = R({
|
|
196
196
|
defaultHeight: r === "vertical" ? n : void 0,
|
|
197
197
|
defaultWidth: r === "horizontal" ? n : void 0,
|
|
@@ -201,7 +201,7 @@ function ie({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
201
201
|
}), f = O({
|
|
202
202
|
height: 0,
|
|
203
203
|
width: 0
|
|
204
|
-
}), p = r === "vertical" ? u : d, m =
|
|
204
|
+
}), p = r === "vertical" ? u : d, m = J({
|
|
205
205
|
containerSize: p,
|
|
206
206
|
itemSize: s
|
|
207
207
|
});
|
|
@@ -218,11 +218,11 @@ function ie({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
218
218
|
c,
|
|
219
219
|
d
|
|
220
220
|
]);
|
|
221
|
-
let h =
|
|
221
|
+
let h = q({
|
|
222
222
|
itemCount: a,
|
|
223
223
|
itemProps: o,
|
|
224
224
|
itemSize: m
|
|
225
|
-
}), g = S((e) => h.get(e), [h]), [_, v] = k(() =>
|
|
225
|
+
}), g = S((e) => h.get(e), [h]), [_, v] = k(() => G({
|
|
226
226
|
cachedBounds: h,
|
|
227
227
|
containerScrollOffset: 0,
|
|
228
228
|
containerSize: p,
|
|
@@ -233,7 +233,7 @@ function ie({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
233
233
|
startIndexOverscan: Math.min(a - 1, _.startIndexOverscan),
|
|
234
234
|
stopIndexVisible: Math.min(a - 1, _.stopIndexVisible),
|
|
235
235
|
stopIndexOverscan: Math.min(a - 1, _.stopIndexOverscan)
|
|
236
|
-
}, w = S(() =>
|
|
236
|
+
}, w = S(() => te({
|
|
237
237
|
cachedBounds: h,
|
|
238
238
|
itemCount: a,
|
|
239
239
|
itemSize: m
|
|
@@ -241,9 +241,9 @@ function ie({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
241
241
|
h,
|
|
242
242
|
a,
|
|
243
243
|
m
|
|
244
|
-
]), T = S((t) =>
|
|
244
|
+
]), T = S((t) => G({
|
|
245
245
|
cachedBounds: h,
|
|
246
|
-
containerScrollOffset:
|
|
246
|
+
containerScrollOffset: V({
|
|
247
247
|
containerElement: e,
|
|
248
248
|
direction: r,
|
|
249
249
|
isRtl: i,
|
|
@@ -271,9 +271,9 @@ function ie({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
271
271
|
if (!e) return;
|
|
272
272
|
let t = () => {
|
|
273
273
|
v((t) => {
|
|
274
|
-
let { scrollLeft: n, scrollTop: o } = e, s =
|
|
274
|
+
let { scrollLeft: n, scrollTop: o } = e, s = G({
|
|
275
275
|
cachedBounds: h,
|
|
276
|
-
containerScrollOffset:
|
|
276
|
+
containerScrollOffset: V({
|
|
277
277
|
containerElement: e,
|
|
278
278
|
direction: r,
|
|
279
279
|
isRtl: i,
|
|
@@ -283,7 +283,7 @@ function ie({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
283
283
|
itemCount: a,
|
|
284
284
|
overscanCount: l
|
|
285
285
|
});
|
|
286
|
-
return
|
|
286
|
+
return U(s, t) ? t : s;
|
|
287
287
|
});
|
|
288
288
|
};
|
|
289
289
|
return e.addEventListener("scroll", t), () => {
|
|
@@ -300,7 +300,7 @@ function ie({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
300
300
|
getCellBounds: g,
|
|
301
301
|
getEstimatedSize: w,
|
|
302
302
|
scrollToIndex: ee(({ align: t = "auto", containerScrollOffset: n, index: o }) => {
|
|
303
|
-
let s =
|
|
303
|
+
let s = W({
|
|
304
304
|
align: t,
|
|
305
305
|
cachedBounds: h,
|
|
306
306
|
containerScrollOffset: n,
|
|
@@ -310,14 +310,14 @@ function ie({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
310
310
|
itemSize: m
|
|
311
311
|
});
|
|
312
312
|
if (e) {
|
|
313
|
-
if (s =
|
|
313
|
+
if (s = V({
|
|
314
314
|
containerElement: e,
|
|
315
315
|
direction: r,
|
|
316
316
|
isRtl: i,
|
|
317
317
|
scrollOffset: s
|
|
318
318
|
}), typeof e.scrollTo != "function") {
|
|
319
319
|
let e = T(s);
|
|
320
|
-
|
|
320
|
+
U(_, e) || v(e);
|
|
321
321
|
}
|
|
322
322
|
return s;
|
|
323
323
|
}
|
|
@@ -328,19 +328,19 @@ function ie({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
328
328
|
stopIndexVisible: x
|
|
329
329
|
};
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function re(e) {
|
|
332
332
|
return D(() => e, Object.values(e));
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function ie(e, t) {
|
|
335
335
|
let { ariaAttributes: n, style: r, ...i } = e, { ariaAttributes: a, style: o, ...s } = t;
|
|
336
|
-
return
|
|
336
|
+
return U(n, a) && U(r, o) && U(i, s);
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function ae(e) {
|
|
339
339
|
return typeof e == "object" && !!e && "getAverageRowHeight" in e && typeof e.getAverageRowHeight == "function";
|
|
340
340
|
}
|
|
341
|
-
var
|
|
342
|
-
function
|
|
343
|
-
let m =
|
|
341
|
+
var oe = "data-react-window-index";
|
|
342
|
+
function se({ children: e, className: t, defaultHeight: n = 0, listRef: r, onResize: i, onRowsRendered: a, overscanCount: o = 3, rowComponent: s, rowCount: c, rowHeight: l, rowProps: u, tagName: d = "div", style: f, ...p }) {
|
|
343
|
+
let m = re(u), h = D(() => x(s, ie), [s]), [g, _] = k(null), v = ae(l), { getCellBounds: y, getEstimatedSize: S, scrollToIndex: w, startIndexOverscan: E, startIndexVisible: O, stopIndexOverscan: j, stopIndexVisible: M } = ne({
|
|
344
344
|
containerElement: g,
|
|
345
345
|
containerStyle: f,
|
|
346
346
|
defaultContainerSize: n,
|
|
@@ -371,7 +371,7 @@ function le({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
|
|
|
371
371
|
let e = Array.from(g.children).filter((e, t) => {
|
|
372
372
|
if (e.hasAttribute("aria-hidden")) return !1;
|
|
373
373
|
let n = `${E + t}`;
|
|
374
|
-
return e.setAttribute(
|
|
374
|
+
return e.setAttribute(oe, n), !0;
|
|
375
375
|
});
|
|
376
376
|
if (v) return l.observeRowElements(e);
|
|
377
377
|
}, [
|
|
@@ -450,77 +450,82 @@ function le({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
|
|
|
450
450
|
}
|
|
451
451
|
//#endregion
|
|
452
452
|
//#region src/types/virtual-row.ts
|
|
453
|
-
var
|
|
453
|
+
var Y = /* @__PURE__ */ function(e) {
|
|
454
454
|
return e.Header = "header", e.Item = "item", e;
|
|
455
|
-
}({}),
|
|
455
|
+
}({}), X = /* @__PURE__ */ function(e) {
|
|
456
456
|
return e.All = "all", e.Pinned = "pinned", e.MyChats = "my-chats", e.Shared = "shared", e.Organization = "organization", e;
|
|
457
|
-
}({}),
|
|
457
|
+
}({}), ce = (e) => `${60 + e * 23 % 35}%`, le = (e, t) => e ? t ? "pe-9" : "pe-2 group-hover/conversation:pe-9" : "pe-3", ue = (e, t) => t.rows[e].kind === Y.Item ? 36 : e === 0 ? 24 : 56, de = (e) => {
|
|
458
458
|
switch (e) {
|
|
459
|
-
case
|
|
460
|
-
case
|
|
461
|
-
default: return
|
|
459
|
+
case X.Shared: return X.Shared;
|
|
460
|
+
case X.Organization: return X.Organization;
|
|
461
|
+
default: return X.MyChats;
|
|
462
462
|
}
|
|
463
|
-
},
|
|
463
|
+
}, fe = (e, t) => {
|
|
464
464
|
let n = null;
|
|
465
|
-
for (let r of e) if (r.kind ===
|
|
465
|
+
for (let r of e) if (r.kind === Y.Header) n = r.groupKey;
|
|
466
466
|
else if (r.item.id === t) return n;
|
|
467
467
|
return null;
|
|
468
|
-
},
|
|
468
|
+
}, pe = (e, t, n) => {
|
|
469
469
|
let r = /* @__PURE__ */ new Set();
|
|
470
|
-
if (t != null && r.add(t), t ===
|
|
470
|
+
if (t != null && r.add(t), t === X.Pinned) {
|
|
471
471
|
let t = n.find((t) => t.id === e);
|
|
472
|
-
t && r.add(
|
|
473
|
-
} else r.add(
|
|
472
|
+
t && r.add(de(t.source));
|
|
473
|
+
} else r.add(X.Pinned);
|
|
474
474
|
return r;
|
|
475
|
-
},
|
|
475
|
+
}, me = (e, t, n, r) => {
|
|
476
476
|
let i = e.currentTarget.getBoundingClientRect();
|
|
477
477
|
if (e.clientY >= i.top + i.height / 2) return t;
|
|
478
478
|
let a = null, o = !1;
|
|
479
|
-
for (let e of n) if (e.kind ===
|
|
479
|
+
for (let e of n) if (e.kind === Y.Header) o = e.groupKey === r;
|
|
480
480
|
else if (o) {
|
|
481
481
|
if (e.item.id === t) return a;
|
|
482
482
|
a = e.item.id;
|
|
483
483
|
}
|
|
484
484
|
return null;
|
|
485
|
-
},
|
|
485
|
+
}, he = {
|
|
486
486
|
tabContainer: "_tabContainer_rzv03_1",
|
|
487
487
|
tabActive: "_tabActive_rzv03_13"
|
|
488
|
-
},
|
|
488
|
+
}, ge = x(({ tabs: e, activeTabId: t, onTabChange: n, styles: i }) => {
|
|
489
489
|
let { tabClassName: a = "dial-tiny-semi-text" } = i?.typography ?? {};
|
|
490
490
|
return /* @__PURE__ */ A("div", {
|
|
491
491
|
className: "flex flex-nowrap gap-1",
|
|
492
|
+
role: "tablist",
|
|
492
493
|
children: e.map((e) => {
|
|
493
494
|
let i = t === e.id;
|
|
494
|
-
return /* @__PURE__ */ A(
|
|
495
|
-
|
|
496
|
-
selected: i,
|
|
497
|
-
onClick: () => n(e.id),
|
|
495
|
+
return /* @__PURE__ */ A("div", {
|
|
496
|
+
role: "tab",
|
|
498
497
|
"aria-selected": i,
|
|
499
|
-
className:
|
|
498
|
+
className: "contents",
|
|
499
|
+
children: /* @__PURE__ */ A(_, {
|
|
500
|
+
label: e.label,
|
|
501
|
+
selected: i,
|
|
502
|
+
onClick: () => n(e.id),
|
|
503
|
+
className: r("box-border h-auto shrink-0 justify-center rounded-full p-2 text-center", a, he.tabContainer, i && he.tabActive)
|
|
504
|
+
})
|
|
500
505
|
}, e.id);
|
|
501
506
|
})
|
|
502
507
|
});
|
|
503
|
-
}),
|
|
508
|
+
}), _e = [
|
|
504
509
|
{
|
|
505
|
-
value:
|
|
510
|
+
value: X.All,
|
|
506
511
|
labelKey: "all"
|
|
507
512
|
},
|
|
508
513
|
{
|
|
509
|
-
value:
|
|
514
|
+
value: X.MyChats,
|
|
510
515
|
labelKey: "myChats"
|
|
511
516
|
},
|
|
512
517
|
{
|
|
513
|
-
value:
|
|
518
|
+
value: X.Shared,
|
|
514
519
|
labelKey: "shared"
|
|
515
520
|
},
|
|
516
521
|
{
|
|
517
|
-
value:
|
|
522
|
+
value: X.Organization,
|
|
518
523
|
labelKey: "organization"
|
|
519
524
|
}
|
|
520
|
-
],
|
|
525
|
+
], ve = x(({ activeTab: e, labels: t, onChange: n, tabClassName: r = "dial-tiny-semi-text" }) => /* @__PURE__ */ A("div", {
|
|
521
526
|
className: "mx-3 my-2",
|
|
522
|
-
children: /* @__PURE__ */ A(
|
|
523
|
-
tabs:
|
|
527
|
+
children: /* @__PURE__ */ A(ge, {
|
|
528
|
+
tabs: _e.map(({ value: e, labelKey: n }) => ({
|
|
524
529
|
id: e,
|
|
525
530
|
label: t[n]
|
|
526
531
|
})),
|
|
@@ -528,39 +533,51 @@ var q = /* @__PURE__ */ function(e) {
|
|
|
528
533
|
onTabChange: (e) => n(e),
|
|
529
534
|
styles: { typography: { tabClassName: y(r, "flex-1") } }
|
|
530
535
|
})
|
|
531
|
-
})),
|
|
536
|
+
})), ye = { button: "_button_hbyrw_1" }, be = x(({ label: e, onClick: t, labelClassName: i = "dial-small-semi-text", colors: a }) => /* @__PURE__ */ A("div", {
|
|
532
537
|
className: "px-3 py-2",
|
|
538
|
+
style: n({
|
|
539
|
+
"--cp-new-chat-bg": a?.background,
|
|
540
|
+
"--cp-new-chat-hover": a?.hoverBackground,
|
|
541
|
+
"--cp-new-chat-active": a?.activeBackground,
|
|
542
|
+
"--cp-new-chat-text": a?.text,
|
|
543
|
+
"--cp-new-chat-shadow-blue": a?.shadowBlue,
|
|
544
|
+
"--cp-new-chat-shadow-blue-hover": a?.shadowBlueHover,
|
|
545
|
+
"--cp-new-chat-shadow-blue-active": a?.shadowBlueActive,
|
|
546
|
+
"--cp-new-chat-shadow-purple": a?.shadowPurple,
|
|
547
|
+
"--cp-new-chat-shadow-purple-hover": a?.shadowPurpleHover,
|
|
548
|
+
"--cp-new-chat-shadow-purple-active": a?.shadowPurpleActive
|
|
549
|
+
}),
|
|
533
550
|
children: /* @__PURE__ */ j("button", {
|
|
534
551
|
onClick: t,
|
|
535
552
|
type: "button",
|
|
536
|
-
className: r("flex h-[36px] w-full cursor-pointer items-center justify-center gap-2 rounded-full px-3 py-1",
|
|
553
|
+
className: r("flex h-[36px] w-full cursor-pointer items-center justify-center gap-2 rounded-full px-3 py-1", ye.button),
|
|
537
554
|
children: [/* @__PURE__ */ A(F, {
|
|
538
555
|
size: 18,
|
|
539
556
|
stroke: 2,
|
|
540
557
|
className: "shrink-0"
|
|
541
558
|
}), /* @__PURE__ */ A("span", {
|
|
542
|
-
className:
|
|
559
|
+
className: i,
|
|
543
560
|
children: e
|
|
544
561
|
})]
|
|
545
562
|
})
|
|
546
|
-
})),
|
|
563
|
+
})), Z = {
|
|
547
564
|
skeletonColor: "var(--cp-skeleton-color, var(--bg-layer-4, #d1dbea))",
|
|
548
|
-
header: "
|
|
549
|
-
item: "
|
|
550
|
-
itemActive: "
|
|
551
|
-
groupHeader: "
|
|
552
|
-
dropZoneActive: "
|
|
553
|
-
trigger: "
|
|
554
|
-
triggerActive: "
|
|
555
|
-
triggerIcon: "
|
|
556
|
-
},
|
|
565
|
+
header: "_header_njmps_1",
|
|
566
|
+
item: "_item_njmps_5",
|
|
567
|
+
itemActive: "_itemActive_njmps_11",
|
|
568
|
+
groupHeader: "_groupHeader_njmps_16",
|
|
569
|
+
dropZoneActive: "_dropZoneActive_njmps_21",
|
|
570
|
+
trigger: "_trigger_njmps_29",
|
|
571
|
+
triggerActive: "_triggerActive_njmps_29",
|
|
572
|
+
triggerIcon: "_triggerIcon_njmps_32"
|
|
573
|
+
}, xe = ({ item: n, isActive: i, onSelectConversation: a, searchQuery: o = "", getActions: s, onActionMenuOpen: c, actionsLabel: p = "More actions", itemTitleClassName: _ = "dial-small-text", itemIconBadgeClassName: y, rowGroupKey: b, rows: x, draggingId: C, dragOverId: w, allowedDropGroups: T, onDragStart: E, onDragEnd: D, onDragOver: M, onDragLeave: N, onDrop: F }) => {
|
|
557
574
|
let [I, L] = k(!1), R = O(null), ee = S((e) => {
|
|
558
575
|
L(e), e && R.current && c?.(n, R.current);
|
|
559
|
-
}, [n, c]), z = s?.(n) ?? [],
|
|
576
|
+
}, [n, c]), z = s?.(n) ?? [], B = z.length > 0, V = n.isIconLoading ? /* @__PURE__ */ A(h, {
|
|
560
577
|
variant: g.Circular,
|
|
561
578
|
width: u.LG,
|
|
562
579
|
height: u.LG,
|
|
563
|
-
color:
|
|
580
|
+
color: Z.skeletonColor,
|
|
564
581
|
"aria-hidden": !0
|
|
565
582
|
}) : /* @__PURE__ */ A(e, {
|
|
566
583
|
src: n.iconUrl,
|
|
@@ -568,29 +585,29 @@ var q = /* @__PURE__ */ function(e) {
|
|
|
568
585
|
initialsName: n.iconTooltip ?? "",
|
|
569
586
|
labels: { tooltip: n.iconTooltip },
|
|
570
587
|
styles: { badgeClassName: y }
|
|
571
|
-
}),
|
|
588
|
+
}), H = le(B, I), U = b != null, te = S((e) => {
|
|
572
589
|
e.currentTarget.contains(e.relatedTarget) || N?.();
|
|
573
|
-
}, [N]),
|
|
590
|
+
}, [N]), W = S((e) => {
|
|
574
591
|
if (!b || !x || !F) return;
|
|
575
592
|
e.preventDefault();
|
|
576
|
-
let t =
|
|
593
|
+
let t = me(e, n.id, x, b);
|
|
577
594
|
F(n.id, b, t);
|
|
578
595
|
}, [
|
|
579
596
|
n.id,
|
|
580
597
|
x,
|
|
581
598
|
b,
|
|
582
599
|
F
|
|
583
|
-
]),
|
|
600
|
+
]), G = n.id === C, K = n.id === w, q = b != null && (T?.has(b) ?? !1), J = C != null;
|
|
584
601
|
return /* @__PURE__ */ j("li", {
|
|
585
|
-
className: r("group/conversation relative",
|
|
586
|
-
draggable:
|
|
587
|
-
onDragStart:
|
|
588
|
-
onDragEnd:
|
|
589
|
-
onDragOver:
|
|
602
|
+
className: r("group/conversation relative", G && "cursor-grabbing opacity-50", K && q && "rounded", K && q && Z.dropZoneActive, J && !G && !q && "cursor-not-allowed"),
|
|
603
|
+
draggable: U || void 0,
|
|
604
|
+
onDragStart: U ? () => E?.(n.id) : void 0,
|
|
605
|
+
onDragEnd: U ? D : void 0,
|
|
606
|
+
onDragOver: U ? (e) => {
|
|
590
607
|
e.preventDefault(), M?.(n.id);
|
|
591
608
|
} : void 0,
|
|
592
|
-
onDragLeave:
|
|
593
|
-
onDrop:
|
|
609
|
+
onDragLeave: U ? te : void 0,
|
|
610
|
+
onDrop: U ? W : void 0,
|
|
594
611
|
children: [/* @__PURE__ */ A("a", {
|
|
595
612
|
href: n.href,
|
|
596
613
|
className: "contents",
|
|
@@ -598,7 +615,7 @@ var q = /* @__PURE__ */ function(e) {
|
|
|
598
615
|
n.href && (e.preventDefault(), a(n.id));
|
|
599
616
|
},
|
|
600
617
|
children: /* @__PURE__ */ A(d, {
|
|
601
|
-
iconBefore:
|
|
618
|
+
iconBefore: V,
|
|
602
619
|
label: /* @__PURE__ */ A(t, {
|
|
603
620
|
text: n.title,
|
|
604
621
|
query: o,
|
|
@@ -609,9 +626,9 @@ var q = /* @__PURE__ */ function(e) {
|
|
|
609
626
|
"aria-current": i ? "page" : void 0,
|
|
610
627
|
onClick: n.href ? void 0 : () => a(n.id),
|
|
611
628
|
tabIndex: n.href ? -1 : void 0,
|
|
612
|
-
className: r("flex h-8 w-full items-center justify-start gap-2 rounded-xl py-2 ps-3",
|
|
629
|
+
className: r("flex h-8 w-full items-center justify-start gap-2 rounded-xl py-2 ps-3", H, Z.item, i && Z.itemActive, I && Z.itemActive)
|
|
613
630
|
})
|
|
614
|
-
}),
|
|
631
|
+
}), B && /* @__PURE__ */ A("div", {
|
|
615
632
|
className: r("absolute inset-y-0 end-1 flex items-center", I ? "opacity-100" : "opacity-0 group-focus-within/conversation:opacity-100 group-hover/conversation:opacity-100"),
|
|
616
633
|
children: /* @__PURE__ */ A(f, {
|
|
617
634
|
items: z,
|
|
@@ -622,18 +639,18 @@ var q = /* @__PURE__ */ function(e) {
|
|
|
622
639
|
ref: R,
|
|
623
640
|
icon: /* @__PURE__ */ A(P, {
|
|
624
641
|
size: u.SM,
|
|
625
|
-
className:
|
|
642
|
+
className: Z.triggerIcon,
|
|
626
643
|
"aria-hidden": !0
|
|
627
644
|
}),
|
|
628
645
|
appearance: l.Ghost,
|
|
629
646
|
size: v.Small,
|
|
630
647
|
"aria-label": p,
|
|
631
|
-
className: r("flex items-center justify-center rounded",
|
|
648
|
+
className: r("flex items-center justify-center rounded", Z.trigger, I && Z.triggerActive)
|
|
632
649
|
})
|
|
633
650
|
})
|
|
634
651
|
})]
|
|
635
652
|
});
|
|
636
|
-
},
|
|
653
|
+
}, Se = ({ label: e, isExpanded: t, onToggle: n, listId: i, className: a = "dial-tiny-semi-text uppercase", dropZoneGroupKey: o, isDragOver: s, onDragOver: c, onDragLeave: l, onDrop: u }) => {
|
|
637
654
|
let d = o != null;
|
|
638
655
|
return /* @__PURE__ */ j("button", {
|
|
639
656
|
type: "button",
|
|
@@ -649,7 +666,7 @@ var q = /* @__PURE__ */ function(e) {
|
|
|
649
666
|
onDrop: d ? (e) => {
|
|
650
667
|
d && (e.preventDefault(), u?.(o, o, null));
|
|
651
668
|
} : void 0,
|
|
652
|
-
className: r("flex h-6 w-full items-center gap-1 rounded py-1 pe-3 text-start", a,
|
|
669
|
+
className: r("flex h-6 w-full items-center gap-1 rounded py-1 pe-3 text-start", a, Z.groupHeader, s && Z.dropZoneActive),
|
|
653
670
|
children: [t ? /* @__PURE__ */ A(M, {
|
|
654
671
|
stroke: .5,
|
|
655
672
|
size: 12,
|
|
@@ -662,22 +679,22 @@ var q = /* @__PURE__ */ function(e) {
|
|
|
662
679
|
"aria-hidden": !0
|
|
663
680
|
}), /* @__PURE__ */ A(p, { text: e })]
|
|
664
681
|
});
|
|
665
|
-
},
|
|
682
|
+
}, Ce = ({ index: e, style: t, rows: n, expandedGroups: r, onToggleGroup: i, listId: a, activeConversationId: o, searchQuery: s, onSelectConversation: c, getActions: l, onActionMenuOpen: u, actionsLabel: d, styles: f, draggingId: p, dragOverId: m, allowedDropGroups: h, onDragStart: g, onDragEnd: _, onDragOver: v, onDragLeave: y, onDrop: b }) => {
|
|
666
683
|
let x = n[e];
|
|
667
|
-
if (x.kind ===
|
|
668
|
-
let n = x.groupKey ===
|
|
684
|
+
if (x.kind === Y.Header) {
|
|
685
|
+
let n = x.groupKey === X.Pinned;
|
|
669
686
|
return /* @__PURE__ */ A("div", {
|
|
670
687
|
role: "presentation",
|
|
671
688
|
style: t,
|
|
672
689
|
className: e === 0 ? "pt-0" : "pt-8",
|
|
673
|
-
children: /* @__PURE__ */ A(
|
|
690
|
+
children: /* @__PURE__ */ A(Se, {
|
|
674
691
|
label: x.label,
|
|
675
692
|
isExpanded: r.has(x.groupKey),
|
|
676
693
|
onToggle: () => i(x.groupKey),
|
|
677
694
|
listId: a,
|
|
678
695
|
className: f?.groupHeaderClassName,
|
|
679
|
-
dropZoneGroupKey: n ?
|
|
680
|
-
isDragOver: n && m ===
|
|
696
|
+
dropZoneGroupKey: n ? X.Pinned : void 0,
|
|
697
|
+
isDragOver: n && m === X.Pinned,
|
|
681
698
|
onDragOver: n ? v : void 0,
|
|
682
699
|
onDragLeave: n ? y : void 0,
|
|
683
700
|
onDrop: n ? b : void 0
|
|
@@ -688,7 +705,7 @@ var q = /* @__PURE__ */ function(e) {
|
|
|
688
705
|
role: "presentation",
|
|
689
706
|
style: t,
|
|
690
707
|
className: "pt-1",
|
|
691
|
-
children: /* @__PURE__ */ A(
|
|
708
|
+
children: /* @__PURE__ */ A(xe, {
|
|
692
709
|
item: x.item,
|
|
693
710
|
isActive: x.item.id === o,
|
|
694
711
|
searchQuery: s,
|
|
@@ -710,181 +727,181 @@ var q = /* @__PURE__ */ function(e) {
|
|
|
710
727
|
onDrop: b
|
|
711
728
|
})
|
|
712
729
|
});
|
|
713
|
-
},
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
]),
|
|
719
|
-
let { colors: M, typography: N } = m ?? {}, { title:
|
|
730
|
+
}, we = (e, t) => t === X.All ? !0 : e.source === t, Te = (e, t) => t ? e.title.toLowerCase().includes(t.toLowerCase()) : !0, Ee = new Set([
|
|
731
|
+
X.Pinned,
|
|
732
|
+
X.MyChats,
|
|
733
|
+
X.Shared,
|
|
734
|
+
X.Organization
|
|
735
|
+
]), De = x(({ conversations: e, isLoading: t, isOpen: l, onSelectConversation: u, activeConversationId: d, labels: f, onNewChat: p, styles: m, className: g, getActions: _, onActionMenuOpen: v, onToggle: y, headerActions: b, onMoveConversation: x, activeFilter: T, onActiveFilterChange: E }) => {
|
|
736
|
+
let { colors: M, typography: N, newChatButton: P } = m ?? {}, { title: F, emptyLabel: I, noResultsLabel: L, loadingLabel: R = "Loading conversations", newChatLabel: ee, searchPlaceholder: z, searchClearLabel: B, filterLabels: V, groupLabels: H, actionsLabel: U, closeAriaLabel: te } = f, [W, G] = k(""), [K, q] = k(X.All);
|
|
720
737
|
C(() => {
|
|
721
|
-
T != null && (
|
|
738
|
+
T != null && (q(T), E?.(T));
|
|
722
739
|
}, [T]);
|
|
723
|
-
let [
|
|
724
|
-
|
|
725
|
-
}, []),
|
|
726
|
-
|
|
740
|
+
let [J, ne] = k(() => Ee), [re, ie] = k(5), ae = w(), oe = O(null), le = O(null), [de, me] = k(null), [he, ge] = k(null), [_e, ye] = k(null), xe = O(null), Se = O(null), De = S(({ height: e }) => {
|
|
741
|
+
ie(Math.ceil(e / 36 * 2));
|
|
742
|
+
}, []), Oe = S((e) => {
|
|
743
|
+
ne((t) => {
|
|
727
744
|
let n = new Set(t);
|
|
728
745
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
729
746
|
});
|
|
730
|
-
}, []),
|
|
731
|
-
|
|
732
|
-
}, []),
|
|
733
|
-
let r =
|
|
734
|
-
|
|
735
|
-
}, [e]),
|
|
736
|
-
|
|
737
|
-
}, [
|
|
738
|
-
|
|
739
|
-
}, []),
|
|
740
|
-
|
|
741
|
-
}, []),
|
|
742
|
-
let r =
|
|
743
|
-
|
|
747
|
+
}, []), ke = S(() => {
|
|
748
|
+
xe.current = null, Se.current = null, me(null), ge(null), ye(null);
|
|
749
|
+
}, []), Ae = S((t, n) => {
|
|
750
|
+
let r = pe(t, fe(n, t), e);
|
|
751
|
+
xe.current = t, Se.current = r, me(t), ye(r);
|
|
752
|
+
}, [e]), je = S(() => {
|
|
753
|
+
ke();
|
|
754
|
+
}, [ke]), Me = S((e) => {
|
|
755
|
+
ge(e);
|
|
756
|
+
}, []), Ne = S(() => {
|
|
757
|
+
ge(null);
|
|
758
|
+
}, []), Pe = S((e, t, n) => {
|
|
759
|
+
let r = xe.current, i = Se.current;
|
|
760
|
+
ke(), r != null && r !== e && i?.has(t) && x?.({
|
|
744
761
|
draggedId: r,
|
|
745
762
|
targetGroupKey: t,
|
|
746
763
|
afterId: n
|
|
747
764
|
});
|
|
748
|
-
}, [
|
|
765
|
+
}, [ke, x]), Fe = n({
|
|
749
766
|
"--cp-bg": M?.background,
|
|
750
767
|
"--sb-border": M?.border,
|
|
751
768
|
"--cp-item-hover": M?.itemHover,
|
|
752
769
|
"--cp-item-active": M?.itemActive,
|
|
753
770
|
"--cp-text": M?.text,
|
|
754
771
|
"--cp-text-secondary": M?.textSecondary,
|
|
755
|
-
"--cp-new-chat-
|
|
756
|
-
"--cp-new-chat-
|
|
757
|
-
"--cp-new-chat-
|
|
758
|
-
"--cp-new-chat-text":
|
|
759
|
-
"--cp-new-chat-shadow-blue":
|
|
760
|
-
"--cp-new-chat-shadow-blue-hover":
|
|
761
|
-
"--cp-new-chat-shadow-blue-active":
|
|
762
|
-
"--cp-new-chat-shadow-purple":
|
|
763
|
-
"--cp-new-chat-shadow-purple-hover":
|
|
764
|
-
"--cp-new-chat-shadow-purple-active":
|
|
772
|
+
"--cp-new-chat-bg": P?.background,
|
|
773
|
+
"--cp-new-chat-hover": P?.hoverBackground,
|
|
774
|
+
"--cp-new-chat-active": P?.activeBackground,
|
|
775
|
+
"--cp-new-chat-text": P?.text,
|
|
776
|
+
"--cp-new-chat-shadow-blue": P?.shadowBlue,
|
|
777
|
+
"--cp-new-chat-shadow-blue-hover": P?.shadowBlueHover,
|
|
778
|
+
"--cp-new-chat-shadow-blue-active": P?.shadowBlueActive,
|
|
779
|
+
"--cp-new-chat-shadow-purple": P?.shadowPurple,
|
|
780
|
+
"--cp-new-chat-shadow-purple-hover": P?.shadowPurpleHover,
|
|
781
|
+
"--cp-new-chat-shadow-purple-active": P?.shadowPurpleActive,
|
|
765
782
|
"--cp-drop-zone-ring": M?.dropZoneRing,
|
|
766
783
|
"--cp-trigger-bg": M?.triggerBackground,
|
|
767
784
|
"--cp-trigger-icon": M?.triggerIcon,
|
|
768
785
|
"--cp-trigger-icon-idle": M?.triggerIconIdle,
|
|
769
786
|
"--cp-skeleton-color": M?.skeletonColor
|
|
770
|
-
}), Q = D(() => e.filter((e) =>
|
|
787
|
+
}), Q = D(() => e.filter((e) => we(e, K) && Te(e, W)), [
|
|
771
788
|
e,
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
]),
|
|
789
|
+
K,
|
|
790
|
+
W
|
|
791
|
+
]), Ie = D(() => Q.filter((e) => e.isPinned), [Q]), Le = D(() => Q.filter((e) => !e.isPinned && e.source !== X.Shared && e.source !== X.Organization), [Q]), Re = D(() => Q.filter((e) => !e.isPinned && e.source === X.Shared), [Q]), ze = D(() => Q.filter((e) => !e.isPinned && e.source === X.Organization), [Q]), Be = D(() => [
|
|
775
792
|
{
|
|
776
|
-
key:
|
|
777
|
-
label:
|
|
778
|
-
items:
|
|
793
|
+
key: X.Pinned,
|
|
794
|
+
label: H?.pinned ?? "Pinned",
|
|
795
|
+
items: Ie
|
|
779
796
|
},
|
|
780
797
|
{
|
|
781
|
-
key:
|
|
782
|
-
label:
|
|
783
|
-
items:
|
|
798
|
+
key: X.MyChats,
|
|
799
|
+
label: H?.myChats ?? "My chats",
|
|
800
|
+
items: Le
|
|
784
801
|
},
|
|
785
802
|
{
|
|
786
|
-
key:
|
|
787
|
-
label:
|
|
788
|
-
items:
|
|
803
|
+
key: X.Shared,
|
|
804
|
+
label: H?.shared ?? "Shared",
|
|
805
|
+
items: Re
|
|
789
806
|
},
|
|
790
807
|
{
|
|
791
|
-
key:
|
|
792
|
-
label:
|
|
793
|
-
items:
|
|
808
|
+
key: X.Organization,
|
|
809
|
+
label: H?.organization ?? "Organization",
|
|
810
|
+
items: ze
|
|
794
811
|
}
|
|
795
812
|
], [
|
|
796
|
-
|
|
797
|
-
Pe,
|
|
798
|
-
Fe,
|
|
813
|
+
H,
|
|
799
814
|
Ie,
|
|
800
|
-
Le
|
|
815
|
+
Le,
|
|
816
|
+
Re,
|
|
817
|
+
ze
|
|
801
818
|
]), $ = D(() => {
|
|
802
819
|
let e = [];
|
|
803
|
-
for (let t of
|
|
804
|
-
kind:
|
|
820
|
+
for (let t of Be) if (t.items.length !== 0 && (e.push({
|
|
821
|
+
kind: Y.Header,
|
|
805
822
|
groupKey: t.key,
|
|
806
823
|
label: t.label
|
|
807
|
-
}),
|
|
808
|
-
kind:
|
|
824
|
+
}), J.has(t.key))) for (let n of t.items) e.push({
|
|
825
|
+
kind: Y.Item,
|
|
809
826
|
item: n,
|
|
810
827
|
groupKey: t.key
|
|
811
828
|
});
|
|
812
829
|
return e;
|
|
813
|
-
}, [
|
|
830
|
+
}, [Be, J]);
|
|
814
831
|
C(() => {
|
|
815
832
|
if (!d) return;
|
|
816
|
-
let e =
|
|
817
|
-
if (e && !
|
|
818
|
-
|
|
833
|
+
let e = Be.find((e) => e.items.some((e) => e.id === d))?.key;
|
|
834
|
+
if (e && !J.has(e)) {
|
|
835
|
+
ne((t) => new Set(t).add(e));
|
|
819
836
|
return;
|
|
820
837
|
}
|
|
821
|
-
if (
|
|
822
|
-
let t = $.findIndex((e) => e.kind ===
|
|
823
|
-
t >= 0 && (
|
|
838
|
+
if (le.current === d) return;
|
|
839
|
+
let t = $.findIndex((e) => e.kind === Y.Item && e.item.id === d);
|
|
840
|
+
t >= 0 && (oe.current?.scrollToRow({
|
|
824
841
|
index: t,
|
|
825
842
|
align: "smart",
|
|
826
843
|
behavior: "smooth"
|
|
827
|
-
}),
|
|
844
|
+
}), le.current = d);
|
|
828
845
|
}, [
|
|
829
846
|
d,
|
|
830
|
-
|
|
831
|
-
|
|
847
|
+
Be,
|
|
848
|
+
J,
|
|
832
849
|
$
|
|
833
850
|
]);
|
|
834
|
-
let
|
|
851
|
+
let Ve = D(() => ({
|
|
835
852
|
rows: $,
|
|
836
|
-
expandedGroups:
|
|
837
|
-
onToggleGroup:
|
|
838
|
-
listId:
|
|
853
|
+
expandedGroups: J,
|
|
854
|
+
onToggleGroup: Oe,
|
|
855
|
+
listId: ae,
|
|
839
856
|
activeConversationId: d,
|
|
840
|
-
searchQuery:
|
|
857
|
+
searchQuery: W,
|
|
841
858
|
onSelectConversation: u,
|
|
842
859
|
getActions: _,
|
|
843
860
|
onActionMenuOpen: v,
|
|
844
|
-
actionsLabel:
|
|
861
|
+
actionsLabel: U,
|
|
845
862
|
styles: {
|
|
846
863
|
groupHeaderClassName: N?.groupHeaderClassName,
|
|
847
864
|
itemTitleClassName: N?.itemTitleClassName,
|
|
848
865
|
itemIconBadgeClassName: m?.itemIconBadgeClassName
|
|
849
866
|
},
|
|
850
867
|
draggingId: de,
|
|
851
|
-
dragOverId:
|
|
868
|
+
dragOverId: he,
|
|
852
869
|
allowedDropGroups: _e,
|
|
853
|
-
onDragStart: (e) =>
|
|
854
|
-
onDragEnd:
|
|
855
|
-
onDragOver:
|
|
856
|
-
onDragLeave:
|
|
857
|
-
onDrop:
|
|
870
|
+
onDragStart: (e) => Ae(e, $),
|
|
871
|
+
onDragEnd: je,
|
|
872
|
+
onDragOver: Me,
|
|
873
|
+
onDragLeave: Ne,
|
|
874
|
+
onDrop: Pe
|
|
858
875
|
}), [
|
|
859
876
|
$,
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
877
|
+
J,
|
|
878
|
+
Oe,
|
|
879
|
+
ae,
|
|
863
880
|
d,
|
|
864
|
-
|
|
881
|
+
W,
|
|
865
882
|
u,
|
|
866
883
|
_,
|
|
867
884
|
v,
|
|
868
|
-
|
|
885
|
+
U,
|
|
869
886
|
N?.groupHeaderClassName,
|
|
870
887
|
N?.itemTitleClassName,
|
|
871
888
|
m?.itemIconBadgeClassName,
|
|
872
889
|
de,
|
|
873
|
-
|
|
890
|
+
he,
|
|
874
891
|
_e,
|
|
875
|
-
Oe,
|
|
876
|
-
ke,
|
|
877
892
|
Ae,
|
|
878
893
|
je,
|
|
879
|
-
Me
|
|
880
|
-
|
|
894
|
+
Me,
|
|
895
|
+
Ne,
|
|
896
|
+
Pe
|
|
897
|
+
]), He = e.length === 0, Ue = e.length > 0 && Q.length === 0;
|
|
881
898
|
return /* @__PURE__ */ j(c, {
|
|
882
899
|
isOpen: l,
|
|
883
900
|
orientation: s.Left,
|
|
884
|
-
title:
|
|
901
|
+
title: F,
|
|
885
902
|
labels: {
|
|
886
|
-
ariaLabel:
|
|
887
|
-
closeLabel:
|
|
903
|
+
ariaLabel: F,
|
|
904
|
+
closeLabel: te
|
|
888
905
|
},
|
|
889
906
|
onClose: y,
|
|
890
907
|
styles: {
|
|
@@ -894,31 +911,32 @@ var q = /* @__PURE__ */ function(e) {
|
|
|
894
911
|
},
|
|
895
912
|
typography: { fontClassName: N?.fontClassName },
|
|
896
913
|
bodyClassName: "flex flex-col overflow-hidden p-0 gap-3",
|
|
897
|
-
cssVars:
|
|
914
|
+
cssVars: Fe,
|
|
898
915
|
titleClassName: N?.fontClassName,
|
|
899
916
|
headerClassName: "h-[64px]",
|
|
900
917
|
className: r(l ? "w-[325px] border-s border-e mobile:w-full" : "w-0", g)
|
|
901
918
|
},
|
|
902
919
|
rightActions: b,
|
|
903
920
|
children: [
|
|
904
|
-
/* @__PURE__ */ A(
|
|
905
|
-
label:
|
|
921
|
+
/* @__PURE__ */ A(be, {
|
|
922
|
+
label: ee,
|
|
906
923
|
onClick: p,
|
|
907
|
-
labelClassName: N?.newChatLabelClassName
|
|
924
|
+
labelClassName: N?.newChatLabelClassName,
|
|
925
|
+
colors: P
|
|
908
926
|
}),
|
|
909
927
|
/* @__PURE__ */ A(o, {
|
|
910
|
-
value:
|
|
911
|
-
onChange:
|
|
928
|
+
value: W,
|
|
929
|
+
onChange: G,
|
|
912
930
|
labels: {
|
|
913
|
-
placeholder:
|
|
914
|
-
clearLabel:
|
|
931
|
+
placeholder: z,
|
|
932
|
+
clearLabel: B
|
|
915
933
|
}
|
|
916
934
|
}),
|
|
917
|
-
/* @__PURE__ */ A(
|
|
918
|
-
activeTab:
|
|
919
|
-
labels:
|
|
935
|
+
/* @__PURE__ */ A(ve, {
|
|
936
|
+
activeTab: K,
|
|
937
|
+
labels: V,
|
|
920
938
|
onChange: (e) => {
|
|
921
|
-
|
|
939
|
+
q(e), E?.(e);
|
|
922
940
|
},
|
|
923
941
|
tabClassName: N?.tabClassName
|
|
924
942
|
}),
|
|
@@ -926,7 +944,7 @@ var q = /* @__PURE__ */ function(e) {
|
|
|
926
944
|
role: "status",
|
|
927
945
|
"aria-live": "polite",
|
|
928
946
|
className: "sr-only",
|
|
929
|
-
children: t ?
|
|
947
|
+
children: t ? R : He ? I : Ue ? L : ""
|
|
930
948
|
}),
|
|
931
949
|
/* @__PURE__ */ A("div", {
|
|
932
950
|
className: "flex-1 overflow-hidden px-2 py-1",
|
|
@@ -934,26 +952,26 @@ var q = /* @__PURE__ */ function(e) {
|
|
|
934
952
|
className: "flex flex-col gap-3 px-2 py-3",
|
|
935
953
|
children: Array.from({ length: 15 }, (e, t) => /* @__PURE__ */ A(h, {
|
|
936
954
|
avatar: { size: 24 },
|
|
937
|
-
showTitle: { width:
|
|
955
|
+
showTitle: { width: ce(t) },
|
|
938
956
|
paragraph: !1,
|
|
939
957
|
active: !0,
|
|
940
|
-
color:
|
|
958
|
+
color: Z.skeletonColor
|
|
941
959
|
}, t))
|
|
942
|
-
}) :
|
|
943
|
-
listRef:
|
|
944
|
-
id:
|
|
960
|
+
}) : He ? /* @__PURE__ */ A(i, { label: I }) : Ue ? /* @__PURE__ */ A(a, { label: L }) : /* @__PURE__ */ A(se, {
|
|
961
|
+
listRef: oe,
|
|
962
|
+
id: ae,
|
|
945
963
|
role: "list",
|
|
946
964
|
style: { height: "100%" },
|
|
947
|
-
rowComponent:
|
|
965
|
+
rowComponent: Ce,
|
|
948
966
|
rowCount: $.length,
|
|
949
|
-
rowHeight:
|
|
950
|
-
overscanCount:
|
|
951
|
-
onResize:
|
|
952
|
-
rowProps:
|
|
967
|
+
rowHeight: ue,
|
|
968
|
+
overscanCount: re,
|
|
969
|
+
onResize: De,
|
|
970
|
+
rowProps: Ve
|
|
953
971
|
})
|
|
954
972
|
})
|
|
955
973
|
]
|
|
956
974
|
});
|
|
957
975
|
});
|
|
958
976
|
//#endregion
|
|
959
|
-
export {
|
|
977
|
+
export { De as ConversationPanel, X as FilterTab };
|