@epam/ai-dial-source-panel 1.1.0-dev.99 → 1.2.0-dev.1

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":"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"}
1
+ {"version":3,"file":"ConversationSourcesPanel.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationSourcesPanel/ConversationSourcesPanel.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,+CAA+C,CAAC;;AAiLnG,wBAA8C"}
@@ -1,6 +1,6 @@
1
1
  import { DisplayAttachment } from '@epam/ai-dial-chat-shared';
2
2
  /** Props for the FilesSection component. */
3
- export interface FilesSectionProps {
3
+ interface FilesSectionProps {
4
4
  /** List of attachments to display. Renders nothing when empty. */
5
5
  attachments: DisplayAttachment[];
6
6
  /** Heading text rendered above the attachment grid. */
@@ -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;;AA6CD,wBAAkC"}
1
+ {"version":3,"file":"FilesSection.d.ts","sourceRoot":"","sources":["../../../src/components/FilesSection/FilesSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAInE,4CAA4C;AAC5C,UAAU,iBAAiB;IACzB,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,8 @@
1
1
  import { ReactNode } from 'react';
2
+ import { ConversationSourcesPanelColors, ConversationSourcesPanelTypography } from '../../models/conversation-sources-panel-props';
2
3
  import { QuotationSource } from '../../models/quotation-source';
3
- import { ConversationSourcesPanelColors, ConversationSourcesPanelTypography } from '../ConversationSourcesPanel/ConversationSourcesPanel';
4
4
  /** Props for the `SourcesSection` component. */
5
- export interface SourcesSectionProps {
5
+ interface SourcesSectionProps {
6
6
  /** Heading text for the sources section. */
7
7
  title: ReactNode;
8
8
  /** List of sources to display. */
@@ -1 +1 @@
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,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EACL,8BAA8B,EAC9B,kCAAkC,EACnC,MAAM,sDAAsD,CAAC;AAG9D,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"}
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;;AA6GD,wBAAoC"}
package/index.css CHANGED
@@ -1,2 +1,2 @@
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))}
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
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,169 +1,177 @@
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 { 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
- 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: a = "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, 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 h, IconDownload as g } from "@tabler/icons-react";
5
+ import { memo as _, useLayoutEffect as v, useMemo as y, useState as b } from "react";
6
+ import { AttachmentCard as x } from "@epam/ai-dial-attachment-input";
7
+ import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
8
+ var T = _(({ attachments: e, title: t, searchQuery: n, titleClassName: i = "dial-body-semi-text", onAttachmentClick: a, attachmentClickLabel: o }) => e.length === 0 ? null : /* @__PURE__ */ w("section", {
9
9
  className: "mb-6",
10
- children: [/* @__PURE__ */ S("h2", {
11
- className: i(a, "mb-3"),
12
- children: n
13
- }), /* @__PURE__ */ S("div", {
10
+ children: [/* @__PURE__ */ C("h2", {
11
+ className: r(i, "mb-3"),
12
+ children: t
13
+ }), /* @__PURE__ */ C("div", {
14
14
  role: "list",
15
15
  className: "grid grid-cols-[repeat(auto-fill,minmax(84px,1fr))] gap-3",
16
- children: t.map((t, n) => /* @__PURE__ */ S("div", {
16
+ children: e.map((e, t) => /* @__PURE__ */ C("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
- onClick: o ? () => o(t) : void 0,
23
- labels: { clickLabel: s }
18
+ children: /* @__PURE__ */ C(x, {
19
+ attachment: e,
20
+ searchQuery: n,
21
+ onClick: a ? () => a(e) : void 0,
22
+ labels: { clickLabel: o }
24
23
  })
25
- }, `${t.id}-${n}`))
24
+ }, `${e.id}-${t}`))
26
25
  })]
27
- })), T = {
28
- link: "_link_viope_1",
29
- quote: "_quote_viope_5"
30
- }, E = g(({ title: e, sources: t, copyLabel: a, copiedLabel: o = "Link copied to clipboard", searchQuery: s = "", typography: c, colors: u, onSourceClick: h }) => {
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": u?.sourceLink,
33
- "--sp-source-quote": u?.sourceQuote
34
- }), [u]);
35
- if (t.length === 0) return null;
36
- let D = async (e) => {
37
- await navigator.clipboard.writeText(e), _(o);
26
+ })), E = {
27
+ link: "_link_12icw_1",
28
+ quote: "_quote_12icw_5"
29
+ }, D = _(({ title: e, sources: i, copyLabel: a, copiedLabel: o = "Link copied to clipboard", searchQuery: p = "", typography: m, colors: g, onSourceClick: _ }) => {
30
+ let [v, x] = b(""), S = m?.sectionTitleClassName ?? "dial-body-semi-text", T = m?.sourceLinkClassName ?? "dial-small-text", D = m?.sourceQuoteClassName ?? "dial-tiny-text", O = y(() => n({
31
+ "--sp-source-link": g?.sourceLink,
32
+ "--sp-source-quote": g?.sourceQuote
33
+ }), [g]);
34
+ if (i.length === 0) return null;
35
+ let k = async (e) => {
36
+ await navigator.clipboard.writeText(e), x(o);
38
37
  };
39
- return /* @__PURE__ */ C("section", {
38
+ return /* @__PURE__ */ w("section", {
40
39
  className: "mb-6",
41
- style: E,
40
+ style: O,
42
41
  children: [
43
- /* @__PURE__ */ S("h2", {
44
- className: i(b, "mb-3"),
42
+ /* @__PURE__ */ C("h2", {
43
+ className: r(S, "mb-3"),
45
44
  children: e
46
45
  }),
47
- /* @__PURE__ */ S("ul", {
46
+ /* @__PURE__ */ C("ul", {
48
47
  className: "flex flex-col gap-3",
49
- children: t.map((e) => /* @__PURE__ */ C("li", {
48
+ children: i.map((e) => /* @__PURE__ */ w("li", {
50
49
  className: "flex flex-col gap-1",
51
- children: [/* @__PURE__ */ C("div", {
50
+ children: [/* @__PURE__ */ w("div", {
52
51
  className: "flex min-w-0 items-center justify-between gap-2",
53
- children: [/* @__PURE__ */ S("a", {
52
+ children: [/* @__PURE__ */ C(f, {
54
53
  href: e.url,
55
54
  target: "_blank",
56
- rel: "noopener noreferrer",
57
- className: i(x, T.link, "min-w-0 flex-1 truncate"),
58
- onClick: h ? (t) => {
59
- t.preventDefault(), h(e);
60
- } : void 0,
61
- children: s ? /* @__PURE__ */ S(p, {
55
+ size: l.Small,
56
+ className: r(E.link, "min-w-0 flex-1 justify-start"),
57
+ textClassName: r(T, "min-w-0 truncate"),
58
+ label: p ? /* @__PURE__ */ C(d, {
62
59
  text: e.title,
63
- query: s,
60
+ query: p,
64
61
  maxLines: 1
65
- }) : e.title
66
- }), /* @__PURE__ */ S(f, {
67
- size: d.Small,
68
- icon: /* @__PURE__ */ S(m, {
69
- size: l.SM,
70
- stroke: 1.5,
62
+ }) : e.title,
63
+ "aria-label": e.title,
64
+ onClick: _ ? (t) => {
65
+ t.preventDefault(), _(e);
66
+ } : void 0
67
+ }), /* @__PURE__ */ C(u, {
68
+ size: l.Small,
69
+ icon: /* @__PURE__ */ C(h, {
70
+ size: s.SM,
71
+ stroke: c,
71
72
  "aria-hidden": !0
72
73
  }),
73
74
  "aria-label": a,
74
- onClick: () => void D(e.url)
75
+ onClick: () => void k(e.url)
75
76
  })]
76
- }), e.quote && /* @__PURE__ */ S("div", {
77
- className: i(w, T.quote, "line-clamp-5 [&>div>*+*]:mt-1"),
78
- children: /* @__PURE__ */ S(n, { content: e.quote })
77
+ }), e.quote && /* @__PURE__ */ C("div", {
78
+ className: r(D, E.quote, "line-clamp-5 [&>div>*+*]:mt-1"),
79
+ children: /* @__PURE__ */ C(t, { content: e.quote })
79
80
  })]
80
81
  }, e.url))
81
82
  }),
82
- /* @__PURE__ */ S("span", {
83
+ /* @__PURE__ */ C("span", {
83
84
  role: "status",
84
85
  "aria-live": "polite",
85
86
  className: "sr-only",
86
- children: g
87
+ children: v
87
88
  })
88
89
  ]
89
90
  });
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
- let [M, N] = y("");
92
- _(() => {
93
- e || N("");
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 ? 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
- isOpen: e,
98
- orientation: s.Right,
91
+ }), O = (e, t) => e.toLowerCase().includes(t.toLowerCase()), k = _(({ isOpen: t, onClose: n, uploaded: r, generated: s, sources: c, onAttachmentClick: l, onSourceClick: d, onDownloadAll: f, isMobile: h, defaultWidth: _, minWidth: x, maxWidth: E, onResizeStop: k, labels: A, styles: j, title: M, additionalSections: N }) => {
92
+ let [P, F] = b(""), I = (e) => {
93
+ F(e ?? "");
94
+ };
95
+ v(() => {
96
+ t || F("");
97
+ }, [t]);
98
+ let L = y(() => P ? r.filter((e) => O(e.name, P)) : r, [r, P]), R = y(() => P ? s.filter((e) => O(e.name, P)) : s, [s, P]), z = y(() => P ? c.filter((e) => O(e.title, P) || O(e.url, P) || e.quote != null && O(e.quote, P)) : c, [c, P]), B = r.length > 0 || s.length > 0 || c.length > 0, V = !B && !N, H = P !== "" && L.length === 0 && R.length === 0 && z.length === 0, U;
99
+ return U = V ? /* @__PURE__ */ C("div", {
100
+ className: "flex h-full items-center justify-center",
101
+ children: /* @__PURE__ */ C(p, { title: A.noDataLabel })
102
+ }) : /* @__PURE__ */ w(S, { children: [N, H ? /* @__PURE__ */ C(i, { label: A.noResultsLabel }) : /* @__PURE__ */ w(S, { children: [
103
+ /* @__PURE__ */ C(T, {
104
+ attachments: L,
105
+ title: A.uploadedSectionTitle,
106
+ searchQuery: P,
107
+ titleClassName: j?.typography?.sectionTitleClassName,
108
+ onAttachmentClick: l,
109
+ attachmentClickLabel: A.attachmentClickLabel
110
+ }),
111
+ /* @__PURE__ */ C(T, {
112
+ attachments: R,
113
+ title: A.generatedSectionTitle,
114
+ searchQuery: P,
115
+ titleClassName: j?.typography?.sectionTitleClassName,
116
+ onAttachmentClick: l,
117
+ attachmentClickLabel: A.attachmentClickLabel
118
+ }),
119
+ /* @__PURE__ */ C(D, {
120
+ sources: z,
121
+ title: A.sourcesSectionTitle,
122
+ searchQuery: P,
123
+ typography: j?.typography,
124
+ colors: j?.colors,
125
+ copyLabel: A.copySourceLabel,
126
+ copiedLabel: A.sourceCopiedLabel,
127
+ onSourceClick: d
128
+ })
129
+ ] })] }), /* @__PURE__ */ w(o, {
130
+ isOpen: t,
131
+ orientation: a.Right,
99
132
  styles: {
100
- className: g && e ? "w-full" : void 0,
133
+ className: h && t ? "w-full" : void 0,
101
134
  bodyClassName: "flex flex-col overflow-hidden p-0"
102
135
  },
103
136
  labels: A,
137
+ title: M,
104
138
  onClose: n,
105
- resizable: !g,
106
- defaultWidth: b,
107
- minWidth: T,
108
- maxWidth: O,
139
+ resizable: !h,
140
+ defaultWidth: _,
141
+ minWidth: x,
142
+ maxWidth: E,
109
143
  onResizeStop: k,
110
- rightActions: !L && /* @__PURE__ */ S(f, {
111
- icon: /* @__PURE__ */ S(h, { ...t }),
144
+ rightActions: B && /* @__PURE__ */ C(u, {
145
+ icon: /* @__PURE__ */ C(g, { ...e }),
112
146
  "aria-label": A.downloadAllLabel,
113
147
  tooltipProps: { tooltip: A.downloadAllLabel },
114
- onClick: m,
115
- disabled: !m
148
+ onClick: f,
149
+ disabled: !f
116
150
  }),
117
151
  children: [
118
- !L && /* @__PURE__ */ S(o, {
119
- value: M,
120
- onChange: N,
121
- labels: {
152
+ B && /* @__PURE__ */ C("div", {
153
+ role: "search",
154
+ className: "px-3 py-2",
155
+ children: /* @__PURE__ */ C(m, {
156
+ value: P,
157
+ onChange: I,
122
158
  placeholder: A.searchPlaceholder,
123
- clearLabel: A.searchClearLabel
124
- }
159
+ clearLabel: A.searchClearLabel,
160
+ "aria-label": A.searchPlaceholder
161
+ })
125
162
  }),
126
- /* @__PURE__ */ S("span", {
163
+ /* @__PURE__ */ C("span", {
127
164
  role: "status",
128
165
  "aria-live": "polite",
129
166
  className: "sr-only",
130
- children: R ? A.noResultsLabel : ""
167
+ children: H ? A.noResultsLabel : ""
131
168
  }),
132
- /* @__PURE__ */ S("div", {
133
- className: "flex-1 overflow-y-auto p-4",
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: [
138
- /* @__PURE__ */ S(w, {
139
- attachments: P,
140
- title: A.uploadedSectionTitle,
141
- searchQuery: M,
142
- titleClassName: j?.typography?.sectionTitleClassName,
143
- onAttachmentClick: d,
144
- attachmentClickLabel: A.attachmentClickLabel
145
- }),
146
- /* @__PURE__ */ S(w, {
147
- attachments: F,
148
- title: A.generatedSectionTitle,
149
- searchQuery: M,
150
- titleClassName: j?.typography?.sectionTitleClassName,
151
- onAttachmentClick: d,
152
- attachmentClickLabel: A.attachmentClickLabel
153
- }),
154
- /* @__PURE__ */ S(E, {
155
- sources: I,
156
- title: A.sourcesSectionTitle,
157
- searchQuery: M,
158
- typography: j?.typography,
159
- colors: j?.colors,
160
- copyLabel: A.copySourceLabel,
161
- onSourceClick: p
162
- })
163
- ] })
169
+ /* @__PURE__ */ C("div", {
170
+ className: "flex-1 overflow-y-auto p-4 pt-0",
171
+ children: U
164
172
  })
165
173
  ]
166
174
  });
167
175
  });
168
176
  //#endregion
169
- export { O as ConversationSourcesPanel };
177
+ export { k 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 {
@@ -6,6 +7,8 @@ export interface ConversationSourcesPanelLabels {
6
7
  ariaLabel: string;
7
8
  /** Label for the close button. */
8
9
  closeLabel: string;
10
+ /** Accessible label for the panel's drag-to-resize handle. Defaults to `'Resize panel'`. */
11
+ resizeLabel?: string;
9
12
  /** Placeholder text shown inside the search input. */
10
13
  searchPlaceholder: string;
11
14
  /** Accessible label for the search input clear button. */
@@ -24,6 +27,8 @@ export interface ConversationSourcesPanelLabels {
24
27
  sourcesSectionTitle: string;
25
28
  /** Accessible label for each source's copy-URL button. */
26
29
  copySourceLabel: string;
30
+ /** Status message announced to assistive tech after a source URL is copied. Defaults to `'Link copied to clipboard'`. */
31
+ sourceCopiedLabel?: string;
27
32
  /** Label passed to each attachment card's action button. */
28
33
  attachmentClickLabel: string;
29
34
  }
@@ -82,5 +87,17 @@ export interface ConversationSourcesPanelProps {
82
87
  labels: ConversationSourcesPanelLabels;
83
88
  /** Optional typography and color class overrides for inner elements. */
84
89
  styles?: ConversationSourcesPanelStyles;
90
+ /**
91
+ * Overrides the panel header's title (passed through to the underlying
92
+ * `SidebarPanel`'s `title`). Omit to keep the panel's default (untitled)
93
+ * header.
94
+ */
95
+ title?: ReactNode;
96
+ /**
97
+ * Rendered inside the scrollable body, before the Uploaded Files, Generated
98
+ * Files, and Sources sections. A plain, host-agnostic slot — this component
99
+ * has no knowledge of what it contains.
100
+ */
101
+ additionalSections?: ReactNode;
85
102
  }
86
103
  //# 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,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;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"}
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,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C7D,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;IACxC;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,SAAS,CAAC;CAChC"}
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.99",
4
+ "version": "1.2.0-dev.1",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -9,20 +9,22 @@
9
9
  "types": "./index.d.ts",
10
10
  "exports": {
11
11
  "./package.json": "./package.json",
12
- "./styles.css": "./style.css",
12
+ "./styles.css": "./index.css",
13
13
  ".": {
14
14
  "types": "./index.d.ts",
15
15
  "import": "./index.js",
16
16
  "default": "./index.js"
17
17
  }
18
18
  },
19
+ "dependencies": {
20
+ "@tabler/icons-react": "^3.44.0",
21
+ "@epam/ai-dial-attachment-input": "1.2.0-dev.1",
22
+ "@epam/ai-dial-sidebar": "1.2.0-dev.1"
23
+ },
19
24
  "peerDependencies": {
20
- "react": "^19.0.0",
21
- "@tabler/icons-react": "^3.0.0",
22
- "@epam/ai-dial-chat-shared": "1.1.0-dev.99",
23
- "@epam/ai-dial-sidebar": "1.1.0-dev.99",
24
- "@epam/ai-dial-conversation-input": "1.1.0-dev.99",
25
- "@epam/ai-dial-ui-kit": "^0.13.0-dev.26"
25
+ "react": "^19.2.8",
26
+ "@epam/ai-dial-chat-shared": "1.2.0-dev.1",
27
+ "@epam/ai-dial-ui-kit": "^0.14.2"
26
28
  },
27
29
  "repository": {
28
30
  "type": "git",