impact-chatbot 2.3.94 → 2.3.95
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/index.cjs.js +25 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +25 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/services/chatbot-services.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -285,6 +285,19 @@ const getTableRecords = async (payload, baseUrl, tableName) => {
|
|
|
285
285
|
return null;
|
|
286
286
|
}
|
|
287
287
|
};
|
|
288
|
+
const getTableRecordsByUrl = async (payload, url) => {
|
|
289
|
+
try {
|
|
290
|
+
return axiosInstance({
|
|
291
|
+
url: url,
|
|
292
|
+
method: 'POST',
|
|
293
|
+
data: payload,
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
catch (error) {
|
|
297
|
+
console.error('getTableRecordsByUrl error:', error);
|
|
298
|
+
return null;
|
|
299
|
+
}
|
|
300
|
+
};
|
|
288
301
|
|
|
289
302
|
const useBotConfiguration = (setRefreshLoader, setEnableRefreshAction, dispatch) => {
|
|
290
303
|
const displaySnackMessages = useCallback((message, variant) => {
|
|
@@ -6343,7 +6356,7 @@ const TableContent = ({ bodyText }) => {
|
|
|
6343
6356
|
if (isEmpty$1(bodyText)) {
|
|
6344
6357
|
return null;
|
|
6345
6358
|
}
|
|
6346
|
-
const { table_config, row_data, display_name = "", unique_id, select_all_component, table_name, hide_table_setting = false, is_server_side = false, page_size = 10, } = bodyText;
|
|
6359
|
+
const { table_config, row_data, display_name = "", unique_id, select_all_component, table_name, hide_table_setting = false, is_server_side = false, page_size = 10, temp_table_url, } = bodyText;
|
|
6347
6360
|
const [columns, setColumns] = useState([]);
|
|
6348
6361
|
const [rowData, setRowData] = useState([]);
|
|
6349
6362
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
@@ -6366,7 +6379,6 @@ const TableContent = ({ bodyText }) => {
|
|
|
6366
6379
|
}, [row_data]);
|
|
6367
6380
|
const serverSideManualCallBack = async (manualbody, pageIndex, params) => {
|
|
6368
6381
|
try {
|
|
6369
|
-
const baseUrl = sessionStorage.getItem("stepForm_baseUrl") || "";
|
|
6370
6382
|
let limit = {
|
|
6371
6383
|
page_size: page_size,
|
|
6372
6384
|
page: pageIndex + 1,
|
|
@@ -6376,7 +6388,14 @@ const TableContent = ({ bodyText }) => {
|
|
|
6376
6388
|
search: manualbody?.search,
|
|
6377
6389
|
sort: manualbody?.sort
|
|
6378
6390
|
};
|
|
6379
|
-
|
|
6391
|
+
let response;
|
|
6392
|
+
if (temp_table_url) {
|
|
6393
|
+
response = await getTableRecordsByUrl(payload, temp_table_url);
|
|
6394
|
+
}
|
|
6395
|
+
else {
|
|
6396
|
+
const baseUrl = sessionStorage.getItem("stepForm_baseUrl") || "";
|
|
6397
|
+
response = await getTableRecords(payload, baseUrl, table_name);
|
|
6398
|
+
}
|
|
6380
6399
|
if (is_server_side || response?.data?.download_url) {
|
|
6381
6400
|
setDownloadUrl(response.data.download_url);
|
|
6382
6401
|
}
|
|
@@ -16648,6 +16667,9 @@ const SmartBot = (props) => {
|
|
|
16648
16667
|
// subtree, so clicks in them look "outside". Don't collapse while open.
|
|
16649
16668
|
if (renameOpen || deleteOpen)
|
|
16650
16669
|
return;
|
|
16670
|
+
// Ignore clicks inside the expanded table modal portal
|
|
16671
|
+
if (e.target.closest?.(".test-modal"))
|
|
16672
|
+
return;
|
|
16651
16673
|
collapseChatBotIfExpanded();
|
|
16652
16674
|
};
|
|
16653
16675
|
document.addEventListener("mousedown", handleOutsideInteraction, true);
|