@epam/ai-dial-conversation-panel 1.3.0-dev.311 → 1.3.0-dev.317
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/ConversationGroupHeader/ConversationGroupHeader.d.ts.map +1 -1
- package/components/ConversationList/ConversationList.d.ts.map +1 -1
- package/components/ConversationListSection/ConversationListSection.d.ts.map +1 -1
- package/components/ConversationRow/ConversationRow.d.ts +3 -0
- package/components/ConversationRow/ConversationRow.d.ts.map +1 -1
- package/components/ProjectRow/ProjectRow.d.ts +24 -0
- package/components/ProjectRow/ProjectRow.d.ts.map +1 -0
- package/components/ProjectRow/ProjectSeeAllRow.d.ts +19 -0
- package/components/ProjectRow/ProjectSeeAllRow.d.ts.map +1 -0
- package/components/RowActionsMenu/RowActionsMenu.d.ts +20 -0
- package/components/RowActionsMenu/RowActionsMenu.d.ts.map +1 -0
- package/components/RowLink/RowLink.d.ts +12 -0
- package/components/RowLink/RowLink.d.ts.map +1 -0
- package/components/RowRenderer/RowRenderer.d.ts +2 -2
- package/components/RowRenderer/RowRenderer.d.ts.map +1 -1
- package/hooks/useRowActions.d.ts +17 -0
- package/hooks/useRowActions.d.ts.map +1 -0
- package/index.css +2 -2
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +856 -638
- package/models/conversation-list-section.d.ts +3 -0
- package/models/conversation-list-section.d.ts.map +1 -1
- package/models/conversation-list.d.ts +11 -2
- package/models/conversation-list.d.ts.map +1 -1
- package/models/pinned-projects.d.ts +58 -0
- package/models/pinned-projects.d.ts.map +1 -0
- package/models/virtual-row.d.ts +43 -1
- package/models/virtual-row.d.ts.map +1 -1
- package/package.json +4 -4
- package/types/virtual-row.d.ts +8 -2
- package/types/virtual-row.d.ts.map +1 -1
- package/utils/conversation-filter.d.ts +19 -0
- package/utils/conversation-filter.d.ts.map +1 -1
- package/utils/conversation-row.d.ts +9 -3
- package/utils/conversation-row.d.ts.map +1 -1
package/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
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 { Fragment as P, createElement as F, memo as I, useCallback as L, useEffect as R, useId as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { IconCaretDownFilled as
|
|
4
|
+
import { Fragment as P, createElement as F, memo as I, useCallback as L, useEffect as R, useId as ee, useImperativeHandle as te, useLayoutEffect as z, useMemo as B, useRef as V, useState as H, useSyncExternalStore as U } from "react";
|
|
5
|
+
import { Fragment as ne, jsx as W, jsxs as G } from "react/jsx-runtime";
|
|
6
|
+
import { IconBriefcase as re, IconCaretDownFilled as K, IconCaretRightFilled as ie, IconChevronDown as ae, IconChevronRight as oe, IconDotsVertical as se, IconFilter2 as ce, IconPlus as le, IconSearch as ue, IconSparkles as de, IconX as fe } from "@tabler/icons-react";
|
|
7
7
|
//#region src/constants/public-class-names.ts
|
|
8
|
-
var
|
|
8
|
+
var pe = {
|
|
9
9
|
newChatButton: "dial-cp-new-chat-button",
|
|
10
10
|
search: "dial-cp-search",
|
|
11
11
|
list: "dial-cp-list",
|
|
12
12
|
listHeader: "dial-cp-list-header",
|
|
13
13
|
listSection: "dial-cp-list-section"
|
|
14
|
-
},
|
|
15
|
-
function
|
|
14
|
+
}, q = typeof window < "u" ? z : R;
|
|
15
|
+
function me(e) {
|
|
16
16
|
let t = e;
|
|
17
17
|
for (; t;) {
|
|
18
18
|
if (t.dir) return t.dir === "rtl";
|
|
@@ -20,35 +20,35 @@ function de(e) {
|
|
|
20
20
|
}
|
|
21
21
|
return !1;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function he() {
|
|
24
24
|
return () => {};
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
return
|
|
26
|
+
function ge() {
|
|
27
|
+
return U(he, () => !1, () => !0);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function J(e) {
|
|
30
30
|
return e?.ownerDocument.defaultView ?? window;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
return
|
|
32
|
+
function _e(e) {
|
|
33
|
+
return J(e).ResizeObserver ?? (typeof ResizeObserver < "u" ? ResizeObserver : void 0);
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function ve(e) {
|
|
36
36
|
if (e !== void 0) switch (typeof e) {
|
|
37
37
|
case "number": return e;
|
|
38
38
|
case "string": if (e.endsWith("px")) return parseFloat(e);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
let { styleHeight: s, styleWidth: c } =
|
|
43
|
-
styleHeight:
|
|
44
|
-
styleWidth:
|
|
45
|
-
}), [o?.height, o?.width]), [l, u] =
|
|
41
|
+
function ye({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
|
|
42
|
+
let { styleHeight: s, styleWidth: c } = B(() => ({
|
|
43
|
+
styleHeight: ve(o?.height),
|
|
44
|
+
styleWidth: ve(o?.width)
|
|
45
|
+
}), [o?.height, o?.width]), [l, u] = H({
|
|
46
46
|
height: t,
|
|
47
47
|
width: n
|
|
48
48
|
}), d = r || a === "only-height" && s !== void 0 || a === "only-width" && c !== void 0 || s !== void 0 && c !== void 0;
|
|
49
|
-
return
|
|
49
|
+
return q(() => {
|
|
50
50
|
if (i === null || d) return;
|
|
51
|
-
let t =
|
|
51
|
+
let t = _e(i);
|
|
52
52
|
if (!t) return;
|
|
53
53
|
let n = new t((e) => {
|
|
54
54
|
for (let t of e) {
|
|
@@ -68,7 +68,7 @@ function ge({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
|
|
|
68
68
|
i,
|
|
69
69
|
s,
|
|
70
70
|
c
|
|
71
|
-
]),
|
|
71
|
+
]), B(() => ({
|
|
72
72
|
height: s ?? l.height,
|
|
73
73
|
width: c ?? l.width
|
|
74
74
|
}), [
|
|
@@ -77,27 +77,27 @@ function ge({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
|
|
|
77
77
|
c
|
|
78
78
|
]);
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
let t =
|
|
80
|
+
function be(e) {
|
|
81
|
+
let t = V(() => {
|
|
82
82
|
throw Error("Cannot call an event handler while rendering.");
|
|
83
83
|
});
|
|
84
|
-
return
|
|
84
|
+
return q(() => {
|
|
85
85
|
t.current = e;
|
|
86
86
|
}, [e]), L((...e) => t.current?.(...e), [t]);
|
|
87
87
|
}
|
|
88
|
-
var
|
|
89
|
-
function
|
|
90
|
-
let n =
|
|
88
|
+
var xe = /* @__PURE__ */ new WeakMap();
|
|
89
|
+
function Se(e = !1, t = document) {
|
|
90
|
+
let n = xe.get(t);
|
|
91
91
|
if (n === void 0 || e) {
|
|
92
92
|
let e = t.createElement("div"), r = e.style;
|
|
93
93
|
r.width = "50px", r.height = "50px", r.overflow = "scroll", r.direction = "rtl";
|
|
94
94
|
let i = t.createElement("div"), a = i.style;
|
|
95
|
-
a.width = "100px", a.height = "100px", e.appendChild(i), t.body.appendChild(e), e.scrollLeft > 0 ? n = "positive-descending" : (e.scrollLeft = 1, n = e.scrollLeft === 0 ? "negative" : "positive-ascending"), t.body.removeChild(e),
|
|
95
|
+
a.width = "100px", a.height = "100px", e.appendChild(i), t.body.appendChild(e), e.scrollLeft > 0 ? n = "positive-descending" : (e.scrollLeft = 1, n = e.scrollLeft === 0 ? "negative" : "positive-ascending"), t.body.removeChild(e), xe.set(t, n);
|
|
96
96
|
}
|
|
97
97
|
return n;
|
|
98
98
|
}
|
|
99
|
-
function
|
|
100
|
-
if (t === "horizontal" && n) switch (
|
|
99
|
+
function Ce({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
|
|
100
|
+
if (t === "horizontal" && n) switch (Se(!1, e?.ownerDocument ?? document)) {
|
|
101
101
|
case "negative": return -r;
|
|
102
102
|
case "positive-descending": if (e) {
|
|
103
103
|
let { clientWidth: t, scrollWidth: n } = e;
|
|
@@ -106,8 +106,8 @@ function be({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
|
|
|
106
106
|
}
|
|
107
107
|
return r;
|
|
108
108
|
}
|
|
109
|
-
function
|
|
110
|
-
let r =
|
|
109
|
+
function we({ container: e, element: t, onChange: n }) {
|
|
110
|
+
let r = J(t), i = _e(t), a = r.MutationObserver ?? (typeof MutationObserver < "u" ? MutationObserver : void 0), o = i ? new i(n) : void 0, s = (e) => !e.isConnected || (e.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING) !== 0, c = a ? new a((e) => {
|
|
111
111
|
e.some((e) => Array.from(e.addedNodes).some(s) || e.removedNodes.length > 0 && e.nextSibling !== null && s(e.nextSibling)) && (u(), n());
|
|
112
112
|
}) : void 0, l = /* @__PURE__ */ new Set(), u = () => {
|
|
113
113
|
for (let e of l) o?.unobserve(e);
|
|
@@ -124,33 +124,33 @@ function xe({ container: e, element: t, onChange: n }) {
|
|
|
124
124
|
o?.disconnect(), c?.disconnect();
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function Te(e) {
|
|
128
128
|
return e.window === e;
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
return t === "window" ? e ?
|
|
130
|
+
function Ee(e, t) {
|
|
131
|
+
return t === "window" ? e ? J(e) : null : t ?? null;
|
|
132
132
|
}
|
|
133
|
-
function
|
|
134
|
-
return
|
|
133
|
+
function De(e, t) {
|
|
134
|
+
return Te(e) ? t === "vertical" ? e.scrollY : e.scrollX : t === "vertical" ? e.scrollTop : e.scrollLeft;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
let n =
|
|
136
|
+
function Oe(e, t) {
|
|
137
|
+
let n = Te(e) ? e.document.scrollingElement ?? e.document.documentElement : e;
|
|
138
138
|
return t === "vertical" ? n.scrollHeight - n.clientHeight : n.scrollWidth - n.clientWidth;
|
|
139
139
|
}
|
|
140
|
-
function
|
|
141
|
-
let { overflowX: n, overflowY: r } =
|
|
140
|
+
function ke(e, t) {
|
|
141
|
+
let { overflowX: n, overflowY: r } = J(e).getComputedStyle(e), i = t === "vertical" ? r : n;
|
|
142
142
|
return i === "visible" || i === "clip" ? !1 : t === "vertical" ? e.scrollHeight - e.clientHeight > 1 : e.scrollWidth - e.clientWidth > 1;
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function Ae({ containerElement: e, direction: t, isRtl: n, scrollTarget: r }) {
|
|
145
145
|
let i = t === "vertical", a, o;
|
|
146
|
-
if (
|
|
146
|
+
if (Te(r)) {
|
|
147
147
|
let { documentElement: e } = r.document;
|
|
148
148
|
a = 0, o = i ? e.clientHeight : e.clientWidth;
|
|
149
149
|
} else {
|
|
150
150
|
let e = r.getBoundingClientRect();
|
|
151
151
|
a = i ? e.top + r.clientTop : e.left + r.clientLeft, o = i ? r.clientHeight : r.clientWidth;
|
|
152
152
|
}
|
|
153
|
-
let s = a + o, c = e.getBoundingClientRect(), l = i ? c.top + e.clientTop : c.left + e.clientLeft, u = i ? e.clientHeight : e.clientWidth, d = l + u, f =
|
|
153
|
+
let s = a + o, c = e.getBoundingClientRect(), l = i ? c.top + e.clientTop : c.left + e.clientLeft, u = i ? e.clientHeight : e.clientWidth, d = l + u, f = Ce({
|
|
154
154
|
containerElement: e,
|
|
155
155
|
direction: t,
|
|
156
156
|
isRtl: n,
|
|
@@ -163,8 +163,8 @@ function De({ containerElement: e, direction: t, isRtl: n, scrollTarget: r }) {
|
|
|
163
163
|
viewportSize: o
|
|
164
164
|
};
|
|
165
165
|
}
|
|
166
|
-
function
|
|
167
|
-
let i =
|
|
166
|
+
function je({ direction: e, isRtl: t, scrollTarget: n, viewportSize: r }) {
|
|
167
|
+
let i = Te(n) ? n.document.documentElement : n, a = J(i).getComputedStyle(i), o = (e) => {
|
|
168
168
|
let t = parseFloat(e ?? "");
|
|
169
169
|
return !Number.isFinite(t) || t < 0 ? 0 : e.endsWith("px") ? t : e.endsWith("%") ? t * r / 100 : 0;
|
|
170
170
|
};
|
|
@@ -181,26 +181,26 @@ function Oe({ direction: e, isRtl: t, scrollTarget: n, viewportSize: r }) {
|
|
|
181
181
|
start: s
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function Me(e, t = "Assertion error") {
|
|
185
185
|
if (!e) throw console.error(t), Error(t);
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function Ne(e, t) {
|
|
188
188
|
if (e === t) return !0;
|
|
189
|
-
if (!!e != !!t || (
|
|
189
|
+
if (!!e != !!t || (Me(e !== void 0), Me(t !== void 0), Object.keys(e).length !== Object.keys(t).length)) return !1;
|
|
190
190
|
for (let n in e) if (!Object.hasOwn(t, n) || !Object.is(t[n], e[n])) return !1;
|
|
191
191
|
return !0;
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function Pe({ cachedBounds: e, itemCount: t, itemSize: n }) {
|
|
194
194
|
if (t === 0) return 0;
|
|
195
195
|
if (typeof n == "number") return t * n;
|
|
196
196
|
{
|
|
197
197
|
let n = e.get(e.size === 0 ? 0 : e.size - 1);
|
|
198
|
-
return
|
|
198
|
+
return Me(n !== void 0, "Unexpected bounds cache miss"), t * ((n.scrollOffset + n.size) / e.size);
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function Fe({ align: e, cachedBounds: t, clamp: n = !0, index: r, itemCount: i, itemSize: a, containerScrollOffset: o, containerSize: s }) {
|
|
202
202
|
if (r < 0 || r >= i) throw RangeError(`Invalid index specified: ${r}`, { cause: `Index ${r} is not within the range of 0 - ${i - 1}` });
|
|
203
|
-
let c = t.get(r), l =
|
|
203
|
+
let c = t.get(r), l = Pe({
|
|
204
204
|
cachedBounds: t,
|
|
205
205
|
itemCount: i,
|
|
206
206
|
itemSize: a
|
|
@@ -212,7 +212,7 @@ function Me({ align: e, cachedBounds: t, clamp: n = !0, index: r, itemCount: i,
|
|
|
212
212
|
default: return p ? o : o < f ? f : d;
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function Ie({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemCount: r, overscanCount: i }) {
|
|
216
216
|
let a = r - 1;
|
|
217
217
|
if (r === 0) return {
|
|
218
218
|
startIndexVisible: 0,
|
|
@@ -246,12 +246,12 @@ function Ne({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemC
|
|
|
246
246
|
stopIndexOverscan: Math.min(a, s + i)
|
|
247
247
|
};
|
|
248
248
|
}
|
|
249
|
-
function
|
|
249
|
+
function Le({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
250
250
|
let r = /* @__PURE__ */ new Map();
|
|
251
251
|
return {
|
|
252
252
|
itemSize: typeof n == "number" ? n : void 0,
|
|
253
253
|
get(i) {
|
|
254
|
-
if (
|
|
254
|
+
if (Me(i < e, `Invalid index ${i}`), typeof n == "number") return Me(i >= 0, `Invalid index ${i}`), {
|
|
255
255
|
size: n,
|
|
256
256
|
scrollOffset: i * n
|
|
257
257
|
};
|
|
@@ -263,14 +263,14 @@ function Z({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
|
263
263
|
});
|
|
264
264
|
else {
|
|
265
265
|
let t = r.get(e - 1);
|
|
266
|
-
|
|
266
|
+
Me(t !== void 0, `Unexpected bounds cache miss for index ${i}`), r.set(e, {
|
|
267
267
|
scrollOffset: t.scrollOffset + t.size,
|
|
268
268
|
size: a
|
|
269
269
|
});
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
272
|
let a = r.get(i);
|
|
273
|
-
return
|
|
273
|
+
return Me(a !== void 0, `Unexpected bounds cache miss for index ${i}`), a;
|
|
274
274
|
},
|
|
275
275
|
set(e, t) {
|
|
276
276
|
r.set(e, t);
|
|
@@ -280,8 +280,8 @@ function Z({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
|
280
280
|
}
|
|
281
281
|
};
|
|
282
282
|
}
|
|
283
|
-
function
|
|
284
|
-
return
|
|
283
|
+
function Re({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
284
|
+
return B(() => Le({
|
|
285
285
|
itemCount: e,
|
|
286
286
|
itemProps: t,
|
|
287
287
|
itemSize: n
|
|
@@ -291,31 +291,31 @@ function Pe({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
|
291
291
|
n
|
|
292
292
|
]);
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function ze({ containerSize: e, itemSize: t }) {
|
|
295
295
|
let n;
|
|
296
296
|
switch (typeof t) {
|
|
297
297
|
case "string":
|
|
298
|
-
|
|
298
|
+
Me(t.endsWith("%"), `Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`), Me(e !== void 0, "Container size must be defined if a percentage item size is specified"), n = e * parseFloat(t) / 100;
|
|
299
299
|
break;
|
|
300
300
|
default: n = t;
|
|
301
301
|
}
|
|
302
302
|
return typeof n == "number" && !(Number.isFinite(n) && n > 0) && (n = 0), n;
|
|
303
303
|
}
|
|
304
|
-
function
|
|
305
|
-
let f = d !== void 0, p = f ?
|
|
304
|
+
function Be({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0, defaultScrollOffset: r = 0, direction: i, isRtl: a = !1, itemCount: o, itemProps: s, itemSize: c, onResize: l, overscanCount: u, scrollElement: d }) {
|
|
305
|
+
let f = d !== void 0, p = f ? Ee(e, d) : e, { height: m = n, width: h = n } = ye({
|
|
306
306
|
defaultHeight: i === "vertical" ? n : void 0,
|
|
307
307
|
defaultWidth: i === "horizontal" ? n : void 0,
|
|
308
308
|
element: e,
|
|
309
309
|
mode: i === "vertical" ? "only-height" : "only-width",
|
|
310
310
|
style: t
|
|
311
|
-
}), g =
|
|
311
|
+
}), g = V({
|
|
312
312
|
height: 0,
|
|
313
313
|
width: 0
|
|
314
|
-
}), [_, v] =
|
|
314
|
+
}), [_, v] = H(n), y = f ? _ : i === "vertical" ? m : h, b = ze({
|
|
315
315
|
containerSize: y,
|
|
316
316
|
itemSize: c
|
|
317
317
|
});
|
|
318
|
-
|
|
318
|
+
q(() => {
|
|
319
319
|
if (typeof l == "function") {
|
|
320
320
|
let e = g.current;
|
|
321
321
|
(e.height !== m || e.width !== h) && (l({
|
|
@@ -328,11 +328,11 @@ function Ie({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
328
328
|
l,
|
|
329
329
|
h
|
|
330
330
|
]);
|
|
331
|
-
let x =
|
|
331
|
+
let x = Re({
|
|
332
332
|
itemCount: o,
|
|
333
333
|
itemProps: s,
|
|
334
334
|
itemSize: b
|
|
335
|
-
}), S =
|
|
335
|
+
}), S = ge(), [C] = H(() => S || f ? 0 : r), w = L((e) => x.get(e), [x]), [T, E] = H(() => Ie({
|
|
336
336
|
cachedBounds: x,
|
|
337
337
|
containerScrollOffset: C,
|
|
338
338
|
containerSize: y,
|
|
@@ -343,7 +343,7 @@ function Ie({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
343
343
|
startIndexOverscan: Math.min(o - 1, T.startIndexOverscan),
|
|
344
344
|
stopIndexVisible: Math.min(o - 1, T.stopIndexVisible),
|
|
345
345
|
stopIndexOverscan: Math.min(o - 1, T.stopIndexOverscan)
|
|
346
|
-
}, j = L(() =>
|
|
346
|
+
}, j = L(() => Pe({
|
|
347
347
|
cachedBounds: x,
|
|
348
348
|
itemCount: o,
|
|
349
349
|
itemSize: b
|
|
@@ -352,13 +352,13 @@ function Ie({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
352
352
|
o,
|
|
353
353
|
b
|
|
354
354
|
]), M = L((t) => {
|
|
355
|
-
let n =
|
|
355
|
+
let n = Ce({
|
|
356
356
|
containerElement: e,
|
|
357
357
|
direction: i,
|
|
358
358
|
isRtl: a,
|
|
359
359
|
scrollOffset: t
|
|
360
360
|
});
|
|
361
|
-
return
|
|
361
|
+
return Ie({
|
|
362
362
|
cachedBounds: x,
|
|
363
363
|
containerScrollOffset: n,
|
|
364
364
|
containerSize: y,
|
|
@@ -373,17 +373,17 @@ function Ie({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
373
373
|
a,
|
|
374
374
|
o,
|
|
375
375
|
u
|
|
376
|
-
]), N =
|
|
377
|
-
|
|
376
|
+
]), N = V(!1);
|
|
377
|
+
q(() => {
|
|
378
378
|
if (!e || o === 0 || f || N.current || (N.current = !0, r <= 0)) return;
|
|
379
|
-
let t = i === "horizontal" &&
|
|
380
|
-
if (
|
|
379
|
+
let t = i === "horizontal" && me(e);
|
|
380
|
+
if (Ce({
|
|
381
381
|
containerElement: e,
|
|
382
382
|
direction: i,
|
|
383
383
|
isRtl: t,
|
|
384
384
|
scrollOffset: i === "vertical" ? e.scrollTop : e.scrollLeft
|
|
385
385
|
}) !== 0) return;
|
|
386
|
-
let n =
|
|
386
|
+
let n = Ce({
|
|
387
387
|
containerElement: e,
|
|
388
388
|
direction: i,
|
|
389
389
|
isRtl: t,
|
|
@@ -393,16 +393,16 @@ function Ie({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
393
393
|
behavior: "instant",
|
|
394
394
|
[i === "vertical" ? "top" : "left"]: n
|
|
395
395
|
}) : i === "vertical" ? e.scrollTop = n : e.scrollLeft = n;
|
|
396
|
-
}, [e, o]),
|
|
396
|
+
}, [e, o]), q(() => {
|
|
397
397
|
if (f && e && p) return;
|
|
398
|
-
let t = e && !f ? M(i === "vertical" ? e.scrollTop : e.scrollLeft) :
|
|
398
|
+
let t = e && !f ? M(i === "vertical" ? e.scrollTop : e.scrollLeft) : Ie({
|
|
399
399
|
cachedBounds: x,
|
|
400
400
|
containerScrollOffset: C,
|
|
401
401
|
containerSize: y,
|
|
402
402
|
itemCount: o,
|
|
403
403
|
overscanCount: u
|
|
404
404
|
});
|
|
405
|
-
E((e) =>
|
|
405
|
+
E((e) => Ne(t, e) ? e : t);
|
|
406
406
|
}, [
|
|
407
407
|
x,
|
|
408
408
|
e,
|
|
@@ -414,23 +414,23 @@ function Ie({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
414
414
|
o,
|
|
415
415
|
u,
|
|
416
416
|
p
|
|
417
|
-
]),
|
|
417
|
+
]), q(() => {
|
|
418
418
|
if (!e || f) return;
|
|
419
419
|
let t = () => {
|
|
420
420
|
E((t) => {
|
|
421
|
-
let { scrollLeft: n, scrollTop: r } = e, s =
|
|
421
|
+
let { scrollLeft: n, scrollTop: r } = e, s = Ce({
|
|
422
422
|
containerElement: e,
|
|
423
423
|
direction: i,
|
|
424
424
|
isRtl: a,
|
|
425
425
|
scrollOffset: i === "vertical" ? r : n
|
|
426
|
-
}), c =
|
|
426
|
+
}), c = Ie({
|
|
427
427
|
cachedBounds: x,
|
|
428
428
|
containerScrollOffset: s,
|
|
429
429
|
containerSize: y,
|
|
430
430
|
itemCount: o,
|
|
431
431
|
overscanCount: u
|
|
432
432
|
});
|
|
433
|
-
return
|
|
433
|
+
return Ne(c, t) ? t : c;
|
|
434
434
|
});
|
|
435
435
|
};
|
|
436
436
|
return e.addEventListener("scroll", t), () => {
|
|
@@ -446,34 +446,34 @@ function Ie({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
446
446
|
o,
|
|
447
447
|
u
|
|
448
448
|
]);
|
|
449
|
-
let P =
|
|
449
|
+
let P = be(() => {
|
|
450
450
|
if (!e || !p) return;
|
|
451
|
-
let { offset: t, size: n, viewportSize: r } =
|
|
451
|
+
let { offset: t, size: n, viewportSize: r } = Ae({
|
|
452
452
|
containerElement: e,
|
|
453
453
|
direction: i,
|
|
454
454
|
isRtl: a,
|
|
455
455
|
scrollTarget: p
|
|
456
456
|
});
|
|
457
457
|
v(r);
|
|
458
|
-
let s =
|
|
458
|
+
let s = Ie({
|
|
459
459
|
cachedBounds: x,
|
|
460
460
|
containerScrollOffset: t,
|
|
461
461
|
containerSize: n,
|
|
462
462
|
itemCount: o,
|
|
463
463
|
overscanCount: u
|
|
464
464
|
});
|
|
465
|
-
E((e) =>
|
|
465
|
+
E((e) => Ne(s, e) ? e : s);
|
|
466
466
|
});
|
|
467
|
-
return
|
|
467
|
+
return q(() => {
|
|
468
468
|
f && P();
|
|
469
|
-
}),
|
|
469
|
+
}), q(() => {
|
|
470
470
|
if (!f || !e || !p) return;
|
|
471
|
-
let t =
|
|
471
|
+
let t = J(e), n = () => P();
|
|
472
472
|
p.addEventListener("scroll", n, { passive: !0 }), e.addEventListener("scroll", n, { passive: !0 }), t.addEventListener("resize", n);
|
|
473
|
-
let r, i =
|
|
474
|
-
i && !
|
|
475
|
-
let a =
|
|
476
|
-
container:
|
|
473
|
+
let r, i = _e(e);
|
|
474
|
+
i && !Te(p) && (r = new i(n), r.observe(p));
|
|
475
|
+
let a = we({
|
|
476
|
+
container: Te(p) ? p.document.documentElement : p,
|
|
477
477
|
element: e,
|
|
478
478
|
onChange: n
|
|
479
479
|
});
|
|
@@ -488,9 +488,9 @@ function Ie({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
488
488
|
]), {
|
|
489
489
|
getCellBounds: w,
|
|
490
490
|
getEstimatedSize: j,
|
|
491
|
-
getScrollPositionForIndex:
|
|
491
|
+
getScrollPositionForIndex: be(({ align: t = "auto", index: n }) => {
|
|
492
492
|
let r = ({ clamp: e, containerScrollOffset: r, containerSize: i, padding: a }) => {
|
|
493
|
-
if (a.start === 0 && a.end === 0) return
|
|
493
|
+
if (a.start === 0 && a.end === 0) return Fe({
|
|
494
494
|
align: t,
|
|
495
495
|
cachedBounds: x,
|
|
496
496
|
clamp: e,
|
|
@@ -500,7 +500,7 @@ function Ie({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
500
500
|
itemCount: o,
|
|
501
501
|
itemSize: b
|
|
502
502
|
});
|
|
503
|
-
let s =
|
|
503
|
+
let s = Fe({
|
|
504
504
|
align: t,
|
|
505
505
|
cachedBounds: x,
|
|
506
506
|
clamp: !1,
|
|
@@ -512,8 +512,8 @@ function Ie({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
512
512
|
}) - a.start;
|
|
513
513
|
return e ? Math.max(0, Math.min(j() - i, s)) : s;
|
|
514
514
|
};
|
|
515
|
-
if (f && e && p && !
|
|
516
|
-
let { viewportOffset: t, viewportSize: n } =
|
|
515
|
+
if (f && e && p && !ke(e, i)) {
|
|
516
|
+
let { viewportOffset: t, viewportSize: n } = Ae({
|
|
517
517
|
containerElement: e,
|
|
518
518
|
direction: i,
|
|
519
519
|
isRtl: a,
|
|
@@ -522,7 +522,7 @@ function Ie({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
522
522
|
clamp: !1,
|
|
523
523
|
containerScrollOffset: t,
|
|
524
524
|
containerSize: n,
|
|
525
|
-
padding:
|
|
525
|
+
padding: je({
|
|
526
526
|
direction: i,
|
|
527
527
|
isRtl: a,
|
|
528
528
|
scrollTarget: p,
|
|
@@ -530,20 +530,20 @@ function Ie({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
530
530
|
})
|
|
531
531
|
}) - t, s = i === "horizontal" && a ? -o : o;
|
|
532
532
|
return {
|
|
533
|
-
scrollOffset:
|
|
533
|
+
scrollOffset: De(p, i) + s,
|
|
534
534
|
scrollTarget: p
|
|
535
535
|
};
|
|
536
536
|
}
|
|
537
537
|
let s = e ? i === "vertical" ? e.scrollTop : e.scrollLeft : 0, c = f && e ? i === "vertical" ? e.clientHeight : e.clientWidth : y, l = r({
|
|
538
538
|
clamp: !0,
|
|
539
|
-
containerScrollOffset:
|
|
539
|
+
containerScrollOffset: Ce({
|
|
540
540
|
containerElement: e,
|
|
541
541
|
direction: i,
|
|
542
542
|
isRtl: a,
|
|
543
543
|
scrollOffset: s
|
|
544
544
|
}),
|
|
545
545
|
containerSize: c,
|
|
546
|
-
padding: e ?
|
|
546
|
+
padding: e ? je({
|
|
547
547
|
direction: i,
|
|
548
548
|
isRtl: a,
|
|
549
549
|
scrollTarget: e,
|
|
@@ -554,14 +554,14 @@ function Ie({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
554
554
|
}
|
|
555
555
|
});
|
|
556
556
|
if (e && (!f || p)) {
|
|
557
|
-
if (l =
|
|
557
|
+
if (l = Ce({
|
|
558
558
|
containerElement: e,
|
|
559
559
|
direction: i,
|
|
560
560
|
isRtl: a,
|
|
561
561
|
scrollOffset: l
|
|
562
562
|
}), !f && typeof e.scrollTo != "function") {
|
|
563
563
|
let e = M(l);
|
|
564
|
-
|
|
564
|
+
Ne(T, e) || E(e);
|
|
565
565
|
}
|
|
566
566
|
return {
|
|
567
567
|
scrollOffset: l,
|
|
@@ -576,33 +576,33 @@ function Ie({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
576
576
|
stopIndexVisible: k
|
|
577
577
|
};
|
|
578
578
|
}
|
|
579
|
-
function
|
|
580
|
-
let [t, n] =
|
|
581
|
-
return
|
|
579
|
+
function Ve(e) {
|
|
580
|
+
let [t, n] = H(e);
|
|
581
|
+
return Ne(t, e) ? t : (n(e), e);
|
|
582
582
|
}
|
|
583
|
-
function
|
|
583
|
+
function He(e, t) {
|
|
584
584
|
let { ariaAttributes: n, style: r, ...i } = e, { ariaAttributes: a, style: o, ...s } = t;
|
|
585
|
-
return
|
|
585
|
+
return Ne(n, a) && Ne(r, o) && Ne(i, s);
|
|
586
586
|
}
|
|
587
|
-
var
|
|
588
|
-
function
|
|
589
|
-
let t = e.getAttribute(
|
|
587
|
+
var Ue = "data-react-window-index", We = "data-index";
|
|
588
|
+
function Ge(e) {
|
|
589
|
+
let t = e.getAttribute(Ue) ?? e.getAttribute(We);
|
|
590
590
|
return t !== null && /^\d+$/.test(t) ? Number(t) : void 0;
|
|
591
591
|
}
|
|
592
|
-
var
|
|
593
|
-
function
|
|
592
|
+
var Ke = 1e3, qe = 500;
|
|
593
|
+
function Je(e) {
|
|
594
594
|
return 1 - (1 - e) ** 3;
|
|
595
595
|
}
|
|
596
|
-
function
|
|
597
|
-
let c = e === "vertical", l =
|
|
596
|
+
function Ye({ direction: e, element: t, getCellBounds: n, isDynamicSize: r, itemCount: i, itemElements: a, scrollTarget: o, getScrollPositionForIndex: s }) {
|
|
597
|
+
let c = e === "vertical", l = V(null), u = V(void 0), d = be(() => {
|
|
598
598
|
l.current = null, u.current !== void 0 && (u.current.view.cancelAnimationFrame(u.current.id), u.current = void 0);
|
|
599
|
-
}), f =
|
|
600
|
-
let e =
|
|
599
|
+
}), f = be(() => {
|
|
600
|
+
let e = J(t);
|
|
601
601
|
u.current = {
|
|
602
602
|
id: e.requestAnimationFrame(p),
|
|
603
603
|
view: e
|
|
604
604
|
};
|
|
605
|
-
}), p =
|
|
605
|
+
}), p = be(() => {
|
|
606
606
|
u.current = void 0;
|
|
607
607
|
let o = l.current;
|
|
608
608
|
if (!o) return;
|
|
@@ -616,27 +616,27 @@ function Ge({ direction: e, element: t, getCellBounds: n, isDynamicSize: r, item
|
|
|
616
616
|
index: o.index
|
|
617
617
|
});
|
|
618
618
|
if (m !== void 0) {
|
|
619
|
-
let { scrollOffset: t, scrollTarget: r } = m, s = Math.max(0, Math.min(t,
|
|
619
|
+
let { scrollOffset: t, scrollTarget: r } = m, s = Math.max(0, Math.min(t, Oe(r, e)));
|
|
620
620
|
o.animation === void 0 && (o.animation = {
|
|
621
|
-
deadline: p + (o.smooth ?
|
|
622
|
-
startOffset:
|
|
621
|
+
deadline: p + (o.smooth ? qe : 0) + Ke,
|
|
622
|
+
startOffset: De(r, e),
|
|
623
623
|
startTime: p
|
|
624
624
|
});
|
|
625
|
-
let l = o.smooth ? (p - o.animation.startTime) /
|
|
625
|
+
let l = o.smooth ? (p - o.animation.startTime) / qe : 1;
|
|
626
626
|
if (l < 1) {
|
|
627
627
|
let { startOffset: e } = o.animation;
|
|
628
628
|
o.stableFrames = 0, r.scrollTo({
|
|
629
629
|
behavior: "instant",
|
|
630
|
-
[c ? "top" : "left"]: e + (s - e) *
|
|
630
|
+
[c ? "top" : "left"]: e + (s - e) * Je(l)
|
|
631
631
|
});
|
|
632
|
-
} else if (Math.abs(s -
|
|
632
|
+
} else if (Math.abs(s - De(r, e)) > 1) o.stableFrames = 0, r.scrollTo({
|
|
633
633
|
behavior: "instant",
|
|
634
634
|
[c ? "top" : "left"]: s
|
|
635
635
|
});
|
|
636
636
|
else {
|
|
637
637
|
let e = a.current;
|
|
638
|
-
if (!(e.some((e) =>
|
|
639
|
-
let t =
|
|
638
|
+
if (!(e.some((e) => Ge(e) === o.index) && e.every((e) => {
|
|
639
|
+
let t = Ge(e);
|
|
640
640
|
if (t === void 0 || t >= i) return !0;
|
|
641
641
|
let r = c ? e.offsetHeight : e.offsetWidth;
|
|
642
642
|
return Math.abs(n(t).size - r) <= 1;
|
|
@@ -649,7 +649,7 @@ function Ge({ direction: e, element: t, getCellBounds: n, isDynamicSize: r, item
|
|
|
649
649
|
}
|
|
650
650
|
f();
|
|
651
651
|
});
|
|
652
|
-
return
|
|
652
|
+
return q(() => {
|
|
653
653
|
let e = o ?? t;
|
|
654
654
|
if (!e) return;
|
|
655
655
|
let n = (e) => {
|
|
@@ -678,7 +678,7 @@ function Ge({ direction: e, element: t, getCellBounds: n, isDynamicSize: r, item
|
|
|
678
678
|
align: "auto",
|
|
679
679
|
index: a
|
|
680
680
|
});
|
|
681
|
-
n = t === void 0 || t.scrollOffset ===
|
|
681
|
+
n = t === void 0 || t.scrollOffset === De(t.scrollTarget, e) ? "auto" : "center";
|
|
682
682
|
}
|
|
683
683
|
let o = s({
|
|
684
684
|
align: n,
|
|
@@ -710,11 +710,11 @@ function Ge({ direction: e, element: t, getCellBounds: n, isDynamicSize: r, item
|
|
|
710
710
|
s
|
|
711
711
|
]);
|
|
712
712
|
}
|
|
713
|
-
function
|
|
714
|
-
let r =
|
|
713
|
+
function Xe({ callback: e, element: t, enabled: n = !0 }) {
|
|
714
|
+
let r = be(e);
|
|
715
715
|
R(() => {
|
|
716
716
|
if (!n || !t) return;
|
|
717
|
-
let e =
|
|
717
|
+
let e = J(t), i = e.requestAnimationFrame(() => {
|
|
718
718
|
i = e.requestAnimationFrame(r);
|
|
719
719
|
});
|
|
720
720
|
return () => {
|
|
@@ -726,7 +726,7 @@ function Ke({ callback: e, element: t, enabled: n = !0 }) {
|
|
|
726
726
|
r
|
|
727
727
|
]);
|
|
728
728
|
}
|
|
729
|
-
function
|
|
729
|
+
function Y({ elements: e, isFlowLayout: t, rowCount: n, startIndex: r, stopIndex: i }) {
|
|
730
730
|
if (r < 0 || i < r) return [];
|
|
731
731
|
let a = [], o = /* @__PURE__ */ new Set(), s = !0;
|
|
732
732
|
for (let t of e) {
|
|
@@ -749,20 +749,20 @@ function qe({ elements: e, isFlowLayout: t, rowCount: n, startIndex: r, stopInde
|
|
|
749
749
|
index: r + t
|
|
750
750
|
}));
|
|
751
751
|
}
|
|
752
|
-
function
|
|
752
|
+
function Ze(e) {
|
|
753
753
|
return typeof e == "object" && !!e && "getAverageRowHeight" in e && typeof e.getAverageRowHeight == "function";
|
|
754
754
|
}
|
|
755
|
-
var
|
|
756
|
-
function
|
|
757
|
-
let _ =
|
|
758
|
-
|
|
755
|
+
var Qe = "data-react-window-sizer";
|
|
756
|
+
function $e({ children: e, className: t, defaultHeight: n = 0, defaultScrollOffset: r = 0, listRef: i, onResize: a, onRowsRendered: o, overscanCount: s = 3, rowComponent: c, rowCount: l, rowHeight: u, rowKey: d, rowProps: f, scrollElement: p, tagName: m = "div", style: h, ...g }) {
|
|
757
|
+
let _ = Ve(f), v = B(() => I(c, He), [c]), [y, b] = H(null), x = Ze(u), S = B(() => x ? (e) => u.getRowHeight(e) ?? u.getAverageRowHeight() : u, [x, u]), C = ge(), [w, T] = H(() => C && x), E = V(u);
|
|
758
|
+
q(() => {
|
|
759
759
|
w && E.current !== u && T(!1);
|
|
760
|
-
}, [w, u]),
|
|
760
|
+
}, [w, u]), Xe({
|
|
761
761
|
callback: () => T(!1),
|
|
762
762
|
element: y,
|
|
763
763
|
enabled: w
|
|
764
764
|
});
|
|
765
|
-
let { getCellBounds: D, getEstimatedSize: O, scrollTarget: k, getScrollPositionForIndex: A, startIndexOverscan: j, startIndexVisible: M, stopIndexOverscan: N, stopIndexVisible: L } =
|
|
765
|
+
let { getCellBounds: D, getEstimatedSize: O, scrollTarget: k, getScrollPositionForIndex: A, startIndexOverscan: j, startIndexVisible: M, stopIndexOverscan: N, stopIndexVisible: L } = Be({
|
|
766
766
|
containerElement: y,
|
|
767
767
|
containerStyle: h,
|
|
768
768
|
defaultContainerSize: n,
|
|
@@ -774,42 +774,42 @@ function Xe({ children: e, className: t, defaultHeight: n = 0, defaultScrollOffs
|
|
|
774
774
|
onResize: a,
|
|
775
775
|
overscanCount: s,
|
|
776
776
|
scrollElement: p
|
|
777
|
-
}),
|
|
777
|
+
}), ee = V([]), z = Ye({
|
|
778
778
|
direction: "vertical",
|
|
779
779
|
element: y,
|
|
780
780
|
getCellBounds: D,
|
|
781
781
|
isDynamicSize: x,
|
|
782
782
|
itemCount: l,
|
|
783
|
-
itemElements:
|
|
783
|
+
itemElements: ee,
|
|
784
784
|
scrollTarget: k,
|
|
785
785
|
getScrollPositionForIndex: A
|
|
786
786
|
});
|
|
787
|
-
|
|
787
|
+
te(i, () => ({
|
|
788
788
|
get element() {
|
|
789
789
|
return y;
|
|
790
790
|
},
|
|
791
|
-
scrollToRow:
|
|
792
|
-
}), [y,
|
|
793
|
-
let
|
|
794
|
-
|
|
791
|
+
scrollToRow: z
|
|
792
|
+
}), [y, z]);
|
|
793
|
+
let U = w && x && j === 0;
|
|
794
|
+
q(() => {
|
|
795
795
|
if (!y) return;
|
|
796
|
-
let e = Array.from(y.children).filter((e) => !e.hasAttribute(
|
|
796
|
+
let e = Array.from(y.children).filter((e) => !e.hasAttribute(Qe)), t = Y({
|
|
797
797
|
elements: e,
|
|
798
|
-
isFlowLayout:
|
|
798
|
+
isFlowLayout: U,
|
|
799
799
|
rowCount: l,
|
|
800
800
|
startIndex: j,
|
|
801
801
|
stopIndex: N
|
|
802
802
|
}), n = t.map(({ element: e }) => e);
|
|
803
803
|
if (e.forEach((e) => {
|
|
804
|
-
n.includes(e) || e.removeAttribute(
|
|
804
|
+
n.includes(e) || e.removeAttribute(Ue);
|
|
805
805
|
}), t.forEach(({ element: e, index: t }) => {
|
|
806
|
-
e.setAttribute(
|
|
807
|
-
}),
|
|
806
|
+
e.setAttribute(Ue, `${t}`);
|
|
807
|
+
}), ee.current = n, x) return u.observeRowElements(n);
|
|
808
808
|
}, [
|
|
809
809
|
v,
|
|
810
810
|
y,
|
|
811
811
|
x,
|
|
812
|
-
|
|
812
|
+
U,
|
|
813
813
|
l,
|
|
814
814
|
u,
|
|
815
815
|
d,
|
|
@@ -831,7 +831,7 @@ function Xe({ children: e, className: t, defaultHeight: n = 0, defaultScrollOffs
|
|
|
831
831
|
N,
|
|
832
832
|
L
|
|
833
833
|
]);
|
|
834
|
-
let
|
|
834
|
+
let ne = B(() => {
|
|
835
835
|
let e = [];
|
|
836
836
|
if (l > 0) for (let t = j; t <= N; t++) {
|
|
837
837
|
let n = D(t);
|
|
@@ -844,7 +844,7 @@ function Xe({ children: e, className: t, defaultHeight: n = 0, defaultScrollOffs
|
|
|
844
844
|
},
|
|
845
845
|
key: d ? d(t, _) : t,
|
|
846
846
|
index: t,
|
|
847
|
-
style:
|
|
847
|
+
style: U ? { width: "100%" } : {
|
|
848
848
|
position: "absolute",
|
|
849
849
|
left: 0,
|
|
850
850
|
transform: `translateY(${n.scrollOffset}px)`,
|
|
@@ -858,23 +858,23 @@ function Xe({ children: e, className: t, defaultHeight: n = 0, defaultScrollOffs
|
|
|
858
858
|
v,
|
|
859
859
|
D,
|
|
860
860
|
x,
|
|
861
|
-
|
|
861
|
+
U,
|
|
862
862
|
l,
|
|
863
863
|
d,
|
|
864
864
|
_,
|
|
865
865
|
j,
|
|
866
866
|
N
|
|
867
|
-
]),
|
|
867
|
+
]), G = /* @__PURE__ */ W("div", {
|
|
868
868
|
"aria-hidden": !0,
|
|
869
|
-
[
|
|
869
|
+
[Qe]: "",
|
|
870
870
|
style: {
|
|
871
|
-
position:
|
|
872
|
-
top:
|
|
871
|
+
position: U ? "absolute" : void 0,
|
|
872
|
+
top: U ? 0 : void 0,
|
|
873
873
|
height: O(),
|
|
874
874
|
width: "100%",
|
|
875
875
|
zIndex: -1
|
|
876
876
|
}
|
|
877
|
-
}, "sizer"),
|
|
877
|
+
}, "sizer"), re = /* @__PURE__ */ W(P, { children: e }, "children"), K = /* @__PURE__ */ W(P, { children: ne }, "rows");
|
|
878
878
|
return F(m, {
|
|
879
879
|
role: "list",
|
|
880
880
|
...g,
|
|
@@ -889,72 +889,126 @@ function Xe({ children: e, className: t, defaultHeight: n = 0, defaultScrollOffs
|
|
|
889
889
|
},
|
|
890
890
|
...h
|
|
891
891
|
}
|
|
892
|
-
}, ...
|
|
892
|
+
}, ...U ? [re, K] : [K, re], G);
|
|
893
893
|
}
|
|
894
|
-
var
|
|
894
|
+
var et = /* @__PURE__ */ Object.assign($e, { displayName: "List" }), X = /* @__PURE__ */ function(e) {
|
|
895
895
|
return e.All = "all", e.Chat = "chat", e.Task = "task", e;
|
|
896
|
-
}({}),
|
|
896
|
+
}({}), Z = /* @__PURE__ */ function(e) {
|
|
897
897
|
return e.Avatar = "avatar", e.Indicator = "indicator", e;
|
|
898
|
-
}({}),
|
|
899
|
-
return e.Header = "header", e.Item = "item", e;
|
|
900
|
-
}({}),
|
|
901
|
-
if (n ===
|
|
898
|
+
}({}), Q = /* @__PURE__ */ function(e) {
|
|
899
|
+
return e.Header = "header", e.Item = "item", e.Project = "project", e.ProjectConversation = "project-conversation", e.ProjectSeeAll = "project-see-all", e;
|
|
900
|
+
}({}), tt = (e, t) => t === n.All || e.source === t, nt = (t, n) => {
|
|
901
|
+
if (n === X.All) return !0;
|
|
902
902
|
let r = t.kind ?? e.Chat;
|
|
903
|
-
return n ===
|
|
904
|
-
},
|
|
903
|
+
return n === X.Task ? r === e.Task : r === e.Chat;
|
|
904
|
+
}, rt = (e, t) => !t || e.title.toLowerCase().includes(t.toLowerCase()), it = (e, { searchQuery: t, activeFilter: r, activeTypeFilter: i, hiddenSources: a }) => {
|
|
905
|
+
if (i === X.Task) return [];
|
|
906
|
+
let o = t.toLowerCase(), s = [];
|
|
907
|
+
for (let i of e) {
|
|
908
|
+
let e = i.source ?? n.MyChats;
|
|
909
|
+
if (a?.includes(e) || r !== n.All && r !== e) continue;
|
|
910
|
+
if (!o || i.name.toLowerCase().includes(o)) {
|
|
911
|
+
s.push(i);
|
|
912
|
+
continue;
|
|
913
|
+
}
|
|
914
|
+
let c = i.conversations.filter((e) => rt(e, t));
|
|
915
|
+
c.length > 0 && s.push({
|
|
916
|
+
...i,
|
|
917
|
+
conversations: c,
|
|
918
|
+
hasMore: !1
|
|
919
|
+
});
|
|
920
|
+
}
|
|
921
|
+
return s;
|
|
922
|
+
}, at = {
|
|
923
|
+
guideLine: "_guideLine_1hyjn_7",
|
|
924
|
+
guideLineFirst: "_guideLineFirst_1hyjn_18",
|
|
925
|
+
guideLineLast: "_guideLineLast_1hyjn_22",
|
|
926
|
+
seeAllText: "_seeAllText_1hyjn_26",
|
|
927
|
+
projectIcon: "_projectIcon_1hyjn_27"
|
|
928
|
+
}, ot = (e) => `${60 + e * 23 % 35}%`, st = (e, t, n = Z.Avatar) => e ? t ? "pe-9" : "pe-2 group-focus-within/conversation:pe-9 group-hover/conversation:pe-9" : n === Z.Indicator ? "pe-2" : "pe-3", ct = (e) => ({
|
|
929
|
+
"aria-level": 2,
|
|
930
|
+
"aria-posinset": e.posInSet,
|
|
931
|
+
"aria-setsize": e.setSize,
|
|
932
|
+
className: a("ps-7", at.guideLine, e.isFirstNested && at.guideLineFirst, e.isLastNested && at.guideLineLast)
|
|
933
|
+
}), lt = (e, t) => {
|
|
905
934
|
let n = t.rows[e];
|
|
906
|
-
return t.rowVariant ===
|
|
907
|
-
},
|
|
935
|
+
return n.kind === Q.Project || n.kind === Q.ProjectConversation || n.kind === Q.ProjectSeeAll ? 34 : t.rowVariant === Z.Indicator ? n.kind === Q.Item ? 34 : e === 0 ? 32 : 40 : n.kind === Q.Item ? 36 : e === 0 ? 24 : 56;
|
|
936
|
+
}, ut = 5, dt = (e) => Math.max(ut, Math.ceil(Math.ceil(e / 36) / 2)), ft = (e, { startIndex: t, stopIndex: n }) => {
|
|
908
937
|
let r = /* @__PURE__ */ new Set();
|
|
909
938
|
for (let i = Math.max(0, t); i <= Math.min(n, e.length - 1); i++) {
|
|
910
939
|
let t = e[i];
|
|
911
|
-
t.kind ===
|
|
940
|
+
t.kind === Q.Item && r.add(t.item.id);
|
|
912
941
|
}
|
|
913
942
|
return [...r];
|
|
914
|
-
},
|
|
943
|
+
}, pt = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), mt = (e) => {
|
|
944
|
+
let t = e.conversations.length + +!!e.hasMore, n = [{
|
|
945
|
+
kind: Q.Project,
|
|
946
|
+
project: e
|
|
947
|
+
}];
|
|
948
|
+
return e.conversations.forEach((r, i) => {
|
|
949
|
+
n.push({
|
|
950
|
+
kind: Q.ProjectConversation,
|
|
951
|
+
item: r,
|
|
952
|
+
projectId: e.id,
|
|
953
|
+
posInSet: i + 1,
|
|
954
|
+
setSize: t,
|
|
955
|
+
isFirstNested: i === 0,
|
|
956
|
+
isLastNested: i + 1 === t
|
|
957
|
+
});
|
|
958
|
+
}), e.hasMore && n.push({
|
|
959
|
+
kind: Q.ProjectSeeAll,
|
|
960
|
+
project: e,
|
|
961
|
+
projectId: e.id,
|
|
962
|
+
posInSet: t,
|
|
963
|
+
setSize: t,
|
|
964
|
+
isFirstNested: t === 1,
|
|
965
|
+
isLastNested: !0
|
|
966
|
+
}), n;
|
|
967
|
+
}, ht = (e) => {
|
|
915
968
|
switch (e) {
|
|
916
969
|
case n.Shared: return n.Shared;
|
|
917
970
|
case n.Organization: return n.Organization;
|
|
918
971
|
default: return n.MyChats;
|
|
919
972
|
}
|
|
920
|
-
},
|
|
973
|
+
}, gt = (e, t) => {
|
|
921
974
|
let n = null;
|
|
922
|
-
for (let r of e) if (r.kind ===
|
|
923
|
-
else if (r.item.id === t) return n;
|
|
975
|
+
for (let r of e) if (r.kind === Q.Header) n = r.groupKey;
|
|
976
|
+
else if (r.kind === Q.Item && r.item.id === t) return n;
|
|
924
977
|
return null;
|
|
925
|
-
},
|
|
978
|
+
}, _t = (e, t, r) => {
|
|
926
979
|
let i = /* @__PURE__ */ new Set();
|
|
927
980
|
if (t != null && i.add(t), t === n.Pinned) {
|
|
928
981
|
let t = r.find((t) => t.id === e);
|
|
929
|
-
t && i.add(
|
|
982
|
+
t && i.add(ht(t.source));
|
|
930
983
|
} else i.add(n.Pinned);
|
|
931
984
|
return i;
|
|
932
|
-
},
|
|
985
|
+
}, vt = (e, t, n, r) => {
|
|
933
986
|
let i = e.currentTarget.getBoundingClientRect();
|
|
934
987
|
if (e.clientY >= i.top + i.height / 2) return t;
|
|
935
988
|
let a = null, o = !1;
|
|
936
|
-
for (let e of n) if (e.kind ===
|
|
937
|
-
else if (o) {
|
|
989
|
+
for (let e of n) if (e.kind === Q.Header) o = e.groupKey === r;
|
|
990
|
+
else if (e.kind === Q.Item && o) {
|
|
938
991
|
if (e.item.id === t) return a;
|
|
939
992
|
a = e.item.id;
|
|
940
993
|
}
|
|
941
994
|
return null;
|
|
942
995
|
}, $ = {
|
|
943
996
|
skeletonColor: "var(--cp-skeleton-color, var(--bg-control-disable-primary, #dce0e8))",
|
|
944
|
-
item: "
|
|
945
|
-
itemActive: "
|
|
946
|
-
itemIndicator: "
|
|
947
|
-
indicatorDot: "
|
|
948
|
-
groupHeader: "
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
997
|
+
item: "_item_6sbjj_2",
|
|
998
|
+
itemActive: "_itemActive_6sbjj_17",
|
|
999
|
+
itemIndicator: "_itemIndicator_6sbjj_26",
|
|
1000
|
+
indicatorDot: "_indicatorDot_6sbjj_30",
|
|
1001
|
+
groupHeader: "_groupHeader_6sbjj_34",
|
|
1002
|
+
groupHeaderIndicator: "_groupHeaderIndicator_6sbjj_39",
|
|
1003
|
+
dropZoneActive: "_dropZoneActive_6sbjj_43",
|
|
1004
|
+
triggerActive: "_triggerActive_6sbjj_47",
|
|
1005
|
+
triggerIcon: "_triggerIcon_6sbjj_50",
|
|
1006
|
+
unreadDot: "_unreadDot_6sbjj_58",
|
|
1007
|
+
search: "_search_6sbjj_66",
|
|
1008
|
+
list: "_list_6sbjj_77"
|
|
1009
|
+
}, yt = ({ 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 }) => {
|
|
1010
|
+
let f = s != null, p = o === Z.Indicator;
|
|
1011
|
+
return /* @__PURE__ */ G("button", {
|
|
958
1012
|
type: "button",
|
|
959
1013
|
"aria-expanded": t,
|
|
960
1014
|
"aria-controls": r,
|
|
@@ -968,27 +1022,27 @@ var Ze = /* @__PURE__ */ Object.assign(Xe, { displayName: "List" }), Q = /* @__P
|
|
|
968
1022
|
onDrop: f ? (e) => {
|
|
969
1023
|
f && (e.preventDefault(), d?.(s, s, null));
|
|
970
1024
|
} : void 0,
|
|
971
|
-
className: a("group flex h-6 w-full items-center gap-1 rounded text-start", p ? "px-2" : "py-1 pe-3", i, $.groupHeader, c && $.dropZoneActive),
|
|
1025
|
+
className: a("group flex h-6 w-full items-center gap-1 rounded text-start", p ? "px-2" : "py-1 pe-3", i, $.groupHeader, p && $.groupHeaderIndicator, c && $.dropZoneActive),
|
|
972
1026
|
children: [
|
|
973
|
-
!p && (t ? /* @__PURE__ */
|
|
1027
|
+
!p && (t ? /* @__PURE__ */ W(K, {
|
|
974
1028
|
size: 12,
|
|
975
1029
|
className: "shrink-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-visible:opacity-100",
|
|
976
1030
|
"aria-hidden": !0
|
|
977
|
-
}) : /* @__PURE__ */
|
|
1031
|
+
}) : /* @__PURE__ */ W(ie, {
|
|
978
1032
|
size: 12,
|
|
979
1033
|
className: "shrink-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-visible:opacity-100 rtl:scale-x-[-1]",
|
|
980
1034
|
"aria-hidden": !0
|
|
981
1035
|
})),
|
|
982
|
-
p ? /* @__PURE__ */
|
|
1036
|
+
p ? /* @__PURE__ */ W("span", {
|
|
983
1037
|
className: "max-w-full min-w-0",
|
|
984
|
-
children: /* @__PURE__ */
|
|
985
|
-
}) : /* @__PURE__ */
|
|
986
|
-
p && (t ? /* @__PURE__ */
|
|
1038
|
+
children: /* @__PURE__ */ W(v, { text: e })
|
|
1039
|
+
}) : /* @__PURE__ */ W(v, { text: e }),
|
|
1040
|
+
p && (t ? /* @__PURE__ */ W(ae, {
|
|
987
1041
|
size: m.SM,
|
|
988
1042
|
stroke: h,
|
|
989
1043
|
className: "shrink-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-visible:opacity-100",
|
|
990
1044
|
"aria-hidden": !0
|
|
991
|
-
}) : /* @__PURE__ */
|
|
1045
|
+
}) : /* @__PURE__ */ W(oe, {
|
|
992
1046
|
size: m.SM,
|
|
993
1047
|
stroke: h,
|
|
994
1048
|
className: "shrink-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-visible:opacity-100 rtl:scale-x-[-1]",
|
|
@@ -996,212 +1050,331 @@ var Ze = /* @__PURE__ */ Object.assign(Xe, { displayName: "List" }), Q = /* @__P
|
|
|
996
1050
|
}))
|
|
997
1051
|
]
|
|
998
1052
|
});
|
|
999
|
-
},
|
|
1000
|
-
let [
|
|
1001
|
-
|
|
1002
|
-
|
|
1053
|
+
}, bt = (e, t, n) => {
|
|
1054
|
+
let [r, i] = H(!1), a = B(() => t?.(e) ?? [], [t, e]), o = L((t) => n?.(e, t), [n, e]);
|
|
1055
|
+
return {
|
|
1056
|
+
menuItems: a,
|
|
1057
|
+
hasActions: a.length > 0,
|
|
1058
|
+
isMenuOpen: r,
|
|
1059
|
+
handleOpenChange: i,
|
|
1060
|
+
handleOpen: o
|
|
1061
|
+
};
|
|
1062
|
+
}, xt = I(({ items: e, isOpen: t, onOpenChange: n, onOpen: r, actionsLabel: i, variant: o = Z.Indicator }) => {
|
|
1063
|
+
let s = o === Z.Indicator, c = V(null), l = L((e) => {
|
|
1064
|
+
n(e), e && c.current && r?.(c.current);
|
|
1065
|
+
}, [n, r]);
|
|
1066
|
+
return /* @__PURE__ */ W("div", {
|
|
1067
|
+
className: a("absolute inset-y-0 flex items-center", s ? "inset-e-2" : "inset-e-1", t ? "opacity-100" : "opacity-0 group-focus-within/conversation:opacity-100 group-hover/conversation:opacity-100"),
|
|
1068
|
+
children: /* @__PURE__ */ W(g, {
|
|
1069
|
+
items: e,
|
|
1070
|
+
onOpenChange: l,
|
|
1071
|
+
matchReferenceWidth: !1,
|
|
1072
|
+
listClassName: "w-[200px]",
|
|
1073
|
+
children: /* @__PURE__ */ W(b, {
|
|
1074
|
+
ref: c,
|
|
1075
|
+
icon: /* @__PURE__ */ W(se, {
|
|
1076
|
+
size: s ? m.SM : m.MD,
|
|
1077
|
+
className: $.triggerIcon,
|
|
1078
|
+
"aria-hidden": !0,
|
|
1079
|
+
stroke: h
|
|
1080
|
+
}),
|
|
1081
|
+
size: _.Small,
|
|
1082
|
+
"aria-label": i,
|
|
1083
|
+
className: a(s && "size-6! min-h-0! min-w-0! p-1!", t && $.triggerActive)
|
|
1084
|
+
})
|
|
1085
|
+
})
|
|
1086
|
+
});
|
|
1087
|
+
}), St = ({ href: e, onSelect: t, "aria-label": n, ...r }) => /* @__PURE__ */ W("a", {
|
|
1088
|
+
href: e,
|
|
1089
|
+
"aria-label": e ? n : void 0,
|
|
1090
|
+
className: "contents",
|
|
1091
|
+
onClick: (n) => {
|
|
1092
|
+
e && (n.preventDefault(), t());
|
|
1093
|
+
},
|
|
1094
|
+
children: /* @__PURE__ */ W(f, {
|
|
1095
|
+
...r,
|
|
1096
|
+
"aria-label": n,
|
|
1097
|
+
onClick: e ? void 0 : t,
|
|
1098
|
+
tabIndex: e ? -1 : void 0
|
|
1099
|
+
})
|
|
1100
|
+
}), Ct = I(({ 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: f = "Unread", variant: p = Z.Avatar, nesting: h, rowGroupKey: g, rows: _, draggingId: v, dragOverId: y, allowedDropGroups: b, onDragStart: S, onDragEnd: C, onDragOver: w, onDragLeave: T, onDrop: E }) => {
|
|
1101
|
+
let { menuItems: D, hasActions: O, isMenuOpen: k, handleOpenChange: M, handleOpen: N } = bt(e, o, s), P = B(() => ({ tooltip: e.iconTooltip }), [e.iconTooltip]), F = B(() => ({ badgeClassName: d }), [d]), I = p === Z.Indicator, R = e.leadingIcon ? /* @__PURE__ */ W("span", {
|
|
1003
1102
|
className: "flex size-6 shrink-0 items-center justify-center",
|
|
1004
1103
|
children: e.leadingIcon
|
|
1005
|
-
}) : e.isIconLoading ? /* @__PURE__ */
|
|
1104
|
+
}) : e.isIconLoading ? /* @__PURE__ */ W(A, {
|
|
1006
1105
|
variant: j.Circular,
|
|
1007
1106
|
width: m.LG,
|
|
1008
1107
|
height: m.LG,
|
|
1009
1108
|
color: $.skeletonColor,
|
|
1010
1109
|
"aria-hidden": !0
|
|
1011
|
-
}) : /* @__PURE__ */
|
|
1110
|
+
}) : /* @__PURE__ */ W(t, {
|
|
1012
1111
|
src: e.iconUrl,
|
|
1013
1112
|
size: m.LG,
|
|
1014
1113
|
initialsName: e.iconTooltip ?? "",
|
|
1015
|
-
labels:
|
|
1016
|
-
styles:
|
|
1017
|
-
}),
|
|
1114
|
+
labels: P,
|
|
1115
|
+
styles: F
|
|
1116
|
+
}), ee = st(O, k, p), te = /* @__PURE__ */ G("span", {
|
|
1018
1117
|
className: "flex size-6 shrink-0 items-center justify-center",
|
|
1019
|
-
children: [/* @__PURE__ */
|
|
1020
|
-
className: a("size-
|
|
1118
|
+
children: [/* @__PURE__ */ W("span", {
|
|
1119
|
+
className: a("size-[7.11px] rounded-full", e.isUnread ? $.unreadDot : $.indicatorDot),
|
|
1021
1120
|
"aria-hidden": !0
|
|
1022
|
-
}), e.isUnread && /* @__PURE__ */
|
|
1121
|
+
}), e.isUnread && /* @__PURE__ */ W("span", {
|
|
1023
1122
|
className: "sr-only",
|
|
1024
|
-
children:
|
|
1123
|
+
children: f
|
|
1025
1124
|
})]
|
|
1026
|
-
}),
|
|
1125
|
+
}), z = e.isUnread && !I ? /* @__PURE__ */ G("span", {
|
|
1027
1126
|
className: "flex size-6 shrink-0 items-center justify-center",
|
|
1028
|
-
children: [/* @__PURE__ */
|
|
1029
|
-
className: a("size-[7.11px] rounded-full", $.unreadDot,
|
|
1127
|
+
children: [/* @__PURE__ */ W("span", {
|
|
1128
|
+
className: a("size-[7.11px] rounded-full", $.unreadDot, O && (k ? "opacity-0" : "group-focus-within/conversation:opacity-0 group-hover/conversation:opacity-0")),
|
|
1030
1129
|
"aria-hidden": !0
|
|
1031
|
-
}), /* @__PURE__ */
|
|
1130
|
+
}), /* @__PURE__ */ W("span", {
|
|
1032
1131
|
className: "sr-only",
|
|
1033
|
-
children:
|
|
1132
|
+
children: f
|
|
1034
1133
|
})]
|
|
1035
|
-
}) : void 0,
|
|
1036
|
-
e.currentTarget.contains(e.relatedTarget) ||
|
|
1037
|
-
}, [
|
|
1038
|
-
if (!
|
|
1134
|
+
}) : void 0, V = g != null, H = L((e) => {
|
|
1135
|
+
e.currentTarget.contains(e.relatedTarget) || T?.();
|
|
1136
|
+
}, [T]), U = L((t) => {
|
|
1137
|
+
if (!g || !_ || !E) return;
|
|
1039
1138
|
t.preventDefault();
|
|
1040
|
-
let n =
|
|
1041
|
-
|
|
1139
|
+
let n = vt(t, e.id, _, g);
|
|
1140
|
+
E(e.id, g, n);
|
|
1042
1141
|
}, [
|
|
1043
1142
|
e.id,
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
]),
|
|
1048
|
-
return /* @__PURE__ */
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1143
|
+
_,
|
|
1144
|
+
g,
|
|
1145
|
+
E
|
|
1146
|
+
]), ne = e.id === v, re = e.id === y, K = g != null && (b?.has(g) ?? !1), ie = v != null, ae = h ? ct(h) : void 0;
|
|
1147
|
+
return /* @__PURE__ */ G("li", {
|
|
1148
|
+
...ae,
|
|
1149
|
+
className: a("group/conversation relative", ae?.className, ne && "cursor-grabbing opacity-50", re && K && "rounded", re && K && $.dropZoneActive, ie && !ne && !K && "cursor-not-allowed"),
|
|
1150
|
+
draggable: V || void 0,
|
|
1151
|
+
onDragStart: V ? () => S?.(e.id) : void 0,
|
|
1152
|
+
onDragEnd: V ? C : void 0,
|
|
1153
|
+
onDragOver: V ? (t) => {
|
|
1154
|
+
t.preventDefault(), w?.(e.id);
|
|
1055
1155
|
} : void 0,
|
|
1056
|
-
onDragLeave:
|
|
1057
|
-
onDrop:
|
|
1058
|
-
children: [/* @__PURE__ */
|
|
1156
|
+
onDragLeave: V ? H : void 0,
|
|
1157
|
+
onDrop: V ? U : void 0,
|
|
1158
|
+
children: [/* @__PURE__ */ W(St, {
|
|
1059
1159
|
href: e.href,
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
})
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
"aria-
|
|
1096
|
-
className: a(W && "size-6! min-h-0! min-w-0! p-1!", N && $.triggerActive)
|
|
1160
|
+
onSelect: () => r(e.id),
|
|
1161
|
+
iconBefore: I ? te : R,
|
|
1162
|
+
label: /* @__PURE__ */ W(x, {
|
|
1163
|
+
text: e.title,
|
|
1164
|
+
query: i,
|
|
1165
|
+
className: e.isUnread ? u : l,
|
|
1166
|
+
maxLines: 1
|
|
1167
|
+
}),
|
|
1168
|
+
iconAfter: z,
|
|
1169
|
+
textClassName: "min-w-0 flex-1",
|
|
1170
|
+
"aria-current": n ? "page" : void 0,
|
|
1171
|
+
className: a("h-8 w-full justify-start py-2 after:pointer-events-none", I ? "gap-0.5 ps-2" : "gap-2 ps-3", ee, $.item, I && $.itemIndicator, n && $.itemActive, k && $.itemActive)
|
|
1172
|
+
}), O && /* @__PURE__ */ W(xt, {
|
|
1173
|
+
items: D,
|
|
1174
|
+
isOpen: k,
|
|
1175
|
+
onOpenChange: M,
|
|
1176
|
+
onOpen: N,
|
|
1177
|
+
actionsLabel: c,
|
|
1178
|
+
variant: p
|
|
1179
|
+
})]
|
|
1180
|
+
});
|
|
1181
|
+
}), wt = I(({ project: e, isActive: t, onSelectProject: n, searchQuery: r = "", getActions: i, onActionMenuOpen: o, actionsLabel: s = "More actions", titleClassName: c = "dial-small-text" }) => {
|
|
1182
|
+
let { menuItems: l, hasActions: u, isMenuOpen: d, handleOpenChange: f, handleOpen: p } = bt(e, i, o);
|
|
1183
|
+
return /* @__PURE__ */ G("li", {
|
|
1184
|
+
"aria-level": 1,
|
|
1185
|
+
className: "group/conversation relative",
|
|
1186
|
+
children: [/* @__PURE__ */ W(St, {
|
|
1187
|
+
href: e.href,
|
|
1188
|
+
onSelect: () => n(e.id),
|
|
1189
|
+
iconBefore: /* @__PURE__ */ W("span", {
|
|
1190
|
+
className: "flex size-6 shrink-0 items-center justify-center",
|
|
1191
|
+
children: /* @__PURE__ */ W(re, {
|
|
1192
|
+
size: m.SM,
|
|
1193
|
+
stroke: h,
|
|
1194
|
+
className: at.projectIcon,
|
|
1195
|
+
"aria-hidden": !0
|
|
1097
1196
|
})
|
|
1098
|
-
})
|
|
1197
|
+
}),
|
|
1198
|
+
label: /* @__PURE__ */ W(x, {
|
|
1199
|
+
text: e.name,
|
|
1200
|
+
query: r,
|
|
1201
|
+
className: c,
|
|
1202
|
+
maxLines: 1
|
|
1203
|
+
}),
|
|
1204
|
+
textClassName: "min-w-0 flex-1",
|
|
1205
|
+
"aria-current": t ? "page" : void 0,
|
|
1206
|
+
className: a("h-8 w-full justify-start gap-0.5 py-2 ps-2 after:pointer-events-none", st(u, d, Z.Indicator), $.item, $.itemIndicator, (t || d) && $.itemActive)
|
|
1207
|
+
}), u && /* @__PURE__ */ W(xt, {
|
|
1208
|
+
items: l,
|
|
1209
|
+
isOpen: d,
|
|
1210
|
+
onOpenChange: f,
|
|
1211
|
+
onOpen: p,
|
|
1212
|
+
actionsLabel: s
|
|
1099
1213
|
})]
|
|
1100
1214
|
});
|
|
1101
|
-
}),
|
|
1102
|
-
let
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1215
|
+
}), Tt = (e) => `See all chats in ${e}`, Et = I(({ project: e, position: t, onSeeAll: n, label: r = "See all", ariaLabel: i = Tt, titleClassName: o = "dial-small-text" }) => {
|
|
1216
|
+
let s = ct(t);
|
|
1217
|
+
return /* @__PURE__ */ W("li", {
|
|
1218
|
+
...s,
|
|
1219
|
+
className: a("relative", s.className),
|
|
1220
|
+
children: /* @__PURE__ */ W(St, {
|
|
1221
|
+
href: e.href,
|
|
1222
|
+
onSelect: () => n(e.id),
|
|
1223
|
+
label: /* @__PURE__ */ W("span", {
|
|
1224
|
+
className: a("block truncate text-start", o, at.seeAllText),
|
|
1225
|
+
children: r
|
|
1226
|
+
}),
|
|
1227
|
+
"aria-label": i(e.name),
|
|
1228
|
+
textClassName: "min-w-0 flex-1",
|
|
1229
|
+
className: a("h-8 w-full justify-start py-2 ps-2 pe-2 after:pointer-events-none", $.item, $.itemIndicator)
|
|
1230
|
+
})
|
|
1231
|
+
});
|
|
1232
|
+
}), Dt = (e, t) => t ? e === 0 ? "pt-2" : "pt-4" : e === 0 ? "pt-0" : "pt-8", Ot = ({ 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, activeProjectId: m, onSelectProject: h, onSelectProjectConversation: g, onSeeAll: _, getProjectActions: v, onProjectActionMenuOpen: y, seeAllLabel: b, seeAllAriaLabel: x, styles: S, rowVariant: C = Z.Avatar, draggingId: w, dragOverId: T, allowedDropGroups: E, onDragStart: D, onDragEnd: O, onDragOver: k, onDragLeave: A, onDrop: j }) => {
|
|
1233
|
+
let M = r[e], N = C === Z.Indicator;
|
|
1234
|
+
if (M.kind === Q.Header) {
|
|
1235
|
+
let r = M.groupKey === n.Pinned;
|
|
1236
|
+
return /* @__PURE__ */ W("div", {
|
|
1106
1237
|
role: "listitem",
|
|
1107
1238
|
style: t,
|
|
1108
|
-
className:
|
|
1109
|
-
children: /* @__PURE__ */
|
|
1110
|
-
variant:
|
|
1111
|
-
label:
|
|
1112
|
-
isExpanded: i.has(
|
|
1113
|
-
onToggle: () => a(
|
|
1239
|
+
className: Dt(e, N),
|
|
1240
|
+
children: /* @__PURE__ */ W(yt, {
|
|
1241
|
+
variant: C,
|
|
1242
|
+
label: M.label,
|
|
1243
|
+
isExpanded: i.has(M.groupKey),
|
|
1244
|
+
onToggle: () => a(M.groupKey),
|
|
1114
1245
|
listId: o,
|
|
1115
|
-
className:
|
|
1246
|
+
className: S?.groupHeaderClassName,
|
|
1116
1247
|
dropZoneGroupKey: r ? n.Pinned : void 0,
|
|
1117
|
-
isDragOver: r &&
|
|
1118
|
-
onDragOver: r ?
|
|
1119
|
-
onDragLeave: r ?
|
|
1120
|
-
onDrop: r ?
|
|
1248
|
+
isDragOver: r && T === n.Pinned,
|
|
1249
|
+
onDragOver: r ? k : void 0,
|
|
1250
|
+
onDragLeave: r ? A : void 0,
|
|
1251
|
+
onDrop: r ? j : void 0
|
|
1121
1252
|
})
|
|
1122
1253
|
});
|
|
1123
1254
|
}
|
|
1124
|
-
return /* @__PURE__ */
|
|
1255
|
+
return M.kind === Q.Project ? /* @__PURE__ */ W("div", {
|
|
1125
1256
|
role: "presentation",
|
|
1126
1257
|
style: t,
|
|
1127
|
-
className:
|
|
1128
|
-
children: /* @__PURE__ */
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1258
|
+
className: "pt-0.5",
|
|
1259
|
+
children: /* @__PURE__ */ W(wt, {
|
|
1260
|
+
project: M.project,
|
|
1261
|
+
isActive: M.project.id === m,
|
|
1262
|
+
onSelectProject: h,
|
|
1263
|
+
searchQuery: c,
|
|
1264
|
+
getActions: v,
|
|
1265
|
+
onActionMenuOpen: y,
|
|
1266
|
+
actionsLabel: f,
|
|
1267
|
+
titleClassName: S?.itemTitleClassName
|
|
1268
|
+
})
|
|
1269
|
+
}) : M.kind === Q.ProjectSeeAll ? /* @__PURE__ */ W("div", {
|
|
1270
|
+
role: "presentation",
|
|
1271
|
+
style: t,
|
|
1272
|
+
className: "pt-0.5",
|
|
1273
|
+
children: /* @__PURE__ */ W(Et, {
|
|
1274
|
+
project: M.project,
|
|
1275
|
+
position: M,
|
|
1276
|
+
onSeeAll: _,
|
|
1277
|
+
label: b,
|
|
1278
|
+
ariaLabel: x,
|
|
1279
|
+
titleClassName: S?.itemTitleClassName
|
|
1280
|
+
})
|
|
1281
|
+
}) : M.kind === Q.ProjectConversation ? /* @__PURE__ */ W("div", {
|
|
1282
|
+
role: "presentation",
|
|
1283
|
+
style: t,
|
|
1284
|
+
className: "pt-0.5",
|
|
1285
|
+
children: /* @__PURE__ */ W(Ct, {
|
|
1286
|
+
variant: Z.Indicator,
|
|
1287
|
+
nesting: M,
|
|
1288
|
+
item: M.item,
|
|
1289
|
+
isActive: M.item.id === s,
|
|
1290
|
+
searchQuery: c,
|
|
1291
|
+
onSelectConversation: g,
|
|
1292
|
+
unreadIndicatorLabel: p,
|
|
1293
|
+
itemTitleClassName: S?.itemTitleClassName,
|
|
1294
|
+
unreadItemTitleClassName: S?.unreadItemTitleClassName
|
|
1295
|
+
})
|
|
1296
|
+
}) : /* @__PURE__ */ W("div", {
|
|
1297
|
+
role: "presentation",
|
|
1298
|
+
style: t,
|
|
1299
|
+
className: N ? "pt-0.5" : "pt-1",
|
|
1300
|
+
children: /* @__PURE__ */ W(Ct, {
|
|
1301
|
+
variant: C,
|
|
1302
|
+
item: M.item,
|
|
1303
|
+
isActive: M.item.id === s,
|
|
1132
1304
|
searchQuery: c,
|
|
1133
1305
|
onSelectConversation: l,
|
|
1134
1306
|
getActions: u,
|
|
1135
1307
|
onActionMenuOpen: d,
|
|
1136
1308
|
actionsLabel: f,
|
|
1137
1309
|
unreadIndicatorLabel: p,
|
|
1138
|
-
itemTitleClassName:
|
|
1139
|
-
unreadItemTitleClassName:
|
|
1140
|
-
itemIconBadgeClassName:
|
|
1141
|
-
rowGroupKey:
|
|
1310
|
+
itemTitleClassName: S?.itemTitleClassName,
|
|
1311
|
+
unreadItemTitleClassName: S?.unreadItemTitleClassName,
|
|
1312
|
+
itemIconBadgeClassName: S?.itemIconBadgeClassName,
|
|
1313
|
+
rowGroupKey: M.groupKey,
|
|
1142
1314
|
rows: r,
|
|
1143
|
-
draggingId:
|
|
1144
|
-
dragOverId:
|
|
1145
|
-
allowedDropGroups:
|
|
1146
|
-
onDragStart:
|
|
1147
|
-
onDragEnd:
|
|
1148
|
-
onDragOver:
|
|
1149
|
-
onDragLeave:
|
|
1150
|
-
onDrop:
|
|
1315
|
+
draggingId: w,
|
|
1316
|
+
dragOverId: T,
|
|
1317
|
+
allowedDropGroups: E,
|
|
1318
|
+
onDragStart: D,
|
|
1319
|
+
onDragEnd: O,
|
|
1320
|
+
onDragOver: k,
|
|
1321
|
+
onDragLeave: A,
|
|
1322
|
+
onDrop: j
|
|
1151
1323
|
})
|
|
1152
1324
|
});
|
|
1153
|
-
},
|
|
1325
|
+
}, kt = /* @__PURE__ */ new Set([
|
|
1154
1326
|
n.Pinned,
|
|
1155
1327
|
n.MyChats,
|
|
1156
1328
|
n.Shared,
|
|
1157
1329
|
n.Organization
|
|
1158
|
-
]),
|
|
1159
|
-
let { colors:
|
|
1160
|
-
|
|
1161
|
-
}, []),
|
|
1162
|
-
|
|
1330
|
+
]), At = [], jt = I(({ 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, pinnedProjects: x, styles: S, id: T, className: E }) => {
|
|
1331
|
+
let { colors: D, typography: O, itemIconBadgeClassName: k } = S ?? {}, { emptyLabel: j, emptyDescription: M, noResultsLabel: N, noResultsDescription: P, sharedEmptyDescription: F = P, tabEmptyLabels: I, loadingLabel: te = "Loading conversations", updatingTitlesLabel: z = "Updating conversation names", groupLabels: U, actionsLabel: ne, unreadIndicatorLabel: re, seeAllLabel: K, seeAllAriaLabel: ie } = d, { projects: ae, onSelectProject: oe, onSelectConversation: se, onSeeAll: ce, getActions: le, onActionMenuOpen: ue, activeProjectId: de } = x ?? {}, fe = B(() => h?.length ? e.filter((e) => e.source == null || !h.includes(e.source)) : e, [e, h]), [q, me] = H(() => kt), [he, ge] = H(5), J = ee(), _e = V(null), ve = V(null), [ye, be] = H(null), [xe, Se] = H(null), [Ce, we] = H(null), Te = V(null), Ee = V(null), De = L(({ height: e }) => {
|
|
1332
|
+
ge(dt(e));
|
|
1333
|
+
}, []), Oe = L((e) => {
|
|
1334
|
+
me((t) => {
|
|
1163
1335
|
let n = new Set(t);
|
|
1164
1336
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
1165
1337
|
});
|
|
1166
|
-
}, []),
|
|
1167
|
-
|
|
1168
|
-
}, []),
|
|
1169
|
-
let n =
|
|
1170
|
-
|
|
1171
|
-
}, [
|
|
1172
|
-
|
|
1173
|
-
}, [
|
|
1174
|
-
|
|
1175
|
-
}, []),
|
|
1176
|
-
|
|
1177
|
-
}, []),
|
|
1178
|
-
let r =
|
|
1179
|
-
|
|
1338
|
+
}, []), ke = L(() => {
|
|
1339
|
+
Te.current = null, Ee.current = null, be(null), Se(null), we(null);
|
|
1340
|
+
}, []), Ae = L((e, t) => {
|
|
1341
|
+
let n = _t(e, gt(t, e), fe);
|
|
1342
|
+
Te.current = e, Ee.current = n, be(e), we(n);
|
|
1343
|
+
}, [fe]), je = L(() => {
|
|
1344
|
+
ke();
|
|
1345
|
+
}, [ke]), Me = L((e) => {
|
|
1346
|
+
Se(e);
|
|
1347
|
+
}, []), Ne = L(() => {
|
|
1348
|
+
Se(null);
|
|
1349
|
+
}, []), Pe = L((e, t, n) => {
|
|
1350
|
+
let r = Te.current, i = Ee.current;
|
|
1351
|
+
ke(), r != null && r !== e && i?.has(t) && y?.({
|
|
1180
1352
|
draggedId: r,
|
|
1181
1353
|
targetGroupKey: t,
|
|
1182
1354
|
afterId: n
|
|
1183
1355
|
});
|
|
1184
|
-
}, [
|
|
1185
|
-
"--cp-item-hover":
|
|
1186
|
-
"--cp-item-active":
|
|
1187
|
-
"--cp-text":
|
|
1188
|
-
"--cp-text-secondary":
|
|
1189
|
-
"--cp-drop-zone-ring":
|
|
1190
|
-
"--cp-trigger-bg":
|
|
1191
|
-
"--cp-trigger-icon":
|
|
1192
|
-
"--cp-trigger-icon-idle":
|
|
1193
|
-
"--cp-skeleton-color":
|
|
1194
|
-
"--cp-unread-dot":
|
|
1195
|
-
"--cp-indicator-dot":
|
|
1196
|
-
"--cp-
|
|
1197
|
-
|
|
1356
|
+
}, [ke, y]), Fe = r({
|
|
1357
|
+
"--cp-item-hover": D?.itemHover,
|
|
1358
|
+
"--cp-item-active": D?.itemActive,
|
|
1359
|
+
"--cp-text": D?.text,
|
|
1360
|
+
"--cp-text-secondary": D?.textSecondary,
|
|
1361
|
+
"--cp-drop-zone-ring": D?.dropZoneRing,
|
|
1362
|
+
"--cp-trigger-bg": D?.triggerBackground,
|
|
1363
|
+
"--cp-trigger-icon": D?.triggerIcon,
|
|
1364
|
+
"--cp-trigger-icon-idle": D?.triggerIconIdle,
|
|
1365
|
+
"--cp-skeleton-color": D?.skeletonColor,
|
|
1366
|
+
"--cp-unread-dot": D?.unreadDot,
|
|
1367
|
+
"--cp-indicator-dot": D?.indicatorDot,
|
|
1368
|
+
"--cp-project-guide-line": D?.projectGuideLine,
|
|
1369
|
+
"--cp-list-font-family": O?.fontFamily
|
|
1370
|
+
}), [Ie, Le] = H(null);
|
|
1198
1371
|
R(() => {
|
|
1199
1372
|
if (!o || !f || !u) {
|
|
1200
|
-
|
|
1373
|
+
Le(null);
|
|
1201
1374
|
return;
|
|
1202
1375
|
}
|
|
1203
|
-
let e =
|
|
1204
|
-
|
|
1376
|
+
let e = fe.find((e) => e.id === u);
|
|
1377
|
+
Le((t) => e && rt(e, f) ? t?.id === e.id && t.query === f ? t : {
|
|
1205
1378
|
id: e.id,
|
|
1206
1379
|
query: f
|
|
1207
1380
|
} : t?.id === u && t.query === f ? t : null);
|
|
@@ -1209,10 +1382,10 @@ var Ze = /* @__PURE__ */ Object.assign(Xe, { displayName: "List" }), Q = /* @__P
|
|
|
1209
1382
|
o,
|
|
1210
1383
|
f,
|
|
1211
1384
|
u,
|
|
1212
|
-
|
|
1385
|
+
fe
|
|
1213
1386
|
]);
|
|
1214
|
-
let
|
|
1215
|
-
o && f &&
|
|
1387
|
+
let Re = L((e) => {
|
|
1388
|
+
o && f && Le({
|
|
1216
1389
|
id: e,
|
|
1217
1390
|
query: f
|
|
1218
1391
|
}), s(e);
|
|
@@ -1220,179 +1393,223 @@ var Ze = /* @__PURE__ */ Object.assign(Xe, { displayName: "List" }), Q = /* @__P
|
|
|
1220
1393
|
o,
|
|
1221
1394
|
f,
|
|
1222
1395
|
s
|
|
1223
|
-
]),
|
|
1224
|
-
|
|
1396
|
+
]), ze = o && f !== "" && Ie?.query === f && Ie.id === u ? Ie.id : void 0, Be = B(() => fe.filter((e) => tt(e, p) && nt(e, m) && (rt(e, f) || e.id === ze)), [
|
|
1397
|
+
fe,
|
|
1225
1398
|
p,
|
|
1226
1399
|
m,
|
|
1227
1400
|
f,
|
|
1228
|
-
|
|
1229
|
-
]),
|
|
1401
|
+
ze
|
|
1402
|
+
]), Ve = B(() => ae ? it(ae, {
|
|
1403
|
+
searchQuery: f,
|
|
1404
|
+
activeFilter: p,
|
|
1405
|
+
activeTypeFilter: m,
|
|
1406
|
+
hiddenSources: h
|
|
1407
|
+
}) : At, [
|
|
1408
|
+
ae,
|
|
1409
|
+
f,
|
|
1410
|
+
p,
|
|
1411
|
+
m,
|
|
1412
|
+
h
|
|
1413
|
+
]), He = B(() => {
|
|
1414
|
+
let e = /* @__PURE__ */ new Map();
|
|
1415
|
+
for (let t of Ve) for (let n of t.conversations) e.set(n.id, t.id);
|
|
1416
|
+
return e;
|
|
1417
|
+
}, [Ve]), Ue = L((e) => oe?.(e), [oe]), We = L((e) => {
|
|
1418
|
+
let t = He.get(e);
|
|
1419
|
+
t != null && se?.(e, t);
|
|
1420
|
+
}, [He, se]), Ge = L((e) => ce?.(e), [ce]), Ke = B(() => Be.filter((e) => e.isPinned), [Be]), qe = B(() => Be.filter((e) => !e.isPinned && e.source !== n.Shared && e.source !== n.Organization), [Be]), Je = B(() => Be.filter((e) => !e.isPinned && e.source === n.Shared), [Be]), Ye = B(() => Be.filter((e) => !e.isPinned && e.source === n.Organization), [Be]), Xe = B(() => [
|
|
1230
1421
|
{
|
|
1231
1422
|
key: n.Pinned,
|
|
1232
|
-
label:
|
|
1233
|
-
items:
|
|
1423
|
+
label: U?.pinned ?? "Pinned",
|
|
1424
|
+
items: Ke
|
|
1234
1425
|
},
|
|
1235
1426
|
{
|
|
1236
1427
|
key: n.MyChats,
|
|
1237
|
-
label:
|
|
1238
|
-
items:
|
|
1428
|
+
label: U?.myChats ?? "My chats",
|
|
1429
|
+
items: qe
|
|
1239
1430
|
},
|
|
1240
1431
|
{
|
|
1241
1432
|
key: n.Shared,
|
|
1242
|
-
label:
|
|
1243
|
-
items:
|
|
1433
|
+
label: U?.shared ?? "Shared",
|
|
1434
|
+
items: Je
|
|
1244
1435
|
},
|
|
1245
1436
|
{
|
|
1246
1437
|
key: n.Organization,
|
|
1247
|
-
label:
|
|
1248
|
-
items:
|
|
1438
|
+
label: U?.organization ?? "Organization",
|
|
1439
|
+
items: Ye
|
|
1249
1440
|
}
|
|
1250
1441
|
], [
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
]),
|
|
1442
|
+
U,
|
|
1443
|
+
Ke,
|
|
1444
|
+
qe,
|
|
1445
|
+
Je,
|
|
1446
|
+
Ye
|
|
1447
|
+
]), Y = B(() => {
|
|
1257
1448
|
let e = [];
|
|
1258
|
-
for (let t of
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1449
|
+
for (let t of Xe) {
|
|
1450
|
+
let r = t.key === n.Pinned ? Ve : At;
|
|
1451
|
+
if ((t.items.length !== 0 || r.length !== 0) && (e.push({
|
|
1452
|
+
kind: Q.Header,
|
|
1453
|
+
groupKey: t.key,
|
|
1454
|
+
label: t.label
|
|
1455
|
+
}), q.has(t.key))) {
|
|
1456
|
+
for (let t of r) e.push(...mt(t));
|
|
1457
|
+
for (let n of t.items) e.push({
|
|
1458
|
+
kind: Q.Item,
|
|
1459
|
+
item: n,
|
|
1460
|
+
groupKey: t.key
|
|
1461
|
+
});
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1267
1464
|
return e;
|
|
1268
|
-
}, [
|
|
1465
|
+
}, [
|
|
1466
|
+
Xe,
|
|
1467
|
+
Ve,
|
|
1468
|
+
q
|
|
1469
|
+
]);
|
|
1269
1470
|
R(() => {
|
|
1270
|
-
if (!u ||
|
|
1271
|
-
let e =
|
|
1272
|
-
e >= 0 && (
|
|
1471
|
+
if (!u || ve.current === u) return;
|
|
1472
|
+
let e = Y.findIndex((e) => (e.kind === Q.Item || e.kind === Q.ProjectConversation) && e.item.id === u);
|
|
1473
|
+
e >= 0 && (_e.current?.scrollToRow({
|
|
1273
1474
|
index: e,
|
|
1274
1475
|
align: "smart",
|
|
1275
1476
|
behavior: "smooth"
|
|
1276
|
-
}),
|
|
1477
|
+
}), ve.current = u);
|
|
1277
1478
|
}, [
|
|
1278
1479
|
u,
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1480
|
+
Xe,
|
|
1481
|
+
q,
|
|
1482
|
+
Y
|
|
1282
1483
|
]);
|
|
1283
|
-
let
|
|
1484
|
+
let Ze = V(Y);
|
|
1284
1485
|
R(() => {
|
|
1285
|
-
|
|
1286
|
-
}, [
|
|
1287
|
-
let
|
|
1288
|
-
rows:
|
|
1289
|
-
expandedGroups:
|
|
1290
|
-
onToggleGroup:
|
|
1291
|
-
listId:
|
|
1486
|
+
Ze.current = Y;
|
|
1487
|
+
}, [Y]);
|
|
1488
|
+
let Qe = L((e) => Ae(e, Ze.current), [Ae]), $e = B(() => ({
|
|
1489
|
+
rows: Y,
|
|
1490
|
+
expandedGroups: q,
|
|
1491
|
+
onToggleGroup: Oe,
|
|
1492
|
+
listId: J,
|
|
1292
1493
|
activeConversationId: u,
|
|
1293
1494
|
searchQuery: f,
|
|
1294
|
-
onSelectConversation:
|
|
1495
|
+
onSelectConversation: Re,
|
|
1295
1496
|
getActions: _,
|
|
1296
1497
|
onActionMenuOpen: v,
|
|
1297
|
-
actionsLabel:
|
|
1298
|
-
unreadIndicatorLabel:
|
|
1498
|
+
actionsLabel: ne,
|
|
1499
|
+
unreadIndicatorLabel: re,
|
|
1500
|
+
activeProjectId: de,
|
|
1501
|
+
onSelectProject: Ue,
|
|
1502
|
+
onSelectProjectConversation: We,
|
|
1503
|
+
onSeeAll: Ge,
|
|
1504
|
+
getProjectActions: le,
|
|
1505
|
+
onProjectActionMenuOpen: ue,
|
|
1506
|
+
seeAllLabel: K,
|
|
1507
|
+
seeAllAriaLabel: ie,
|
|
1299
1508
|
rowVariant: g,
|
|
1300
1509
|
styles: {
|
|
1301
|
-
groupHeaderClassName:
|
|
1302
|
-
itemTitleClassName:
|
|
1303
|
-
unreadItemTitleClassName:
|
|
1304
|
-
itemIconBadgeClassName:
|
|
1510
|
+
groupHeaderClassName: O?.groupHeaderClassName,
|
|
1511
|
+
itemTitleClassName: O?.itemTitleClassName,
|
|
1512
|
+
unreadItemTitleClassName: O?.unreadItemTitleClassName,
|
|
1513
|
+
itemIconBadgeClassName: k
|
|
1305
1514
|
},
|
|
1306
|
-
draggingId:
|
|
1307
|
-
dragOverId:
|
|
1308
|
-
allowedDropGroups:
|
|
1309
|
-
onDragStart:
|
|
1310
|
-
onDragEnd:
|
|
1311
|
-
onDragOver:
|
|
1312
|
-
onDragLeave:
|
|
1313
|
-
onDrop:
|
|
1515
|
+
draggingId: ye,
|
|
1516
|
+
dragOverId: xe,
|
|
1517
|
+
allowedDropGroups: Ce,
|
|
1518
|
+
onDragStart: Qe,
|
|
1519
|
+
onDragEnd: je,
|
|
1520
|
+
onDragOver: Me,
|
|
1521
|
+
onDragLeave: Ne,
|
|
1522
|
+
onDrop: Pe
|
|
1314
1523
|
}), [
|
|
1315
|
-
|
|
1524
|
+
Y,
|
|
1525
|
+
q,
|
|
1526
|
+
Oe,
|
|
1316
1527
|
J,
|
|
1317
|
-
ge,
|
|
1318
|
-
ae,
|
|
1319
1528
|
u,
|
|
1320
1529
|
f,
|
|
1321
|
-
|
|
1530
|
+
Re,
|
|
1322
1531
|
_,
|
|
1323
1532
|
v,
|
|
1324
|
-
|
|
1325
|
-
|
|
1533
|
+
ne,
|
|
1534
|
+
re,
|
|
1535
|
+
de,
|
|
1536
|
+
Ue,
|
|
1537
|
+
We,
|
|
1538
|
+
Ge,
|
|
1539
|
+
le,
|
|
1540
|
+
ue,
|
|
1541
|
+
K,
|
|
1542
|
+
ie,
|
|
1326
1543
|
g,
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
ce,
|
|
1332
|
-
Y,
|
|
1333
|
-
fe,
|
|
1334
|
-
Fe,
|
|
1544
|
+
O?.groupHeaderClassName,
|
|
1545
|
+
O?.itemTitleClassName,
|
|
1546
|
+
O?.unreadItemTitleClassName,
|
|
1547
|
+
k,
|
|
1335
1548
|
ye,
|
|
1336
|
-
be,
|
|
1337
1549
|
xe,
|
|
1338
|
-
|
|
1339
|
-
|
|
1550
|
+
Ce,
|
|
1551
|
+
Qe,
|
|
1552
|
+
je,
|
|
1553
|
+
Me,
|
|
1554
|
+
Ne,
|
|
1555
|
+
Pe
|
|
1556
|
+
]), at = f !== "" || p !== n.All || m !== X.All, st = Be.length === 0 && Ve.length === 0, ct = st && at, ut = st && !at, ht = ct && f === "" && m === X.All ? I?.[p] : void 0, vt = ht?.label ?? N, yt = p === n.Shared && f === "" ? F : P, bt = ht?.description ?? yt, xt = !t && !st, St = V(null), Ct = V(null), wt = V(b);
|
|
1340
1557
|
R(() => {
|
|
1341
|
-
|
|
1558
|
+
wt.current = b;
|
|
1342
1559
|
}, [b]);
|
|
1343
|
-
let
|
|
1344
|
-
|
|
1345
|
-
}, []),
|
|
1346
|
-
|
|
1347
|
-
}, [
|
|
1560
|
+
let Tt = L((e) => {
|
|
1561
|
+
Ct.current && pt(Ct.current, e) || (Ct.current = e, wt.current?.(e));
|
|
1562
|
+
}, []), Et = L((e) => {
|
|
1563
|
+
St.current = e, Tt(ft(Y, e));
|
|
1564
|
+
}, [Y, Tt]);
|
|
1348
1565
|
return R(() => {
|
|
1349
|
-
|
|
1566
|
+
xt ? St.current && Tt(ft(Y, St.current)) : (St.current = null, Tt([]));
|
|
1350
1567
|
}, [
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
]), /* @__PURE__ */
|
|
1355
|
-
id:
|
|
1356
|
-
style:
|
|
1357
|
-
className: a("flex-1 overflow-hidden px-3", $.list,
|
|
1358
|
-
children: [/* @__PURE__ */
|
|
1568
|
+
xt,
|
|
1569
|
+
Y,
|
|
1570
|
+
Tt
|
|
1571
|
+
]), /* @__PURE__ */ G("div", {
|
|
1572
|
+
id: T,
|
|
1573
|
+
style: Fe,
|
|
1574
|
+
className: a("flex-1 overflow-hidden px-3", $.list, O?.fontClassName, g !== Z.Indicator && "py-1", E, pe.list),
|
|
1575
|
+
children: [/* @__PURE__ */ W(C, {
|
|
1359
1576
|
visuallyHidden: !0,
|
|
1360
1577
|
as: w.Span,
|
|
1361
|
-
children: t ?
|
|
1362
|
-
}), t ? /* @__PURE__ */
|
|
1578
|
+
children: t ? te : i ? z : ut ? j : ct ? vt : ""
|
|
1579
|
+
}), t ? /* @__PURE__ */ W("div", {
|
|
1363
1580
|
className: "flex flex-col gap-3 px-2 py-3",
|
|
1364
|
-
children: Array.from({ length: 15 }, (e, t) => /* @__PURE__ */
|
|
1581
|
+
children: Array.from({ length: 15 }, (e, t) => /* @__PURE__ */ W(A, {
|
|
1365
1582
|
avatar: { size: 24 },
|
|
1366
|
-
showTitle: { width:
|
|
1583
|
+
showTitle: { width: ot(t) },
|
|
1367
1584
|
paragraph: !1,
|
|
1368
1585
|
active: !0,
|
|
1369
1586
|
color: $.skeletonColor
|
|
1370
1587
|
}, t))
|
|
1371
|
-
}) :
|
|
1372
|
-
label:
|
|
1373
|
-
description:
|
|
1374
|
-
}) :
|
|
1375
|
-
label:
|
|
1376
|
-
description:
|
|
1377
|
-
}) : /* @__PURE__ */
|
|
1378
|
-
listRef:
|
|
1379
|
-
id:
|
|
1588
|
+
}) : ut ? /* @__PURE__ */ W(c, {
|
|
1589
|
+
label: j,
|
|
1590
|
+
description: M
|
|
1591
|
+
}) : ct && f !== "" && i ? /* @__PURE__ */ W(c, { label: z }) : ct ? /* @__PURE__ */ W(l, {
|
|
1592
|
+
label: vt,
|
|
1593
|
+
description: bt
|
|
1594
|
+
}) : /* @__PURE__ */ W(et, {
|
|
1595
|
+
listRef: _e,
|
|
1596
|
+
id: J,
|
|
1380
1597
|
role: "list",
|
|
1381
1598
|
style: { height: "100%" },
|
|
1382
|
-
rowComponent:
|
|
1383
|
-
rowCount:
|
|
1384
|
-
rowHeight:
|
|
1385
|
-
overscanCount:
|
|
1386
|
-
onResize:
|
|
1387
|
-
onRowsRendered:
|
|
1388
|
-
rowProps:
|
|
1599
|
+
rowComponent: Ot,
|
|
1600
|
+
rowCount: Y.length,
|
|
1601
|
+
rowHeight: lt,
|
|
1602
|
+
overscanCount: he,
|
|
1603
|
+
onResize: De,
|
|
1604
|
+
onRowsRendered: Et,
|
|
1605
|
+
rowProps: $e
|
|
1389
1606
|
})]
|
|
1390
1607
|
});
|
|
1391
|
-
}),
|
|
1608
|
+
}), Mt = {
|
|
1392
1609
|
title: "_title_mvx21_2",
|
|
1393
1610
|
filterValue: "_filterValue_mvx21_12",
|
|
1394
1611
|
filterIndicator: "_filterIndicator_mvx21_17"
|
|
1395
|
-
},
|
|
1612
|
+
}, Nt = "!size-6 !min-h-0 !min-w-0 !p-1", Pt = [
|
|
1396
1613
|
{
|
|
1397
1614
|
value: n.All,
|
|
1398
1615
|
getLabel: (e) => e.all
|
|
@@ -1409,49 +1626,49 @@ var Ze = /* @__PURE__ */ Object.assign(Xe, { displayName: "List" }), Q = /* @__P
|
|
|
1409
1626
|
value: n.Organization,
|
|
1410
1627
|
getLabel: (e) => e.organization
|
|
1411
1628
|
}
|
|
1412
|
-
],
|
|
1629
|
+
], Ft = [
|
|
1413
1630
|
{
|
|
1414
|
-
value:
|
|
1631
|
+
value: X.All,
|
|
1415
1632
|
getLabel: (e) => e.all
|
|
1416
1633
|
},
|
|
1417
1634
|
{
|
|
1418
|
-
value:
|
|
1635
|
+
value: X.Chat,
|
|
1419
1636
|
getLabel: (e) => e.chat ?? "Chat"
|
|
1420
1637
|
},
|
|
1421
1638
|
{
|
|
1422
|
-
value:
|
|
1639
|
+
value: X.Task,
|
|
1423
1640
|
getLabel: (e) => e.task ?? "Task"
|
|
1424
1641
|
}
|
|
1425
|
-
],
|
|
1426
|
-
let w = S?.typography?.titleClassName ?? "dial-tiny-lead-semi-text", T = S?.typography?.searchTextClassName ?? "dial-tiny-text", D = S?.colors?.filterValue, O =
|
|
1642
|
+
], It = I(({ 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 }) => {
|
|
1643
|
+
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, I = l != null && u != null;
|
|
1427
1644
|
R(() => {
|
|
1428
1645
|
c ? A.current?.focus() : j.current && O.current?.focus(), j.current = c;
|
|
1429
1646
|
}, [c]);
|
|
1430
|
-
let
|
|
1647
|
+
let te = L(() => {
|
|
1431
1648
|
u?.(!0);
|
|
1432
|
-
}, [u]),
|
|
1649
|
+
}, [u]), z = L(() => {
|
|
1433
1650
|
l?.(""), u?.(!1);
|
|
1434
|
-
}, [l, u]),
|
|
1651
|
+
}, [l, u]), H = L((e) => {
|
|
1435
1652
|
l?.(e ?? "");
|
|
1436
|
-
}, [l]),
|
|
1437
|
-
e.key === "Escape" && (e.stopPropagation(),
|
|
1438
|
-
}, [
|
|
1439
|
-
let { filterLabels: t } = e, n = r({ "--cp-list-header-filter-value": D }), i = (e, t) => () => /* @__PURE__ */
|
|
1653
|
+
}, [l]), U = L((e) => {
|
|
1654
|
+
e.key === "Escape" && (e.stopPropagation(), z());
|
|
1655
|
+
}, [z]), re = B(() => {
|
|
1656
|
+
let { filterLabels: t } = e, n = r({ "--cp-list-header-filter-value": D }), i = (e, t) => () => /* @__PURE__ */ G(ne, { children: [/* @__PURE__ */ W("span", {
|
|
1440
1657
|
className: "min-w-0 flex-1 truncate text-start",
|
|
1441
1658
|
children: e
|
|
1442
|
-
}), /* @__PURE__ */
|
|
1443
|
-
className: a("shrink-0",
|
|
1659
|
+
}), /* @__PURE__ */ W("span", {
|
|
1660
|
+
className: a("shrink-0", Mt.filterValue),
|
|
1444
1661
|
style: n,
|
|
1445
1662
|
children: t
|
|
1446
1663
|
})] }), o = [];
|
|
1447
1664
|
if (v) {
|
|
1448
|
-
let e =
|
|
1665
|
+
let e = Ft.map(({ value: e, getLabel: n }) => ({
|
|
1449
1666
|
key: e,
|
|
1450
1667
|
label: n(t),
|
|
1451
1668
|
mark: E.Check,
|
|
1452
1669
|
checked: e === p,
|
|
1453
1670
|
onClick: () => v(e)
|
|
1454
|
-
})), n =
|
|
1671
|
+
})), n = Ft.find(({ value: e }) => e === p);
|
|
1455
1672
|
o.push({
|
|
1456
1673
|
key: "filter-type",
|
|
1457
1674
|
label: t.type ?? "Type",
|
|
@@ -1460,7 +1677,7 @@ var Ze = /* @__PURE__ */ Object.assign(Xe, { displayName: "List" }), Q = /* @__P
|
|
|
1460
1677
|
});
|
|
1461
1678
|
}
|
|
1462
1679
|
if (f) {
|
|
1463
|
-
let e =
|
|
1680
|
+
let e = Pt.filter(({ value: e }) => !y?.includes(e)), n = e.find(({ value: e }) => e === d);
|
|
1464
1681
|
o.push({
|
|
1465
1682
|
key: "filter-origin",
|
|
1466
1683
|
label: t.origin ?? "Origin",
|
|
@@ -1483,7 +1700,7 @@ var Ze = /* @__PURE__ */ Object.assign(Xe, { displayName: "List" }), Q = /* @__P
|
|
|
1483
1700
|
f,
|
|
1484
1701
|
v,
|
|
1485
1702
|
D
|
|
1486
|
-
]),
|
|
1703
|
+
]), K = B(() => r({
|
|
1487
1704
|
"--cp-list-header-title": S?.colors?.title,
|
|
1488
1705
|
"--cp-list-header-title-focus": S?.colors?.titleFocus,
|
|
1489
1706
|
"--cp-list-header-filter-indicator": S?.colors?.filterIndicator
|
|
@@ -1491,98 +1708,98 @@ var Ze = /* @__PURE__ */ Object.assign(Xe, { displayName: "List" }), Q = /* @__P
|
|
|
1491
1708
|
S?.colors?.title,
|
|
1492
1709
|
S?.colors?.titleFocus,
|
|
1493
1710
|
S?.colors?.filterIndicator
|
|
1494
|
-
]), ie = (e) => a("flex min-h-6 items-center justify-between ps-2", e, C,
|
|
1495
|
-
if (I && c) return /* @__PURE__ */
|
|
1711
|
+
]), ie = (e) => a("flex min-h-6 items-center justify-between ps-2", e, C, pe.listHeader);
|
|
1712
|
+
if (I && c) return /* @__PURE__ */ G("div", {
|
|
1496
1713
|
role: "search",
|
|
1497
|
-
style:
|
|
1714
|
+
style: K,
|
|
1498
1715
|
className: ie("gap-2"),
|
|
1499
|
-
onKeyDown:
|
|
1500
|
-
children: [/* @__PURE__ */
|
|
1716
|
+
onKeyDown: U,
|
|
1717
|
+
children: [/* @__PURE__ */ W(k, {
|
|
1501
1718
|
containerClassName: "min-w-0 flex-1",
|
|
1502
1719
|
wrapperClassName: a("h-6! min-h-0! py-1! pe-2! [&_svg]:size-4!", T),
|
|
1503
1720
|
inputRef: A,
|
|
1504
1721
|
value: s,
|
|
1505
|
-
onChange:
|
|
1722
|
+
onChange: H,
|
|
1506
1723
|
placeholder: e.searchPlaceholder,
|
|
1507
1724
|
clearLabel: e.searchClearLabel,
|
|
1508
1725
|
"aria-label": e.searchPlaceholder
|
|
1509
|
-
}), /* @__PURE__ */
|
|
1510
|
-
icon: /* @__PURE__ */
|
|
1726
|
+
}), /* @__PURE__ */ W(b, {
|
|
1727
|
+
icon: /* @__PURE__ */ W(fe, {
|
|
1511
1728
|
size: m.SM,
|
|
1512
1729
|
stroke: h,
|
|
1513
1730
|
"aria-hidden": !0
|
|
1514
1731
|
}),
|
|
1515
1732
|
size: _.Small,
|
|
1516
|
-
className:
|
|
1733
|
+
className: Nt,
|
|
1517
1734
|
"aria-label": e.searchCloseLabel,
|
|
1518
|
-
onClick:
|
|
1735
|
+
onClick: z
|
|
1519
1736
|
})]
|
|
1520
1737
|
});
|
|
1521
|
-
let
|
|
1738
|
+
let se = /* @__PURE__ */ W("span", {
|
|
1522
1739
|
className: w,
|
|
1523
1740
|
children: e.title
|
|
1524
1741
|
});
|
|
1525
|
-
return /* @__PURE__ */
|
|
1526
|
-
style:
|
|
1742
|
+
return /* @__PURE__ */ G("div", {
|
|
1743
|
+
style: K,
|
|
1527
1744
|
className: ie(),
|
|
1528
|
-
children: [i ? /* @__PURE__ */
|
|
1745
|
+
children: [i ? /* @__PURE__ */ G("button", {
|
|
1529
1746
|
type: "button",
|
|
1530
1747
|
"aria-expanded": t,
|
|
1531
1748
|
"aria-controls": o,
|
|
1532
1749
|
onClick: i,
|
|
1533
|
-
className: a("group flex items-center gap-1 rounded",
|
|
1534
|
-
children: [
|
|
1750
|
+
className: a("group flex items-center gap-1 rounded", Mt.title),
|
|
1751
|
+
children: [se, t ? /* @__PURE__ */ W(ae, {
|
|
1535
1752
|
size: m.SM,
|
|
1536
1753
|
stroke: h,
|
|
1537
1754
|
className: "opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100",
|
|
1538
1755
|
"aria-hidden": !0
|
|
1539
|
-
}) : /* @__PURE__ */
|
|
1756
|
+
}) : /* @__PURE__ */ W(oe, {
|
|
1540
1757
|
size: m.SM,
|
|
1541
1758
|
stroke: h,
|
|
1542
1759
|
className: "opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100 rtl:scale-x-[-1]",
|
|
1543
1760
|
"aria-hidden": !0
|
|
1544
1761
|
})]
|
|
1545
|
-
}) : /* @__PURE__ */
|
|
1546
|
-
className:
|
|
1547
|
-
children:
|
|
1548
|
-
}), /* @__PURE__ */
|
|
1762
|
+
}) : /* @__PURE__ */ W("span", {
|
|
1763
|
+
className: Mt.title,
|
|
1764
|
+
children: se
|
|
1765
|
+
}), /* @__PURE__ */ G("div", {
|
|
1549
1766
|
className: "flex items-center gap-2",
|
|
1550
1767
|
children: [
|
|
1551
|
-
I && /* @__PURE__ */
|
|
1768
|
+
I && /* @__PURE__ */ W(b, {
|
|
1552
1769
|
ref: O,
|
|
1553
|
-
icon: /* @__PURE__ */
|
|
1770
|
+
icon: /* @__PURE__ */ W(ue, {
|
|
1554
1771
|
size: m.SM,
|
|
1555
1772
|
stroke: h,
|
|
1556
1773
|
"aria-hidden": !0
|
|
1557
1774
|
}),
|
|
1558
1775
|
size: _.Small,
|
|
1559
|
-
className:
|
|
1776
|
+
className: Nt,
|
|
1560
1777
|
"aria-label": e.searchOpenLabel,
|
|
1561
|
-
onClick:
|
|
1778
|
+
onClick: te
|
|
1562
1779
|
}),
|
|
1563
|
-
(f || v) && /* @__PURE__ */
|
|
1564
|
-
items:
|
|
1780
|
+
(f || v) && /* @__PURE__ */ W(g, {
|
|
1781
|
+
items: re,
|
|
1565
1782
|
placement: "bottom-end",
|
|
1566
1783
|
matchReferenceWidth: !1,
|
|
1567
|
-
children: /* @__PURE__ */
|
|
1568
|
-
icon: /* @__PURE__ */
|
|
1784
|
+
children: /* @__PURE__ */ W(b, {
|
|
1785
|
+
icon: /* @__PURE__ */ G("span", {
|
|
1569
1786
|
className: "relative inline-flex",
|
|
1570
|
-
children: [/* @__PURE__ */
|
|
1787
|
+
children: [/* @__PURE__ */ W(ce, {
|
|
1571
1788
|
size: m.SM,
|
|
1572
1789
|
stroke: h,
|
|
1573
1790
|
"aria-hidden": !0
|
|
1574
|
-
}), F && /* @__PURE__ */
|
|
1791
|
+
}), F && /* @__PURE__ */ W("span", {
|
|
1575
1792
|
"aria-hidden": !0,
|
|
1576
|
-
className: a(
|
|
1793
|
+
className: a(Mt.filterIndicator, "absolute -inset-e-0.5 -top-0.5 size-1.5 rounded-full")
|
|
1577
1794
|
})]
|
|
1578
1795
|
}),
|
|
1579
1796
|
size: _.Small,
|
|
1580
|
-
className:
|
|
1797
|
+
className: Nt,
|
|
1581
1798
|
"aria-label": M,
|
|
1582
1799
|
"aria-describedby": F ? P : void 0
|
|
1583
1800
|
})
|
|
1584
1801
|
}),
|
|
1585
|
-
F && (f || v) && /* @__PURE__ */
|
|
1802
|
+
F && (f || v) && /* @__PURE__ */ W("span", {
|
|
1586
1803
|
id: P,
|
|
1587
1804
|
className: "sr-only",
|
|
1588
1805
|
children: N
|
|
@@ -1591,48 +1808,48 @@ var Ze = /* @__PURE__ */ Object.assign(Xe, { displayName: "List" }), Q = /* @__P
|
|
|
1591
1808
|
]
|
|
1592
1809
|
})]
|
|
1593
1810
|
});
|
|
1594
|
-
}),
|
|
1595
|
-
let
|
|
1811
|
+
}), Lt = I(({ 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, pinnedProjects: b, styles: x, listClassName: S, className: C }) => {
|
|
1812
|
+
let w = ee(), [T, E] = H(""), [D, O] = H(!1), [k, A] = H(!0), [j, M] = H(n.All), [N, P] = H(X.All);
|
|
1596
1813
|
R(() => {
|
|
1597
|
-
l != null &&
|
|
1814
|
+
l != null && M(l);
|
|
1598
1815
|
}, [l]);
|
|
1599
|
-
let
|
|
1600
|
-
|
|
1601
|
-
}, [d]),
|
|
1602
|
-
|
|
1603
|
-
}, []),
|
|
1604
|
-
|
|
1605
|
-
}, []),
|
|
1606
|
-
|
|
1607
|
-
}, [p]), B = L(() =>
|
|
1608
|
-
return /* @__PURE__ */
|
|
1816
|
+
let F = L((e) => {
|
|
1817
|
+
M(e), d?.(e);
|
|
1818
|
+
}, [d]), I = L((e) => {
|
|
1819
|
+
E(e), e !== "" && A(!0);
|
|
1820
|
+
}, []), te = L((e) => {
|
|
1821
|
+
O(e), e && A(!0);
|
|
1822
|
+
}, []), z = L((e) => {
|
|
1823
|
+
P(e), p?.(e);
|
|
1824
|
+
}, [p]), B = L(() => A((e) => !e), []);
|
|
1825
|
+
return /* @__PURE__ */ G("section", {
|
|
1609
1826
|
"aria-label": c.title,
|
|
1610
|
-
className: a("flex min-h-0 flex-1 flex-col px-1 pt-4",
|
|
1611
|
-
children: [/* @__PURE__ */
|
|
1827
|
+
className: a("flex min-h-0 flex-1 flex-col px-1 pt-4", C, pe.listSection),
|
|
1828
|
+
children: [/* @__PURE__ */ W("div", {
|
|
1612
1829
|
className: "px-3 pb-2",
|
|
1613
|
-
children: /* @__PURE__ */
|
|
1830
|
+
children: /* @__PURE__ */ W(It, {
|
|
1614
1831
|
labels: c,
|
|
1615
|
-
isExpanded:
|
|
1832
|
+
isExpanded: k,
|
|
1616
1833
|
onToggleExpanded: B,
|
|
1617
|
-
controlsId:
|
|
1618
|
-
searchQuery:
|
|
1619
|
-
isSearchOpen:
|
|
1620
|
-
onSearchChange:
|
|
1621
|
-
onSearchOpenChange:
|
|
1622
|
-
activeFilter:
|
|
1623
|
-
onFilterChange: u ? void 0 :
|
|
1624
|
-
activeTypeFilter:
|
|
1625
|
-
onTypeFilterChange: u || f ? void 0 :
|
|
1834
|
+
controlsId: w,
|
|
1835
|
+
searchQuery: T,
|
|
1836
|
+
isSearchOpen: D,
|
|
1837
|
+
onSearchChange: I,
|
|
1838
|
+
onSearchOpenChange: te,
|
|
1839
|
+
activeFilter: j,
|
|
1840
|
+
onFilterChange: u ? void 0 : F,
|
|
1841
|
+
activeTypeFilter: N,
|
|
1842
|
+
onTypeFilterChange: u || f ? void 0 : z,
|
|
1626
1843
|
hiddenSources: m,
|
|
1627
1844
|
actions: h,
|
|
1628
|
-
styles:
|
|
1845
|
+
styles: x?.header
|
|
1629
1846
|
})
|
|
1630
|
-
}), /* @__PURE__ */
|
|
1631
|
-
hidden: !
|
|
1632
|
-
inert: !
|
|
1633
|
-
className:
|
|
1634
|
-
children: /* @__PURE__ */
|
|
1635
|
-
id:
|
|
1847
|
+
}), /* @__PURE__ */ W("div", {
|
|
1848
|
+
hidden: !k,
|
|
1849
|
+
inert: !k,
|
|
1850
|
+
className: k ? "flex min-h-0 flex-1 flex-col" : "hidden",
|
|
1851
|
+
children: /* @__PURE__ */ W(jt, {
|
|
1852
|
+
id: w,
|
|
1636
1853
|
conversations: e,
|
|
1637
1854
|
isLoading: t,
|
|
1638
1855
|
isUpdatingTitles: r,
|
|
@@ -1640,21 +1857,22 @@ var Ze = /* @__PURE__ */ Object.assign(Xe, { displayName: "List" }), Q = /* @__P
|
|
|
1640
1857
|
onSelectConversation: o,
|
|
1641
1858
|
activeConversationId: s,
|
|
1642
1859
|
labels: c,
|
|
1643
|
-
searchQuery:
|
|
1644
|
-
activeFilter:
|
|
1645
|
-
activeTypeFilter:
|
|
1860
|
+
searchQuery: T,
|
|
1861
|
+
activeFilter: j,
|
|
1862
|
+
activeTypeFilter: N,
|
|
1646
1863
|
hiddenSources: m,
|
|
1647
|
-
rowVariant:
|
|
1864
|
+
rowVariant: Z.Indicator,
|
|
1648
1865
|
getActions: g,
|
|
1649
1866
|
onActionMenuOpen: _,
|
|
1650
1867
|
onMoveConversation: v,
|
|
1651
1868
|
onVisibleConversationIdsChange: y,
|
|
1652
|
-
|
|
1653
|
-
|
|
1869
|
+
pinnedProjects: b,
|
|
1870
|
+
styles: x?.list,
|
|
1871
|
+
className: S
|
|
1654
1872
|
})
|
|
1655
1873
|
})]
|
|
1656
1874
|
});
|
|
1657
|
-
}),
|
|
1875
|
+
}), Rt = [
|
|
1658
1876
|
{
|
|
1659
1877
|
value: n.All,
|
|
1660
1878
|
labelKey: "all"
|
|
@@ -1671,12 +1889,12 @@ var Ze = /* @__PURE__ */ Object.assign(Xe, { displayName: "List" }), Q = /* @__P
|
|
|
1671
1889
|
value: n.Organization,
|
|
1672
1890
|
labelKey: "organization"
|
|
1673
1891
|
}
|
|
1674
|
-
],
|
|
1675
|
-
let a =
|
|
1892
|
+
], zt = I(({ activeTab: e, labels: t, onChange: n, tabClassName: r = "dial-tiny-semi-text", hiddenSources: i }) => {
|
|
1893
|
+
let a = B(() => Rt.filter(({ value: e }) => !i?.includes(e)).map(({ value: e, labelKey: n }) => ({
|
|
1676
1894
|
value: e,
|
|
1677
1895
|
label: t[n]
|
|
1678
1896
|
})), [t, i]);
|
|
1679
|
-
return /* @__PURE__ */
|
|
1897
|
+
return /* @__PURE__ */ W(y, {
|
|
1680
1898
|
items: a,
|
|
1681
1899
|
value: e,
|
|
1682
1900
|
onChange: n,
|
|
@@ -1685,65 +1903,65 @@ var Ze = /* @__PURE__ */ Object.assign(Xe, { displayName: "List" }), Q = /* @__P
|
|
|
1685
1903
|
className: "px-3 py-2",
|
|
1686
1904
|
chipClassName: N("px-2!", r)
|
|
1687
1905
|
});
|
|
1688
|
-
}),
|
|
1906
|
+
}), Bt = { button: "_button_vjird_1" }, Vt = I(({ label: e, onClick: t, labelClassName: n = "dial-small-semi-text", colors: i, className: o }) => {
|
|
1689
1907
|
let s = r({
|
|
1690
1908
|
"--cp-new-chat-bg": i?.background,
|
|
1691
1909
|
"--cp-new-chat-text": i?.text,
|
|
1692
1910
|
"--cp-new-chat-focus-outline": i?.focusOutline
|
|
1693
1911
|
});
|
|
1694
|
-
return /* @__PURE__ */
|
|
1912
|
+
return /* @__PURE__ */ W("div", {
|
|
1695
1913
|
className: "px-3 py-2",
|
|
1696
1914
|
style: s,
|
|
1697
|
-
children: /* @__PURE__ */
|
|
1915
|
+
children: /* @__PURE__ */ W(f, {
|
|
1698
1916
|
label: e,
|
|
1699
1917
|
textClassName: n,
|
|
1700
|
-
iconBefore: /* @__PURE__ */
|
|
1918
|
+
iconBefore: /* @__PURE__ */ W(le, {
|
|
1701
1919
|
size: 18,
|
|
1702
1920
|
stroke: h,
|
|
1703
1921
|
className: "shrink-0",
|
|
1704
1922
|
"aria-hidden": !0
|
|
1705
1923
|
}),
|
|
1706
1924
|
onClick: t,
|
|
1707
|
-
className: a("h-[36px] w-full gap-2 px-3 py-1 shadow-chat-button hover:shadow-xs focus-visible:shadow-xs active:shadow-xs",
|
|
1925
|
+
className: a("h-[36px] w-full gap-2 px-3 py-1 shadow-chat-button hover:shadow-xs focus-visible:shadow-xs active:shadow-xs", Bt.button, o, pe.newChatButton)
|
|
1708
1926
|
})
|
|
1709
1927
|
});
|
|
1710
|
-
}),
|
|
1711
|
-
let { colors: D, typography: O, newChatButton: A, searchWrapperClassName: j, headerClassName: M, headerActionsClassName: N, newChatButtonClassName: P } = m ?? {}, { title: F, emptyLabel: I, emptyDescription:
|
|
1928
|
+
}), Ht = I(({ 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 }) => {
|
|
1929
|
+
let { colors: D, typography: O, newChatButton: A, searchWrapperClassName: j, headerClassName: M, headerActionsClassName: N, newChatButtonClassName: P } = m ?? {}, { title: F, emptyLabel: I, emptyDescription: ee, noResultsLabel: te, noResultsDescription: z, sharedEmptyDescription: V, tabEmptyLabels: U, loadingLabel: ne, updatingTitlesLabel: re, newChatLabel: K, searchPlaceholder: ie, searchClearLabel: ae, filterLabels: oe, groupLabels: se, actionsLabel: ce, unreadIndicatorLabel: le, closeAriaLabel: ue } = f, [de, fe] = H(""), [q, me] = H(n.All);
|
|
1712
1930
|
R(() => {
|
|
1713
|
-
C != null &&
|
|
1931
|
+
C != null && me(C);
|
|
1714
1932
|
}, [C]);
|
|
1715
|
-
let
|
|
1716
|
-
|
|
1717
|
-
}, []),
|
|
1933
|
+
let he = L((e) => {
|
|
1934
|
+
fe(e ?? "");
|
|
1935
|
+
}, []), ge = r({
|
|
1718
1936
|
"--cp-text": D?.text,
|
|
1719
1937
|
"--cp-new-chat-bg": A?.background,
|
|
1720
1938
|
"--cp-new-chat-text": A?.text,
|
|
1721
1939
|
"--cp-new-chat-focus-outline": A?.focusOutline
|
|
1722
|
-
}),
|
|
1940
|
+
}), J = B(() => ({
|
|
1723
1941
|
emptyLabel: I,
|
|
1724
|
-
emptyDescription:
|
|
1725
|
-
noResultsLabel:
|
|
1726
|
-
noResultsDescription:
|
|
1727
|
-
sharedEmptyDescription:
|
|
1728
|
-
tabEmptyLabels:
|
|
1729
|
-
loadingLabel:
|
|
1730
|
-
updatingTitlesLabel:
|
|
1731
|
-
groupLabels:
|
|
1732
|
-
actionsLabel:
|
|
1733
|
-
unreadIndicatorLabel:
|
|
1942
|
+
emptyDescription: ee,
|
|
1943
|
+
noResultsLabel: te,
|
|
1944
|
+
noResultsDescription: z,
|
|
1945
|
+
sharedEmptyDescription: V,
|
|
1946
|
+
tabEmptyLabels: U,
|
|
1947
|
+
loadingLabel: ne,
|
|
1948
|
+
updatingTitlesLabel: re,
|
|
1949
|
+
groupLabels: se,
|
|
1950
|
+
actionsLabel: ce,
|
|
1951
|
+
unreadIndicatorLabel: le
|
|
1734
1952
|
}), [
|
|
1735
1953
|
I,
|
|
1736
|
-
z,
|
|
1737
1954
|
ee,
|
|
1738
|
-
B,
|
|
1739
|
-
H,
|
|
1740
|
-
W,
|
|
1741
1955
|
te,
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1956
|
+
z,
|
|
1957
|
+
V,
|
|
1958
|
+
U,
|
|
1959
|
+
ne,
|
|
1960
|
+
re,
|
|
1961
|
+
se,
|
|
1962
|
+
ce,
|
|
1963
|
+
le
|
|
1964
|
+
]), _e = B(() => ({
|
|
1747
1965
|
colors: D,
|
|
1748
1966
|
typography: {
|
|
1749
1967
|
fontFamily: O?.fontFamily,
|
|
@@ -1760,14 +1978,14 @@ var Ze = /* @__PURE__ */ Object.assign(Xe, { displayName: "List" }), Q = /* @__P
|
|
|
1760
1978
|
O?.unreadItemTitleClassName,
|
|
1761
1979
|
m?.itemIconBadgeClassName
|
|
1762
1980
|
]);
|
|
1763
|
-
return /* @__PURE__ */
|
|
1981
|
+
return /* @__PURE__ */ G(d, {
|
|
1764
1982
|
isOpen: s,
|
|
1765
1983
|
isOverlay: g,
|
|
1766
1984
|
orientation: u.Left,
|
|
1767
1985
|
title: F,
|
|
1768
1986
|
labels: {
|
|
1769
1987
|
ariaLabel: F,
|
|
1770
|
-
closeLabel:
|
|
1988
|
+
closeLabel: ue
|
|
1771
1989
|
},
|
|
1772
1990
|
onClose: y,
|
|
1773
1991
|
styles: {
|
|
@@ -1777,7 +1995,7 @@ var Ze = /* @__PURE__ */ Object.assign(Xe, { displayName: "List" }), Q = /* @__P
|
|
|
1777
1995
|
},
|
|
1778
1996
|
typography: { fontClassName: O?.fontClassName },
|
|
1779
1997
|
bodyClassName: "flex flex-col overflow-hidden p-0 gap-3",
|
|
1780
|
-
cssVars:
|
|
1998
|
+
cssVars: ge,
|
|
1781
1999
|
titleClassName: O?.fontClassName,
|
|
1782
2000
|
headerClassName: a("h-[64px]", M),
|
|
1783
2001
|
headerActionsClassName: N,
|
|
@@ -1785,55 +2003,55 @@ var Ze = /* @__PURE__ */ Object.assign(Xe, { displayName: "List" }), Q = /* @__P
|
|
|
1785
2003
|
},
|
|
1786
2004
|
rightActions: b,
|
|
1787
2005
|
children: [
|
|
1788
|
-
/* @__PURE__ */
|
|
1789
|
-
label:
|
|
2006
|
+
/* @__PURE__ */ W(Vt, {
|
|
2007
|
+
label: K,
|
|
1790
2008
|
onClick: p,
|
|
1791
2009
|
labelClassName: O?.newChatLabelClassName,
|
|
1792
2010
|
colors: A,
|
|
1793
2011
|
className: P
|
|
1794
2012
|
}),
|
|
1795
|
-
/* @__PURE__ */
|
|
2013
|
+
/* @__PURE__ */ W("div", {
|
|
1796
2014
|
role: "search",
|
|
1797
|
-
className: a("px-3 py-2",
|
|
1798
|
-
children: /* @__PURE__ */
|
|
2015
|
+
className: a("px-3 py-2", pe.search),
|
|
2016
|
+
children: /* @__PURE__ */ W(k, {
|
|
1799
2017
|
wrapperClassName: a($.search, j),
|
|
1800
|
-
value:
|
|
1801
|
-
onChange:
|
|
1802
|
-
placeholder:
|
|
1803
|
-
clearLabel:
|
|
1804
|
-
"aria-label":
|
|
2018
|
+
value: de,
|
|
2019
|
+
onChange: he,
|
|
2020
|
+
placeholder: ie,
|
|
2021
|
+
clearLabel: ae,
|
|
2022
|
+
"aria-label": ie
|
|
1805
2023
|
})
|
|
1806
2024
|
}),
|
|
1807
|
-
!T && /* @__PURE__ */
|
|
1808
|
-
activeTab:
|
|
1809
|
-
labels:
|
|
2025
|
+
!T && /* @__PURE__ */ W(zt, {
|
|
2026
|
+
activeTab: q,
|
|
2027
|
+
labels: oe,
|
|
1810
2028
|
onChange: (e) => {
|
|
1811
|
-
|
|
2029
|
+
me(e), w?.(e);
|
|
1812
2030
|
},
|
|
1813
2031
|
tabClassName: O?.tabClassName,
|
|
1814
2032
|
hiddenSources: E
|
|
1815
2033
|
}),
|
|
1816
|
-
/* @__PURE__ */
|
|
2034
|
+
/* @__PURE__ */ W(jt, {
|
|
1817
2035
|
conversations: e,
|
|
1818
2036
|
isLoading: t,
|
|
1819
2037
|
isUpdatingTitles: i,
|
|
1820
2038
|
preserveActiveSearchResult: o,
|
|
1821
2039
|
onSelectConversation: c,
|
|
1822
2040
|
activeConversationId: l,
|
|
1823
|
-
labels:
|
|
1824
|
-
searchQuery:
|
|
1825
|
-
activeFilter:
|
|
2041
|
+
labels: J,
|
|
2042
|
+
searchQuery: de,
|
|
2043
|
+
activeFilter: q,
|
|
1826
2044
|
hiddenSources: E,
|
|
1827
2045
|
getActions: _,
|
|
1828
2046
|
onActionMenuOpen: v,
|
|
1829
2047
|
onMoveConversation: x,
|
|
1830
2048
|
onVisibleConversationIdsChange: S,
|
|
1831
|
-
styles:
|
|
2049
|
+
styles: _e
|
|
1832
2050
|
})
|
|
1833
2051
|
]
|
|
1834
2052
|
});
|
|
1835
|
-
}),
|
|
1836
|
-
let [f, g] =
|
|
2053
|
+
}), Ut = I(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: a, onCancel: c, onGenerateWithAi: l, labels: u, styles: d }) => {
|
|
2054
|
+
let [f, g] = H(t), [_, v] = H(!1), [y, x] = H(null), E = V(null), k = V(!1), A = V(0);
|
|
1837
2055
|
R(() => {
|
|
1838
2056
|
let n = e && !k.current;
|
|
1839
2057
|
if (k.current = e, !e) {
|
|
@@ -1855,7 +2073,7 @@ var Ze = /* @__PURE__ */ Object.assign(Xe, { displayName: "List" }), Q = /* @__P
|
|
|
1855
2073
|
j
|
|
1856
2074
|
]), I = L((e) => {
|
|
1857
2075
|
e.key === "Enter" && F();
|
|
1858
|
-
}, [F]),
|
|
2076
|
+
}, [F]), ee = L(async () => {
|
|
1859
2077
|
if (_) return;
|
|
1860
2078
|
let e = ++A.current;
|
|
1861
2079
|
v(!0), x(null);
|
|
@@ -1873,8 +2091,8 @@ var Ze = /* @__PURE__ */ Object.assign(Xe, { displayName: "List" }), Q = /* @__P
|
|
|
1873
2091
|
_,
|
|
1874
2092
|
l,
|
|
1875
2093
|
u.renameWithAiError
|
|
1876
|
-
]),
|
|
1877
|
-
return
|
|
2094
|
+
]), te = y ?? r ?? void 0, z;
|
|
2095
|
+
return z = N ? u.nameTooLongError : te, /* @__PURE__ */ W(D, {
|
|
1878
2096
|
open: e,
|
|
1879
2097
|
header: u.popupTitle,
|
|
1880
2098
|
size: O.Sm,
|
|
@@ -1888,40 +2106,40 @@ var Ze = /* @__PURE__ */ Object.assign(Xe, { displayName: "List" }), Q = /* @__P
|
|
|
1888
2106
|
disabled: P,
|
|
1889
2107
|
onClick: F
|
|
1890
2108
|
}],
|
|
1891
|
-
children: /* @__PURE__ */
|
|
2109
|
+
children: /* @__PURE__ */ G("div", {
|
|
1892
2110
|
className: d?.bodyClassName,
|
|
1893
2111
|
style: d?.cssVars,
|
|
1894
|
-
children: [/* @__PURE__ */
|
|
2112
|
+
children: [/* @__PURE__ */ W(C, {
|
|
1895
2113
|
politeness: T.Assertive,
|
|
1896
2114
|
visuallyHidden: !0,
|
|
1897
2115
|
as: w.Span,
|
|
1898
|
-
children: !n && !N &&
|
|
1899
|
-
}), n ? /* @__PURE__ */
|
|
2116
|
+
children: !n && !N && te
|
|
2117
|
+
}), n ? /* @__PURE__ */ W("div", {
|
|
1900
2118
|
className: "h-[120px] px-6 py-4",
|
|
1901
|
-
children: /* @__PURE__ */
|
|
1902
|
-
}) : /* @__PURE__ */
|
|
2119
|
+
children: /* @__PURE__ */ W(M, { size: 50 })
|
|
2120
|
+
}) : /* @__PURE__ */ G("div", {
|
|
1903
2121
|
className: "flex items-start gap-2 px-6 py-3",
|
|
1904
|
-
children: [/* @__PURE__ */
|
|
2122
|
+
children: [/* @__PURE__ */ W("div", {
|
|
1905
2123
|
className: "min-w-0 flex-1",
|
|
1906
|
-
children: /* @__PURE__ */
|
|
2124
|
+
children: /* @__PURE__ */ W(S, {
|
|
1907
2125
|
inputRef: E,
|
|
1908
2126
|
value: f,
|
|
1909
2127
|
placeholder: u.inputPlaceholder,
|
|
1910
|
-
error:
|
|
2128
|
+
error: z,
|
|
1911
2129
|
onChange: (e) => g(o(e ?? "")),
|
|
1912
2130
|
onKeyDown: I
|
|
1913
2131
|
})
|
|
1914
|
-
}), /* @__PURE__ */
|
|
2132
|
+
}), /* @__PURE__ */ W(b, {
|
|
1915
2133
|
"aria-label": u.renameWithAiLabel,
|
|
1916
2134
|
tooltipProps: { tooltip: u.renameWithAiLabel },
|
|
1917
2135
|
disabled: _ || n,
|
|
1918
2136
|
"aria-busy": _,
|
|
1919
|
-
onClick:
|
|
1920
|
-
icon: _ ? /* @__PURE__ */
|
|
2137
|
+
onClick: ee,
|
|
2138
|
+
icon: _ ? /* @__PURE__ */ W("span", {
|
|
1921
2139
|
className: "flex",
|
|
1922
2140
|
"aria-hidden": !0,
|
|
1923
|
-
children: /* @__PURE__ */
|
|
1924
|
-
}) : /* @__PURE__ */
|
|
2141
|
+
children: /* @__PURE__ */ W(M, { size: m.MD })
|
|
2142
|
+
}) : /* @__PURE__ */ W(de, {
|
|
1925
2143
|
size: m.MD,
|
|
1926
2144
|
stroke: h,
|
|
1927
2145
|
"aria-hidden": !0
|
|
@@ -1931,6 +2149,6 @@ var Ze = /* @__PURE__ */ Object.assign(Xe, { displayName: "List" }), Q = /* @__P
|
|
|
1931
2149
|
})
|
|
1932
2150
|
});
|
|
1933
2151
|
});
|
|
1934
|
-
|
|
2152
|
+
Ut.displayName = "RenameConversationPopup";
|
|
1935
2153
|
//#endregion
|
|
1936
|
-
export {
|
|
2154
|
+
export { pe as CONVERSATION_PANEL_CLASS, jt as ConversationList, It as ConversationListHeader, Lt as ConversationListSection, Ht as ConversationPanel, Z as ConversationRowVariant, X as ConversationTypeFilter, Ut as RenameConversationPopup };
|