@alfalab/core-components-confirmation 9.0.4 → 10.0.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/CHANGELOG.md +59 -0
- package/dist/component.d.ts +4 -164
- package/dist/component.js +113 -101
- package/dist/components/countdown-loader/component.d.ts +1 -1
- package/dist/components/countdown-loader/component.js +1 -1
- package/dist/components/countdown-loader/index.css +2 -2
- package/dist/components/index.d.ts +1 -3
- package/dist/components/index.js +15 -14
- package/dist/components/screens/fatal-error/component.d.ts +3 -0
- package/dist/components/screens/fatal-error/component.js +25 -0
- package/dist/components/screens/fatal-error/index.css +61 -0
- package/dist/components/{code-input → screens/fatal-error}/index.d.ts +0 -0
- package/dist/components/screens/fatal-error/index.js +13 -0
- package/dist/components/screens/hint/component.d.ts +3 -0
- package/dist/components/screens/hint/component.js +45 -0
- package/dist/components/screens/hint/index.css +103 -0
- package/dist/components/{countdown → screens/hint}/index.d.ts +0 -0
- package/dist/components/screens/hint/index.js +15 -0
- package/dist/components/screens/index.d.ts +4 -0
- package/dist/components/screens/index.js +26 -0
- package/dist/components/screens/initial/component.d.ts +3 -0
- package/dist/components/screens/initial/component.js +95 -0
- package/dist/components/screens/initial/countdown-section.d.ts +0 -0
- package/dist/components/screens/initial/countdown-section.js +15 -0
- package/dist/components/screens/initial/index.css +98 -0
- package/dist/components/{overlimit → screens/initial}/index.d.ts +0 -0
- package/dist/components/screens/initial/index.js +19 -0
- package/dist/components/screens/temp-block/component.d.ts +3 -0
- package/dist/components/screens/temp-block/component.js +36 -0
- package/dist/components/{overlimit → screens/temp-block}/index.css +9 -31
- package/dist/components/{sign-confirmation → screens/temp-block}/index.d.ts +0 -0
- package/dist/components/screens/temp-block/index.js +13 -0
- package/dist/context.d.ts +4 -0
- package/dist/context.js +27 -0
- package/dist/countdown-section-2edac0a0.d.ts +9 -0
- package/dist/countdown-section-2edac0a0.js +41 -0
- package/dist/cssm/component.d.ts +4 -164
- package/dist/cssm/component.js +115 -103
- package/dist/cssm/components/countdown-loader/component.d.ts +1 -1
- package/dist/cssm/components/index.d.ts +1 -3
- package/dist/cssm/components/index.js +19 -18
- package/dist/cssm/components/screens/fatal-error/component.d.ts +3 -0
- package/dist/cssm/components/screens/fatal-error/component.js +24 -0
- package/dist/cssm/components/{code-input → screens/fatal-error}/index.d.ts +0 -0
- package/dist/cssm/components/screens/fatal-error/index.js +14 -0
- package/dist/cssm/components/screens/fatal-error/index.module.css +60 -0
- package/dist/cssm/components/screens/hint/component.d.ts +3 -0
- package/dist/cssm/components/screens/hint/component.js +44 -0
- package/dist/cssm/components/{countdown → screens/hint}/index.d.ts +0 -0
- package/dist/cssm/components/screens/hint/index.js +16 -0
- package/dist/cssm/components/screens/hint/index.module.css +102 -0
- package/dist/cssm/components/screens/index.d.ts +4 -0
- package/dist/cssm/components/screens/index.js +31 -0
- package/dist/cssm/components/screens/initial/component.d.ts +3 -0
- package/dist/cssm/components/screens/initial/component.js +97 -0
- package/dist/cssm/components/screens/initial/countdown-section.d.ts +9 -0
- package/dist/cssm/components/screens/initial/countdown-section.js +41 -0
- package/dist/cssm/components/{overlimit → screens/initial}/index.d.ts +0 -0
- package/dist/cssm/components/screens/initial/index.js +20 -0
- package/dist/cssm/components/{sign-confirmation → screens/initial}/index.module.css +40 -50
- package/dist/cssm/components/screens/temp-block/component.d.ts +3 -0
- package/dist/cssm/components/screens/temp-block/component.js +36 -0
- package/dist/cssm/components/{sign-confirmation → screens/temp-block}/index.d.ts +0 -0
- package/dist/cssm/components/screens/temp-block/index.js +15 -0
- package/dist/cssm/components/{overlimit → screens/temp-block}/index.module.css +6 -28
- package/dist/cssm/context.d.ts +4 -0
- package/dist/cssm/context.js +27 -0
- package/dist/cssm/index.d.ts +3 -0
- package/dist/cssm/index.js +29 -20
- package/dist/cssm/index.module.css +5 -77
- package/dist/cssm/types.d.ts +130 -0
- package/dist/cssm/types.js +23 -0
- package/dist/cssm/utils.d.ts +30 -0
- package/dist/cssm/utils.js +84 -0
- package/dist/esm/component.d.ts +4 -164
- package/dist/esm/component.js +114 -102
- package/dist/esm/components/countdown-loader/component.d.ts +1 -1
- package/dist/esm/components/countdown-loader/component.js +1 -1
- package/dist/esm/components/countdown-loader/index.css +2 -2
- package/dist/esm/components/index.d.ts +1 -3
- package/dist/esm/components/index.js +11 -10
- package/dist/esm/components/screens/fatal-error/component.d.ts +3 -0
- package/dist/esm/components/screens/fatal-error/component.js +17 -0
- package/dist/esm/components/screens/fatal-error/index.css +61 -0
- package/dist/esm/components/{code-input → screens/fatal-error}/index.d.ts +0 -0
- package/dist/esm/components/screens/fatal-error/index.js +5 -0
- package/dist/esm/components/screens/hint/component.d.ts +3 -0
- package/dist/esm/components/screens/hint/component.js +36 -0
- package/dist/esm/components/screens/hint/index.css +103 -0
- package/dist/esm/components/{countdown → screens/hint}/index.d.ts +0 -0
- package/dist/esm/components/screens/hint/index.js +7 -0
- package/dist/esm/components/screens/index.d.ts +4 -0
- package/dist/esm/components/screens/index.js +15 -0
- package/dist/esm/components/screens/initial/component.d.ts +3 -0
- package/dist/esm/components/screens/initial/component.js +86 -0
- package/dist/esm/components/screens/initial/countdown-section.d.ts +0 -0
- package/dist/esm/components/screens/initial/countdown-section.js +7 -0
- package/dist/esm/components/screens/initial/index.css +98 -0
- package/dist/esm/components/{overlimit → screens/initial}/index.d.ts +0 -0
- package/dist/esm/components/screens/initial/index.js +11 -0
- package/dist/esm/components/screens/temp-block/component.d.ts +3 -0
- package/dist/esm/components/screens/temp-block/component.js +28 -0
- package/dist/{modern/components/overlimit → esm/components/screens/temp-block}/index.css +9 -31
- package/dist/esm/components/{sign-confirmation → screens/temp-block}/index.d.ts +0 -0
- package/dist/esm/components/screens/temp-block/index.js +5 -0
- package/dist/esm/context.d.ts +4 -0
- package/dist/esm/context.js +23 -0
- package/dist/esm/countdown-section-ddb744a6.d.ts +9 -0
- package/dist/esm/countdown-section-ddb744a6.js +33 -0
- package/dist/esm/index.css +7 -79
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +13 -11
- package/dist/esm/types.d.ts +130 -0
- package/dist/esm/types.js +19 -0
- package/dist/esm/utils.d.ts +30 -0
- package/dist/esm/utils.js +76 -0
- package/dist/index.css +7 -79
- package/dist/index.d.ts +3 -0
- package/dist/index.js +25 -16
- package/dist/modern/component.d.ts +4 -164
- package/dist/modern/component.js +75 -102
- package/dist/modern/components/countdown-loader/component.d.ts +1 -1
- package/dist/modern/components/countdown-loader/component.js +1 -1
- package/dist/modern/components/countdown-loader/index.css +2 -2
- package/dist/modern/components/index.d.ts +1 -3
- package/dist/modern/components/index.js +11 -10
- package/dist/modern/components/screens/fatal-error/component.d.ts +3 -0
- package/dist/modern/components/screens/fatal-error/component.js +17 -0
- package/dist/modern/components/screens/fatal-error/index.css +61 -0
- package/dist/modern/components/{code-input → screens/fatal-error}/index.d.ts +0 -0
- package/dist/modern/components/screens/fatal-error/index.js +5 -0
- package/dist/modern/components/screens/hint/component.d.ts +3 -0
- package/dist/modern/components/screens/hint/component.js +36 -0
- package/dist/modern/components/screens/hint/index.css +103 -0
- package/dist/modern/components/{countdown → screens/hint}/index.d.ts +0 -0
- package/dist/modern/components/screens/hint/index.js +7 -0
- package/dist/modern/components/screens/index.d.ts +4 -0
- package/dist/modern/components/screens/index.js +15 -0
- package/dist/modern/components/screens/initial/component.d.ts +3 -0
- package/dist/modern/components/screens/initial/component.js +86 -0
- package/dist/modern/components/screens/initial/countdown-section.d.ts +0 -0
- package/dist/modern/components/screens/initial/countdown-section.js +7 -0
- package/dist/modern/components/screens/initial/index.css +98 -0
- package/dist/modern/components/{overlimit → screens/initial}/index.d.ts +0 -0
- package/dist/modern/components/screens/initial/index.js +11 -0
- package/dist/modern/components/screens/temp-block/component.d.ts +3 -0
- package/dist/modern/components/screens/temp-block/component.js +28 -0
- package/dist/{esm/components/overlimit → modern/components/screens/temp-block}/index.css +9 -31
- package/dist/modern/components/{sign-confirmation → screens/temp-block}/index.d.ts +0 -0
- package/dist/modern/components/screens/temp-block/index.js +5 -0
- package/dist/modern/context.d.ts +4 -0
- package/dist/modern/context.js +23 -0
- package/dist/modern/countdown-section-91f055c8.d.ts +9 -0
- package/dist/modern/countdown-section-91f055c8.js +32 -0
- package/dist/modern/index.css +7 -79
- package/dist/modern/index.d.ts +3 -0
- package/dist/modern/index.js +12 -10
- package/dist/modern/types.d.ts +130 -0
- package/dist/modern/types.js +19 -0
- package/dist/modern/utils.d.ts +30 -0
- package/dist/modern/utils.js +74 -0
- package/dist/types.d.ts +130 -0
- package/dist/types.js +23 -0
- package/dist/utils.d.ts +30 -0
- package/dist/utils.js +84 -0
- package/package.json +5 -4
- package/dist/components/code-input/component.d.ts +0 -16
- package/dist/components/code-input/component.js +0 -160
- package/dist/components/code-input/index.css +0 -99
- package/dist/components/code-input/index.js +0 -13
- package/dist/components/code-input/utils.d.ts +0 -10
- package/dist/components/code-input/utils.js +0 -21
- package/dist/components/countdown/component.d.ts +0 -23
- package/dist/components/countdown/component.js +0 -117
- package/dist/components/countdown/index.css +0 -85
- package/dist/components/countdown/index.js +0 -16
- package/dist/components/overlimit/component.d.ts +0 -12
- package/dist/components/overlimit/component.js +0 -73
- package/dist/components/overlimit/index.js +0 -17
- package/dist/components/sign-confirmation/component.d.ts +0 -37
- package/dist/components/sign-confirmation/component.js +0 -62
- package/dist/components/sign-confirmation/index.css +0 -108
- package/dist/components/sign-confirmation/index.js +0 -20
- package/dist/cssm/components/code-input/component.d.ts +0 -16
- package/dist/cssm/components/code-input/component.js +0 -159
- package/dist/cssm/components/code-input/index.js +0 -14
- package/dist/cssm/components/code-input/index.module.css +0 -98
- package/dist/cssm/components/code-input/utils.d.ts +0 -10
- package/dist/cssm/components/code-input/utils.js +0 -21
- package/dist/cssm/components/countdown/component.d.ts +0 -23
- package/dist/cssm/components/countdown/component.js +0 -117
- package/dist/cssm/components/countdown/index.js +0 -18
- package/dist/cssm/components/countdown/index.module.css +0 -84
- package/dist/cssm/components/overlimit/component.d.ts +0 -12
- package/dist/cssm/components/overlimit/component.js +0 -74
- package/dist/cssm/components/overlimit/index.js +0 -20
- package/dist/cssm/components/sign-confirmation/component.d.ts +0 -37
- package/dist/cssm/components/sign-confirmation/component.js +0 -64
- package/dist/cssm/components/sign-confirmation/index.js +0 -24
- package/dist/esm/components/code-input/component.d.ts +0 -16
- package/dist/esm/components/code-input/component.js +0 -151
- package/dist/esm/components/code-input/index.css +0 -99
- package/dist/esm/components/code-input/index.js +0 -5
- package/dist/esm/components/code-input/utils.d.ts +0 -10
- package/dist/esm/components/code-input/utils.js +0 -17
- package/dist/esm/components/countdown/component.d.ts +0 -23
- package/dist/esm/components/countdown/component.js +0 -107
- package/dist/esm/components/countdown/index.css +0 -85
- package/dist/esm/components/countdown/index.js +0 -7
- package/dist/esm/components/overlimit/component.d.ts +0 -12
- package/dist/esm/components/overlimit/component.js +0 -65
- package/dist/esm/components/overlimit/index.js +0 -9
- package/dist/esm/components/sign-confirmation/component.d.ts +0 -37
- package/dist/esm/components/sign-confirmation/component.js +0 -53
- package/dist/esm/components/sign-confirmation/index.css +0 -108
- package/dist/esm/components/sign-confirmation/index.js +0 -12
- package/dist/modern/components/code-input/component.d.ts +0 -16
- package/dist/modern/components/code-input/component.js +0 -123
- package/dist/modern/components/code-input/index.css +0 -99
- package/dist/modern/components/code-input/index.js +0 -5
- package/dist/modern/components/code-input/utils.d.ts +0 -10
- package/dist/modern/components/code-input/utils.js +0 -16
- package/dist/modern/components/countdown/component.d.ts +0 -23
- package/dist/modern/components/countdown/component.js +0 -102
- package/dist/modern/components/countdown/index.css +0 -85
- package/dist/modern/components/countdown/index.js +0 -7
- package/dist/modern/components/overlimit/component.d.ts +0 -12
- package/dist/modern/components/overlimit/component.js +0 -64
- package/dist/modern/components/overlimit/index.js +0 -9
- package/dist/modern/components/sign-confirmation/component.d.ts +0 -37
- package/dist/modern/components/sign-confirmation/component.js +0 -51
- package/dist/modern/components/sign-confirmation/index.css +0 -108
- package/dist/modern/components/sign-confirmation/index.js +0 -12
package/dist/esm/index.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
+
export { Confirmation } from './component.js';
|
|
1
2
|
import 'react';
|
|
2
3
|
import 'classnames';
|
|
3
|
-
import '@alfalab/core-components-button/dist/esm';
|
|
4
|
-
import '@alfalab/core-components-link/dist/esm';
|
|
5
|
-
import '@alfalab/utils';
|
|
6
4
|
import '@alfalab/hooks';
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
5
|
+
export { ONE_DAY, ONE_MINUTE, formatMsAsMinutes, useConfirmation, useCountdown } from './utils.js';
|
|
6
|
+
export { ConfirmationContext } from './context.js';
|
|
7
|
+
export { defaultTexts } from './types.js';
|
|
8
|
+
import '@alfalab/core-components-code-input/dist/esm';
|
|
9
|
+
import '@alfalab/core-components-link/dist/esm';
|
|
10
|
+
import './countdown-section-ddb744a6.js';
|
|
9
11
|
import '@alfalab/core-components-loader/dist/esm';
|
|
10
|
-
import '
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
12
|
+
import '@alfalab/core-components-button/dist/esm';
|
|
13
|
+
export { Initial } from './components/screens/initial/component.js';
|
|
14
|
+
export { Hint } from './components/screens/hint/component.js';
|
|
15
|
+
export { FatalError } from './components/screens/fatal-error/component.js';
|
|
16
|
+
export { CountdownLoader } from './components/countdown-loader/component.js';
|
|
17
|
+
export { TempBlock } from './components/screens/temp-block/component.js';
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { ComponentType, ReactNode } from 'react';
|
|
2
|
+
type ConfirmationProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Экран компонента
|
|
5
|
+
*/
|
|
6
|
+
screen: ConfirmationScreen | string;
|
|
7
|
+
/**
|
|
8
|
+
* Состояние компонента
|
|
9
|
+
*/
|
|
10
|
+
state: ConfirmationState | string;
|
|
11
|
+
/**
|
|
12
|
+
* Позиционирование контента
|
|
13
|
+
*/
|
|
14
|
+
alignContent?: 'left' | 'center';
|
|
15
|
+
/**
|
|
16
|
+
* Объект с текстами
|
|
17
|
+
*/
|
|
18
|
+
texts?: ConfirmationTexts;
|
|
19
|
+
/**
|
|
20
|
+
* Количество символов, которое можно ввести в поле ввода подписания до того, как произойдет автоотправка
|
|
21
|
+
*/
|
|
22
|
+
requiredCharAmount?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Длительность обратного отсчета на кнопке повторного запроса сообщения, в милисекундах
|
|
25
|
+
*/
|
|
26
|
+
countdownDuration?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Продолжительность блокировки формы (ms)
|
|
29
|
+
*/
|
|
30
|
+
tempBlockDuration?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Номер телефона, на который отправлен код
|
|
33
|
+
*/
|
|
34
|
+
phone?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Не осталось попыток ввода кода
|
|
37
|
+
*/
|
|
38
|
+
blockSmsRetry?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
41
|
+
*/
|
|
42
|
+
dataTestId?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Сss класс для стилизации общей обёртки
|
|
45
|
+
*/
|
|
46
|
+
className?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Функция обновления состояния компонента
|
|
49
|
+
*/
|
|
50
|
+
onChangeState: (state: ConfirmationState | string) => void;
|
|
51
|
+
/**
|
|
52
|
+
* Функция обновления состояния компонента
|
|
53
|
+
*/
|
|
54
|
+
onChangeScreen: (state: ConfirmationScreen | string) => void;
|
|
55
|
+
/**
|
|
56
|
+
* Обработчик события завершения ввода кода подписания
|
|
57
|
+
*/
|
|
58
|
+
onInputFinished: (code: string) => void;
|
|
59
|
+
/**
|
|
60
|
+
* Обработчик события нажатия на кнопку "Запросить код"
|
|
61
|
+
*/
|
|
62
|
+
onSmsRetryClick: () => void;
|
|
63
|
+
/**
|
|
64
|
+
* Клик по кнопке "Понятно" на экране фатальной ошибки
|
|
65
|
+
*/
|
|
66
|
+
onFatalErrorOkButtonClick?: () => void;
|
|
67
|
+
/**
|
|
68
|
+
* Временная блокировка формы закончилась
|
|
69
|
+
*/
|
|
70
|
+
onTempBlockFinished?: () => void;
|
|
71
|
+
/**
|
|
72
|
+
* Возввращает объект, где ключ - название экрана (screen), значение - компонент для экрана
|
|
73
|
+
*/
|
|
74
|
+
getScreensMap?: (defaulScreensMap: ScreensMap) => ScreensMap;
|
|
75
|
+
};
|
|
76
|
+
type TConfirmationContext = Required<Pick<ConfirmationProps, 'alignContent' | 'texts' | 'state' | 'screen' | 'requiredCharAmount' | 'onInputFinished' | 'countdownDuration' | 'onChangeState' | 'onSmsRetryClick' | 'onChangeScreen' | 'onFatalErrorOkButtonClick' | 'tempBlockDuration'>> & Pick<ConfirmationProps, 'phone' | 'blockSmsRetry' | 'onTempBlockFinished'> & {
|
|
77
|
+
timeLeft: number;
|
|
78
|
+
};
|
|
79
|
+
type ConfirmationTexts = {
|
|
80
|
+
/**
|
|
81
|
+
* Экран INITIAL
|
|
82
|
+
*/
|
|
83
|
+
title?: ReactNode;
|
|
84
|
+
codeError?: string;
|
|
85
|
+
codeChecking?: string;
|
|
86
|
+
codeSending?: string;
|
|
87
|
+
codeSended?: string;
|
|
88
|
+
buttonRetry?: string;
|
|
89
|
+
linkToHint?: string;
|
|
90
|
+
noAttemptsLeft?: string;
|
|
91
|
+
countdown?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Экран HINT
|
|
94
|
+
*/
|
|
95
|
+
hintButton?: string;
|
|
96
|
+
/**
|
|
97
|
+
* Экран FATAL_ERROR
|
|
98
|
+
*/
|
|
99
|
+
fatalErrorTitle?: ReactNode;
|
|
100
|
+
fatalErrorDescription?: ReactNode;
|
|
101
|
+
fatalErrorButton?: string;
|
|
102
|
+
/**
|
|
103
|
+
* Экран TEMP_BLOCK
|
|
104
|
+
*/
|
|
105
|
+
tempBlockTitle?: ReactNode;
|
|
106
|
+
tempBlockDescription?: ReactNode;
|
|
107
|
+
};
|
|
108
|
+
type ConfirmationScreen = 'INITIAL' | 'HINT' | 'FATAL_ERROR' | 'TEMP_BLOCK';
|
|
109
|
+
type ConfirmationState = 'INITIAL' | 'CODE_CHECKING' | 'CODE_SENDING' | 'CODE_ERROR';
|
|
110
|
+
type ScreensMap = {
|
|
111
|
+
[key: string]: ComponentType;
|
|
112
|
+
};
|
|
113
|
+
declare const defaultTexts: {
|
|
114
|
+
title: string;
|
|
115
|
+
codeError: string;
|
|
116
|
+
codeChecking: string;
|
|
117
|
+
codeSending: string;
|
|
118
|
+
buttonRetry: string;
|
|
119
|
+
linkToHint: string;
|
|
120
|
+
hintButton: string;
|
|
121
|
+
noAttemptsLeft: string;
|
|
122
|
+
fatalErrorTitle: string;
|
|
123
|
+
fatalErrorDescription: string;
|
|
124
|
+
fatalErrorButton: string;
|
|
125
|
+
tempBlockTitle: string;
|
|
126
|
+
tempBlockDescription: string;
|
|
127
|
+
codeSended: string;
|
|
128
|
+
countdown: string;
|
|
129
|
+
};
|
|
130
|
+
export { ConfirmationProps, TConfirmationContext, ConfirmationTexts, ConfirmationScreen, ConfirmationState, ScreensMap, defaultTexts };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var defaultTexts = {
|
|
2
|
+
title: 'Введите код из\xa0сообщения',
|
|
3
|
+
codeError: 'Код введён неверно',
|
|
4
|
+
codeChecking: '',
|
|
5
|
+
codeSending: '',
|
|
6
|
+
buttonRetry: 'Запросить код повторно',
|
|
7
|
+
linkToHint: 'Не\xa0приходит сообщение?',
|
|
8
|
+
hintButton: 'Вернуться к\xa0вводу кода',
|
|
9
|
+
noAttemptsLeft: 'Не\xa0осталось попыток запроса кода',
|
|
10
|
+
fatalErrorTitle: 'Ввести код больше нельзя',
|
|
11
|
+
fatalErrorDescription: 'Вы\xa0ввели код неверно более 5\xa0раз. В\xa0целях безопасности мы\xa0ограничили дальнейший ввод.',
|
|
12
|
+
fatalErrorButton: 'Понятно',
|
|
13
|
+
tempBlockTitle: 'Превышено количество попыток запроса кода',
|
|
14
|
+
tempBlockDescription: 'Повторное подтверждение кодом будет возможно через 24\xa0часа',
|
|
15
|
+
codeSended: 'Код выслан',
|
|
16
|
+
countdown: 'Запросить повторно можно через',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { defaultTexts };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ConfirmationProps } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Форматирование миллисекунд в hh:mm:ss.
|
|
5
|
+
*
|
|
6
|
+
* @param {Number} ms миллисекунды
|
|
7
|
+
* @returns {String} время в формате mm:ss
|
|
8
|
+
*/
|
|
9
|
+
declare function formatMsAsMinutes(ms: number): string;
|
|
10
|
+
type UseCountdown = (countdownDuration: number, tick?: number) => [number, () => void, () => void];
|
|
11
|
+
/**
|
|
12
|
+
* Возвращает время, которое осталось до истечения таймера в ms
|
|
13
|
+
*/
|
|
14
|
+
declare const useCountdown: UseCountdown;
|
|
15
|
+
declare const ONE_DAY: number;
|
|
16
|
+
declare const ONE_MINUTE: number;
|
|
17
|
+
type UseConfirmationParams = {
|
|
18
|
+
state?: ConfirmationProps['state'];
|
|
19
|
+
screen?: ConfirmationProps['screen'];
|
|
20
|
+
blockSmsRetry?: ConfirmationProps['blockSmsRetry'];
|
|
21
|
+
};
|
|
22
|
+
declare const useConfirmation: ({ state, screen, blockSmsRetry }?: UseConfirmationParams) => {
|
|
23
|
+
confirmationState: string;
|
|
24
|
+
confirmationScreen: string;
|
|
25
|
+
confirmationBlockSmsRetry: boolean;
|
|
26
|
+
setConfirmationState: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
27
|
+
setConfirmationScreen: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
28
|
+
setConfirmationBlockSmsRetry: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
29
|
+
};
|
|
30
|
+
export { formatMsAsMinutes, useCountdown, ONE_DAY, ONE_MINUTE, useConfirmation };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { useRef, useState, useCallback, useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Форматирование миллисекунд в hh:mm:ss.
|
|
5
|
+
*
|
|
6
|
+
* @param {Number} ms миллисекунды
|
|
7
|
+
* @returns {String} время в формате mm:ss
|
|
8
|
+
*/
|
|
9
|
+
function formatMsAsMinutes(ms) {
|
|
10
|
+
var totalSeconds = Math.ceil(ms / 1000);
|
|
11
|
+
var totalMinutes = Math.floor(totalSeconds / 60);
|
|
12
|
+
var totalHours = Math.floor(totalMinutes / 60);
|
|
13
|
+
var seconds = totalSeconds % 60;
|
|
14
|
+
var paddedSeconds = ("00" + seconds).slice(-2);
|
|
15
|
+
if (totalHours > 0) {
|
|
16
|
+
var minutes = totalMinutes % 60;
|
|
17
|
+
var paddedMinutes_1 = ("00" + minutes).slice(-2);
|
|
18
|
+
var paddedHours = ("00" + totalHours).slice(-2);
|
|
19
|
+
return paddedHours + ":" + paddedMinutes_1 + ":" + paddedSeconds;
|
|
20
|
+
}
|
|
21
|
+
var paddedMinutes = ("00" + totalMinutes).slice(-2);
|
|
22
|
+
return paddedMinutes + ":" + paddedSeconds;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Возвращает время, которое осталось до истечения таймера в ms
|
|
26
|
+
*/
|
|
27
|
+
var useCountdown = function (countdownDuration, tick) {
|
|
28
|
+
if (tick === void 0) { tick = 1000; }
|
|
29
|
+
var timerId = useRef(0);
|
|
30
|
+
var start = useRef(0);
|
|
31
|
+
var _a = useState(0), timePassed = _a[0], setTimePassed = _a[1];
|
|
32
|
+
var stopTimer = useCallback(function () {
|
|
33
|
+
window.clearInterval(timerId.current);
|
|
34
|
+
}, []);
|
|
35
|
+
var updateProgress = useCallback(function () {
|
|
36
|
+
var passed = Date.now() - start.current;
|
|
37
|
+
if (passed >= countdownDuration) {
|
|
38
|
+
stopTimer();
|
|
39
|
+
setTimePassed(countdownDuration);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
setTimePassed(passed);
|
|
43
|
+
}
|
|
44
|
+
}, [countdownDuration, stopTimer]);
|
|
45
|
+
var startTimer = useCallback(function () {
|
|
46
|
+
stopTimer();
|
|
47
|
+
start.current = Date.now();
|
|
48
|
+
updateProgress();
|
|
49
|
+
timerId.current = window.setInterval(updateProgress, tick);
|
|
50
|
+
}, [stopTimer, updateProgress, tick]);
|
|
51
|
+
var timeLeft = countdownDuration - timePassed;
|
|
52
|
+
useEffect(function () {
|
|
53
|
+
return function () {
|
|
54
|
+
stopTimer();
|
|
55
|
+
};
|
|
56
|
+
}, [stopTimer]);
|
|
57
|
+
return [timeLeft, startTimer, stopTimer];
|
|
58
|
+
};
|
|
59
|
+
var ONE_DAY = 24 * 60 * 60 * 1000;
|
|
60
|
+
var ONE_MINUTE = 60 * 1000;
|
|
61
|
+
var useConfirmation = function (_a) {
|
|
62
|
+
var _b = _a === void 0 ? {} : _a, state = _b.state, screen = _b.screen, blockSmsRetry = _b.blockSmsRetry;
|
|
63
|
+
var _c = useState(state !== null && state !== void 0 ? state : 'INITIAL'), confirmationState = _c[0], setConfirmationState = _c[1];
|
|
64
|
+
var _d = useState(screen !== null && screen !== void 0 ? screen : 'INITIAL'), confirmationScreen = _d[0], setConfirmationScreen = _d[1];
|
|
65
|
+
var _e = useState(blockSmsRetry !== null && blockSmsRetry !== void 0 ? blockSmsRetry : false), confirmationBlockSmsRetry = _e[0], setConfirmationBlockSmsRetry = _e[1];
|
|
66
|
+
return {
|
|
67
|
+
confirmationState: confirmationState,
|
|
68
|
+
confirmationScreen: confirmationScreen,
|
|
69
|
+
confirmationBlockSmsRetry: confirmationBlockSmsRetry,
|
|
70
|
+
setConfirmationState: setConfirmationState,
|
|
71
|
+
setConfirmationScreen: setConfirmationScreen,
|
|
72
|
+
setConfirmationBlockSmsRetry: setConfirmationBlockSmsRetry,
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export { ONE_DAY, ONE_MINUTE, formatMsAsMinutes, useConfirmation, useCountdown };
|
package/dist/index.css
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: dh3od */
|
|
2
2
|
:root {
|
|
3
|
-
--color-light-text-primary: #0b1f35;
|
|
4
3
|
--color-light-text-secondary: #546272;
|
|
5
4
|
}
|
|
6
5
|
:root {
|
|
@@ -11,24 +10,12 @@
|
|
|
11
10
|
|
|
12
11
|
/* Hard up */
|
|
13
12
|
}
|
|
14
|
-
:root {
|
|
15
|
-
--gap-xs: 8px;
|
|
16
|
-
--gap-xl: 24px;
|
|
17
|
-
--gap-2xl: 32px;
|
|
18
|
-
--gap-4xl: 48px;
|
|
19
|
-
}
|
|
20
13
|
:root {
|
|
21
14
|
--font-family-system: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
|
|
22
15
|
sans-serif;
|
|
23
16
|
}
|
|
24
17
|
:root {
|
|
25
18
|
/* title */
|
|
26
|
-
--confirmation-title-font-size: 22px;
|
|
27
|
-
--confirmation-title-line-height: 26px;
|
|
28
|
-
--confirmation-title-font-weight: 700;
|
|
29
|
-
--confirmation-title-font-family: var(--font-family-system);
|
|
30
|
-
--confirmation-title-color: var(--color-light-text-primary);
|
|
31
|
-
--confirmation-title-font-feature-settings: normal;
|
|
32
19
|
|
|
33
20
|
/* text */
|
|
34
21
|
--confirmation-text-font-size: 16px;
|
|
@@ -41,54 +28,7 @@
|
|
|
41
28
|
|
|
42
29
|
/* input */
|
|
43
30
|
}
|
|
44
|
-
.
|
|
45
|
-
display: flex;
|
|
46
|
-
flex-direction: column;
|
|
47
|
-
width: 100%;
|
|
48
|
-
font-family: var(--confirmation-font-family);
|
|
49
|
-
}
|
|
50
|
-
.confirmation__error_1g9r1 {
|
|
51
|
-
display: flex;
|
|
52
|
-
flex-direction: column;
|
|
53
|
-
align-items: flex-start;
|
|
54
|
-
}
|
|
55
|
-
.confirmation__errorHeader_1g9r1 {
|
|
56
|
-
font-size: var(--confirmation-title-font-size);
|
|
57
|
-
line-height: var(--confirmation-title-line-height);
|
|
58
|
-
font-weight: var(--confirmation-title-font-weight);
|
|
59
|
-
font-family: var(--confirmation-title-font-family);
|
|
60
|
-
color: var(--confirmation-title-color);
|
|
61
|
-
font-feature-settings: var(--confirmation-title-font-feature-settings);
|
|
62
|
-
|
|
63
|
-
margin-bottom: var(--gap-2xl);
|
|
64
|
-
color: var(--confirmation-title-color);
|
|
65
|
-
}
|
|
66
|
-
.confirmation__errorText_1g9r1 {
|
|
67
|
-
font-size: var(--confirmation-text-font-size);
|
|
68
|
-
line-height: var(--confirmation-text-line-height);
|
|
69
|
-
font-weight: var(--confirmation-text-font-weight);
|
|
70
|
-
font-family: var(--confirmation-text-font-family);
|
|
71
|
-
color: var(--confirmation-text-color);
|
|
72
|
-
|
|
73
|
-
margin-bottom: var(--gap-2xl);
|
|
74
|
-
color: var(--confirmation-text-color);
|
|
75
|
-
}
|
|
76
|
-
.confirmation__phoneHintWrap_1g9r1 {
|
|
77
|
-
display: flex;
|
|
78
|
-
flex-direction: column;
|
|
79
|
-
align-items: flex-start;
|
|
80
|
-
}
|
|
81
|
-
.confirmation__phoneHintText_1g9r1 {
|
|
82
|
-
font-size: var(--confirmation-text-font-size);
|
|
83
|
-
line-height: var(--confirmation-text-line-height);
|
|
84
|
-
font-weight: var(--confirmation-text-font-weight);
|
|
85
|
-
font-family: var(--confirmation-text-font-family);
|
|
86
|
-
color: var(--confirmation-text-color);
|
|
87
|
-
|
|
88
|
-
margin-bottom: var(--gap-xl);
|
|
89
|
-
color: var(--confirmation-text-color);
|
|
90
|
-
}
|
|
91
|
-
.confirmation__phonesWrap_1g9r1 {
|
|
31
|
+
.confirmation__component_1lhb7 {
|
|
92
32
|
font-size: var(--confirmation-text-font-size);
|
|
93
33
|
line-height: var(--confirmation-text-line-height);
|
|
94
34
|
font-weight: var(--confirmation-text-font-weight);
|
|
@@ -97,23 +37,11 @@
|
|
|
97
37
|
|
|
98
38
|
display: flex;
|
|
99
39
|
flex-direction: column;
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
margin-bottom: var(--gap-xs)
|
|
104
|
-
}
|
|
105
|
-
.confirmation__phoneWrap_1g9r1:last-child {
|
|
106
|
-
margin-bottom: 0;
|
|
107
|
-
}
|
|
108
|
-
.confirmation__phoneDescription_1g9r1 {
|
|
109
|
-
color: var(--confirmation-text-color);
|
|
40
|
+
width: 100%;
|
|
41
|
+
max-width: 400px;
|
|
42
|
+
margin: 0 auto;
|
|
110
43
|
}
|
|
111
|
-
.
|
|
44
|
+
.confirmation__center_1lhb7 {
|
|
45
|
+
align-items: center;
|
|
112
46
|
text-align: center;
|
|
113
47
|
}
|
|
114
|
-
.confirmation__center_1g9r1 .confirmation__phoneHintWrap_1g9r1 {
|
|
115
|
-
align-items: center;
|
|
116
|
-
}
|
|
117
|
-
.confirmation__center_1g9r1 .confirmation__error_1g9r1 {
|
|
118
|
-
align-items: center;
|
|
119
|
-
}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -2,27 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var component = require('./component.js');
|
|
5
6
|
require('react');
|
|
6
7
|
require('classnames');
|
|
7
|
-
require('@alfalab/core-components-button');
|
|
8
|
-
require('@alfalab/core-components-link');
|
|
9
|
-
require('@alfalab/utils');
|
|
10
8
|
require('@alfalab/hooks');
|
|
11
|
-
var
|
|
12
|
-
var
|
|
9
|
+
var utils = require('./utils.js');
|
|
10
|
+
var context = require('./context.js');
|
|
11
|
+
var types = require('./types.js');
|
|
12
|
+
require('@alfalab/core-components-code-input');
|
|
13
|
+
require('@alfalab/core-components-link');
|
|
14
|
+
require('./countdown-section-2edac0a0.js');
|
|
13
15
|
require('@alfalab/core-components-loader');
|
|
14
|
-
require('
|
|
15
|
-
require('./components/
|
|
16
|
-
var
|
|
17
|
-
require('
|
|
18
|
-
var
|
|
19
|
-
var
|
|
16
|
+
require('@alfalab/core-components-button');
|
|
17
|
+
var components_screens_initial_component = require('./components/screens/initial/component.js');
|
|
18
|
+
var components_screens_hint_component = require('./components/screens/hint/component.js');
|
|
19
|
+
var components_screens_fatalError_component = require('./components/screens/fatal-error/component.js');
|
|
20
|
+
var components_countdownLoader_component = require('./components/countdown-loader/component.js');
|
|
21
|
+
var components_screens_tempBlock_component = require('./components/screens/temp-block/component.js');
|
|
20
22
|
|
|
21
23
|
|
|
22
24
|
|
|
23
|
-
exports.CountdownLoader = components_countdownLoader_component.CountdownLoader;
|
|
24
|
-
exports.Countdown = components_countdown_component.Countdown;
|
|
25
|
-
exports.formatMsAsMinutes = components_countdown_component.formatMsAsMinutes;
|
|
26
|
-
exports.SignConfirmation = components_signConfirmation_component.SignConfirmation;
|
|
27
|
-
exports.Overlimit = components_overlimit_component.Overlimit;
|
|
28
25
|
exports.Confirmation = component.Confirmation;
|
|
26
|
+
exports.ONE_DAY = utils.ONE_DAY;
|
|
27
|
+
exports.ONE_MINUTE = utils.ONE_MINUTE;
|
|
28
|
+
exports.formatMsAsMinutes = utils.formatMsAsMinutes;
|
|
29
|
+
exports.useConfirmation = utils.useConfirmation;
|
|
30
|
+
exports.useCountdown = utils.useCountdown;
|
|
31
|
+
exports.ConfirmationContext = context.ConfirmationContext;
|
|
32
|
+
exports.defaultTexts = types.defaultTexts;
|
|
33
|
+
exports.Initial = components_screens_initial_component.Initial;
|
|
34
|
+
exports.Hint = components_screens_hint_component.Hint;
|
|
35
|
+
exports.FatalError = components_screens_fatalError_component.FatalError;
|
|
36
|
+
exports.CountdownLoader = components_countdownLoader_component.CountdownLoader;
|
|
37
|
+
exports.TempBlock = components_screens_tempBlock_component.TempBlock;
|
|
@@ -1,164 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
type ConfirmationProps = {
|
|
6
|
-
/**
|
|
7
|
-
* Значение поля ввода
|
|
8
|
-
*/
|
|
9
|
-
code: string;
|
|
10
|
-
/**
|
|
11
|
-
* Флаг состояния обработки введенного кода.
|
|
12
|
-
*/
|
|
13
|
-
codeChecking?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Флаг состояния отправки кода.
|
|
16
|
-
*/
|
|
17
|
-
codeSending?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Состояние ошибки подписания
|
|
20
|
-
*/
|
|
21
|
-
error?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Состояние ошибки лимитов - превышено кол-во попыток ввода или запросов кода
|
|
24
|
-
*/
|
|
25
|
-
errorOverlimit?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Состояние критической ошибки лимитов - превышены все лимиты и попытки, пользователя блокируют
|
|
28
|
-
*/
|
|
29
|
-
errorOverlimitIsFatal?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Текст ошибки подписания
|
|
32
|
-
*/
|
|
33
|
-
errorText?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Дополнительный контент
|
|
36
|
-
*/
|
|
37
|
-
additionalContent?: ReactNode;
|
|
38
|
-
/**
|
|
39
|
-
* Флаг критичности ошибки подписания.
|
|
40
|
-
* Если true - ошибка подписания рисуется на экране без поля ввода, но с кнопкой "Запросить код"
|
|
41
|
-
* Если false - ошибка подписания рисуется под полем ввода кода
|
|
42
|
-
*/
|
|
43
|
-
errorIsFatal?: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Дополнительный класс
|
|
46
|
-
*/
|
|
47
|
-
className?: string;
|
|
48
|
-
/**
|
|
49
|
-
* Номер телефона, на который отправляется сообщение.
|
|
50
|
-
*/
|
|
51
|
-
phone?: string;
|
|
52
|
-
/**
|
|
53
|
-
* Управление необходимостью маскировать номер телефона
|
|
54
|
-
*/
|
|
55
|
-
hasPhoneMask?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* Количество символов, которое можно ввести в поле ввода подписания до того, как произойдет автоотправка
|
|
58
|
-
*/
|
|
59
|
-
requiredCharAmount?: number;
|
|
60
|
-
/**
|
|
61
|
-
* Управление отображением таймера с кнопкой "Запросить код"
|
|
62
|
-
*/
|
|
63
|
-
hasSmsCountdown?: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* Длительность обратного отсчета на кнопке повторного запроса сообщения, в милисекундах
|
|
66
|
-
*/
|
|
67
|
-
countdownDuration?: number;
|
|
68
|
-
/**
|
|
69
|
-
* Заголовок экрана подписания
|
|
70
|
-
*/
|
|
71
|
-
signTitle?: string | React.ReactNode;
|
|
72
|
-
/**
|
|
73
|
-
* Заголовок экрана ошибки лимитов
|
|
74
|
-
*/
|
|
75
|
-
overlimitTitle?: string;
|
|
76
|
-
/**
|
|
77
|
-
* Текстовое описание блокировки формы при превышении лимитов
|
|
78
|
-
*/
|
|
79
|
-
overlimitText?: string;
|
|
80
|
-
/**
|
|
81
|
-
* Длительно блокировки при превышении лимитов, в милисекундах
|
|
82
|
-
*/
|
|
83
|
-
overlimitCountdownDuration?: number;
|
|
84
|
-
/**
|
|
85
|
-
* Заголовок экрана блокирующей ошибки
|
|
86
|
-
*/
|
|
87
|
-
errorTitle?: string;
|
|
88
|
-
/**
|
|
89
|
-
* Идентификатор для систем автоматизированного тестирования
|
|
90
|
-
*/
|
|
91
|
-
dataTestId?: string;
|
|
92
|
-
/**
|
|
93
|
-
* Текст лоадера при проверке кода
|
|
94
|
-
*/
|
|
95
|
-
codeCheckingText?: string;
|
|
96
|
-
/**
|
|
97
|
-
* Текст лоадера при отправке кода
|
|
98
|
-
*/
|
|
99
|
-
codeSendingText?: string;
|
|
100
|
-
/**
|
|
101
|
-
* Текст кнопки при блокирующей ошибке
|
|
102
|
-
*/
|
|
103
|
-
buttonErrorText?: string;
|
|
104
|
-
/**
|
|
105
|
-
* Текст кнопки "Вернуться назад" на экране помощи
|
|
106
|
-
*/
|
|
107
|
-
buttonReturnText?: string;
|
|
108
|
-
/**
|
|
109
|
-
* Текст кнопки "Запросить новый код"
|
|
110
|
-
*/
|
|
111
|
-
buttonRetryText?: string;
|
|
112
|
-
/**
|
|
113
|
-
* Позиционирование контента
|
|
114
|
-
*/
|
|
115
|
-
alignContent?: ContentAlign;
|
|
116
|
-
/**
|
|
117
|
-
* Сообщение, если не осталось попыток ввода кода.
|
|
118
|
-
* Кнопка повторной отправки смс при этом скрывается.
|
|
119
|
-
*/
|
|
120
|
-
noAttemptsLeftMessage?: string;
|
|
121
|
-
/**
|
|
122
|
-
* Кастомный контент для компонента Countdown
|
|
123
|
-
*/
|
|
124
|
-
countdownContent?: ReactNode;
|
|
125
|
-
/**
|
|
126
|
-
* Обработчик события завершения ввода кода подписания
|
|
127
|
-
*/
|
|
128
|
-
onInputFinished: ({ code }: {
|
|
129
|
-
code: string;
|
|
130
|
-
}) => void;
|
|
131
|
-
/**
|
|
132
|
-
* Обработчик события изменения значения поля ввода кода подписания
|
|
133
|
-
*/
|
|
134
|
-
onInputChange: ({ code }: {
|
|
135
|
-
code: string;
|
|
136
|
-
}) => void;
|
|
137
|
-
/**
|
|
138
|
-
* Обработчик события нажатия на кнопку "Запросить код"
|
|
139
|
-
*/
|
|
140
|
-
onSmsRetryClick: () => void;
|
|
141
|
-
/**
|
|
142
|
-
* Обработчик события нажатия на кнопку "Запросить код" в блоке превышение лимитов
|
|
143
|
-
*/
|
|
144
|
-
onOverlimitSmsRetryClick?: () => void;
|
|
145
|
-
/**
|
|
146
|
-
* Обработчик события завершения обратного отсчета для повторного запроса сообщения
|
|
147
|
-
*/
|
|
148
|
-
onCountdownFinished?: () => void;
|
|
149
|
-
/**
|
|
150
|
-
* Обработчик события завершения обратного отсчета для блокировки формы
|
|
151
|
-
*/
|
|
152
|
-
onOverlimitCountdownFinished?: () => void;
|
|
153
|
-
/**
|
|
154
|
-
* Обработчик события нажатия на ссылку "не приходит сообщение?"
|
|
155
|
-
*/
|
|
156
|
-
onSmsHintLinkClick?: () => void;
|
|
157
|
-
/**
|
|
158
|
-
* Обработчик события нажатия на кнопку buttonErrorText (по дефолту "Понятно"), которая появляется при критической ошибке.
|
|
159
|
-
* Если не передан, то вызывается onSmsRetryClick
|
|
160
|
-
*/
|
|
161
|
-
onActionWithFatalError?: () => void;
|
|
162
|
-
};
|
|
163
|
-
declare const Confirmation: React.ForwardRefExoticComponent<ConfirmationProps & React.RefAttributes<HTMLDivElement>>;
|
|
164
|
-
export { ContentAlign, ConfirmationProps, Confirmation };
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ConfirmationProps } from "./types";
|
|
3
|
+
declare const Confirmation: FC<ConfirmationProps>;
|
|
4
|
+
export { Confirmation };
|