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.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) => {
|
|
@@ -673,7 +686,8 @@ const parseResponse = (data, type, agentId = "", currentMode = "", disableTimeAn
|
|
|
673
686
|
isRequired: data?.data?.isRequired,
|
|
674
687
|
isDisabled: data?.data?.isDisabled,
|
|
675
688
|
isMulti: data?.data?.isMulti,
|
|
676
|
-
paramName: data?.data?.param_name
|
|
689
|
+
paramName: data?.data?.param_name,
|
|
690
|
+
is_static: data?.data?.is_static
|
|
677
691
|
}
|
|
678
692
|
};
|
|
679
693
|
case "datePicker":
|
|
@@ -6343,7 +6357,7 @@ const TableContent = ({ bodyText }) => {
|
|
|
6343
6357
|
if (isEmpty$1(bodyText)) {
|
|
6344
6358
|
return null;
|
|
6345
6359
|
}
|
|
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;
|
|
6360
|
+
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
6361
|
const [columns, setColumns] = useState([]);
|
|
6348
6362
|
const [rowData, setRowData] = useState([]);
|
|
6349
6363
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
@@ -6366,7 +6380,6 @@ const TableContent = ({ bodyText }) => {
|
|
|
6366
6380
|
}, [row_data]);
|
|
6367
6381
|
const serverSideManualCallBack = async (manualbody, pageIndex, params) => {
|
|
6368
6382
|
try {
|
|
6369
|
-
const baseUrl = sessionStorage.getItem("stepForm_baseUrl") || "";
|
|
6370
6383
|
let limit = {
|
|
6371
6384
|
page_size: page_size,
|
|
6372
6385
|
page: pageIndex + 1,
|
|
@@ -6376,7 +6389,14 @@ const TableContent = ({ bodyText }) => {
|
|
|
6376
6389
|
search: manualbody?.search,
|
|
6377
6390
|
sort: manualbody?.sort
|
|
6378
6391
|
};
|
|
6379
|
-
|
|
6392
|
+
let response;
|
|
6393
|
+
if (temp_table_url) {
|
|
6394
|
+
response = await getTableRecordsByUrl(payload, temp_table_url);
|
|
6395
|
+
}
|
|
6396
|
+
else {
|
|
6397
|
+
const baseUrl = sessionStorage.getItem("stepForm_baseUrl") || "";
|
|
6398
|
+
response = await getTableRecords(payload, baseUrl, table_name);
|
|
6399
|
+
}
|
|
6380
6400
|
if (is_server_side || response?.data?.download_url) {
|
|
6381
6401
|
setDownloadUrl(response.data.download_url);
|
|
6382
6402
|
}
|
|
@@ -7363,7 +7383,7 @@ const SelectContent = ({ bodyText, isFormDisabled = false, messageIndex }) => {
|
|
|
7363
7383
|
const dispatch = useDispatch();
|
|
7364
7384
|
// Cross-filter cascading context (optional — graceful fallback when not wrapped)
|
|
7365
7385
|
const crossFilterCtx = useCrossFilterContext();
|
|
7366
|
-
const isCascading = crossFilterCtx?.isEnabled && paramName;
|
|
7386
|
+
const isCascading = crossFilterCtx?.isEnabled && paramName && !bodyText?.is_static;
|
|
7367
7387
|
const isMountedRef = useRef(false);
|
|
7368
7388
|
if (isEmpty$1(bodyText))
|
|
7369
7389
|
return null;
|
|
@@ -8120,7 +8140,7 @@ const StepFormContent = ({ formData, messageIndex = 0, isFormDisabled = false, s
|
|
|
8120
8140
|
if (!formData || !Array.isArray(formData))
|
|
8121
8141
|
return [];
|
|
8122
8142
|
const configs = formData
|
|
8123
|
-
.filter((item) => item?.type === "select" && item?.data?.param_name)
|
|
8143
|
+
.filter((item) => item?.type === "select" && item?.data?.param_name && !item?.data?.is_static)
|
|
8124
8144
|
.map((item) => {
|
|
8125
8145
|
const data = item.data;
|
|
8126
8146
|
const paramName = data.param_name;
|
|
@@ -16648,6 +16668,9 @@ const SmartBot = (props) => {
|
|
|
16648
16668
|
// subtree, so clicks in them look "outside". Don't collapse while open.
|
|
16649
16669
|
if (renameOpen || deleteOpen)
|
|
16650
16670
|
return;
|
|
16671
|
+
// Ignore clicks inside the expanded table modal portal
|
|
16672
|
+
if (e.target.closest?.(".test-modal"))
|
|
16673
|
+
return;
|
|
16651
16674
|
collapseChatBotIfExpanded();
|
|
16652
16675
|
};
|
|
16653
16676
|
document.addEventListener("mousedown", handleOutsideInteraction, true);
|