impact-chatbot 2.3.94 → 2.3.96
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 +29 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +29 -6
- 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.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) => {
|
|
@@ -695,7 +708,8 @@ const parseResponse = (data, type, agentId = "", currentMode = "", disableTimeAn
|
|
|
695
708
|
isRequired: data?.data?.isRequired,
|
|
696
709
|
isDisabled: data?.data?.isDisabled,
|
|
697
710
|
isMulti: data?.data?.isMulti,
|
|
698
|
-
paramName: data?.data?.param_name
|
|
711
|
+
paramName: data?.data?.param_name,
|
|
712
|
+
is_static: data?.data?.is_static
|
|
699
713
|
}
|
|
700
714
|
};
|
|
701
715
|
case "datePicker":
|
|
@@ -6365,7 +6379,7 @@ const TableContent = ({ bodyText }) => {
|
|
|
6365
6379
|
if (lodash.isEmpty(bodyText)) {
|
|
6366
6380
|
return null;
|
|
6367
6381
|
}
|
|
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;
|
|
6382
|
+
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
6383
|
const [columns, setColumns] = React.useState([]);
|
|
6370
6384
|
const [rowData, setRowData] = React.useState([]);
|
|
6371
6385
|
const [isModalOpen, setIsModalOpen] = React.useState(false);
|
|
@@ -6388,7 +6402,6 @@ const TableContent = ({ bodyText }) => {
|
|
|
6388
6402
|
}, [row_data]);
|
|
6389
6403
|
const serverSideManualCallBack = async (manualbody, pageIndex, params) => {
|
|
6390
6404
|
try {
|
|
6391
|
-
const baseUrl = sessionStorage.getItem("stepForm_baseUrl") || "";
|
|
6392
6405
|
let limit = {
|
|
6393
6406
|
page_size: page_size,
|
|
6394
6407
|
page: pageIndex + 1,
|
|
@@ -6398,7 +6411,14 @@ const TableContent = ({ bodyText }) => {
|
|
|
6398
6411
|
search: manualbody?.search,
|
|
6399
6412
|
sort: manualbody?.sort
|
|
6400
6413
|
};
|
|
6401
|
-
|
|
6414
|
+
let response;
|
|
6415
|
+
if (temp_table_url) {
|
|
6416
|
+
response = await getTableRecordsByUrl(payload, temp_table_url);
|
|
6417
|
+
}
|
|
6418
|
+
else {
|
|
6419
|
+
const baseUrl = sessionStorage.getItem("stepForm_baseUrl") || "";
|
|
6420
|
+
response = await getTableRecords(payload, baseUrl, table_name);
|
|
6421
|
+
}
|
|
6402
6422
|
if (is_server_side || response?.data?.download_url) {
|
|
6403
6423
|
setDownloadUrl(response.data.download_url);
|
|
6404
6424
|
}
|
|
@@ -7385,7 +7405,7 @@ const SelectContent = ({ bodyText, isFormDisabled = false, messageIndex }) => {
|
|
|
7385
7405
|
const dispatch = reactRedux.useDispatch();
|
|
7386
7406
|
// Cross-filter cascading context (optional — graceful fallback when not wrapped)
|
|
7387
7407
|
const crossFilterCtx = useCrossFilterContext();
|
|
7388
|
-
const isCascading = crossFilterCtx?.isEnabled && paramName;
|
|
7408
|
+
const isCascading = crossFilterCtx?.isEnabled && paramName && !bodyText?.is_static;
|
|
7389
7409
|
const isMountedRef = React.useRef(false);
|
|
7390
7410
|
if (lodash.isEmpty(bodyText))
|
|
7391
7411
|
return null;
|
|
@@ -8142,7 +8162,7 @@ const StepFormContent = ({ formData, messageIndex = 0, isFormDisabled = false, s
|
|
|
8142
8162
|
if (!formData || !Array.isArray(formData))
|
|
8143
8163
|
return [];
|
|
8144
8164
|
const configs = formData
|
|
8145
|
-
.filter((item) => item?.type === "select" && item?.data?.param_name)
|
|
8165
|
+
.filter((item) => item?.type === "select" && item?.data?.param_name && !item?.data?.is_static)
|
|
8146
8166
|
.map((item) => {
|
|
8147
8167
|
const data = item.data;
|
|
8148
8168
|
const paramName = data.param_name;
|
|
@@ -16670,6 +16690,9 @@ const SmartBot = (props) => {
|
|
|
16670
16690
|
// subtree, so clicks in them look "outside". Don't collapse while open.
|
|
16671
16691
|
if (renameOpen || deleteOpen)
|
|
16672
16692
|
return;
|
|
16693
|
+
// Ignore clicks inside the expanded table modal portal
|
|
16694
|
+
if (e.target.closest?.(".test-modal"))
|
|
16695
|
+
return;
|
|
16673
16696
|
collapseChatBotIfExpanded();
|
|
16674
16697
|
};
|
|
16675
16698
|
document.addEventListener("mousedown", handleOutsideInteraction, true);
|