@xsolla/payment-client-core 0.0.10-2 → 0.0.10-4

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.
@@ -959,7 +959,6 @@ class SyncService extends EmitDataService {
959
959
  if (!this.isReadyField(field)) {
960
960
  return Promise.resolve(null);
961
961
  }
962
- debugger;
963
962
  const control = this.form.get(field.name);
964
963
  const value = control?.value;
965
964
  const prevFieldState = this.getPrevFieldSyncState(field);
@@ -975,7 +974,6 @@ class SyncService extends EmitDataService {
975
974
  const requestPromise = this.request(field);
976
975
  this.setPrevFieldSyncState(field, value, requestPromise);
977
976
  return requestPromise.then((response) => {
978
- debugger;
979
977
  return response.rewritableError ?? null;
980
978
  });
981
979
  }
@@ -2886,8 +2884,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
2886
2884
  }]
2887
2885
  }], ctorParameters: function () { return [{ type: SettingsService }, { type: RefundPolicyService }, { type: SecureConnectionService }, { type: DisclaimerService }]; } });
2888
2886
 
2887
+ class MaskConfigService {
2888
+ constructor(controlConfigService) {
2889
+ this.controlConfigService = controlConfigService;
2890
+ }
2891
+ getFieldMask(field) {
2892
+ const config = this.controlConfigService.getConfig(field);
2893
+ if (config?.maskConfig?.mask) {
2894
+ return config?.maskConfig?.mask;
2895
+ }
2896
+ return;
2897
+ }
2898
+ }
2899
+ MaskConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: MaskConfigService, deps: [{ token: ControlConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
2900
+ MaskConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: MaskConfigService });
2901
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: MaskConfigService, decorators: [{
2902
+ type: Injectable
2903
+ }], ctorParameters: function () { return [{ type: ControlConfigService }]; } });
2904
+
2889
2905
  class CoreLibraryService {
2890
- constructor(settingsService, countryService, paymentMethodsService, savedMethodsService, userBalanceService, paymentService, deviceFingerPrintService, financeDetailsService, legalService, nextActionService) {
2906
+ constructor(settingsService, countryService, paymentMethodsService, savedMethodsService, userBalanceService, paymentService, deviceFingerPrintService, financeDetailsService, legalService, nextActionService, maskConfigService) {
2891
2907
  this.settingsService = settingsService;
2892
2908
  this.countryService = countryService;
2893
2909
  this.paymentMethodsService = paymentMethodsService;
@@ -2898,6 +2914,7 @@ class CoreLibraryService {
2898
2914
  this.financeDetailsService = financeDetailsService;
2899
2915
  this.legalService = legalService;
2900
2916
  this.nextActionService = nextActionService;
2917
+ this.maskConfigService = maskConfigService;
2901
2918
  this.paymentMethods = {
2902
2919
  getList: async () => this.paymentMethodsService.getList(),
2903
2920
  getQuickMethods: async () => this.paymentMethodsService.getQuickMethods(),
@@ -2932,15 +2949,18 @@ class CoreLibraryService {
2932
2949
  getLegalComponentConfig() {
2933
2950
  return this.legalService.getLegalComponentConfig();
2934
2951
  }
2952
+ getControlMask(field) {
2953
+ return this.maskConfigService.getFieldMask(field);
2954
+ }
2935
2955
  }
2936
- 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 });
2956
+ 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 }, { token: MaskConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
2937
2957
  CoreLibraryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CoreLibraryService, providedIn: 'root' });
2938
2958
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CoreLibraryService, decorators: [{
2939
2959
  type: Injectable,
2940
2960
  args: [{
2941
2961
  providedIn: 'root',
2942
2962
  }]
2943
- }], ctorParameters: function () { return [{ type: SettingsService }, { type: CountryService }, { type: PaymentMethodsService }, { type: SavedMethodsService }, { type: UserBalanceService }, { type: PaymentService }, { type: DeviceFingerPrintService }, { type: FinanceDetailsService }, { type: LegalService }, { type: NextActionService }]; } });
2963
+ }], ctorParameters: function () { return [{ type: SettingsService }, { type: CountryService }, { type: PaymentMethodsService }, { type: SavedMethodsService }, { type: UserBalanceService }, { type: PaymentService }, { type: DeviceFingerPrintService }, { type: FinanceDetailsService }, { type: LegalService }, { type: NextActionService }, { type: MaskConfigService }]; } });
2944
2964
 
2945
2965
  class HttpError extends AppError {
2946
2966
  constructor(error, req) {
@@ -3051,6 +3071,7 @@ CoreLibraryModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versi
3051
3071
  useValue: nextActions,
3052
3072
  },
3053
3073
  ...nextActions,
3074
+ MaskConfigService
3054
3075
  ], imports: [HttpClientModule, FormModule] });
3055
3076
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CoreLibraryModule, decorators: [{
3056
3077
  type: NgModule,
@@ -3081,6 +3102,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
3081
3102
  useValue: nextActions,
3082
3103
  },
3083
3104
  ...nextActions,
3105
+ MaskConfigService
3084
3106
  ],
3085
3107
  }]
3086
3108
  }] });