@erpsquad/common 1.10.77 → 1.10.79
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/dist/chunks/{android-12-switch-CoMylrig.js → android-12-switch-BgFAxJ9x.js} +289 -229
- package/dist/chunks/{android-12-switch-CoMylrig.js.map → android-12-switch-BgFAxJ9x.js.map} +1 -1
- package/dist/chunks/{android-12-switch-CJmu5zpr.esm.js → android-12-switch-DoExcS1P.esm.js} +289 -229
- package/dist/chunks/{android-12-switch-CJmu5zpr.esm.js.map → android-12-switch-DoExcS1P.esm.js.map} +1 -1
- package/dist/chunks/{appbar-DELlMlbx.esm.js → appbar-D1L6GTYk.esm.js} +30 -25
- package/dist/chunks/appbar-D1L6GTYk.esm.js.map +1 -0
- package/dist/chunks/{appbar-xuAwm7L1.js → appbar-D424Z-Ai.js} +30 -25
- package/dist/chunks/appbar-D424Z-Ai.js.map +1 -0
- package/dist/chunks/{default-data-Bhdk8Rkn.esm.js → default-data-CdhwU3H3.esm.js} +3 -3
- package/dist/chunks/{default-data-Bhdk8Rkn.esm.js.map → default-data-CdhwU3H3.esm.js.map} +1 -1
- package/dist/chunks/{default-data-C_eEc8KO.js → default-data-Cgb7xKe1.js} +3 -3
- package/dist/chunks/{default-data-C_eEc8KO.js.map → default-data-Cgb7xKe1.js.map} +1 -1
- package/dist/chunks/{fullScreen-B0QUzNj3.js → fullScreen-BUbaMxdQ.js} +2 -2
- package/dist/chunks/{fullScreen-B0QUzNj3.js.map → fullScreen-BUbaMxdQ.js.map} +1 -1
- package/dist/chunks/{fullScreen-C8dcx8pG.esm.js → fullScreen-COa9H9T5.esm.js} +2 -2
- package/dist/chunks/{fullScreen-C8dcx8pG.esm.js.map → fullScreen-COa9H9T5.esm.js.map} +1 -1
- package/dist/chunks/{sidebar-fZ9vocVX.esm.js → sidebar-D5jsYGs8.esm.js} +2 -2
- package/dist/chunks/{sidebar-fZ9vocVX.esm.js.map → sidebar-D5jsYGs8.esm.js.map} +1 -1
- package/dist/chunks/{sidebar-BC824FOR.js → sidebar-DvPIFrpF.js} +2 -2
- package/dist/chunks/{sidebar-BC824FOR.js.map → sidebar-DvPIFrpF.js.map} +1 -1
- package/dist/chunks/{sidebarScreen--NIbnhIf.esm.js → sidebarScreen-B4RSyJAT.esm.js} +3 -3
- package/dist/chunks/{sidebarScreen--NIbnhIf.esm.js.map → sidebarScreen-B4RSyJAT.esm.js.map} +1 -1
- package/dist/chunks/{sidebarScreen-B08K08t5.js → sidebarScreen-CFDnYrtL.js} +3 -3
- package/dist/chunks/{sidebarScreen-B08K08t5.js.map → sidebarScreen-CFDnYrtL.js.map} +1 -1
- package/dist/chunks/{uom-field-wrapper-BmRhzpUZ.js → uom-field-wrapper-DGt-0_BI.js} +359 -221
- package/dist/chunks/{uom-field-wrapper-BmRhzpUZ.js.map → uom-field-wrapper-DGt-0_BI.js.map} +1 -1
- package/dist/chunks/{uom-field-wrapper-GQYKNbtK.esm.js → uom-field-wrapper-_O6BmPp4.esm.js} +360 -222
- package/dist/chunks/{uom-field-wrapper-GQYKNbtK.esm.js.map → uom-field-wrapper-_O6BmPp4.esm.js.map} +1 -1
- package/dist/components/chat-bot/doc-intro.d.ts +4 -2
- package/dist/components/index.esm.js +4 -4
- package/dist/components/index.js +4 -4
- package/dist/components/material-table/components/inline-edit-fields.d.ts +9 -9
- package/dist/index.esm.js +7 -7
- package/dist/index.js +7 -7
- package/dist/layout/index.esm.js +2 -2
- package/dist/layout/index.js +2 -2
- package/dist/src/components/chat-bot/doc-intro.d.ts +4 -2
- package/dist/src/components/material-table/components/inline-edit-fields.d.ts +9 -9
- package/dist/style.css +10 -1
- package/dist/views/index.esm.js +5 -5
- package/dist/views/index.js +4 -4
- package/package.json +1 -1
- package/dist/chunks/appbar-DELlMlbx.esm.js.map +0 -1
- package/dist/chunks/appbar-xuAwm7L1.js.map +0 -1
|
@@ -1103,24 +1103,28 @@ const DocStatus = ({ document: document2, onReady, onError, getStatus }) => {
|
|
|
1103
1103
|
] })
|
|
1104
1104
|
] });
|
|
1105
1105
|
};
|
|
1106
|
-
const DocIntro = ({ document: document2, onSuggestion }) => {
|
|
1107
|
-
|
|
1108
|
-
|
|
1106
|
+
const DocIntro = ({ document: document2, documents, suggestedQuestions, onSuggestion }) => {
|
|
1107
|
+
const docsToRender = documents && documents.length > 0 ? documents : document2 ? [document2] : [];
|
|
1108
|
+
const questionsToRender = suggestedQuestions && suggestedQuestions.length > 0 ? suggestedQuestions : document2 == null ? void 0 : document2.suggested_questions;
|
|
1109
|
+
if (docsToRender.length === 0) return null;
|
|
1110
|
+
if (!docsToRender.some((d) => d.summary) && !(questionsToRender == null ? void 0 : questionsToRender.length)) return null;
|
|
1109
1111
|
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "chatBot--doc-intro-card", children: [
|
|
1110
|
-
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", {
|
|
1111
|
-
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.
|
|
1112
|
-
|
|
1113
|
-
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1112
|
+
docsToRender.map((doc, idx) => /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { style: { borderBottom: idx < docsToRender.length - 1 && docsToRender.length > 1 ? "1px solid #F2F3F4" : "none" }, children: [
|
|
1113
|
+
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "chatBot--doc-intro-head", children: [
|
|
1114
|
+
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(iconsMaterial.PictureAsPdfRounded, { sx: { fontSize: 16, color: "#C62828" } }),
|
|
1115
|
+
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "chatBot--doc-intro-head-info", children: [
|
|
1116
|
+
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("span", { className: "chatBot--doc-intro-filename", children: doc.filename }),
|
|
1117
|
+
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("span", { className: "chatBot--doc-intro-meta", children: doc.category && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(jsxRuntime.jsxRuntimeExports.Fragment, { children: [
|
|
1118
|
+
doc.category,
|
|
1119
|
+
doc.sub_category ? ` · ${doc.sub_category}` : ""
|
|
1120
|
+
] }) })
|
|
1121
|
+
] })
|
|
1122
|
+
] }),
|
|
1123
|
+
doc.summary && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("div", { className: "chatBot--doc-intro-summary", children: doc.summary })
|
|
1124
|
+
] }, doc.doc_id || idx)),
|
|
1125
|
+
questionsToRender && questionsToRender.length > 0 && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "chatBot--doc-intro-questions", children: [
|
|
1122
1126
|
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("div", { className: "chatBot--doc-intro-q-label", children: "Suggested questions" }),
|
|
1123
|
-
|
|
1127
|
+
questionsToRender.map((q, i) => /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("button", { className: "chatBot--doc-intro-q-btn", onClick: () => onSuggestion(q), children: q }, i))
|
|
1124
1128
|
] })
|
|
1125
1129
|
] });
|
|
1126
1130
|
};
|
|
@@ -1152,6 +1156,7 @@ const ChatBot = () => {
|
|
|
1152
1156
|
const [docError, setDocError] = React.useState(null);
|
|
1153
1157
|
const [activeDocuments, setActiveDocuments] = React.useState([]);
|
|
1154
1158
|
const [suggestedQuestions, setSuggestedQuestions] = React.useState([]);
|
|
1159
|
+
const fetchedMultiDocIntroIds = React.useRef("");
|
|
1155
1160
|
const firstName = (user == null ? void 0 : user.first_name) || "";
|
|
1156
1161
|
const filteredMessages = React.useMemo(
|
|
1157
1162
|
() => messages.filter((m) => !m.mode || m.mode === mode),
|
|
@@ -1187,7 +1192,7 @@ const ChatBot = () => {
|
|
|
1187
1192
|
if (!userScrolledUp.current && bodyRef.current) {
|
|
1188
1193
|
bodyRef.current.scrollTop = bodyRef.current.scrollHeight;
|
|
1189
1194
|
}
|
|
1190
|
-
}, [messages, isTyping, currentFieldUpdates, resolvedLabels]);
|
|
1195
|
+
}, [messages, isTyping, currentFieldUpdates, resolvedLabels, activeDocument, activeDocuments, suggestedQuestions]);
|
|
1191
1196
|
const selectCommand = (id) => {
|
|
1192
1197
|
setMode(id);
|
|
1193
1198
|
setShowSlashMenu(false);
|
|
@@ -1336,8 +1341,9 @@ const ChatBot = () => {
|
|
|
1336
1341
|
const checkAndSendMultiDocIntro = React.useCallback((docs) => {
|
|
1337
1342
|
if (docs.length === 0) return;
|
|
1338
1343
|
if (docs.some((d) => d.status !== "ready")) return;
|
|
1339
|
-
|
|
1340
|
-
|
|
1344
|
+
const currentIds = docs.map((d) => d.doc_id).sort().join(",");
|
|
1345
|
+
if (fetchedMultiDocIntroIds.current === currentIds) return;
|
|
1346
|
+
fetchedMultiDocIntroIds.current = currentIds;
|
|
1341
1347
|
api.streamV1CopilotChat(
|
|
1342
1348
|
{ ...common.getToken(), query: "", doc_ids: docs.map((d) => d.doc_id), doc_intro: true },
|
|
1343
1349
|
() => {
|
|
@@ -1452,6 +1458,7 @@ const ChatBot = () => {
|
|
|
1452
1458
|
setDocIntroSent(false);
|
|
1453
1459
|
setDocError(null);
|
|
1454
1460
|
setSuggestedQuestions([]);
|
|
1461
|
+
fetchedMultiDocIntroIds.current = "";
|
|
1455
1462
|
} catch {
|
|
1456
1463
|
setDocError("Failed to delete document(s). Please try again.");
|
|
1457
1464
|
}
|
|
@@ -1812,6 +1819,7 @@ const ChatBot = () => {
|
|
|
1812
1819
|
setActiveDocuments([]);
|
|
1813
1820
|
setSuggestedQuestions([]);
|
|
1814
1821
|
setMessages([]);
|
|
1822
|
+
fetchedMultiDocIntroIds.current = "";
|
|
1815
1823
|
}
|
|
1816
1824
|
}
|
|
1817
1825
|
),
|
|
@@ -1836,11 +1844,8 @@ const ChatBot = () => {
|
|
|
1836
1844
|
activeDocuments.length > 0 && mode === "doc_qa" && activeDocuments.every((d) => d.status === "ready") && !docIntroSent && filteredMessages.length === 0 && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
1837
1845
|
DocIntro,
|
|
1838
1846
|
{
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
summary: activeDocuments.length === 1 ? activeDocuments[0].summary : "Multiple documents are ready for Q&A.",
|
|
1842
|
-
suggested_questions: suggestedQuestions.length > 0 ? suggestedQuestions : activeDocuments[0].suggested_questions
|
|
1843
|
-
},
|
|
1847
|
+
documents: activeDocuments,
|
|
1848
|
+
suggestedQuestions: suggestedQuestions.length > 0 ? suggestedQuestions : activeDocuments[0].suggested_questions,
|
|
1844
1849
|
onSuggestion: (q) => {
|
|
1845
1850
|
setDocIntroSent(true);
|
|
1846
1851
|
setInputValue(q);
|
|
@@ -10144,4 +10149,4 @@ exports.resolveComponentProps = resolveComponentProps;
|
|
|
10144
10149
|
exports.useRtl = useRtl;
|
|
10145
10150
|
exports.useSlotProps = useSlotProps;
|
|
10146
10151
|
exports.useTheme = useTheme;
|
|
10147
|
-
//# sourceMappingURL=appbar-
|
|
10152
|
+
//# sourceMappingURL=appbar-D424Z-Ai.js.map
|