impact-chatbot 2.3.21 → 2.3.23
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/components/message-template/components/message-content/CheckboxContent.d.ts +2 -1
- package/dist/components/message-template/components/message-content/DatePickerContent.d.ts +2 -1
- package/dist/components/message-template/components/message-content/DateRangePickerContent.d.ts +2 -1
- package/dist/components/message-template/components/message-content/InputContent.d.ts +2 -1
- package/dist/components/message-template/components/message-content/RadioContent.d.ts +2 -1
- package/dist/components/message-template/components/message-content/SelectContent.d.ts +2 -1
- package/dist/components/message-template/components/message-content/SliderContent.d.ts +2 -1
- package/dist/index.cjs.js +53 -31
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +54 -32
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
declare const CheckboxContent: ({ bodyText, isFormDisabled }: {
|
|
1
|
+
declare const CheckboxContent: ({ bodyText, isFormDisabled, messageIndex }: {
|
|
2
2
|
bodyText: any;
|
|
3
3
|
isFormDisabled?: boolean;
|
|
4
|
+
messageIndex: any;
|
|
4
5
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export default CheckboxContent;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
declare const DatePickerContent: ({ bodyText, isFormDisabled }: {
|
|
1
|
+
declare const DatePickerContent: ({ bodyText, isFormDisabled, messageIndex }: {
|
|
2
2
|
bodyText: any;
|
|
3
3
|
isFormDisabled?: boolean;
|
|
4
|
+
messageIndex: any;
|
|
4
5
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export default DatePickerContent;
|
package/dist/components/message-template/components/message-content/DateRangePickerContent.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
declare const DateRangePickerContent: ({ bodyText, isFormDisabled }: {
|
|
1
|
+
declare const DateRangePickerContent: ({ bodyText, isFormDisabled, messageIndex }: {
|
|
2
2
|
bodyText: any;
|
|
3
3
|
isFormDisabled?: boolean;
|
|
4
|
+
messageIndex: any;
|
|
4
5
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export default DateRangePickerContent;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
declare const InputContent: ({ bodyText, isFormDisabled }: {
|
|
1
|
+
declare const InputContent: ({ bodyText, isFormDisabled, messageIndex }: {
|
|
2
2
|
bodyText: any;
|
|
3
3
|
isFormDisabled?: boolean;
|
|
4
|
+
messageIndex: any;
|
|
4
5
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export default InputContent;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
declare const RadioContent: ({ bodyText, isFormDisabled }: {
|
|
1
|
+
declare const RadioContent: ({ bodyText, isFormDisabled, messageIndex }: {
|
|
2
2
|
bodyText: any;
|
|
3
3
|
isFormDisabled?: boolean;
|
|
4
|
+
messageIndex: any;
|
|
4
5
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export default RadioContent;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
declare const SelectContent: ({ bodyText, isFormDisabled }: {
|
|
1
|
+
declare const SelectContent: ({ bodyText, isFormDisabled, messageIndex }: {
|
|
2
2
|
bodyText: any;
|
|
3
3
|
isFormDisabled?: boolean;
|
|
4
|
+
messageIndex: any;
|
|
4
5
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export default SelectContent;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
declare const SliderContent: ({ bodyText, isFormDisabled }: {
|
|
1
|
+
declare const SliderContent: ({ bodyText, isFormDisabled, messageIndex }: {
|
|
2
2
|
bodyText: any;
|
|
3
3
|
isFormDisabled?: boolean;
|
|
4
|
+
messageIndex: any;
|
|
4
5
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export default SliderContent;
|
package/dist/index.cjs.js
CHANGED
|
@@ -6119,7 +6119,7 @@ const StreamedContent = ({ botData }) => {
|
|
|
6119
6119
|
// }
|
|
6120
6120
|
let endPoint = botData?.utilityObject?.endpoint
|
|
6121
6121
|
? `${api.BASE_API}${botData?.utilityObject?.endpoint}`
|
|
6122
|
-
: `${api.BASE_API}/core/chatbot/navigation-
|
|
6122
|
+
: `${api.BASE_API}/core/chatbot/navigation-v3`;
|
|
6123
6123
|
let method = botData?.utilityObject?.method
|
|
6124
6124
|
? botData?.utilityObject?.method
|
|
6125
6125
|
: "PUT";
|
|
@@ -6687,11 +6687,13 @@ const StreamedContent = ({ botData }) => {
|
|
|
6687
6687
|
return renderContent();
|
|
6688
6688
|
};
|
|
6689
6689
|
|
|
6690
|
-
const SliderContent = ({ bodyText, isFormDisabled = false }) => {
|
|
6690
|
+
const SliderContent = ({ bodyText, isFormDisabled = false, messageIndex }) => {
|
|
6691
|
+
const formKey = `${messageIndex}_${bodyText?.paramName}`;
|
|
6691
6692
|
const { header, headerOrentiation, inputPosition, label, max, min, required, disabled, } = bodyText;
|
|
6692
|
-
const [sliderValue, setSliderValue] = React.useState(0);
|
|
6693
6693
|
const chatbotContext = reactRedux.useSelector((state) => state.smartBotReducer.chatbotContext);
|
|
6694
|
+
const persistedFormValues = reactRedux.useSelector((state) => state.smartBotReducer.persistedFormValues);
|
|
6694
6695
|
const dispatch = reactRedux.useDispatch();
|
|
6696
|
+
const [sliderValue, setSliderValue] = React.useState(persistedFormValues[formKey] !== undefined ? persistedFormValues[formKey] : 0);
|
|
6695
6697
|
if (!bodyText)
|
|
6696
6698
|
return null;
|
|
6697
6699
|
const handleChange = (value) => {
|
|
@@ -6703,6 +6705,7 @@ const SliderContent = ({ bodyText, isFormDisabled = false }) => {
|
|
|
6703
6705
|
updated: true
|
|
6704
6706
|
};
|
|
6705
6707
|
dispatch(smartBotActions.setChatbotContext(chatbotContext));
|
|
6708
|
+
dispatch(smartBotActions.setPersistedFormValues({ [formKey]: value?.target?.value }));
|
|
6706
6709
|
}
|
|
6707
6710
|
catch (error) {
|
|
6708
6711
|
console.error("Error in slider handleChange", error);
|
|
@@ -6711,11 +6714,13 @@ const SliderContent = ({ bodyText, isFormDisabled = false }) => {
|
|
|
6711
6714
|
return (jsxRuntime.jsx("div", { style: { width: "100%", marginTop: "10px" }, children: jsxRuntime.jsx(impactUiV3.Slider, { header: header, headerOrientation: headerOrentiation, inputPosition: inputPosition, label: label, max: max, min: min, required: required, disabled: disabled || isFormDisabled, onChange: (e) => handleChange(e), value: sliderValue }) }));
|
|
6712
6715
|
};
|
|
6713
6716
|
|
|
6714
|
-
const SelectContent = ({ bodyText, isFormDisabled = false }) => {
|
|
6717
|
+
const SelectContent = ({ bodyText, isFormDisabled = false, messageIndex }) => {
|
|
6718
|
+
const formKey = `${messageIndex}_${bodyText?.paramName}`;
|
|
6715
6719
|
const { header, inputPosition, labelOrientation, label, options, isRequired, isDisabled, isMulti, paramName } = bodyText;
|
|
6716
6720
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
6717
6721
|
const [currentOptions, setCurrentOptions] = React.useState([]);
|
|
6718
|
-
const
|
|
6722
|
+
const persistedFormValues = reactRedux.useSelector((state) => state.smartBotReducer.persistedFormValues);
|
|
6723
|
+
const [currentSelectedOptions, setCurrentSelectedOptions] = React.useState(persistedFormValues?.[formKey] || []);
|
|
6719
6724
|
const [isAllSelected, setIsAllSelected] = React.useState(false);
|
|
6720
6725
|
const [initialOptions, setInitialOptions] = React.useState([]);
|
|
6721
6726
|
const chatbotContext = reactRedux.useSelector((state) => state.smartBotReducer.chatbotContext);
|
|
@@ -6743,6 +6748,7 @@ const SelectContent = ({ bodyText, isFormDisabled = false }) => {
|
|
|
6743
6748
|
// updated: true
|
|
6744
6749
|
// };
|
|
6745
6750
|
dispatch(smartBotActions.setChatbotContext(chatbotContext));
|
|
6751
|
+
dispatch(smartBotActions.setPersistedFormValues({ [formKey]: Array.isArray(selectedOptions) ? selectedOptions : [selectedOptions] }));
|
|
6746
6752
|
}
|
|
6747
6753
|
catch (error) {
|
|
6748
6754
|
console.error("Error in select handleChange", error);
|
|
@@ -6764,11 +6770,13 @@ const SelectContent = ({ bodyText, isFormDisabled = false }) => {
|
|
|
6764
6770
|
isRequired: isRequired, isDisabled: isDisabled || isFormDisabled, handleChange: (selected) => onChange(selected), isCloseWhenClickOutside: true, setIsOpen: setIsOpen, isOpen: isOpen, selectedOptions: currentSelectedOptions, setSelectedOptions: setCurrentSelectedOptions, initialOptions: initialOptions, isMulti: isMulti, isSelectAll: isAllSelected, setIsSelectAll: setIsAllSelected, toggleSelectAll: true, isWithSearch: isMulti ? true : false }) }));
|
|
6765
6771
|
};
|
|
6766
6772
|
|
|
6767
|
-
const DatePickerContent = ({ bodyText, isFormDisabled = false }) => {
|
|
6773
|
+
const DatePickerContent = ({ bodyText, isFormDisabled = false, messageIndex }) => {
|
|
6774
|
+
const formKey = `${messageIndex}_${bodyText?.paramName}`;
|
|
6768
6775
|
const { displayFormat, label, isRequired, labelOrientation, placeholder, minDate, maxDate, isDisabled, } = bodyText;
|
|
6769
|
-
const [selectedDate, setSelectedDate] = React.useState(null);
|
|
6770
6776
|
const chatbotContext = reactRedux.useSelector((state) => state.smartBotReducer.chatbotContext);
|
|
6777
|
+
const persistedFormValues = reactRedux.useSelector((state) => state.smartBotReducer.persistedFormValues);
|
|
6771
6778
|
const dispatch = reactRedux.useDispatch();
|
|
6779
|
+
const [selectedDate, setSelectedDate] = React.useState(persistedFormValues[formKey] || null);
|
|
6772
6780
|
if (lodash.isEmpty(bodyText))
|
|
6773
6781
|
return null;
|
|
6774
6782
|
const handleDateChange = (date) => {
|
|
@@ -6780,6 +6788,7 @@ const DatePickerContent = ({ bodyText, isFormDisabled = false }) => {
|
|
|
6780
6788
|
updated: true
|
|
6781
6789
|
};
|
|
6782
6790
|
dispatch(smartBotActions.setChatbotContext(chatbotContext));
|
|
6791
|
+
dispatch(smartBotActions.setPersistedFormValues({ [formKey]: date }));
|
|
6783
6792
|
}
|
|
6784
6793
|
catch (error) {
|
|
6785
6794
|
console.error("Error in datepicker handleChange", error);
|
|
@@ -6794,12 +6803,14 @@ const DatePickerContent = ({ bodyText, isFormDisabled = false }) => {
|
|
|
6794
6803
|
selectedDate: selectedDate }) }));
|
|
6795
6804
|
};
|
|
6796
6805
|
|
|
6797
|
-
const DateRangePickerContent = ({ bodyText, isFormDisabled = false }) => {
|
|
6806
|
+
const DateRangePickerContent = ({ bodyText, isFormDisabled = false, messageIndex }) => {
|
|
6807
|
+
const formKey = `${messageIndex}_${bodyText?.paramName}`;
|
|
6798
6808
|
const { displayFormat, label, isRequired, labelOrientation, minDate, maxDate, isDisabled, showMonthYearSelect, } = bodyText;
|
|
6799
|
-
const [startDate, setStartDate] = React.useState(null);
|
|
6800
|
-
const [endDate, setEndDate] = React.useState(null);
|
|
6801
6809
|
const chatbotContext = reactRedux.useSelector((state) => state.smartBotReducer.chatbotContext);
|
|
6810
|
+
const persistedFormValues = reactRedux.useSelector((state) => state.smartBotReducer.persistedFormValues);
|
|
6802
6811
|
const dispatch = reactRedux.useDispatch();
|
|
6812
|
+
const [startDate, setStartDate] = React.useState(persistedFormValues[formKey]?.startDate || null);
|
|
6813
|
+
const [endDate, setEndDate] = React.useState(persistedFormValues[formKey]?.endDate || null);
|
|
6803
6814
|
if (lodash.isEmpty(bodyText))
|
|
6804
6815
|
return null;
|
|
6805
6816
|
const handleDatesChange = (start, end) => {
|
|
@@ -6815,6 +6826,7 @@ const DateRangePickerContent = ({ bodyText, isFormDisabled = false }) => {
|
|
|
6815
6826
|
updated: true,
|
|
6816
6827
|
};
|
|
6817
6828
|
dispatch(smartBotActions.setChatbotContext(chatbotContext));
|
|
6829
|
+
dispatch(smartBotActions.setPersistedFormValues({ [formKey]: { startDate: start, endDate: end } }));
|
|
6818
6830
|
}
|
|
6819
6831
|
catch (error) {
|
|
6820
6832
|
console.error("Error in dateRangePicker handleDatesChange", error);
|
|
@@ -6830,11 +6842,13 @@ const DateRangePickerContent = ({ bodyText, isFormDisabled = false }) => {
|
|
|
6830
6842
|
} }) }));
|
|
6831
6843
|
};
|
|
6832
6844
|
|
|
6833
|
-
const CheckboxContent = ({ bodyText, isFormDisabled = false }) => {
|
|
6845
|
+
const CheckboxContent = ({ bodyText, isFormDisabled = false, messageIndex }) => {
|
|
6846
|
+
const formKey = `${messageIndex}_${bodyText?.paramName}`;
|
|
6834
6847
|
const { label, checked: checkedValue, required, disabled, } = bodyText;
|
|
6835
6848
|
const chatbotContext = reactRedux.useSelector((state) => state.smartBotReducer.chatbotContext);
|
|
6849
|
+
const persistedFormValues = reactRedux.useSelector((state) => state.smartBotReducer.persistedFormValues);
|
|
6836
6850
|
const dispatch = reactRedux.useDispatch();
|
|
6837
|
-
const [checked, setChecked] = React.useState(checkedValue);
|
|
6851
|
+
const [checked, setChecked] = React.useState(persistedFormValues[formKey] !== undefined ? persistedFormValues[formKey] : checkedValue);
|
|
6838
6852
|
if (lodash.isEmpty(bodyText))
|
|
6839
6853
|
return null;
|
|
6840
6854
|
const handleChange = (isChecked) => {
|
|
@@ -6851,6 +6865,7 @@ const CheckboxContent = ({ bodyText, isFormDisabled = false }) => {
|
|
|
6851
6865
|
updated: true
|
|
6852
6866
|
};
|
|
6853
6867
|
dispatch(smartBotActions.setChatbotContext(chatbotContext));
|
|
6868
|
+
dispatch(smartBotActions.setPersistedFormValues({ [formKey]: isChecked?.currentTarget?.checked }));
|
|
6854
6869
|
}
|
|
6855
6870
|
catch (error) {
|
|
6856
6871
|
console.error("Error in checkbox handleChange", error);
|
|
@@ -6859,12 +6874,14 @@ const CheckboxContent = ({ bodyText, isFormDisabled = false }) => {
|
|
|
6859
6874
|
return (jsxRuntime.jsx("div", { style: { width: '100%', marginTop: '10px' }, children: jsxRuntime.jsx(impactUiV3.Checkbox, { label: label, checked: checked, required: required, disabled: disabled || isFormDisabled, onChange: (e) => handleChange(e), variant: "default" }) }));
|
|
6860
6875
|
};
|
|
6861
6876
|
|
|
6862
|
-
const RadioContent = ({ bodyText, isFormDisabled = false }) => {
|
|
6877
|
+
const RadioContent = ({ bodyText, isFormDisabled = false, messageIndex }) => {
|
|
6878
|
+
const formKey = `${messageIndex}_${bodyText?.paramName}`;
|
|
6863
6879
|
const classes = useStyles$6();
|
|
6864
6880
|
const { label, isDisabled, orientation, options } = bodyText;
|
|
6865
6881
|
const chatbotContext = reactRedux.useSelector((state) => state.smartBotReducer.chatbotContext);
|
|
6882
|
+
const persistedFormValues = reactRedux.useSelector((state) => state.smartBotReducer.persistedFormValues);
|
|
6866
6883
|
const dispatch = reactRedux.useDispatch();
|
|
6867
|
-
const [selectedOption, setSelectedOption] = React.useState(null);
|
|
6884
|
+
const [selectedOption, setSelectedOption] = React.useState(persistedFormValues[formKey] ?? null);
|
|
6868
6885
|
if (lodash.isEmpty(bodyText))
|
|
6869
6886
|
return null;
|
|
6870
6887
|
const handleChange = (selectedOption) => {
|
|
@@ -6882,6 +6899,7 @@ const RadioContent = ({ bodyText, isFormDisabled = false }) => {
|
|
|
6882
6899
|
updated: true
|
|
6883
6900
|
};
|
|
6884
6901
|
dispatch(smartBotActions.setChatbotContext(chatbotContext));
|
|
6902
|
+
dispatch(smartBotActions.setPersistedFormValues({ [formKey]: value }));
|
|
6885
6903
|
}
|
|
6886
6904
|
catch (error) {
|
|
6887
6905
|
console.error("Error in radio handleChange", error);
|
|
@@ -6890,11 +6908,13 @@ const RadioContent = ({ bodyText, isFormDisabled = false }) => {
|
|
|
6890
6908
|
return (jsxRuntime.jsxs("div", { style: { width: "100%", marginTop: "10px" }, children: [bodyText?.label && jsxRuntime.jsx("p", { className: classes.radioGrpLabel, children: bodyText.label }), jsxRuntime.jsx(impactUiV3.RadioButtonGroup, { name: "radio-group", options: options, onChange: (e) => handleChange(e), orientation: orientation, isDisabled: isDisabled || isFormDisabled, selectedOption: selectedOption })] }));
|
|
6891
6909
|
};
|
|
6892
6910
|
|
|
6893
|
-
const InputContent = ({ bodyText, isFormDisabled = false }) => {
|
|
6911
|
+
const InputContent = ({ bodyText, isFormDisabled = false, messageIndex }) => {
|
|
6912
|
+
const formKey = `${messageIndex}_${bodyText?.paramName}`;
|
|
6894
6913
|
const { label, placeholder, isRequired, isDisabled, inputType, labelOrientation, defaultValue, maxLength, minLength, } = bodyText;
|
|
6895
6914
|
const chatbotContext = reactRedux.useSelector((state) => state.smartBotReducer.chatbotContext);
|
|
6915
|
+
const persistedFormValues = reactRedux.useSelector((state) => state.smartBotReducer.persistedFormValues);
|
|
6896
6916
|
const dispatch = reactRedux.useDispatch();
|
|
6897
|
-
const [value, setValue] = React.useState(defaultValue || "");
|
|
6917
|
+
const [value, setValue] = React.useState(persistedFormValues[formKey] !== undefined ? persistedFormValues[formKey] : (defaultValue || ""));
|
|
6898
6918
|
if (lodash.isEmpty(bodyText))
|
|
6899
6919
|
return null;
|
|
6900
6920
|
const handleChange = (event) => {
|
|
@@ -6908,6 +6928,7 @@ const InputContent = ({ bodyText, isFormDisabled = false }) => {
|
|
|
6908
6928
|
type: inputType,
|
|
6909
6929
|
};
|
|
6910
6930
|
dispatch(smartBotActions.setChatbotContext(chatbotContext));
|
|
6931
|
+
dispatch(smartBotActions.setPersistedFormValues({ [formKey]: newValue }));
|
|
6911
6932
|
}
|
|
6912
6933
|
catch (error) {
|
|
6913
6934
|
console.error("Error in input handleChange", error);
|
|
@@ -7162,21 +7183,21 @@ const CombinedContent = ({ botData, props }) => {
|
|
|
7162
7183
|
case "graph":
|
|
7163
7184
|
return jsxRuntime.jsx(GraphContent, { bodyText: parsedData.bodyText }, key);
|
|
7164
7185
|
case "slider":
|
|
7165
|
-
return jsxRuntime.jsx(SliderContent, { bodyText: parsedData.bodyText, isFormDisabled: isFormDisabled }, key);
|
|
7186
|
+
return jsxRuntime.jsx(SliderContent, { bodyText: parsedData.bodyText, isFormDisabled: isFormDisabled, messageIndex: botData.messageIndex }, key);
|
|
7166
7187
|
case "select":
|
|
7167
|
-
return jsxRuntime.jsx(SelectContent, { bodyText: parsedData.bodyText, isFormDisabled: isFormDisabled }, key);
|
|
7188
|
+
return jsxRuntime.jsx(SelectContent, { bodyText: parsedData.bodyText, isFormDisabled: isFormDisabled, messageIndex: botData.messageIndex }, key);
|
|
7168
7189
|
case "datePicker":
|
|
7169
|
-
return jsxRuntime.jsx(DatePickerContent, { bodyText: parsedData.bodyText, isFormDisabled: isFormDisabled }, key);
|
|
7190
|
+
return jsxRuntime.jsx(DatePickerContent, { bodyText: parsedData.bodyText, isFormDisabled: isFormDisabled, messageIndex: botData.messageIndex }, key);
|
|
7170
7191
|
case "dateRangePicker":
|
|
7171
|
-
return jsxRuntime.jsx(DateRangePickerContent, { bodyText: parsedData.bodyText, isFormDisabled: isFormDisabled }, key);
|
|
7192
|
+
return jsxRuntime.jsx(DateRangePickerContent, { bodyText: parsedData.bodyText, isFormDisabled: isFormDisabled, messageIndex: botData.messageIndex }, key);
|
|
7172
7193
|
case "checkbox":
|
|
7173
|
-
return jsxRuntime.jsx(CheckboxContent, { bodyText: parsedData.bodyText, isFormDisabled: isFormDisabled }, key);
|
|
7194
|
+
return jsxRuntime.jsx(CheckboxContent, { bodyText: parsedData.bodyText, isFormDisabled: isFormDisabled, messageIndex: botData.messageIndex }, key);
|
|
7174
7195
|
case "radio":
|
|
7175
|
-
return jsxRuntime.jsx(RadioContent, { bodyText: parsedData.bodyText, isFormDisabled: isFormDisabled }, key);
|
|
7196
|
+
return jsxRuntime.jsx(RadioContent, { bodyText: parsedData.bodyText, isFormDisabled: isFormDisabled, messageIndex: botData.messageIndex }, key);
|
|
7176
7197
|
case "button":
|
|
7177
7198
|
return jsxRuntime.jsx(ButtonContent, { bodyText: parsedData.bodyText, isFormDisabled: isFormDisabled }, key);
|
|
7178
7199
|
case "input":
|
|
7179
|
-
return jsxRuntime.jsx(InputContent, { bodyText: parsedData.bodyText, isFormDisabled: isFormDisabled }, key);
|
|
7200
|
+
return jsxRuntime.jsx(InputContent, { bodyText: parsedData.bodyText, isFormDisabled: isFormDisabled, messageIndex: botData.messageIndex }, key);
|
|
7180
7201
|
case "image":
|
|
7181
7202
|
return jsxRuntime.jsx(ImageContent, { bodyText: parsedData.bodyText }, key);
|
|
7182
7203
|
default:
|
|
@@ -7258,21 +7279,21 @@ const BotMessage = ({ botData, state, handleLikeDislike, props }) => {
|
|
|
7258
7279
|
case "graph":
|
|
7259
7280
|
return jsxRuntime.jsx(GraphContent, { bodyText: botData.bodyText });
|
|
7260
7281
|
case "slider":
|
|
7261
|
-
return jsxRuntime.jsx(SliderContent, { bodyText: botData.bodyText, isFormDisabled: botData.isFormDisabled });
|
|
7282
|
+
return jsxRuntime.jsx(SliderContent, { bodyText: botData.bodyText, isFormDisabled: botData.isFormDisabled, messageIndex: botData.messageIndex });
|
|
7262
7283
|
case "select":
|
|
7263
|
-
return jsxRuntime.jsx(SelectContent, { bodyText: botData.bodyText, isFormDisabled: botData.isFormDisabled });
|
|
7284
|
+
return jsxRuntime.jsx(SelectContent, { bodyText: botData.bodyText, isFormDisabled: botData.isFormDisabled, messageIndex: botData.messageIndex });
|
|
7264
7285
|
case "datePicker":
|
|
7265
|
-
return jsxRuntime.jsx(DatePickerContent, { bodyText: botData.bodyText, isFormDisabled: botData.isFormDisabled });
|
|
7286
|
+
return jsxRuntime.jsx(DatePickerContent, { bodyText: botData.bodyText, isFormDisabled: botData.isFormDisabled, messageIndex: botData.messageIndex });
|
|
7266
7287
|
case "dateRangePicker":
|
|
7267
|
-
return jsxRuntime.jsx(DateRangePickerContent, { bodyText: botData.bodyText, isFormDisabled: botData.isFormDisabled });
|
|
7288
|
+
return jsxRuntime.jsx(DateRangePickerContent, { bodyText: botData.bodyText, isFormDisabled: botData.isFormDisabled, messageIndex: botData.messageIndex });
|
|
7268
7289
|
case "checkbox":
|
|
7269
|
-
return jsxRuntime.jsx(CheckboxContent, { bodyText: botData.bodyText, isFormDisabled: botData.isFormDisabled });
|
|
7290
|
+
return jsxRuntime.jsx(CheckboxContent, { bodyText: botData.bodyText, isFormDisabled: botData.isFormDisabled, messageIndex: botData.messageIndex });
|
|
7270
7291
|
case "radio":
|
|
7271
|
-
return jsxRuntime.jsx(RadioContent, { bodyText: botData.bodyText, isFormDisabled: botData.isFormDisabled });
|
|
7292
|
+
return jsxRuntime.jsx(RadioContent, { bodyText: botData.bodyText, isFormDisabled: botData.isFormDisabled, messageIndex: botData.messageIndex });
|
|
7272
7293
|
case "button":
|
|
7273
7294
|
return jsxRuntime.jsx(ButtonContent, { bodyText: botData.bodyText, isFormDisabled: botData.isFormDisabled });
|
|
7274
7295
|
case "input":
|
|
7275
|
-
return jsxRuntime.jsx(InputContent, { bodyText: botData.bodyText, isFormDisabled: botData.isFormDisabled });
|
|
7296
|
+
return jsxRuntime.jsx(InputContent, { bodyText: botData.bodyText, isFormDisabled: botData.isFormDisabled, messageIndex: botData.messageIndex });
|
|
7276
7297
|
case "image":
|
|
7277
7298
|
return jsxRuntime.jsx(ImageContent, { bodyText: botData.bodyText });
|
|
7278
7299
|
case "combined":
|
|
@@ -10780,6 +10801,7 @@ const SmartBot = (props) => {
|
|
|
10780
10801
|
// />
|
|
10781
10802
|
// ;
|
|
10782
10803
|
message.isFormDisabled = index !== lastBotMessageIndex;
|
|
10804
|
+
message.messageIndex = index;
|
|
10783
10805
|
let originalUtilityObject = message.utilityObject;
|
|
10784
10806
|
let newMessage = lodash.cloneDeep(message);
|
|
10785
10807
|
if (originalUtilityObject) {
|
|
@@ -11219,7 +11241,7 @@ const SmartBot = (props) => {
|
|
|
11219
11241
|
},
|
|
11220
11242
|
icon: jsxRuntime.jsx(SvgNavigationIcon, {}),
|
|
11221
11243
|
},
|
|
11222
|
-
], utilityList: utilityList, isAssistantThinking:
|
|
11244
|
+
], utilityList: utilityList, isAssistantThinking: false, isCustomScreen: showChatPlaceholder, customScreenJsx: jsxRuntime.jsx(ChatPlaceholder, { dateFormat: dateFormat, chatDataRef: chatDataRef, currentMode: currentMode, setShowChatPlaceholder: setShowChatPlaceholder, setLoader: setLoader, setCurrentAgentId: setCurrentAgentId, baseUrl: baseUrl, setBaseUrl: setBaseUrl, setCurrentSessionId: setCurrentSessionId, customChatConfig: customChatConfig, chatDataInfoRef: chatDataInfoRef, setChatDataState: setChatDataState, userInput: userInput, legacyAgentScreen: legacyAgentScreen, activeConversationId: activeConversationId, chatBodyRef: chatBodyRef, chatbotContext: chatbotContext, setInitValue: setInitValue, setSessionId: setSessionId, thinkingContent: thinkingContext?.thinkingContent, setThinkingContent: setThinkingContent, isThinking: isThinking, setIsThinking: setIsThinking, chatId: chatId, setChatId: setChatId, isStop: isStop, setIsStop: setIsStop, functionsRef: functionsRef, functionsState: functionsState, setFunctionsState: setFunctionsState, thinkingHeaderMessage: thinkingContext?.thinkingHeaderMessage, setThinkingHeaderMessage: setThinkingHeaderMessage, uniqueChatId: uniqueChatId, setUniqueChatId: setUniqueChatId, fieldNumber: fieldNumber, setFieldNumber: setFieldNumber, setAdditionalArgs: setAdditionalArgs, displayQuestions: displayQuestions, questions: questions, setActiveConversationId: setActiveConversationId }), inputText: userInput, threadList: ["Home"], hideMenuArrow: hideMenu, newChatScreen: newChatScreen, isModuleListLoading: modulesLoading, suggestionBanner: {
|
|
11223
11245
|
freeTextHeading: "Try adding more details :",
|
|
11224
11246
|
freeTextContent: "Alan works better when you provide more context and pointed questions",
|
|
11225
11247
|
}, isStopIcon: isStop, onStopIconClick: onStopIconClick, footerText: "AI-generated responses may contain errors\u2014please verify important information", showSuggestionBanner: showSuggestionBanner, onCloseSuggestionBanner: () => {
|