@alfalab/core-components-confirmation 12.4.7 → 12.4.8

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.
Files changed (109) hide show
  1. package/component.desktop.js +4 -3
  2. package/component.mobile.js +6 -5
  3. package/component.responsive.js +5 -4
  4. package/components/base-confirmation/component.d.ts +4 -0
  5. package/components/base-confirmation/component.js +87 -13
  6. package/components/base-confirmation/index.css +2 -2
  7. package/components/base-confirmation/index.d.ts +1 -1
  8. package/components/base-confirmation/index.js +3 -2
  9. package/components/countdown-loader/component.js +1 -1
  10. package/components/countdown-loader/index.css +2 -2
  11. package/components/header/component.js +1 -1
  12. package/components/header/index.css +4 -4
  13. package/components/index.js +1 -1
  14. package/components/screens/fatal-error/component.js +1 -1
  15. package/components/screens/fatal-error/index.css +6 -6
  16. package/components/screens/hint/component.js +1 -1
  17. package/components/screens/hint/index.css +12 -12
  18. package/components/screens/index.js +1 -1
  19. package/components/screens/initial/component.js +1 -1
  20. package/components/screens/initial/countdown-section.js +1 -1
  21. package/components/screens/initial/index.css +18 -18
  22. package/components/screens/initial/index.js +1 -1
  23. package/components/screens/temp-block/component.js +1 -1
  24. package/components/screens/temp-block/index.css +7 -7
  25. package/{countdown-section-94a35216.d.ts → countdown-section-bda43975.d.ts} +0 -0
  26. package/{countdown-section-94a35216.js → countdown-section-bda43975.js} +1 -1
  27. package/cssm/component.desktop.js +3 -2
  28. package/cssm/component.mobile.js +4 -3
  29. package/cssm/component.responsive.js +4 -3
  30. package/cssm/components/base-confirmation/component.d.ts +4 -0
  31. package/cssm/components/base-confirmation/component.js +85 -13
  32. package/cssm/components/base-confirmation/index.d.ts +1 -1
  33. package/cssm/components/base-confirmation/index.js +2 -1
  34. package/cssm/desktop.js +2 -1
  35. package/cssm/index.js +2 -1
  36. package/cssm/mobile.js +2 -1
  37. package/cssm/responsive.js +4 -3
  38. package/desktop.js +3 -2
  39. package/esm/component.desktop.js +3 -2
  40. package/esm/component.mobile.js +4 -3
  41. package/esm/component.responsive.js +3 -2
  42. package/esm/components/base-confirmation/component.d.ts +4 -0
  43. package/esm/components/base-confirmation/component.js +85 -12
  44. package/esm/components/base-confirmation/index.css +2 -2
  45. package/esm/components/base-confirmation/index.d.ts +1 -1
  46. package/esm/components/base-confirmation/index.js +3 -2
  47. package/esm/components/countdown-loader/component.js +1 -1
  48. package/esm/components/countdown-loader/index.css +2 -2
  49. package/esm/components/header/component.js +1 -1
  50. package/esm/components/header/index.css +4 -4
  51. package/esm/components/index.js +1 -1
  52. package/esm/components/screens/fatal-error/component.js +1 -1
  53. package/esm/components/screens/fatal-error/index.css +6 -6
  54. package/esm/components/screens/hint/component.js +1 -1
  55. package/esm/components/screens/hint/index.css +12 -12
  56. package/esm/components/screens/index.js +1 -1
  57. package/esm/components/screens/initial/component.js +1 -1
  58. package/esm/components/screens/initial/countdown-section.js +1 -1
  59. package/esm/components/screens/initial/index.css +18 -18
  60. package/esm/components/screens/initial/index.js +1 -1
  61. package/esm/components/screens/temp-block/component.js +1 -1
  62. package/esm/components/screens/temp-block/index.css +7 -7
  63. package/esm/{countdown-section-1560b6e0.d.ts → countdown-section-6eb66678.d.ts} +0 -0
  64. package/esm/{countdown-section-1560b6e0.js → countdown-section-6eb66678.js} +1 -1
  65. package/esm/desktop.js +3 -2
  66. package/esm/index.js +3 -2
  67. package/esm/mobile.css +2 -2
  68. package/esm/mobile.js +3 -2
  69. package/esm/responsive.js +5 -4
  70. package/index.js +3 -2
  71. package/mobile.css +2 -2
  72. package/mobile.js +3 -2
  73. package/modern/component.desktop.js +1 -1
  74. package/modern/component.mobile.js +2 -2
  75. package/modern/component.responsive.js +1 -1
  76. package/modern/components/base-confirmation/component.js +2 -2
  77. package/modern/components/base-confirmation/index.css +2 -2
  78. package/modern/components/base-confirmation/index.js +1 -1
  79. package/modern/components/countdown-loader/component.js +1 -1
  80. package/modern/components/countdown-loader/index.css +2 -2
  81. package/modern/components/header/component.js +1 -1
  82. package/modern/components/header/index.css +4 -4
  83. package/modern/components/index.js +1 -1
  84. package/modern/components/screens/fatal-error/component.js +1 -1
  85. package/modern/components/screens/fatal-error/index.css +6 -6
  86. package/modern/components/screens/hint/component.js +1 -1
  87. package/modern/components/screens/hint/index.css +12 -12
  88. package/modern/components/screens/index.js +1 -1
  89. package/modern/components/screens/initial/component.js +1 -1
  90. package/modern/components/screens/initial/countdown-section.js +1 -1
  91. package/modern/components/screens/initial/index.css +18 -18
  92. package/modern/components/screens/initial/index.js +1 -1
  93. package/modern/components/screens/temp-block/component.js +1 -1
  94. package/modern/components/screens/temp-block/index.css +7 -7
  95. package/modern/{countdown-section-b0b34939.d.ts → countdown-section-f17bf1df.d.ts} +0 -0
  96. package/modern/{countdown-section-b0b34939.js → countdown-section-f17bf1df.js} +1 -1
  97. package/modern/desktop.js +1 -1
  98. package/modern/index.js +1 -1
  99. package/modern/mobile.css +2 -2
  100. package/modern/mobile.js +1 -1
  101. package/modern/responsive.js +1 -1
  102. package/package.json +8 -7
  103. package/responsive.js +5 -4
  104. package/component-adbf9996.d.ts +0 -37
  105. package/component-adbf9996.js +0 -130
  106. package/cssm/component-3c591970.d.ts +0 -37
  107. package/cssm/component-3c591970.js +0 -129
  108. package/esm/component-8d44589b.d.ts +0 -37
  109. 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-b0b34939.js';
15
+ import '../../countdown-section-f17bf1df.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-b0b34939.js';
10
+ import { s as styles, C as CountdownSection } from '../../../countdown-section-f17bf1df.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-b0b34939.js';
8
+ export { C as CountdownSection } from '../../../countdown-section-f17bf1df.js';
@@ -1,4 +1,4 @@
1
- /* hash: 1uuc9 */
1
+ /* hash: lb4mi */
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
- } .confirmation__component_ezi6s {
41
+ } .confirmation__component_31kmk {
42
42
  display: flex;
43
43
  flex-direction: column;
44
- } .confirmation__typographyTheme_ezi6s.confirmation__typographyTheme_ezi6s {
44
+ } .confirmation__typographyTheme_31kmk.confirmation__typographyTheme_31kmk {
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
- } .confirmation__phone_ezi6s.confirmation__phone_ezi6s {
50
+ } .confirmation__phone_31kmk.confirmation__phone_31kmk {
51
51
  color: var(--color-light-text-primary);
52
52
  margin-bottom: var(--gap-2xl);
53
- } .confirmation__compact_ezi6s {
53
+ } .confirmation__compact_31kmk {
54
54
  margin-bottom: var(--gap-xl);
55
- } .confirmation__loaderWrap_ezi6s {
55
+ } .confirmation__loaderWrap_31kmk {
56
56
  display: flex;
57
57
  align-items: center;
58
- } .confirmation__left_ezi6s {
58
+ } .confirmation__left_31kmk {
59
59
  align-items: flex-start;
60
- } .confirmation__center_ezi6s {
60
+ } .confirmation__center_31kmk {
61
61
  align-items: center;
62
62
  text-align: center
63
- } .confirmation__center_ezi6s .confirmation__loaderWrap_ezi6s {
63
+ } .confirmation__center_31kmk .confirmation__loaderWrap_31kmk {
64
64
  justify-content: center;
65
- } .confirmation__center_ezi6s input {
65
+ } .confirmation__center_31kmk input {
66
66
  margin: 0 var(--gap-2xs);
67
- } .confirmation__codeInput_ezi6s {
67
+ } .confirmation__codeInput_31kmk {
68
68
  margin-bottom: var(--gap-s);
69
- } .confirmation__smsComeLink_ezi6s.confirmation__smsComeLink_ezi6s {
69
+ } .confirmation__smsComeLink_31kmk.confirmation__smsComeLink_31kmk {
70
70
  font-size: 14px;
71
71
  line-height: 20px;
72
72
  font-weight: 500;
73
- } .confirmation__countdownContainer_ezi6s.confirmation__countdownContainer_ezi6s {
73
+ } .confirmation__countdownContainer_31kmk.confirmation__countdownContainer_31kmk {
74
74
  color: var(--color-light-text-secondary);
75
75
  margin-bottom: var(--gap-xl);
76
- } .confirmation__countdownMobile_ezi6s.confirmation__countdownMobile_ezi6s {
76
+ } .confirmation__countdownMobile_31kmk.confirmation__countdownMobile_31kmk {
77
77
  margin-bottom: var(--gap-l);
78
- } .confirmation__countdownLoaderMobile_ezi6s.confirmation__countdownLoaderMobile_ezi6s {
78
+ } .confirmation__countdownLoaderMobile_31kmk.confirmation__countdownLoaderMobile_31kmk {
79
79
  margin-bottom: var(--gap-m);
80
- } .confirmation__getCodeButton_ezi6s {
80
+ } .confirmation__getCodeButton_31kmk {
81
81
  position: relative;
82
82
  top: var(--gap-2xs-neg);
83
83
  margin-bottom: var(--gap-m);
84
- } .confirmation__getCodeButtonMobile_ezi6s {
84
+ } .confirmation__getCodeButtonMobile_31kmk {
85
85
  margin-bottom: 0;
86
- } .confirmation__containerInput_ezi6s {
86
+ } .confirmation__containerInput_31kmk {
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-b0b34939.js';
12
+ import '../../../countdown-section-f17bf1df.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":"confirmation__component_9vga9","center":"confirmation__center_9vga9","typographyTheme":"confirmation__typographyTheme_9vga9","description":"confirmation__description_9vga9","countdownWrap":"confirmation__countdownWrap_9vga9","loader":"confirmation__loader_9vga9"};
9
+ const styles = {"component":"confirmation__component_3hae3","center":"confirmation__center_3hae3","typographyTheme":"confirmation__typographyTheme_3hae3","description":"confirmation__description_3hae3","countdownWrap":"confirmation__countdownWrap_3hae3","loader":"confirmation__loader_3hae3"};
10
10
  require('./index.css')
11
11
 
12
12
  const TempBlock = ({ mobile }) => {
@@ -1,4 +1,4 @@
1
- /* hash: 187rq */
1
+ /* hash: 1xpo5 */
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
- } .confirmation__component_9vga9 {
34
+ } .confirmation__component_3hae3 {
35
35
  display: flex;
36
36
  flex-direction: column;
37
- } .confirmation__center_9vga9 {
37
+ } .confirmation__center_3hae3 {
38
38
  align-items: center;
39
39
  text-align: center;
40
- } .confirmation__typographyTheme_9vga9.confirmation__typographyTheme_9vga9 {
40
+ } .confirmation__typographyTheme_3hae3.confirmation__typographyTheme_3hae3 {
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
- } .confirmation__description_9vga9.confirmation__description_9vga9 {
46
+ } .confirmation__description_3hae3.confirmation__description_3hae3 {
47
47
  margin-bottom: var(--gap-xs);
48
- } .confirmation__countdownWrap_9vga9 {
48
+ } .confirmation__countdownWrap_3hae3 {
49
49
  display: flex;
50
50
  align-items: center;
51
- } .confirmation__loader_9vga9 {
51
+ } .confirmation__loader_3hae3 {
52
52
  margin-right: var(--gap-xs);
53
53
  }
@@ -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":"confirmation__component_ezi6s","typographyTheme":"confirmation__typographyTheme_ezi6s","phone":"confirmation__phone_ezi6s","compact":"confirmation__compact_ezi6s","loaderWrap":"confirmation__loaderWrap_ezi6s","left":"confirmation__left_ezi6s","center":"confirmation__center_ezi6s","codeInput":"confirmation__codeInput_ezi6s","smsComeLink":"confirmation__smsComeLink_ezi6s","countdownContainer":"confirmation__countdownContainer_ezi6s","countdownMobile":"confirmation__countdownMobile_ezi6s","countdownLoaderMobile":"confirmation__countdownLoaderMobile_ezi6s","getCodeButton":"confirmation__getCodeButton_ezi6s","getCodeButtonMobile":"confirmation__getCodeButtonMobile_ezi6s","containerInput":"confirmation__containerInput_ezi6s"};
9
+ const styles = {"component":"confirmation__component_31kmk","typographyTheme":"confirmation__typographyTheme_31kmk","phone":"confirmation__phone_31kmk","compact":"confirmation__compact_31kmk","loaderWrap":"confirmation__loaderWrap_31kmk","left":"confirmation__left_31kmk","center":"confirmation__center_31kmk","codeInput":"confirmation__codeInput_31kmk","smsComeLink":"confirmation__smsComeLink_31kmk","countdownContainer":"confirmation__countdownContainer_31kmk","countdownMobile":"confirmation__countdownMobile_31kmk","countdownLoaderMobile":"confirmation__countdownLoaderMobile_31kmk","getCodeButton":"confirmation__getCodeButton_31kmk","getCodeButtonMobile":"confirmation__getCodeButtonMobile_31kmk","containerInput":"confirmation__containerInput_31kmk"};
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-b0b34939.js';
15
+ import './countdown-section-f17bf1df.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-b0b34939.js';
20
+ import './countdown-section-f17bf1df.js';
21
21
  import '@alfalab/core-components-loader/modern';
22
22
  import './component.mobile.js';
package/modern/mobile.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 15f0k */
2
- .confirmation__container_1414h {
1
+ /* hash: 1uwwz */
2
+ .confirmation__container_16npl {
3
3
  max-width: 288px;
4
4
  }
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-b0b34939.js';
15
+ import './countdown-section-f17bf1df.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';
@@ -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-b0b34939.js';
16
+ import './countdown-section-f17bf1df.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.7",
3
+ "version": "12.4.8",
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.5",
18
- "@alfalab/core-components-code-input": "^2.3.1",
19
- "@alfalab/core-components-link": "^5.0.2",
20
- "@alfalab/core-components-loader": "^3.0.4",
21
- "@alfalab/core-components-typography": "^3.1.0",
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.1.1",
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('./component-adbf9996.js');
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-94a35216.js');
19
+ require('./countdown-section-bda43975.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
 
@@ -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,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;