@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.
@@ -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' });