@epam/ai-dial-source-panel 1.3.0-dev.309 → 1.3.0-dev.311
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":"AAwBA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,+CAA+C,CAAC;;
|
|
1
|
+
{"version":3,"file":"ConversationSourcesPanel.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationSourcesPanel/ConversationSourcesPanel.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,+CAA+C,CAAC;;AAoMnG,wBAA8C"}
|
package/index.js
CHANGED
|
@@ -95,99 +95,100 @@ var O = { panel: "dial-source-panel-panel" }, k = b(({ attachments: e, title: t,
|
|
|
95
95
|
})
|
|
96
96
|
]
|
|
97
97
|
});
|
|
98
|
-
}), M = (e, t) => e.toLowerCase().includes(t.toLowerCase()), N = b(({ isOpen: t, onClose: n, uploaded: r, generated: s, sources: c, onAttachmentClick: l, onSourceClick: d, onDownloadAll: f, isMobile: v,
|
|
99
|
-
let [
|
|
100
|
-
|
|
98
|
+
}), M = (e, t) => e.toLowerCase().includes(t.toLowerCase()), N = b(({ isOpen: t, onClose: n, uploaded: r, generated: s, sources: c, onAttachmentClick: l, onSourceClick: d, onDownloadAll: f, isMobile: v, isBoundedOverlay: b = !1, defaultWidth: w, minWidth: A, maxWidth: N, onResizeStop: P, labels: F, styles: I, title: L, additionalSections: R }) => {
|
|
99
|
+
let [z, B] = C(""), V = (e) => {
|
|
100
|
+
B(e ?? "");
|
|
101
101
|
};
|
|
102
102
|
x(() => {
|
|
103
|
-
t ||
|
|
103
|
+
t || B("");
|
|
104
104
|
}, [t]);
|
|
105
|
-
let
|
|
106
|
-
return
|
|
105
|
+
let H = S(() => z ? r.filter((e) => M(e.name, z)) : r, [r, z]), U = S(() => z ? s.filter((e) => M(e.name, z)) : s, [s, z]), W = S(() => z ? c.filter((e) => M(e.title, z) || M(e.url, z) || e.quote != null && M(e.quote, z)) : c, [c, z]), G = r.length > 0 || s.length > 0 || c.length > 0, K = !G && !R, q = z !== "" && H.length === 0 && U.length === 0 && W.length === 0, J;
|
|
106
|
+
return J = K ? /* @__PURE__ */ E("div", {
|
|
107
107
|
className: "flex h-full items-center justify-center",
|
|
108
108
|
children: /* @__PURE__ */ E(h, {
|
|
109
|
-
title:
|
|
110
|
-
description:
|
|
109
|
+
title: F.noDataLabel,
|
|
110
|
+
description: F.noDataDescription
|
|
111
111
|
})
|
|
112
|
-
}) : /* @__PURE__ */ D(T, { children: [
|
|
113
|
-
label:
|
|
114
|
-
description:
|
|
112
|
+
}) : /* @__PURE__ */ D(T, { children: [R, q ? /* @__PURE__ */ E(i, {
|
|
113
|
+
label: F.noResultsLabel,
|
|
114
|
+
description: F.noResultsDescription
|
|
115
115
|
}) : /* @__PURE__ */ D(T, { children: [
|
|
116
116
|
/* @__PURE__ */ E(k, {
|
|
117
|
-
attachments:
|
|
118
|
-
title:
|
|
119
|
-
searchQuery:
|
|
120
|
-
titleClassName:
|
|
121
|
-
className:
|
|
117
|
+
attachments: H,
|
|
118
|
+
title: F.uploadedSectionTitle,
|
|
119
|
+
searchQuery: z,
|
|
120
|
+
titleClassName: I?.typography?.sectionTitleClassName,
|
|
121
|
+
className: I?.sectionClassName,
|
|
122
122
|
onAttachmentClick: l,
|
|
123
|
-
attachmentClickLabel:
|
|
123
|
+
attachmentClickLabel: F.attachmentClickLabel
|
|
124
124
|
}),
|
|
125
125
|
/* @__PURE__ */ E(k, {
|
|
126
|
-
attachments:
|
|
127
|
-
title:
|
|
128
|
-
searchQuery:
|
|
129
|
-
titleClassName:
|
|
130
|
-
className:
|
|
126
|
+
attachments: U,
|
|
127
|
+
title: F.generatedSectionTitle,
|
|
128
|
+
searchQuery: z,
|
|
129
|
+
titleClassName: I?.typography?.sectionTitleClassName,
|
|
130
|
+
className: I?.sectionClassName,
|
|
131
131
|
onAttachmentClick: l,
|
|
132
|
-
attachmentClickLabel:
|
|
132
|
+
attachmentClickLabel: F.attachmentClickLabel
|
|
133
133
|
}),
|
|
134
134
|
/* @__PURE__ */ E(j, {
|
|
135
|
-
sources:
|
|
136
|
-
title:
|
|
137
|
-
searchQuery:
|
|
138
|
-
typography:
|
|
139
|
-
colors:
|
|
140
|
-
className:
|
|
141
|
-
copyLabel:
|
|
142
|
-
copiedLabel:
|
|
143
|
-
codeBlockCopyLabel:
|
|
144
|
-
codeBlockCopiedLabel:
|
|
145
|
-
codeBlockDownloadLabel:
|
|
146
|
-
tableScrollRegionAriaLabel:
|
|
147
|
-
mathScrollRegionAriaLabel:
|
|
135
|
+
sources: W,
|
|
136
|
+
title: F.sourcesSectionTitle,
|
|
137
|
+
searchQuery: z,
|
|
138
|
+
typography: I?.typography,
|
|
139
|
+
colors: I?.colors,
|
|
140
|
+
className: I?.sectionClassName,
|
|
141
|
+
copyLabel: F.copySourceLabel,
|
|
142
|
+
copiedLabel: F.sourceCopiedLabel,
|
|
143
|
+
codeBlockCopyLabel: F.codeBlockCopyLabel,
|
|
144
|
+
codeBlockCopiedLabel: F.codeBlockCopiedLabel,
|
|
145
|
+
codeBlockDownloadLabel: F.codeBlockDownloadLabel,
|
|
146
|
+
tableScrollRegionAriaLabel: F.tableScrollRegionAriaLabel,
|
|
147
|
+
mathScrollRegionAriaLabel: F.mathScrollRegionAriaLabel,
|
|
148
148
|
onSourceClick: d
|
|
149
149
|
})
|
|
150
150
|
] })] }), /* @__PURE__ */ D(o, {
|
|
151
151
|
isOpen: t,
|
|
152
|
+
isBoundedOverlay: b,
|
|
152
153
|
orientation: a.Right,
|
|
153
154
|
styles: {
|
|
154
|
-
className: _(v && t && "w-full", O.panel),
|
|
155
|
+
className: _(v && !b && t && "w-full", O.panel),
|
|
155
156
|
bodyClassName: "flex flex-col overflow-hidden p-0"
|
|
156
157
|
},
|
|
157
|
-
labels:
|
|
158
|
-
title:
|
|
158
|
+
labels: F,
|
|
159
|
+
title: L,
|
|
159
160
|
onClose: n,
|
|
160
|
-
resizable: !v,
|
|
161
|
-
defaultWidth:
|
|
162
|
-
minWidth:
|
|
163
|
-
maxWidth:
|
|
164
|
-
onResizeStop:
|
|
165
|
-
rightActions:
|
|
161
|
+
resizable: !v || b,
|
|
162
|
+
defaultWidth: w,
|
|
163
|
+
minWidth: A,
|
|
164
|
+
maxWidth: N,
|
|
165
|
+
onResizeStop: P,
|
|
166
|
+
rightActions: G && f && /* @__PURE__ */ E(u, {
|
|
166
167
|
icon: /* @__PURE__ */ E(y, { ...e }),
|
|
167
|
-
"aria-label":
|
|
168
|
-
tooltipProps: { tooltip:
|
|
168
|
+
"aria-label": F.downloadAllLabel,
|
|
169
|
+
tooltipProps: { tooltip: F.downloadAllLabel },
|
|
169
170
|
onClick: f
|
|
170
171
|
}),
|
|
171
172
|
children: [
|
|
172
|
-
|
|
173
|
+
G && /* @__PURE__ */ E("div", {
|
|
173
174
|
role: "search",
|
|
174
175
|
className: "px-3 py-2",
|
|
175
176
|
children: /* @__PURE__ */ E(g, {
|
|
176
|
-
value:
|
|
177
|
-
onChange:
|
|
178
|
-
placeholder:
|
|
179
|
-
clearLabel:
|
|
180
|
-
"aria-label":
|
|
177
|
+
value: z,
|
|
178
|
+
onChange: V,
|
|
179
|
+
placeholder: F.searchPlaceholder,
|
|
180
|
+
clearLabel: F.searchClearLabel,
|
|
181
|
+
"aria-label": F.searchPlaceholder
|
|
181
182
|
})
|
|
182
183
|
}),
|
|
183
184
|
/* @__PURE__ */ E(p, {
|
|
184
185
|
visuallyHidden: !0,
|
|
185
186
|
as: m.Span,
|
|
186
|
-
children:
|
|
187
|
+
children: q ? F.noResultsLabel : ""
|
|
187
188
|
}),
|
|
188
189
|
/* @__PURE__ */ E("div", {
|
|
189
190
|
className: "flex-1 overflow-y-auto p-4 pt-0",
|
|
190
|
-
children:
|
|
191
|
+
children: J
|
|
191
192
|
})
|
|
192
193
|
]
|
|
193
194
|
});
|
|
@@ -91,6 +91,8 @@ export interface ConversationSourcesPanelProps {
|
|
|
91
91
|
onDownloadAll?: () => void;
|
|
92
92
|
/** Whether the viewport is in mobile breakpoint (disables resizing). */
|
|
93
93
|
isMobile: boolean;
|
|
94
|
+
/** Opt into a bounded overlay without changing mobile content semantics. */
|
|
95
|
+
isBoundedOverlay?: boolean;
|
|
94
96
|
/** Initial panel width in pixels. */
|
|
95
97
|
defaultWidth?: number;
|
|
96
98
|
/** Minimum panel width in pixels. */
|
|
@@ -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,gEAAgE;IAChE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sDAAsD;IACtD,cAAc,EAAE,MAAM,CAAC;IACvB,mEAAmE;IACnE,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,yDAAyD;IACzD,gBAAgB,EAAE,MAAM,CAAC;IACzB,mDAAmD;IACnD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,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,uFAAuF;IACvF,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"}
|
|
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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AAC;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.3.0-dev.
|
|
4
|
+
"version": "1.3.0-dev.311",
|
|
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.50.0",
|
|
21
|
-
"@epam/ai-dial-attachment-input": "1.3.0-dev.
|
|
22
|
-
"@epam/ai-dial-sidebar": "1.3.0-dev.
|
|
21
|
+
"@epam/ai-dial-attachment-input": "1.3.0-dev.311",
|
|
22
|
+
"@epam/ai-dial-sidebar": "1.3.0-dev.311"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": "^19.2.8",
|
|
26
|
-
"@epam/ai-dial-chat-shared": "1.3.0-dev.
|
|
27
|
-
"@epam/ai-dial-ui-kit": "^0.16.0-dev.
|
|
26
|
+
"@epam/ai-dial-chat-shared": "1.3.0-dev.311",
|
|
27
|
+
"@epam/ai-dial-ui-kit": "^0.16.0-dev.71"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|
|
30
30
|
"type": "git",
|