@xsolla/payment-client-core 0.0.10-3 → 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(),
@@ -2933,17 +2950,17 @@ class CoreLibraryService {
2933
2950
  return this.legalService.getLegalComponentConfig();
2934
2951
  }
2935
2952
  getControlMask(field) {
2936
- return this.paymentService.getFieldConfig(field);
2953
+ return this.maskConfigService.getFieldMask(field);
2937
2954
  }
2938
2955
  }
2939
- 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 });
2940
2957
  CoreLibraryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CoreLibraryService, providedIn: 'root' });
2941
2958
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CoreLibraryService, decorators: [{
2942
2959
  type: Injectable,
2943
2960
  args: [{
2944
2961
  providedIn: 'root',
2945
2962
  }]
2946
- }], 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 }]; } });
2947
2964
 
2948
2965
  class HttpError extends AppError {
2949
2966
  constructor(error, req) {
@@ -3054,6 +3071,7 @@ CoreLibraryModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versi
3054
3071
  useValue: nextActions,
3055
3072
  },
3056
3073
  ...nextActions,
3074
+ MaskConfigService
3057
3075
  ], imports: [HttpClientModule, FormModule] });
3058
3076
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CoreLibraryModule, decorators: [{
3059
3077
  type: NgModule,
@@ -3084,31 +3102,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
3084
3102
  useValue: nextActions,
3085
3103
  },
3086
3104
  ...nextActions,
3105
+ MaskConfigService
3087
3106
  ],
3088
3107
  }]
3089
3108
  }] });
3090
3109
 
3091
- class MaskConfigService {
3092
- constructor(controlConfigService) {
3093
- this.controlConfigService = controlConfigService;
3094
- }
3095
- getFieldMask(field) {
3096
- const config = this.controlConfigService.getConfig(field);
3097
- if (config?.maskConfig?.mask) {
3098
- return config?.maskConfig?.mask;
3099
- }
3100
- return;
3101
- }
3102
- }
3103
- MaskConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: MaskConfigService, deps: [{ token: ControlConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
3104
- MaskConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: MaskConfigService, providedIn: 'root' });
3105
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: MaskConfigService, decorators: [{
3106
- type: Injectable,
3107
- args: [{
3108
- providedIn: 'root'
3109
- }]
3110
- }], ctorParameters: function () { return [{ type: ControlConfigService }]; } });
3111
-
3112
3110
  /*
3113
3111
  * Public API Surface of core-library
3114
3112
  */
@@ -3117,5 +3115,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
3117
3115
  * Generated bundle index. Do not edit.
3118
3116
  */
3119
3117
 
3120
- export { CoreLibraryModule, CoreLibraryService, MaskConfigService };
3118
+ export { CoreLibraryModule, CoreLibraryService };
3121
3119
  //# sourceMappingURL=xsolla-payment-client-core.mjs.map