@epam/ai-dial-source-panel 1.0.0-dev.464 → 1.0.0-dev.469
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.
|
@@ -10,9 +10,9 @@ interface SourcesSectionProps {
|
|
|
10
10
|
searchQuery?: string;
|
|
11
11
|
/** CSS class applied to the section heading. Defaults to `'dial-body-semi-text'`. */
|
|
12
12
|
titleClassName?: string;
|
|
13
|
-
/** CSS class applied to each source link. Defaults to `'dial-small-text
|
|
13
|
+
/** CSS class applied to each source link. Defaults to `'dial-small-text'`. */
|
|
14
14
|
linkClassName?: string;
|
|
15
|
-
/** CSS class applied to the quote text. Defaults to `'dial-tiny-text
|
|
15
|
+
/** CSS class applied to the quote text. Defaults to `'dial-tiny-text'`. */
|
|
16
16
|
quoteClassName?: string;
|
|
17
17
|
/** When provided, called on source link click instead of following the href. */
|
|
18
18
|
onSourceClick?: (source: QuotationSource) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SourcesSection.d.ts","sourceRoot":"","sources":["../../../src/components/SourcesSection/SourcesSection.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"SourcesSection.d.ts","sourceRoot":"","sources":["../../../src/components/SourcesSection/SourcesSection.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGrE,UAAU,mBAAmB;IAC3B,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qFAAqF;IACrF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,8EAA8E;IAC9E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2EAA2E;IAC3E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gFAAgF;IAChF,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CACnD;;AA4ED,wBAAoC"}
|
package/index.css
ADDED
package/index.js
CHANGED
|
@@ -25,7 +25,10 @@ var x = u(({ attachments: e, title: t, searchQuery: n, titleClassName: r = "dial
|
|
|
25
25
|
})
|
|
26
26
|
}, e.id))
|
|
27
27
|
})]
|
|
28
|
-
})), S =
|
|
28
|
+
})), S = {
|
|
29
|
+
link: "_link_wc3rf_1",
|
|
30
|
+
quote: "_quote_wc3rf_5"
|
|
31
|
+
}, C = u(({ title: e, sources: t, copyLabel: n, searchQuery: r = "", titleClassName: i = "dial-body-semi-text", linkClassName: l = "dial-small-text", quoteClassName: u = "dial-tiny-text", onSourceClick: d }) => t.length === 0 ? null : /* @__PURE__ */ b("section", {
|
|
29
32
|
className: "mb-6",
|
|
30
33
|
children: [/* @__PURE__ */ y("h2", {
|
|
31
34
|
className: g(i, "mb-3"),
|
|
@@ -40,7 +43,7 @@ var x = u(({ attachments: e, title: t, searchQuery: n, titleClassName: r = "dial
|
|
|
40
43
|
href: e.url,
|
|
41
44
|
target: "_blank",
|
|
42
45
|
rel: "noopener noreferrer",
|
|
43
|
-
className: g(l, "min-w-0 flex-1 truncate"),
|
|
46
|
+
className: g(l, S.link, "min-w-0 flex-1 truncate"),
|
|
44
47
|
onClick: d ? (t) => {
|
|
45
48
|
t.preventDefault(), d(e);
|
|
46
49
|
} : void 0,
|
|
@@ -59,17 +62,17 @@ var x = u(({ attachments: e, title: t, searchQuery: n, titleClassName: r = "dial
|
|
|
59
62
|
onClick: () => navigator.clipboard.writeText(e.url)
|
|
60
63
|
})]
|
|
61
64
|
}), e.quote && /* @__PURE__ */ y("p", {
|
|
62
|
-
className: g(u, "line-clamp-5 max-h-[80px] overflow-hidden"),
|
|
65
|
+
className: g(u, S.quote, "line-clamp-5 max-h-[80px] overflow-hidden"),
|
|
63
66
|
children: e.quote
|
|
64
67
|
})]
|
|
65
68
|
}, e.url))
|
|
66
69
|
})]
|
|
67
|
-
})),
|
|
70
|
+
})), w = (e, t) => e.toLowerCase().includes(t.toLowerCase()), T = u(({ isOpen: s, onClose: c, uploaded: u, generated: m, sources: h, onAttachmentClick: g, onSourceClick: _, isMobile: S, defaultWidth: T, minWidth: E, maxWidth: D, onResizeStop: O, labels: k, styles: A }) => {
|
|
68
71
|
let [j, M] = p("");
|
|
69
72
|
d(() => {
|
|
70
73
|
s || M("");
|
|
71
74
|
}, [s]);
|
|
72
|
-
let N = f(() => j ? u.filter((e) =>
|
|
75
|
+
let N = f(() => j ? u.filter((e) => w(e.name, j)) : u, [u, j]), P = f(() => j ? m.filter((e) => w(e.name, j)) : m, [m, j]), F = f(() => j ? h.filter((e) => w(e.title, j) || w(e.url, j) || e.quote != null && w(e.quote, j)) : h, [h, j]), I = u.length === 0 && m.length === 0 && h.length === 0, L = j !== "" && N.length === 0 && P.length === 0 && F.length === 0;
|
|
73
76
|
return /* @__PURE__ */ b(i, {
|
|
74
77
|
isOpen: s,
|
|
75
78
|
orientation: r.Right,
|
|
@@ -78,7 +81,7 @@ var x = u(({ attachments: e, title: t, searchQuery: n, titleClassName: r = "dial
|
|
|
78
81
|
ariaLabel: k.ariaLabel,
|
|
79
82
|
closeLabel: k.closeLabel,
|
|
80
83
|
onClose: c,
|
|
81
|
-
resizable: !
|
|
84
|
+
resizable: !S,
|
|
82
85
|
defaultWidth: T,
|
|
83
86
|
minWidth: E,
|
|
84
87
|
maxWidth: D,
|
|
@@ -115,7 +118,7 @@ var x = u(({ attachments: e, title: t, searchQuery: n, titleClassName: r = "dial
|
|
|
115
118
|
onAttachmentClick: g,
|
|
116
119
|
attachmentClickLabel: k.attachmentClickLabel
|
|
117
120
|
}),
|
|
118
|
-
/* @__PURE__ */ y(
|
|
121
|
+
/* @__PURE__ */ y(C, {
|
|
119
122
|
sources: F,
|
|
120
123
|
title: k.sourcesSectionTitle,
|
|
121
124
|
searchQuery: j,
|
|
@@ -130,4 +133,4 @@ var x = u(({ attachments: e, title: t, searchQuery: n, titleClassName: r = "dial
|
|
|
130
133
|
});
|
|
131
134
|
});
|
|
132
135
|
//#endregion
|
|
133
|
-
export {
|
|
136
|
+
export { T as ConversationSourcesPanel };
|
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.0.0-dev.
|
|
4
|
+
"version": "1.0.0-dev.469",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"react": "^19.0.0",
|
|
21
21
|
"@tabler/icons-react": "^3.0.0",
|
|
22
|
-
"@epam/ai-dial-chat-shared": "1.0.0-dev.
|
|
23
|
-
"@epam/ai-dial-ui-kit": "0.12.0-dev.
|
|
24
|
-
"@epam/ai-dial-sidebar": "1.0.0-dev.
|
|
25
|
-
"@epam/ai-dial-conversation-input": "1.0.0-dev.
|
|
22
|
+
"@epam/ai-dial-chat-shared": "1.0.0-dev.469",
|
|
23
|
+
"@epam/ai-dial-ui-kit": "0.12.0-dev.28",
|
|
24
|
+
"@epam/ai-dial-sidebar": "1.0.0-dev.469",
|
|
25
|
+
"@epam/ai-dial-conversation-input": "1.0.0-dev.469"
|
|
26
26
|
},
|
|
27
27
|
"repository": {
|
|
28
28
|
"type": "git",
|