@mychoice/mychoice-sdk-modules 2.1.40 → 2.1.42
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/dist/cjs/index.js +6 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +6 -3
- package/dist/esm/index.js.map +1 -1
- package/package.json +4 -4
package/dist/cjs/index.js
CHANGED
|
@@ -1571,10 +1571,10 @@ const getDynamicLicenceBoxProps = ({ isAlbertaProvince, isOntarioProvince, isNew
|
|
|
1571
1571
|
if (isAlbertaProvince) {
|
|
1572
1572
|
return {
|
|
1573
1573
|
placeholder: 'AB1234',
|
|
1574
|
-
maxLength:
|
|
1574
|
+
maxLength: 10,
|
|
1575
1575
|
manipulateInput: (value) => {
|
|
1576
1576
|
if (value.length > 6)
|
|
1577
|
-
return value.replace(/-/g, '').replace(/^(.{
|
|
1577
|
+
return value.replace(/-/g, '').replace(/^(.{6})(.)/, '$1-$2');
|
|
1578
1578
|
return value;
|
|
1579
1579
|
},
|
|
1580
1580
|
};
|
|
@@ -1583,7 +1583,10 @@ const getDynamicLicenceBoxProps = ({ isAlbertaProvince, isOntarioProvince, isNew
|
|
|
1583
1583
|
return {
|
|
1584
1584
|
placeholder: 'V1234-12345-12345',
|
|
1585
1585
|
maxLength: 17,
|
|
1586
|
-
manipulateInput: (value) =>
|
|
1586
|
+
manipulateInput: (value) => value
|
|
1587
|
+
.replace(/ /g, '')
|
|
1588
|
+
.replace(/-/g, '')
|
|
1589
|
+
.replace(/.{5}(?=.)/g, '$&-'),
|
|
1587
1590
|
};
|
|
1588
1591
|
}
|
|
1589
1592
|
if (isNewfoundlandProvince) {
|