@epam/ai-dial-source-panel 1.2.0-dev.3 → 1.2.0-dev.303
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/ConversationSourcesPanel/ConversationSourcesPanel.d.ts.map +1 -1
- package/components/SourcesSection/SourcesSection.d.ts +10 -0
- package/components/SourcesSection/SourcesSection.d.ts.map +1 -1
- package/constants/public-class-names.d.ts +11 -0
- package/constants/public-class-names.d.ts.map +1 -0
- package/index.css +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +109 -97
- package/models/conversation-sources-panel-props.d.ts +11 -1
- package/models/conversation-sources-panel-props.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -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":"AAsBA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,+CAA+C,CAAC;;AAyLnG,wBAA8C"}
|
|
@@ -11,6 +11,16 @@ interface SourcesSectionProps {
|
|
|
11
11
|
copyLabel: string;
|
|
12
12
|
/** Status message announced to assistive tech after a source URL is copied. Defaults to `'Link copied to clipboard'`. */
|
|
13
13
|
copiedLabel?: string;
|
|
14
|
+
/** Accessible label for the copy button on a code block inside a source quote. Forwarded to `MarkdownRenderer`. */
|
|
15
|
+
codeBlockCopyLabel?: string;
|
|
16
|
+
/** Status announced after a code block inside a source quote has been copied. Forwarded to `MarkdownRenderer`. */
|
|
17
|
+
codeBlockCopiedLabel?: string;
|
|
18
|
+
/** Accessible label for the download button on a code block inside a source quote. Forwarded to `MarkdownRenderer`. */
|
|
19
|
+
codeBlockDownloadLabel?: string;
|
|
20
|
+
/** Accessible label for a table's scrollable region inside a source quote. Forwarded to `MarkdownRenderer`. */
|
|
21
|
+
tableScrollRegionAriaLabel?: string;
|
|
22
|
+
/** Accessible label for a block formula's scrollable region inside a source quote. Forwarded to `MarkdownRenderer`. */
|
|
23
|
+
mathScrollRegionAriaLabel?: string;
|
|
14
24
|
/** Current search query — used to highlight matches in source titles and quotes. */
|
|
15
25
|
searchQuery?: string;
|
|
16
26
|
/** Typography (font utility class) overrides for section headings and source text. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SourcesSection.d.ts","sourceRoot":"","sources":["../../../src/components/SourcesSection/SourcesSection.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,KAAK,EACV,8BAA8B,EAC9B,kCAAkC,EACnC,MAAM,+CAA+C,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGrE,gDAAgD;AAChD,UAAU,mBAAmB;IAC3B,4CAA4C;IAC5C,KAAK,EAAE,SAAS,CAAC;IACjB,kCAAkC;IAClC,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,yHAAyH;IACzH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sFAAsF;IACtF,UAAU,CAAC,EAAE,kCAAkC,CAAC;IAChD,wDAAwD;IACxD,MAAM,CAAC,EAAE,8BAA8B,CAAC;IACxC,gFAAgF;IAChF,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CACnD;;
|
|
1
|
+
{"version":3,"file":"SourcesSection.d.ts","sourceRoot":"","sources":["../../../src/components/SourcesSection/SourcesSection.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,KAAK,EACV,8BAA8B,EAC9B,kCAAkC,EACnC,MAAM,+CAA+C,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGrE,gDAAgD;AAChD,UAAU,mBAAmB;IAC3B,4CAA4C;IAC5C,KAAK,EAAE,SAAS,CAAC;IACjB,kCAAkC;IAClC,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,yHAAyH;IACzH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mHAAmH;IACnH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kHAAkH;IAClH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,uHAAuH;IACvH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,+GAA+G;IAC/G,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,uHAAuH;IACvH,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sFAAsF;IACtF,UAAU,CAAC,EAAE,kCAAkC,CAAC;IAChD,wDAAwD;IACxD,MAAM,CAAC,EAAE,8BAA8B,CAAC;IACxC,gFAAgF;IAChF,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CACnD;;AA0HD,wBAAoC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const SOURCE_PANEL_CLASS: {
|
|
2
|
+
/**
|
|
3
|
+
* The panel wrapper — the element `@epam/ai-dial-sidebar` gives the panel's
|
|
4
|
+
* width and slide transition, which is the outer box a host sizes or
|
|
5
|
+
* positions. It is **not** the `aside` inside it: that one carries
|
|
6
|
+
* `dial-sb-aside`, so a host targeting the region itself descends from this
|
|
7
|
+
* class.
|
|
8
|
+
*/
|
|
9
|
+
readonly panel: "dial-source-panel-panel";
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=public-class-names.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-class-names.d.ts","sourceRoot":"","sources":["../../src/constants/public-class-names.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,kBAAkB;IAC7B;;;;;;OAMG;;CAEK,CAAC"}
|
package/index.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
._link_12icw_1{color:var(--sp-source-link,var(--text-info,#1d4ed8))}._quote_12icw_5{color:var(--sp-source-quote,var(--text-primary,#161b2d))}
|
|
2
|
-
/*$vite$:1
|
|
2
|
+
/*$vite$:1*/.sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.visible{visibility:visible}.mb-3{margin-bottom:.75rem}.mb-6{margin-bottom:1.5rem}.line-clamp-5{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:5}.block{display:block}.flex{display:flex}.table{display:table}.grid{display:grid}.h-full{height:100%}.w-full{width:100%}.min-w-0{min-width:0}.flex-1{flex:1 1 0%}.resize{resize:both}.grid-cols-\[repeat\(auto-fill\2c minmax\(84px\2c 1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(84px,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-0{padding:0}.p-4{padding:1rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.pt-0{padding-top:0}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.\[\&\>div\>\*\+\*\]\:mt-1>div>*+*{margin-top:.25rem}
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { default as ConversationSourcesPanel } from './components/ConversationSourcesPanel/ConversationSourcesPanel';
|
|
2
2
|
export type { ConversationSourcesPanelColors, ConversationSourcesPanelLabels, ConversationSourcesPanelProps, ConversationSourcesPanelStyles, ConversationSourcesPanelTypography, } from './models/conversation-sources-panel-props';
|
|
3
3
|
export type { QuotationSource } from './models/quotation-source';
|
|
4
|
+
export { SOURCE_PANEL_CLASS } from './constants/public-class-names';
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,gEAAgE,CAAC;AACrH,YAAY,EACV,8BAA8B,EAC9B,8BAA8B,EAC9B,6BAA6B,EAC7B,8BAA8B,EAC9B,kCAAkC,GACnC,MAAM,2CAA2C,CAAC;AACnD,YAAY,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,gEAAgE,CAAC;AACrH,YAAY,EACV,8BAA8B,EAC9B,8BAA8B,EAC9B,6BAA6B,EAC7B,8BAA8B,EAC9B,kCAAkC,GACnC,MAAM,2CAA2C,CAAC;AACnD,YAAY,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { BASE_LG_ICON_PROPS as e, MarkdownRenderer as t, buildCssVars as n, mergeClasses as r } from "@epam/ai-dial-chat-shared";
|
|
2
2
|
import { PanelNoResults as i, SidebarOrientation as a, SidebarPanel as o } from "@epam/ai-dial-sidebar";
|
|
3
|
-
import { DIAL_ICON_SIZE as s, DIAL_KIT_ICON_STROKE as c, ElementSize as l, GhostIconButton as u, Highlight as d, LinkButton as f, NoDataContent as p, Search as m } from "@epam/ai-dial-ui-kit";
|
|
4
|
-
import { IconCopy as
|
|
5
|
-
import { memo as
|
|
6
|
-
import { AttachmentCard as
|
|
7
|
-
import { Fragment as
|
|
8
|
-
|
|
3
|
+
import { DIAL_ICON_SIZE as s, DIAL_KIT_ICON_STROKE as c, ElementSize as l, GhostIconButton as u, Highlight as d, LinkButton as f, NoDataContent as p, Search as m, mergeClasses as h } from "@epam/ai-dial-ui-kit";
|
|
4
|
+
import { IconCopy as g, IconDownload as _ } from "@tabler/icons-react";
|
|
5
|
+
import { memo as v, useLayoutEffect as y, useMemo as b, useState as x } from "react";
|
|
6
|
+
import { AttachmentCard as S } from "@epam/ai-dial-attachment-input";
|
|
7
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
8
|
+
//#region src/constants/public-class-names.ts
|
|
9
|
+
var E = { panel: "dial-source-panel-panel" }, D = v(({ attachments: e, title: t, searchQuery: n, titleClassName: i = "dial-body-semi-text", onAttachmentClick: a, attachmentClickLabel: o }) => e.length === 0 ? null : /* @__PURE__ */ T("section", {
|
|
9
10
|
className: "mb-6",
|
|
10
|
-
children: [/* @__PURE__ */
|
|
11
|
+
children: [/* @__PURE__ */ w("h2", {
|
|
11
12
|
className: r(i, "mb-3"),
|
|
12
13
|
children: t
|
|
13
|
-
}), /* @__PURE__ */
|
|
14
|
+
}), /* @__PURE__ */ w("div", {
|
|
14
15
|
role: "list",
|
|
15
16
|
className: "grid grid-cols-[repeat(auto-fill,minmax(84px,1fr))] gap-3",
|
|
16
|
-
children: e.map((e, t) => /* @__PURE__ */
|
|
17
|
+
children: e.map((e, t) => /* @__PURE__ */ w("div", {
|
|
17
18
|
role: "listitem",
|
|
18
|
-
children: /* @__PURE__ */
|
|
19
|
+
children: /* @__PURE__ */ w(S, {
|
|
19
20
|
attachment: e,
|
|
20
21
|
searchQuery: n,
|
|
21
22
|
onClick: a ? () => a(e) : void 0,
|
|
@@ -23,155 +24,166 @@ var T = _(({ attachments: e, title: t, searchQuery: n, titleClassName: i = "dial
|
|
|
23
24
|
})
|
|
24
25
|
}, `${e.id}-${t}`))
|
|
25
26
|
})]
|
|
26
|
-
})),
|
|
27
|
+
})), O = {
|
|
27
28
|
link: "_link_12icw_1",
|
|
28
29
|
quote: "_quote_12icw_5"
|
|
29
|
-
},
|
|
30
|
-
let [
|
|
31
|
-
"--sp-source-link":
|
|
32
|
-
"--sp-source-quote":
|
|
33
|
-
}), [
|
|
30
|
+
}, k = v(({ title: e, sources: i, copyLabel: a, copiedLabel: o = "Link copied to clipboard", codeBlockCopyLabel: p, codeBlockCopiedLabel: m, codeBlockDownloadLabel: h, tableScrollRegionAriaLabel: _, mathScrollRegionAriaLabel: v, searchQuery: y = "", typography: S, colors: C, onSourceClick: E }) => {
|
|
31
|
+
let [D, k] = x(""), A = S?.sectionTitleClassName ?? "dial-body-semi-text", j = S?.sourceLinkClassName ?? "dial-small-text", M = S?.sourceQuoteClassName ?? "dial-tiny-text", N = b(() => n({
|
|
32
|
+
"--sp-source-link": C?.sourceLink,
|
|
33
|
+
"--sp-source-quote": C?.sourceQuote
|
|
34
|
+
}), [C]);
|
|
34
35
|
if (i.length === 0) return null;
|
|
35
|
-
let
|
|
36
|
-
await navigator.clipboard.writeText(e),
|
|
36
|
+
let P = async (e) => {
|
|
37
|
+
await navigator.clipboard.writeText(e), k(o);
|
|
37
38
|
};
|
|
38
|
-
return /* @__PURE__ */
|
|
39
|
+
return /* @__PURE__ */ T("section", {
|
|
39
40
|
className: "mb-6",
|
|
40
|
-
style:
|
|
41
|
+
style: N,
|
|
41
42
|
children: [
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
className: r(
|
|
43
|
+
/* @__PURE__ */ w("h2", {
|
|
44
|
+
className: r(A, "mb-3"),
|
|
44
45
|
children: e
|
|
45
46
|
}),
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ w("ul", {
|
|
47
48
|
className: "flex flex-col gap-3",
|
|
48
|
-
children: i.map((e) => /* @__PURE__ */
|
|
49
|
+
children: i.map((e) => /* @__PURE__ */ T("li", {
|
|
49
50
|
className: "flex flex-col gap-1",
|
|
50
|
-
children: [/* @__PURE__ */
|
|
51
|
+
children: [/* @__PURE__ */ T("div", {
|
|
51
52
|
className: "flex min-w-0 items-center justify-between gap-2",
|
|
52
|
-
children: [/* @__PURE__ */
|
|
53
|
+
children: [/* @__PURE__ */ w(f, {
|
|
53
54
|
href: e.url,
|
|
54
55
|
target: "_blank",
|
|
55
56
|
size: l.Small,
|
|
56
|
-
className: r(
|
|
57
|
-
textClassName: r(
|
|
58
|
-
label:
|
|
57
|
+
className: r(O.link, "min-w-0 flex-1 justify-start"),
|
|
58
|
+
textClassName: r(j, "min-w-0 truncate"),
|
|
59
|
+
label: /* @__PURE__ */ w(d, {
|
|
59
60
|
text: e.title,
|
|
60
|
-
query:
|
|
61
|
+
query: y,
|
|
61
62
|
maxLines: 1
|
|
62
|
-
})
|
|
63
|
+
}),
|
|
63
64
|
"aria-label": e.title,
|
|
64
|
-
onClick:
|
|
65
|
-
t.preventDefault(),
|
|
65
|
+
onClick: E ? (t) => {
|
|
66
|
+
t.preventDefault(), E(e);
|
|
66
67
|
} : void 0
|
|
67
|
-
}), /* @__PURE__ */
|
|
68
|
+
}), /* @__PURE__ */ w(u, {
|
|
68
69
|
size: l.Small,
|
|
69
|
-
icon: /* @__PURE__ */
|
|
70
|
+
icon: /* @__PURE__ */ w(g, {
|
|
70
71
|
size: s.SM,
|
|
71
72
|
stroke: c,
|
|
72
73
|
"aria-hidden": !0
|
|
73
74
|
}),
|
|
74
75
|
"aria-label": a,
|
|
75
|
-
onClick: () => void
|
|
76
|
+
onClick: () => void P(e.url)
|
|
76
77
|
})]
|
|
77
|
-
}), e.quote && /* @__PURE__ */
|
|
78
|
-
className: r(
|
|
79
|
-
children: /* @__PURE__ */
|
|
78
|
+
}), e.quote && /* @__PURE__ */ w("div", {
|
|
79
|
+
className: r(M, O.quote, "line-clamp-5 [&>div>*+*]:mt-1"),
|
|
80
|
+
children: /* @__PURE__ */ w(t, {
|
|
81
|
+
content: e.quote,
|
|
82
|
+
codeBlockCopyLabel: p,
|
|
83
|
+
codeBlockCopiedLabel: m,
|
|
84
|
+
codeBlockDownloadLabel: h,
|
|
85
|
+
tableScrollRegionAriaLabel: _,
|
|
86
|
+
mathScrollRegionAriaLabel: v
|
|
87
|
+
})
|
|
80
88
|
})]
|
|
81
89
|
}, e.url))
|
|
82
90
|
}),
|
|
83
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ w("span", {
|
|
84
92
|
role: "status",
|
|
85
93
|
"aria-live": "polite",
|
|
86
94
|
className: "sr-only",
|
|
87
|
-
children:
|
|
95
|
+
children: D
|
|
88
96
|
})
|
|
89
97
|
]
|
|
90
98
|
});
|
|
91
|
-
}),
|
|
92
|
-
let [
|
|
93
|
-
|
|
99
|
+
}), A = (e, t) => e.toLowerCase().includes(t.toLowerCase()), j = v(({ isOpen: t, onClose: n, uploaded: r, generated: s, sources: c, onAttachmentClick: l, onSourceClick: d, onDownloadAll: f, isMobile: g, defaultWidth: v, minWidth: S, maxWidth: O, onResizeStop: j, labels: M, styles: N, title: P, additionalSections: F }) => {
|
|
100
|
+
let [I, L] = x(""), R = (e) => {
|
|
101
|
+
L(e ?? "");
|
|
94
102
|
};
|
|
95
|
-
|
|
96
|
-
t ||
|
|
103
|
+
y(() => {
|
|
104
|
+
t || L("");
|
|
97
105
|
}, [t]);
|
|
98
|
-
let
|
|
99
|
-
return
|
|
106
|
+
let z = b(() => I ? r.filter((e) => A(e.name, I)) : r, [r, I]), B = b(() => I ? s.filter((e) => A(e.name, I)) : s, [s, I]), V = b(() => I ? c.filter((e) => A(e.title, I) || A(e.url, I) || e.quote != null && A(e.quote, I)) : c, [c, I]), H = r.length > 0 || s.length > 0 || c.length > 0, U = !H && !F, W = I !== "" && z.length === 0 && B.length === 0 && V.length === 0, G;
|
|
107
|
+
return G = U ? /* @__PURE__ */ w("div", {
|
|
100
108
|
className: "flex h-full items-center justify-center",
|
|
101
|
-
children: /* @__PURE__ */
|
|
102
|
-
}) : /* @__PURE__ */
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
attachments:
|
|
105
|
-
title:
|
|
106
|
-
searchQuery:
|
|
107
|
-
titleClassName:
|
|
109
|
+
children: /* @__PURE__ */ w(p, { title: M.noDataLabel })
|
|
110
|
+
}) : /* @__PURE__ */ T(C, { children: [F, W ? /* @__PURE__ */ w(i, { label: M.noResultsLabel }) : /* @__PURE__ */ T(C, { children: [
|
|
111
|
+
/* @__PURE__ */ w(D, {
|
|
112
|
+
attachments: z,
|
|
113
|
+
title: M.uploadedSectionTitle,
|
|
114
|
+
searchQuery: I,
|
|
115
|
+
titleClassName: N?.typography?.sectionTitleClassName,
|
|
108
116
|
onAttachmentClick: l,
|
|
109
|
-
attachmentClickLabel:
|
|
117
|
+
attachmentClickLabel: M.attachmentClickLabel
|
|
110
118
|
}),
|
|
111
|
-
/* @__PURE__ */
|
|
112
|
-
attachments:
|
|
113
|
-
title:
|
|
114
|
-
searchQuery:
|
|
115
|
-
titleClassName:
|
|
119
|
+
/* @__PURE__ */ w(D, {
|
|
120
|
+
attachments: B,
|
|
121
|
+
title: M.generatedSectionTitle,
|
|
122
|
+
searchQuery: I,
|
|
123
|
+
titleClassName: N?.typography?.sectionTitleClassName,
|
|
116
124
|
onAttachmentClick: l,
|
|
117
|
-
attachmentClickLabel:
|
|
125
|
+
attachmentClickLabel: M.attachmentClickLabel
|
|
118
126
|
}),
|
|
119
|
-
/* @__PURE__ */
|
|
120
|
-
sources:
|
|
121
|
-
title:
|
|
122
|
-
searchQuery:
|
|
123
|
-
typography:
|
|
124
|
-
colors:
|
|
125
|
-
copyLabel:
|
|
126
|
-
copiedLabel:
|
|
127
|
+
/* @__PURE__ */ w(k, {
|
|
128
|
+
sources: V,
|
|
129
|
+
title: M.sourcesSectionTitle,
|
|
130
|
+
searchQuery: I,
|
|
131
|
+
typography: N?.typography,
|
|
132
|
+
colors: N?.colors,
|
|
133
|
+
copyLabel: M.copySourceLabel,
|
|
134
|
+
copiedLabel: M.sourceCopiedLabel,
|
|
135
|
+
codeBlockCopyLabel: M.codeBlockCopyLabel,
|
|
136
|
+
codeBlockCopiedLabel: M.codeBlockCopiedLabel,
|
|
137
|
+
codeBlockDownloadLabel: M.codeBlockDownloadLabel,
|
|
138
|
+
tableScrollRegionAriaLabel: M.tableScrollRegionAriaLabel,
|
|
139
|
+
mathScrollRegionAriaLabel: M.mathScrollRegionAriaLabel,
|
|
127
140
|
onSourceClick: d
|
|
128
141
|
})
|
|
129
|
-
] })] }), /* @__PURE__ */
|
|
142
|
+
] })] }), /* @__PURE__ */ T(o, {
|
|
130
143
|
isOpen: t,
|
|
131
144
|
orientation: a.Right,
|
|
132
145
|
styles: {
|
|
133
|
-
className: h && t
|
|
146
|
+
className: h(g && t && "w-full", E.panel),
|
|
134
147
|
bodyClassName: "flex flex-col overflow-hidden p-0"
|
|
135
148
|
},
|
|
136
|
-
labels:
|
|
137
|
-
title:
|
|
149
|
+
labels: M,
|
|
150
|
+
title: P,
|
|
138
151
|
onClose: n,
|
|
139
|
-
resizable: !
|
|
140
|
-
defaultWidth:
|
|
141
|
-
minWidth:
|
|
142
|
-
maxWidth:
|
|
143
|
-
onResizeStop:
|
|
144
|
-
rightActions:
|
|
145
|
-
icon: /* @__PURE__ */
|
|
146
|
-
"aria-label":
|
|
147
|
-
tooltipProps: { tooltip:
|
|
148
|
-
onClick: f
|
|
149
|
-
disabled: !f
|
|
152
|
+
resizable: !g,
|
|
153
|
+
defaultWidth: v,
|
|
154
|
+
minWidth: S,
|
|
155
|
+
maxWidth: O,
|
|
156
|
+
onResizeStop: j,
|
|
157
|
+
rightActions: H && f && /* @__PURE__ */ w(u, {
|
|
158
|
+
icon: /* @__PURE__ */ w(_, { ...e }),
|
|
159
|
+
"aria-label": M.downloadAllLabel,
|
|
160
|
+
tooltipProps: { tooltip: M.downloadAllLabel },
|
|
161
|
+
onClick: f
|
|
150
162
|
}),
|
|
151
163
|
children: [
|
|
152
|
-
|
|
164
|
+
H && /* @__PURE__ */ w("div", {
|
|
153
165
|
role: "search",
|
|
154
166
|
className: "px-3 py-2",
|
|
155
|
-
children: /* @__PURE__ */
|
|
156
|
-
value:
|
|
157
|
-
onChange:
|
|
158
|
-
placeholder:
|
|
159
|
-
clearLabel:
|
|
160
|
-
"aria-label":
|
|
167
|
+
children: /* @__PURE__ */ w(m, {
|
|
168
|
+
value: I,
|
|
169
|
+
onChange: R,
|
|
170
|
+
placeholder: M.searchPlaceholder,
|
|
171
|
+
clearLabel: M.searchClearLabel,
|
|
172
|
+
"aria-label": M.searchPlaceholder
|
|
161
173
|
})
|
|
162
174
|
}),
|
|
163
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ w("span", {
|
|
164
176
|
role: "status",
|
|
165
177
|
"aria-live": "polite",
|
|
166
178
|
className: "sr-only",
|
|
167
|
-
children:
|
|
179
|
+
children: W ? M.noResultsLabel : ""
|
|
168
180
|
}),
|
|
169
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ w("div", {
|
|
170
182
|
className: "flex-1 overflow-y-auto p-4 pt-0",
|
|
171
|
-
children:
|
|
183
|
+
children: G
|
|
172
184
|
})
|
|
173
185
|
]
|
|
174
186
|
});
|
|
175
187
|
});
|
|
176
188
|
//#endregion
|
|
177
|
-
export {
|
|
189
|
+
export { j as ConversationSourcesPanel, E as SOURCE_PANEL_CLASS };
|
|
@@ -31,6 +31,16 @@ export interface ConversationSourcesPanelLabels {
|
|
|
31
31
|
sourceCopiedLabel?: string;
|
|
32
32
|
/** Label passed to each attachment card's action button. */
|
|
33
33
|
attachmentClickLabel: string;
|
|
34
|
+
/** Accessible label for the copy button on a fenced code block inside a source quote. Defaults to `'Copy code'`. */
|
|
35
|
+
codeBlockCopyLabel?: string;
|
|
36
|
+
/** Status announced after a fenced code block inside a source quote has been copied. Defaults to `'Copied!'`. */
|
|
37
|
+
codeBlockCopiedLabel?: string;
|
|
38
|
+
/** Accessible label for the download button on a fenced code block inside a source quote. Defaults to `'Download code'`. */
|
|
39
|
+
codeBlockDownloadLabel?: string;
|
|
40
|
+
/** Accessible label for a table's horizontally scrollable region inside a source quote. Defaults to `'Scrollable table'`. */
|
|
41
|
+
tableScrollRegionAriaLabel?: string;
|
|
42
|
+
/** Accessible label for a block formula's horizontally scrollable region inside a source quote. Defaults to `'Scrollable formula'`. */
|
|
43
|
+
mathScrollRegionAriaLabel?: string;
|
|
34
44
|
}
|
|
35
45
|
/** CSS custom-property overrides for the sources section. */
|
|
36
46
|
export interface ConversationSourcesPanelColors {
|
|
@@ -71,7 +81,7 @@ export interface ConversationSourcesPanelProps {
|
|
|
71
81
|
onAttachmentClick?: (attachment: DisplayAttachment) => void;
|
|
72
82
|
/** Called when the user clicks a source link. When omitted, the link navigates normally. */
|
|
73
83
|
onSourceClick?: (source: QuotationSource) => void;
|
|
74
|
-
/** Called when the user activates the download-all button; omit to
|
|
84
|
+
/** Called when the user activates the download-all button; omit to hide the button. */
|
|
75
85
|
onDownloadAll?: () => void;
|
|
76
86
|
/** Whether the viewport is in mobile breakpoint (disables resizing). */
|
|
77
87
|
isMobile: boolean;
|
|
@@ -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,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,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,4FAA4F;IAC5F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sDAAsD;IACtD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0DAA0D;IAC1D,gBAAgB,EAAE,MAAM,CAAC;IACzB,oFAAoF;IACpF,WAAW,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,cAAc,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,gBAAgB,EAAE,MAAM,CAAC;IACzB,mDAAmD;IACnD,oBAAoB,EAAE,MAAM,CAAC;IAC7B,oDAAoD;IACpD,qBAAqB,EAAE,MAAM,CAAC;IAC9B,4CAA4C;IAC5C,mBAAmB,EAAE,MAAM,CAAC;IAC5B,0DAA0D;IAC1D,eAAe,EAAE,MAAM,CAAC;IACxB,yHAAyH;IACzH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,4DAA4D;IAC5D,oBAAoB,EAAE,MAAM,CAAC;
|
|
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,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,oFAAoF;AACpF,MAAM,WAAW,8BAA8B;IAC7C,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;IACl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@
|
|
|
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.2.0-dev.
|
|
4
|
+
"version": "1.2.0-dev.303",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@tabler/icons-react": "^3.44.0",
|
|
21
|
-
"@epam/ai-dial-attachment-input": "1.2.0-dev.
|
|
22
|
-
"@epam/ai-dial-sidebar": "1.2.0-dev.
|
|
21
|
+
"@epam/ai-dial-attachment-input": "1.2.0-dev.303",
|
|
22
|
+
"@epam/ai-dial-sidebar": "1.2.0-dev.303"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": "^19.2.8",
|
|
26
|
-
"@epam/ai-dial-chat-shared": "1.2.0-dev.
|
|
27
|
-
"@epam/ai-dial-ui-kit": "^0.
|
|
26
|
+
"@epam/ai-dial-chat-shared": "1.2.0-dev.303",
|
|
27
|
+
"@epam/ai-dial-ui-kit": "^0.15.0-dev.39"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|
|
30
30
|
"type": "git",
|