@everymatrix/cashier-method-details 1.28.5 → 1.28.6
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@everymatrix/cashier-method-details",
|
3
|
-
"version": "1.28.
|
3
|
+
"version": "1.28.6",
|
4
4
|
"main": "index.js",
|
5
5
|
"svelte": "src/index.ts",
|
6
6
|
"scripts": {
|
@@ -35,5 +35,5 @@
|
|
35
35
|
"publishConfig": {
|
36
36
|
"access": "public"
|
37
37
|
},
|
38
|
-
"gitHead": "
|
38
|
+
"gitHead": "1962d52e7f4ec718d6318e592deea4b535abde4a"
|
39
39
|
}
|
@@ -452,6 +452,7 @@
|
|
452
452
|
if (data.ResponseCode !== 'Success') {
|
453
453
|
errorResponseCode = data.ResponseCode
|
454
454
|
isProcessingTxn = false;
|
455
|
+
toggleDisableActionOnPage();
|
455
456
|
showModal()
|
456
457
|
return;
|
457
458
|
}
|
@@ -638,9 +639,27 @@
|
|
638
639
|
}
|
639
640
|
return ''
|
640
641
|
}
|
642
|
+
|
643
|
+
const patternValidator = (pattern, value) => {
|
644
|
+
if (!pattern) return true;
|
645
|
+
let regex;
|
646
|
+
let regexStr;
|
647
|
+
if (typeof pattern === 'string') {
|
648
|
+
regexStr = '';
|
649
|
+
if (pattern.charAt(0) !== '^') regexStr += '^';
|
650
|
+
regexStr += pattern;
|
651
|
+
if (pattern.charAt(pattern.length - 1) !== '$') regexStr += '$';
|
652
|
+
regex = new RegExp(regexStr);
|
653
|
+
}
|
654
|
+
else {
|
655
|
+
regexStr = pattern.toString();
|
656
|
+
regex = pattern;
|
657
|
+
}
|
658
|
+
return regex.test(value);
|
659
|
+
}
|
641
660
|
|
642
661
|
const patternMatchesError = (field, value):string => {
|
643
|
-
if (field.format && value && !
|
662
|
+
if (field.format && value && !patternValidator(field.format, value)) {
|
644
663
|
return $_('invalidFieldError',{ values: { field: field.label }})
|
645
664
|
}
|
646
665
|
return ''
|
@@ -685,7 +704,7 @@
|
|
685
704
|
<img src={selectedPaymentMethod.Logos[0] && selectedPaymentMethod.Logos[0].LogoUrl} alt={selectedPaymentMethod.Label} />
|
686
705
|
</div>
|
687
706
|
<div class="SelectedLogoDescription">
|
688
|
-
{selectedPaymentMethod.Label}
|
707
|
+
{selectedPaymentMethod.Label || selectedPaymentMethod.Name}
|
689
708
|
</div>
|
690
709
|
{#if mobileView}
|
691
710
|
<div on:click={() => backToMethodList()} class="ChangePaymeth">{$_('change')}</div>
|