@xsolla/payment-client-core 0.1.5-4 → 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 {
@@ -4527,9 +4479,6 @@ class CoreLibraryService {
4527
4479
  setCountry(country) {
4528
4480
  this.countryService.setCountry(country);
4529
4481
  }
4530
- getCountry() {
4531
- return this.countryService.getCountry();
4532
- }
4533
4482
  createPayment(config) {
4534
4483
  const enrichedConfig = this.paymentConfigService.enrich(config);
4535
4484
  return {
@@ -4664,7 +4613,6 @@ FormModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15
4664
4613
  BirthDateConverter,
4665
4614
  StreetNumberConverter,
4666
4615
  TextConverter,
4667
- PhoneConverter,
4668
4616
  { provide: convertersMapToken, useValue: convertersMap },
4669
4617
  ], imports: [ReactiveFormsModule, ValidatorsModule] });
4670
4618
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FormModule, decorators: [{
@@ -4685,7 +4633,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
4685
4633
  BirthDateConverter,
4686
4634
  StreetNumberConverter,
4687
4635
  TextConverter,
4688
- PhoneConverter,
4689
4636
  { provide: convertersMapToken, useValue: convertersMap },
4690
4637
  ],
4691
4638
  }]