lisichatbot 1.9.2 → 1.9.3

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +5 -16
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisichatbot",
3
- "version": "1.9.2",
3
+ "version": "1.9.3",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "exports": {
package/src/index.js CHANGED
@@ -1177,7 +1177,7 @@ function renderMinMaxInputs(field, customConfig, existingData, hasMatchingNormal
1177
1177
  }
1178
1178
 
1179
1179
  minInput.onchange = () => {
1180
- selectCustomOption(field);
1180
+ // ✅ Don't auto-select custom option - only select when explicitly clicked
1181
1181
  // Remove non-numeric characters except minus sign at start
1182
1182
  let value = minInput.value.replace(/[^\d-]/g, '');
1183
1183
  if (value.indexOf('-') > 0) {
@@ -1196,7 +1196,7 @@ function renderMinMaxInputs(field, customConfig, existingData, hasMatchingNormal
1196
1196
  };
1197
1197
 
1198
1198
  maxInput.onchange = () => {
1199
- selectCustomOption(field);
1199
+ // ✅ Don't auto-select custom option - only select when explicitly clicked
1200
1200
  // Remove non-numeric characters except minus sign at start
1201
1201
  let value = maxInput.value.replace(/[^\d-]/g, '');
1202
1202
  if (value.indexOf('-') > 0) {
@@ -2067,20 +2067,9 @@ async function handleNext() {
2067
2067
 
2068
2068
  if (!validation.valid) {
2069
2069
  if (validation.error) {
2070
- console.log(' ⚠️ Validation failed in handleNext, showing error message');
2071
-
2072
- const optionsWrapper = document.querySelector('[data-chat-element="options-wrapper"]');
2073
- if (optionsWrapper) {
2074
- optionsWrapper.style.display = 'none';
2075
- }
2076
-
2077
- const rangeWrapper = document.querySelector(`[data-chat-element="range-wrapper"][data-field="${field}"]`);
2078
- if (rangeWrapper) {
2079
- rangeWrapper.style.display = 'none';
2080
- }
2081
-
2082
- addMessage(validation.error, 'bot', false, null);
2083
- await showNextStep();
2070
+ console.log(' ⚠️ Validation failed in handleNext - error shown in error div');
2071
+ // ✅ Error is already shown in the error div by validateMinMax
2072
+ // Don't hide options or add bot message - just stop progression
2084
2073
  } else {
2085
2074
  console.log(' ⚠️ Validation incomplete, waiting for user input');
2086
2075
  }