@xsolla/payment-client-core 0.1.0 → 0.1.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/actions/next-action.interface.mjs +1 -1
- package/esm2020/lib/core/payment/actions/next-actions.mjs +3 -1
- package/esm2020/lib/core/payment/actions/show-errors/show-errors.action.class.mjs +1 -1
- package/esm2020/lib/core/payment/actions/show-errors/show-errors.action.type.mjs +1 -1
- package/esm2020/lib/core/payment/actions/show-field-state/show-field-state.action.class.mjs +11 -0
- package/esm2020/lib/core/payment/actions/show-field-state/show-field-state.action.token.mjs +13 -0
- package/esm2020/lib/core/payment/actions/show-field-state/show-field-state.action.type.mjs +2 -0
- package/esm2020/lib/core/payment/payment.service.mjs +20 -23
- package/esm2020/lib/core/payment/show-field-state.interface.mjs +2 -0
- package/fesm2015/xsolla-payment-client-core.mjs +45 -27
- package/fesm2015/xsolla-payment-client-core.mjs.map +1 -1
- package/fesm2020/xsolla-payment-client-core.mjs +45 -25
- package/fesm2020/xsolla-payment-client-core.mjs.map +1 -1
- package/lib/core/payment/actions/next-action.interface.d.ts +3 -2
- package/lib/core/payment/actions/show-errors/show-errors.action.class.d.ts +2 -2
- package/lib/core/payment/actions/show-errors/show-errors.action.type.d.ts +2 -2
- package/lib/core/payment/actions/show-field-state/show-field-state.action.class.d.ts +8 -0
- package/lib/core/payment/actions/show-field-state/show-field-state.action.token.d.ts +4 -0
- package/lib/core/payment/actions/show-field-state/show-field-state.action.type.d.ts +10 -0
- package/lib/core/payment/payment.service.d.ts +1 -0
- package/lib/core/payment/show-field-state.interface.d.ts +7 -0
- package/package.json +1 -1
- package/xsolla-payment-client-core-0.1.1.tgz +0 -0
- package/esm2020/lib/core/payment/extended-xps-error.mjs +0 -2
- package/lib/core/payment/extended-xps-error.d.ts +0 -4
- package/xsolla-payment-client-core-0.1.0.tgz +0 -0
|
@@ -2,5 +2,6 @@ import { CheckStatusAction } from './check-status/check-status.action.type';
|
|
|
2
2
|
import { ShowFieldsAction } from './show-fields/show-fields.action.type';
|
|
3
3
|
import { StatusUpdatedAction } from './status-updated/status-updated.action.type';
|
|
4
4
|
import { RedirectAction } from './redirect/redirect.action.type';
|
|
5
|
-
import { ShowErrorsAction } from './show-errors/show-errors.action.
|
|
6
|
-
|
|
5
|
+
import { ShowErrorsAction } from './show-errors/show-errors.action.type';
|
|
6
|
+
import { ShowFieldStateAction } from './show-field-state/show-field-state.action.type';
|
|
7
|
+
export type NextAction = CheckStatusAction | ShowFieldsAction | StatusUpdatedAction | ShowErrorsAction | RedirectAction | ShowFieldStateAction;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { XpsError } from '../../xps-error.interface';
|
|
2
2
|
import { Action } from '../action.interface';
|
|
3
3
|
import { ShowErrorsActionData, ShowErrorsActionType } from './show-errors.action.type';
|
|
4
4
|
export declare class ShowErrorsAction implements Action {
|
|
5
5
|
type: ShowErrorsActionType;
|
|
6
6
|
data: ShowErrorsActionData;
|
|
7
|
-
constructor(errors:
|
|
7
|
+
constructor(errors: XpsError[]);
|
|
8
8
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { XpsError } from '../../xps-error.interface';
|
|
2
2
|
import { Action } from '../action.interface';
|
|
3
3
|
export type ShowErrorsActionType = 'show_errors';
|
|
4
4
|
export interface ShowErrorsActionData {
|
|
5
|
-
errors:
|
|
5
|
+
errors: XpsError[] | null;
|
|
6
6
|
}
|
|
7
7
|
export type ShowErrorsAction = Action<ShowErrorsActionType, ShowErrorsActionData>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Action } from '../action.interface';
|
|
2
|
+
import { ShowFieldState } from '../../show-field-state.interface';
|
|
3
|
+
import { ShowFieldStateActionData, ShowFieldStateActionType } from './show-field-state.action.type';
|
|
4
|
+
export declare class ShowFieldStateAction implements Action {
|
|
5
|
+
type: ShowFieldStateActionType;
|
|
6
|
+
data: ShowFieldStateActionData;
|
|
7
|
+
constructor(control: ShowFieldState);
|
|
8
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { InjectionToken, ValueProvider } from '@angular/core';
|
|
2
|
+
import { ActionFactoryValue } from '../action-factory-value.interface';
|
|
3
|
+
export declare const showFieldStateActionFactoryToken: InjectionToken<ActionFactoryValue>;
|
|
4
|
+
export declare const showFieldStateActionFactoryProvider: ValueProvider;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FormControlStatus } from '@angular/forms';
|
|
2
|
+
import { ValidationError as ControlValidationError } from '../../form/validators/validation-error.interface';
|
|
3
|
+
import { Action } from '../action.interface';
|
|
4
|
+
export type ShowFieldStateActionType = 'show_field_state';
|
|
5
|
+
export interface ShowFieldStateActionData {
|
|
6
|
+
fieldName: string;
|
|
7
|
+
fieldState: FormControlStatus;
|
|
8
|
+
error: ControlValidationError | null;
|
|
9
|
+
}
|
|
10
|
+
export type ShowFieldStateAction = Action<ShowFieldStateActionType, ShowFieldStateActionData>;
|
|
@@ -30,6 +30,7 @@ export declare class PaymentService {
|
|
|
30
30
|
private fields;
|
|
31
31
|
private config;
|
|
32
32
|
private destroy$;
|
|
33
|
+
private formDestroy$;
|
|
33
34
|
constructor(initializeService: InitializeService, submitService: SubmitService, syncService: SyncService, formService: FormService, statusService: StatusService, financeDetailsService: FinanceDetailsService, nextActionService: NextActionService, controlConfigService: ControlConfigService);
|
|
34
35
|
initialize(config: PaymentConfig): Promise<Field[]>;
|
|
35
36
|
submit(): Promise<NextAction | null>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FormControlStatus } from '@angular/forms';
|
|
2
|
+
import { ValidationError as ControlValidationError } from './form/validators/validation-error.interface';
|
|
3
|
+
export interface ShowFieldState {
|
|
4
|
+
fieldName: string;
|
|
5
|
+
fieldState: FormControlStatus;
|
|
6
|
+
error: ControlValidationError | null;
|
|
7
|
+
}
|
package/package.json
CHANGED
|
Binary file
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXh0ZW5kZWQteHBzLWVycm9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvcGF5bWVudC1jbGllbnQtY29yZS9zcmMvbGliL2NvcmUvcGF5bWVudC9leHRlbmRlZC14cHMtZXJyb3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFhwc0Vycm9yIH0gZnJvbSAnLi94cHMtZXJyb3IuaW50ZXJmYWNlJztcblxuZXhwb3J0IGludGVyZmFjZSBFeHRlbmRlZFhwc0Vycm9yIGV4dGVuZHMgWHBzRXJyb3Ige1xuICBmaWVsZFZhbGlkYXRpb25FcnJvcj86IHN0cmluZztcbn1cbiJdfQ==
|
|
Binary file
|