trm-tmpl 3.2.1 → 3.3.0
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/esm2022/lib/app/i18n/i18n-key.enum.mjs +2 -1
- package/esm2022/lib/app/i18n/keys.mjs +3 -2
- package/esm2022/lib/app/models/constants.mjs +4 -2
- package/esm2022/lib/app/pages/components/constructor-form/components/constructor-field-date/constructor-field-date.component.mjs +24 -38
- package/esm2022/lib/app/pages/components/constructor-form/components/constructor-field-iframe/card-sdk.service.mjs +41 -0
- package/esm2022/lib/app/pages/components/constructor-form/components/constructor-field-iframe/constructor-field-iframe.component.mjs +99 -117
- package/esm2022/lib/app/pages/components/constructor-form/components/constructor-field-iframe/iframe-validator-directive.directive.mjs +88 -0
- package/esm2022/lib/app/pages/components/constructor-form/components/constructor-field-select/constructor-field-select.component.mjs +15 -37
- package/esm2022/lib/app/pages/components/constructor-form/components/constructor-field-text/constructor-field-text.component.mjs +10 -4
- package/esm2022/lib/app/pages/components/constructor-form/components/index.mjs +3 -1
- package/esm2022/lib/app/pages/components/constructor-form/components/method-amount-hint/method-amount-hint.component.mjs +11 -7
- package/esm2022/lib/app/pages/components/constructor-form/components/ps-select/ps-select.component.mjs +20 -24
- package/esm2022/lib/app/pages/components/constructor-form/constructor-form.component.mjs +90 -64
- package/esm2022/lib/app/pages/components/constructor-form/models/field-template.mjs +2 -1
- package/esm2022/lib/app/pages/components/constructor-form/models/index.mjs +1 -2
- package/esm2022/lib/app/pages/components/constructor-form/models/payment-field-options.mjs +1 -1
- package/esm2022/lib/app/pages/components/constructor-form/models/payment-field.mjs +1 -1
- package/esm2022/lib/app/pages/components/constructor-form/services/constructor-form.service.mjs +40 -25
- package/esm2022/lib/app/pages/components/terminal-layout/terminal-layout.component.mjs +11 -9
- package/esm2022/lib/app/pages/directives/fee-template.directive.mjs +17 -0
- package/esm2022/lib/app/pages/directives/index.mjs +2 -1
- package/esm2022/lib/app/services/api-errors.service.mjs +16 -34
- package/esm2022/lib/app/services/csrf.resolver.mjs +6 -18
- package/esm2022/lib/app/services/error.interceptior.mjs +2 -2
- package/esm2022/lib/app/services/local-storage.mjs +70 -0
- package/esm2022/lib/app/services/script-loader.mjs +4 -7
- package/esm2022/lib/app/services/session.data-source.mjs +12 -11
- package/esm2022/lib/app/services/translation/translate-lang-storage.service.mjs +95 -79
- package/esm2022/lib/app/shared/components/terminal-lang-switcher/terminal-lang-switcher.component.mjs +10 -8
- package/esm2022/lib/app/shared/components/terminal-layout-tpl/terminal-layout-tpl.component.mjs +6 -6
- package/esm2022/lib/app/shared/components/trm-select/trm-select.component.mjs +1 -1
- package/esm2022/lib/app/terminal-tpl.component.mjs +13 -16
- package/esm2022/lib/app/terminal.module.mjs +43 -75
- package/fesm2022/trm-tmpl.mjs +936 -793
- package/fesm2022/trm-tmpl.mjs.map +1 -1
- package/lib/app/i18n/i18n-key.enum.d.ts +1 -0
- package/lib/app/models/constants.d.ts +3 -1
- package/lib/app/pages/components/constructor-form/components/constructor-field-date/constructor-field-date.component.d.ts +7 -10
- package/lib/app/pages/components/constructor-form/components/constructor-field-iframe/card-sdk.service.d.ts +18 -0
- package/lib/app/pages/components/constructor-form/components/constructor-field-iframe/constructor-field-iframe.component.d.ts +24 -27
- package/lib/app/pages/components/constructor-form/components/constructor-field-iframe/iframe-validator-directive.directive.d.ts +16 -0
- package/lib/app/pages/components/constructor-form/components/constructor-field-select/constructor-field-select.component.d.ts +6 -10
- package/lib/app/pages/components/constructor-form/components/constructor-field-text/constructor-field-text.component.d.ts +3 -3
- package/lib/app/pages/components/constructor-form/components/index.d.ts +2 -0
- package/lib/app/pages/components/constructor-form/components/method-amount-hint/method-amount-hint.component.d.ts +3 -0
- package/lib/app/pages/components/constructor-form/components/ps-select/ps-select.component.d.ts +4 -6
- package/lib/app/pages/components/constructor-form/constructor-form.component.d.ts +6 -9
- package/lib/app/pages/components/constructor-form/models/index.d.ts +0 -1
- package/lib/app/pages/components/constructor-form/models/payment-field-options.d.ts +1 -1
- package/lib/app/pages/components/constructor-form/models/payment-field.d.ts +1 -1
- package/lib/app/pages/components/constructor-form/services/constructor-form.service.d.ts +8 -5
- package/lib/app/pages/components/terminal-layout/terminal-layout.component.d.ts +1 -0
- package/lib/app/pages/directives/fee-template.directive.d.ts +7 -0
- package/lib/app/pages/directives/index.d.ts +1 -0
- package/lib/app/services/api-errors.service.d.ts +4 -10
- package/lib/app/services/csrf.resolver.d.ts +1 -4
- package/lib/app/services/local-storage.d.ts +24 -0
- package/lib/app/services/script-loader.d.ts +1 -2
- package/lib/app/services/session.data-source.d.ts +1 -1
- package/lib/app/services/translation/translate-lang-storage.service.d.ts +22 -23
- package/lib/app/shared/components/terminal-lang-switcher/terminal-lang-switcher.component.d.ts +4 -34
- package/lib/app/shared/components/terminal-layout-tpl/terminal-layout-tpl.component.d.ts +1 -2
- package/lib/app/shared/components/trm-select/trm-select.component.d.ts +1 -2
- package/lib/app/terminal-tpl.component.d.ts +2 -1
- package/lib/app/terminal.module.d.ts +26 -4
- package/package.json +1 -1
- package/esm2022/lib/app/pages/components/constructor-form/models/constants.mjs +0 -4
- package/lib/app/pages/components/constructor-form/models/constants.d.ts +0 -3
|
@@ -16,6 +16,7 @@ export declare enum I18N_KEY {
|
|
|
16
16
|
DEFAULT_ERROR_CODE = "error_api",
|
|
17
17
|
DEFAULT_ERROR_CODE_GENERAL = "error_general",
|
|
18
18
|
ERROR_OCCUR = "ERROR_OCCUR",
|
|
19
|
+
ERROR_OCCUR_SDK = "ERROR_OCCUR_SDK",
|
|
19
20
|
PROGRESS_TITLE = "PROGRESS_TITLE",
|
|
20
21
|
FAIL_TITLE = "FAIL_TITLE",
|
|
21
22
|
SUCCESS_TITLE = "SUCCESS_TITLE",
|
|
@@ -16,4 +16,6 @@ export declare const CSRF_COOKIE_NAME = "TERMINAL-CSRF-KEY";
|
|
|
16
16
|
export declare const I18N_COUNTRIES: InjectionToken<unknown>;
|
|
17
17
|
export declare const SessionToken: InjectionToken<string>;
|
|
18
18
|
export declare const CheckinModeToken: InjectionToken<Mode>;
|
|
19
|
-
export declare const
|
|
19
|
+
export declare const DEFAULT_COUNTRY_LOCALHOST_KEY = "GM_TERMINAL_COUNTRY";
|
|
20
|
+
export declare const DEFAULT_METHOD_LOCALHOST_KEY = "GM_TERMINAL_METHOD";
|
|
21
|
+
export declare const DEFAULT_CURRENCY_LOCALHOST_KEY = "GM_TERMINAL_CURRENCY";
|
|
@@ -1,26 +1,23 @@
|
|
|
1
|
-
import { AfterViewInit
|
|
1
|
+
import { AfterViewInit } from '@angular/core';
|
|
2
2
|
import { PaymentField } from '../../models';
|
|
3
|
-
import {
|
|
3
|
+
import { AbstractControl, ControlValueAccessor } from '@angular/forms';
|
|
4
4
|
import { Moment } from 'moment';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class ConstructorFieldDateComponent implements ControlValueAccessor,
|
|
6
|
+
export declare class ConstructorFieldDateComponent implements ControlValueAccessor, AfterViewInit {
|
|
7
7
|
private cd;
|
|
8
8
|
private injector;
|
|
9
|
+
private destroyRef;
|
|
9
10
|
readonly FORMAT_DATE = "YYYY-MM-DD";
|
|
10
|
-
private unsub;
|
|
11
11
|
config: PaymentField;
|
|
12
12
|
tabIndex: number;
|
|
13
|
-
control:
|
|
13
|
+
control: AbstractControl;
|
|
14
14
|
get startCalendarDate(): Moment;
|
|
15
|
-
|
|
16
|
-
onChange: (value: any) => void;
|
|
15
|
+
onChange: (_value: any) => void;
|
|
17
16
|
onTouch: () => void;
|
|
18
17
|
registerOnChange(fn: any): void;
|
|
19
18
|
registerOnTouched(fn: any): void;
|
|
20
|
-
writeValue(value:
|
|
19
|
+
writeValue(value: unknown): void;
|
|
21
20
|
ngAfterViewInit(): void;
|
|
22
|
-
ngDoCheck(): void;
|
|
23
|
-
ngOnDestroy(): void;
|
|
24
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<ConstructorFieldDateComponent, never>;
|
|
25
22
|
static ɵcmp: i0.ɵɵComponentDeclaration<ConstructorFieldDateComponent, "app-constructor-field-date", never, { "config": { "alias": "config"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, {}, never, never, true, never>;
|
|
26
23
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { CdeTerminalSdk } from './../../../../../models/cde-terminal-sdk';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CardSdkService {
|
|
5
|
+
private scriptLoaderSrv;
|
|
6
|
+
private sessionSrv;
|
|
7
|
+
private _sdk;
|
|
8
|
+
private _pending;
|
|
9
|
+
private _submitted;
|
|
10
|
+
markAsReady(): void;
|
|
11
|
+
markAsSubmitted(): void;
|
|
12
|
+
get pending(): boolean;
|
|
13
|
+
submit(): void;
|
|
14
|
+
private get _ready$();
|
|
15
|
+
createCardTerminalSdk$(lang: string, id: string, tabindex?: number): Observable<CdeTerminalSdk>;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CardSdkService, never>;
|
|
17
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CardSdkService>;
|
|
18
|
+
}
|
|
@@ -1,34 +1,31 @@
|
|
|
1
|
-
import { AfterViewInit
|
|
2
|
-
import {
|
|
1
|
+
import { AfterViewInit } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { I18N_KEY } from '../../../../../i18n';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
private
|
|
7
|
-
private
|
|
8
|
-
private
|
|
9
|
-
|
|
5
|
+
import * as i1 from "./iframe-validator-directive.directive";
|
|
6
|
+
export declare class ConstructorFieldIframeComponent implements AfterViewInit, ControlValueAccessor {
|
|
7
|
+
private _translateSrv;
|
|
8
|
+
private _cd;
|
|
9
|
+
private _control;
|
|
10
|
+
private _injector;
|
|
11
|
+
private _destroyRef;
|
|
12
|
+
viewReady: boolean;
|
|
13
|
+
tabIndex: number;
|
|
14
|
+
private validator;
|
|
10
15
|
private _sdk;
|
|
11
|
-
private
|
|
12
|
-
|
|
16
|
+
private cardSdkSrv;
|
|
17
|
+
private _loading;
|
|
13
18
|
status: I18N_KEY;
|
|
14
|
-
I18N_KEY: typeof I18N_KEY;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
private _ready;
|
|
21
|
-
private _finished;
|
|
22
|
-
get finished(): boolean;
|
|
23
|
-
constructor();
|
|
19
|
+
readonly I18N_KEY: typeof I18N_KEY;
|
|
20
|
+
readonly ID_CDE_CONTAINER = "cde-container";
|
|
21
|
+
registerOnTouched(fn: any): void;
|
|
22
|
+
registerOnChange(fn: any): void;
|
|
23
|
+
writeValue(): void;
|
|
24
|
+
get loading(): boolean;
|
|
24
25
|
ngAfterViewInit(): void;
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
private _updateValueAndValidity;
|
|
27
|
+
refreshHeight(): void;
|
|
27
28
|
private _init;
|
|
28
|
-
private submitted;
|
|
29
|
-
submit(): Promise<boolean>;
|
|
30
|
-
private _onError;
|
|
31
|
-
ngOnDestroy(): void;
|
|
32
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<ConstructorFieldIframeComponent, never>;
|
|
33
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ConstructorFieldIframeComponent, "app-constructor-field-iframe", never, { "tabIndex": { "alias": "tabIndex"; "required": false; }; }, {
|
|
30
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ConstructorFieldIframeComponent, "app-constructor-field-iframe", never, { "tabIndex": { "alias": "tabIndex"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.IframeValidatorDirectiveDirective; inputs: {}; outputs: {}; }]>;
|
|
34
31
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AbstractControl, AsyncValidator, ValidationErrors } from '@angular/forms';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { CdeTerminalSdk } from './../../../../../models/cde-terminal-sdk';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class IframeValidatorDirectiveDirective implements AsyncValidator {
|
|
6
|
+
private cardSdkSrv;
|
|
7
|
+
private _sdk;
|
|
8
|
+
private submitting$;
|
|
9
|
+
private _fatalError;
|
|
10
|
+
private _validationSdkError;
|
|
11
|
+
registerSDK(sdk?: CdeTerminalSdk): void;
|
|
12
|
+
private handleSubmitting;
|
|
13
|
+
validate(control: AbstractControl): Promise<ValidationErrors | null> | Observable<ValidationErrors | null>;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IframeValidatorDirectiveDirective, never>;
|
|
15
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<IframeValidatorDirectiveDirective, "[appIframeValidatorDirective]", never, {}, {}, never, never, true, never>;
|
|
16
|
+
}
|
|
@@ -1,30 +1,26 @@
|
|
|
1
|
-
import { AfterViewInit
|
|
1
|
+
import { AfterViewInit } from '@angular/core';
|
|
2
2
|
import { PaymentField, PaymentFieldOptionsItem } from '../../models';
|
|
3
|
-
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { AbstractControl, ControlValueAccessor } from '@angular/forms';
|
|
4
4
|
import { I18N_KEY } from './../../../../../i18n';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class ConstructorFieldSelectComponent implements ControlValueAccessor,
|
|
6
|
+
export declare class ConstructorFieldSelectComponent implements ControlValueAccessor, AfterViewInit {
|
|
7
7
|
private cd;
|
|
8
8
|
private injector;
|
|
9
|
-
private unsub;
|
|
10
9
|
config: PaymentField;
|
|
11
10
|
items: PaymentFieldOptionsItem[];
|
|
12
11
|
tabIndex: number;
|
|
13
12
|
searchString: string;
|
|
14
13
|
I18N_KEY: typeof I18N_KEY;
|
|
15
|
-
onChange: (
|
|
14
|
+
onChange: (_value: any) => void;
|
|
16
15
|
onTouch: () => void;
|
|
17
|
-
control:
|
|
16
|
+
control: AbstractControl;
|
|
18
17
|
get data(): PaymentFieldOptionsItem[];
|
|
19
|
-
constructor();
|
|
20
18
|
registerOnChange(fn: any): void;
|
|
21
19
|
registerOnTouched(fn: any): void;
|
|
22
|
-
search(searchString:
|
|
20
|
+
search(searchString: string): void;
|
|
23
21
|
writeValue(value: any): void;
|
|
24
22
|
get apiError(): string;
|
|
25
23
|
ngAfterViewInit(): void;
|
|
26
|
-
ngDoCheck(): void;
|
|
27
|
-
ngOnDestroy(): void;
|
|
28
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<ConstructorFieldSelectComponent, never>;
|
|
29
25
|
static ɵcmp: i0.ɵɵComponentDeclaration<ConstructorFieldSelectComponent, "app-constructor-field-select", never, { "config": { "alias": "config"; "required": false; }; "items": { "alias": "items"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, {}, never, never, true, never>;
|
|
30
26
|
}
|
|
@@ -3,7 +3,7 @@ import { PaymentField } from '../../models';
|
|
|
3
3
|
import { AbstractControl, ControlValueAccessor } from '@angular/forms';
|
|
4
4
|
import { MatDatepicker } from '@angular/material/datepicker';
|
|
5
5
|
import momentjs from 'moment-timezone';
|
|
6
|
-
import { NgxMaskDirective } from 'ngx-mask';
|
|
6
|
+
import { IConfig, NgxMaskDirective } from 'ngx-mask';
|
|
7
7
|
import { I18N_KEY } from './../../../../../i18n';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
export declare class ConstructorFieldTextComponent implements ControlValueAccessor, OnInit, OnDestroy, AfterViewInit {
|
|
@@ -25,9 +25,9 @@ export declare class ConstructorFieldTextComponent implements ControlValueAccess
|
|
|
25
25
|
maskedValueChange: EventEmitter<string>;
|
|
26
26
|
control: AbstractControl;
|
|
27
27
|
dir: NgxMaskDirective;
|
|
28
|
-
maskPatterns:
|
|
28
|
+
maskPatterns: IConfig['patterns'];
|
|
29
29
|
specialCharacters: string[];
|
|
30
|
-
onChange: (
|
|
30
|
+
onChange: (_value: any) => void;
|
|
31
31
|
onTouch: () => void;
|
|
32
32
|
constructor();
|
|
33
33
|
get type(): string;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * from "./constructor-field-iframe/iframe-validator-directive.directive";
|
|
2
|
+
export * from "./constructor-field-iframe/card-sdk.service";
|
|
1
3
|
export * from './constructor-field-date/constructor-field-date.component';
|
|
2
4
|
export * from './constructor-field-iframe/constructor-field-iframe.component';
|
|
3
5
|
export * from './constructor-field-select/constructor-field-select.component';
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
1
2
|
import { I18N_KEY } from './../../../../../i18n';
|
|
2
3
|
import { PaymentFieldOptions } from "../../models";
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class MethodAmountHintComponent {
|
|
6
|
+
private mainTpl;
|
|
5
7
|
loading: boolean;
|
|
6
8
|
options: PaymentFieldOptions;
|
|
7
9
|
I18N_KEY: typeof I18N_KEY;
|
|
10
|
+
get feeTpl(): TemplateRef<any>;
|
|
8
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<MethodAmountHintComponent, never>;
|
|
9
12
|
static ɵcmp: i0.ɵɵComponentDeclaration<MethodAmountHintComponent, "app-method-amount-hint", never, { "loading": { "alias": "loading"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, {}, never, never, true, never>;
|
|
10
13
|
}
|
package/lib/app/pages/components/constructor-form/components/ps-select/ps-select.component.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor, FormControl } from '@angular/forms';
|
|
3
3
|
import { MethodTypeType } from '../../../../../../codegen/model/models';
|
|
4
4
|
import { I18N_KEY } from './../../../../../i18n';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class PsSelectComponent implements
|
|
6
|
+
export declare class PsSelectComponent implements OnInit, ControlValueAccessor {
|
|
7
7
|
private cd;
|
|
8
8
|
private methodTitlePipe;
|
|
9
9
|
private translatePipe;
|
|
10
|
-
private
|
|
10
|
+
private destroyRef;
|
|
11
11
|
I18N_KEY: typeof I18N_KEY;
|
|
12
12
|
onChange: (_value: any) => void;
|
|
13
13
|
onTouch: () => void;
|
|
@@ -19,7 +19,6 @@ export declare class PsSelectComponent implements OnDestroy, OnInit, ControlValu
|
|
|
19
19
|
searchString: string;
|
|
20
20
|
get popularMethods(): MethodTypeType[];
|
|
21
21
|
get otherMethods(): MethodTypeType[];
|
|
22
|
-
constructor();
|
|
23
22
|
ngOnInit(): void;
|
|
24
23
|
selectMethod(method: number, options?: {
|
|
25
24
|
emitChange: boolean;
|
|
@@ -28,8 +27,7 @@ export declare class PsSelectComponent implements OnDestroy, OnInit, ControlValu
|
|
|
28
27
|
registerOnTouched(fn: any): void;
|
|
29
28
|
registerOnChange(fn: any): void;
|
|
30
29
|
setDisabledState(isDisabled: boolean): void;
|
|
31
|
-
search(value:
|
|
32
|
-
ngOnDestroy(): void;
|
|
30
|
+
search(value: string): void;
|
|
33
31
|
static ɵfac: i0.ɵɵFactoryDeclaration<PsSelectComponent, never>;
|
|
34
32
|
static ɵcmp: i0.ɵɵComponentDeclaration<PsSelectComponent, "app-ps-select", never, { "methods": { "alias": "methods"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, {}, never, ["[app-ps-select-hint]", "[app-ps-select-error]"], true, never>;
|
|
35
33
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { AfterViewInit, ElementRef, EventEmitter, OnChanges, OnDestroy, QueryList, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { PaymentField, PaymentFieldOptions, PaymentFieldTypeEnum, TerminalStep } from './models';
|
|
3
3
|
import { ConstructorFormService } from './services/constructor-form.service';
|
|
4
4
|
import { MethodType, MethodTypeType, TerminalPaymentConfirmResponse, TerminalPaymentPrepareResponse } from '../../../../codegen/model/models';
|
|
5
5
|
import { I18N_KEY } from './../../../i18n';
|
|
6
|
-
import {
|
|
6
|
+
import { CardSdkService } from "./components/constructor-field-iframe/card-sdk.service";
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export declare class ConstructorFormComponent implements OnChanges, AfterViewInit, OnDestroy {
|
|
9
9
|
private cd;
|
|
@@ -14,6 +14,7 @@ export declare class ConstructorFormComponent implements OnChanges, AfterViewIni
|
|
|
14
14
|
private ngScrollBar;
|
|
15
15
|
private versionSrv;
|
|
16
16
|
private unSubscriber;
|
|
17
|
+
private preparationStepFilled;
|
|
17
18
|
TERMINAL_STEP: typeof TerminalStep;
|
|
18
19
|
step: TerminalStep;
|
|
19
20
|
error?: string;
|
|
@@ -25,7 +26,7 @@ export declare class ConstructorFormComponent implements OnChanges, AfterViewIni
|
|
|
25
26
|
feeOptions: PaymentFieldOptions;
|
|
26
27
|
currency: string;
|
|
27
28
|
userCurrency: string[];
|
|
28
|
-
loading:
|
|
29
|
+
loading: any;
|
|
29
30
|
types: MethodType[];
|
|
30
31
|
canReturnToProject: boolean;
|
|
31
32
|
amountChanged: EventEmitter<number>;
|
|
@@ -37,7 +38,7 @@ export declare class ConstructorFormComponent implements OnChanges, AfterViewIni
|
|
|
37
38
|
countrySearchString: string;
|
|
38
39
|
requisites: ElementRef;
|
|
39
40
|
hintMethod: ElementRef;
|
|
40
|
-
|
|
41
|
+
sdkList: QueryList<CardSdkService>;
|
|
41
42
|
maskedWallet: string;
|
|
42
43
|
I18N_KEY: typeof I18N_KEY;
|
|
43
44
|
get countriesList(): string[];
|
|
@@ -45,8 +46,6 @@ export declare class ConstructorFormComponent implements OnChanges, AfterViewIni
|
|
|
45
46
|
get currenciesList(): string[];
|
|
46
47
|
get userCurrenciesList(): string[];
|
|
47
48
|
private setCurrencyValue;
|
|
48
|
-
hasFeeHint(options: PaymentFieldOptions): number | import("moment").Moment;
|
|
49
|
-
constructor();
|
|
50
49
|
get hasCurrencyMethodSelector(): boolean;
|
|
51
50
|
get lang(): string;
|
|
52
51
|
get skeletonLength(): any[];
|
|
@@ -56,9 +55,7 @@ export declare class ConstructorFormComponent implements OnChanges, AfterViewIni
|
|
|
56
55
|
private scrollToRequisits;
|
|
57
56
|
get description(): string;
|
|
58
57
|
submit(): void;
|
|
59
|
-
|
|
60
|
-
iframeError(code: I18N_KEY): void;
|
|
61
|
-
private check;
|
|
58
|
+
private triggerIframeSubmit;
|
|
62
59
|
private send;
|
|
63
60
|
searchCountry(value: any): void;
|
|
64
61
|
get backBtnLabel(): string;
|
|
@@ -5,6 +5,5 @@ export { TerminalStep } from './terminal-step.enum';
|
|
|
5
5
|
export { CollectionType } from './collection-type.enum';
|
|
6
6
|
export { MASKS } from './../../../../helpers/mask-resolver';
|
|
7
7
|
export { PaymentFieldTypeEnum } from './payment-field-type.enum';
|
|
8
|
-
export * from './constants';
|
|
9
8
|
export * from './field-template';
|
|
10
9
|
export declare const FORMAT_DATE = "YYYY-MM-DD";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OnDestroy } from '@angular/core';
|
|
2
2
|
import { AbstractControl, FormControl, FormGroup } from '@angular/forms';
|
|
3
3
|
import { PaymentField, PaymentFields } from '../models';
|
|
4
|
-
import {
|
|
4
|
+
import { TerminalPaymentPrepareRequest } from '../../../../../codegen/model/models';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
6
6
|
import { I18N_KEY } from "./../../../../i18n";
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
@@ -11,18 +11,20 @@ export declare class ConstructorFormService extends FormGroup<{
|
|
|
11
11
|
private sessionDS;
|
|
12
12
|
private cd;
|
|
13
13
|
private configurationFactory;
|
|
14
|
+
private _storage;
|
|
14
15
|
private cancelRequestsSubscriber;
|
|
15
16
|
private unSubscriber;
|
|
16
17
|
config: PaymentFields;
|
|
17
18
|
fields: PaymentField[];
|
|
18
19
|
maskedWallet: string;
|
|
20
|
+
ready: boolean;
|
|
19
21
|
constructor();
|
|
20
22
|
get methodInfoLoading(): boolean;
|
|
21
23
|
continueLoaderOn(): void;
|
|
22
24
|
continueLoaderOff(): void;
|
|
23
25
|
get paymentFormFieldNames(): string[];
|
|
24
26
|
removePaymentFormControls(): void;
|
|
25
|
-
init(): Observable<
|
|
27
|
+
init(): Observable<void>;
|
|
26
28
|
amountDynamic: boolean;
|
|
27
29
|
private generateFields;
|
|
28
30
|
private fetchCollection;
|
|
@@ -35,17 +37,18 @@ export declare class ConstructorFormService extends FormGroup<{
|
|
|
35
37
|
get methodName(): string;
|
|
36
38
|
getTypeNameById(id: any): string;
|
|
37
39
|
saveDefaultCountry(): void;
|
|
38
|
-
get defaultCountry(): string;
|
|
39
40
|
saveDefaultMethodName(): void;
|
|
40
|
-
get defaultMethodName(): string;
|
|
41
41
|
saveDefaultCurrency(): void;
|
|
42
|
+
get defaultCountry(): string;
|
|
43
|
+
get defaultMethodName(): string;
|
|
42
44
|
get defaultCurrency(): string;
|
|
43
45
|
cancelRequests(): void;
|
|
44
46
|
getPaymentValue(): TerminalPaymentPrepareRequest;
|
|
47
|
+
updateValueAndValidityIframes(): void;
|
|
48
|
+
get readyIframesSubmit(): boolean;
|
|
45
49
|
isAmountEditable(): boolean;
|
|
46
50
|
hasWhatToFill(): boolean;
|
|
47
51
|
setCDEError(code: I18N_KEY): void;
|
|
48
|
-
get isCDEFailed(): boolean;
|
|
49
52
|
distinctValueChanges(): Observable<Partial<{
|
|
50
53
|
[x: string]: any;
|
|
51
54
|
}>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class FeeTemplateDirective {
|
|
4
|
+
tml: TemplateRef<any>;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FeeTemplateDirective, never>;
|
|
6
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FeeTemplateDirective, "[terminalFee]", never, {}, {}, never, never, true, never>;
|
|
7
|
+
}
|
|
@@ -1,26 +1,20 @@
|
|
|
1
|
-
import { BadRequestResponse } from '../../codegen/model/models';
|
|
1
|
+
import { ApiErrors, BadRequestResponse } from '../../codegen/model/models';
|
|
2
2
|
import { I18N_KEY } from './../i18n';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
type ErrorCode = I18N_KEY | ApiErrors;
|
|
4
5
|
export declare class ApiErrorsService {
|
|
5
6
|
private token;
|
|
6
|
-
private FATAL_ERRORS;
|
|
7
|
-
private document;
|
|
8
|
-
get ERROR_KEY(): string;
|
|
9
7
|
private _localError;
|
|
10
8
|
constructor();
|
|
11
|
-
setError(err?: BadRequestResponse | {
|
|
12
|
-
code: I18N_KEY;
|
|
13
|
-
}): void;
|
|
14
|
-
getError(): string;
|
|
15
9
|
clear(): void;
|
|
16
10
|
get hasError(): boolean;
|
|
17
11
|
get hasFatalError(): boolean;
|
|
18
12
|
setLocalError(err?: BadRequestResponse | {
|
|
19
13
|
code: I18N_KEY;
|
|
20
14
|
}): void;
|
|
21
|
-
clearLocal(): void;
|
|
22
15
|
get hasLocalError(): boolean;
|
|
23
|
-
getLocalError():
|
|
16
|
+
getLocalError(): ErrorCode;
|
|
24
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<ApiErrorsService, never>;
|
|
25
18
|
static ɵprov: i0.ɵɵInjectableDeclaration<ApiErrorsService>;
|
|
26
19
|
}
|
|
20
|
+
export {};
|
|
@@ -2,18 +2,15 @@ import { ActivatedRouteSnapshot } from '@angular/router';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class CSRFResolver {
|
|
5
|
-
private document;
|
|
6
5
|
private cookieSrv;
|
|
7
6
|
private apiErrorsSrv;
|
|
8
7
|
private configuration;
|
|
9
8
|
private terminalApi;
|
|
10
9
|
private token;
|
|
11
|
-
private langStorage;
|
|
12
10
|
private environment;
|
|
11
|
+
private storage;
|
|
13
12
|
constructor();
|
|
14
|
-
private get _localStorage();
|
|
15
13
|
private saveDefaultCountry;
|
|
16
|
-
private get savedCountry();
|
|
17
14
|
resolve(route: ActivatedRouteSnapshot): Observable<boolean>;
|
|
18
15
|
resolveCSRF(token: string, csrf?: string): boolean;
|
|
19
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<CSRFResolver, never>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Alpha2Code } from 'i18n-iso-countries';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class LocalStorage {
|
|
4
|
+
private _document;
|
|
5
|
+
private readonly _supported;
|
|
6
|
+
constructor();
|
|
7
|
+
private get _storage();
|
|
8
|
+
getItem(key: string): string | null;
|
|
9
|
+
setItem(key: string, value: string): void;
|
|
10
|
+
private _defaultCountry;
|
|
11
|
+
private _defaultMethodName;
|
|
12
|
+
private _defaultCurrency;
|
|
13
|
+
private _defaultLang;
|
|
14
|
+
get defaultCountry(): Alpha2Code | null;
|
|
15
|
+
get defaultMethodName(): string | null;
|
|
16
|
+
get defaultCurrency(): string | null;
|
|
17
|
+
get defaultLang(): string | null;
|
|
18
|
+
saveDefaultCountry(value: string): void;
|
|
19
|
+
saveDefaultMethodName(value: string): void;
|
|
20
|
+
saveDefaultCurrency(value: string): void;
|
|
21
|
+
saveDefaultLang(value: string): void;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LocalStorage, never>;
|
|
23
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LocalStorage>;
|
|
24
|
+
}
|
|
@@ -4,11 +4,10 @@ export declare class ScriptLoader {
|
|
|
4
4
|
private document;
|
|
5
5
|
private nonce;
|
|
6
6
|
private environment;
|
|
7
|
-
readonly
|
|
7
|
+
readonly SCRIPT_HASH_MAP: Map<SDKScriptId, {
|
|
8
8
|
src: string;
|
|
9
9
|
hash?: string;
|
|
10
10
|
}>;
|
|
11
|
-
private get window();
|
|
12
11
|
fetchScript(id: SDKScriptId): Promise<void>;
|
|
13
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<ScriptLoader, never>;
|
|
14
13
|
static ɵprov: i0.ɵɵInjectableDeclaration<ScriptLoader>;
|
|
@@ -12,7 +12,7 @@ export declare class SessionDataSource {
|
|
|
12
12
|
private cookieSrv;
|
|
13
13
|
private cd;
|
|
14
14
|
private cardTerminalSdkFactory;
|
|
15
|
-
|
|
15
|
+
payment_token?: string;
|
|
16
16
|
data$: BehaviorSubject<SessionInfo>;
|
|
17
17
|
loading$: BehaviorSubject<boolean>;
|
|
18
18
|
loadingMethodInfo$: BehaviorSubject<boolean>;
|
|
@@ -1,35 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { LangChangeEvent } from '@ngx-translate/core';
|
|
2
3
|
import { LANGUAGE } from '../../models/constants';
|
|
3
4
|
import { Alpha2Code } from 'i18n-iso-countries';
|
|
5
|
+
import { Observable } from "rxjs";
|
|
4
6
|
import * as i0 from "@angular/core";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
interface TranslationLangInfoMeta {
|
|
8
|
+
code: string;
|
|
9
|
+
name: string;
|
|
10
|
+
countries: Alpha2Code[];
|
|
11
|
+
}
|
|
12
|
+
export interface TranslationLangInfo {
|
|
13
|
+
[key: string]: TranslationLangInfoMeta;
|
|
14
|
+
}
|
|
12
15
|
export declare class TranslateLangStorageService {
|
|
13
|
-
|
|
14
|
-
translateSrv: TranslateService;
|
|
15
|
-
private versionSrv;
|
|
16
|
+
private _storage;
|
|
16
17
|
constructor();
|
|
17
18
|
get languages(): LANGUAGE[];
|
|
18
|
-
private
|
|
19
|
-
private
|
|
20
|
-
private
|
|
19
|
+
private versionSrv;
|
|
20
|
+
private document;
|
|
21
|
+
private translateSrv;
|
|
22
|
+
readonly TRANSLATION_LANG_KEYS: TranslationLangInfo;
|
|
21
23
|
private get location();
|
|
22
|
-
|
|
23
|
-
get onLangChange$(): import("@angular/core").EventEmitter<import("@ngx-translate/core").LangChangeEvent>;
|
|
24
|
-
translations: TranslationLangInfo;
|
|
25
|
-
get isLanguageDetected(): boolean;
|
|
24
|
+
get onLangChange$(): EventEmitter<LangChangeEvent>;
|
|
26
25
|
get currentLang(): string;
|
|
27
|
-
setAvailableLanguages(langs?: LANGUAGE[]): void;
|
|
28
|
-
setLanguage$(lang?: string, options?: {
|
|
29
|
-
save: boolean;
|
|
30
|
-
}): import("rxjs").Observable<any>;
|
|
31
26
|
get queryLang(): string | null;
|
|
32
|
-
|
|
27
|
+
private get countryLanguage();
|
|
28
|
+
setLanguage$(options?: {
|
|
29
|
+
save: boolean;
|
|
30
|
+
lang?: string;
|
|
31
|
+
}): Observable<any>;
|
|
33
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<TranslateLangStorageService, never>;
|
|
34
33
|
static ɵprov: i0.ɵɵInjectableDeclaration<TranslateLangStorageService>;
|
|
35
34
|
}
|
package/lib/app/shared/components/terminal-lang-switcher/terminal-lang-switcher.component.d.ts
CHANGED
|
@@ -1,49 +1,19 @@
|
|
|
1
1
|
import { EventEmitter, OnDestroy } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class TerminalLangSwitcherComponent implements OnDestroy {
|
|
4
|
+
private versionSrv;
|
|
4
5
|
private langStorageSrv;
|
|
5
6
|
private cd;
|
|
6
7
|
private unSubscriber;
|
|
7
8
|
loading: boolean;
|
|
8
|
-
|
|
9
|
+
langChange: EventEmitter<string>;
|
|
9
10
|
tabIndex: number;
|
|
10
|
-
get translation_keys():
|
|
11
|
-
en?: {
|
|
12
|
-
code: string;
|
|
13
|
-
name: string;
|
|
14
|
-
countries: import("i18n-iso-countries").Alpha2Code[];
|
|
15
|
-
};
|
|
16
|
-
ru?: {
|
|
17
|
-
code: string;
|
|
18
|
-
name: string;
|
|
19
|
-
countries: import("i18n-iso-countries").Alpha2Code[];
|
|
20
|
-
};
|
|
21
|
-
es?: {
|
|
22
|
-
code: string;
|
|
23
|
-
name: string;
|
|
24
|
-
countries: import("i18n-iso-countries").Alpha2Code[];
|
|
25
|
-
};
|
|
26
|
-
tr?: {
|
|
27
|
-
code: string;
|
|
28
|
-
name: string;
|
|
29
|
-
countries: import("i18n-iso-countries").Alpha2Code[];
|
|
30
|
-
};
|
|
31
|
-
pt?: {
|
|
32
|
-
code: string;
|
|
33
|
-
name: string;
|
|
34
|
-
countries: import("i18n-iso-countries").Alpha2Code[];
|
|
35
|
-
};
|
|
36
|
-
lt?: {
|
|
37
|
-
code: string;
|
|
38
|
-
name: string;
|
|
39
|
-
countries: import("i18n-iso-countries").Alpha2Code[];
|
|
40
|
-
};
|
|
41
|
-
};
|
|
11
|
+
get translation_keys(): import("../../../services/translation/translate-lang-storage.service").TranslationLangInfo;
|
|
42
12
|
constructor();
|
|
43
13
|
get lang(): string;
|
|
44
14
|
get langs(): string[];
|
|
45
15
|
changeLang(lang: string): void;
|
|
46
16
|
ngOnDestroy(): void;
|
|
47
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<TerminalLangSwitcherComponent, never>;
|
|
48
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TerminalLangSwitcherComponent, "app-terminal-lang-switcher", never, { "loading": { "alias": "loading"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, { "
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TerminalLangSwitcherComponent, "app-terminal-lang-switcher", never, { "loading": { "alias": "loading"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, { "langChange": "langChange"; }, never, never, true, never>;
|
|
49
19
|
}
|