impact-chatbot 2.3.70 → 2.3.72

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.esm.js CHANGED
@@ -233,11 +233,12 @@ const getFilterOptions = (postBody) => async () => {
233
233
  data: postBody,
234
234
  });
235
235
  };
236
- const getTableRecords = async (baseUrl, tableName, page, pageSize) => {
236
+ const getTableRecords = async (payload, baseUrl, tableName) => {
237
237
  try {
238
238
  return axiosInstance({
239
- url: `${baseUrl}/chatbot/agent/tabular-data/${tableName}?page=${page}&page_size=${pageSize}`,
240
- method: 'GET',
239
+ url: `${baseUrl}/chatbot/agent/tabular-data/${tableName}`,
240
+ method: 'POST',
241
+ data: payload,
241
242
  });
242
243
  }
243
244
  catch (error) {
@@ -5857,7 +5858,16 @@ const TableContent = ({ bodyText }) => {
5857
5858
  const serverSideManualCallBack = async (manualbody, pageIndex, params) => {
5858
5859
  try {
5859
5860
  const baseUrl = sessionStorage.getItem("stepForm_baseUrl") || "";
5860
- const response = await getTableRecords(baseUrl, table_name, pageIndex + 1, page_size);
5861
+ let limit = {
5862
+ page_size: page_size,
5863
+ page: pageIndex + 1,
5864
+ };
5865
+ let payload = {
5866
+ limit,
5867
+ search: manualbody?.search,
5868
+ sort: manualbody?.sort
5869
+ };
5870
+ const response = await getTableRecords(payload, baseUrl, table_name);
5861
5871
  if (is_server_side || response?.data?.download_url) {
5862
5872
  setDownloadUrl(response.data.download_url);
5863
5873
  }
@@ -5910,12 +5920,12 @@ const TableContent = ({ bodyText }) => {
5910
5920
  const handleModalClose = () => {
5911
5921
  setIsModalOpen(false);
5912
5922
  };
5913
- return (jsxs(Fragment, { children: [jsx(Modal, { className: "test-modal", onClose: handleModalClose, onPrimaryButtonClick: () => { }, onSecondaryButtonClick: handleModalClose, open: isModalOpen, size: "large", title: "", children: jsx("div", { style: { width: '100%', height: '70vh' }, children: jsx(AgGridComponent, { columns: columns, rowdata: is_server_side ? null : rowData, pagination: true, paginationPageSize: is_server_side ? page_size : 20, suppressFieldDotNotation: true, domLayout: "normal", sizeColumnsToFitFlag: true, showSaveTableConfig: false, showSearchModalBtn: false, hideFormatSideBar: true, uniqueRowId: unique_id, selectAllHeaderComponent: select_all_component, onSelectionChanged: onSelectionChanged, hideTableSetting: hide_table_setting, downloadAsExcel: is_server_side ? false : true, tableHeader: display_name, ...(is_server_side && {
5923
+ return (jsxs(Fragment, { children: [jsx(Modal, { className: "test-modal", onClose: handleModalClose, onPrimaryButtonClick: () => { }, onSecondaryButtonClick: handleModalClose, open: isModalOpen, size: "large", title: "", children: jsx("div", { style: { width: '100%', height: '70vh' }, children: jsx(AgGridComponent, { columns: columns, rowdata: is_server_side ? null : rowData, pagination: true, paginationPageSize: is_server_side ? page_size : 20, suppressFieldDotNotation: true, domLayout: "normal", sizeColumnsToFitFlag: true, showSaveTableConfig: false, showSearchModalBtn: true, hideFormatSideBar: true, uniqueRowId: unique_id, selectAllHeaderComponent: select_all_component, onSelectionChanged: onSelectionChanged, hideTableSetting: hide_table_setting, downloadAsExcel: is_server_side ? false : true, tableHeader: display_name, hideTableActions: true, isSaveViewEnabled: false, ...(is_server_side && {
5914
5924
  manualCallBack: serverSideManualCallBack,
5915
5925
  rowModelType: "serverSide",
5916
5926
  serverSideStoreType: "partial",
5917
5927
  cacheBlockSize: page_size,
5918
- }) }) }) }), jsx("div", { style: { width: '100%', marginTop: '10px' }, children: jsx(AgGridComponent, { columns: columns, rowdata: is_server_side ? null : rowData, pagination: true, paginationPageSize: is_server_side ? page_size : 10, suppressFieldDotNotation: true, domLayout: "autoHeight", customClass: "bot_table_auto_height", sizeColumnsToFitFlag: true, showSaveTableConfig: false, showSearchModalBtn: false, hideFormatSideBar: true, uniqueRowId: unique_id, selectAllHeaderComponent: select_all_component, onSelectionChanged: onSelectionChanged, hideTableSetting: hide_table_setting, customSystemButton: getTopRightOptions(), customSystemButtonWithDownload: !is_server_side, topRightOptions: null, downloadAsExcel: is_server_side ? false : true, tableHeader: display_name, ...(is_server_side && {
5928
+ }) }) }) }), jsx("div", { style: { width: '100%', marginTop: '10px' }, children: jsx(AgGridComponent, { columns: columns, rowdata: is_server_side ? null : rowData, pagination: true, paginationPageSize: is_server_side ? page_size : 10, suppressFieldDotNotation: true, domLayout: "autoHeight", customClass: "bot_table_auto_height", sizeColumnsToFitFlag: true, showSaveTableConfig: false, showSearchModalBtn: true, hideFormatSideBar: true, uniqueRowId: unique_id, selectAllHeaderComponent: select_all_component, onSelectionChanged: onSelectionChanged, hideTableSetting: hide_table_setting, customSystemButton: getTopRightOptions(), customSystemButtonWithDownload: !is_server_side, topRightOptions: null, downloadAsExcel: is_server_side ? false : true, tableHeader: display_name, hideTableActions: true, isSaveViewEnabled: false, ...(is_server_side && {
5919
5929
  manualCallBack: serverSideManualCallBack,
5920
5930
  rowModelType: "serverSide",
5921
5931
  serverSideStoreType: "partial",
@@ -6598,9 +6608,11 @@ const CrossFilterProvider = ({ filters, fetchOptionsFn, initialSelections = {},
6598
6608
  * @param {Array} existingSelections - Upstream filter selections
6599
6609
  * Each item: { filterName, attributeName, values, checkAll }
6600
6610
  * @param {Array} allFilters - Full array of all filter configs
6611
+ * @param {Object|null} preSelectedFilters - Optional pre-selected filters from init response
6612
+ * Format: { param_name: { values: [...], label, dimension, is_mandatory } }
6601
6613
  * @returns {Promise<Array<{label, value}>>} - Formatted options
6602
6614
  */
6603
- const fetchCrossFilterOptions = async (filterConfig, existingSelections = [], allFilters = []) => {
6615
+ const fetchCrossFilterOptions = async (filterConfig, existingSelections = [], allFilters = [], preSelectedFilters = null) => {
6604
6616
  try {
6605
6617
  const attributeName = filterConfig.column_name ||
6606
6618
  filterConfig.attribute_name ||
@@ -6633,6 +6645,39 @@ const fetchCrossFilterOptions = async (filterConfig, existingSelections = [], al
6633
6645
  display_order: fullConfig?.display_order || fullConfig?.ordering || 0,
6634
6646
  };
6635
6647
  });
6648
+ // Build pre-selected filter entries from init response (if provided)
6649
+ // These are always included in the payload alongside user selections
6650
+ const preSelectedEntries = [];
6651
+ if (preSelectedFilters && typeof preSelectedFilters === "object") {
6652
+ Object.entries(preSelectedFilters).forEach(([key, config]) => {
6653
+ // Skip if this filter is the one we're fetching options for
6654
+ if (key === attributeName)
6655
+ return;
6656
+ // Skip if user has already selected values for this filter (user selection takes precedence)
6657
+ const userAlreadySelected = filtersArray.some((f) => f.attribute_name === key || f.filter_id === key);
6658
+ if (userAlreadySelected)
6659
+ return;
6660
+ const values = Array.isArray(config.values) ? config.values : [];
6661
+ if (values.length === 0)
6662
+ return;
6663
+ preSelectedEntries.push({
6664
+ filter_name: config.label || key,
6665
+ filter_id: key,
6666
+ filter_type: "cascaded",
6667
+ dimension: config.dimension || dimension,
6668
+ display_type: "dropdown",
6669
+ check_configuration: [],
6670
+ is_mandatory: config.is_mandatory || false,
6671
+ extra: {},
6672
+ values: values,
6673
+ attribute_name: key,
6674
+ operator: "in",
6675
+ display_order: 0,
6676
+ });
6677
+ });
6678
+ }
6679
+ // Merge: pre-selected filters first, then user selections
6680
+ const combinedFilters = [...preSelectedEntries, ...filtersArray];
6636
6681
  const payload = {
6637
6682
  attributes: [
6638
6683
  {
@@ -6642,7 +6687,7 @@ const fetchCrossFilterOptions = async (filterConfig, existingSelections = [], al
6642
6687
  },
6643
6688
  ],
6644
6689
  filter_type: "cascaded",
6645
- filters: filtersArray,
6690
+ filters: combinedFilters,
6646
6691
  is_urm_filter: true,
6647
6692
  screen_name: "Chatbot",
6648
6693
  application_code: 1,
@@ -6757,11 +6802,15 @@ const SelectContent = ({ bodyText, isFormDisabled = false, messageIndex }) => {
6757
6802
  const [currentOptions, setCurrentOptions] = useState([]);
6758
6803
  const persistedFormValues = useSelector((state) => state.smartBotReducer.persistedFormValues);
6759
6804
  const [currentSelectedOptions, setCurrentSelectedOptions] = useState(persistedFormValues?.[formKey] || []);
6760
- const [isAllSelected, setIsAllSelected] = useState(false);
6805
+ const selectAllKey = `${formKey}__selectAllCount`;
6806
+ const [isAllSelected, setIsAllSelected] = useState(() => {
6807
+ return (persistedFormValues?.[selectAllKey] || 0) > 0;
6808
+ });
6761
6809
  const [initialOptions, setInitialOptions] = useState([]);
6762
6810
  const allOptionsRef = useRef([]);
6763
6811
  const isSearchActiveRef = useRef(false);
6764
6812
  const searchTermRef = useRef("");
6813
+ const selectAllCountRef = useRef(persistedFormValues?.[selectAllKey] || 0);
6765
6814
  const chatbotContext = useSelector((state) => state.smartBotReducer.chatbotContext);
6766
6815
  const heirarchyKeyValuePairs = useSelector((state) => state.smartBotReducer.heirarchyKeyValuePairs);
6767
6816
  const dispatch = useDispatch();
@@ -6902,16 +6951,16 @@ const SelectContent = ({ bodyText, isFormDisabled = false, messageIndex }) => {
6902
6951
  updated: true,
6903
6952
  },
6904
6953
  }));
6905
- dispatch(setPersistedFormValues({ [formKey]: [] }));
6954
+ dispatch(setPersistedFormValues({ [formKey]: [], [selectAllKey]: 0 }));
6906
6955
  // Notify cross-filter context to clear downstream filters
6907
6956
  if (isCascading) {
6908
6957
  crossFilterCtx.onFilterChange(paramName, []);
6909
6958
  }
6910
6959
  }, handleChange: (selected) => onChange(selected), isCloseWhenClickOutside: true, setIsOpen: (open) => {
6911
6960
  setIsOpen(open);
6912
- // When dropdown closes after a filtered select-all on a subset,
6913
- // reset the isAllSelected flag so scroll-to-load-more doesn't auto-select more items
6914
- if (!open && isAllSelected && currentSelectedOptions.length < allOptionsRef.current.length) {
6961
+ // When dropdown closes after a search-filtered select-all on a subset,
6962
+ // reset the isAllSelected flag since only a subset was selected
6963
+ if (!open && isAllSelected && isSearchActiveRef.current) {
6915
6964
  setIsAllSelected(false);
6916
6965
  }
6917
6966
  if (isCascading) {
@@ -6951,6 +7000,8 @@ const SelectContent = ({ bodyText, isFormDisabled = false, messageIndex }) => {
6951
7000
  const nextOptions = [...currentOptions, ...newBatch];
6952
7001
  setCurrentOptions(nextOptions);
6953
7002
  setInitialOptions(nextOptions);
7003
+ // When all are selected, mark newly loaded items as selected too
7004
+ // so they render with checkmarks in the dropdown
6954
7005
  if (isAllSelected) {
6955
7006
  setCurrentSelectedOptions(nextOptions);
6956
7007
  }
@@ -6959,17 +7010,20 @@ const SelectContent = ({ bodyText, isFormDisabled = false, messageIndex }) => {
6959
7010
  if (e && e.target.checked) {
6960
7011
  // When search is active, select only the filtered/visible options
6961
7012
  // When no search is active, select ALL options from the full dataset
6962
- let optionsToSelect;
7013
+ // but only render the currently visible chunk to avoid 100k+ DOM nodes
6963
7014
  let valuesToDispatch;
6964
7015
  if (isSearchActiveRef.current) {
6965
- optionsToSelect = [...currentOptions];
7016
+ // Search-filtered select all: only select the visible filtered options
6966
7017
  valuesToDispatch = currentOptions.map((opt) => opt.value);
7018
+ setCurrentSelectedOptions([...currentOptions]);
7019
+ selectAllCountRef.current = currentOptions.length;
6967
7020
  }
6968
7021
  else {
6969
- optionsToSelect = allOptionsRef.current.map(formatOption);
7022
+ // Full select all: select all options but only render the visible chunk
6970
7023
  valuesToDispatch = allOptionsRef.current.map((opt) => opt.value);
7024
+ setCurrentSelectedOptions([...currentOptions]);
7025
+ selectAllCountRef.current = allOptionsRef.current.length;
6971
7026
  }
6972
- setCurrentSelectedOptions(optionsToSelect);
6973
7027
  setIsAllSelected(true);
6974
7028
  dispatch(setChatbotContext({
6975
7029
  ...chatbotContext,
@@ -6979,7 +7033,11 @@ const SelectContent = ({ bodyText, isFormDisabled = false, messageIndex }) => {
6979
7033
  updated: true,
6980
7034
  },
6981
7035
  }));
6982
- dispatch(setPersistedFormValues({ [formKey]: optionsToSelect }));
7036
+ // Persist only the currently visible options (not all 100k+) to avoid Redux memory bloat
7037
+ dispatch(setPersistedFormValues({
7038
+ [formKey]: [...currentOptions],
7039
+ [selectAllKey]: selectAllCountRef.current,
7040
+ }));
6983
7041
  // Notify cross-filter context if cascading is active
6984
7042
  if (isCascading) {
6985
7043
  crossFilterCtx.onFilterChange(paramName, valuesToDispatch);
@@ -6996,15 +7054,17 @@ const SelectContent = ({ bodyText, isFormDisabled = false, messageIndex }) => {
6996
7054
  updated: true,
6997
7055
  },
6998
7056
  }));
6999
- dispatch(setPersistedFormValues({ [formKey]: [] }));
7057
+ dispatch(setPersistedFormValues({ [formKey]: [], [selectAllKey]: 0 }));
7000
7058
  // Notify cross-filter context of deselection
7001
7059
  if (isCascading) {
7002
7060
  crossFilterCtx.onFilterChange(paramName, []);
7003
7061
  }
7004
7062
  }
7005
- }, customPlaceholderAfterSelect: currentSelectedOptions.length > 0
7006
- ? currentSelectedOptions.length
7007
- : null }) }));
7063
+ }, customPlaceholderAfterSelect: isAllSelected
7064
+ ? selectAllCountRef.current
7065
+ : currentSelectedOptions.length > 0
7066
+ ? currentSelectedOptions.length
7067
+ : null }) }));
7008
7068
  };
7009
7069
 
7010
7070
  const DatePickerContent = ({ bodyText, isFormDisabled = false, messageIndex }) => {
@@ -7220,7 +7280,7 @@ const STEP_FORM_TIMEOUT_KEY = "__stepFormTimedOut";
7220
7280
  * @param {Array} props.formData - Array of raw widget_data items from step_form chunk
7221
7281
  * @param {number} props.messageIndex - Index for form state persistence keys
7222
7282
  */
7223
- const StepFormContent = ({ formData, messageIndex = 0, isFormDisabled = false, showSavedFilters = true }) => {
7283
+ const StepFormContent = ({ formData, messageIndex = 0, isFormDisabled = false, showSavedFilters = true, preSelectedFilters = null }) => {
7224
7284
  const dispatch = useDispatch();
7225
7285
  const savedFilterSets = useSelector((state) => state.smartBotReducer.savedFilterSets);
7226
7286
  const persistedFormValues = useSelector((state) => state.smartBotReducer.persistedFormValues);
@@ -7537,7 +7597,7 @@ const StepFormContent = ({ formData, messageIndex = 0, isFormDisabled = false, s
7537
7597
  return null;
7538
7598
  return (jsxs("div", { className: "step-form-content", children: [showSavedFilters && filterSetOptions.length > 0 && (jsx("div", { style: { width: "100%", marginTop: "10px" }, children: jsx(Select, { currentOptions: filterSetCurrentOptions, setCurrentOptions: setFilterSetCurrentOptions, label: "Saved Filter Sets", labelOrientation: "top", isRequired: false, isDisabled: savedFilterDisabled, handleChange: (selected) => onFilterSetChange(selected), isCloseWhenClickOutside: true, setIsOpen: setIsFilterSetOpen, isOpen: isFilterSetOpen, selectedOptions: selectedFilterSet, setSelectedOptions: setSelectedFilterSet, initialOptions: filterSetOptions, isMulti: false, isClearable: true }) })), showSavedFilters && filterSetOptions.length > 0 && (jsx("hr", { style: { border: "none", borderTop: "1px solid #E0E0E0", margin: "12px 0" } })), jsx("div", { style: {
7539
7599
  ...(isFilterSelected && !isFormDisabled ? { pointerEvents: "none", opacity: 0.5 } : {}),
7540
- }, children: crossFilterConfigs.length > 1 ? (jsx(CrossFilterProvider, { filters: crossFilterConfigs, fetchOptionsFn: fetchCrossFilterOptions, initialSelections: crossFilterInitialSelections, fetchOnMount: false, children: formFields })) : (formFields) }), buttonItems] }));
7600
+ }, children: crossFilterConfigs.length >= 1 ? (jsx(CrossFilterProvider, { filters: crossFilterConfigs, fetchOptionsFn: (filterConfig, existingSelections, allFilters) => fetchCrossFilterOptions(filterConfig, existingSelections, allFilters, preSelectedFilters), initialSelections: crossFilterInitialSelections, fetchOnMount: false, children: formFields })) : (formFields) }), buttonItems] }));
7541
7601
  };
7542
7602
  /** Reset the timeout flag (call when a new conversation/message starts) */
7543
7603
  const resetStepFormTimeoutFlag = () => {
@@ -7813,7 +7873,7 @@ const getQuestionStatus$1 = (questionSteps) => {
7813
7873
  /**
7814
7874
  * Renders a single progress bar item (main point + sub-items)
7815
7875
  */
7816
- const ProgressBarItem$1 = ({ question, questionSteps, isLast, classes, formData, showSavedFilters = true, isFormDisabled, onAllSubItemsAnimated = undefined }) => {
7876
+ const ProgressBarItem$1 = ({ question, questionSteps, isLast, classes, formData, showSavedFilters = true, preSelectedFilters = null, isFormDisabled, onAllSubItemsAnimated = undefined }) => {
7817
7877
  const status = getQuestionStatus$1(questionSteps);
7818
7878
  const animatedCountRef = useRef(0);
7819
7879
  const [isExpanded, setIsExpanded] = useState(true);
@@ -7846,7 +7906,7 @@ const ProgressBarItem$1 = ({ question, questionSteps, isLast, classes, formData,
7846
7906
  if (animatedCountRef.current >= arr.length && onAllSubItemsAnimated) {
7847
7907
  onAllSubItemsAnimated();
7848
7908
  }
7849
- } }) }, idx))) })), formData && isExpanded && (jsx("div", { className: classes.stepFormContainer, children: jsx(StepFormContent, { formData: formData, isFormDisabled: isFormDisabled, showSavedFilters: showSavedFilters }) }))] })] }));
7909
+ } }) }, idx))) })), formData && isExpanded && (jsx("div", { className: classes.stepFormContainer, children: jsx(StepFormContent, { formData: formData, isFormDisabled: isFormDisabled, showSavedFilters: showSavedFilters, preSelectedFilters: preSelectedFilters }) }))] })] }));
7850
7910
  };
7851
7911
  const Steps$1 = ({ steps, setSteps, done, setTabValue, setDone, finalStepDone, setFinalStepDone, stepChange, currentMode, questions = [], questionsStepsMap = {}, stepFormDataMap = {}, isFormDisabled = false, }) => {
7852
7912
  const classes = useStyles$4();
@@ -7929,8 +7989,9 @@ const Steps$1 = ({ steps, setSteps, done, setTabValue, setDone, finalStepDone, s
7929
7989
  const formEntry = stepFormDataMap[question] || null;
7930
7990
  const formData = formEntry ? (Array.isArray(formEntry) ? formEntry : formEntry.widgets) : null;
7931
7991
  const showSavedFilters = formEntry && !Array.isArray(formEntry) ? formEntry.showSavedFilters : true;
7992
+ const preSelectedFilters = formEntry && !Array.isArray(formEntry) ? formEntry.preSelectedFilters : null;
7932
7993
  const isLast = index === questions.length - 1;
7933
- return (jsx(ProgressBarItem$1, { question: question, questionSteps: questionSteps, isLast: isLast && !showThinking, classes: classes, formData: formData, isFormDisabled: isFormDisabled, showSavedFilters: showSavedFilters, onAllSubItemsAnimated: isLast && lastQuestionCompleted && !done
7994
+ return (jsx(ProgressBarItem$1, { question: question, questionSteps: questionSteps, isLast: isLast && !showThinking, classes: classes, formData: formData, isFormDisabled: isFormDisabled, showSavedFilters: showSavedFilters, preSelectedFilters: preSelectedFilters, onAllSubItemsAnimated: isLast && lastQuestionCompleted && !done
7934
7995
  ? () => setShowThinking(true)
7935
7996
  : undefined }, index));
7936
7997
  }), showThinking && !done && (jsx("div", { style: {
@@ -8748,6 +8809,7 @@ const StreamedContent = ({ botData }) => {
8748
8809
  stepFormDataMapRef.current[currentIntent] = {
8749
8810
  widgets: [...formWidgetData, stepFormSubmitButton],
8750
8811
  showSavedFilters: data.show_saved_filters !== false,
8812
+ preSelectedFilters: data.pre_selected_filters || null,
8751
8813
  };
8752
8814
  setStepFormDataMap({ ...stepFormDataMapRef.current });
8753
8815
  }
@@ -9686,7 +9748,7 @@ const getQuestionStatus = (questionSteps) => {
9686
9748
  /**
9687
9749
  * Renders a single progress bar item (main point + sub-items)
9688
9750
  */
9689
- const ProgressBarItem = ({ question, questionSteps, isLast, classes, formData, isFormDisabled, isRestreaming = false, showSavedFilters = true }) => {
9751
+ const ProgressBarItem = ({ question, questionSteps, isLast, classes, formData, isFormDisabled, isRestreaming = false, showSavedFilters = true, preSelectedFilters = null }) => {
9690
9752
  const baseStatus = getQuestionStatus(questionSteps);
9691
9753
  // When restreaming and this is the last item, show as in-progress
9692
9754
  const status = (isRestreaming && isLast) ? "in-progress" : baseStatus;
@@ -9715,7 +9777,7 @@ const ProgressBarItem = ({ question, questionSteps, isLast, classes, formData, i
9715
9777
  setIsExpanded(true);
9716
9778
  }
9717
9779
  }, [status, formData]);
9718
- return (jsxs("div", { className: classes.progressItem, children: [jsxs("div", { className: classes.progressTrack, children: [jsx("div", { className: `${classes.progressDot} ${dotClass}` }), !isLast && jsx("div", { className: `${classes.progressLine} ${lineClass}` })] }), jsxs("div", { className: classes.progressContent, children: [jsxs("div", { className: classes.progressHeader, onClick: handleToggle, children: [jsx("span", { className: `${classes.progressHeaderText} ${textClass}`, children: question }), hasSubItems && (jsx(ChevronRightIcon$1, { className: `${classes.progressChevron} ${textClass} ${isExpanded ? "expanded" : ""}` }))] }), hasSubItems && isExpanded && status === "in-progress" && (jsxs("div", { className: classes.reasoningLabel, children: [jsx(SvgReasoningIcon, {}), "Reasoning..."] })), hasSubItems && isExpanded && (jsx("div", { className: classes.progressSubItems, style: { maxHeight: isExpanded ? "500px" : "0", opacity: isExpanded ? 1 : 0 }, children: questionSteps.map((step, idx) => (jsxs("div", { className: classes.progressSubItem, children: [step.header, step.sub_header ? ` - ${step.sub_header}` : ""] }, idx))) })), formData && isExpanded && (jsx("div", { className: classes.stepFormContainer, children: jsx(StepFormContent, { formData: formData, isFormDisabled: isFormDisabled, showSavedFilters: showSavedFilters }) }))] })] }));
9780
+ return (jsxs("div", { className: classes.progressItem, children: [jsxs("div", { className: classes.progressTrack, children: [jsx("div", { className: `${classes.progressDot} ${dotClass}` }), !isLast && jsx("div", { className: `${classes.progressLine} ${lineClass}` })] }), jsxs("div", { className: classes.progressContent, children: [jsxs("div", { className: classes.progressHeader, onClick: handleToggle, children: [jsx("span", { className: `${classes.progressHeaderText} ${textClass}`, children: question }), hasSubItems && (jsx(ChevronRightIcon$1, { className: `${classes.progressChevron} ${textClass} ${isExpanded ? "expanded" : ""}` }))] }), hasSubItems && isExpanded && status === "in-progress" && (jsxs("div", { className: classes.reasoningLabel, children: [jsx(SvgReasoningIcon, {}), "Reasoning..."] })), hasSubItems && isExpanded && (jsx("div", { className: classes.progressSubItems, style: { maxHeight: isExpanded ? "500px" : "0", opacity: isExpanded ? 1 : 0 }, children: questionSteps.map((step, idx) => (jsxs("div", { className: classes.progressSubItem, children: [step.header, step.sub_header ? ` - ${step.sub_header}` : ""] }, idx))) })), formData && isExpanded && (jsx("div", { className: classes.stepFormContainer, children: jsx(StepFormContent, { formData: formData, isFormDisabled: isFormDisabled, showSavedFilters: showSavedFilters, preSelectedFilters: preSelectedFilters }) }))] })] }));
9719
9781
  };
9720
9782
  const Steps = ({ steps, questions = [], questionsStepsMap = {}, stepFormDataMap = {}, isFormDisabled = false, activeFormIntent = null, isRestreaming = false }) => {
9721
9783
  const classes = useStyles$3();
@@ -9741,11 +9803,12 @@ const Steps = ({ steps, questions = [], questionsStepsMap = {}, stepFormDataMap
9741
9803
  // Support both old array format and new object format { widgets, showSavedFilters }
9742
9804
  const formData = formEntry ? (Array.isArray(formEntry) ? formEntry : formEntry.widgets) : null;
9743
9805
  const showSavedFilters = formEntry && !Array.isArray(formEntry) ? formEntry.showSavedFilters : true;
9806
+ const preSelectedFilters = formEntry && !Array.isArray(formEntry) ? formEntry.preSelectedFilters : null;
9744
9807
  // If activeFormIntent is set, only the matching form is enabled; all others stay disabled
9745
9808
  const formDisabledForThis = activeFormIntent
9746
9809
  ? question !== activeFormIntent
9747
9810
  : isFormDisabled;
9748
- return (jsx(ProgressBarItem, { question: question, questionSteps: questionSteps, isLast: index === questions.length - 1, classes: classes, formData: formData, isFormDisabled: formDisabledForThis, isRestreaming: isRestreaming, showSavedFilters: showSavedFilters }, index));
9811
+ return (jsx(ProgressBarItem, { question: question, questionSteps: questionSteps, isLast: index === questions.length - 1, classes: classes, formData: formData, isFormDisabled: formDisabledForThis, isRestreaming: isRestreaming, showSavedFilters: showSavedFilters, preSelectedFilters: preSelectedFilters }, index));
9749
9812
  }) }));
9750
9813
  };
9751
9814
 
@@ -10004,6 +10067,7 @@ const TabularContent = ({ steps: initialSteps, currentTabValue, children, questi
10004
10067
  newStepFormDataMap[currentIntent] = {
10005
10068
  widgets: [...formWidgetData, submitButton],
10006
10069
  showSavedFilters: data.show_saved_filters !== false,
10070
+ preSelectedFilters: data.pre_selected_filters || null,
10007
10071
  };
10008
10072
  }
10009
10073
  }
@@ -10130,6 +10194,7 @@ const TabularContent = ({ steps: initialSteps, currentTabValue, children, questi
10130
10194
  newStepFormDataMap[currentIntent] = {
10131
10195
  widgets: [...formWidgetData, submitButton],
10132
10196
  showSavedFilters: data.show_saved_filters !== false,
10197
+ preSelectedFilters: data.pre_selected_filters || null,
10133
10198
  };
10134
10199
  }
10135
10200
  }