@epam/ai-dial-source-panel 1.1.0-dev.91 → 1.1.0-dev.94
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationSourcesPanel.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationSourcesPanel/ConversationSourcesPanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ConversationSourcesPanel.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationSourcesPanel/ConversationSourcesPanel.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,+CAA+C,CAAC;AAGnG,YAAY,EACV,8BAA8B,EAC9B,8BAA8B,EAC9B,6BAA6B,EAC7B,8BAA8B,EAC9B,kCAAkC,GACnC,MAAM,+CAA+C,CAAC;;AAqJvD,wBAA8C"}
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AttachmentType as e, BASE_LG_ICON_PROPS as t, MarkdownRenderer as n, buildCssVars as r, mergeClasses as i } from "@epam/ai-dial-chat-shared";
|
|
2
|
-
import {
|
|
3
|
-
import { DIAL_ICON_SIZE as u, ElementSize as d, GhostIconButton as f, Highlight as p } from "@epam/ai-dial-ui-kit";
|
|
2
|
+
import { PanelNoResults as a, SearchInput as o, SidebarOrientation as s, SidebarPanel as c } from "@epam/ai-dial-sidebar";
|
|
3
|
+
import { DIAL_ICON_SIZE as l, DialNoDataContent as u, ElementSize as d, GhostIconButton as f, Highlight as p } from "@epam/ai-dial-ui-kit";
|
|
4
4
|
import { IconCopy as m, IconDownload as h } from "@tabler/icons-react";
|
|
5
5
|
import { memo as g, useLayoutEffect as _, useMemo as v, useState as y } from "react";
|
|
6
6
|
import { AttachmentCard as b } from "@epam/ai-dial-conversation-input";
|
|
@@ -27,11 +27,11 @@ var w = g(({ attachments: t, title: n, searchQuery: r, titleClassName: a = "dial
|
|
|
27
27
|
})), T = {
|
|
28
28
|
link: "_link_12lox_1",
|
|
29
29
|
quote: "_quote_12lox_5"
|
|
30
|
-
}, E = g(({ title: e, sources: t, copyLabel: a, copiedLabel: o = "Link copied to clipboard", searchQuery: s = "", typography: c, colors:
|
|
30
|
+
}, E = g(({ title: e, sources: t, copyLabel: a, copiedLabel: o = "Link copied to clipboard", searchQuery: s = "", typography: c, colors: u, onSourceClick: h }) => {
|
|
31
31
|
let [g, _] = y(""), b = c?.sectionTitleClassName ?? "dial-body-semi-text", x = c?.sourceLinkClassName ?? "dial-small-text", w = c?.sourceQuoteClassName ?? "dial-tiny-text", E = v(() => r({
|
|
32
|
-
"--sp-source-link":
|
|
33
|
-
"--sp-source-quote":
|
|
34
|
-
}), [
|
|
32
|
+
"--sp-source-link": u?.sourceLink,
|
|
33
|
+
"--sp-source-quote": u?.sourceQuote
|
|
34
|
+
}), [u]);
|
|
35
35
|
if (t.length === 0) return null;
|
|
36
36
|
let D = async (e) => {
|
|
37
37
|
await navigator.clipboard.writeText(e), _(o);
|
|
@@ -66,7 +66,7 @@ var w = g(({ attachments: t, title: n, searchQuery: r, titleClassName: a = "dial
|
|
|
66
66
|
}), /* @__PURE__ */ S(f, {
|
|
67
67
|
size: d.Small,
|
|
68
68
|
icon: /* @__PURE__ */ S(m, {
|
|
69
|
-
size:
|
|
69
|
+
size: l.SM,
|
|
70
70
|
stroke: 1.5,
|
|
71
71
|
"aria-hidden": !0
|
|
72
72
|
}),
|
|
@@ -87,15 +87,15 @@ var w = g(({ attachments: t, title: n, searchQuery: r, titleClassName: a = "dial
|
|
|
87
87
|
})
|
|
88
88
|
]
|
|
89
89
|
});
|
|
90
|
-
}), D = (e, t) => e.toLowerCase().includes(t.toLowerCase()), O = g(({ isOpen: e, onClose: n, uploaded: r, generated: i, sources:
|
|
90
|
+
}), D = (e, t) => e.toLowerCase().includes(t.toLowerCase()), O = g(({ isOpen: e, onClose: n, uploaded: r, generated: i, sources: l, onAttachmentClick: d, onSourceClick: p, onDownloadAll: m, isMobile: g, defaultWidth: b, minWidth: T, maxWidth: O, onResizeStop: k, labels: A, styles: j }) => {
|
|
91
91
|
let [M, N] = y("");
|
|
92
92
|
_(() => {
|
|
93
93
|
e || N("");
|
|
94
94
|
}, [e]);
|
|
95
|
-
let P = v(() => M ? r.filter((e) => D(e.name, M)) : r, [r, M]), F = v(() => M ? i.filter((e) => D(e.name, M)) : i, [i, M]), I = v(() => M ?
|
|
96
|
-
return /* @__PURE__ */ C(
|
|
95
|
+
let P = v(() => M ? r.filter((e) => D(e.name, M)) : r, [r, M]), F = v(() => M ? i.filter((e) => D(e.name, M)) : i, [i, M]), I = v(() => M ? l.filter((e) => D(e.title, M) || D(e.url, M) || e.quote != null && D(e.quote, M)) : l, [l, M]), L = r.length === 0 && i.length === 0 && l.length === 0, R = M !== "" && P.length === 0 && F.length === 0 && I.length === 0;
|
|
96
|
+
return /* @__PURE__ */ C(c, {
|
|
97
97
|
isOpen: e,
|
|
98
|
-
orientation:
|
|
98
|
+
orientation: s.Right,
|
|
99
99
|
styles: {
|
|
100
100
|
className: g && e ? "w-full" : void 0,
|
|
101
101
|
bodyClassName: "flex flex-col overflow-hidden p-0"
|
|
@@ -115,7 +115,7 @@ var w = g(({ attachments: t, title: n, searchQuery: r, titleClassName: a = "dial
|
|
|
115
115
|
disabled: !m
|
|
116
116
|
}),
|
|
117
117
|
children: [
|
|
118
|
-
!L && /* @__PURE__ */ S(
|
|
118
|
+
!L && /* @__PURE__ */ S(o, {
|
|
119
119
|
value: M,
|
|
120
120
|
onChange: N,
|
|
121
121
|
labels: {
|
|
@@ -131,7 +131,10 @@ var w = g(({ attachments: t, title: n, searchQuery: r, titleClassName: a = "dial
|
|
|
131
131
|
}),
|
|
132
132
|
/* @__PURE__ */ S("div", {
|
|
133
133
|
className: "flex-1 overflow-y-auto p-4",
|
|
134
|
-
children: L ? /* @__PURE__ */ S(
|
|
134
|
+
children: L ? /* @__PURE__ */ S("div", {
|
|
135
|
+
className: "flex h-full items-center justify-center",
|
|
136
|
+
children: /* @__PURE__ */ S(u, { title: A.noDataLabel })
|
|
137
|
+
}) : R ? /* @__PURE__ */ S(a, { label: A.noResultsLabel }) : /* @__PURE__ */ C(x, { children: [
|
|
135
138
|
/* @__PURE__ */ S(w, {
|
|
136
139
|
attachments: P,
|
|
137
140
|
title: A.uploadedSectionTitle,
|
|
@@ -10,8 +10,8 @@ export interface ConversationSourcesPanelLabels {
|
|
|
10
10
|
searchPlaceholder: string;
|
|
11
11
|
/** Accessible label for the search input clear button. */
|
|
12
12
|
searchClearLabel: string;
|
|
13
|
-
/** Text shown when the panel has no files or sources. */
|
|
14
|
-
|
|
13
|
+
/** Text shown in the centred empty state when the panel has no files or sources. */
|
|
14
|
+
noDataLabel: string;
|
|
15
15
|
/** Text shown when a search query matches nothing. */
|
|
16
16
|
noResultsLabel: string;
|
|
17
17
|
/** Accessible label for the download-all icon button. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-sources-panel-props.d.ts","sourceRoot":"","sources":["../../src/models/conversation-sources-panel-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,oFAAoF;AACpF,MAAM,WAAW,8BAA8B;IAC7C,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,kCAAkC;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0DAA0D;IAC1D,gBAAgB,EAAE,MAAM,CAAC;IACzB,
|
|
1
|
+
{"version":3,"file":"conversation-sources-panel-props.d.ts","sourceRoot":"","sources":["../../src/models/conversation-sources-panel-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE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E,OAAO,CAAC;IAChB,wDAAwD;IACxD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,6DAA6D;IAC7D,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,mEAAmE;IACnE,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B,gDAAgD;IAChD,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,yDAAyD;IACzD,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5D,4FAA4F;IAC5F,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAClD,0FAA0F;IAC1F,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,wEAAwE;IACxE,QAAQ,EAAE,OAAO,CAAC;IAClB,qCAAqC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uEAAuE;IACvE,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,gEAAgE;IAChE,MAAM,EAAE,8BAA8B,CAAC;IACvC,wEAAwE;IACxE,MAAM,CAAC,EAAE,8BAA8B,CAAC;CACzC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-source-panel",
|
|
3
3
|
"description": "Panel for displaying conversation sources — uploaded files and generated citations",
|
|
4
|
-
"version": "1.1.0-dev.
|
|
4
|
+
"version": "1.1.0-dev.94",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"react": "^19.0.0",
|
|
21
21
|
"@tabler/icons-react": "^3.0.0",
|
|
22
|
-
"@epam/ai-dial-chat-shared": "1.1.0-dev.
|
|
23
|
-
"@epam/ai-dial-sidebar": "1.1.0-dev.
|
|
24
|
-
"@epam/ai-dial-conversation-input": "1.1.0-dev.
|
|
22
|
+
"@epam/ai-dial-chat-shared": "1.1.0-dev.94",
|
|
23
|
+
"@epam/ai-dial-sidebar": "1.1.0-dev.94",
|
|
24
|
+
"@epam/ai-dial-conversation-input": "1.1.0-dev.94",
|
|
25
25
|
"@epam/ai-dial-ui-kit": "^0.13.0-dev.26"
|
|
26
26
|
},
|
|
27
27
|
"repository": {
|