@everymatrix/cashier-method-details 1.28.4 → 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
|
}
|
@@ -227,6 +227,7 @@
|
|
227
227
|
flatpickr(el, {dateFormat: dateformat}).destroy();
|
228
228
|
})
|
229
229
|
}
|
230
|
+
showReceiptPage = false;
|
230
231
|
flatpickrEl = [];
|
231
232
|
fields = [];
|
232
233
|
prepareFields = {};
|
@@ -278,7 +279,7 @@
|
|
278
279
|
if(!el) {
|
279
280
|
return;
|
280
281
|
}
|
281
|
-
|
282
|
+
flatpickr(flatpickrEl, {...dateOptions[el.dataset.type], maxDate: el.dataset.maxvalue, minDate: el.dataset.minvalue})
|
282
283
|
});
|
283
284
|
}
|
284
285
|
const setActiveLanguage = ():void => {
|
@@ -451,6 +452,7 @@
|
|
451
452
|
if (data.ResponseCode !== 'Success') {
|
452
453
|
errorResponseCode = data.ResponseCode
|
453
454
|
isProcessingTxn = false;
|
455
|
+
toggleDisableActionOnPage();
|
454
456
|
showModal()
|
455
457
|
return;
|
456
458
|
}
|
@@ -637,9 +639,27 @@
|
|
637
639
|
}
|
638
640
|
return ''
|
639
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
|
+
}
|
640
660
|
|
641
661
|
const patternMatchesError = (field, value):string => {
|
642
|
-
if (field.format && value && !
|
662
|
+
if (field.format && value && !patternValidator(field.format, value)) {
|
643
663
|
return $_('invalidFieldError',{ values: { field: field.label }})
|
644
664
|
}
|
645
665
|
return ''
|
@@ -684,7 +704,7 @@
|
|
684
704
|
<img src={selectedPaymentMethod.Logos[0] && selectedPaymentMethod.Logos[0].LogoUrl} alt={selectedPaymentMethod.Label} />
|
685
705
|
</div>
|
686
706
|
<div class="SelectedLogoDescription">
|
687
|
-
{selectedPaymentMethod.Label}
|
707
|
+
{selectedPaymentMethod.Label || selectedPaymentMethod.Name}
|
688
708
|
</div>
|
689
709
|
{#if mobileView}
|
690
710
|
<div on:click={() => backToMethodList()} class="ChangePaymeth">{$_('change')}</div>
|
@@ -744,6 +764,8 @@
|
|
744
764
|
{:else if field.type === FieldTypes.Time || field.type === FieldTypes.Date || field.type === FieldTypes.DateTime}
|
745
765
|
<input type="text" bind:value={ prepareFields[field.name] } pattern={field.format}
|
746
766
|
data-type={field.type}
|
767
|
+
data-maxvalue={field.maxValue}
|
768
|
+
data-minvalue={field.minValue}
|
747
769
|
placeholder={field.placeholder}
|
748
770
|
on:input={() => { validateField(field) }}
|
749
771
|
on:change={() => { showError[field.name] = true; validateField(field) }}
|
@@ -933,10 +955,10 @@
|
|
933
955
|
}
|
934
956
|
.ReceiptPage {
|
935
957
|
background-color: var(--emw--color-gray-transparency-100, rgb(255, 255, 255));
|
936
|
-
border-radius: 6px;
|
937
|
-
box-shadow: 0 2px 6px 0 rgba(0, 0, 0,
|
938
|
-
padding: 0
|
939
|
-
margin-bottom: 10px;
|
958
|
+
border-radius: var(--mmw--border-radius-medium-plus, 6px);
|
959
|
+
box-shadow: 0 2px 6px 0 var(--mmw--color-black-transparency-10, rgba(0, 0, 0, .1));
|
960
|
+
padding: 0 var(--emw--spacing-small, 12px);
|
961
|
+
margin-bottom: var(--emw--spacing-small-minus, 10px);
|
940
962
|
}
|
941
963
|
.MethodsDetails {
|
942
964
|
position: relative;
|