@xsolla/payment-client-core 0.1.5 → 0.1.6-1
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.
- package/esm2020/lib/core/payment/form/controls/card-number/card-number-control.config.mjs +10 -0
- package/esm2020/lib/core/payment/form/controls/checkbox/checkbox-control.config.mjs +10 -0
- package/esm2020/lib/core/payment/form/controls/coupon/coupon-control.config.mjs +8 -0
- package/esm2020/lib/core/payment/form/controls/phone-control.config.mjs +8 -0
- package/esm2020/lib/core/payment/form/controls/radio-control/radio-control.config.mjs +9 -0
- package/esm2020/lib/core/payment/form/controls/radio-control/radio-option.interface.mjs +2 -0
- package/esm2020/lib/core/payment/form/controls/search-select/search-select-control.config.mjs +8 -0
- package/esm2020/lib/core/payment/form/controls/search-select/search-select-option.interface.mjs +2 -0
- package/esm2020/lib/core/payment/form/controls/search-select/select-option.interface.mjs +2 -0
- package/esm2020/lib/core/payment/form/converters/birth-date/birth-date.converter.mjs +38 -0
- package/esm2020/lib/core/payment/form/converters/card-month/card-month.converter.mjs +38 -0
- package/esm2020/lib/core/payment/form/converters/card-number/card-number.converter.mjs +45 -0
- package/esm2020/lib/core/payment/form/converters/card-year/card-year.converter.mjs +38 -0
- package/esm2020/lib/core/payment/form/converters/cardholder-name/cardholder-name.converter.mjs +25 -0
- package/esm2020/lib/core/payment/form/converters/checkbox/checkbox.converter.mjs +34 -0
- package/esm2020/lib/core/payment/form/converters/converter.abstract.mjs +4 -3
- package/esm2020/lib/core/payment/form/converters/converters-map.mjs +34 -16
- package/esm2020/lib/core/payment/form/converters/coupon/coupon.converter.mjs +25 -0
- package/esm2020/lib/core/payment/form/converters/cpf-name/cpf-name-regex.variable.mjs +2 -0
- package/esm2020/lib/core/payment/form/converters/cpf-name/cpf-name.converter.mjs +34 -0
- package/esm2020/lib/core/payment/form/converters/cpf-number/cpf-number.converter.mjs +31 -0
- package/esm2020/lib/core/payment/form/converters/cvv/cvv-form-state.interface.mjs +2 -0
- package/esm2020/lib/core/payment/form/converters/cvv/cvv.converter.mjs +72 -0
- package/esm2020/lib/core/payment/form/converters/email/email.converter.mjs +29 -0
- package/esm2020/lib/core/payment/form/converters/phone.converter.mjs +37 -0
- package/esm2020/lib/core/payment/form/converters/pin/pin.converter.mjs +19 -0
- package/esm2020/lib/core/payment/form/converters/pricepoint/pricepoint.converter.mjs +32 -0
- package/esm2020/lib/core/payment/form/converters/radio-group/radio-group.converter.mjs +21 -0
- package/esm2020/lib/core/payment/form/converters/select/select.converter.mjs +21 -0
- package/esm2020/lib/core/payment/form/converters/street-number/street-number.converter.mjs +2 -2
- package/esm2020/lib/core/payment/form/converters/text/text.converter.mjs +19 -0
- package/esm2020/lib/core/payment/form/converters/zip/zip.converter.mjs +67 -0
- package/esm2020/lib/core/payment/form/field-form-states.interface.mjs +2 -0
- package/esm2020/lib/core/payment/form/form.module.mjs +51 -17
- package/esm2020/lib/core/payment/form/form.service.mjs +19 -1
- package/esm2020/lib/core/payment/form/validators/birth-date/birth-date.validator.mjs +37 -0
- package/esm2020/lib/core/payment/form/validators/card-month/card-month.validator.mjs +37 -0
- package/esm2020/lib/core/payment/form/validators/card-year/card-year.validator.mjs +34 -0
- package/esm2020/lib/core/payment/form/validators/coupon/coupon-validator.mjs +6 -0
- package/esm2020/lib/core/payment/form/validators/credit-card-length/credit-card-min-length.validator.mjs +32 -0
- package/esm2020/lib/core/payment/form/validators/email/email-validator.mjs +7 -0
- package/esm2020/lib/core/payment/form/validators/max-length-validator.mjs +6 -0
- package/esm2020/lib/core/payment/form/validators/min-length-validator.mjs +6 -0
- package/esm2020/lib/core/payment/form/validators/phone-validator.mjs +6 -0
- package/esm2020/lib/core/payment/form/validators/required/required.validator.mjs +6 -0
- package/esm2020/lib/core/payment/form/validators/restricted-value/restricted-value.validator.mjs +6 -0
- package/esm2020/lib/core/payment/form/validators/validators.module.mjs +2 -2
- package/esm2020/lib/core/payment/payment.interface.mjs +1 -1
- package/esm2020/lib/core/payment/payment.service.mjs +6 -1
- package/esm2020/lib/core-library.service.mjs +5 -1
- package/fesm2015/xsolla-payment-client-core.mjs +410 -22
- package/fesm2015/xsolla-payment-client-core.mjs.map +1 -1
- package/fesm2020/xsolla-payment-client-core.mjs +410 -22
- package/fesm2020/xsolla-payment-client-core.mjs.map +1 -1
- package/lib/core/payment/form/controls/{card-number-control.config.d.ts → card-number/card-number-control.config.d.ts} +2 -2
- package/lib/core/payment/form/controls/checkbox/checkbox-control.config.d.ts +6 -0
- package/lib/core/payment/form/controls/coupon/coupon-control.config.d.ts +8 -0
- package/lib/core/payment/form/controls/phone-control.config.d.ts +6 -0
- package/lib/core/payment/form/controls/radio-control/radio-control.config.d.ts +6 -0
- package/lib/core/payment/form/controls/radio-control/radio-option.interface.d.ts +5 -0
- package/lib/core/payment/form/controls/search-select/search-select-control.config.d.ts +11 -0
- package/lib/core/payment/form/controls/search-select/search-select-option.interface.d.ts +19 -0
- package/lib/core/payment/form/controls/search-select/select-option.interface.d.ts +13 -0
- package/lib/core/payment/form/converters/{birth-date.converter.d.ts → birth-date/birth-date.converter.d.ts} +4 -4
- package/lib/core/payment/form/converters/card-month/card-month.converter.d.ts +16 -0
- package/lib/core/payment/form/converters/{card-number.converter.d.ts → card-number/card-number.converter.d.ts} +6 -6
- package/lib/core/payment/form/converters/card-year/card-year.converter.d.ts +16 -0
- package/lib/core/payment/form/converters/{cardholder-name.converter.d.ts → cardholder-name/cardholder-name.converter.d.ts} +4 -4
- package/lib/core/payment/form/converters/checkbox/checkbox.converter.d.ts +16 -0
- package/lib/core/payment/form/converters/converter.abstract.d.ts +1 -1
- package/lib/core/payment/form/converters/coupon/coupon.converter.d.ts +13 -0
- package/lib/core/payment/form/converters/{cpf-name.converter.d.ts → cpf-name/cpf-name.converter.d.ts} +4 -4
- package/lib/core/payment/form/converters/{cpf-number.converter.d.ts → cpf-number/cpf-number.converter.d.ts} +4 -4
- package/lib/core/payment/form/converters/cvv/cvv-form-state.interface.d.ts +3 -0
- package/lib/core/payment/form/converters/{cvv.converter.d.ts → cvv/cvv.converter.d.ts} +8 -7
- package/lib/core/payment/form/converters/{email.converter.d.ts → email/email.converter.d.ts} +5 -5
- package/lib/core/payment/form/converters/phone.converter.d.ts +13 -0
- package/lib/core/payment/form/converters/pin/pin.converter.d.ts +11 -0
- package/lib/core/payment/form/converters/pricepoint/pricepoint.converter.d.ts +14 -0
- package/lib/core/payment/form/converters/radio-group/radio-group.converter.d.ts +11 -0
- package/lib/core/payment/form/converters/select/select.converter.d.ts +11 -0
- package/lib/core/payment/form/converters/{text.converter.d.ts → text/text.converter.d.ts} +4 -4
- package/lib/core/payment/form/converters/{zip.converter.d.ts → zip/zip.converter.d.ts} +5 -5
- package/lib/core/payment/form/field-form-states.interface.d.ts +4 -0
- package/lib/core/payment/form/form.service.d.ts +4 -0
- package/lib/core/payment/form/validators/card-month/card-month.validator.d.ts +5 -0
- package/lib/core/payment/form/validators/card-year/card-year.validator.d.ts +5 -0
- package/lib/core/payment/form/validators/coupon/coupon-validator.d.ts +2 -0
- package/lib/core/payment/form/validators/{credit-card-min-length.validator.d.ts → credit-card-length/credit-card-min-length.validator.d.ts} +1 -1
- package/lib/core/payment/form/validators/{email-validator.d.ts → email/email-validator.d.ts} +1 -1
- package/lib/core/payment/form/validators/max-length-validator.d.ts +2 -0
- package/lib/core/payment/form/validators/min-length-validator.d.ts +2 -0
- package/lib/core/payment/form/validators/phone-validator.d.ts +2 -0
- package/lib/core/payment/form/validators/{restricted-value.validator.d.ts → restricted-value/restricted-value.validator.d.ts} +1 -1
- package/lib/core/payment/payment.interface.d.ts +2 -0
- package/lib/core/payment/payment.service.d.ts +2 -0
- package/lib/core-library.service.d.ts +1 -0
- package/package.json +1 -1
- package/xsolla-payment-client-core-0.1.6-1.tgz +0 -0
- package/esm2020/lib/core/payment/form/controls/card-number-control.config.mjs +0 -10
- package/esm2020/lib/core/payment/form/converters/birth-date.converter.mjs +0 -38
- package/esm2020/lib/core/payment/form/converters/card-expiration.converter.mjs +0 -36
- package/esm2020/lib/core/payment/form/converters/card-number.converter.mjs +0 -45
- package/esm2020/lib/core/payment/form/converters/cardholder-name.converter.mjs +0 -25
- package/esm2020/lib/core/payment/form/converters/cpf-name-regex.variable.mjs +0 -2
- package/esm2020/lib/core/payment/form/converters/cpf-name.converter.mjs +0 -34
- package/esm2020/lib/core/payment/form/converters/cpf-number.converter.mjs +0 -31
- package/esm2020/lib/core/payment/form/converters/cvv.converter.mjs +0 -50
- package/esm2020/lib/core/payment/form/converters/email.converter.mjs +0 -29
- package/esm2020/lib/core/payment/form/converters/text.converter.mjs +0 -19
- package/esm2020/lib/core/payment/form/converters/zip.converter.mjs +0 -67
- package/esm2020/lib/core/payment/form/validators/birth-date.validator.mjs +0 -37
- package/esm2020/lib/core/payment/form/validators/credit-card-min-length.validator.mjs +0 -32
- package/esm2020/lib/core/payment/form/validators/email-validator.mjs +0 -7
- package/esm2020/lib/core/payment/form/validators/required-validator.mjs +0 -6
- package/esm2020/lib/core/payment/form/validators/restricted-value.validator.mjs +0 -6
- package/lib/core/payment/form/converters/card-expiration.converter.d.ts +0 -16
- package/xsolla-payment-client-core-0.1.5.tgz +0 -0
- /package/lib/core/payment/form/converters/{cpf-name-regex.variable.d.ts → cpf-name/cpf-name-regex.variable.d.ts} +0 -0
- /package/lib/core/payment/form/validators/{birth-date.validator.d.ts → birth-date/birth-date.validator.d.ts} +0 -0
- /package/lib/core/payment/form/validators/{required-validator.d.ts → required/required.validator.d.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SafeHtml } from '@angular/platform-browser';
|
|
2
|
-
import { ControlConfig } from '
|
|
3
|
-
import { CreditCardTypes } from '
|
|
2
|
+
import { ControlConfig } from '../control-config';
|
|
3
|
+
import { CreditCardTypes } from '../../../../credit-card/credit-card-types.enum';
|
|
4
4
|
export declare class CardNumberConfig extends ControlConfig {
|
|
5
5
|
controlType: string;
|
|
6
6
|
placeholder?: string | SafeHtml | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SafeHtml } from '@angular/platform-browser';
|
|
2
|
+
import { ControlConfig } from '../control-config';
|
|
3
|
+
export declare class CouponControlConfig extends ControlConfig {
|
|
4
|
+
controlType: string;
|
|
5
|
+
dataType?: string;
|
|
6
|
+
placeholder?: string | SafeHtml | null;
|
|
7
|
+
autocomplete?: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ControlConfig } from '../control-config';
|
|
2
|
+
import { SafeHtml } from '@angular/platform-browser';
|
|
3
|
+
import { SearchSelectOption } from './search-select-option.interface';
|
|
4
|
+
import { SelectOption } from './select-option.interface';
|
|
5
|
+
export declare class SearchSelectControlConfig extends ControlConfig {
|
|
6
|
+
controlType: string;
|
|
7
|
+
name: string;
|
|
8
|
+
title?: string | SafeHtml;
|
|
9
|
+
options?: SelectOption[] | SearchSelectOption[];
|
|
10
|
+
hasSearch?: boolean;
|
|
11
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface SearchSelectOption {
|
|
2
|
+
value: {
|
|
3
|
+
[key: string]: string;
|
|
4
|
+
};
|
|
5
|
+
label: string;
|
|
6
|
+
imgUrl?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
icon?: string;
|
|
9
|
+
iconType?: 'default' | 'flag';
|
|
10
|
+
}
|
|
11
|
+
export interface SearchSelectGroup {
|
|
12
|
+
name: string;
|
|
13
|
+
options: SearchSelectOption[];
|
|
14
|
+
}
|
|
15
|
+
export interface Match {
|
|
16
|
+
option: SearchSelectOption;
|
|
17
|
+
priority: number;
|
|
18
|
+
}
|
|
19
|
+
export type CurrentOptionTransformer = (option: SearchSelectOption | null) => string | undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ValidatorFn } from '@angular/forms';
|
|
2
|
-
import { Field } from '
|
|
3
|
-
import { SyncService } from '
|
|
4
|
-
import { TextControlConfig } from '
|
|
5
|
-
import { Converter } from '
|
|
2
|
+
import { Field } from '../../../field.interface';
|
|
3
|
+
import { SyncService } from '../../../sync/sync.service';
|
|
4
|
+
import { TextControlConfig } from '../../controls/text-control.config';
|
|
5
|
+
import { Converter } from '../converter.abstract';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class BirthDateConverter extends Converter {
|
|
8
8
|
constructor(syncService: SyncService);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Converter } from '../converter.abstract';
|
|
2
|
+
import { SyncService } from '../../../sync/sync.service';
|
|
3
|
+
import { ValidatorFn } from '@angular/forms';
|
|
4
|
+
import { Field } from '../../../field.interface';
|
|
5
|
+
import { FormState } from '../../form-state.interface';
|
|
6
|
+
import { TextControlConfig } from '../../controls/text-control.config';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class CardMonthConverter extends Converter {
|
|
9
|
+
constructor(syncService: SyncService);
|
|
10
|
+
getValidators(field: Field, formState: FormState): ValidatorFn[];
|
|
11
|
+
protected createControlConfig(field: Field, formState: FormState): TextControlConfig;
|
|
12
|
+
protected getAutocomplete(): string;
|
|
13
|
+
protected getDataType(): string;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CardMonthConverter, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CardMonthConverter>;
|
|
16
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Converter } from '
|
|
2
|
-
import { SyncService } from '
|
|
3
|
-
import { CreditCardMinLengthValidator } from '
|
|
4
|
-
import { Field } from '
|
|
1
|
+
import { Converter } from '../converter.abstract';
|
|
2
|
+
import { SyncService } from '../../../sync/sync.service';
|
|
3
|
+
import { CreditCardMinLengthValidator } from '../../validators/credit-card-length/credit-card-min-length.validator';
|
|
4
|
+
import { Field } from '../../../field.interface';
|
|
5
5
|
import { ValidatorFn } from '@angular/forms';
|
|
6
|
-
import { FormState } from '
|
|
7
|
-
import { CardNumberConfig } from '
|
|
6
|
+
import { FormState } from '../../form-state.interface';
|
|
7
|
+
import { CardNumberConfig } from '../../controls/card-number/card-number-control.config';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
export declare class CardNumberConverter extends Converter {
|
|
10
10
|
private readonly maxLengthValidator;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Converter } from '../converter.abstract';
|
|
2
|
+
import { SyncService } from '../../../sync/sync.service';
|
|
3
|
+
import { ValidatorFn } from '@angular/forms';
|
|
4
|
+
import { Field } from '../../../field.interface';
|
|
5
|
+
import { FormState } from '../../form-state.interface';
|
|
6
|
+
import { TextControlConfig } from '../../controls/text-control.config';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class CardYearConverter extends Converter {
|
|
9
|
+
constructor(syncService: SyncService);
|
|
10
|
+
getValidators(field: Field): ValidatorFn[];
|
|
11
|
+
protected createControlConfig(field: Field, formState: FormState): TextControlConfig;
|
|
12
|
+
protected getAutocomplete(): string;
|
|
13
|
+
protected getDataType(): string;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CardYearConverter, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CardYearConverter>;
|
|
16
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Field } from '
|
|
2
|
-
import { SyncService } from '
|
|
3
|
-
import { TextControlConfig } from '
|
|
4
|
-
import { Converter } from '
|
|
1
|
+
import { Field } from '../../../field.interface';
|
|
2
|
+
import { SyncService } from '../../../sync/sync.service';
|
|
3
|
+
import { TextControlConfig } from '../../controls/text-control.config';
|
|
4
|
+
import { Converter } from '../converter.abstract';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class CardholderNameConverter extends Converter {
|
|
7
7
|
constructor(syncService: SyncService);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Converter } from '../converter.abstract';
|
|
2
|
+
import { XpsBoolean } from '../../../../xps-boolean.enum';
|
|
3
|
+
import { SyncService } from '../../../sync/sync.service';
|
|
4
|
+
import { Field } from '../../../field.interface';
|
|
5
|
+
import { ValidatorFn } from '../../validators/validator-fn.type';
|
|
6
|
+
import { CheckboxControlConfig } from '../../controls/checkbox/checkbox-control.config';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class CheckboxConverter extends Converter {
|
|
9
|
+
protected readonly checkedValue = XpsBoolean.true;
|
|
10
|
+
protected readonly uncheckedValue = XpsBoolean.false;
|
|
11
|
+
constructor(syncService: SyncService);
|
|
12
|
+
getValidators(field: Field): ValidatorFn[];
|
|
13
|
+
protected createControlConfig(field: Field): CheckboxControlConfig;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxConverter, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CheckboxConverter>;
|
|
16
|
+
}
|
|
@@ -10,7 +10,7 @@ export declare abstract class Converter {
|
|
|
10
10
|
protected constructor(syncService: SyncService);
|
|
11
11
|
convertToConfig(field: Field, formState?: FormState): ControlConfig;
|
|
12
12
|
convertToFormControl(field: Field): UntypedFormControl;
|
|
13
|
-
getValidators(field: Field): ValidatorFn[];
|
|
13
|
+
getValidators(field: Field, formState?: FormState): ValidatorFn[];
|
|
14
14
|
getAsyncValidators(field: Field): AsyncValidatorFn | AsyncValidatorFn[] | null;
|
|
15
15
|
createDefaultControlConfig<T extends {
|
|
16
16
|
[key: string]: unknown;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ValidatorFn } from '@angular/forms';
|
|
2
|
+
import { Converter } from '../converter.abstract';
|
|
3
|
+
import { SyncService } from '../../../sync/sync.service';
|
|
4
|
+
import { Field } from '../../../field.interface';
|
|
5
|
+
import { CouponControlConfig } from '../../controls/coupon/coupon-control.config';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class CouponConverter extends Converter {
|
|
8
|
+
constructor(syncService: SyncService);
|
|
9
|
+
getValidators(): ValidatorFn[];
|
|
10
|
+
protected createControlConfig(field: Field): CouponControlConfig;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CouponConverter, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CouponConverter>;
|
|
13
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ValidatorFn } from '@angular/forms';
|
|
2
|
-
import { Field } from '
|
|
3
|
-
import { SyncService } from '
|
|
4
|
-
import { TextControlConfig } from '
|
|
5
|
-
import { Converter } from '
|
|
2
|
+
import { Field } from '../../../field.interface';
|
|
3
|
+
import { SyncService } from '../../../sync/sync.service';
|
|
4
|
+
import { TextControlConfig } from '../../controls/text-control.config';
|
|
5
|
+
import { Converter } from '../converter.abstract';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class CpfNameConverter extends Converter {
|
|
8
8
|
constructor(syncService: SyncService);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Field } from '
|
|
2
|
-
import { SyncService } from '
|
|
3
|
-
import { TextControlConfig } from '
|
|
4
|
-
import { Converter } from '
|
|
1
|
+
import { Field } from '../../../field.interface';
|
|
2
|
+
import { SyncService } from '../../../sync/sync.service';
|
|
3
|
+
import { TextControlConfig } from '../../controls/text-control.config';
|
|
4
|
+
import { Converter } from '../converter.abstract';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class CpfNumberConverter extends Converter {
|
|
7
7
|
constructor(syncService: SyncService);
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { Converter } from '
|
|
2
|
-
import { SyncService } from '
|
|
1
|
+
import { Converter } from '../converter.abstract';
|
|
2
|
+
import { SyncService } from '../../../sync/sync.service';
|
|
3
3
|
import { ValidatorFn } from '@angular/forms';
|
|
4
|
-
import { Field } from '
|
|
5
|
-
import { FormState } from '
|
|
6
|
-
import { TextControlConfig } from '
|
|
4
|
+
import { Field } from '../../../field.interface';
|
|
5
|
+
import { FormState } from '../../form-state.interface';
|
|
6
|
+
import { TextControlConfig } from '../../controls/text-control.config';
|
|
7
|
+
import { CvvFormState } from './cvv-form-state.interface';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class CvvConverter extends Converter {
|
|
9
|
-
private
|
|
10
|
+
private maxFieldLength;
|
|
10
11
|
constructor(syncService: SyncService);
|
|
11
|
-
getValidators(): ValidatorFn[];
|
|
12
|
+
getValidators(field: Field, formState?: CvvFormState): ValidatorFn[];
|
|
12
13
|
protected createControlConfig(field: Field, formState: FormState): TextControlConfig;
|
|
13
14
|
protected getAutocomplete(): string;
|
|
14
15
|
protected getDataType(): string;
|
package/lib/core/payment/form/converters/{email.converter.d.ts → email/email.converter.d.ts}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Field } from '
|
|
2
|
-
import { SyncService } from '
|
|
3
|
-
import { TextControlConfig } from '
|
|
4
|
-
import { ValidatorFn } from '
|
|
5
|
-
import { Converter } from '
|
|
1
|
+
import { Field } from '../../../field.interface';
|
|
2
|
+
import { SyncService } from '../../../sync/sync.service';
|
|
3
|
+
import { TextControlConfig } from '../../controls/text-control.config';
|
|
4
|
+
import { ValidatorFn } from '../../validators/validator-fn.type';
|
|
5
|
+
import { Converter } from '../converter.abstract';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class EmailConverter extends Converter {
|
|
8
8
|
constructor(syncService: SyncService);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ValidatorFn } from '@angular/forms';
|
|
2
|
+
import { Converter } from './converter.abstract';
|
|
3
|
+
import { SyncService } from '../../sync/sync.service';
|
|
4
|
+
import { Field } from '../../field.interface';
|
|
5
|
+
import { PhoneControlConfig } from '../controls/phone-control.config';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class PhoneConverter extends Converter {
|
|
8
|
+
constructor(syncService: SyncService);
|
|
9
|
+
getValidators(field: Field): ValidatorFn[];
|
|
10
|
+
protected createControlConfig(field: Field): PhoneControlConfig;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PhoneConverter, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PhoneConverter>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Converter } from '../converter.abstract';
|
|
2
|
+
import { SyncService } from '../../../sync/sync.service';
|
|
3
|
+
import { Field } from '../../../field.interface';
|
|
4
|
+
import { TextControlConfig } from '../../controls/text-control.config';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class PinConverter extends Converter {
|
|
7
|
+
constructor(syncService: SyncService);
|
|
8
|
+
protected createControlConfig(field: Field): TextControlConfig;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PinConverter, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PinConverter>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ValidatorFn } from '@angular/forms';
|
|
2
|
+
import { Converter } from '../converter.abstract';
|
|
3
|
+
import { SyncService } from '../../../sync/sync.service';
|
|
4
|
+
import { Field } from '../../../field.interface';
|
|
5
|
+
import { TextControlConfig } from '../../controls/text-control.config';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class PricepointConverter extends Converter {
|
|
8
|
+
private readonly maxFieldLength;
|
|
9
|
+
constructor(syncService: SyncService);
|
|
10
|
+
getValidators(field: Field): ValidatorFn[];
|
|
11
|
+
protected createControlConfig(field: Field): TextControlConfig;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PricepointConverter, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PricepointConverter>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Converter } from '../converter.abstract';
|
|
2
|
+
import { SyncService } from '../../../sync/sync.service';
|
|
3
|
+
import { Field } from '../../../field.interface';
|
|
4
|
+
import { RadioControlConfig } from '../../controls/radio-control/radio-control.config';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class RadioGroupConverter extends Converter {
|
|
7
|
+
constructor(syncService: SyncService);
|
|
8
|
+
protected createControlConfig(field: Field): RadioControlConfig;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RadioGroupConverter, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RadioGroupConverter>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Converter } from '../converter.abstract';
|
|
2
|
+
import { SyncService } from '../../../sync/sync.service';
|
|
3
|
+
import { SearchSelectControlConfig } from '../../controls/search-select/search-select-control.config';
|
|
4
|
+
import { Field } from '../../../field.interface';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class SelectConverter extends Converter {
|
|
7
|
+
constructor(syncService: SyncService);
|
|
8
|
+
protected createControlConfig(field: Field): SearchSelectControlConfig;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectConverter, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SelectConverter>;
|
|
11
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Field } from '
|
|
2
|
-
import { SyncService } from '
|
|
3
|
-
import { TextControlConfig } from '
|
|
4
|
-
import { Converter } from '
|
|
1
|
+
import { Field } from '../../../field.interface';
|
|
2
|
+
import { SyncService } from '../../../sync/sync.service';
|
|
3
|
+
import { TextControlConfig } from '../../controls/text-control.config';
|
|
4
|
+
import { Converter } from '../converter.abstract';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class TextConverter extends Converter {
|
|
7
7
|
constructor(syncService: SyncService);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ValidatorFn } from '@angular/forms';
|
|
2
|
-
import { CountryService } from '
|
|
3
|
-
import { Field } from '
|
|
4
|
-
import { SyncService } from '
|
|
5
|
-
import { TextControlConfig } from '
|
|
6
|
-
import { Converter } from '
|
|
2
|
+
import { CountryService } from '../../../../country/country.service';
|
|
3
|
+
import { Field } from '../../../field.interface';
|
|
4
|
+
import { SyncService } from '../../../sync/sync.service';
|
|
5
|
+
import { TextControlConfig } from '../../controls/text-control.config';
|
|
6
|
+
import { Converter } from '../converter.abstract';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export declare class ZipConverter extends Converter {
|
|
9
9
|
private readonly countryService;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { UntypedFormGroup } from '@angular/forms';
|
|
2
2
|
import { Field } from '../field.interface';
|
|
3
3
|
import { ControlConfigService } from './controls/control-config.service';
|
|
4
|
+
import { FieldFormStates } from './field-form-states.interface';
|
|
5
|
+
import { FormState } from './form-state.interface';
|
|
4
6
|
import * as i0 from "@angular/core";
|
|
5
7
|
export declare class FormService {
|
|
6
8
|
protected readonly controlConfigService: ControlConfigService;
|
|
9
|
+
fieldFormStates: FieldFormStates;
|
|
7
10
|
constructor(controlConfigService: ControlConfigService);
|
|
8
11
|
createForm(fields: Field[]): UntypedFormGroup;
|
|
12
|
+
updateFieldFormState(form: UntypedFormGroup, fields: Field[], fieldName: string, formState: FormState): void;
|
|
9
13
|
private getVisibleFields;
|
|
10
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormService, never>;
|
|
11
15
|
static ɵprov: i0.ɵɵInjectableDeclaration<FormService>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FormState } from '../../form-state.interface';
|
|
2
|
+
import { ValidatorFn } from '../validator-fn.type';
|
|
3
|
+
export declare const maxMonths = 12;
|
|
4
|
+
export declare const getMinMonth: (parsedYear: string) => number;
|
|
5
|
+
export declare function cardMonthValidator(formState?: FormState): ValidatorFn;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AbstractControl } from '@angular/forms';
|
|
2
|
+
import { ValidationErrors } from '../validation-errors.interface';
|
|
3
|
+
export declare const getLastCharactersInYear: (str?: string) => string;
|
|
4
|
+
export declare const maxYearsCount = 50;
|
|
5
|
+
export declare function cardYearValidator(control: AbstractControl): ValidationErrors | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ValidationErrors } from '@angular/forms';
|
|
2
|
-
import { CreditCardService } from '
|
|
2
|
+
import { CreditCardService } from '../../../../credit-card/credit-card.service';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class CreditCardMinLengthValidator {
|
|
5
5
|
private readonly creditService;
|
package/lib/core/payment/form/validators/{email-validator.d.ts → email/email-validator.d.ts}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ValidatorFn } from '
|
|
1
|
+
import { ValidatorFn } from '../validator-fn.type';
|
|
2
2
|
export declare function convertedEmailValidator(): ValidatorFn;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ValidatorFn } from '
|
|
1
|
+
import { ValidatorFn } from '../validator-fn.type';
|
|
2
2
|
export declare const restrictedValueValidator: (restrictedValue: unknown) => ValidatorFn;
|
|
@@ -7,6 +7,7 @@ import { ControlConfig } from './form/controls/control-config';
|
|
|
7
7
|
import { FinanceDetails } from './finance-details/finance-details.class';
|
|
8
8
|
import { InputEventName } from './form/input-event.enum';
|
|
9
9
|
import { FormFieldsStatus } from './form/form-fields-status.interface';
|
|
10
|
+
import { FormState } from './form/form-state.interface';
|
|
10
11
|
export interface Payment {
|
|
11
12
|
initialize(): Promise<Field[]>;
|
|
12
13
|
submit(): Promise<NextAction | null | void>;
|
|
@@ -20,6 +21,7 @@ export interface Payment {
|
|
|
20
21
|
changeFieldValue(name: string, value: string): void;
|
|
21
22
|
getControlConfig(field: Field): ControlConfig | null;
|
|
22
23
|
changeFieldState(name: string, state: InputEventName): void;
|
|
24
|
+
updateFieldFormState(fieldName: string, formState: FormState): void;
|
|
23
25
|
};
|
|
24
26
|
flowUpdates$: Observable<NextAction>;
|
|
25
27
|
financeDetailsUpdates$: Observable<FinanceDetails>;
|
|
@@ -19,6 +19,7 @@ import { InputEventName } from './form/input-event.enum';
|
|
|
19
19
|
import { FormFieldsStatus } from './form/form-fields-status.interface';
|
|
20
20
|
import { ThreeDsService } from './three-ds/three-ds.service';
|
|
21
21
|
import { CreditCardStateService } from './credit-card-state/credit-card-state.service';
|
|
22
|
+
import { FormState } from './form/form-state.interface';
|
|
22
23
|
import * as i0 from "@angular/core";
|
|
23
24
|
export declare class PaymentService {
|
|
24
25
|
private readonly initializeService;
|
|
@@ -48,6 +49,7 @@ export declare class PaymentService {
|
|
|
48
49
|
validate(field: Field): Promise<ValidationErrors | null>;
|
|
49
50
|
runThreeDs(): void;
|
|
50
51
|
getFinanceDetails(): FinanceDetails | null;
|
|
52
|
+
updateFieldFormState(fieldName: string, formState: FormState): void;
|
|
51
53
|
getStatus(): Promise<Status>;
|
|
52
54
|
getFieldConfig(field: Field): ControlConfig | null;
|
|
53
55
|
changeFieldValue(name: string, value: string): void;
|
|
@@ -50,6 +50,7 @@ export declare class CoreLibraryService {
|
|
|
50
50
|
init(configuration: InitConfiguration): Promise<void>;
|
|
51
51
|
getStatus(url?: string): Promise<Status>;
|
|
52
52
|
setCountry(country: string): void;
|
|
53
|
+
getCountry(): string;
|
|
53
54
|
createPayment(config: PaymentConfig): Payment;
|
|
54
55
|
getCreditCardService(): CreditCard;
|
|
55
56
|
get cardTypeUpdates$(): Observable<CreditCardState>;
|
package/package.json
CHANGED
|
Binary file
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ControlConfig } from './control-config';
|
|
2
|
-
export class CardNumberConfig extends ControlConfig {
|
|
3
|
-
constructor() {
|
|
4
|
-
super(...arguments);
|
|
5
|
-
this.controlType = 'card-number';
|
|
6
|
-
this.availableCardTypes = [];
|
|
7
|
-
this.customError = '';
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FyZC1udW1iZXItY29udHJv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GU/OiBDcmVkaXRDYXJkVHlwZXM7XG4gIHB1YmxpYyBjdXN0b21FcnJvciA9ICcnO1xufVxuIl19
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { Validators } from '@angular/forms';
|
|
3
|
-
import { TextControlConfig } from '../controls/text-control.config';
|
|
4
|
-
import { convert } from '../validators/convert.function';
|
|
5
|
-
import { Converter } from './converter.abstract';
|
|
6
|
-
import { birthdateValidator } from '../validators/birth-date.validator';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
import * as i1 from "../../sync/sync.service";
|
|
9
|
-
export class BirthDateConverter extends Converter {
|
|
10
|
-
constructor(syncService) {
|
|
11
|
-
super(syncService);
|
|
12
|
-
}
|
|
13
|
-
getValidators(field) {
|
|
14
|
-
return super
|
|
15
|
-
.getValidators(field)
|
|
16
|
-
.concat([
|
|
17
|
-
convert(Validators.pattern(/^[0-9]{1,2}\/[0-9]{1,2}\/[0-9]{4}$/), `Enter a valid birth date`),
|
|
18
|
-
birthdateValidator,
|
|
19
|
-
]);
|
|
20
|
-
}
|
|
21
|
-
createControlConfig(field) {
|
|
22
|
-
const config = this.createDefaultControlConfig(TextControlConfig, field);
|
|
23
|
-
config.maskConfig = {
|
|
24
|
-
mask: '99/99/9999',
|
|
25
|
-
unmaskModelValue: false,
|
|
26
|
-
guide: false,
|
|
27
|
-
};
|
|
28
|
-
config.placeholder = `DD/MM/YYYY`;
|
|
29
|
-
config.inputMode = 'numeric';
|
|
30
|
-
return config;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
BirthDateConverter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: BirthDateConverter, deps: [{ token: i1.SyncService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
34
|
-
BirthDateConverter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: BirthDateConverter });
|
|
35
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: BirthDateConverter, decorators: [{
|
|
36
|
-
type: Injectable
|
|
37
|
-
}], ctorParameters: function () { return [{ type: i1.SyncService }]; } });
|
|
38
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmlydGgtZGF0ZS5jb252ZXJ0ZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9wYXltZW50LWNsaWVudC1jb3JlL3NyYy9saWIvY29yZS9wYXltZW50L2Zvcm0vY29udmVydGVycy9iaXJ0aC1kYXRlLmNvbnZlcnRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFBZSxVQUFVLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUd6RCxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUNwRSxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFDekQsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQ2pELE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLG9DQUFvQyxDQUFDOzs7QUFHeEUsTUFBTSxPQUFPLGtCQUFtQixTQUFRLFNBQVM7SUFDL0MsWUFBbUIsV0FBd0I7UUFDekMsS0FBSyxDQUFDLFdBQVcsQ0FBQyxDQUFDO0lBQ3JCLENBQUM7SUFFTSxhQUFhLENBQUMsS0FBWTtRQUMvQixPQUFPLEtBQUs7YUFDVCxhQUFhLENBQUMsS0FBSyxDQUFDO2FBQ3BCLE1BQU0sQ0FBQztZQUNOLE9BQU8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