@epam/ai-dial-conversation-panel 1.2.7 → 1.2.9
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/index.js +61 -59
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -12,9 +12,7 @@ var se = {
|
|
|
12
12
|
function ce(e) {
|
|
13
13
|
if (e !== void 0) switch (typeof e) {
|
|
14
14
|
case "number": return e;
|
|
15
|
-
case "string":
|
|
16
|
-
if (e.endsWith("px")) return parseFloat(e);
|
|
17
|
-
break;
|
|
15
|
+
case "string": if (e.endsWith("px")) return parseFloat(e);
|
|
18
16
|
}
|
|
19
17
|
}
|
|
20
18
|
function B({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
|
|
@@ -75,12 +73,10 @@ function H(e = !1) {
|
|
|
75
73
|
function U({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
|
|
76
74
|
if (t === "horizontal" && n) switch (H()) {
|
|
77
75
|
case "negative": return -r;
|
|
78
|
-
case "positive-descending":
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
break;
|
|
76
|
+
case "positive-descending": if (e) {
|
|
77
|
+
let { clientWidth: t, scrollLeft: n, scrollWidth: r } = e;
|
|
78
|
+
return r - t - n;
|
|
79
|
+
}
|
|
84
80
|
}
|
|
85
81
|
return r;
|
|
86
82
|
}
|
|
@@ -144,9 +140,7 @@ function de({ itemCount: e, itemProps: t, itemSize: n }) {
|
|
|
144
140
|
case "function":
|
|
145
141
|
a = n(e, t);
|
|
146
142
|
break;
|
|
147
|
-
case "number":
|
|
148
|
-
a = n;
|
|
149
|
-
break;
|
|
143
|
+
case "number": a = n;
|
|
150
144
|
}
|
|
151
145
|
if (e === 0) r.set(e, {
|
|
152
146
|
size: a,
|
|
@@ -188,9 +182,7 @@ function Y({ containerSize: e, itemSize: t }) {
|
|
|
188
182
|
case "string":
|
|
189
183
|
W(t.endsWith("%"), `Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`), W(e !== void 0, "Container size must be defined if a percentage item size is specified"), n = e * parseInt(t) / 100;
|
|
190
184
|
break;
|
|
191
|
-
default:
|
|
192
|
-
n = t;
|
|
193
|
-
break;
|
|
185
|
+
default: n = t;
|
|
194
186
|
}
|
|
195
187
|
return n;
|
|
196
188
|
}
|
|
@@ -244,18 +236,21 @@ function fe({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
244
236
|
h,
|
|
245
237
|
a,
|
|
246
238
|
m
|
|
247
|
-
]), w = A((t) =>
|
|
248
|
-
|
|
249
|
-
containerScrollOffset: U({
|
|
239
|
+
]), w = A((t) => {
|
|
240
|
+
let n = U({
|
|
250
241
|
containerElement: e,
|
|
251
242
|
direction: r,
|
|
252
243
|
isRtl: i,
|
|
253
244
|
scrollOffset: t
|
|
254
|
-
})
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
245
|
+
});
|
|
246
|
+
return q({
|
|
247
|
+
cachedBounds: h,
|
|
248
|
+
containerScrollOffset: n,
|
|
249
|
+
containerSize: p,
|
|
250
|
+
itemCount: a,
|
|
251
|
+
overscanCount: l
|
|
252
|
+
});
|
|
253
|
+
}, [
|
|
259
254
|
h,
|
|
260
255
|
e,
|
|
261
256
|
p,
|
|
@@ -265,7 +260,8 @@ function fe({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
265
260
|
l
|
|
266
261
|
]);
|
|
267
262
|
return z(() => {
|
|
268
|
-
|
|
263
|
+
let t = (r === "vertical" ? e?.scrollTop : e?.scrollLeft) ?? 0;
|
|
264
|
+
v(w(t));
|
|
269
265
|
}, [
|
|
270
266
|
e,
|
|
271
267
|
r,
|
|
@@ -274,19 +270,19 @@ function fe({ containerElement: e, containerStyle: t, defaultContainerSize: n =
|
|
|
274
270
|
if (!e) return;
|
|
275
271
|
let t = () => {
|
|
276
272
|
v((t) => {
|
|
277
|
-
let { scrollLeft: n, scrollTop: o } = e, s =
|
|
273
|
+
let { scrollLeft: n, scrollTop: o } = e, s = U({
|
|
274
|
+
containerElement: e,
|
|
275
|
+
direction: r,
|
|
276
|
+
isRtl: i,
|
|
277
|
+
scrollOffset: r === "vertical" ? o : n
|
|
278
|
+
}), c = q({
|
|
278
279
|
cachedBounds: h,
|
|
279
|
-
containerScrollOffset:
|
|
280
|
-
containerElement: e,
|
|
281
|
-
direction: r,
|
|
282
|
-
isRtl: i,
|
|
283
|
-
scrollOffset: r === "vertical" ? o : n
|
|
284
|
-
}),
|
|
280
|
+
containerScrollOffset: s,
|
|
285
281
|
containerSize: p,
|
|
286
282
|
itemCount: a,
|
|
287
283
|
overscanCount: l
|
|
288
284
|
});
|
|
289
|
-
return G(
|
|
285
|
+
return G(c, t) ? t : c;
|
|
290
286
|
});
|
|
291
287
|
};
|
|
292
288
|
return e.addEventListener("scroll", t), () => {
|
|
@@ -500,37 +496,43 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
500
496
|
value: t.Organization,
|
|
501
497
|
labelKey: "organization"
|
|
502
498
|
}
|
|
503
|
-
], Oe = k(({ activeTab: e, labels: t, onChange: n, tabClassName: r = "dial-tiny-semi-text", hiddenSources: i }) =>
|
|
504
|
-
|
|
499
|
+
], Oe = k(({ activeTab: e, labels: t, onChange: n, tabClassName: r = "dial-tiny-semi-text", hiddenSources: i }) => {
|
|
500
|
+
let a = N(() => De.filter(({ value: e }) => !i?.includes(e)).map(({ value: e, labelKey: n }) => ({
|
|
505
501
|
value: e,
|
|
506
502
|
label: t[n]
|
|
507
|
-
})), [t, i])
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
503
|
+
})), [t, i]);
|
|
504
|
+
return /* @__PURE__ */ I(v, {
|
|
505
|
+
items: a,
|
|
506
|
+
value: e,
|
|
507
|
+
onChange: n,
|
|
508
|
+
stretch: !0,
|
|
509
|
+
"aria-label": t.groupAriaLabel ?? "Filter chats",
|
|
510
|
+
className: "px-3 py-2",
|
|
511
|
+
chipClassName: D("!px-2", r)
|
|
512
|
+
});
|
|
513
|
+
}), ke = { button: "_button_vjird_1" }, Ae = k(({ label: e, onClick: t, labelClassName: r = "dial-small-semi-text", colors: a, className: o }) => {
|
|
514
|
+
let s = n({
|
|
517
515
|
"--cp-new-chat-bg": a?.background,
|
|
518
516
|
"--cp-new-chat-text": a?.text,
|
|
519
517
|
"--cp-new-chat-focus-outline": a?.focusOutline
|
|
520
|
-
})
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
518
|
+
});
|
|
519
|
+
return /* @__PURE__ */ I("div", {
|
|
520
|
+
className: "px-3 py-2",
|
|
521
|
+
style: s,
|
|
522
|
+
children: /* @__PURE__ */ I(d, {
|
|
523
|
+
label: e,
|
|
524
|
+
textClassName: r,
|
|
525
|
+
iconBefore: /* @__PURE__ */ I(ae, {
|
|
526
|
+
size: 18,
|
|
527
|
+
stroke: m,
|
|
528
|
+
className: "shrink-0",
|
|
529
|
+
"aria-hidden": !0
|
|
530
|
+
}),
|
|
531
|
+
onClick: t,
|
|
532
|
+
className: i("h-[36px] w-full gap-2 px-3 py-1 shadow-chat-button hover:shadow-xs focus-visible:shadow-xs active:shadow-xs", ke.button, o, se.newChatButton)
|
|
533
|
+
})
|
|
534
|
+
});
|
|
535
|
+
}), Z = {
|
|
534
536
|
skeletonColor: "var(--cp-skeleton-color, var(--bg-control-disable-primary, #dce0e8))",
|
|
535
537
|
item: "_item_j0zft_2",
|
|
536
538
|
itemActive: "_itemActive_j0zft_15",
|
|
@@ -709,7 +711,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
709
711
|
onDrop: S
|
|
710
712
|
})
|
|
711
713
|
});
|
|
712
|
-
}, Pe = (e, n) => n === t.All
|
|
714
|
+
}, Pe = (e, n) => n === t.All || e.source === n, Fe = (e, t) => !t || e.title.toLowerCase().includes(t.toLowerCase()), Ie = /* @__PURE__ */ new Set([
|
|
713
715
|
t.Pinned,
|
|
714
716
|
t.MyChats,
|
|
715
717
|
t.Shared,
|
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.2.
|
|
4
|
+
"version": "1.2.9",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"react-window": "^2.2.7",
|
|
21
21
|
"@tabler/icons-react": "^3.44.0",
|
|
22
|
-
"@epam/ai-dial-sidebar": "1.2.
|
|
22
|
+
"@epam/ai-dial-sidebar": "1.2.9"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": "^19.2.8",
|
|
26
|
-
"@epam/ai-dial-chat-shared": "1.2.
|
|
26
|
+
"@epam/ai-dial-chat-shared": "1.2.9",
|
|
27
27
|
"@epam/ai-dial-ui-kit": "^0.15.4"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|