@xsolla/payment-client-core 0.0.10-5 → 0.0.10-6
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/esm2020/lib/core/payment/form/converters/zip.converter.mjs +7 -2
- package/esm2020/lib/core/payment/form/masks-functions.map.mjs +4 -0
- package/esm2020/lib/core-library.service.mjs +6 -1
- package/fesm2015/xsolla-payment-client-core.mjs +13 -1
- package/fesm2015/xsolla-payment-client-core.mjs.map +1 -1
- package/fesm2020/xsolla-payment-client-core.mjs +13 -1
- package/fesm2020/xsolla-payment-client-core.mjs.map +1 -1
- package/lib/core/payment/form/masks-functions.map.d.ts +3 -0
- package/lib/core-library.service.d.ts +2 -0
- package/package.json +1 -1
- package/xsolla-payment-client-core-0.0.10-6.tgz +0 -0
- package/xsolla-payment-client-core-0.0.10-5.tgz +0 -0
|
@@ -7,6 +7,10 @@ import { UntypedFormGroup, Validators, UntypedFormControl, ReactiveFormsModule }
|
|
|
7
7
|
import { filter, map as map$1, catchError } from 'rxjs/operators';
|
|
8
8
|
import * as i1$1 from '@angular/router';
|
|
9
9
|
|
|
10
|
+
const masksFunctionsMap = {
|
|
11
|
+
zip: () => new Array(5).fill('9').join(''),
|
|
12
|
+
};
|
|
13
|
+
|
|
10
14
|
class AppError extends Error {
|
|
11
15
|
constructor(message) {
|
|
12
16
|
super(message);
|
|
@@ -1200,8 +1204,9 @@ class ZipConverter extends Converter {
|
|
|
1200
1204
|
if (this.isUsCountry) {
|
|
1201
1205
|
config.maskConfig = {
|
|
1202
1206
|
// mask: () => new Array(this.usCountryLength).fill('9').join(''),
|
|
1203
|
-
mask: () => new Array(5).fill('9').join(''),
|
|
1207
|
+
// mask: () => new Array(5).fill('9').join(''),
|
|
1204
1208
|
// mask: function() { return new Array(5).fill('9').join('') },
|
|
1209
|
+
// mask: MasksFunctionsMap['zip'],
|
|
1205
1210
|
// mask: function mask() {
|
|
1206
1211
|
// const length = this.usCountryLength;
|
|
1207
1212
|
// return function() {
|
|
@@ -1213,6 +1218,9 @@ class ZipConverter extends Converter {
|
|
|
1213
1218
|
showMask: true,
|
|
1214
1219
|
};
|
|
1215
1220
|
config.inputMode = 'numeric';
|
|
1221
|
+
if (masksFunctionsMap['zip']) {
|
|
1222
|
+
config.maskConfig.mask = masksFunctionsMap['zip'];
|
|
1223
|
+
}
|
|
1216
1224
|
}
|
|
1217
1225
|
else {
|
|
1218
1226
|
config.maxLength = this.maxLength;
|
|
@@ -2938,6 +2946,10 @@ class CoreLibraryService {
|
|
|
2938
2946
|
getLegalComponentConfig() {
|
|
2939
2947
|
return this.legalService.getLegalComponentConfig();
|
|
2940
2948
|
}
|
|
2949
|
+
getFieldMask(field) {
|
|
2950
|
+
const sanitizedName = field.name.replace(/^fix_/i, '');
|
|
2951
|
+
return masksFunctionsMap[sanitizedName];
|
|
2952
|
+
}
|
|
2941
2953
|
}
|
|
2942
2954
|
CoreLibraryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CoreLibraryService, deps: [{ token: SettingsService }, { token: CountryService }, { token: PaymentMethodsService }, { token: SavedMethodsService }, { token: UserBalanceService }, { token: PaymentService }, { token: DeviceFingerPrintService }, { token: FinanceDetailsService }, { token: LegalService }, { token: NextActionService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2943
2955
|
CoreLibraryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CoreLibraryService, providedIn: 'root' });
|