@epam/ai-dial-source-panel 1.1.0-dev.17 → 1.1.0-dev.170

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,5 +1,4 @@
1
1
  import { ConversationSourcesPanelProps } from '../../models/conversation-sources-panel-props';
2
- export type { ConversationSourcesPanelColors, ConversationSourcesPanelLabels, ConversationSourcesPanelProps, ConversationSourcesPanelStyles, ConversationSourcesPanelTypography, } from '../../models/conversation-sources-panel-props';
3
2
  declare const _default: import('react').NamedExoticComponent<ConversationSourcesPanelProps>;
4
3
  export default _default;
5
4
  //# sourceMappingURL=ConversationSourcesPanel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConversationSourcesPanel.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationSourcesPanel/ConversationSourcesPanel.tsx"],"names":[],"mappings":"AAWA,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;;AAmJvD,wBAA8C"}
1
+ {"version":3,"file":"ConversationSourcesPanel.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationSourcesPanel/ConversationSourcesPanel.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,+CAA+C,CAAC;;AA6KnG,wBAA8C"}
@@ -1 +1 @@
1
- {"version":3,"file":"FilesSection.d.ts","sourceRoot":"","sources":["../../../src/components/FilesSection/FilesSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAKnE,4CAA4C;AAC5C,MAAM,WAAW,iBAAiB;IAChC,kEAAkE;IAClE,WAAW,EAAE,iBAAiB,EAAE,CAAC;IACjC,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qFAAqF;IACrF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sDAAsD;IACtD,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5D,uFAAuF;IACvF,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;;AA8CD,wBAAkC"}
1
+ {"version":3,"file":"FilesSection.d.ts","sourceRoot":"","sources":["../../../src/components/FilesSection/FilesSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAKnE,4CAA4C;AAC5C,MAAM,WAAW,iBAAiB;IAChC,kEAAkE;IAClE,WAAW,EAAE,iBAAiB,EAAE,CAAC;IACjC,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qFAAqF;IACrF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sDAAsD;IACtD,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5D,uFAAuF;IACvF,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;;AAuCD,wBAAkC"}
@@ -1,8 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+ import { ConversationSourcesPanelColors, ConversationSourcesPanelTypography } from '../../models/conversation-sources-panel-props';
1
3
  import { QuotationSource } from '../../models/quotation-source';
2
- import { ConversationSourcesPanelColors, ConversationSourcesPanelTypography } from '../ConversationSourcesPanel/ConversationSourcesPanel';
4
+ /** Props for the `SourcesSection` component. */
3
5
  export interface SourcesSectionProps {
4
6
  /** Heading text for the sources section. */
5
- title: string;
7
+ title: ReactNode;
6
8
  /** List of sources to display. */
7
9
  sources: QuotationSource[];
8
10
  /** Accessible label for each source's copy-URL button. */
@@ -1 +1 @@
1
- {"version":3,"file":"SourcesSection.d.ts","sourceRoot":"","sources":["../../../src/components/SourcesSection/SourcesSection.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EACL,8BAA8B,EAC9B,kCAAkC,EACnC,MAAM,sDAAsD,CAAC;AAG9D,MAAM,WAAW,mBAAmB;IAClC,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,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;;AAuGD,wBAAoC"}
1
+ {"version":3,"file":"SourcesSection.d.ts","sourceRoot":"","sources":["../../../src/components/SourcesSection/SourcesSection.tsx"],"names":[],"mappings":"AAYA,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,MAAM,WAAW,mBAAmB;IAClC,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;;AAuGD,wBAAoC"}
package/index.css CHANGED
@@ -1,2 +1,2 @@
1
- ._link_1f4sp_1{color:var(--sp-source-link,var(--text-accent-primary,#124ace))}._quote_1f4sp_5{color:var(--sp-source-quote,var(--text-primary,#161b2d))}
1
+ ._link_viope_1{color:var(--sp-source-link,var(--text-accent,#1d4ed8))}._quote_viope_5{color:var(--sp-source-quote,var(--text-primary,#161b2d))}
2
2
  /*$vite$:1*/
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { default as ConversationSourcesPanel } from './components/ConversationSourcesPanel/ConversationSourcesPanel';
2
- export type { ConversationSourcesPanelColors, ConversationSourcesPanelLabels, ConversationSourcesPanelProps, ConversationSourcesPanelStyles, ConversationSourcesPanelTypography, } from './components/ConversationSourcesPanel/ConversationSourcesPanel';
2
+ export type { ConversationSourcesPanelColors, ConversationSourcesPanelLabels, ConversationSourcesPanelProps, ConversationSourcesPanelStyles, ConversationSourcesPanelTypography, } from './models/conversation-sources-panel-props';
3
3
  export type { QuotationSource } from './models/quotation-source';
4
4
  //# 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,gEAAgE,CAAC;AACxE,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"}
package/index.js CHANGED
@@ -1,86 +1,84 @@
1
- import { AttachmentType as e, BASE_LG_ICON_PROPS as t, Highlight as n, MarkdownRenderer as r, buildCssVars as i, mergeClasses as a } from "@epam/ai-dial-chat-shared";
2
- import { PanelEmpty as o, PanelNoResults as s, SearchInput as c, SidebarOrientation as l, SidebarPanel as u } from "@epam/ai-dial-sidebar";
3
- import { DIAL_ICON_SIZE as d, DialGhostIconButton as f, ElementSize as p } from "@epam/ai-dial-ui-kit";
4
- import { IconCopy as m, IconDownload as h } from "@tabler/icons-react";
5
- import { memo as g, useLayoutEffect as _, useMemo as v, useState as y } from "react";
6
- import { AttachmentCard as b } from "@epam/ai-dial-conversation-input";
7
- import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
8
- var w = g(({ attachments: t, title: n, searchQuery: r, titleClassName: i = "dial-body-semi-text", onAttachmentClick: o, attachmentClickLabel: s }) => t.length === 0 ? null : /* @__PURE__ */ C("section", {
1
+ import { BASE_LG_ICON_PROPS as e, MarkdownRenderer as t, buildCssVars as n, mergeClasses as r } from "@epam/ai-dial-chat-shared";
2
+ import { PanelNoResults as i, SearchInput as a, SidebarOrientation as o, SidebarPanel as s } from "@epam/ai-dial-sidebar";
3
+ import { DIAL_ICON_SIZE as c, DialNoDataContent as l, ElementSize as u, GhostIconButton as d, Highlight as f } from "@epam/ai-dial-ui-kit";
4
+ import { IconCopy as p, IconDownload as m } from "@tabler/icons-react";
5
+ import { memo as h, useLayoutEffect as g, useMemo as _, useState as v } from "react";
6
+ import { AttachmentCard as y } from "@epam/ai-dial-conversation-input";
7
+ import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
8
+ var C = h(({ attachments: e, title: t, searchQuery: n, titleClassName: i = "dial-body-semi-text", onAttachmentClick: a, attachmentClickLabel: o }) => e.length === 0 ? null : /* @__PURE__ */ S("section", {
9
9
  className: "mb-6",
10
- children: [/* @__PURE__ */ S("h2", {
11
- className: a(i, "mb-3"),
12
- children: n
13
- }), /* @__PURE__ */ S("div", {
10
+ children: [/* @__PURE__ */ x("h2", {
11
+ className: r(i, "mb-3"),
12
+ children: t
13
+ }), /* @__PURE__ */ x("div", {
14
14
  role: "list",
15
- className: "grid grid-cols-[repeat(auto-fill,minmax(100px,1fr))] gap-3",
16
- children: t.map((t) => /* @__PURE__ */ S("div", {
15
+ className: "grid grid-cols-[repeat(auto-fill,minmax(84px,1fr))] gap-3",
16
+ children: e.map((e, t) => /* @__PURE__ */ x("div", {
17
17
  role: "listitem",
18
- className: t.type === e.Audio ? "col-span-full" : void 0,
19
- children: /* @__PURE__ */ S(b, {
20
- attachment: t,
21
- searchQuery: r,
22
- styles: { className: "w-full" },
23
- onClick: o ? () => o(t) : void 0,
24
- labels: { clickLabel: s }
18
+ children: /* @__PURE__ */ x(y, {
19
+ attachment: e,
20
+ searchQuery: n,
21
+ onClick: a ? () => a(e) : void 0,
22
+ labels: { clickLabel: o }
25
23
  })
26
- }, t.id))
24
+ }, `${e.id}-${t}`))
27
25
  })]
28
- })), T = {
29
- link: "_link_1f4sp_1",
30
- quote: "_quote_1f4sp_5"
31
- }, E = g(({ title: e, sources: t, copyLabel: o, copiedLabel: s = "Link copied to clipboard", searchQuery: c = "", typography: l, colors: u, onSourceClick: h }) => {
32
- let [g, _] = y(""), b = l?.sectionTitleClassName ?? "dial-body-semi-text", x = l?.sourceLinkClassName ?? "dial-small-text", w = l?.sourceQuoteClassName ?? "dial-tiny-text", E = v(() => i({
33
- "--sp-source-link": u?.sourceLink,
34
- "--sp-source-quote": u?.sourceQuote
35
- }), [u]);
36
- if (t.length === 0) return null;
26
+ })), w = {
27
+ link: "_link_viope_1",
28
+ quote: "_quote_viope_5"
29
+ }, T = h(({ title: e, sources: i, copyLabel: a, copiedLabel: o = "Link copied to clipboard", searchQuery: s = "", typography: l, colors: m, onSourceClick: h }) => {
30
+ let [g, y] = v(""), b = l?.sectionTitleClassName ?? "dial-body-semi-text", C = l?.sourceLinkClassName ?? "dial-small-text", T = l?.sourceQuoteClassName ?? "dial-tiny-text", E = _(() => n({
31
+ "--sp-source-link": m?.sourceLink,
32
+ "--sp-source-quote": m?.sourceQuote
33
+ }), [m]);
34
+ if (i.length === 0) return null;
37
35
  let D = async (e) => {
38
- await navigator.clipboard.writeText(e), _(s);
36
+ await navigator.clipboard.writeText(e), y(o);
39
37
  };
40
- return /* @__PURE__ */ C("section", {
38
+ return /* @__PURE__ */ S("section", {
41
39
  className: "mb-6",
42
40
  style: E,
43
41
  children: [
44
- /* @__PURE__ */ S("h2", {
45
- className: a(b, "mb-3"),
42
+ /* @__PURE__ */ x("h2", {
43
+ className: r(b, "mb-3"),
46
44
  children: e
47
45
  }),
48
- /* @__PURE__ */ S("ul", {
46
+ /* @__PURE__ */ x("ul", {
49
47
  className: "flex flex-col gap-3",
50
- children: t.map((e) => /* @__PURE__ */ C("li", {
48
+ children: i.map((e) => /* @__PURE__ */ S("li", {
51
49
  className: "flex flex-col gap-1",
52
- children: [/* @__PURE__ */ C("div", {
50
+ children: [/* @__PURE__ */ S("div", {
53
51
  className: "flex min-w-0 items-center justify-between gap-2",
54
- children: [/* @__PURE__ */ S("a", {
52
+ children: [/* @__PURE__ */ x("a", {
55
53
  href: e.url,
56
54
  target: "_blank",
57
55
  rel: "noopener noreferrer",
58
- className: a(x, T.link, "min-w-0 flex-1 truncate"),
56
+ className: r(C, w.link, "min-w-0 flex-1 truncate"),
59
57
  onClick: h ? (t) => {
60
58
  t.preventDefault(), h(e);
61
59
  } : void 0,
62
- children: c ? /* @__PURE__ */ S(n, {
60
+ children: s ? /* @__PURE__ */ x(f, {
63
61
  text: e.title,
64
- query: c,
62
+ query: s,
65
63
  maxLines: 1
66
64
  }) : e.title
67
- }), /* @__PURE__ */ S(f, {
68
- size: p.Small,
69
- icon: /* @__PURE__ */ S(m, {
70
- size: d.SM,
65
+ }), /* @__PURE__ */ x(d, {
66
+ size: u.Small,
67
+ icon: /* @__PURE__ */ x(p, {
68
+ size: c.SM,
71
69
  stroke: 1.5,
72
70
  "aria-hidden": !0
73
71
  }),
74
- "aria-label": o,
72
+ "aria-label": a,
75
73
  onClick: () => void D(e.url)
76
74
  })]
77
- }), e.quote && /* @__PURE__ */ S("div", {
78
- className: a(w, T.quote, "line-clamp-5 [&>div>*+*]:mt-1"),
79
- children: /* @__PURE__ */ S(r, { content: e.quote })
75
+ }), e.quote && /* @__PURE__ */ x("div", {
76
+ className: r(T, w.quote, "line-clamp-5 [&>div>*+*]:mt-1"),
77
+ children: /* @__PURE__ */ x(t, { content: e.quote })
80
78
  })]
81
79
  }, e.url))
82
80
  }),
83
- /* @__PURE__ */ S("span", {
81
+ /* @__PURE__ */ x("span", {
84
82
  role: "status",
85
83
  "aria-live": "polite",
86
84
  className: "sr-only",
@@ -88,80 +86,86 @@ var w = g(({ attachments: t, title: n, searchQuery: r, titleClassName: i = "dial
88
86
  })
89
87
  ]
90
88
  });
91
- }), D = (e, t) => e.toLowerCase().includes(t.toLowerCase()), O = g(({ isOpen: e, onClose: n, uploaded: r, generated: i, sources: a, onAttachmentClick: d, onSourceClick: p, onDownloadAll: m, isMobile: g, defaultWidth: b, minWidth: T, maxWidth: O, onResizeStop: k, labels: A, styles: j }) => {
92
- let [M, N] = y("");
93
- _(() => {
94
- e || N("");
95
- }, [e]);
96
- 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 ? a.filter((e) => D(e.title, M) || D(e.url, M) || e.quote != null && D(e.quote, M)) : a, [a, M]), L = r.length === 0 && i.length === 0 && a.length === 0, R = M !== "" && P.length === 0 && F.length === 0 && I.length === 0;
97
- return /* @__PURE__ */ C(u, {
98
- isOpen: e,
99
- orientation: l.Right,
89
+ }), E = (e, t) => e.toLowerCase().includes(t.toLowerCase()), D = h(({ isOpen: t, onClose: n, uploaded: r, generated: c, sources: u, onAttachmentClick: f, onSourceClick: p, onDownloadAll: h, isMobile: y, defaultWidth: w, minWidth: D, maxWidth: O, onResizeStop: k, labels: A, styles: j, title: M, additionalSections: N }) => {
90
+ let [P, F] = v("");
91
+ g(() => {
92
+ t || F("");
93
+ }, [t]);
94
+ let I = _(() => P ? r.filter((e) => E(e.name, P)) : r, [r, P]), L = _(() => P ? c.filter((e) => E(e.name, P)) : c, [c, P]), R = _(() => P ? u.filter((e) => E(e.title, P) || E(e.url, P) || e.quote != null && E(e.quote, P)) : u, [u, P]), z = r.length > 0 || c.length > 0 || u.length > 0, B = !z && !N, V = P !== "" && I.length === 0 && L.length === 0 && R.length === 0, H;
95
+ return H = B ? /* @__PURE__ */ x("div", {
96
+ className: "flex h-full items-center justify-center",
97
+ children: /* @__PURE__ */ x(l, { title: A.noDataLabel })
98
+ }) : /* @__PURE__ */ S(b, { children: [N, V ? /* @__PURE__ */ x(i, { label: A.noResultsLabel }) : /* @__PURE__ */ S(b, { children: [
99
+ /* @__PURE__ */ x(C, {
100
+ attachments: I,
101
+ title: A.uploadedSectionTitle,
102
+ searchQuery: P,
103
+ titleClassName: j?.typography?.sectionTitleClassName,
104
+ onAttachmentClick: f,
105
+ attachmentClickLabel: A.attachmentClickLabel
106
+ }),
107
+ /* @__PURE__ */ x(C, {
108
+ attachments: L,
109
+ title: A.generatedSectionTitle,
110
+ searchQuery: P,
111
+ titleClassName: j?.typography?.sectionTitleClassName,
112
+ onAttachmentClick: f,
113
+ attachmentClickLabel: A.attachmentClickLabel
114
+ }),
115
+ /* @__PURE__ */ x(T, {
116
+ sources: R,
117
+ title: A.sourcesSectionTitle,
118
+ searchQuery: P,
119
+ typography: j?.typography,
120
+ colors: j?.colors,
121
+ copyLabel: A.copySourceLabel,
122
+ copiedLabel: A.sourceCopiedLabel,
123
+ onSourceClick: p
124
+ })
125
+ ] })] }), /* @__PURE__ */ S(s, {
126
+ isOpen: t,
127
+ orientation: o.Right,
100
128
  styles: {
101
- className: e ? "mobile:w-full" : "w-0",
102
- bodyClassName: "flex flex-col overflow-hidden p-0"
129
+ className: y && t ? "w-full" : void 0,
130
+ bodyClassName: "flex flex-col overflow-hidden p-0",
131
+ headerClassName: "border-b border-tertiary"
103
132
  },
104
133
  labels: A,
134
+ title: M,
105
135
  onClose: n,
106
- resizable: !g,
107
- defaultWidth: b,
108
- minWidth: T,
136
+ resizable: !y,
137
+ defaultWidth: w,
138
+ minWidth: D,
109
139
  maxWidth: O,
110
140
  onResizeStop: k,
111
- rightActions: !L && /* @__PURE__ */ S(f, {
112
- icon: /* @__PURE__ */ S(h, { ...t }),
141
+ rightActions: z && /* @__PURE__ */ x(d, {
142
+ icon: /* @__PURE__ */ x(m, { ...e }),
113
143
  "aria-label": A.downloadAllLabel,
114
144
  tooltipProps: { tooltip: A.downloadAllLabel },
115
- onClick: m,
116
- disabled: !m
145
+ onClick: h,
146
+ disabled: !h
117
147
  }),
118
148
  children: [
119
- !L && /* @__PURE__ */ S(c, {
120
- value: M,
121
- onChange: N,
149
+ z && /* @__PURE__ */ x(a, {
150
+ value: P,
151
+ onChange: F,
122
152
  labels: {
123
153
  placeholder: A.searchPlaceholder,
124
154
  clearLabel: A.searchClearLabel
125
155
  }
126
156
  }),
127
- /* @__PURE__ */ S("span", {
157
+ /* @__PURE__ */ x("span", {
128
158
  role: "status",
129
159
  "aria-live": "polite",
130
160
  className: "sr-only",
131
- children: R ? A.noResultsLabel : ""
161
+ children: V ? A.noResultsLabel : ""
132
162
  }),
133
- /* @__PURE__ */ S("div", {
163
+ /* @__PURE__ */ x("div", {
134
164
  className: "flex-1 overflow-y-auto p-4",
135
- children: L ? /* @__PURE__ */ S(o, { label: A.emptyLabel }) : R ? /* @__PURE__ */ S(s, { label: A.noResultsLabel }) : /* @__PURE__ */ C(x, { children: [
136
- /* @__PURE__ */ S(w, {
137
- attachments: P,
138
- title: A.uploadedSectionTitle,
139
- searchQuery: M,
140
- titleClassName: j?.typography?.sectionTitleClassName,
141
- onAttachmentClick: d,
142
- attachmentClickLabel: A.attachmentClickLabel
143
- }),
144
- /* @__PURE__ */ S(w, {
145
- attachments: F,
146
- title: A.generatedSectionTitle,
147
- searchQuery: M,
148
- titleClassName: j?.typography?.sectionTitleClassName,
149
- onAttachmentClick: d,
150
- attachmentClickLabel: A.attachmentClickLabel
151
- }),
152
- /* @__PURE__ */ S(E, {
153
- sources: I,
154
- title: A.sourcesSectionTitle,
155
- searchQuery: M,
156
- typography: j?.typography,
157
- colors: j?.colors,
158
- copyLabel: A.copySourceLabel,
159
- onSourceClick: p
160
- })
161
- ] })
165
+ children: H
162
166
  })
163
167
  ]
164
168
  });
165
169
  });
166
170
  //#endregion
167
- export { O as ConversationSourcesPanel };
171
+ export { D as ConversationSourcesPanel };
@@ -1,4 +1,5 @@
1
1
  import { DisplayAttachment } from '@epam/ai-dial-chat-shared';
2
+ import { ReactNode } from 'react';
2
3
  import { QuotationSource } from './quotation-source';
3
4
  /** User-visible strings passed by the consuming app (via i18n or plain strings). */
4
5
  export interface ConversationSourcesPanelLabels {
@@ -10,8 +11,8 @@ export interface ConversationSourcesPanelLabels {
10
11
  searchPlaceholder: string;
11
12
  /** Accessible label for the search input clear button. */
12
13
  searchClearLabel: string;
13
- /** Text shown when the panel has no files or sources. */
14
- emptyLabel: string;
14
+ /** Text shown in the centred empty state when the panel has no files or sources. */
15
+ noDataLabel: string;
15
16
  /** Text shown when a search query matches nothing. */
16
17
  noResultsLabel: string;
17
18
  /** Accessible label for the download-all icon button. */
@@ -24,6 +25,8 @@ export interface ConversationSourcesPanelLabels {
24
25
  sourcesSectionTitle: string;
25
26
  /** Accessible label for each source's copy-URL button. */
26
27
  copySourceLabel: string;
28
+ /** Status message announced to assistive tech after a source URL is copied. Defaults to `'Link copied to clipboard'`. */
29
+ sourceCopiedLabel?: string;
27
30
  /** Label passed to each attachment card's action button. */
28
31
  attachmentClickLabel: string;
29
32
  }
@@ -47,7 +50,7 @@ export interface ConversationSourcesPanelTypography {
47
50
  export interface ConversationSourcesPanelStyles {
48
51
  /** Color overrides applied as CSS custom properties to the sources section. */
49
52
  colors?: ConversationSourcesPanelColors;
50
- /** Typography (font utility class) overrides for section headings and source text. */
53
+ /** Typography overrides for section headings and source text. */
51
54
  typography?: ConversationSourcesPanelTypography;
52
55
  }
53
56
  /** Props for the ConversationSourcesPanel component. */
@@ -66,11 +69,7 @@ export interface ConversationSourcesPanelProps {
66
69
  onAttachmentClick?: (attachment: DisplayAttachment) => void;
67
70
  /** Called when the user clicks a source link. When omitted, the link navigates normally. */
68
71
  onSourceClick?: (source: QuotationSource) => void;
69
- /**
70
- * Called when the user activates the download-all button. Omit this prop
71
- * (leave it `undefined`) when there is nothing downloadable — the button
72
- * renders disabled whenever this is not provided.
73
- */
72
+ /** Called when the user activates the download-all button; omit to disable the button. */
74
73
  onDownloadAll?: () => void;
75
74
  /** Whether the viewport is in mobile breakpoint (disables resizing). */
76
75
  isMobile: boolean;
@@ -86,5 +85,17 @@ export interface ConversationSourcesPanelProps {
86
85
  labels: ConversationSourcesPanelLabels;
87
86
  /** Optional typography and color class overrides for inner elements. */
88
87
  styles?: ConversationSourcesPanelStyles;
88
+ /**
89
+ * Overrides the panel header's title (passed through to the underlying
90
+ * `SidebarPanel`'s `title`). Omit to keep the panel's default (untitled)
91
+ * header.
92
+ */
93
+ title?: ReactNode;
94
+ /**
95
+ * Rendered inside the scrollable body, before the Uploaded Files, Generated
96
+ * Files, and Sources sections. A plain, host-agnostic slot — this component
97
+ * has no knowledge of what it contains.
98
+ */
99
+ additionalSections?: ReactNode;
89
100
  }
90
101
  //# sourceMappingURL=conversation-sources-panel-props.d.ts.map
@@ -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,yDAAyD;IACzD,UAAU,EAAE,MAAM,CAAC;IACnB,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,4DAA4D;IAC5D,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,6DAA6D;AAC7D,MAAM,WAAW,8BAA8B;IAC7C,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,oEAAoE;AACpE,MAAM,WAAW,kCAAkC;IACjD,+FAA+F;IAC/F,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,8EAA8E;IAC9E,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,wFAAwF;IACxF,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,kEAAkE;AAClE,MAAM,WAAW,8BAA8B;IAC7C,+EAA+E;IAC/E,MAAM,CAAC,EAAE,8BAA8B,CAAC;IACxC,sFAAsF;IACtF,UAAU,CAAC,EAAE,kCAAkC,CAAC;CACjD;AAED,wDAAwD;AACxD,MAAM,WAAW,6BAA6B;IAC5C,8CAA8C;IAC9C,MAAM,EAAE,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;;;;OAIG;IACH,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"}
1
+ {"version":3,"file":"conversation-sources-panel-props.d.ts","sourceRoot":"","sources":["../../src/models/conversation-sources-panel-props.ts"],"names":[],"mappings":"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"}
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.17",
4
+ "version": "1.1.0-dev.170",
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.1.0-dev.17",
23
- "@epam/ai-dial-ui-kit": "0.12.0-dev.36",
24
- "@epam/ai-dial-sidebar": "1.1.0-dev.17",
25
- "@epam/ai-dial-conversation-input": "1.1.0-dev.17"
22
+ "@epam/ai-dial-chat-shared": "1.1.0-dev.170",
23
+ "@epam/ai-dial-sidebar": "1.1.0-dev.170",
24
+ "@epam/ai-dial-conversation-input": "1.1.0-dev.170",
25
+ "@epam/ai-dial-ui-kit": "^0.13.0-dev.26"
26
26
  },
27
27
  "repository": {
28
28
  "type": "git",