lisichatbot 1.7.0 → 1.7.2
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/package.json +1 -1
- package/src/index.js +60 -0
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -1111,6 +1111,21 @@ function renderMinMaxInputs(field, customConfig, existingData) {
|
|
|
1111
1111
|
rangeWrapper.appendChild(errorDiv);
|
|
1112
1112
|
|
|
1113
1113
|
elements.messages.appendChild(rangeWrapper);
|
|
1114
|
+
|
|
1115
|
+
// ✅ Multiple scrolls to ensure range inputs are visible
|
|
1116
|
+
scrollToBottom(); // Immediate
|
|
1117
|
+
|
|
1118
|
+
setTimeout(() => {
|
|
1119
|
+
scrollToBottom();
|
|
1120
|
+
}, 50);
|
|
1121
|
+
|
|
1122
|
+
setTimeout(() => {
|
|
1123
|
+
scrollToBottom();
|
|
1124
|
+
}, 150);
|
|
1125
|
+
|
|
1126
|
+
setTimeout(() => {
|
|
1127
|
+
scrollToBottom();
|
|
1128
|
+
}, 300);
|
|
1114
1129
|
|
|
1115
1130
|
if (minInput && maxInput) {
|
|
1116
1131
|
const updateVisualFeedback = () => {
|
|
@@ -1180,6 +1195,21 @@ function selectCustomOption(field) {
|
|
|
1180
1195
|
const rangeWrapper = document.querySelector(`[data-chat-element="range-wrapper"][data-field="${field}"]`);
|
|
1181
1196
|
if (rangeWrapper) {
|
|
1182
1197
|
rangeWrapper.style.display = 'flex';
|
|
1198
|
+
|
|
1199
|
+
// ✅ Multiple scrolls to ensure range inputs are visible
|
|
1200
|
+
scrollToBottom();
|
|
1201
|
+
|
|
1202
|
+
setTimeout(() => {
|
|
1203
|
+
scrollToBottom();
|
|
1204
|
+
}, 50);
|
|
1205
|
+
|
|
1206
|
+
setTimeout(() => {
|
|
1207
|
+
scrollToBottom();
|
|
1208
|
+
}, 150);
|
|
1209
|
+
|
|
1210
|
+
setTimeout(() => {
|
|
1211
|
+
scrollToBottom();
|
|
1212
|
+
}, 300);
|
|
1183
1213
|
}
|
|
1184
1214
|
}
|
|
1185
1215
|
|
|
@@ -1253,6 +1283,29 @@ function handleCustomSelectClick(element, field, customConfig) {
|
|
|
1253
1283
|
|
|
1254
1284
|
if (rangeWrapper) {
|
|
1255
1285
|
rangeWrapper.style.display = 'flex';
|
|
1286
|
+
|
|
1287
|
+
// ✅ Aggressive scrolling to show range inputs
|
|
1288
|
+
console.log(' 📜 Custom selected - scrolling to show range inputs');
|
|
1289
|
+
|
|
1290
|
+
// Immediate scroll
|
|
1291
|
+
scrollToBottom();
|
|
1292
|
+
|
|
1293
|
+
// Multiple delayed scrolls to ensure visibility
|
|
1294
|
+
setTimeout(() => {
|
|
1295
|
+
scrollToBottom();
|
|
1296
|
+
}, 50);
|
|
1297
|
+
|
|
1298
|
+
setTimeout(() => {
|
|
1299
|
+
scrollToBottom();
|
|
1300
|
+
}, 150);
|
|
1301
|
+
|
|
1302
|
+
setTimeout(() => {
|
|
1303
|
+
scrollToBottom();
|
|
1304
|
+
}, 300);
|
|
1305
|
+
|
|
1306
|
+
setTimeout(() => {
|
|
1307
|
+
scrollToBottom();
|
|
1308
|
+
}, 500);
|
|
1256
1309
|
}
|
|
1257
1310
|
|
|
1258
1311
|
chatState.currentSelection = null;
|
|
@@ -3025,6 +3078,13 @@ function handleCompletion() {
|
|
|
3025
3078
|
chatState.completed = true;
|
|
3026
3079
|
console.log(' 🏁 Flow marked as completed');
|
|
3027
3080
|
|
|
3081
|
+
// ✅ Hide all range wrappers (single-select-custom inputs)
|
|
3082
|
+
const allRangeWrappers = document.querySelectorAll('[data-chat-element="range-wrapper"]');
|
|
3083
|
+
allRangeWrappers.forEach(wrapper => {
|
|
3084
|
+
wrapper.style.display = 'none';
|
|
3085
|
+
});
|
|
3086
|
+
console.log(' 🙈 Hidden all range-wrappers on completion');
|
|
3087
|
+
|
|
3028
3088
|
updateEditIcons();
|
|
3029
3089
|
|
|
3030
3090
|
if (elements.nextBtn) {
|