@epam/ai-dial-source-panel 1.1.0-dev.134 → 1.1.0-dev.138
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":"AAiBA,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":"AAiBA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,+CAA+C,CAAC;;AA6KnG,wBAA8C"}
|
package/index.js
CHANGED
|
@@ -86,57 +86,59 @@ var C = h(({ attachments: e, title: t, searchQuery: n, titleClassName: i = "dial
|
|
|
86
86
|
})
|
|
87
87
|
]
|
|
88
88
|
});
|
|
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 }) => {
|
|
90
|
-
let [
|
|
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
91
|
g(() => {
|
|
92
|
-
t ||
|
|
92
|
+
t || F("");
|
|
93
93
|
}, [t]);
|
|
94
|
-
let
|
|
95
|
-
return
|
|
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
96
|
className: "flex h-full items-center justify-center",
|
|
97
97
|
children: /* @__PURE__ */ x(l, { title: A.noDataLabel })
|
|
98
|
-
}) :
|
|
98
|
+
}) : /* @__PURE__ */ S(b, { children: [N, V ? /* @__PURE__ */ x(i, { label: A.noResultsLabel }) : /* @__PURE__ */ S(b, { children: [
|
|
99
99
|
/* @__PURE__ */ x(C, {
|
|
100
|
-
attachments:
|
|
100
|
+
attachments: I,
|
|
101
101
|
title: A.uploadedSectionTitle,
|
|
102
|
-
searchQuery:
|
|
102
|
+
searchQuery: P,
|
|
103
103
|
titleClassName: j?.typography?.sectionTitleClassName,
|
|
104
104
|
onAttachmentClick: f,
|
|
105
105
|
attachmentClickLabel: A.attachmentClickLabel
|
|
106
106
|
}),
|
|
107
107
|
/* @__PURE__ */ x(C, {
|
|
108
|
-
attachments:
|
|
108
|
+
attachments: L,
|
|
109
109
|
title: A.generatedSectionTitle,
|
|
110
|
-
searchQuery:
|
|
110
|
+
searchQuery: P,
|
|
111
111
|
titleClassName: j?.typography?.sectionTitleClassName,
|
|
112
112
|
onAttachmentClick: f,
|
|
113
113
|
attachmentClickLabel: A.attachmentClickLabel
|
|
114
114
|
}),
|
|
115
115
|
/* @__PURE__ */ x(T, {
|
|
116
|
-
sources:
|
|
116
|
+
sources: R,
|
|
117
117
|
title: A.sourcesSectionTitle,
|
|
118
|
-
searchQuery:
|
|
118
|
+
searchQuery: P,
|
|
119
119
|
typography: j?.typography,
|
|
120
120
|
colors: j?.colors,
|
|
121
121
|
copyLabel: A.copySourceLabel,
|
|
122
122
|
copiedLabel: A.sourceCopiedLabel,
|
|
123
123
|
onSourceClick: p
|
|
124
124
|
})
|
|
125
|
-
] }), /* @__PURE__ */ S(s, {
|
|
125
|
+
] })] }), /* @__PURE__ */ S(s, {
|
|
126
126
|
isOpen: t,
|
|
127
127
|
orientation: o.Right,
|
|
128
128
|
styles: {
|
|
129
129
|
className: y && t ? "w-full" : void 0,
|
|
130
|
-
bodyClassName: "flex flex-col overflow-hidden p-0"
|
|
130
|
+
bodyClassName: "flex flex-col overflow-hidden p-0",
|
|
131
|
+
headerClassName: "border-b border-tertiary"
|
|
131
132
|
},
|
|
132
133
|
labels: A,
|
|
134
|
+
title: M,
|
|
133
135
|
onClose: n,
|
|
134
136
|
resizable: !y,
|
|
135
137
|
defaultWidth: w,
|
|
136
138
|
minWidth: D,
|
|
137
139
|
maxWidth: O,
|
|
138
140
|
onResizeStop: k,
|
|
139
|
-
rightActions:
|
|
141
|
+
rightActions: z && /* @__PURE__ */ x(d, {
|
|
140
142
|
icon: /* @__PURE__ */ x(m, { ...e }),
|
|
141
143
|
"aria-label": A.downloadAllLabel,
|
|
142
144
|
tooltipProps: { tooltip: A.downloadAllLabel },
|
|
@@ -144,9 +146,9 @@ var C = h(({ attachments: e, title: t, searchQuery: n, titleClassName: i = "dial
|
|
|
144
146
|
disabled: !h
|
|
145
147
|
}),
|
|
146
148
|
children: [
|
|
147
|
-
|
|
148
|
-
value:
|
|
149
|
-
onChange:
|
|
149
|
+
z && /* @__PURE__ */ x(a, {
|
|
150
|
+
value: P,
|
|
151
|
+
onChange: F,
|
|
150
152
|
labels: {
|
|
151
153
|
placeholder: A.searchPlaceholder,
|
|
152
154
|
clearLabel: A.searchClearLabel
|
|
@@ -156,11 +158,11 @@ var C = h(({ attachments: e, title: t, searchQuery: n, titleClassName: i = "dial
|
|
|
156
158
|
role: "status",
|
|
157
159
|
"aria-live": "polite",
|
|
158
160
|
className: "sr-only",
|
|
159
|
-
children:
|
|
161
|
+
children: V ? A.noResultsLabel : ""
|
|
160
162
|
}),
|
|
161
163
|
/* @__PURE__ */ x("div", {
|
|
162
164
|
className: "flex-1 overflow-y-auto p-4",
|
|
163
|
-
children:
|
|
165
|
+
children: H
|
|
164
166
|
})
|
|
165
167
|
]
|
|
166
168
|
});
|
|
@@ -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 {
|
|
@@ -84,5 +85,17 @@ export interface ConversationSourcesPanelProps {
|
|
|
84
85
|
labels: ConversationSourcesPanelLabels;
|
|
85
86
|
/** Optional typography and color class overrides for inner elements. */
|
|
86
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;
|
|
87
100
|
}
|
|
88
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,qDA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D,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;
|
|
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,sDAAsD;IACtD,iBAAi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nE,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.
|
|
4
|
+
"version": "1.1.0-dev.138",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -19,9 +19,9 @@
|
|
|
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.
|
|
23
|
-
"@epam/ai-dial-sidebar": "1.1.0-dev.
|
|
24
|
-
"@epam/ai-dial-conversation-input": "1.1.0-dev.
|
|
22
|
+
"@epam/ai-dial-chat-shared": "1.1.0-dev.138",
|
|
23
|
+
"@epam/ai-dial-sidebar": "1.1.0-dev.138",
|
|
24
|
+
"@epam/ai-dial-conversation-input": "1.1.0-dev.138",
|
|
25
25
|
"@epam/ai-dial-ui-kit": "^0.13.0-dev.26"
|
|
26
26
|
},
|
|
27
27
|
"repository": {
|