aeb-ui-kit 3.0.0-preview.592 → 3.0.0-preview.594
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/code-input/code-input.component.mjs +44 -275
- package/fesm2015/aeb-ui-kit.mjs +43 -275
- package/fesm2015/aeb-ui-kit.mjs.map +1 -1
- package/fesm2020/aeb-ui-kit.mjs +43 -274
- package/fesm2020/aeb-ui-kit.mjs.map +1 -1
- package/lib/code-input/code-input.component.d.ts +18 -46
- package/package.json +1 -1
|
@@ -1,64 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ControlValueAccessor
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare type CodeModel = [string?, string?, string?, string?, string?, string?];
|
|
5
5
|
export declare type CodeLength = 4 | 6;
|
|
6
6
|
export declare class CodeInputComponent implements OnInit, ControlValueAccessor {
|
|
7
7
|
title: string;
|
|
8
8
|
secondsUntilRetry: number;
|
|
9
9
|
tip: string;
|
|
10
10
|
codeLength: CodeLength;
|
|
11
|
+
hasError: boolean;
|
|
11
12
|
codeCompleted: EventEmitter<Event>;
|
|
12
13
|
timeOut: EventEmitter<Event>;
|
|
13
14
|
resendClick: EventEmitter<Event>;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
time: number;
|
|
15
|
+
inputValue: string;
|
|
16
|
+
isFocus: boolean;
|
|
17
17
|
showTimer: boolean;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
private _showCodeText;
|
|
24
|
-
get inputs(): FormArray;
|
|
25
|
-
get showCodeText(): boolean;
|
|
26
|
-
set showCodeText(value: boolean);
|
|
27
|
-
private get inputState();
|
|
28
|
-
private set inputState(value);
|
|
18
|
+
showCodeText: boolean;
|
|
19
|
+
seconds$: Observable<number>;
|
|
20
|
+
onChange: (_: string) => void;
|
|
21
|
+
onTouch: (_: string) => void;
|
|
22
|
+
get arrayInputValue(): string[];
|
|
29
23
|
ngOnInit(): void;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Фокусируется на следующием поле ввода
|
|
37
|
-
*
|
|
38
|
-
* @param relativeIndex индекс текущего поля ввода
|
|
39
|
-
*/
|
|
40
|
-
moveCursorForward(relativeIndex: number): void;
|
|
41
|
-
moveCursorBackward(relativeIndex: number): void;
|
|
42
|
-
/**
|
|
43
|
-
* Проверка того, что длина передаваемого значения не превышает количества полей ввода
|
|
44
|
-
*/
|
|
45
|
-
validateValueLength(value: CodeModel | string | number): boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Проверка валидности нажатой клавиши
|
|
48
|
-
*/
|
|
49
|
-
validateKeyboardInput(e: KeyboardEvent): boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Переводит валидную строку / число в массив элементов CodeModel
|
|
52
|
-
*/
|
|
53
|
-
castToCodeModel(value: CodeModel | string | number): CodeModel;
|
|
54
|
-
registerOnChange(fn: (_: any) => void): void;
|
|
55
|
-
registerOnTouched(fn: (_: any) => void): void;
|
|
56
|
-
setInputsValues(values: CodeModel): void;
|
|
57
|
-
getNativeInputByIndex(index: number): HTMLInputElement;
|
|
24
|
+
inputChangeHandler(event: Event): void;
|
|
25
|
+
numbersOnly(e: KeyboardEvent): boolean;
|
|
26
|
+
writeValue(value: string): void;
|
|
27
|
+
registerOnChange(fn: () => void): void;
|
|
28
|
+
registerOnTouched(fn: () => void): void;
|
|
58
29
|
startTimer(): void;
|
|
59
30
|
stopTimer(): void;
|
|
60
31
|
clear(): void;
|
|
61
32
|
resend(): void;
|
|
33
|
+
handleBlur(): void;
|
|
62
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<CodeInputComponent, never>;
|
|
63
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CodeInputComponent, "aeb-code-input", never, { "title": "title"; "secondsUntilRetry": "secondsUntilRetry"; "tip": "tip"; "codeLength": "codeLength"; }, { "codeCompleted": "codeCompleted"; "timeOut": "timeOut"; "resendClick": "resendClick"; }, never, never, false>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CodeInputComponent, "aeb-code-input", never, { "title": "title"; "secondsUntilRetry": "secondsUntilRetry"; "tip": "tip"; "codeLength": "codeLength"; "hasError": "hasError"; }, { "codeCompleted": "codeCompleted"; "timeOut": "timeOut"; "resendClick": "resendClick"; }, never, never, false>;
|
|
64
36
|
}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "aeb-ui-kit", "version": "3.0.0-preview.
|
|
1
|
+
{ "name": "aeb-ui-kit", "version": "3.0.0-preview.594", "peerDependencies": { "@angular/animations": "^14.1.0 || ^15.0.0 || ^16.0.0", "@angular/common": "^14.1.0 || ^15.0.0 || ^16.0.0", "@angular/compiler": "^14.1.0 || ^15.0.0 || ^16.0.0", "@angular/core": "^14.1.0 || ^15.0.0 || ^16.0.0", "@angular/forms": "^14.1.0 || ^15.0.0 || ^16.0.0", "@angular/platform-browser": "^14.1.0 || ^15.0.0 || ^16.0.0", "@angular/platform-browser-dynamic": "^14.1.0 || ^15.0.0 || ^16.0.0", "@angular/router": "^14.1.0 || ^15.0.0 || ^16.0.0", "date-fns": "2.28.0", "ngx-mask": "^14.2.4", "rxjs": "^7.0.0", "sass": "^1.53.0", "zone.js": "^0.11.0 || ^0.12.0 || ^0.13.0" }, "module": "fesm2015/aeb-ui-kit.mjs", "es2020": "fesm2020/aeb-ui-kit.mjs", "esm2020": "esm2020/aeb-ui-kit.mjs", "fesm2020": "fesm2020/aeb-ui-kit.mjs", "fesm2015": "fesm2015/aeb-ui-kit.mjs", "typings": "index.d.ts", "exports": { "./package.json": { "default": "./package.json" }, ".": { "types": "./index.d.ts", "esm2020": "./esm2020/aeb-ui-kit.mjs", "es2020": "./fesm2020/aeb-ui-kit.mjs", "es2015": "./fesm2015/aeb-ui-kit.mjs", "node": "./fesm2015/aeb-ui-kit.mjs", "default": "./fesm2020/aeb-ui-kit.mjs" } }, "sideEffects": false, "dependencies": { "tslib": "^2.4.0" } }
|