@xsolla/payment-client-core 0.1.1 → 0.1.2
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/actions/show-field-state/show-field-state.action.class.mjs +2 -1
- package/esm2020/lib/core/payment/actions/show-field-state/show-field-state.action.type.mjs +1 -1
- package/esm2020/lib/core/payment/form/input-events.enum.mjs +6 -0
- package/esm2020/lib/core/payment/payment.interface.mjs +1 -1
- package/esm2020/lib/core/payment/payment.service.mjs +44 -10
- package/esm2020/lib/core/payment/show-field-state.interface.mjs +1 -1
- package/esm2020/lib/core-library.service.mjs +4 -1
- package/fesm2015/xsolla-payment-client-core.mjs +54 -9
- package/fesm2015/xsolla-payment-client-core.mjs.map +1 -1
- package/fesm2020/xsolla-payment-client-core.mjs +52 -9
- package/fesm2020/xsolla-payment-client-core.mjs.map +1 -1
- package/lib/core/payment/actions/show-field-state/show-field-state.action.type.d.ts +1 -0
- package/lib/core/payment/form/input-events.enum.d.ts +4 -0
- package/lib/core/payment/payment.interface.d.ts +3 -1
- package/lib/core/payment/payment.service.d.ts +4 -1
- package/lib/core/payment/show-field-state.interface.d.ts +1 -0
- package/package.json +1 -1
- package/xsolla-payment-client-core-0.1.2.tgz +0 -0
- package/xsolla-payment-client-core-0.1.1.tgz +0 -0
|
@@ -5,9 +5,10 @@ import { Status } from './status/status.interface';
|
|
|
5
5
|
import { Field } from './field.interface';
|
|
6
6
|
import { ControlConfig } from './form/controls/control-config';
|
|
7
7
|
import { FinanceDetails } from './finance-details/finance-details.class';
|
|
8
|
+
import { InputEventName } from './form/input-events.enum';
|
|
8
9
|
export interface Payment {
|
|
9
10
|
initialize(): Promise<Field[]>;
|
|
10
|
-
submit(): Promise<NextAction | null>;
|
|
11
|
+
submit(): Promise<NextAction | null | void>;
|
|
11
12
|
getFields(): Field[];
|
|
12
13
|
validate(field: Field): Promise<ValidationErrors | null>;
|
|
13
14
|
getFinanceDetails(): FinanceDetails | null;
|
|
@@ -16,6 +17,7 @@ export interface Payment {
|
|
|
16
17
|
form: {
|
|
17
18
|
changeFieldValue(name: string, value: string): void;
|
|
18
19
|
getControlConfig(field: Field): ControlConfig | null;
|
|
20
|
+
changeFieldState(name: string, state: InputEventName): void;
|
|
19
21
|
};
|
|
20
22
|
flowUpdates$: Observable<NextAction>;
|
|
21
23
|
financeDetailsUpdates$: Observable<FinanceDetails>;
|
|
@@ -14,6 +14,7 @@ import { NextAction } from './actions/next-action.interface';
|
|
|
14
14
|
import { Field } from './field.interface';
|
|
15
15
|
import { PaymentConfig } from './payment-config.interface';
|
|
16
16
|
import { ValidationErrors } from './form/validators/validation-errors.interface';
|
|
17
|
+
import { InputEventName } from './form/input-events.enum';
|
|
17
18
|
import * as i0 from "@angular/core";
|
|
18
19
|
export declare class PaymentService {
|
|
19
20
|
private readonly initializeService;
|
|
@@ -33,7 +34,7 @@ export declare class PaymentService {
|
|
|
33
34
|
private formDestroy$;
|
|
34
35
|
constructor(initializeService: InitializeService, submitService: SubmitService, syncService: SyncService, formService: FormService, statusService: StatusService, financeDetailsService: FinanceDetailsService, nextActionService: NextActionService, controlConfigService: ControlConfigService);
|
|
35
36
|
initialize(config: PaymentConfig): Promise<Field[]>;
|
|
36
|
-
submit(): Promise<NextAction | null>;
|
|
37
|
+
submit(): Promise<NextAction | null | void>;
|
|
37
38
|
getFields(): Field[];
|
|
38
39
|
validate(field: Field): Promise<ValidationErrors | null>;
|
|
39
40
|
runThreeDs(): NextAction;
|
|
@@ -41,11 +42,13 @@ export declare class PaymentService {
|
|
|
41
42
|
getStatus(): Promise<Status>;
|
|
42
43
|
getFieldConfig(field: Field): ControlConfig | null;
|
|
43
44
|
changeFieldValue(name: string, value: string): void;
|
|
45
|
+
changeFieldState(name: string, state: InputEventName): void;
|
|
44
46
|
destroy(): void;
|
|
45
47
|
private emitFinanceDetails;
|
|
46
48
|
private setupSyncService;
|
|
47
49
|
private listenFinanceDetails;
|
|
48
50
|
private listenSyncValidationErrors;
|
|
51
|
+
private getControlState;
|
|
49
52
|
static ɵfac: i0.ɵɵFactoryDeclaration<PaymentService, never>;
|
|
50
53
|
static ɵprov: i0.ɵɵInjectableDeclaration<PaymentService>;
|
|
51
54
|
}
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|