@bolttech/form-engine-core 1.0.1-beta.1 → 1.0.1-beta.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/index.esm.js +10 -6
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -735,18 +735,21 @@ const custom = (value, masks) => {
|
|
|
735
735
|
let mask = '';
|
|
736
736
|
let index = 0;
|
|
737
737
|
const convertedValue = value.replace(/[^\w\s]/gi, '');
|
|
738
|
-
for (
|
|
739
|
-
if (
|
|
738
|
+
for (const char of masks.custom) {
|
|
739
|
+
if (char === '#') {
|
|
740
740
|
if (index < convertedValue.length) {
|
|
741
741
|
mask += convertedValue[index];
|
|
742
742
|
index++;
|
|
743
743
|
} else {
|
|
744
744
|
break;
|
|
745
745
|
}
|
|
746
|
-
} else {
|
|
747
|
-
mask +=
|
|
746
|
+
} else if (index <= convertedValue.length) {
|
|
747
|
+
mask += char;
|
|
748
748
|
}
|
|
749
749
|
}
|
|
750
|
+
if (value.length < mask.length) {
|
|
751
|
+
mask = mask.replace(/[^\w]+$/, '');
|
|
752
|
+
}
|
|
750
753
|
return mask;
|
|
751
754
|
};
|
|
752
755
|
|
|
@@ -4350,8 +4353,9 @@ class FormGroup {
|
|
|
4350
4353
|
formIndex
|
|
4351
4354
|
}) => ids.includes(formIndex)), groupBy(({
|
|
4352
4355
|
event,
|
|
4353
|
-
formIndex
|
|
4354
|
-
|
|
4356
|
+
formIndex,
|
|
4357
|
+
fieldIndex
|
|
4358
|
+
}) => `${event}.${formIndex}.${fieldIndex}`), mergeMap(group$ => group$.pipe(debounceTime(this.config.defaultStateRefreshTimeMS))), map(({
|
|
4355
4359
|
fieldIndex,
|
|
4356
4360
|
formIndex
|
|
4357
4361
|
}) => ids.reduce((acc, curr) => {
|