@xsolla/payment-client-core 0.1.5-3 → 0.1.5

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.
@@ -2279,53 +2279,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
2279
2279
  type: Injectable
2280
2280
  }], ctorParameters: function () { return [{ type: SyncService }]; } });
2281
2281
 
2282
- function phoneValidator() {
2283
- return convert(Validators.pattern(/^\d*$/), 'Enter a valid phone');
2284
- }
2285
-
2286
- function minLengthValidator(minLength) {
2287
- return convert(Validators.minLength(minLength), `Enter at least ${minLength} characters`);
2288
- }
2289
-
2290
- function maxLengthValidator(maxLength) {
2291
- return convert(Validators.maxLength(maxLength), `Enter no more than ${maxLength} characters`);
2292
- }
2293
-
2294
- class PhoneControlConfig extends ControlConfig {
2295
- constructor() {
2296
- super(...arguments);
2297
- this.controlType = 'phone';
2298
- }
2299
- }
2300
-
2301
- class PhoneConverter extends Converter {
2302
- constructor(syncService) {
2303
- super(syncService);
2304
- }
2305
- getValidators(field) {
2306
- const minLength = 10;
2307
- const maxLength = 15;
2308
- return super
2309
- .getValidators(field)
2310
- .concat([
2311
- convertedRequiredValidator(),
2312
- phoneValidator(),
2313
- minLengthValidator(minLength),
2314
- maxLengthValidator(maxLength),
2315
- ]);
2316
- }
2317
- createControlConfig(field) {
2318
- const config = this.createDefaultControlConfig(PhoneControlConfig, field);
2319
- config.inputMode = 'numeric';
2320
- return config;
2321
- }
2322
- }
2323
- PhoneConverter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: PhoneConverter, deps: [{ token: SyncService }], target: i0.ɵɵFactoryTarget.Injectable });
2324
- PhoneConverter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: PhoneConverter });
2325
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: PhoneConverter, decorators: [{
2326
- type: Injectable
2327
- }], ctorParameters: function () { return [{ type: SyncService }]; } });
2328
-
2329
2282
  const convertersMapToken = new InjectionToken('ConvertersTokensMap');
2330
2283
  const convertersMap = {
2331
2284
  zip: ZipConverter,
@@ -2341,7 +2294,6 @@ const convertersMap = {
2341
2294
  birth_date: BirthDateConverter,
2342
2295
  street_number: StreetNumberConverter,
2343
2296
  text: TextConverter,
2344
- phone: PhoneConverter,
2345
2297
  };
2346
2298
 
2347
2299
  class ControlConfigService {
@@ -4545,7 +4497,6 @@ class CoreLibraryService {
4545
4497
  changeFieldValue: (name, value) => this.paymentService.changeFieldValue(name, value),
4546
4498
  changeFieldState: (name, state) => this.paymentService.changeFieldState(name, state),
4547
4499
  },
4548
- getCountry: () => this.countryService.getCountry(),
4549
4500
  };
4550
4501
  }
4551
4502
  getCreditCardService() {
@@ -4662,7 +4613,6 @@ FormModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15
4662
4613
  BirthDateConverter,
4663
4614
  StreetNumberConverter,
4664
4615
  TextConverter,
4665
- PhoneConverter,
4666
4616
  { provide: convertersMapToken, useValue: convertersMap },
4667
4617
  ], imports: [ReactiveFormsModule, ValidatorsModule] });
4668
4618
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FormModule, decorators: [{
@@ -4683,7 +4633,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
4683
4633
  BirthDateConverter,
4684
4634
  StreetNumberConverter,
4685
4635
  TextConverter,
4686
- PhoneConverter,
4687
4636
  { provide: convertersMapToken, useValue: convertersMap },
4688
4637
  ],
4689
4638
  }]