@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/esm/index.js
CHANGED
|
@@ -1561,10 +1561,10 @@ const getDynamicLicenceBoxProps = ({ isAlbertaProvince, isOntarioProvince, isNew
|
|
|
1561
1561
|
if (isAlbertaProvince) {
|
|
1562
1562
|
return {
|
|
1563
1563
|
placeholder: 'AB1234',
|
|
1564
|
-
maxLength:
|
|
1564
|
+
maxLength: 10,
|
|
1565
1565
|
manipulateInput: (value) => {
|
|
1566
1566
|
if (value.length > 6)
|
|
1567
|
-
return value.replace(/-/g, '').replace(/^(.{
|
|
1567
|
+
return value.replace(/-/g, '').replace(/^(.{6})(.)/, '$1-$2');
|
|
1568
1568
|
return value;
|
|
1569
1569
|
},
|
|
1570
1570
|
};
|
|
@@ -1573,7 +1573,10 @@ const getDynamicLicenceBoxProps = ({ isAlbertaProvince, isOntarioProvince, isNew
|
|
|
1573
1573
|
return {
|
|
1574
1574
|
placeholder: 'V1234-12345-12345',
|
|
1575
1575
|
maxLength: 17,
|
|
1576
|
-
manipulateInput: (value) =>
|
|
1576
|
+
manipulateInput: (value) => value
|
|
1577
|
+
.replace(/ /g, '')
|
|
1578
|
+
.replace(/-/g, '')
|
|
1579
|
+
.replace(/.{5}(?=.)/g, '$&-'),
|
|
1577
1580
|
};
|
|
1578
1581
|
}
|
|
1579
1582
|
if (isNewfoundlandProvince) {
|