@alfalab/core-components-confirmation 12.4.7 → 12.4.9
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/component.desktop.js +4 -3
- package/component.mobile.js +6 -5
- package/component.responsive.js +5 -4
- package/components/base-confirmation/component.d.ts +4 -0
- package/components/base-confirmation/component.js +87 -13
- package/components/base-confirmation/index.css +2 -2
- package/components/base-confirmation/index.d.ts +1 -1
- package/components/base-confirmation/index.js +3 -2
- package/components/countdown-loader/component.js +1 -1
- package/components/countdown-loader/index.css +2 -2
- package/components/header/component.js +1 -1
- package/components/header/index.css +4 -4
- package/components/index.js +1 -1
- package/components/screens/fatal-error/component.js +1 -1
- package/components/screens/fatal-error/index.css +6 -6
- package/components/screens/hint/component.js +1 -1
- package/components/screens/hint/index.css +12 -12
- package/components/screens/index.js +1 -1
- package/components/screens/initial/component.js +1 -1
- package/components/screens/initial/countdown-section.js +1 -1
- package/components/screens/initial/index.css +18 -18
- package/components/screens/initial/index.js +1 -1
- package/components/screens/temp-block/component.js +1 -1
- package/components/screens/temp-block/index.css +7 -7
- package/{countdown-section-94a35216.d.ts → countdown-section-784df003.d.ts} +0 -0
- package/{countdown-section-94a35216.js → countdown-section-784df003.js} +1 -1
- package/cssm/component.desktop.js +3 -2
- package/cssm/component.mobile.js +4 -3
- package/cssm/component.responsive.js +4 -3
- package/cssm/components/base-confirmation/component.d.ts +4 -0
- package/cssm/components/base-confirmation/component.js +85 -13
- package/cssm/components/base-confirmation/index.d.ts +1 -1
- package/cssm/components/base-confirmation/index.js +2 -1
- package/cssm/desktop.js +2 -1
- package/cssm/index.js +2 -1
- package/cssm/mobile.js +2 -1
- package/cssm/responsive.js +4 -3
- package/desktop.js +3 -2
- package/esm/component.desktop.js +3 -2
- package/esm/component.mobile.js +4 -3
- package/esm/component.responsive.js +3 -2
- package/esm/components/base-confirmation/component.d.ts +4 -0
- package/esm/components/base-confirmation/component.js +85 -12
- package/esm/components/base-confirmation/index.css +2 -2
- package/esm/components/base-confirmation/index.d.ts +1 -1
- package/esm/components/base-confirmation/index.js +3 -2
- package/esm/components/countdown-loader/component.js +1 -1
- package/esm/components/countdown-loader/index.css +2 -2
- package/esm/components/header/component.js +1 -1
- package/esm/components/header/index.css +4 -4
- package/esm/components/index.js +1 -1
- package/esm/components/screens/fatal-error/component.js +1 -1
- package/esm/components/screens/fatal-error/index.css +6 -6
- package/esm/components/screens/hint/component.js +1 -1
- package/esm/components/screens/hint/index.css +12 -12
- package/esm/components/screens/index.js +1 -1
- package/esm/components/screens/initial/component.js +1 -1
- package/esm/components/screens/initial/countdown-section.js +1 -1
- package/esm/components/screens/initial/index.css +18 -18
- package/esm/components/screens/initial/index.js +1 -1
- package/esm/components/screens/temp-block/component.js +1 -1
- package/esm/components/screens/temp-block/index.css +7 -7
- package/esm/{countdown-section-1560b6e0.d.ts → countdown-section-b5a76e1e.d.ts} +0 -0
- package/esm/{countdown-section-1560b6e0.js → countdown-section-b5a76e1e.js} +1 -1
- package/esm/desktop.js +3 -2
- package/esm/index.js +3 -2
- package/esm/mobile.css +2 -2
- package/esm/mobile.js +3 -2
- package/esm/responsive.js +5 -4
- package/index.js +3 -2
- package/mobile.css +2 -2
- package/mobile.js +3 -2
- package/modern/component.desktop.js +1 -1
- package/modern/component.mobile.js +2 -2
- package/modern/component.responsive.js +1 -1
- package/modern/components/base-confirmation/component.js +2 -2
- package/modern/components/base-confirmation/index.css +2 -2
- package/modern/components/base-confirmation/index.js +1 -1
- package/modern/components/countdown-loader/component.js +1 -1
- package/modern/components/countdown-loader/index.css +2 -2
- package/modern/components/header/component.js +1 -1
- package/modern/components/header/index.css +4 -4
- package/modern/components/index.js +1 -1
- package/modern/components/screens/fatal-error/component.js +1 -1
- package/modern/components/screens/fatal-error/index.css +6 -6
- package/modern/components/screens/hint/component.js +1 -1
- package/modern/components/screens/hint/index.css +12 -12
- package/modern/components/screens/index.js +1 -1
- package/modern/components/screens/initial/component.js +1 -1
- package/modern/components/screens/initial/countdown-section.js +1 -1
- package/modern/components/screens/initial/index.css +18 -18
- package/modern/components/screens/initial/index.js +1 -1
- package/modern/components/screens/temp-block/component.js +1 -1
- package/modern/components/screens/temp-block/index.css +7 -7
- package/modern/{countdown-section-b0b34939.d.ts → countdown-section-3ccbe0d1.d.ts} +0 -0
- package/modern/{countdown-section-b0b34939.js → countdown-section-3ccbe0d1.js} +1 -1
- package/modern/desktop.js +1 -1
- package/modern/index.js +1 -1
- package/modern/mobile.css +2 -2
- package/modern/mobile.js +1 -1
- package/modern/responsive.js +1 -1
- package/package.json +8 -7
- package/responsive.js +5 -4
- package/component-adbf9996.d.ts +0 -37
- package/component-adbf9996.js +0 -130
- package/cssm/component-3c591970.d.ts +0 -37
- package/cssm/component-3c591970.js +0 -129
- package/esm/component-8d44589b.d.ts +0 -37
- package/esm/component-8d44589b.js +0 -122
|
@@ -12,6 +12,6 @@ import '@alfalab/hooks';
|
|
|
12
12
|
import '../../context.js';
|
|
13
13
|
import '../../utils.js';
|
|
14
14
|
import '../header/component.js';
|
|
15
|
-
import '../../countdown-section-
|
|
15
|
+
import '../../countdown-section-3ccbe0d1.js';
|
|
16
16
|
import '@alfalab/core-components-loader/modern';
|
|
17
17
|
import '../countdown-loader/component.js';
|
|
@@ -7,7 +7,7 @@ import { Typography } from '@alfalab/core-components-typography/modern';
|
|
|
7
7
|
import { usePrevious } from '@alfalab/hooks';
|
|
8
8
|
import { ConfirmationContext } from '../../../context.js';
|
|
9
9
|
import { Header } from '../../header/component.js';
|
|
10
|
-
import { s as styles, C as CountdownSection } from '../../../countdown-section-
|
|
10
|
+
import { s as styles, C as CountdownSection } from '../../../countdown-section-3ccbe0d1.js';
|
|
11
11
|
import '../../../utils.js';
|
|
12
12
|
import '@alfalab/core-components-loader/modern';
|
|
13
13
|
|
|
@@ -5,4 +5,4 @@ import '@alfalab/core-components-loader/modern';
|
|
|
5
5
|
import '@alfalab/core-components-typography/modern';
|
|
6
6
|
import '../../../context.js';
|
|
7
7
|
import '../../../utils.js';
|
|
8
|
-
export { C as CountdownSection } from '../../../countdown-section-
|
|
8
|
+
export { C as CountdownSection } from '../../../countdown-section-3ccbe0d1.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: fi51q */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-text-primary: #0b1f35;
|
|
@@ -38,51 +38,51 @@
|
|
|
38
38
|
--confirmation-text-color: var(--color-light-text-primary)
|
|
39
39
|
|
|
40
40
|
/* header */
|
|
41
|
-
} .
|
|
41
|
+
} .confirmation__component_gszlg {
|
|
42
42
|
display: flex;
|
|
43
43
|
flex-direction: column;
|
|
44
|
-
} .
|
|
44
|
+
} .confirmation__typographyTheme_gszlg.confirmation__typographyTheme_gszlg {
|
|
45
45
|
font-size: var(--confirmation-text-font-size);
|
|
46
46
|
line-height: var(--confirmation-text-line-height);
|
|
47
47
|
font-weight: var(--confirmation-text-font-weight);
|
|
48
48
|
font-family: var(--confirmation-text-font-family);
|
|
49
49
|
color: var(--confirmation-text-color);
|
|
50
|
-
} .
|
|
50
|
+
} .confirmation__phone_gszlg.confirmation__phone_gszlg {
|
|
51
51
|
color: var(--color-light-text-primary);
|
|
52
52
|
margin-bottom: var(--gap-2xl);
|
|
53
|
-
} .
|
|
53
|
+
} .confirmation__compact_gszlg {
|
|
54
54
|
margin-bottom: var(--gap-xl);
|
|
55
|
-
} .
|
|
55
|
+
} .confirmation__loaderWrap_gszlg {
|
|
56
56
|
display: flex;
|
|
57
57
|
align-items: center;
|
|
58
|
-
} .
|
|
58
|
+
} .confirmation__left_gszlg {
|
|
59
59
|
align-items: flex-start;
|
|
60
|
-
} .
|
|
60
|
+
} .confirmation__center_gszlg {
|
|
61
61
|
align-items: center;
|
|
62
62
|
text-align: center
|
|
63
|
-
} .
|
|
63
|
+
} .confirmation__center_gszlg .confirmation__loaderWrap_gszlg {
|
|
64
64
|
justify-content: center;
|
|
65
|
-
} .
|
|
65
|
+
} .confirmation__center_gszlg input {
|
|
66
66
|
margin: 0 var(--gap-2xs);
|
|
67
|
-
} .
|
|
67
|
+
} .confirmation__codeInput_gszlg {
|
|
68
68
|
margin-bottom: var(--gap-s);
|
|
69
|
-
} .
|
|
69
|
+
} .confirmation__smsComeLink_gszlg.confirmation__smsComeLink_gszlg {
|
|
70
70
|
font-size: 14px;
|
|
71
71
|
line-height: 20px;
|
|
72
72
|
font-weight: 500;
|
|
73
|
-
} .
|
|
73
|
+
} .confirmation__countdownContainer_gszlg.confirmation__countdownContainer_gszlg {
|
|
74
74
|
color: var(--color-light-text-secondary);
|
|
75
75
|
margin-bottom: var(--gap-xl);
|
|
76
|
-
} .
|
|
76
|
+
} .confirmation__countdownMobile_gszlg.confirmation__countdownMobile_gszlg {
|
|
77
77
|
margin-bottom: var(--gap-l);
|
|
78
|
-
} .
|
|
78
|
+
} .confirmation__countdownLoaderMobile_gszlg.confirmation__countdownLoaderMobile_gszlg {
|
|
79
79
|
margin-bottom: var(--gap-m);
|
|
80
|
-
} .
|
|
80
|
+
} .confirmation__getCodeButton_gszlg {
|
|
81
81
|
position: relative;
|
|
82
82
|
top: var(--gap-2xs-neg);
|
|
83
83
|
margin-bottom: var(--gap-m);
|
|
84
|
-
} .
|
|
84
|
+
} .confirmation__getCodeButtonMobile_gszlg {
|
|
85
85
|
margin-bottom: 0;
|
|
86
|
-
} .
|
|
86
|
+
} .confirmation__containerInput_gszlg {
|
|
87
87
|
min-height: 80px;
|
|
88
88
|
}
|
|
@@ -9,5 +9,5 @@ import '@alfalab/hooks';
|
|
|
9
9
|
import '../../../context.js';
|
|
10
10
|
import '../../../utils.js';
|
|
11
11
|
import '../../header/component.js';
|
|
12
|
-
import '../../../countdown-section-
|
|
12
|
+
import '../../../countdown-section-3ccbe0d1.js';
|
|
13
13
|
import '@alfalab/core-components-loader/modern';
|
|
@@ -6,7 +6,7 @@ import { useCountdown, formatMsAsMinutes } from '../../../utils.js';
|
|
|
6
6
|
import { CountdownLoader } from '../../countdown-loader/component.js';
|
|
7
7
|
import { Header } from '../../header/component.js';
|
|
8
8
|
|
|
9
|
-
const styles = {"component":"
|
|
9
|
+
const styles = {"component":"confirmation__component_1sik8","center":"confirmation__center_1sik8","typographyTheme":"confirmation__typographyTheme_1sik8","description":"confirmation__description_1sik8","countdownWrap":"confirmation__countdownWrap_1sik8","loader":"confirmation__loader_1sik8"};
|
|
10
10
|
require('./index.css')
|
|
11
11
|
|
|
12
12
|
const TempBlock = ({ mobile }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: a2ax1 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-text-primary: #0b1f35;
|
|
@@ -31,23 +31,23 @@
|
|
|
31
31
|
--confirmation-text-color: var(--color-light-text-primary)
|
|
32
32
|
|
|
33
33
|
/* header */
|
|
34
|
-
} .
|
|
34
|
+
} .confirmation__component_1sik8 {
|
|
35
35
|
display: flex;
|
|
36
36
|
flex-direction: column;
|
|
37
|
-
} .
|
|
37
|
+
} .confirmation__center_1sik8 {
|
|
38
38
|
align-items: center;
|
|
39
39
|
text-align: center;
|
|
40
|
-
} .
|
|
40
|
+
} .confirmation__typographyTheme_1sik8.confirmation__typographyTheme_1sik8 {
|
|
41
41
|
font-size: var(--confirmation-text-font-size);
|
|
42
42
|
line-height: var(--confirmation-text-line-height);
|
|
43
43
|
font-weight: var(--confirmation-text-font-weight);
|
|
44
44
|
font-family: var(--confirmation-text-font-family);
|
|
45
45
|
color: var(--confirmation-text-color);
|
|
46
|
-
} .
|
|
46
|
+
} .confirmation__description_1sik8.confirmation__description_1sik8 {
|
|
47
47
|
margin-bottom: var(--gap-xs);
|
|
48
|
-
} .
|
|
48
|
+
} .confirmation__countdownWrap_1sik8 {
|
|
49
49
|
display: flex;
|
|
50
50
|
align-items: center;
|
|
51
|
-
} .
|
|
51
|
+
} .confirmation__loader_1sik8 {
|
|
52
52
|
margin-right: var(--gap-xs);
|
|
53
53
|
}
|
|
File without changes
|
|
@@ -6,7 +6,7 @@ import { Typography } from '@alfalab/core-components-typography/modern';
|
|
|
6
6
|
import { ConfirmationContext } from './context.js';
|
|
7
7
|
import { formatMsAsMinutes } from './utils.js';
|
|
8
8
|
|
|
9
|
-
const styles = {"component":"
|
|
9
|
+
const styles = {"component":"confirmation__component_gszlg","typographyTheme":"confirmation__typographyTheme_gszlg","phone":"confirmation__phone_gszlg","compact":"confirmation__compact_gszlg","loaderWrap":"confirmation__loaderWrap_gszlg","left":"confirmation__left_gszlg","center":"confirmation__center_gszlg","codeInput":"confirmation__codeInput_gszlg","smsComeLink":"confirmation__smsComeLink_gszlg","countdownContainer":"confirmation__countdownContainer_gszlg","countdownMobile":"confirmation__countdownMobile_gszlg","countdownLoaderMobile":"confirmation__countdownLoaderMobile_gszlg","getCodeButton":"confirmation__getCodeButton_gszlg","getCodeButtonMobile":"confirmation__getCodeButtonMobile_gszlg","containerInput":"confirmation__containerInput_gszlg"};
|
|
10
10
|
require('./components/screens/initial/index.css')
|
|
11
11
|
|
|
12
12
|
const CountdownSection = ({ codeSendHintVisible, timePassed, processing, mobile, handleSmsRetryClick, }) => {
|
package/modern/desktop.js
CHANGED
|
@@ -12,7 +12,7 @@ import '@alfalab/core-components-code-input/modern';
|
|
|
12
12
|
import '@alfalab/core-components-link/modern';
|
|
13
13
|
import '@alfalab/core-components-typography/modern';
|
|
14
14
|
import './components/header/component.js';
|
|
15
|
-
import './countdown-section-
|
|
15
|
+
import './countdown-section-3ccbe0d1.js';
|
|
16
16
|
import '@alfalab/core-components-loader/modern';
|
|
17
17
|
import './components/screens/hint/component.js';
|
|
18
18
|
import './components/screens/fatal-error/component.js';
|
package/modern/index.js
CHANGED
|
@@ -17,6 +17,6 @@ import '@alfalab/core-components-code-input/modern';
|
|
|
17
17
|
import '@alfalab/core-components-link/modern';
|
|
18
18
|
import '@alfalab/core-components-typography/modern';
|
|
19
19
|
import './components/header/component.js';
|
|
20
|
-
import './countdown-section-
|
|
20
|
+
import './countdown-section-3ccbe0d1.js';
|
|
21
21
|
import '@alfalab/core-components-loader/modern';
|
|
22
22
|
import './component.mobile.js';
|
package/modern/mobile.css
CHANGED
package/modern/mobile.js
CHANGED
|
@@ -12,7 +12,7 @@ import '@alfalab/core-components-code-input/modern';
|
|
|
12
12
|
import '@alfalab/core-components-link/modern';
|
|
13
13
|
import '@alfalab/core-components-typography/modern';
|
|
14
14
|
import './components/header/component.js';
|
|
15
|
-
import './countdown-section-
|
|
15
|
+
import './countdown-section-3ccbe0d1.js';
|
|
16
16
|
import '@alfalab/core-components-loader/modern';
|
|
17
17
|
import './components/screens/hint/component.js';
|
|
18
18
|
import './components/screens/fatal-error/component.js';
|
package/modern/responsive.js
CHANGED
|
@@ -13,7 +13,7 @@ import '@alfalab/core-components-code-input/modern';
|
|
|
13
13
|
import '@alfalab/core-components-link/modern';
|
|
14
14
|
import '@alfalab/core-components-typography/modern';
|
|
15
15
|
import './components/header/component.js';
|
|
16
|
-
import './countdown-section-
|
|
16
|
+
import './countdown-section-3ccbe0d1.js';
|
|
17
17
|
import '@alfalab/core-components-loader/modern';
|
|
18
18
|
import './components/screens/hint/component.js';
|
|
19
19
|
import './components/screens/fatal-error/component.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-confirmation",
|
|
3
|
-
"version": "12.4.
|
|
3
|
+
"version": "12.4.9",
|
|
4
4
|
"description": "Sms confirmation component",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,15 +14,16 @@
|
|
|
14
14
|
"directory": "dist"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@alfalab/core-components-button": "^7.0
|
|
18
|
-
"@alfalab/core-components-code-input": "^2.3.
|
|
19
|
-
"@alfalab/core-components-link": "^5.0.
|
|
20
|
-
"@alfalab/core-components-loader": "^3.0.
|
|
21
|
-
"@alfalab/core-components-typography": "^3.
|
|
17
|
+
"@alfalab/core-components-button": "^7.1.0",
|
|
18
|
+
"@alfalab/core-components-code-input": "^2.3.2",
|
|
19
|
+
"@alfalab/core-components-link": "^5.0.3",
|
|
20
|
+
"@alfalab/core-components-loader": "^3.0.5",
|
|
21
|
+
"@alfalab/core-components-typography": "^3.2.0",
|
|
22
22
|
"@alfalab/hooks": "^1.4.1",
|
|
23
23
|
"@alfalab/icons-glyph": "^2.89.0",
|
|
24
24
|
"@alfalab/utils": "^1.13.3",
|
|
25
|
-
"classnames": "^2.3.1"
|
|
25
|
+
"classnames": "^2.3.1",
|
|
26
|
+
"tslib": "^2.4.0"
|
|
26
27
|
},
|
|
27
28
|
"peerDependencies": {
|
|
28
29
|
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
package/responsive.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var component_responsive = require('./component.responsive.js');
|
|
4
|
-
require('
|
|
4
|
+
require('tslib');
|
|
5
5
|
require('react');
|
|
6
|
-
require('classnames');
|
|
7
6
|
require('@alfalab/hooks');
|
|
7
|
+
require('./component.desktop.js');
|
|
8
|
+
require('./components/base-confirmation/component.js');
|
|
9
|
+
require('classnames');
|
|
8
10
|
require('./context.js');
|
|
9
11
|
require('./utils.js');
|
|
10
12
|
require('./types.js');
|
|
@@ -14,13 +16,12 @@ require('@alfalab/core-components-code-input');
|
|
|
14
16
|
require('@alfalab/core-components-link');
|
|
15
17
|
require('@alfalab/core-components-typography');
|
|
16
18
|
require('./components/header/component.js');
|
|
17
|
-
require('./countdown-section-
|
|
19
|
+
require('./countdown-section-784df003.js');
|
|
18
20
|
require('@alfalab/core-components-loader');
|
|
19
21
|
require('./components/screens/hint/component.js');
|
|
20
22
|
require('./components/screens/fatal-error/component.js');
|
|
21
23
|
require('./components/screens/temp-block/component.js');
|
|
22
24
|
require('./components/countdown-loader/component.js');
|
|
23
|
-
require('./component.desktop.js');
|
|
24
25
|
require('./component.mobile.js');
|
|
25
26
|
|
|
26
27
|
|
package/component-adbf9996.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { ConfirmationProps } from "./types";
|
|
3
|
-
declare function __extends(d: any, b: any): void;
|
|
4
|
-
declare function __rest(s: any, e: any): {};
|
|
5
|
-
declare function __decorate(decorators: any, target: any, key: any, desc: any, ...args: any[]): any;
|
|
6
|
-
declare function __param(paramIndex: any, decorator: any): (target: any, key: any) => void;
|
|
7
|
-
declare function __metadata(metadataKey: any, metadataValue: any): any;
|
|
8
|
-
declare function __awaiter(thisArg: any, _arguments: any, P: any, generator: any): any;
|
|
9
|
-
declare function __generator(thisArg: any, body: any): {
|
|
10
|
-
next: (v: any) => any;
|
|
11
|
-
throw: (v: any) => any;
|
|
12
|
-
return: (v: any) => any;
|
|
13
|
-
};
|
|
14
|
-
declare function __exportStar(m: any, o: any): void;
|
|
15
|
-
declare function __values(o: any): any;
|
|
16
|
-
declare function __read(o: any, n: any): any;
|
|
17
|
-
declare function __spread(...args: any[]): any[];
|
|
18
|
-
declare function __spreadArrays(...args: any[]): any[];
|
|
19
|
-
declare function __spreadArray(to: any, from: any, pack: any, ...args: any[]): any;
|
|
20
|
-
declare function __await(v: any): __await;
|
|
21
|
-
declare class __await {
|
|
22
|
-
constructor(v: any);
|
|
23
|
-
v: any;
|
|
24
|
-
}
|
|
25
|
-
declare function __asyncGenerator(thisArg: any, _arguments: any, generator: any): {};
|
|
26
|
-
declare function __asyncDelegator(o: any): {};
|
|
27
|
-
declare function __asyncValues(o: any): any;
|
|
28
|
-
declare function __makeTemplateObject(cooked: any, raw: any): any;
|
|
29
|
-
declare function __importStar(mod: any): any;
|
|
30
|
-
declare function __importDefault(mod: any): any;
|
|
31
|
-
declare function __classPrivateFieldGet(receiver: any, state: any, kind: any, f: any): any;
|
|
32
|
-
declare function __classPrivateFieldSet(receiver: any, state: any, value: any, kind: any, f: any): any;
|
|
33
|
-
declare function __classPrivateFieldIn(state: any, receiver: any): any;
|
|
34
|
-
declare function __assign(...args: any[]): any;
|
|
35
|
-
declare function __createBinding(o: any, m: any, k: any, k2: any): void;
|
|
36
|
-
declare const BaseConfirmation: FC<ConfirmationProps>;
|
|
37
|
-
export { __extends, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __spreadArrays, __spreadArray, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __classPrivateFieldIn, __assign, __createBinding, BaseConfirmation };
|
package/component-adbf9996.js
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
var cn = require('classnames');
|
|
5
|
-
var hooks = require('@alfalab/hooks');
|
|
6
|
-
var context = require('./context.js');
|
|
7
|
-
var types = require('./types.js');
|
|
8
|
-
var utils = require('./utils.js');
|
|
9
|
-
var components_screens_initial_component = require('./components/screens/initial/component.js');
|
|
10
|
-
var components_screens_hint_component = require('./components/screens/hint/component.js');
|
|
11
|
-
var components_screens_fatalError_component = require('./components/screens/fatal-error/component.js');
|
|
12
|
-
var components_screens_tempBlock_component = require('./components/screens/temp-block/component.js');
|
|
13
|
-
|
|
14
|
-
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
15
|
-
|
|
16
|
-
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
17
|
-
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
18
|
-
|
|
19
|
-
/******************************************************************************
|
|
20
|
-
Copyright (c) Microsoft Corporation.
|
|
21
|
-
|
|
22
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
23
|
-
purpose with or without fee is hereby granted.
|
|
24
|
-
|
|
25
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
26
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
27
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
28
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
29
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
30
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
31
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
32
|
-
***************************************************************************** */
|
|
33
|
-
exports.__assign = function () {
|
|
34
|
-
exports.__assign = Object.assign || function __assign(t) {
|
|
35
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
36
|
-
s = arguments[i];
|
|
37
|
-
for (var p in s)
|
|
38
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
39
|
-
t[p] = s[p];
|
|
40
|
-
}
|
|
41
|
-
return t;
|
|
42
|
-
};
|
|
43
|
-
return exports.__assign.apply(this, arguments);
|
|
44
|
-
};
|
|
45
|
-
function __rest(s, e) {
|
|
46
|
-
var t = {};
|
|
47
|
-
for (var p in s)
|
|
48
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
49
|
-
t[p] = s[p];
|
|
50
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
51
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
52
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
53
|
-
t[p[i]] = s[p[i]];
|
|
54
|
-
}
|
|
55
|
-
return t;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
var styles = {"component":"confirmation__component_4lbek"};
|
|
59
|
-
require('./components/base-confirmation/index.css')
|
|
60
|
-
|
|
61
|
-
var confirmationScreens = {
|
|
62
|
-
INITIAL: components_screens_initial_component.Initial,
|
|
63
|
-
HINT: components_screens_hint_component.Hint,
|
|
64
|
-
FATAL_ERROR: components_screens_fatalError_component.FatalError,
|
|
65
|
-
TEMP_BLOCK: components_screens_tempBlock_component.TempBlock,
|
|
66
|
-
};
|
|
67
|
-
var BaseConfirmation = function (_a) {
|
|
68
|
-
var state = _a.state, screen = _a.screen, _b = _a.alignContent, alignContent = _b === void 0 ? 'left' : _b; _a.children; var _c = _a.requiredCharAmount, requiredCharAmount = _c === void 0 ? 5 : _c, _d = _a.countdownDuration, countdownDuration = _d === void 0 ? utils.ONE_MINUTE : _d, _e = _a.tempBlockDuration, tempBlockDuration = _e === void 0 ? utils.ONE_DAY : _e, phone = _a.phone, blockSmsRetry = _a.blockSmsRetry, dataTestId = _a.dataTestId, className = _a.className, getScreensMap = _a.getScreensMap, onInputFinished = _a.onInputFinished, onChangeState = _a.onChangeState, onSmsRetryClick = _a.onSmsRetryClick, onChangeScreen = _a.onChangeScreen, onFatalErrorOkButtonClick = _a.onFatalErrorOkButtonClick, onTempBlockFinished = _a.onTempBlockFinished, mobile = _a.mobile, _f = _a.clearCodeOnError, clearCodeOnError = _f === void 0 ? true : _f, restProps = __rest(_a, ["state", "screen", "alignContent", "children", "requiredCharAmount", "countdownDuration", "tempBlockDuration", "phone", "blockSmsRetry", "dataTestId", "className", "getScreensMap", "onInputFinished", "onChangeState", "onSmsRetryClick", "onChangeScreen", "onFatalErrorOkButtonClick", "onTempBlockFinished", "mobile", "clearCodeOnError"]);
|
|
69
|
-
var _g = utils.useCountdown(countdownDuration), timeLeft = _g[0], startTimer = _g[1], stopTimer = _g[2];
|
|
70
|
-
var prevState = hooks.usePrevious(state);
|
|
71
|
-
React.useEffect(function () {
|
|
72
|
-
startTimer();
|
|
73
|
-
}, [startTimer]);
|
|
74
|
-
React.useEffect(function () {
|
|
75
|
-
/**
|
|
76
|
-
* Перезапускаем таймер после повторного запроса кода
|
|
77
|
-
*/
|
|
78
|
-
if (state === 'INITIAL' && prevState === 'CODE_SENDING') {
|
|
79
|
-
startTimer();
|
|
80
|
-
}
|
|
81
|
-
}, [state, prevState, startTimer]);
|
|
82
|
-
React.useEffect(function () {
|
|
83
|
-
/**
|
|
84
|
-
* Останавливаем таймер, если новый экран/состояние не содержит таймер
|
|
85
|
-
*/
|
|
86
|
-
if (!['INITIAL', 'HINT', 'TEMP_BLOCK'].includes(screen) || blockSmsRetry) {
|
|
87
|
-
stopTimer();
|
|
88
|
-
}
|
|
89
|
-
}, [state, screen, blockSmsRetry, stopTimer]);
|
|
90
|
-
var handleSmsRetry = function () {
|
|
91
|
-
onChangeState('CODE_SENDING');
|
|
92
|
-
onSmsRetryClick();
|
|
93
|
-
};
|
|
94
|
-
var handleInputFinished = function (code) {
|
|
95
|
-
onChangeState('CODE_CHECKING');
|
|
96
|
-
onInputFinished(code);
|
|
97
|
-
};
|
|
98
|
-
var handleFatalErrorOkButtonClick = function () {
|
|
99
|
-
if (onFatalErrorOkButtonClick) {
|
|
100
|
-
onFatalErrorOkButtonClick();
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
// eslint-disable-next-line react/jsx-no-constructed-context-values
|
|
104
|
-
var contextValue = {
|
|
105
|
-
alignContent: alignContent,
|
|
106
|
-
texts: exports.__assign(exports.__assign({}, types.defaultTexts), restProps.texts),
|
|
107
|
-
state: state,
|
|
108
|
-
screen: screen,
|
|
109
|
-
requiredCharAmount: requiredCharAmount,
|
|
110
|
-
countdownDuration: countdownDuration,
|
|
111
|
-
timeLeft: timeLeft,
|
|
112
|
-
tempBlockDuration: tempBlockDuration,
|
|
113
|
-
phone: phone,
|
|
114
|
-
blockSmsRetry: blockSmsRetry,
|
|
115
|
-
onTempBlockFinished: onTempBlockFinished,
|
|
116
|
-
onChangeState: onChangeState,
|
|
117
|
-
onChangeScreen: onChangeScreen,
|
|
118
|
-
clearCodeOnError: clearCodeOnError,
|
|
119
|
-
onInputFinished: handleInputFinished,
|
|
120
|
-
onSmsRetryClick: handleSmsRetry,
|
|
121
|
-
onFatalErrorOkButtonClick: handleFatalErrorOkButtonClick,
|
|
122
|
-
};
|
|
123
|
-
var screensMap = getScreensMap ? getScreensMap(confirmationScreens) : confirmationScreens;
|
|
124
|
-
var CurrentScreen = screensMap[screen];
|
|
125
|
-
return (React__default.default.createElement(context.ConfirmationContext.Provider, { value: contextValue },
|
|
126
|
-
React__default.default.createElement("div", { className: cn__default.default(styles.component, className), "data-test-id": dataTestId }, CurrentScreen && React__default.default.createElement(CurrentScreen, { mobile: mobile }))));
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
exports.BaseConfirmation = BaseConfirmation;
|
|
130
|
-
exports.__rest = __rest;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { ConfirmationProps } from "./types";
|
|
3
|
-
declare function __extends(d: any, b: any): void;
|
|
4
|
-
declare function __rest(s: any, e: any): {};
|
|
5
|
-
declare function __decorate(decorators: any, target: any, key: any, desc: any, ...args: any[]): any;
|
|
6
|
-
declare function __param(paramIndex: any, decorator: any): (target: any, key: any) => void;
|
|
7
|
-
declare function __metadata(metadataKey: any, metadataValue: any): any;
|
|
8
|
-
declare function __awaiter(thisArg: any, _arguments: any, P: any, generator: any): any;
|
|
9
|
-
declare function __generator(thisArg: any, body: any): {
|
|
10
|
-
next: (v: any) => any;
|
|
11
|
-
throw: (v: any) => any;
|
|
12
|
-
return: (v: any) => any;
|
|
13
|
-
};
|
|
14
|
-
declare function __exportStar(m: any, o: any): void;
|
|
15
|
-
declare function __values(o: any): any;
|
|
16
|
-
declare function __read(o: any, n: any): any;
|
|
17
|
-
declare function __spread(...args: any[]): any[];
|
|
18
|
-
declare function __spreadArrays(...args: any[]): any[];
|
|
19
|
-
declare function __spreadArray(to: any, from: any, pack: any, ...args: any[]): any;
|
|
20
|
-
declare function __await(v: any): __await;
|
|
21
|
-
declare class __await {
|
|
22
|
-
constructor(v: any);
|
|
23
|
-
v: any;
|
|
24
|
-
}
|
|
25
|
-
declare function __asyncGenerator(thisArg: any, _arguments: any, generator: any): {};
|
|
26
|
-
declare function __asyncDelegator(o: any): {};
|
|
27
|
-
declare function __asyncValues(o: any): any;
|
|
28
|
-
declare function __makeTemplateObject(cooked: any, raw: any): any;
|
|
29
|
-
declare function __importStar(mod: any): any;
|
|
30
|
-
declare function __importDefault(mod: any): any;
|
|
31
|
-
declare function __classPrivateFieldGet(receiver: any, state: any, kind: any, f: any): any;
|
|
32
|
-
declare function __classPrivateFieldSet(receiver: any, state: any, value: any, kind: any, f: any): any;
|
|
33
|
-
declare function __classPrivateFieldIn(state: any, receiver: any): any;
|
|
34
|
-
declare function __assign(...args: any[]): any;
|
|
35
|
-
declare function __createBinding(o: any, m: any, k: any, k2: any): void;
|
|
36
|
-
declare const BaseConfirmation: FC<ConfirmationProps>;
|
|
37
|
-
export { __extends, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __spreadArrays, __spreadArray, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __classPrivateFieldIn, __assign, __createBinding, BaseConfirmation };
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
var cn = require('classnames');
|
|
5
|
-
var hooks = require('@alfalab/hooks');
|
|
6
|
-
var context = require('./context.js');
|
|
7
|
-
var types = require('./types.js');
|
|
8
|
-
var utils = require('./utils.js');
|
|
9
|
-
var components_screens_initial_component = require('./components/screens/initial/component.js');
|
|
10
|
-
var components_screens_hint_component = require('./components/screens/hint/component.js');
|
|
11
|
-
var components_screens_fatalError_component = require('./components/screens/fatal-error/component.js');
|
|
12
|
-
var components_screens_tempBlock_component = require('./components/screens/temp-block/component.js');
|
|
13
|
-
var styles = require('./components/base-confirmation/index.module.css');
|
|
14
|
-
|
|
15
|
-
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
16
|
-
|
|
17
|
-
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
18
|
-
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
19
|
-
var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
20
|
-
|
|
21
|
-
/******************************************************************************
|
|
22
|
-
Copyright (c) Microsoft Corporation.
|
|
23
|
-
|
|
24
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
25
|
-
purpose with or without fee is hereby granted.
|
|
26
|
-
|
|
27
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
28
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
29
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
30
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
31
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
32
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
33
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
34
|
-
***************************************************************************** */
|
|
35
|
-
exports.__assign = function () {
|
|
36
|
-
exports.__assign = Object.assign || function __assign(t) {
|
|
37
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
38
|
-
s = arguments[i];
|
|
39
|
-
for (var p in s)
|
|
40
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
41
|
-
t[p] = s[p];
|
|
42
|
-
}
|
|
43
|
-
return t;
|
|
44
|
-
};
|
|
45
|
-
return exports.__assign.apply(this, arguments);
|
|
46
|
-
};
|
|
47
|
-
function __rest(s, e) {
|
|
48
|
-
var t = {};
|
|
49
|
-
for (var p in s)
|
|
50
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
51
|
-
t[p] = s[p];
|
|
52
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
53
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
54
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
55
|
-
t[p[i]] = s[p[i]];
|
|
56
|
-
}
|
|
57
|
-
return t;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
var confirmationScreens = {
|
|
61
|
-
INITIAL: components_screens_initial_component.Initial,
|
|
62
|
-
HINT: components_screens_hint_component.Hint,
|
|
63
|
-
FATAL_ERROR: components_screens_fatalError_component.FatalError,
|
|
64
|
-
TEMP_BLOCK: components_screens_tempBlock_component.TempBlock,
|
|
65
|
-
};
|
|
66
|
-
var BaseConfirmation = function (_a) {
|
|
67
|
-
var state = _a.state, screen = _a.screen, _b = _a.alignContent, alignContent = _b === void 0 ? 'left' : _b; _a.children; var _c = _a.requiredCharAmount, requiredCharAmount = _c === void 0 ? 5 : _c, _d = _a.countdownDuration, countdownDuration = _d === void 0 ? utils.ONE_MINUTE : _d, _e = _a.tempBlockDuration, tempBlockDuration = _e === void 0 ? utils.ONE_DAY : _e, phone = _a.phone, blockSmsRetry = _a.blockSmsRetry, dataTestId = _a.dataTestId, className = _a.className, getScreensMap = _a.getScreensMap, onInputFinished = _a.onInputFinished, onChangeState = _a.onChangeState, onSmsRetryClick = _a.onSmsRetryClick, onChangeScreen = _a.onChangeScreen, onFatalErrorOkButtonClick = _a.onFatalErrorOkButtonClick, onTempBlockFinished = _a.onTempBlockFinished, mobile = _a.mobile, _f = _a.clearCodeOnError, clearCodeOnError = _f === void 0 ? true : _f, restProps = __rest(_a, ["state", "screen", "alignContent", "children", "requiredCharAmount", "countdownDuration", "tempBlockDuration", "phone", "blockSmsRetry", "dataTestId", "className", "getScreensMap", "onInputFinished", "onChangeState", "onSmsRetryClick", "onChangeScreen", "onFatalErrorOkButtonClick", "onTempBlockFinished", "mobile", "clearCodeOnError"]);
|
|
68
|
-
var _g = utils.useCountdown(countdownDuration), timeLeft = _g[0], startTimer = _g[1], stopTimer = _g[2];
|
|
69
|
-
var prevState = hooks.usePrevious(state);
|
|
70
|
-
React.useEffect(function () {
|
|
71
|
-
startTimer();
|
|
72
|
-
}, [startTimer]);
|
|
73
|
-
React.useEffect(function () {
|
|
74
|
-
/**
|
|
75
|
-
* Перезапускаем таймер после повторного запроса кода
|
|
76
|
-
*/
|
|
77
|
-
if (state === 'INITIAL' && prevState === 'CODE_SENDING') {
|
|
78
|
-
startTimer();
|
|
79
|
-
}
|
|
80
|
-
}, [state, prevState, startTimer]);
|
|
81
|
-
React.useEffect(function () {
|
|
82
|
-
/**
|
|
83
|
-
* Останавливаем таймер, если новый экран/состояние не содержит таймер
|
|
84
|
-
*/
|
|
85
|
-
if (!['INITIAL', 'HINT', 'TEMP_BLOCK'].includes(screen) || blockSmsRetry) {
|
|
86
|
-
stopTimer();
|
|
87
|
-
}
|
|
88
|
-
}, [state, screen, blockSmsRetry, stopTimer]);
|
|
89
|
-
var handleSmsRetry = function () {
|
|
90
|
-
onChangeState('CODE_SENDING');
|
|
91
|
-
onSmsRetryClick();
|
|
92
|
-
};
|
|
93
|
-
var handleInputFinished = function (code) {
|
|
94
|
-
onChangeState('CODE_CHECKING');
|
|
95
|
-
onInputFinished(code);
|
|
96
|
-
};
|
|
97
|
-
var handleFatalErrorOkButtonClick = function () {
|
|
98
|
-
if (onFatalErrorOkButtonClick) {
|
|
99
|
-
onFatalErrorOkButtonClick();
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
// eslint-disable-next-line react/jsx-no-constructed-context-values
|
|
103
|
-
var contextValue = {
|
|
104
|
-
alignContent: alignContent,
|
|
105
|
-
texts: exports.__assign(exports.__assign({}, types.defaultTexts), restProps.texts),
|
|
106
|
-
state: state,
|
|
107
|
-
screen: screen,
|
|
108
|
-
requiredCharAmount: requiredCharAmount,
|
|
109
|
-
countdownDuration: countdownDuration,
|
|
110
|
-
timeLeft: timeLeft,
|
|
111
|
-
tempBlockDuration: tempBlockDuration,
|
|
112
|
-
phone: phone,
|
|
113
|
-
blockSmsRetry: blockSmsRetry,
|
|
114
|
-
onTempBlockFinished: onTempBlockFinished,
|
|
115
|
-
onChangeState: onChangeState,
|
|
116
|
-
onChangeScreen: onChangeScreen,
|
|
117
|
-
clearCodeOnError: clearCodeOnError,
|
|
118
|
-
onInputFinished: handleInputFinished,
|
|
119
|
-
onSmsRetryClick: handleSmsRetry,
|
|
120
|
-
onFatalErrorOkButtonClick: handleFatalErrorOkButtonClick,
|
|
121
|
-
};
|
|
122
|
-
var screensMap = getScreensMap ? getScreensMap(confirmationScreens) : confirmationScreens;
|
|
123
|
-
var CurrentScreen = screensMap[screen];
|
|
124
|
-
return (React__default.default.createElement(context.ConfirmationContext.Provider, { value: contextValue },
|
|
125
|
-
React__default.default.createElement("div", { className: cn__default.default(styles__default.default.component, className), "data-test-id": dataTestId }, CurrentScreen && React__default.default.createElement(CurrentScreen, { mobile: mobile }))));
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
exports.BaseConfirmation = BaseConfirmation;
|
|
129
|
-
exports.__rest = __rest;
|