@epam/ai-dial-conversation-panel 1.1.0-dev.93 → 1.1.0-dev.99
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/ConversationPanel/ConversationPanel.d.ts.map +1 -1
- package/components/ConversationRow/ConversationRow.d.ts +2 -0
- package/components/ConversationRow/ConversationRow.d.ts.map +1 -1
- package/components/RowRenderer/RowRenderer.d.ts.map +1 -1
- package/index.css +1 -1
- package/index.js +251 -241
- package/models/panel-props.d.ts +6 -0
- package/models/panel-props.d.ts.map +1 -1
- package/models/virtual-row.d.ts +2 -0
- package/models/virtual-row.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationPanel.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationPanel/ConversationPanel.tsx"],"names":[],"mappings":"AASA,OAAO,EACL,KAAK,EAAE,EAQR,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AA6BlE,sEAAsE;AACtE,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,
|
|
1
|
+
{"version":3,"file":"ConversationPanel.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationPanel/ConversationPanel.tsx"],"names":[],"mappings":"AASA,OAAO,EACL,KAAK,EAAE,EAQR,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AA6BlE,sEAAsE;AACtE,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAyZxD,CAAC"}
|
|
@@ -23,6 +23,8 @@ export interface ConversationRowProps {
|
|
|
23
23
|
itemTitleClassName?: string;
|
|
24
24
|
/** CSS class applied to the icon badge. Defaults to `'rounded-full'`. */
|
|
25
25
|
itemIconBadgeClassName?: string;
|
|
26
|
+
/** CSS class applied to the task pill badge (background, border, text color, and typography). Defaults to `'border-tertiary bg-layer-base text-secondary dial-caption-semi-text tracking-[0.6px]'`. */
|
|
27
|
+
taskBadgeClassName?: string;
|
|
26
28
|
/** Group this row belongs to — required to enable drag-and-drop. */
|
|
27
29
|
rowGroupKey?: FilterTab;
|
|
28
30
|
/** The full virtual rows array — used to compute drop position. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationRow.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationRow/ConversationRow.tsx"],"names":[],"mappings":"AACA,OAAO,EASL,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAiD,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAKpE,mCAAmC;AACnC,MAAM,WAAW,oBAAoB;IACnC,wCAAwC;IACxC,IAAI,EAAE,gBAAgB,CAAC;IACvB,qDAAqD;IACrD,QAAQ,EAAE,OAAO,CAAC;IAClB,sEAAsE;IACtE,oBAAoB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,uEAAuE;IACvE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sGAAsG;IACtG,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,YAAY,EAAE,CAAC;IACxD,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,CACjB,IAAI,EAAE,gBAAgB,EACtB,OAAO,EAAE,iBAAiB,KACvB,IAAI,CAAC;IACV,qFAAqF;IACrF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yFAAyF;IACzF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,yEAAyE;IACzE,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,oEAAoE;IACpE,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,mEAAmE;IACnE,IAAI,CAAC,EAAE,UAAU,EAAE,CAAC;IACpB,qFAAqF;IACrF,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,qDAAqD;IACrD,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,8FAA8F;IAC9F,iBAAiB,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;IAC1C,qDAAqD;IACrD,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,mDAAmD;IACnD,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,gDAAgD;IAChD,MAAM,CAAC,EAAE,CACP,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,SAAS,EACzB,OAAO,EAAE,MAAM,GAAG,IAAI,KACnB,IAAI,CAAC;CACX;AAED,8GAA8G;AAC9G,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"ConversationRow.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationRow/ConversationRow.tsx"],"names":[],"mappings":"AACA,OAAO,EASL,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAiD,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAKpE,mCAAmC;AACnC,MAAM,WAAW,oBAAoB;IACnC,wCAAwC;IACxC,IAAI,EAAE,gBAAgB,CAA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,EAAE,MAAM,EAChB,cAAc,EAAE,SAAS,EACzB,OAAO,EAAE,MAAM,GAAG,IAAI,KACnB,IAAI,CAAC;CACX;AAED,8GAA8G;AAC9G,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CA6LpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RowRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/RowRenderer/RowRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,KAAK,eAAe,EAAkB,MAAM,0BAA0B,CAAC;AAKhF,+FAA+F;AAC/F,eAAO,MAAM,WAAW,GAAI,iRAsBzB,iBAAiB,CAAC,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"RowRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/RowRenderer/RowRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,KAAK,eAAe,EAAkB,MAAM,0BAA0B,CAAC;AAKhF,+FAA+F;AAC/F,eAAO,MAAM,WAAW,GAAI,iRAsBzB,iBAAiB,CAAC,eAAe,CAAC,4CAqDpC,CAAC"}
|
package/index.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
._tabContainer_153ct_1{background-color:#0000;color:var(--text-tertiary,#c7cbd4)!important;border-color:#0000!important}._tabContainer_153ct_1:hover{background-color:#5c8dea0f;color:var(--text-secondary,#6b7280)!important}._tabContainer_153ct_1>span{text-align:center}._tabContainer_153ct_1._tabActive_153ct_13{background-color:#2764d912;color:var(--text-secondary,#6b7280)!important}._tabContainer_153ct_1._tabActive_153ct_13:hover{background-color:#5c8dea0f}.dial-input:not(.dial-input-error){transition:border-color .15s,box-shadow .15s;border-color:var(--stroke-tertiary,#e0e6f0)!important;border-radius:.75rem!important}.dial-input:not(.dial-input-error):not(:disabled):hover{border-color:var(--stroke-
|
|
1
|
+
._tabContainer_153ct_1{background-color:#0000;color:var(--text-tertiary,#c7cbd4)!important;border-color:#0000!important}._tabContainer_153ct_1:hover{background-color:#5c8dea0f;color:var(--text-secondary,#6b7280)!important}._tabContainer_153ct_1>span{text-align:center}._tabContainer_153ct_1._tabActive_153ct_13{background-color:#2764d912;color:var(--text-secondary,#6b7280)!important}._tabContainer_153ct_1._tabActive_153ct_13:hover{background-color:#5c8dea0f}.dial-input:not(.dial-input-error){transition:border-color .15s,box-shadow .15s;border-color:var(--stroke-tertiary,#e0e6f0)!important;border-radius:.75rem!important}.dial-input:not(.dial-input-error):not(:disabled):hover{border-color:var(--stroke-info,#124ace)!important}.dial-input:not(.dial-input-error):not(:disabled):active,.dial-input:not(.dial-input-error):not(:disabled):focus,.dial-input:not(.dial-input-error):not(:disabled):focus-within{border-color:var(--stroke-info,#124ace)!important;box-shadow:0 0 0 4px var(--bg-accent-primary-alpha,#7da4ff2e)!important}.dial-input-error{border-radius:.75rem!important}._button_1g5dd_1{background:var(--cp-new-chat-bg,var(--bg-control-neutral,#fcfcfc));color:var(--cp-new-chat-text,var(--text-accent,#1d4ed8))}._header_1oif0_1,._item_1oif0_5{color:var(--cp-text,var(--text-primary,#161b2d))}._item_1oif0_5:hover{background:var(--cp-item-hover,var(--bg-layer-sunken,#eef1f7))}._item_1oif0_5._itemActive_1oif0_11{background:var(--cp-item-active,var(--bg-layer-sunken,#eef1f7));color:var(--cp-text,var(--text-primary,#161b2d))}._groupHeader_1oif0_16{color:var(--cp-text-secondary,var(--text-tertiary,#c7cbd4))}._dropZoneActive_1oif0_20{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow,0 0 #0000);--tw-ring-inset:inset;--tw-ring-color:var(--cp-drop-zone-ring,var(--stroke-info,#124ace))}._triggerActive_1oif0_25{background:var(--cp-trigger-bg,var(--bg-control-accent-alpha-active,#2764d933))}._triggerActive_1oif0_25 ._triggerIcon_1oif0_28{color:var(--cp-trigger-icon,var(--text-accent,#1d4ed8))}._triggerIcon_1oif0_28{color:var(--cp-trigger-icon-idle,var(--text-secondary,#6b7280))}
|
|
2
2
|
/*$vite$:1*/
|
package/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { DeploymentIcon as e, buildCssVars as t, mergeClasses as n } from "@epam/ai-dial-chat-shared";
|
|
2
2
|
import { PanelEmpty as r, PanelNoResults as i, SearchInput as a, SidebarOrientation as o, SidebarPanel as s } from "@epam/ai-dial-sidebar";
|
|
3
3
|
import { Button as c, DIAL_ICON_SIZE as l, DialDropdown as u, DialEllipsisTooltip as d, DialSkeleton as f, DialSkeletonVariant as p, DialTag as m, ElementSize as h, GhostIconButton as g, Highlight as _, mergeClasses as v } from "@epam/ai-dial-ui-kit";
|
|
4
|
-
import { createElement as y, memo as b, useCallback as x, useEffect as S, useId as
|
|
5
|
-
import { jsx as
|
|
6
|
-
import { IconCaretDownFilled as
|
|
4
|
+
import { createElement as y, memo as b, useCallback as x, useEffect as S, useId as C, useImperativeHandle as w, useLayoutEffect as T, useMemo as E, useRef as D, useState as O } from "react";
|
|
5
|
+
import { jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
6
|
+
import { IconCaretDownFilled as j, IconCaretRightFilled as M, IconClock as N, IconDotsVertical as P, IconPlus as F } from "@tabler/icons-react";
|
|
7
7
|
//#region ../../node_modules/react-window/dist/react-window.js
|
|
8
|
-
var
|
|
9
|
-
function
|
|
8
|
+
var I = typeof window < "u" ? T : S;
|
|
9
|
+
function L(e) {
|
|
10
10
|
if (e !== void 0) switch (typeof e) {
|
|
11
11
|
case "number": return e;
|
|
12
12
|
case "string":
|
|
@@ -14,15 +14,15 @@ function F(e) {
|
|
|
14
14
|
break;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
let { styleHeight: s, styleWidth: c } =
|
|
19
|
-
styleHeight:
|
|
20
|
-
styleWidth:
|
|
21
|
-
}), [o?.height, o?.width]), [l, u] =
|
|
17
|
+
function ee({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
|
|
18
|
+
let { styleHeight: s, styleWidth: c } = E(() => ({
|
|
19
|
+
styleHeight: L(o?.height),
|
|
20
|
+
styleWidth: L(o?.width)
|
|
21
|
+
}), [o?.height, o?.width]), [l, u] = O({
|
|
22
22
|
height: t,
|
|
23
23
|
width: n
|
|
24
24
|
}), d = r || a === "only-height" && s !== void 0 || a === "only-width" && c !== void 0 || s !== void 0 && c !== void 0;
|
|
25
|
-
return
|
|
25
|
+
return I(() => {
|
|
26
26
|
if (i === null || d) return;
|
|
27
27
|
let t = new ResizeObserver((e) => {
|
|
28
28
|
for (let t of e) {
|
|
@@ -42,7 +42,7 @@ function I({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i,
|
|
|
42
42
|
i,
|
|
43
43
|
s,
|
|
44
44
|
c
|
|
45
|
-
]),
|
|
45
|
+
]), E(() => ({
|
|
46
46
|
height: s ?? l.height,
|
|
47
47
|
width: c ?? l.width
|
|
48
48
|
}), [
|
|
@@ -51,26 +51,26 @@ function I({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i,
|
|
|
51
51
|
c
|
|
52
52
|
]);
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
let t =
|
|
54
|
+
function R(e) {
|
|
55
|
+
let t = D(() => {
|
|
56
56
|
throw Error("Cannot call during render.");
|
|
57
57
|
});
|
|
58
|
-
return
|
|
58
|
+
return I(() => {
|
|
59
59
|
t.current = e;
|
|
60
60
|
}, [e]), x((e) => t.current?.(e), [t]);
|
|
61
61
|
}
|
|
62
|
-
var
|
|
63
|
-
function
|
|
64
|
-
if (
|
|
62
|
+
var z = null;
|
|
63
|
+
function te(e = !1) {
|
|
64
|
+
if (z === null || e) {
|
|
65
65
|
let e = document.createElement("div"), t = e.style;
|
|
66
66
|
t.width = "50px", t.height = "50px", t.overflow = "scroll", t.direction = "rtl";
|
|
67
67
|
let n = document.createElement("div"), r = n.style;
|
|
68
|
-
return r.width = "100px", r.height = "100px", e.appendChild(n), document.body.appendChild(e), e.scrollLeft > 0 ?
|
|
68
|
+
return r.width = "100px", r.height = "100px", e.appendChild(n), document.body.appendChild(e), e.scrollLeft > 0 ? z = "positive-descending" : (e.scrollLeft = 1, z = e.scrollLeft === 0 ? "negative" : "positive-ascending"), document.body.removeChild(e), z;
|
|
69
69
|
}
|
|
70
|
-
return
|
|
70
|
+
return z;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
if (t === "horizontal" && n) switch (
|
|
72
|
+
function B({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
|
|
73
|
+
if (t === "horizontal" && n) switch (te()) {
|
|
74
74
|
case "negative": return -r;
|
|
75
75
|
case "positive-descending":
|
|
76
76
|
if (e) {
|
|
@@ -81,26 +81,26 @@ function z({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
|
|
|
81
81
|
}
|
|
82
82
|
return r;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function V(e, t = "Assertion error") {
|
|
85
85
|
if (!e) throw console.error(t), Error(t);
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function H(e, t) {
|
|
88
88
|
if (e === t) return !0;
|
|
89
|
-
if (!!e != !!t || (
|
|
89
|
+
if (!!e != !!t || (V(e !== void 0), V(t !== void 0), Object.keys(e).length !== Object.keys(t).length)) return !1;
|
|
90
90
|
for (let n in e) if (!Object.is(t[n], e[n])) return !1;
|
|
91
91
|
return !0;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function ne({ cachedBounds: e, itemCount: t, itemSize: n }) {
|
|
94
94
|
if (t === 0) return 0;
|
|
95
95
|
if (typeof n == "number") return t * n;
|
|
96
96
|
{
|
|
97
97
|
let n = e.get(e.size === 0 ? 0 : e.size - 1);
|
|
98
|
-
return
|
|
98
|
+
return V(n !== void 0, "Unexpected bounds cache miss"), t * ((n.scrollOffset + n.size) / e.size);
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function U({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, containerScrollOffset: a, containerSize: o }) {
|
|
102
102
|
if (n < 0 || n >= r) throw RangeError(`Invalid index specified: ${n}`, { cause: `Index ${n} is not within the range of 0 - ${r - 1}` });
|
|
103
|
-
let s =
|
|
103
|
+
let s = ne({
|
|
104
104
|
cachedBounds: t,
|
|
105
105
|
itemCount: r,
|
|
106
106
|
itemSize: i
|
|
@@ -112,7 +112,7 @@ function ne({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, co
|
|
|
112
112
|
default: return a >= u && a <= l ? a : a < u ? u : l;
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function W({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemCount: r, overscanCount: i }) {
|
|
116
116
|
let a = r - 1, o = 0, s = -1, c = 0, l = -1, u = 0;
|
|
117
117
|
for (; u < a;) {
|
|
118
118
|
let n = e.get(u);
|
|
@@ -131,11 +131,11 @@ function U({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemCo
|
|
|
131
131
|
stopIndexOverscan: l
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function G({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
135
135
|
let r = /* @__PURE__ */ new Map();
|
|
136
136
|
return {
|
|
137
137
|
get(i) {
|
|
138
|
-
for (
|
|
138
|
+
for (V(i < e, `Invalid index ${i}`); r.size - 1 < i;) {
|
|
139
139
|
let e = r.size, a;
|
|
140
140
|
switch (typeof n) {
|
|
141
141
|
case "function":
|
|
@@ -151,14 +151,14 @@ function W({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
|
151
151
|
});
|
|
152
152
|
else {
|
|
153
153
|
let t = r.get(e - 1);
|
|
154
|
-
|
|
154
|
+
V(t !== void 0, `Unexpected bounds cache miss for index ${i}`), r.set(e, {
|
|
155
155
|
scrollOffset: t.scrollOffset + t.size,
|
|
156
156
|
size: a
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
let a = r.get(i);
|
|
161
|
-
return
|
|
161
|
+
return V(a !== void 0, `Unexpected bounds cache miss for index ${i}`), a;
|
|
162
162
|
},
|
|
163
163
|
set(e, t) {
|
|
164
164
|
r.set(e, t);
|
|
@@ -168,8 +168,8 @@ function W({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
return
|
|
171
|
+
function K({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
172
|
+
return E(() => G({
|
|
173
173
|
itemCount: e,
|
|
174
174
|
itemProps: t,
|
|
175
175
|
itemSize: n
|
|
@@ -179,11 +179,11 @@ function G({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
|
179
179
|
n
|
|
180
180
|
]);
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function q({ containerSize: e, itemSize: t }) {
|
|
183
183
|
let n;
|
|
184
184
|
switch (typeof t) {
|
|
185
185
|
case "string":
|
|
186
|
-
|
|
186
|
+
V(t.endsWith("%"), `Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`), V(e !== void 0, "Container size must be defined if a percentage item size is specified"), n = e * parseInt(t) / 100;
|
|
187
187
|
break;
|
|
188
188
|
default:
|
|
189
189
|
n = t;
|
|
@@ -191,21 +191,21 @@ function K({ containerSize: e, itemSize: t }) {
|
|
|
191
191
|
}
|
|
192
192
|
return n;
|
|
193
193
|
}
|
|
194
|
-
function
|
|
195
|
-
let { height: u = n, width: d = n } =
|
|
194
|
+
function J({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0, direction: r, isRtl: i = !1, itemCount: a, itemProps: o, itemSize: s, onResize: c, overscanCount: l }) {
|
|
195
|
+
let { height: u = n, width: d = n } = ee({
|
|
196
196
|
defaultHeight: r === "vertical" ? n : void 0,
|
|
197
197
|
defaultWidth: r === "horizontal" ? n : void 0,
|
|
198
198
|
element: e,
|
|
199
199
|
mode: r === "vertical" ? "only-height" : "only-width",
|
|
200
200
|
style: t
|
|
201
|
-
}), f =
|
|
201
|
+
}), f = D({
|
|
202
202
|
height: 0,
|
|
203
203
|
width: 0
|
|
204
|
-
}), p = r === "vertical" ? u : d, m =
|
|
204
|
+
}), p = r === "vertical" ? u : d, m = q({
|
|
205
205
|
containerSize: p,
|
|
206
206
|
itemSize: s
|
|
207
207
|
});
|
|
208
|
-
|
|
208
|
+
T(() => {
|
|
209
209
|
if (typeof c == "function") {
|
|
210
210
|
let e = f.current;
|
|
211
211
|
(e.height !== u || e.width !== d) && (c({
|
|
@@ -218,22 +218,22 @@ function q({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0
|
|
|
218
218
|
c,
|
|
219
219
|
d
|
|
220
220
|
]);
|
|
221
|
-
let h =
|
|
221
|
+
let h = K({
|
|
222
222
|
itemCount: a,
|
|
223
223
|
itemProps: o,
|
|
224
224
|
itemSize: m
|
|
225
|
-
}), g = x((e) => h.get(e), [h]), [_, v] =
|
|
225
|
+
}), g = x((e) => h.get(e), [h]), [_, v] = O(() => W({
|
|
226
226
|
cachedBounds: h,
|
|
227
227
|
containerScrollOffset: 0,
|
|
228
228
|
containerSize: p,
|
|
229
229
|
itemCount: a,
|
|
230
230
|
overscanCount: l
|
|
231
|
-
})), { startIndexVisible: y, startIndexOverscan: b, stopIndexVisible: S, stopIndexOverscan:
|
|
231
|
+
})), { startIndexVisible: y, startIndexOverscan: b, stopIndexVisible: S, stopIndexOverscan: C } = {
|
|
232
232
|
startIndexVisible: Math.min(a - 1, _.startIndexVisible),
|
|
233
233
|
startIndexOverscan: Math.min(a - 1, _.startIndexOverscan),
|
|
234
234
|
stopIndexVisible: Math.min(a - 1, _.stopIndexVisible),
|
|
235
235
|
stopIndexOverscan: Math.min(a - 1, _.stopIndexOverscan)
|
|
236
|
-
},
|
|
236
|
+
}, w = x(() => ne({
|
|
237
237
|
cachedBounds: h,
|
|
238
238
|
itemCount: a,
|
|
239
239
|
itemSize: m
|
|
@@ -241,9 +241,9 @@ function q({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0
|
|
|
241
241
|
h,
|
|
242
242
|
a,
|
|
243
243
|
m
|
|
244
|
-
]),
|
|
244
|
+
]), E = x((t) => W({
|
|
245
245
|
cachedBounds: h,
|
|
246
|
-
containerScrollOffset:
|
|
246
|
+
containerScrollOffset: B({
|
|
247
247
|
containerElement: e,
|
|
248
248
|
direction: r,
|
|
249
249
|
isRtl: i,
|
|
@@ -261,19 +261,19 @@ function q({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0
|
|
|
261
261
|
a,
|
|
262
262
|
l
|
|
263
263
|
]);
|
|
264
|
-
return
|
|
265
|
-
v(
|
|
264
|
+
return I(() => {
|
|
265
|
+
v(E((r === "vertical" ? e?.scrollTop : e?.scrollLeft) ?? 0));
|
|
266
266
|
}, [
|
|
267
267
|
e,
|
|
268
268
|
r,
|
|
269
|
-
|
|
270
|
-
]),
|
|
269
|
+
E
|
|
270
|
+
]), I(() => {
|
|
271
271
|
if (!e) return;
|
|
272
272
|
let t = () => {
|
|
273
273
|
v((t) => {
|
|
274
|
-
let { scrollLeft: n, scrollTop: o } = e, s =
|
|
274
|
+
let { scrollLeft: n, scrollTop: o } = e, s = W({
|
|
275
275
|
cachedBounds: h,
|
|
276
|
-
containerScrollOffset:
|
|
276
|
+
containerScrollOffset: B({
|
|
277
277
|
containerElement: e,
|
|
278
278
|
direction: r,
|
|
279
279
|
isRtl: i,
|
|
@@ -283,7 +283,7 @@ function q({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0
|
|
|
283
283
|
itemCount: a,
|
|
284
284
|
overscanCount: l
|
|
285
285
|
});
|
|
286
|
-
return
|
|
286
|
+
return H(s, t) ? t : s;
|
|
287
287
|
});
|
|
288
288
|
};
|
|
289
289
|
return e.addEventListener("scroll", t), () => {
|
|
@@ -298,9 +298,9 @@ function q({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0
|
|
|
298
298
|
l
|
|
299
299
|
]), {
|
|
300
300
|
getCellBounds: g,
|
|
301
|
-
getEstimatedSize:
|
|
302
|
-
scrollToIndex:
|
|
303
|
-
let s =
|
|
301
|
+
getEstimatedSize: w,
|
|
302
|
+
scrollToIndex: R(({ align: t = "auto", containerScrollOffset: n, index: o }) => {
|
|
303
|
+
let s = U({
|
|
304
304
|
align: t,
|
|
305
305
|
cachedBounds: h,
|
|
306
306
|
containerScrollOffset: n,
|
|
@@ -310,53 +310,53 @@ function q({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0
|
|
|
310
310
|
itemSize: m
|
|
311
311
|
});
|
|
312
312
|
if (e) {
|
|
313
|
-
if (s =
|
|
313
|
+
if (s = B({
|
|
314
314
|
containerElement: e,
|
|
315
315
|
direction: r,
|
|
316
316
|
isRtl: i,
|
|
317
317
|
scrollOffset: s
|
|
318
318
|
}), typeof e.scrollTo != "function") {
|
|
319
|
-
let e =
|
|
320
|
-
|
|
319
|
+
let e = E(s);
|
|
320
|
+
H(_, e) || v(e);
|
|
321
321
|
}
|
|
322
322
|
return s;
|
|
323
323
|
}
|
|
324
324
|
}),
|
|
325
325
|
startIndexOverscan: b,
|
|
326
326
|
startIndexVisible: y,
|
|
327
|
-
stopIndexOverscan:
|
|
327
|
+
stopIndexOverscan: C,
|
|
328
328
|
stopIndexVisible: S
|
|
329
329
|
};
|
|
330
330
|
}
|
|
331
331
|
function re(e) {
|
|
332
|
-
return
|
|
332
|
+
return E(() => e, Object.values(e));
|
|
333
333
|
}
|
|
334
334
|
function ie(e, t) {
|
|
335
335
|
let { ariaAttributes: n, style: r, ...i } = e, { ariaAttributes: a, style: o, ...s } = t;
|
|
336
|
-
return
|
|
336
|
+
return H(n, a) && H(r, o) && H(i, s);
|
|
337
337
|
}
|
|
338
338
|
function ae(e) {
|
|
339
339
|
return typeof e == "object" && !!e && "getAverageRowHeight" in e && typeof e.getAverageRowHeight == "function";
|
|
340
340
|
}
|
|
341
|
-
var
|
|
342
|
-
function
|
|
343
|
-
let m = re(u), h =
|
|
341
|
+
var oe = "data-react-window-index";
|
|
342
|
+
function se({ children: e, className: t, defaultHeight: n = 0, listRef: r, onResize: i, onRowsRendered: a, overscanCount: o = 3, rowComponent: s, rowCount: c, rowHeight: l, rowProps: u, tagName: d = "div", style: f, ...p }) {
|
|
343
|
+
let m = re(u), h = E(() => b(s, ie), [s]), [g, _] = O(null), v = ae(l), { getCellBounds: x, getEstimatedSize: C, scrollToIndex: T, startIndexOverscan: D, startIndexVisible: A, stopIndexOverscan: j, stopIndexVisible: M } = J({
|
|
344
344
|
containerElement: g,
|
|
345
345
|
containerStyle: f,
|
|
346
346
|
defaultContainerSize: n,
|
|
347
347
|
direction: "vertical",
|
|
348
348
|
itemCount: c,
|
|
349
349
|
itemProps: m,
|
|
350
|
-
itemSize:
|
|
350
|
+
itemSize: E(() => v ? (e) => l.getRowHeight(e) ?? l.getAverageRowHeight() : l, [v, l]),
|
|
351
351
|
onResize: i,
|
|
352
352
|
overscanCount: o
|
|
353
353
|
});
|
|
354
|
-
|
|
354
|
+
w(r, () => ({
|
|
355
355
|
get element() {
|
|
356
356
|
return g;
|
|
357
357
|
},
|
|
358
358
|
scrollToRow({ align: e = "auto", behavior: t = "auto", index: n }) {
|
|
359
|
-
let r =
|
|
359
|
+
let r = T({
|
|
360
360
|
align: e,
|
|
361
361
|
containerScrollOffset: g?.scrollTop ?? 0,
|
|
362
362
|
index: n
|
|
@@ -366,38 +366,38 @@ function oe({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
|
|
|
366
366
|
top: r
|
|
367
367
|
});
|
|
368
368
|
}
|
|
369
|
-
}), [g,
|
|
369
|
+
}), [g, T]), I(() => {
|
|
370
370
|
if (!g) return;
|
|
371
371
|
let e = Array.from(g.children).filter((e, t) => {
|
|
372
372
|
if (e.hasAttribute("aria-hidden")) return !1;
|
|
373
|
-
let n = `${
|
|
374
|
-
return e.setAttribute(
|
|
373
|
+
let n = `${D + t}`;
|
|
374
|
+
return e.setAttribute(oe, n), !0;
|
|
375
375
|
});
|
|
376
376
|
if (v) return l.observeRowElements(e);
|
|
377
377
|
}, [
|
|
378
378
|
g,
|
|
379
379
|
v,
|
|
380
380
|
l,
|
|
381
|
-
|
|
382
|
-
|
|
381
|
+
D,
|
|
382
|
+
j
|
|
383
383
|
]), S(() => {
|
|
384
|
-
|
|
385
|
-
startIndex:
|
|
386
|
-
stopIndex:
|
|
384
|
+
D >= 0 && j >= 0 && a && a({
|
|
385
|
+
startIndex: A,
|
|
386
|
+
stopIndex: M
|
|
387
387
|
}, {
|
|
388
|
-
startIndex:
|
|
389
|
-
stopIndex:
|
|
388
|
+
startIndex: D,
|
|
389
|
+
stopIndex: j
|
|
390
390
|
});
|
|
391
391
|
}, [
|
|
392
392
|
a,
|
|
393
|
-
|
|
394
|
-
k,
|
|
393
|
+
D,
|
|
395
394
|
A,
|
|
396
|
-
j
|
|
395
|
+
j,
|
|
396
|
+
M
|
|
397
397
|
]);
|
|
398
|
-
let
|
|
398
|
+
let N = E(() => {
|
|
399
399
|
let e = [];
|
|
400
|
-
if (c > 0) for (let t =
|
|
400
|
+
if (c > 0) for (let t = D; t <= j; t++) {
|
|
401
401
|
let n = x(t);
|
|
402
402
|
e.push(/* @__PURE__ */ y(h, {
|
|
403
403
|
...m,
|
|
@@ -424,12 +424,12 @@ function oe({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
|
|
|
424
424
|
v,
|
|
425
425
|
c,
|
|
426
426
|
m,
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
]),
|
|
427
|
+
D,
|
|
428
|
+
j
|
|
429
|
+
]), P = /* @__PURE__ */ k("div", {
|
|
430
430
|
"aria-hidden": !0,
|
|
431
431
|
style: {
|
|
432
|
-
height:
|
|
432
|
+
height: C(),
|
|
433
433
|
width: "100%",
|
|
434
434
|
zIndex: -1
|
|
435
435
|
}
|
|
@@ -446,7 +446,7 @@ function oe({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
|
|
|
446
446
|
overflowY: "auto",
|
|
447
447
|
...f
|
|
448
448
|
}
|
|
449
|
-
},
|
|
449
|
+
}, N, e, P);
|
|
450
450
|
}
|
|
451
451
|
//#endregion
|
|
452
452
|
//#region src/types/virtual-row.ts
|
|
@@ -454,25 +454,25 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
454
454
|
return e.Header = "header", e.Item = "item", e;
|
|
455
455
|
}({}), X = /* @__PURE__ */ function(e) {
|
|
456
456
|
return e.All = "all", e.Pinned = "pinned", e.MyChats = "my-chats", e.Shared = "shared", e.Organization = "organization", e;
|
|
457
|
-
}({}),
|
|
457
|
+
}({}), ce = (e) => `${60 + e * 23 % 35}%`, le = (e, t) => e ? t ? "pe-9" : "pe-2 group-hover/conversation:pe-9" : "pe-3", ue = (e, t) => t.rows[e].kind === Y.Item ? 36 : e === 0 ? 24 : 56, de = (e) => {
|
|
458
458
|
switch (e) {
|
|
459
459
|
case X.Shared: return X.Shared;
|
|
460
460
|
case X.Organization: return X.Organization;
|
|
461
461
|
default: return X.MyChats;
|
|
462
462
|
}
|
|
463
|
-
},
|
|
463
|
+
}, fe = (e, t) => {
|
|
464
464
|
let n = null;
|
|
465
465
|
for (let r of e) if (r.kind === Y.Header) n = r.groupKey;
|
|
466
466
|
else if (r.item.id === t) return n;
|
|
467
467
|
return null;
|
|
468
|
-
},
|
|
468
|
+
}, pe = (e, t, n) => {
|
|
469
469
|
let r = /* @__PURE__ */ new Set();
|
|
470
470
|
if (t != null && r.add(t), t === X.Pinned) {
|
|
471
471
|
let t = n.find((t) => t.id === e);
|
|
472
|
-
t && r.add(
|
|
472
|
+
t && r.add(de(t.source));
|
|
473
473
|
} else r.add(X.Pinned);
|
|
474
474
|
return r;
|
|
475
|
-
},
|
|
475
|
+
}, me = (e, t, n, r) => {
|
|
476
476
|
let i = e.currentTarget.getBoundingClientRect();
|
|
477
477
|
if (e.clientY >= i.top + i.height / 2) return t;
|
|
478
478
|
let a = null, o = !1;
|
|
@@ -482,30 +482,30 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
482
482
|
a = e.item.id;
|
|
483
483
|
}
|
|
484
484
|
return null;
|
|
485
|
-
},
|
|
485
|
+
}, he = {
|
|
486
486
|
tabContainer: "_tabContainer_153ct_1",
|
|
487
487
|
tabActive: "_tabActive_153ct_13"
|
|
488
|
-
},
|
|
488
|
+
}, ge = b(({ tabs: e, activeTabId: t, onTabChange: r, styles: i }) => {
|
|
489
489
|
let { tabClassName: a = "dial-tiny-semi-text" } = i?.typography ?? {};
|
|
490
|
-
return /* @__PURE__ */
|
|
490
|
+
return /* @__PURE__ */ k("div", {
|
|
491
491
|
className: "flex flex-nowrap gap-1",
|
|
492
492
|
role: "tablist",
|
|
493
493
|
children: e.map((e) => {
|
|
494
494
|
let i = t === e.id;
|
|
495
|
-
return /* @__PURE__ */
|
|
495
|
+
return /* @__PURE__ */ k("div", {
|
|
496
496
|
role: "tab",
|
|
497
497
|
"aria-selected": i,
|
|
498
498
|
className: "contents",
|
|
499
|
-
children: /* @__PURE__ */
|
|
499
|
+
children: /* @__PURE__ */ k(m, {
|
|
500
500
|
label: e.label,
|
|
501
501
|
selected: i,
|
|
502
502
|
onClick: () => r(e.id),
|
|
503
|
-
className: n("box-border h-auto shrink-0 justify-center rounded-full p-2 text-center", a,
|
|
503
|
+
className: n("box-border h-auto shrink-0 justify-center rounded-full p-2 text-center", a, he.tabContainer, i && he.tabActive)
|
|
504
504
|
})
|
|
505
505
|
}, e.id);
|
|
506
506
|
})
|
|
507
507
|
});
|
|
508
|
-
}),
|
|
508
|
+
}), _e = [
|
|
509
509
|
{
|
|
510
510
|
value: X.All,
|
|
511
511
|
labelKey: "all"
|
|
@@ -522,10 +522,10 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
522
522
|
value: X.Organization,
|
|
523
523
|
labelKey: "organization"
|
|
524
524
|
}
|
|
525
|
-
],
|
|
525
|
+
], ve = b(({ activeTab: e, labels: t, onChange: n, tabClassName: r = "dial-tiny-semi-text" }) => /* @__PURE__ */ k("div", {
|
|
526
526
|
className: "mx-3 my-2",
|
|
527
|
-
children: /* @__PURE__ */
|
|
528
|
-
tabs:
|
|
527
|
+
children: /* @__PURE__ */ k(ge, {
|
|
528
|
+
tabs: _e.map(({ value: e, labelKey: n }) => ({
|
|
529
529
|
id: e,
|
|
530
530
|
label: t[n]
|
|
531
531
|
})),
|
|
@@ -533,37 +533,37 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
533
533
|
onTabChange: (e) => n(e),
|
|
534
534
|
styles: { typography: { tabClassName: v(r, "flex-1") } }
|
|
535
535
|
})
|
|
536
|
-
})),
|
|
536
|
+
})), ye = { button: "_button_1g5dd_1" }, be = b(({ label: e, onClick: r, labelClassName: i = "dial-small-semi-text", colors: a }) => /* @__PURE__ */ k("div", {
|
|
537
537
|
className: "px-3 py-2",
|
|
538
538
|
style: t({
|
|
539
539
|
"--cp-new-chat-bg": a?.background,
|
|
540
540
|
"--cp-new-chat-text": a?.text
|
|
541
541
|
}),
|
|
542
|
-
children: /* @__PURE__ */
|
|
542
|
+
children: /* @__PURE__ */ A("button", {
|
|
543
543
|
onClick: r,
|
|
544
544
|
type: "button",
|
|
545
|
-
className: n("flex h-[36px] w-full cursor-pointer items-center justify-center gap-2 rounded-full px-3 py-1 shadow-sm hover:shadow-md active:shadow-xs",
|
|
546
|
-
children: [/* @__PURE__ */
|
|
545
|
+
className: n("flex h-[36px] w-full cursor-pointer items-center justify-center gap-2 rounded-full px-3 py-1 shadow-sm hover:shadow-md active:shadow-xs", ye.button),
|
|
546
|
+
children: [/* @__PURE__ */ k(F, {
|
|
547
547
|
size: 18,
|
|
548
548
|
stroke: 2,
|
|
549
549
|
className: "shrink-0"
|
|
550
|
-
}), /* @__PURE__ */
|
|
550
|
+
}), /* @__PURE__ */ k("span", {
|
|
551
551
|
className: i,
|
|
552
552
|
children: e
|
|
553
553
|
})]
|
|
554
554
|
})
|
|
555
555
|
})), Z = {
|
|
556
556
|
skeletonColor: "var(--cp-skeleton-color, var(--bg-layer-4, #d1dbea))",
|
|
557
|
-
header: "
|
|
558
|
-
item: "
|
|
559
|
-
itemActive: "
|
|
560
|
-
groupHeader: "
|
|
561
|
-
dropZoneActive: "
|
|
562
|
-
triggerActive: "
|
|
563
|
-
triggerIcon: "
|
|
564
|
-
},
|
|
557
|
+
header: "_header_1oif0_1",
|
|
558
|
+
item: "_item_1oif0_5",
|
|
559
|
+
itemActive: "_itemActive_1oif0_11",
|
|
560
|
+
groupHeader: "_groupHeader_1oif0_16",
|
|
561
|
+
dropZoneActive: "_dropZoneActive_1oif0_20",
|
|
562
|
+
triggerActive: "_triggerActive_1oif0_25",
|
|
563
|
+
triggerIcon: "_triggerIcon_1oif0_28"
|
|
564
|
+
}, xe = ({ label: e, isExpanded: t, onToggle: r, listId: i, className: a = "dial-tiny-semi-text uppercase", dropZoneGroupKey: o, isDragOver: s, onDragOver: c, onDragLeave: l, onDrop: u }) => {
|
|
565
565
|
let f = o != null;
|
|
566
|
-
return /* @__PURE__ */
|
|
566
|
+
return /* @__PURE__ */ A("button", {
|
|
567
567
|
type: "button",
|
|
568
568
|
"aria-expanded": t,
|
|
569
569
|
"aria-controls": i,
|
|
@@ -578,106 +578,113 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
578
578
|
f && (e.preventDefault(), u?.(o, o, null));
|
|
579
579
|
} : void 0,
|
|
580
580
|
className: n("flex h-6 w-full items-center gap-1 rounded py-1 pe-3 text-start", a, Z.groupHeader, s && Z.dropZoneActive),
|
|
581
|
-
children: [t ? /* @__PURE__ */
|
|
581
|
+
children: [t ? /* @__PURE__ */ k(j, {
|
|
582
582
|
stroke: .5,
|
|
583
583
|
size: 12,
|
|
584
584
|
className: "shrink-0",
|
|
585
585
|
"aria-hidden": !0
|
|
586
|
-
}) : /* @__PURE__ */
|
|
586
|
+
}) : /* @__PURE__ */ k(M, {
|
|
587
587
|
stroke: .5,
|
|
588
588
|
size: 12,
|
|
589
589
|
className: "shrink-0 rtl:scale-x-[-1]",
|
|
590
590
|
"aria-hidden": !0
|
|
591
|
-
}), /* @__PURE__ */
|
|
591
|
+
}), /* @__PURE__ */ k(d, { text: e })]
|
|
592
592
|
});
|
|
593
|
-
},
|
|
594
|
-
let [
|
|
595
|
-
|
|
596
|
-
}, [t, s]),
|
|
593
|
+
}, Se = ({ item: t, isActive: r, onSelectConversation: i, searchQuery: a = "", getActions: o, onActionMenuOpen: s, actionsLabel: d = "More actions", itemTitleClassName: m = "dial-small-text", itemIconBadgeClassName: v, taskBadgeClassName: y = "border-tertiary bg-layer-base text-secondary dial-caption-semi-text uppercase tracking-[0.6px]", rowGroupKey: b, rows: S, draggingId: C, dragOverId: w, allowedDropGroups: T, onDragStart: E, onDragEnd: j, onDragOver: M, onDragLeave: F, onDrop: I }) => {
|
|
594
|
+
let [L, ee] = O(!1), R = D(null), z = x((e) => {
|
|
595
|
+
ee(e), e && R.current && s?.(t, R.current);
|
|
596
|
+
}, [t, s]), te = o?.(t) ?? [], B = te.length > 0, V = t.isIconLoading ? /* @__PURE__ */ k(f, {
|
|
597
597
|
variant: p.Circular,
|
|
598
598
|
width: l.LG,
|
|
599
599
|
height: l.LG,
|
|
600
600
|
color: Z.skeletonColor,
|
|
601
601
|
"aria-hidden": !0
|
|
602
|
-
}) : /* @__PURE__ */
|
|
602
|
+
}) : /* @__PURE__ */ k(e, {
|
|
603
603
|
src: t.iconUrl,
|
|
604
604
|
size: l.LG,
|
|
605
605
|
initialsName: t.iconTooltip ?? "",
|
|
606
606
|
labels: { tooltip: t.iconTooltip },
|
|
607
607
|
styles: { badgeClassName: v }
|
|
608
|
-
}),
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
608
|
+
}), H = le(B, L), ne = t.showTaskBadge ? /* @__PURE__ */ A("span", {
|
|
609
|
+
className: n("flex h-5 shrink-0 items-center justify-center gap-0.5 rounded-full border pe-2 ps-1", y),
|
|
610
|
+
children: [/* @__PURE__ */ k(N, {
|
|
611
|
+
size: 12,
|
|
612
|
+
"aria-hidden": !0
|
|
613
|
+
}), t.taskBadgeLabel]
|
|
614
|
+
}) : void 0, U = b != null, W = x((e) => {
|
|
615
|
+
e.currentTarget.contains(e.relatedTarget) || F?.();
|
|
616
|
+
}, [F]), G = x((e) => {
|
|
617
|
+
if (!b || !S || !I) return;
|
|
612
618
|
e.preventDefault();
|
|
613
|
-
let n =
|
|
614
|
-
|
|
619
|
+
let n = me(e, t.id, S, b);
|
|
620
|
+
I(t.id, b, n);
|
|
615
621
|
}, [
|
|
616
622
|
t.id,
|
|
623
|
+
S,
|
|
617
624
|
b,
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
e.preventDefault(), A?.(t.id);
|
|
625
|
+
I
|
|
626
|
+
]), K = t.id === C, q = t.id === w, J = b != null && (T?.has(b) ?? !1), re = C != null;
|
|
627
|
+
return /* @__PURE__ */ A("li", {
|
|
628
|
+
className: n("group/conversation relative", K && "cursor-grabbing opacity-50", q && J && "rounded", q && J && Z.dropZoneActive, re && !K && !J && "cursor-not-allowed"),
|
|
629
|
+
draggable: U || void 0,
|
|
630
|
+
onDragStart: U ? () => E?.(t.id) : void 0,
|
|
631
|
+
onDragEnd: U ? j : void 0,
|
|
632
|
+
onDragOver: U ? (e) => {
|
|
633
|
+
e.preventDefault(), M?.(t.id);
|
|
628
634
|
} : void 0,
|
|
629
|
-
onDragLeave:
|
|
630
|
-
onDrop:
|
|
631
|
-
children: [/* @__PURE__ */
|
|
635
|
+
onDragLeave: U ? W : void 0,
|
|
636
|
+
onDrop: U ? G : void 0,
|
|
637
|
+
children: [/* @__PURE__ */ k("a", {
|
|
632
638
|
href: t.href,
|
|
633
639
|
className: "contents",
|
|
634
640
|
onClick: (e) => {
|
|
635
641
|
t.href && (e.preventDefault(), i(t.id));
|
|
636
642
|
},
|
|
637
|
-
children: /* @__PURE__ */
|
|
638
|
-
iconBefore:
|
|
639
|
-
label: /* @__PURE__ */
|
|
643
|
+
children: /* @__PURE__ */ k(c, {
|
|
644
|
+
iconBefore: V,
|
|
645
|
+
label: /* @__PURE__ */ k(_, {
|
|
640
646
|
text: t.title,
|
|
641
647
|
query: a,
|
|
642
648
|
className: m,
|
|
643
649
|
maxLines: 1
|
|
644
650
|
}),
|
|
645
|
-
|
|
651
|
+
iconAfter: ne,
|
|
652
|
+
textClassName: "min-w-0 flex-1",
|
|
646
653
|
"aria-current": r ? "page" : void 0,
|
|
647
654
|
onClick: t.href ? void 0 : () => i(t.id),
|
|
648
655
|
tabIndex: t.href ? -1 : void 0,
|
|
649
|
-
className: n("h-8 w-full justify-start gap-2 rounded-xl py-2 ps-3",
|
|
656
|
+
className: n("h-8 w-full justify-start gap-2 rounded-xl py-2 ps-3", H, Z.item, r && Z.itemActive, L && Z.itemActive)
|
|
650
657
|
})
|
|
651
|
-
}),
|
|
652
|
-
className: n("absolute inset-y-0 end-1 flex items-center",
|
|
653
|
-
children: /* @__PURE__ */
|
|
654
|
-
items:
|
|
655
|
-
onOpenChange:
|
|
658
|
+
}), B && /* @__PURE__ */ k("div", {
|
|
659
|
+
className: n("absolute inset-y-0 end-1 flex items-center", L ? "opacity-100" : "opacity-0 group-focus-within/conversation:opacity-100 group-hover/conversation:opacity-100"),
|
|
660
|
+
children: /* @__PURE__ */ k(u, {
|
|
661
|
+
items: te,
|
|
662
|
+
onOpenChange: z,
|
|
656
663
|
matchReferenceWidth: !1,
|
|
657
664
|
listClassName: "w-[140px] cp-dropdown-overlay",
|
|
658
|
-
children: /* @__PURE__ */
|
|
659
|
-
ref:
|
|
660
|
-
icon: /* @__PURE__ */
|
|
665
|
+
children: /* @__PURE__ */ k(g, {
|
|
666
|
+
ref: R,
|
|
667
|
+
icon: /* @__PURE__ */ k(P, {
|
|
661
668
|
size: l.SM,
|
|
662
669
|
className: Z.triggerIcon,
|
|
663
670
|
"aria-hidden": !0
|
|
664
671
|
}),
|
|
665
672
|
size: h.Small,
|
|
666
673
|
"aria-label": d,
|
|
667
|
-
className: n(
|
|
674
|
+
className: n(L && Z.triggerActive)
|
|
668
675
|
})
|
|
669
676
|
})
|
|
670
677
|
})]
|
|
671
678
|
});
|
|
672
|
-
},
|
|
679
|
+
}, Ce = ({ index: e, style: t, rows: n, expandedGroups: r, onToggleGroup: i, listId: a, activeConversationId: o, searchQuery: s, onSelectConversation: c, getActions: l, onActionMenuOpen: u, actionsLabel: d, styles: f, draggingId: p, dragOverId: m, allowedDropGroups: h, onDragStart: g, onDragEnd: _, onDragOver: v, onDragLeave: y, onDrop: b }) => {
|
|
673
680
|
let x = n[e];
|
|
674
681
|
if (x.kind === Y.Header) {
|
|
675
682
|
let n = x.groupKey === X.Pinned;
|
|
676
|
-
return /* @__PURE__ */
|
|
683
|
+
return /* @__PURE__ */ k("div", {
|
|
677
684
|
role: "presentation",
|
|
678
685
|
style: t,
|
|
679
686
|
className: e === 0 ? "pt-0" : "pt-8",
|
|
680
|
-
children: /* @__PURE__ */
|
|
687
|
+
children: /* @__PURE__ */ k(xe, {
|
|
681
688
|
label: x.label,
|
|
682
689
|
isExpanded: r.has(x.groupKey),
|
|
683
690
|
onToggle: () => i(x.groupKey),
|
|
@@ -691,11 +698,11 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
691
698
|
})
|
|
692
699
|
});
|
|
693
700
|
}
|
|
694
|
-
return /* @__PURE__ */
|
|
701
|
+
return /* @__PURE__ */ k("div", {
|
|
695
702
|
role: "presentation",
|
|
696
703
|
style: t,
|
|
697
704
|
className: "pt-1",
|
|
698
|
-
children: /* @__PURE__ */
|
|
705
|
+
children: /* @__PURE__ */ k(Se, {
|
|
699
706
|
item: x.item,
|
|
700
707
|
isActive: x.item.id === o,
|
|
701
708
|
searchQuery: s,
|
|
@@ -705,6 +712,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
705
712
|
actionsLabel: d,
|
|
706
713
|
itemTitleClassName: f?.itemTitleClassName,
|
|
707
714
|
itemIconBadgeClassName: f?.itemIconBadgeClassName,
|
|
715
|
+
taskBadgeClassName: f?.taskBadgeClassName,
|
|
708
716
|
rowGroupKey: x.groupKey,
|
|
709
717
|
rows: n,
|
|
710
718
|
draggingId: p,
|
|
@@ -717,28 +725,28 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
717
725
|
onDrop: b
|
|
718
726
|
})
|
|
719
727
|
});
|
|
720
|
-
},
|
|
728
|
+
}, we = (e, t) => t === X.All ? !0 : e.source === t, Te = (e, t) => t ? e.title.toLowerCase().includes(t.toLowerCase()) : !0, Ee = new Set([
|
|
721
729
|
X.Pinned,
|
|
722
730
|
X.MyChats,
|
|
723
731
|
X.Shared,
|
|
724
732
|
X.Organization
|
|
725
|
-
]),
|
|
726
|
-
let { colors:
|
|
733
|
+
]), De = b(({ conversations: e, isLoading: c, isOpen: l, onSelectConversation: u, activeConversationId: d, labels: p, onNewChat: m, styles: h, className: g, getActions: _, onActionMenuOpen: v, onToggle: y, headerActions: b, onMoveConversation: w, activeFilter: T, onActiveFilterChange: j }) => {
|
|
734
|
+
let { colors: M, typography: N, newChatButton: P } = h ?? {}, { title: F, emptyLabel: I, noResultsLabel: L, loadingLabel: ee = "Loading conversations", newChatLabel: R, searchPlaceholder: z, searchClearLabel: te, filterLabels: B, groupLabels: V, actionsLabel: H, closeAriaLabel: ne } = p, [U, W] = O(""), [G, K] = O(X.All);
|
|
727
735
|
S(() => {
|
|
728
|
-
|
|
729
|
-
}, [
|
|
730
|
-
let [q,
|
|
731
|
-
|
|
736
|
+
T != null && K(T);
|
|
737
|
+
}, [T]);
|
|
738
|
+
let [q, J] = O(() => Ee), [re, ie] = O(5), ae = C(), oe = D(null), le = D(null), [de, me] = O(null), [he, ge] = O(null), [_e, ye] = O(null), xe = D(null), Se = D(null), De = x(({ height: e }) => {
|
|
739
|
+
ie(Math.ceil(e / 36 * 2));
|
|
732
740
|
}, []), Oe = x((e) => {
|
|
733
|
-
|
|
741
|
+
J((t) => {
|
|
734
742
|
let n = new Set(t);
|
|
735
743
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
736
744
|
});
|
|
737
745
|
}, []), ke = x(() => {
|
|
738
|
-
xe.current = null,
|
|
746
|
+
xe.current = null, Se.current = null, me(null), ge(null), ye(null);
|
|
739
747
|
}, []), Ae = x((t, n) => {
|
|
740
|
-
let r =
|
|
741
|
-
xe.current = t,
|
|
748
|
+
let r = pe(t, fe(n, t), e);
|
|
749
|
+
xe.current = t, Se.current = r, me(t), ye(r);
|
|
742
750
|
}, [e]), je = x(() => {
|
|
743
751
|
ke();
|
|
744
752
|
}, [ke]), Me = x((e) => {
|
|
@@ -746,31 +754,31 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
746
754
|
}, []), Ne = x(() => {
|
|
747
755
|
ge(null);
|
|
748
756
|
}, []), Pe = x((e, t, n) => {
|
|
749
|
-
let r = xe.current, i =
|
|
750
|
-
ke(), r != null && r !== e && i?.has(t) &&
|
|
757
|
+
let r = xe.current, i = Se.current;
|
|
758
|
+
ke(), r != null && r !== e && i?.has(t) && w?.({
|
|
751
759
|
draggedId: r,
|
|
752
760
|
targetGroupKey: t,
|
|
753
761
|
afterId: n
|
|
754
762
|
});
|
|
755
|
-
}, [ke,
|
|
756
|
-
"--cp-bg":
|
|
757
|
-
"--sb-border":
|
|
758
|
-
"--cp-item-hover":
|
|
759
|
-
"--cp-item-active":
|
|
760
|
-
"--cp-text":
|
|
761
|
-
"--cp-text-secondary":
|
|
762
|
-
"--cp-new-chat-bg":
|
|
763
|
-
"--cp-new-chat-text":
|
|
764
|
-
"--cp-drop-zone-ring":
|
|
765
|
-
"--cp-trigger-bg":
|
|
766
|
-
"--cp-trigger-icon":
|
|
767
|
-
"--cp-trigger-icon-idle":
|
|
768
|
-
"--cp-skeleton-color":
|
|
769
|
-
}), Q =
|
|
763
|
+
}, [ke, w]), Fe = t({
|
|
764
|
+
"--cp-bg": M?.background,
|
|
765
|
+
"--sb-border": M?.border,
|
|
766
|
+
"--cp-item-hover": M?.itemHover,
|
|
767
|
+
"--cp-item-active": M?.itemActive,
|
|
768
|
+
"--cp-text": M?.text,
|
|
769
|
+
"--cp-text-secondary": M?.textSecondary,
|
|
770
|
+
"--cp-new-chat-bg": P?.background,
|
|
771
|
+
"--cp-new-chat-text": P?.text,
|
|
772
|
+
"--cp-drop-zone-ring": M?.dropZoneRing,
|
|
773
|
+
"--cp-trigger-bg": M?.triggerBackground,
|
|
774
|
+
"--cp-trigger-icon": M?.triggerIcon,
|
|
775
|
+
"--cp-trigger-icon-idle": M?.triggerIconIdle,
|
|
776
|
+
"--cp-skeleton-color": M?.skeletonColor
|
|
777
|
+
}), Q = E(() => e.filter((e) => we(e, G) && Te(e, U)), [
|
|
770
778
|
e,
|
|
771
779
|
G,
|
|
772
780
|
U
|
|
773
|
-
]), Ie =
|
|
781
|
+
]), Ie = E(() => Q.filter((e) => e.isPinned), [Q]), Le = E(() => Q.filter((e) => !e.isPinned && e.source !== X.Shared && e.source !== X.Organization), [Q]), Re = E(() => Q.filter((e) => !e.isPinned && e.source === X.Shared), [Q]), ze = E(() => Q.filter((e) => !e.isPinned && e.source === X.Organization), [Q]), Be = E(() => [
|
|
774
782
|
{
|
|
775
783
|
key: X.Pinned,
|
|
776
784
|
label: V?.pinned ?? "Pinned",
|
|
@@ -797,7 +805,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
797
805
|
Le,
|
|
798
806
|
Re,
|
|
799
807
|
ze
|
|
800
|
-
]), $ =
|
|
808
|
+
]), $ = E(() => {
|
|
801
809
|
let e = [];
|
|
802
810
|
for (let t of Be) if (t.items.length !== 0 && (e.push({
|
|
803
811
|
kind: Y.Header,
|
|
@@ -811,24 +819,24 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
811
819
|
return e;
|
|
812
820
|
}, [Be, q]);
|
|
813
821
|
S(() => {
|
|
814
|
-
if (!d ||
|
|
822
|
+
if (!d || le.current === d) return;
|
|
815
823
|
let e = $.findIndex((e) => e.kind === Y.Item && e.item.id === d);
|
|
816
|
-
e >= 0 && (
|
|
824
|
+
e >= 0 && (oe.current?.scrollToRow({
|
|
817
825
|
index: e,
|
|
818
826
|
align: "smart",
|
|
819
827
|
behavior: "smooth"
|
|
820
|
-
}),
|
|
828
|
+
}), le.current = d);
|
|
821
829
|
}, [
|
|
822
830
|
d,
|
|
823
831
|
Be,
|
|
824
832
|
q,
|
|
825
833
|
$
|
|
826
834
|
]);
|
|
827
|
-
let Ve =
|
|
835
|
+
let Ve = E(() => ({
|
|
828
836
|
rows: $,
|
|
829
837
|
expandedGroups: q,
|
|
830
838
|
onToggleGroup: Oe,
|
|
831
|
-
listId:
|
|
839
|
+
listId: ae,
|
|
832
840
|
activeConversationId: d,
|
|
833
841
|
searchQuery: U,
|
|
834
842
|
onSelectConversation: u,
|
|
@@ -836,13 +844,14 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
836
844
|
onActionMenuOpen: v,
|
|
837
845
|
actionsLabel: H,
|
|
838
846
|
styles: {
|
|
839
|
-
groupHeaderClassName:
|
|
840
|
-
itemTitleClassName:
|
|
841
|
-
itemIconBadgeClassName: h?.itemIconBadgeClassName
|
|
847
|
+
groupHeaderClassName: N?.groupHeaderClassName,
|
|
848
|
+
itemTitleClassName: N?.itemTitleClassName,
|
|
849
|
+
itemIconBadgeClassName: h?.itemIconBadgeClassName,
|
|
850
|
+
taskBadgeClassName: h?.taskBadgeClassName
|
|
842
851
|
},
|
|
843
|
-
draggingId:
|
|
852
|
+
draggingId: de,
|
|
844
853
|
dragOverId: he,
|
|
845
|
-
allowedDropGroups:
|
|
854
|
+
allowedDropGroups: _e,
|
|
846
855
|
onDragStart: (e) => Ae(e, $),
|
|
847
856
|
onDragEnd: je,
|
|
848
857
|
onDragOver: Me,
|
|
@@ -852,96 +861,97 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
852
861
|
$,
|
|
853
862
|
q,
|
|
854
863
|
Oe,
|
|
855
|
-
|
|
864
|
+
ae,
|
|
856
865
|
d,
|
|
857
866
|
U,
|
|
858
867
|
u,
|
|
859
868
|
_,
|
|
860
869
|
v,
|
|
861
870
|
H,
|
|
862
|
-
|
|
863
|
-
|
|
871
|
+
N?.groupHeaderClassName,
|
|
872
|
+
N?.itemTitleClassName,
|
|
864
873
|
h?.itemIconBadgeClassName,
|
|
865
|
-
|
|
874
|
+
h?.taskBadgeClassName,
|
|
875
|
+
de,
|
|
866
876
|
he,
|
|
867
|
-
|
|
877
|
+
_e,
|
|
868
878
|
Ae,
|
|
869
879
|
je,
|
|
870
880
|
Me,
|
|
871
881
|
Ne,
|
|
872
882
|
Pe
|
|
873
883
|
]), He = e.length === 0, Ue = e.length > 0 && Q.length === 0;
|
|
874
|
-
return /* @__PURE__ */
|
|
884
|
+
return /* @__PURE__ */ A(s, {
|
|
875
885
|
isOpen: l,
|
|
876
886
|
orientation: o.Left,
|
|
877
|
-
title:
|
|
887
|
+
title: F,
|
|
878
888
|
labels: {
|
|
879
|
-
ariaLabel:
|
|
889
|
+
ariaLabel: F,
|
|
880
890
|
closeLabel: ne
|
|
881
891
|
},
|
|
882
892
|
onClose: y,
|
|
883
893
|
styles: {
|
|
884
894
|
colors: {
|
|
885
|
-
background:
|
|
886
|
-
border:
|
|
895
|
+
background: M?.background,
|
|
896
|
+
border: M?.border
|
|
887
897
|
},
|
|
888
|
-
typography: { fontClassName:
|
|
898
|
+
typography: { fontClassName: N?.fontClassName },
|
|
889
899
|
bodyClassName: "flex flex-col overflow-hidden p-0 gap-3",
|
|
890
900
|
cssVars: Fe,
|
|
891
|
-
titleClassName:
|
|
901
|
+
titleClassName: N?.fontClassName,
|
|
892
902
|
headerClassName: "h-[64px]",
|
|
893
903
|
className: n(l ? "w-[325px] border-s border-e mobile:w-full" : "w-0", g)
|
|
894
904
|
},
|
|
895
905
|
rightActions: b,
|
|
896
906
|
children: [
|
|
897
|
-
/* @__PURE__ */
|
|
898
|
-
label:
|
|
907
|
+
/* @__PURE__ */ k(be, {
|
|
908
|
+
label: R,
|
|
899
909
|
onClick: m,
|
|
900
|
-
labelClassName:
|
|
901
|
-
colors:
|
|
910
|
+
labelClassName: N?.newChatLabelClassName,
|
|
911
|
+
colors: P
|
|
902
912
|
}),
|
|
903
|
-
/* @__PURE__ */
|
|
913
|
+
/* @__PURE__ */ k(a, {
|
|
904
914
|
value: U,
|
|
905
915
|
onChange: W,
|
|
906
916
|
labels: {
|
|
907
|
-
placeholder:
|
|
908
|
-
clearLabel:
|
|
917
|
+
placeholder: z,
|
|
918
|
+
clearLabel: te
|
|
909
919
|
}
|
|
910
920
|
}),
|
|
911
|
-
/* @__PURE__ */
|
|
921
|
+
/* @__PURE__ */ k(ve, {
|
|
912
922
|
activeTab: G,
|
|
913
923
|
labels: B,
|
|
914
924
|
onChange: (e) => {
|
|
915
|
-
K(e),
|
|
925
|
+
K(e), j?.(e);
|
|
916
926
|
},
|
|
917
|
-
tabClassName:
|
|
927
|
+
tabClassName: N?.tabClassName
|
|
918
928
|
}),
|
|
919
|
-
/* @__PURE__ */
|
|
929
|
+
/* @__PURE__ */ k("span", {
|
|
920
930
|
role: "status",
|
|
921
931
|
"aria-live": "polite",
|
|
922
932
|
className: "sr-only",
|
|
923
|
-
children: c ?
|
|
933
|
+
children: c ? ee : He ? I : Ue ? L : ""
|
|
924
934
|
}),
|
|
925
|
-
/* @__PURE__ */
|
|
935
|
+
/* @__PURE__ */ k("div", {
|
|
926
936
|
className: "flex-1 overflow-hidden px-2 py-1",
|
|
927
|
-
children: c ? /* @__PURE__ */
|
|
937
|
+
children: c ? /* @__PURE__ */ k("div", {
|
|
928
938
|
className: "flex flex-col gap-3 px-2 py-3",
|
|
929
|
-
children: Array.from({ length: 15 }, (e, t) => /* @__PURE__ */
|
|
939
|
+
children: Array.from({ length: 15 }, (e, t) => /* @__PURE__ */ k(f, {
|
|
930
940
|
avatar: { size: 24 },
|
|
931
|
-
showTitle: { width:
|
|
941
|
+
showTitle: { width: ce(t) },
|
|
932
942
|
paragraph: !1,
|
|
933
943
|
active: !0,
|
|
934
944
|
color: Z.skeletonColor
|
|
935
945
|
}, t))
|
|
936
|
-
}) : He ? /* @__PURE__ */
|
|
937
|
-
listRef:
|
|
938
|
-
id:
|
|
946
|
+
}) : He ? /* @__PURE__ */ k(r, { label: I }) : Ue ? /* @__PURE__ */ k(i, { label: L }) : /* @__PURE__ */ k(se, {
|
|
947
|
+
listRef: oe,
|
|
948
|
+
id: ae,
|
|
939
949
|
role: "list",
|
|
940
950
|
style: { height: "100%" },
|
|
941
|
-
rowComponent:
|
|
951
|
+
rowComponent: Ce,
|
|
942
952
|
rowCount: $.length,
|
|
943
|
-
rowHeight:
|
|
944
|
-
overscanCount:
|
|
953
|
+
rowHeight: ue,
|
|
954
|
+
overscanCount: re,
|
|
945
955
|
onResize: De,
|
|
946
956
|
rowProps: Ve
|
|
947
957
|
})
|
|
@@ -950,4 +960,4 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
950
960
|
});
|
|
951
961
|
});
|
|
952
962
|
//#endregion
|
|
953
|
-
export {
|
|
963
|
+
export { De as ConversationPanel, X as FilterTab };
|
package/models/panel-props.d.ts
CHANGED
|
@@ -30,6 +30,10 @@ export interface ConversationItem {
|
|
|
30
30
|
isIconLoading?: boolean;
|
|
31
31
|
/** Conversation URL. When provided, middle-click opens it in a new tab. */
|
|
32
32
|
href?: string;
|
|
33
|
+
/** When `true`, a "TASK" pill badge is rendered at the end of the row. */
|
|
34
|
+
showTaskBadge?: boolean;
|
|
35
|
+
/** Text shown inside the task badge. When `showTaskBadge` is `true` and this is omitted, the badge renders with no text. */
|
|
36
|
+
taskBadgeLabel?: string;
|
|
33
37
|
}
|
|
34
38
|
/** Font overrides for the header title in `ConversationPanel`. */
|
|
35
39
|
export interface ConversationPanelTypography {
|
|
@@ -86,6 +90,8 @@ export interface ConversationPanelStyles {
|
|
|
86
90
|
typography?: ConversationPanelTypography;
|
|
87
91
|
/** CSS class applied to the icon badge in each conversation row. Defaults to `'rounded-full'`. */
|
|
88
92
|
itemIconBadgeClassName?: string;
|
|
93
|
+
/** CSS class applied to the task pill badge in each conversation row (background, border, text color, and typography). Defaults to `'border-tertiary bg-layer-base text-secondary dial-caption-semi-text uppercase tracking-[0.6px]'`. */
|
|
94
|
+
taskBadgeClassName?: string;
|
|
89
95
|
}
|
|
90
96
|
/** Localised labels and text content for `ConversationPanel`. */
|
|
91
97
|
export interface ConversationPanelLabels {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel-props.d.ts","sourceRoot":"","sources":["../../src/models/panel-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAEjE,kCAAkC;AAClC,MAAM,WAAW,YAAY;IAC3B,+BAA+B;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,8DAA8D;AAC9D,MAAM,WAAW,gBAAgB;IAC/B,qDAAqD;IACrD,EAAE,EAAE,MAAM,CAAC;IACX,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sDAAsD;IACtD,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,kFAAk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AAuD;IACvD,MAAM,EAAE,uBAAuB,CAAC;IAChC,kDAAkD;IAClD,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,uEAAuE;IACvE,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8FAA8F;IAC9F,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,YAAY,EAAE,CAAC;IACxD,wEAAwE;IACxE,gBAAgB,CAAC,EAAE,CACjB,IAAI,EAAE,gBAAgB,EACtB,OAAO,EAAE,iBAAiB,KACvB,IAAI,CAAC;IACV,6GAA6G;IAC7G,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACtD,gGAAgG;IAChG,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,iDAAiD;IACjD,oBAAoB,CAAC,EAAE,CAAC,GAAG,EAAE,SAAS,KAAK,IAAI,CAAC;CACjD;AAED,0EAA0E;AAC1E,MAAM,WAAW,gBAAgB;IAC/B,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAC;IAClB,2CAA2C;IAC3C,cAAc,EAAE,SAAS,CAAC;IAC1B,kEAAkE;IAClE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB"}
|
package/models/virtual-row.d.ts
CHANGED
|
@@ -31,6 +31,8 @@ export interface RowStyles {
|
|
|
31
31
|
itemTitleClassName?: string;
|
|
32
32
|
/** CSS class applied to the icon badge in each conversation row. */
|
|
33
33
|
itemIconBadgeClassName?: string;
|
|
34
|
+
/** CSS class applied to the task pill badge in each conversation row. */
|
|
35
|
+
taskBadgeClassName?: string;
|
|
34
36
|
}
|
|
35
37
|
/** Data passed to every virtual row renderer via `react-window`'s `rowProps`. */
|
|
36
38
|
export interface RowRendererData {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtual-row.d.ts","sourceRoot":"","sources":["../../src/models/virtual-row.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,0DAA0D;AAC1D,MAAM,WAAW,cAAc;IAC7B,wBAAwB;IACxB,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;IAC5B,qDAAqD;IACrD,QAAQ,EAAE,SAAS,CAAC;IACpB,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,0DAA0D;AAC1D,MAAM,WAAW,mBAAmB;IAClC,wBAAwB;IACxB,IAAI,EAAE,cAAc,CAAC,IAAI,CAAC;IAC1B,kCAAkC;IAClC,IAAI,EAAE,gBAAgB,CAAC;IACvB,0EAA0E;IAC1E,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,gDAAgD;AAChD,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,mBAAmB,CAAC;AAE9D,kEAAkE;AAClE,MAAM,WAAW,SAAS;IACxB,wDAAwD;IACxD,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,2DAA2D;IAC3D,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oEAAoE;IACpE,sBAAsB,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"virtual-row.d.ts","sourceRoot":"","sources":["../../src/models/virtual-row.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MA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/E,WAAW,EAAE,MAAM,CAAC;IACpB,uDAAuD;IACvD,oBAAoB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,uDAAuD;IACvD,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,YAAY,EAAE,CAAC;IACxD,2CAA2C;IAC3C,gBAAgB,CAAC,EAAE,CACjB,IAAI,EAAE,gBAAgB,EACtB,OAAO,EAAE,iBAAiB,KACvB,IAAI,CAAC;IACV,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kEAAkE;IAClE,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,0FAA0F;IAC1F,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,qFAAqF;IACrF,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,mGAAmG;IACnG,iBAAiB,EAAE,GAAG,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;IACzC,+DAA+D;IAC/D,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,kDAAkD;IAClD,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,gDAAgD;IAChD,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,gDAAgD;IAChD,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,4EAA4E;IAC5E,MAAM,EAAE,CACN,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,SAAS,EACzB,OAAO,EAAE,MAAM,GAAG,IAAI,KACnB,IAAI,CAAC;CACX"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-conversation-panel",
|
|
3
3
|
"description": "Virtualized sidebar panel for browsing conversation history with grouping, tabs, and search",
|
|
4
|
-
"version": "1.1.0-dev.
|
|
4
|
+
"version": "1.1.0-dev.99",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"react-window": "^2.2.7",
|
|
21
|
-
"@epam/ai-dial-kit": "1.1.0-dev.
|
|
21
|
+
"@epam/ai-dial-kit": "1.1.0-dev.99",
|
|
22
22
|
"@epam/ai-dial-ui-kit": "^0.13.0-dev.26"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": "^19.0.0",
|
|
26
26
|
"@tabler/icons-react": "^3.0.0",
|
|
27
|
-
"@epam/ai-dial-chat-shared": "1.1.0-dev.
|
|
28
|
-
"@epam/ai-dial-sidebar": "1.1.0-dev.
|
|
27
|
+
"@epam/ai-dial-chat-shared": "1.1.0-dev.99",
|
|
28
|
+
"@epam/ai-dial-sidebar": "1.1.0-dev.99"
|
|
29
29
|
},
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|