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 CHANGED
@@ -307,6 +307,19 @@ const getTableRecords = async (payload, baseUrl, tableName) => {
307
307
  return null;
308
308
  }
309
309
  };
310
+ const getTableRecordsByUrl = async (payload, url) => {
311
+ try {
312
+ return axiosInstance({
313
+ url: url,
314
+ method: 'POST',
315
+ data: payload,
316
+ });
317
+ }
318
+ catch (error) {
319
+ console.error('getTableRecordsByUrl error:', error);
320
+ return null;
321
+ }
322
+ };
310
323
 
311
324
  const useBotConfiguration = (setRefreshLoader, setEnableRefreshAction, dispatch) => {
312
325
  const displaySnackMessages = React.useCallback((message, variant) => {
@@ -6365,7 +6378,7 @@ const TableContent = ({ bodyText }) => {
6365
6378
  if (lodash.isEmpty(bodyText)) {
6366
6379
  return null;
6367
6380
  }
6368
- 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;
6381
+ 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;
6369
6382
  const [columns, setColumns] = React.useState([]);
6370
6383
  const [rowData, setRowData] = React.useState([]);
6371
6384
  const [isModalOpen, setIsModalOpen] = React.useState(false);
@@ -6388,7 +6401,6 @@ const TableContent = ({ bodyText }) => {
6388
6401
  }, [row_data]);
6389
6402
  const serverSideManualCallBack = async (manualbody, pageIndex, params) => {
6390
6403
  try {
6391
- const baseUrl = sessionStorage.getItem("stepForm_baseUrl") || "";
6392
6404
  let limit = {
6393
6405
  page_size: page_size,
6394
6406
  page: pageIndex + 1,
@@ -6398,7 +6410,14 @@ const TableContent = ({ bodyText }) => {
6398
6410
  search: manualbody?.search,
6399
6411
  sort: manualbody?.sort
6400
6412
  };
6401
- const response = await getTableRecords(payload, baseUrl, table_name);
6413
+ let response;
6414
+ if (temp_table_url) {
6415
+ response = await getTableRecordsByUrl(payload, temp_table_url);
6416
+ }
6417
+ else {
6418
+ const baseUrl = sessionStorage.getItem("stepForm_baseUrl") || "";
6419
+ response = await getTableRecords(payload, baseUrl, table_name);
6420
+ }
6402
6421
  if (is_server_side || response?.data?.download_url) {
6403
6422
  setDownloadUrl(response.data.download_url);
6404
6423
  }
@@ -16670,6 +16689,9 @@ const SmartBot = (props) => {
16670
16689
  // subtree, so clicks in them look "outside". Don't collapse while open.
16671
16690
  if (renameOpen || deleteOpen)
16672
16691
  return;
16692
+ // Ignore clicks inside the expanded table modal portal
16693
+ if (e.target.closest?.(".test-modal"))
16694
+ return;
16673
16695
  collapseChatBotIfExpanded();
16674
16696
  };
16675
16697
  document.addEventListener("mousedown", handleOutsideInteraction, true);