lisichatbot 2.2.4 → 2.2.6
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 +20 -1
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -1213,6 +1213,7 @@ function renderMinMaxInputs(field, customConfig, existingData, hasMatchingNormal
|
|
|
1213
1213
|
minInput.setAttribute('inputmode', 'numeric'); // Show numeric keyboard on mobile
|
|
1214
1214
|
minInput.setAttribute('data-min', customConfig.min !== undefined ? customConfig.min : 0);
|
|
1215
1215
|
minInput.setAttribute('data-max', customConfig.max !== undefined ? customConfig.max : 100);
|
|
1216
|
+
if (customConfig.minPlaceholder) minInput.setAttribute('placeholder', customConfig.minPlaceholder);
|
|
1216
1217
|
|
|
1217
1218
|
if (showMinMax && existingData[0] !== undefined) {
|
|
1218
1219
|
const numValue = Number(existingData[0]);
|
|
@@ -1237,6 +1238,7 @@ function renderMinMaxInputs(field, customConfig, existingData, hasMatchingNormal
|
|
|
1237
1238
|
maxInput.setAttribute('inputmode', 'numeric'); // Show numeric keyboard on mobile
|
|
1238
1239
|
maxInput.setAttribute('data-min', customConfig.min !== undefined ? customConfig.min : 0);
|
|
1239
1240
|
maxInput.setAttribute('data-max', customConfig.max !== undefined ? customConfig.max : 100);
|
|
1241
|
+
if (customConfig.maxPlaceholder) maxInput.setAttribute('placeholder', customConfig.maxPlaceholder);
|
|
1240
1242
|
|
|
1241
1243
|
if (showMinMax && existingData[1] !== undefined) {
|
|
1242
1244
|
const numValue = Number(existingData[1]);
|
|
@@ -3653,6 +3655,23 @@ function init(flowName, flowConfig, options = {}) {
|
|
|
3653
3655
|
if (flowConfig.config) {
|
|
3654
3656
|
Object.assign(config, flowConfig.config);
|
|
3655
3657
|
}
|
|
3658
|
+
|
|
3659
|
+
// Inject mobile breakpoint styles if configured
|
|
3660
|
+
if (config.mobileBreakpoint) {
|
|
3661
|
+
const mobileStyleId = 'cf-mobile-styles';
|
|
3662
|
+
let mobileStyle = document.getElementById(mobileStyleId);
|
|
3663
|
+
if (mobileStyle) mobileStyle.remove();
|
|
3664
|
+
mobileStyle = document.createElement('style');
|
|
3665
|
+
mobileStyle.id = mobileStyleId;
|
|
3666
|
+
mobileStyle.textContent = `
|
|
3667
|
+
@media (max-width: ${config.mobileBreakpoint}px) {
|
|
3668
|
+
[data-chat-element="user-message-wrapper"] {
|
|
3669
|
+
margin-bottom: 0.375rem !important;
|
|
3670
|
+
}
|
|
3671
|
+
}
|
|
3672
|
+
`;
|
|
3673
|
+
document.head.appendChild(mobileStyle);
|
|
3674
|
+
}
|
|
3656
3675
|
|
|
3657
3676
|
if (flowConfig.customRangeErrors) {
|
|
3658
3677
|
// console.log('✅ Using custom range errors from flow object');
|
|
@@ -4003,7 +4022,7 @@ function injectStyles() {
|
|
|
4003
4022
|
style.id = styleId;
|
|
4004
4023
|
style.textContent = `
|
|
4005
4024
|
[data-chat-element="user-message-wrapper"] {
|
|
4006
|
-
margin-bottom:
|
|
4025
|
+
margin-bottom: 16px;
|
|
4007
4026
|
display: inline-flex;
|
|
4008
4027
|
max-width: 70%;
|
|
4009
4028
|
align-self: flex-end;
|