lisichatbot 1.7.2 → 1.7.4

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 +60 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisichatbot",
3
- "version": "1.7.2",
3
+ "version": "1.7.4",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "exports": {
package/src/index.js CHANGED
@@ -981,7 +981,29 @@ function renderCustomSelectOptions(options, field, customConfig) {
981
981
 
982
982
  elements.messages.appendChild(optionsWrapper);
983
983
  renderMinMaxInputs(field, customConfig, existingData);
984
+
985
+ // ✅ Very aggressive scrolling to ensure all options are visible
984
986
  scrollToBottom();
987
+
988
+ setTimeout(() => {
989
+ scrollToBottom();
990
+ }, 50);
991
+
992
+ setTimeout(() => {
993
+ scrollToBottom();
994
+ }, 150);
995
+
996
+ setTimeout(() => {
997
+ scrollToBottom();
998
+ }, 300);
999
+
1000
+ setTimeout(() => {
1001
+ scrollToBottom();
1002
+ }, 500);
1003
+
1004
+ setTimeout(() => {
1005
+ scrollToBottom();
1006
+ }, 800);
985
1007
 
986
1008
  const optionElements = optionsWrapper.querySelectorAll('[data-chat-input-element="container"]');
987
1009
  optionElements.forEach(el => {
@@ -2940,6 +2962,31 @@ async function showNextStep() {
2940
2962
  nextStep.input.custom
2941
2963
  );
2942
2964
 
2965
+ // ✅ Very aggressive delayed scrolls to ensure all options are visible
2966
+ setTimeout(() => {
2967
+ scrollToBottom();
2968
+ }, 100);
2969
+
2970
+ setTimeout(() => {
2971
+ scrollToBottom();
2972
+ }, 200);
2973
+
2974
+ setTimeout(() => {
2975
+ scrollToBottom();
2976
+ }, 350);
2977
+
2978
+ setTimeout(() => {
2979
+ scrollToBottom();
2980
+ }, 500);
2981
+
2982
+ setTimeout(() => {
2983
+ scrollToBottom();
2984
+ }, 700);
2985
+
2986
+ setTimeout(() => {
2987
+ scrollToBottom();
2988
+ }, 1000);
2989
+
2943
2990
  // ✅ Check if pre-filled - renderCustomSelectOptions handles enabling if pre-filled
2944
2991
  const existingData = chatState.data[nextStep.input.field];
2945
2992
  const hasPreFill = existingData !== undefined && existingData !== null;
@@ -3085,6 +3132,19 @@ function handleCompletion() {
3085
3132
  });
3086
3133
  console.log(' 🙈 Hidden all range-wrappers on completion');
3087
3134
 
3135
+ // ✅ Hide all text and number inputs
3136
+ const allTextInputs = document.querySelectorAll('[data-chat-element="text-input"]');
3137
+ allTextInputs.forEach(input => {
3138
+ input.style.display = 'none';
3139
+ });
3140
+ console.log(' 🙈 Hidden all text-inputs on completion');
3141
+
3142
+ const allNumberInputs = document.querySelectorAll('[data-chat-element="number-input"]');
3143
+ allNumberInputs.forEach(input => {
3144
+ input.style.display = 'none';
3145
+ });
3146
+ console.log(' 🙈 Hidden all number-inputs on completion');
3147
+
3088
3148
  updateEditIcons();
3089
3149
 
3090
3150
  if (elements.nextBtn) {