react-gldn-kit 0.1.90 → 0.1.92

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 (50) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/lib/components/HOCs/HOCErrorBoundary/index.js +8 -4
  3. package/dist/lib/components/HOCs/HOCKitConfigure/index.d.ts +3 -0
  4. package/dist/lib/components/HOCs/HOCKitConfigure/index.js +70 -0
  5. package/dist/lib/components/HOCs/HOCKitConfigure/types.d.ts +9 -0
  6. package/dist/lib/components/HOCs/HOCKitConfigure/types.js +2 -0
  7. package/dist/lib/components/Modals/Alert/components/Auth/SignIn/First/index.js +4 -2
  8. package/dist/lib/components/Modals/Alert/components/Auth/SignIn/Third/index.js +9 -6
  9. package/dist/lib/components/Modals/Alert/components/Auth/SignUp/First/index.js +4 -2
  10. package/dist/lib/components/Modals/Alert/components/Auth/SignUp/Third/index.js +4 -13
  11. package/dist/lib/components/Modals/Alert/components/LostPassword/First/components/EmailConfirmation/index.js +19 -4
  12. package/dist/lib/components/Modals/Alert/components/LostPassword/First/components/LostPasswordEmailForm/index.d.ts +1 -5
  13. package/dist/lib/components/Modals/Alert/components/LostPassword/First/components/LostPasswordEmailForm/index.js +16 -12
  14. package/dist/lib/components/Modals/Alert/components/LostPassword/First/components/LostPasswordPhoneForm/components/MoreInfo/index.js +4 -1
  15. package/dist/lib/components/Modals/Alert/components/LostPassword/First/components/LostPasswordPhoneForm/index.d.ts +1 -5
  16. package/dist/lib/components/Modals/Alert/components/LostPassword/First/components/LostPasswordPhoneForm/index.js +7 -28
  17. package/dist/lib/components/Modals/Alert/components/LostPassword/First/components/NumberConfirmation/index.d.ts +1 -0
  18. package/dist/lib/components/Modals/Alert/components/LostPassword/First/components/{NumberConfirmarion → NumberConfirmation}/index.js +29 -10
  19. package/dist/lib/components/Modals/Alert/components/LostPassword/First/index.js +2 -2
  20. package/dist/lib/components/Modals/Alert/index.js +21 -18
  21. package/dist/lib/components/SocialButtons/GoogleLoginButon/index.js +4 -1
  22. package/dist/lib/components/SocialButtons/index.js +3 -1
  23. package/dist/lib/components/ui/Inputs/EmailInput/index.js +4 -1
  24. package/dist/lib/components/ui/Inputs/PhoneInput/index.js +12 -7
  25. package/dist/lib/components/ui/Inputs/PhoneInput/types.d.ts +1 -0
  26. package/dist/lib/components/ui/Logos/index.js +22 -18
  27. package/dist/lib/context/logic/ModalContext.d.ts +1 -2
  28. package/dist/lib/index.d.ts +2 -1
  29. package/dist/lib/index.js +7 -5
  30. package/dist/lib/utils/shared.js +1 -1
  31. package/dist/lib/zustandStore/alerts/modal/types.d.ts +1 -1
  32. package/dist/lib/zustandStore/alerts/modal/types.js +1 -1
  33. package/dist/lib/zustandStore/forms/signUp/utils.d.ts +2 -2
  34. package/dist/lib/zustandStore/forms/signUp/utils.js +17 -11
  35. package/dist/lib/zustandStore/request/selector.d.ts +1 -0
  36. package/dist/lib/zustandStore/settings/selectors.d.ts +9 -0
  37. package/dist/lib/zustandStore/settings/selectors.js +35 -0
  38. package/dist/lib/zustandStore/settings/store.d.ts +2 -0
  39. package/dist/lib/zustandStore/settings/store.js +26 -0
  40. package/dist/lib/zustandStore/settings/types.d.ts +20 -0
  41. package/dist/lib/zustandStore/settings/types.js +2 -0
  42. package/dist/main.css +61 -12
  43. package/package.json +5 -4
  44. package/dist/lib/components/Modals/Alert/components/LostPassword/First/components/NumberConfirmarion/index.d.ts +0 -2
  45. package/dist/lib/constants/ui.d.ts +0 -1
  46. package/dist/lib/constants/ui.js +0 -5
  47. /package/dist/lib/components/Modals/Alert/components/LostPassword/First/components/{NumberConfirmarion → NumberConfirmation}/components/InputCode/index.d.ts +0 -0
  48. /package/dist/lib/components/Modals/Alert/components/LostPassword/First/components/{NumberConfirmarion → NumberConfirmation}/components/InputCode/index.js +0 -0
  49. /package/dist/lib/components/Modals/Alert/components/LostPassword/First/components/{NumberConfirmarion → NumberConfirmation}/constants.d.ts +0 -0
  50. /package/dist/lib/components/Modals/Alert/components/LostPassword/First/components/{NumberConfirmarion → NumberConfirmation}/constants.js +0 -0
@@ -59,6 +59,8 @@ var classnames_1 = __importDefault(require("classnames"));
59
59
  var Buttons_1 = require("components/ui/Buttons");
60
60
  var Logos_1 = require("components/ui/Logos");
61
61
  var styles = __importStar(require("./HOCErrorBoundary.module.css"));
62
+ var store_1 = require("zustandStore/settings/store");
63
+ var selectors_1 = require("zustandStore/settings/selectors");
62
64
  var HOCErrorBoundary = /** @class */ (function (_super) {
63
65
  __extends(HOCErrorBoundary, _super);
64
66
  function HOCErrorBoundary(props) {
@@ -85,15 +87,17 @@ var HOCErrorBoundary = /** @class */ (function (_super) {
85
87
  jivoDiv.setAttribute('style', '');
86
88
  };
87
89
  HOCErrorBoundary.prototype.render = function () {
88
- var _a = this.props, children = _a.children, tapesPaths = _a.tapesPaths, logoProps = _a.logoProps;
89
- var top = tapesPaths[0], bottom = tapesPaths[1], topDesktop = tapesPaths[2], bottomDesktop = tapesPaths[3];
90
+ var children = this.props.children;
91
+ // Get errorPage array from zustand store
92
+ var errorPage = (0, selectors_1.getKitErrorPageImageSelector)(store_1.useZustandKitSettings.getState());
93
+ var top = errorPage[0], bottom = errorPage[1], topDesktop = errorPage[2], bottomDesktop = errorPage[3];
90
94
  if (this.state.hasError) {
91
- return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.wrapperErrorPage }, { children: [(0, jsx_runtime_1.jsx)(Logos_1.Logo, __assign({}, logoProps, { isMobile: this.isMobile, classes: styles.logo })), (0, jsx_runtime_1.jsx)("div", { style: {
95
+ return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.wrapperErrorPage }, { children: [(0, jsx_runtime_1.jsx)(Logos_1.Logo, { isMobile: this.isMobile, classes: styles.logo }), (0, jsx_runtime_1.jsx)("div", { style: {
92
96
  background: "url(".concat(this.isMobile ? top : topDesktop, ")"),
93
97
  backgroundRepeat: 'no-repeat',
94
98
  backgroundSize: 'cover',
95
99
  backgroundPosition: 'center',
96
- }, className: (0, classnames_1.default)(styles.tape, styles.topTape) }), (0, jsx_runtime_1.jsx)("h1", __assign({ className: styles.title }, { children: "Text error" })), (0, jsx_runtime_1.jsx)("h2", __assign({ className: styles.subTitle }, { children: "A Hint to the user" })), (0, jsx_runtime_1.jsx)(Buttons_1.BaseButton, { text: "Update the site", size: "--button-xxl", buttonHeight: "--button-height-full", centreText: true, color: "primary", marginB: "base-double", handleClick: this.handleClickErrorBtn, classes: styles.errorButton }), (0, jsx_runtime_1.jsx)("div", { style: {
100
+ }, className: (0, classnames_1.default)(styles.tape, styles.topTape) }), (0, jsx_runtime_1.jsx)("h1", __assign({ className: styles.title }, { children: "Something went wrong" })), (0, jsx_runtime_1.jsx)("h2", __assign({ className: styles.subTitle }, { children: "We're sorry, but something unexpected happened. Please try refreshing the page." })), (0, jsx_runtime_1.jsx)(Buttons_1.BaseButton, { text: "Update the site", size: "--button-xxl", buttonHeight: "--button-height-full", centreText: true, color: "primary", marginB: "base-double", handleClick: this.handleClickErrorBtn, classes: styles.errorButton }), (0, jsx_runtime_1.jsx)("div", { style: {
97
101
  background: "url(".concat(this.isMobile ? bottom : bottomDesktop, ")"),
98
102
  backgroundRepeat: 'no-repeat',
99
103
  backgroundSize: 'cover',
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { PropsConfigure } from './types';
3
+ export declare const HOCKitConfigure: (props: PropsConfigure) => string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || function (mod) {
30
+ if (mod && mod.__esModule) return mod;
31
+ var result = {};
32
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
+ __setModuleDefault(result, mod);
34
+ return result;
35
+ };
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.HOCKitConfigure = void 0;
38
+ var jsx_runtime_1 = require("react/jsx-runtime");
39
+ var react_1 = require("react");
40
+ var ui_1 = require("types/ui");
41
+ var styles = __importStar(require("./HOCKitConfigure.module.css"));
42
+ var store_1 = require("zustandStore/settings/store");
43
+ var selectors_1 = require("zustandStore/settings/selectors");
44
+ var HOCKitConfigure = function (props) {
45
+ var children = props.children, appType = props.appType;
46
+ var setImageSettings = (0, store_1.useZustandKitSettings)(selectors_1.setKitSettingImageAction);
47
+ var setDevState = (0, store_1.useZustandKitSettings)(selectors_1.setKitSettingDevAction);
48
+ var setAppType = (0, store_1.useZustandKitSettings)(selectors_1.setKitSettingAppTypeAction);
49
+ (0, react_1.useEffect)(function () {
50
+ var appType = props.appType, isDev = props.isDev, imgSettings = props.imgSettings;
51
+ setDevState(isDev);
52
+ setAppType(appType);
53
+ setImageSettings(imgSettings);
54
+ }, [props]);
55
+ if (![
56
+ ui_1.EAppType.Azure,
57
+ ui_1.EAppType.Elon,
58
+ ui_1.EAppType.XXX,
59
+ ui_1.EAppType.Opera,
60
+ ui_1.EAppType.FsWin,
61
+ ui_1.EAppType.JabiBet,
62
+ ui_1.EAppType.GoblinBet,
63
+ ui_1.EAppType.M1,
64
+ ui_1.EAppType.Cawabanga,
65
+ ].includes(appType)) {
66
+ return (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.notConfigure }, { children: "not configure" }));
67
+ }
68
+ return children;
69
+ };
70
+ exports.HOCKitConfigure = HOCKitConfigure;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { EAppType } from 'types/ui';
3
+ import { ImageSettingsProps } from 'zustandStore/settings/types';
4
+ export type PropsConfigure = {
5
+ children: React.ReactNode;
6
+ appType: EAppType;
7
+ isDev: boolean;
8
+ imgSettings: ImageSettingsProps;
9
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -53,7 +53,6 @@ var HOCRequestLoader_1 = require("components/HOCs/HOCRequestLoader");
53
53
  var CircularLoader_1 = require("components/ui/Loaders/CircularLoader");
54
54
  var SocialButtons_1 = require("components/SocialButtons");
55
55
  var constants_1 = require("./constants");
56
- var ui_1 = require("constants/ui");
57
56
  var store_1 = require("zustandStore/alerts/notification/store");
58
57
  var selectors_1 = require("zustandStore/alerts/notification/selectors");
59
58
  var store_2 = require("zustandStore/forms/signIn/store");
@@ -62,6 +61,8 @@ var store_3 = require("zustandStore/alerts/modal/store");
62
61
  var selectors_3 = require("zustandStore/alerts/modal/selectors");
63
62
  var types_2 = require("zustandStore/alerts/modal/types");
64
63
  var types_3 = require("zustandStore/forms/signIn/types");
64
+ var store_4 = require("zustandStore/settings/store");
65
+ var selectors_4 = require("zustandStore/settings/selectors");
65
66
  var types_4 = require("zustandStore/forms/signUp/types");
66
67
  var utils_1 = require("zustandStore/forms/signUp/utils");
67
68
  var ModalContext_1 = require("context/logic/ModalContext");
@@ -71,6 +72,7 @@ var SignIn = function (_a) {
71
72
  var classes = _a.classes;
72
73
  var useTransportControllers = (0, ModalContext_1.useHookProvider)().useTransportControllers;
73
74
  var sendCommand = useTransportControllers().sendCommand;
75
+ var isDev = (0, store_4.useZustandKitSettings)(selectors_4.getKitDevSelector);
74
76
  var activeForm = (0, store_2.useZustandSignInKitStore)(selectors_2.zustandSignInKitSelectors.getActiveSignInFormSelector);
75
77
  var setAuthFormType = (0, store_2.useZustandSignInKitStore)(selectors_2.zustandSignInKitSelectors.setActiveSignInFormAction);
76
78
  var setModal = (0, store_3.useZustandModalKitStore)(selectors_3.zustandModalKitSelector.closeAndOpenModalAction);
@@ -135,6 +137,6 @@ var SignIn = function (_a) {
135
137
  registrationTheme: registrationTheme,
136
138
  }) }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "authorization.lostPasswordBtn" }) })), (0, jsx_runtime_1.jsx)(HOCRequestLoader_1.HOCRequestLoader, __assign({ command: "\\\\x02", requestId: types_1.ERequestIds.AuthorizeByEmail, customLoader: (0, jsx_runtime_1.jsx)(CircularLoader_1.CircularLoader, {}) }, { children: (0, jsx_runtime_1.jsx)(Buttons_1.BaseButton, { text: "authorization.submitBtn", size: "--button-full", buttonHeight: "--button-height-full", color: "primary", disabled: Boolean(!activeInput || !password), handleClick: handleSignIn, classes: styles.btn, centreText: true }) })), (0, jsx_runtime_1.jsx)("div", __assign({ onClick: setModalType(types_2.EModalTypes.SignUp, {
137
139
  registrationTheme: registrationTheme,
138
- }), className: styles.noAccount }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "authorization.noAccount" }) }))] })), (ui_1.IS_DEV === null || ui_1.IS_DEV === void 0 ? void 0 : (0, ui_1.IS_DEV)()) && ((0, jsx_runtime_1.jsx)(SocialButtons_1.SocialButtons, { social: ['Google'], wrapperClasses: styles.wrapperButtons }))] })));
140
+ }), className: styles.noAccount }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "authorization.noAccount" }) }))] })), isDev && ((0, jsx_runtime_1.jsx)(SocialButtons_1.SocialButtons, { social: ['Google'], wrapperClasses: styles.wrapperButtons }))] })));
139
141
  };
140
142
  exports.SignIn = SignIn;
@@ -63,19 +63,22 @@ var ModalContext_1 = require("context/logic/ModalContext");
63
63
  var styles = __importStar(require("./SignInThird.module.css"));
64
64
  var types_4 = require("../../SignUp/Third/types");
65
65
  var CrossSvg_1 = require("components/ui/Icons/Base/CrossSvg");
66
+ var selectors_3 = require("zustandStore/settings/selectors");
67
+ var store_3 = require("zustandStore/settings/store");
66
68
  var SignInThird = function () {
67
69
  var _a;
68
- var _b = (0, ModalContext_1.useHookProvider)(), useTransportControllers = _b.useTransportControllers, appType = _b.appType;
70
+ var useTransportControllers = (0, ModalContext_1.useHookProvider)().useTransportControllers;
71
+ var appType = (0, store_3.useZustandKitSettings)(selectors_3.getKitAppTypeSelector);
69
72
  var sendCommand = useTransportControllers().sendCommand;
70
73
  var activeForm = (0, store_1.useZustandSignInKitStore)(selectors_1.zustandSignInKitSelectors.getActiveSignInFormSelector);
71
74
  var setAuthFormType = (0, store_1.useZustandSignInKitStore)(selectors_1.zustandSignInKitSelectors.setActiveSignInFormAction);
72
75
  var closeAndOpen = (0, store_2.useZustandModalKitStore)(selectors_2.zustandModalKitSelector.closeAndOpenModalAction);
73
76
  var additionalSettings = (0, store_2.useZustandModalKitStore)(selectors_2.zustandModalKitSelector.getModalAdditionalInfoSelector) || {};
74
- var _c = additionalSettings.registrationTheme, registrationTheme = _c === void 0 ? types_4.ESignUpThreeTheme.Yellow : _c, _d = additionalSettings.promotionImagePath, promotionImagePath = _d === void 0 ? '' : _d;
75
- var _e = (0, react_1.useState)(''), password = _e[0], setPassword = _e[1];
76
- var _f = (0, react_1.useState)(''), email = _f[0], setEmail = _f[1];
77
- var _g = (0, react_1.useState)(''), id = _g[0], setId = _g[1];
78
- var _h = (0, react_1.useState)(''), phone = _h[0], setPhone = _h[1];
77
+ var _b = additionalSettings.registrationTheme, registrationTheme = _b === void 0 ? types_4.ESignUpThreeTheme.Yellow : _b, _c = additionalSettings.promotionImagePath, promotionImagePath = _c === void 0 ? '' : _c;
78
+ var _d = (0, react_1.useState)(''), password = _d[0], setPassword = _d[1];
79
+ var _e = (0, react_1.useState)(''), email = _e[0], setEmail = _e[1];
80
+ var _f = (0, react_1.useState)(''), id = _f[0], setId = _f[1];
81
+ var _g = (0, react_1.useState)(''), phone = _g[0], setPhone = _g[1];
79
82
  var handleSignIn = function () {
80
83
  var logInInfo = activeForm === types_3.EAuthFormType.Phone ? phone : email;
81
84
  if (activeForm === types_3.EAuthFormType.UserName) {
@@ -47,7 +47,6 @@ var EmailSignUp_1 = require("./components/Forms/EmailSignUp");
47
47
  var OneClickKit_1 = __importDefault(require("./components/Forms/OneClickKit"));
48
48
  var PhoneSignUp_1 = require("./components/Forms/PhoneSignUp");
49
49
  var SocialButtons_1 = require("components/SocialButtons");
50
- var ui_1 = require("constants/ui");
51
50
  var store_1 = require("zustandStore/alerts/modal/store");
52
51
  var selectors_1 = require("zustandStore/alerts/modal/selectors");
53
52
  var types_1 = require("zustandStore/alerts/modal/types");
@@ -57,9 +56,12 @@ var types_2 = require("zustandStore/forms/signUp/types");
57
56
  var ModalContext_1 = require("context/logic/ModalContext");
58
57
  var useHookFabric_1 = require("hooks/useHookFabric");
59
58
  var styles = __importStar(require("./SignUp.module.css"));
59
+ var selectors_3 = require("zustandStore/settings/selectors");
60
+ var store_3 = require("zustandStore/settings/store");
60
61
  var SignUp = function (props) {
61
62
  var _a;
62
63
  var classes = props.classes, bonusText = props.bonusText, bonusSubText = props.bonusSubText, _b = props.withCongratulationText, withCongratulationText = _b === void 0 ? true : _b, registrationSettings = props.registrationSettings, buttonText = props.buttonText;
64
+ var isDev = (0, store_3.useZustandKitSettings)(selectors_3.getKitDevSelector);
63
65
  var _c = (0, ModalContext_1.useHookProvider)(), useTransportControllers = _c.useTransportControllers, useCurrencies = _c.useCurrencies, useCountryInfo = _c.useCountryInfo, sendRegistrationCommand = _c.sendRegistrationCommand;
64
66
  var sendCommand = useTransportControllers().sendCommand;
65
67
  var availableCurrencies = (0, useHookFabric_1.useHookFabric)({
@@ -98,6 +100,6 @@ var SignUp = function (props) {
98
100
  _a[styles.white] = types_2.ESignUpTheme[regType] === types_2.ESignUpTheme.BaseWhite,
99
101
  _a)) }, { children: [(bonusSignUp || customBonusText) && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.bonusText }, { children: [isCongratulation && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.textTitle }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "wheelTwo.secondPopUp.title" }) }))), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.subText }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: customBonusSubText
100
102
  ? customBonusSubText
101
- : 'wheelTwo.secondPopUp.subTitle' }) })), (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: customBonusText ? customBonusText : 'wheelTwo.secondPopUp.bonus' })] }))), (ui_1.IS_DEV === null || ui_1.IS_DEV === void 0 ? void 0 : (0, ui_1.IS_DEV)()) && (0, jsx_runtime_1.jsx)(SocialButtons_1.SocialButtons, { social: ['Google'] }), (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.wrapperTabsAndForm }, { children: [activeForm !== null && tabs.length !== 1 && ((0, jsx_runtime_1.jsx)(Tabs_1.Tabs, { activeValue: activeForm, data: tabs, onChange: setActiveForm, classes: styles.tabs, type: "underline" })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.zIndex }, { children: [activeForm === types_2.ERegistrationForm.Email && ((0, jsx_runtime_1.jsx)(EmailSignUp_1.EmailSignUp, { isSelected: true, countryInfo: countryInfo, handleRegistration: sendRegistrationCommand, availableCurrencies: availableCurrencies || [], buttonText: customSignUpButtonText })), activeForm === types_2.ERegistrationForm.Phone && ((0, jsx_runtime_1.jsx)(PhoneSignUp_1.PhoneSignUp, { isSelected: true, requestCode: handleRegistrationCode, handleRegistration: sendRegistrationCommand, countryInfo: countryInfo, availableCurrencies: availableCurrencies || [], buttonText: customSignUpButtonText })), activeForm === types_2.ERegistrationForm.PhoneWithoutCode && ((0, jsx_runtime_1.jsx)(PhoneSignUp_1.PhoneSignUp, { withoutCode: true, isSelected: true, requestCode: handleRegistrationCode, handleRegistration: sendRegistrationCommand, countryInfo: countryInfo, availableCurrencies: availableCurrencies || [], buttonText: customSignUpButtonText })), activeForm === types_2.ERegistrationForm.OneClick && ((0, jsx_runtime_1.jsx)(OneClickKit_1.default, { isSelected: true, handleRegistration: sendRegistrationCommand, countryInfo: countryInfo, availableCurrencies: availableCurrencies || [] }))] }))] })), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.authButtonText, onClick: openSignIn }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "registration.logInButton" }) }))] })) })));
103
+ : 'wheelTwo.secondPopUp.subTitle' }) })), (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: customBonusText ? customBonusText : 'wheelTwo.secondPopUp.bonus' })] }))), isDev && (0, jsx_runtime_1.jsx)(SocialButtons_1.SocialButtons, { social: ['Google'] }), (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.wrapperTabsAndForm }, { children: [activeForm !== null && tabs.length !== 1 && ((0, jsx_runtime_1.jsx)(Tabs_1.Tabs, { activeValue: activeForm, data: tabs, onChange: setActiveForm, classes: styles.tabs, type: "underline" })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.zIndex }, { children: [activeForm === types_2.ERegistrationForm.Email && ((0, jsx_runtime_1.jsx)(EmailSignUp_1.EmailSignUp, { isSelected: true, countryInfo: countryInfo, handleRegistration: sendRegistrationCommand, availableCurrencies: availableCurrencies || [], buttonText: customSignUpButtonText })), activeForm === types_2.ERegistrationForm.Phone && ((0, jsx_runtime_1.jsx)(PhoneSignUp_1.PhoneSignUp, { isSelected: true, requestCode: handleRegistrationCode, handleRegistration: sendRegistrationCommand, countryInfo: countryInfo, availableCurrencies: availableCurrencies || [], buttonText: customSignUpButtonText })), activeForm === types_2.ERegistrationForm.PhoneWithoutCode && ((0, jsx_runtime_1.jsx)(PhoneSignUp_1.PhoneSignUp, { withoutCode: true, isSelected: true, requestCode: handleRegistrationCode, handleRegistration: sendRegistrationCommand, countryInfo: countryInfo, availableCurrencies: availableCurrencies || [], buttonText: customSignUpButtonText })), activeForm === types_2.ERegistrationForm.OneClick && ((0, jsx_runtime_1.jsx)(OneClickKit_1.default, { isSelected: true, handleRegistration: sendRegistrationCommand, countryInfo: countryInfo, availableCurrencies: availableCurrencies || [] }))] }))] })), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.authButtonText, onClick: openSignIn }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "registration.logInButton" }) }))] })) })));
102
104
  };
103
105
  exports.SignUp = SignUp;
@@ -60,9 +60,12 @@ var OneClickKit_1 = __importDefault(require("./components/Forms/OneClickKit"));
60
60
  var useHookFabric_1 = require("hooks/useHookFabric");
61
61
  var ModalContext_1 = require("context/logic/ModalContext");
62
62
  var Tabs_1 = require("components/ui/Tabs");
63
+ var selectors_4 = require("zustandStore/settings/selectors");
64
+ var store_4 = require("zustandStore/settings/store");
63
65
  var SignUpTypeThree = function () {
64
66
  var _a;
65
- var _b = (0, ModalContext_1.useHookProvider)(), useCurrencies = _b.useCurrencies, useTransportControllers = _b.useTransportControllers, useCountryInfo = _b.useCountryInfo, sendRegistrationCommand = _b.sendRegistrationCommand, appType = _b.appType;
67
+ var _b = (0, ModalContext_1.useHookProvider)(), useCurrencies = _b.useCurrencies, useTransportControllers = _b.useTransportControllers, useCountryInfo = _b.useCountryInfo, sendRegistrationCommand = _b.sendRegistrationCommand;
68
+ var appType = (0, store_4.useZustandKitSettings)(selectors_4.getKitAppTypeSelector);
66
69
  var sendCommand = useTransportControllers().sendCommand;
67
70
  var availableCurrencies = (0, useHookFabric_1.useHookFabric)({
68
71
  fn: useCurrencies,
@@ -87,18 +90,6 @@ var SignUpTypeThree = function () {
87
90
  preventClose: true,
88
91
  });
89
92
  };
90
- // const handleOpenDoc = () => {
91
- // const info = docs?.[4].link;
92
- // if (!info || !lang) {
93
- // return;
94
- // }
95
- // const validPathname = info.replace('[lang]', lang);
96
- // window.open(
97
- // `${window.location.origin}${validPathname}`,
98
- // '_blank',
99
- // 'fullscreen=yes'
100
- // );
101
- // };
102
93
  var openPopUp = function (type) { return function () {
103
94
  closeAndOpen(type);
104
95
  }; };
@@ -42,11 +42,15 @@ var react_1 = require("react");
42
42
  var classnames_1 = __importDefault(require("classnames"));
43
43
  var types_1 = require("react-memory-optimization/dist/lib/binary/types");
44
44
  var Text_1 = require("components/Text");
45
- var InputCode_1 = __importDefault(require("../NumberConfirmarion/components/InputCode"));
45
+ var InputCode_1 = __importDefault(require("../NumberConfirmation/components/InputCode"));
46
46
  var Buttons_1 = require("components/ui/Buttons");
47
- var constants_1 = require("../NumberConfirmarion/constants");
47
+ var constants_1 = require("../NumberConfirmation/constants");
48
48
  var constant_1 = require("components/ui/Inputs/BaseInput/constant");
49
49
  var constants_2 = require("components/ui/Timer/constants");
50
+ var selectors_1 = require("zustandStore/settings/selectors");
51
+ var store_1 = require("zustandStore/settings/store");
52
+ var store_2 = require("zustandStore/alerts/notification/store");
53
+ var selectors_2 = require("zustandStore/alerts/notification/selectors");
50
54
  var ModalContext_1 = require("context/logic/ModalContext");
51
55
  var useCountDown_1 = require("hooks/useCountDown");
52
56
  var styles = __importStar(require("./EmailConfirmation.module.css"));
@@ -55,6 +59,8 @@ var EmailConfirmation = function () {
55
59
  var sendCommand = useTransportControllers().sendCommand;
56
60
  var _a = (0, react_1.useState)(constant_1.DEFAULT_INPUT_VALUE), code = _a[0], setCode = _a[1];
57
61
  var timerValue = (0, react_1.useRef)(new Date().getTime() + constants_2.DEFAULT_TIMER_VALUE);
62
+ var appType = (0, store_1.useZustandKitSettings)(selectors_1.getKitAppTypeSelector);
63
+ var notifications = (0, store_2.useZustandNotificationKitStore)(selectors_2.notificationKitSelectors.getNotificationsSelector);
58
64
  var countDown = (0, useCountDown_1.useCountDown)({
59
65
  endTimestamp: timerValue.current,
60
66
  });
@@ -69,7 +75,7 @@ var EmailConfirmation = function () {
69
75
  var baseData = {
70
76
  registrationType: types_1.RecoverySubType.Email,
71
77
  // value: email.value,
72
- appType: window.APP_TYPE,
78
+ appType: appType,
73
79
  requestId: types_1.ERequestIds.RecoveryPasswordSendCode,
74
80
  };
75
81
  sendCommand('22x', baseData);
@@ -81,6 +87,15 @@ var EmailConfirmation = function () {
81
87
  var handleChange = function (code) {
82
88
  setCode({ value: code, errorText: '' });
83
89
  };
84
- return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.wrapperEmailConfirmation, styles.column) }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.top, styles.column) }, { children: [(0, jsx_runtime_1.jsx)("img", { src: "/casino/icons-elon/ui-kit/recoveryPassword/email/".concat(window.APP_TYPE, ".png"), className: styles.instructionImage }), (0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.column, styles.center) }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.enterDigits }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "recoveryPsw.emailConfirmation.enterDigits" }) })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.column, styles.center) }, { children: [(0, jsx_runtime_1.jsx)(InputCode_1.default, { errorText: code.errorText, handleChange: handleChange, length: 5 }), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.time }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "recoveryPsw.emailConfirmation.seconds", specValue: "".concat(Math.round(timeRemaining / 1000)) }) }))] }))] }))] })), !timeRemaining && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.resendCode, onClick: handleResend }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "recoveryPsw.emailConfirmation.resendCode" }) }))), (0, jsx_runtime_1.jsx)(Buttons_1.BaseButton, { text: "recoveryPsw.emailConfirmation.verify", handleClick: submit, size: "--button-full", buttonHeight: "--button-height-xl", color: "primary", centreText: true, disabled: code.value.length < constants_1.MAX_EMAIL_CODE_LENGTH })] })));
90
+ (0, react_1.useEffect)(function () {
91
+ var hasAuthError = notifications.some(function (item) { return item.text === 'errors.recoveryPasswordFailed'; });
92
+ if (hasAuthError) {
93
+ setCode({
94
+ value: code.value,
95
+ errorText: 'errors.recoveryPasswordFailed',
96
+ });
97
+ }
98
+ }, [notifications]);
99
+ return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.wrapperEmailConfirmation, styles.column) }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.top, styles.column) }, { children: [(0, jsx_runtime_1.jsx)("img", { src: "/casino/icons-elon/ui-kit/recoveryPassword/email/".concat(appType, ".png"), className: styles.instructionImage }), (0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.column, styles.center, styles.mediumGap) }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.enterDigits }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "recoveryPsw.emailConfirmation.enterDigits" }) })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.column, styles.center, styles.smallGap) }, { children: [(0, jsx_runtime_1.jsx)(InputCode_1.default, { errorText: code.errorText, handleChange: handleChange, length: 5 }), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.time }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "recoveryPsw.emailConfirmation.seconds", specValue: "".concat(Math.round(timeRemaining / 1000)) }) }))] }))] }))] })), !timeRemaining && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.resendCode, onClick: handleResend }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "recoveryPsw.emailConfirmation.resendCode" }) }))), (0, jsx_runtime_1.jsx)(Buttons_1.BaseButton, { text: "recoveryPsw.emailConfirmation.verify", handleClick: submit, size: "--button-full", buttonHeight: "--button-height-xl", color: "primary", centreText: true, disabled: code.value.length < constants_1.MAX_EMAIL_CODE_LENGTH })] })));
85
100
  };
86
101
  exports.default = EmailConfirmation;
@@ -1,6 +1,2 @@
1
- declare const LostPasswordEmailForm: ({ sendCommand, }: {
2
- sendCommand: (key: string, data: {
3
- [key: string]: string | number | any[];
4
- }, isWatching?: boolean) => void;
5
- }) => import("react/jsx-runtime").JSX.Element;
1
+ declare const LostPasswordEmailForm: () => import("react/jsx-runtime").JSX.Element;
6
2
  export default LostPasswordEmailForm;
@@ -47,12 +47,22 @@ var HOCRequestLoader_1 = require("components/HOCs/HOCRequestLoader");
47
47
  var Text_1 = require("components/Text");
48
48
  var constant_1 = require("components/ui/Inputs/BaseInput/constant");
49
49
  var validation_1 = require("service/validation");
50
+ var ModalContext_1 = require("context/logic/ModalContext");
51
+ var selectors_1 = require("zustandStore/settings/selectors");
52
+ var store_1 = require("zustandStore/settings/store");
50
53
  var styles = __importStar(require("./LostPasswordEmailForm.module.css"));
51
- var LostPasswordEmailForm = function (_a) {
52
- var sendCommand = _a.sendCommand;
53
- var _b = (0, react_1.useState)(constant_1.DEFAULT_INPUT_VALUE), email = _b[0], setEmail = _b[1];
54
- var _c = (0, react_1.useState)(constant_1.DEFAULT_INPUT_VALUE), code = _c[0], setCode = _c[1];
55
- var _d = (0, react_1.useState)(false), isRequestedCode = _d[0], setRequestedCodeStatus = _d[1];
54
+ var LostPasswordEmailForm = function () {
55
+ var useTransportControllers = (0, ModalContext_1.useHookProvider)().useTransportControllers;
56
+ var appType = (0, store_1.useZustandKitSettings)(selectors_1.getKitAppTypeSelector);
57
+ var sendCommand = useTransportControllers().sendCommand;
58
+ var _a = (0, react_1.useState)(constant_1.DEFAULT_INPUT_VALUE), email = _a[0], setEmail = _a[1];
59
+ var _b = (0, react_1.useState)(constant_1.DEFAULT_INPUT_VALUE), code = _b[0], setCode = _b[1];
60
+ var _c = (0, react_1.useState)(false), isRequestedCode = _c[0], setRequestedCodeStatus = _c[1];
61
+ var isValidForm = (0, react_1.useMemo)(function () {
62
+ var isEmail = email.value && !email.errorText;
63
+ var isCode = code.value && !code.errorText;
64
+ return isCode && isEmail;
65
+ }, [email, code]);
56
66
  var isShowTimer = function () {
57
67
  handleRequestCode();
58
68
  setRequestedCodeStatus(true);
@@ -60,18 +70,12 @@ var LostPasswordEmailForm = function (_a) {
60
70
  var handleRequestCode = function () {
61
71
  var sendData = {
62
72
  registrationType: types_1.RecoverySubType.Email,
63
- // Notice: is there -2?
64
- appType: process.env.REACT_APP_TYPE || -2,
73
+ appType: appType,
65
74
  value: email.value,
66
75
  requestId: types_1.ERequestIds.RecoveryPasswordSendCode,
67
76
  };
68
77
  sendCommand('22x', sendData);
69
78
  };
70
- var isValidForm = (0, react_1.useMemo)(function () {
71
- var isEmail = email.value && !email.errorText;
72
- var isCode = code.value && !code.errorText;
73
- return isCode && isEmail;
74
- }, [email, code]);
75
79
  var submit = function () {
76
80
  sendCommand('31x', {
77
81
  sms: code.value,
@@ -40,11 +40,14 @@ var ArrowButton_1 = require("components/ui/Buttons/ArrowButton");
40
40
  var Text_1 = require("components/Text");
41
41
  var InfoThirdSvg_1 = require("components/ui/Icons/InfoThirdSvg");
42
42
  var styles = __importStar(require("./MoreInfo.module.css"));
43
+ var selectors_1 = require("zustandStore/settings/selectors");
44
+ var store_1 = require("zustandStore/settings/store");
43
45
  var MoreInfo = function () {
44
46
  var _a = (0, react_1.useState)(false), isOpened = _a[0], setOpenState = _a[1];
47
+ var appType = (0, store_1.useZustandKitSettings)(selectors_1.getKitAppTypeSelector);
45
48
  var handleToggleState = function () {
46
49
  setOpenState(!isOpened);
47
50
  };
48
- return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.wrapperMoreInfo, onClick: handleToggleState }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.title }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.left }, { children: [(0, jsx_runtime_1.jsx)(InfoThirdSvg_1.InfoThirdSvg, {}), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.mainInfo }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "recoveryPsw.moreInfo" }) }))] })), (0, jsx_runtime_1.jsx)(ArrowButton_1.ArrowButton, { isOpened: isOpened, classes: styles.arrowButton })] })), isOpened && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.instructionsBlock }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.instruction }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "recoveryPsw.flashCallVerification" }) })), (0, jsx_runtime_1.jsx)("img", { src: "/casino/icons-elon/ui-kit/recoveryPassword/".concat(window.APP_TYPE, ".png"), className: styles.instructionImage })] })))] })));
51
+ return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.wrapperMoreInfo, onClick: handleToggleState }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.title }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.left }, { children: [(0, jsx_runtime_1.jsx)(InfoThirdSvg_1.InfoThirdSvg, {}), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.mainInfo }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "recoveryPsw.moreInfo" }) }))] })), (0, jsx_runtime_1.jsx)(ArrowButton_1.ArrowButton, { isOpened: isOpened, classes: styles.arrowButton })] })), isOpened && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.instructionsBlock }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.instruction }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "recoveryPsw.flashCallVerification" }) })), (0, jsx_runtime_1.jsx)("img", { src: "/casino/icons-elon/ui-kit/recoveryPassword/phone/".concat(appType, ".png"), className: styles.instructionImage })] })))] })));
49
52
  };
50
53
  exports.default = MoreInfo;
@@ -1,6 +1,2 @@
1
- declare const LostPasswordPhoneForm: ({ sendCommand, }: {
2
- sendCommand: (key: string, data: {
3
- [key: string]: string | number | any[];
4
- }, isWatching?: boolean) => void;
5
- }) => import("react/jsx-runtime").JSX.Element;
1
+ declare const LostPasswordPhoneForm: () => import("react/jsx-runtime").JSX.Element;
6
2
  export default LostPasswordPhoneForm;
@@ -38,44 +38,23 @@ var jsx_runtime_1 = require("react/jsx-runtime");
38
38
  var react_1 = require("react");
39
39
  var types_1 = require("react-memory-optimization/dist/lib/binary/types");
40
40
  var PhoneInput_1 = require("components/ui/Inputs/PhoneInput");
41
- var BaseInput_1 = require("components/ui/Inputs/BaseInput");
42
- var HOCRequestLoader_1 = require("components/HOCs/HOCRequestLoader");
43
- var Buttons_1 = require("components/ui/Buttons");
44
41
  var Text_1 = require("components/Text");
45
- var constant_1 = require("components/ui/Inputs/BaseInput/constant");
46
- var validation_1 = require("service/validation");
47
42
  var useHookFabric_1 = require("hooks/useHookFabric");
48
43
  var ModalContext_1 = require("context/logic/ModalContext");
49
44
  var styles = __importStar(require("./LostPasswordPhoneForm.module.css"));
50
- var LostPasswordPhoneForm = function (_a) {
51
- var sendCommand = _a.sendCommand;
45
+ var LostPasswordPhoneForm = function () {
46
+ // handleFlashCall
47
+ var useTransportControllers = (0, ModalContext_1.useHookProvider)().useTransportControllers;
48
+ var sendCommand = useTransportControllers().sendCommand;
52
49
  var useCountryInfo = (0, ModalContext_1.useHookProvider)().useCountryInfo;
53
50
  var countryInfo = (0, useHookFabric_1.useHookFabric)({
54
51
  fn: useCountryInfo,
55
52
  });
56
- var _b = (0, react_1.useState)(''), phone = _b[0], setPhone = _b[1];
57
- var _c = (0, react_1.useState)(constant_1.DEFAULT_INPUT_VALUE), code = _c[0], setCode = _c[1];
58
- var _d = (0, react_1.useState)(false), isRequestedCode = _d[0], setRequestedCodeStatus = _d[1];
53
+ var _a = (0, react_1.useState)(''), phone = _a[0], setPhone = _a[1];
54
+ var _b = (0, react_1.useState)(false), isRequestedCode = _b[0], setRequestedCodeStatus = _b[1];
59
55
  var callbackRequest = function () {
60
56
  setRequestedCodeStatus(true);
61
57
  };
62
- var submit = function () {
63
- sendCommand('31x', {
64
- sms: code.value,
65
- requestId: types_1.ERequestIds.RecoveryPasswordResponse,
66
- });
67
- };
68
- var isValidForm = (0, react_1.useMemo)(function () {
69
- var isPhone = phone;
70
- var isCode = code.value && !code.errorText;
71
- return isCode && isPhone;
72
- }, [phone, code]);
73
- var handleValidateCode = function (value) {
74
- var errorText = (0, validation_1.composeValidations)([
75
- (0, validation_1.isRequired)({ value: value, errorText: 'errors.required' }),
76
- ]);
77
- setCode({ value: value, errorText: errorText });
78
- };
79
- return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.title }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "recoveryPsw.enterPhone" }) })), (0, jsx_runtime_1.jsx)(PhoneInput_1.PhoneInput, { withConfirm: true, requestId: types_1.ERequestIds.RecoveryPasswordSendCode, sendDataType: types_1.RecoverySubType.Phone, label: "recoveryPsw.phone", size: "large", section: 3, disabled: isRequestedCode, defaultValue: "", onChange: setPhone, requestCallback: callbackRequest, requestCode: submit, itemsClasses: styles.items, countryInfo: countryInfo, withInfo: true }), isRequestedCode && ((0, jsx_runtime_1.jsx)(BaseInput_1.BaseInput, { label: "recoveryPsw.code", size: "full", disabled: false, defaultValue: "", onChange: handleValidateCode, classes: styles.formInput })), isValidForm && ((0, jsx_runtime_1.jsx)(HOCRequestLoader_1.HOCRequestLoader, __assign({ command: "\\\\31x", requestId: types_1.ERequestIds.RecoveryPasswordResponse }, { children: (0, jsx_runtime_1.jsx)(Buttons_1.BaseButton, { color: "primary", size: "--button-full", buttonHeight: "--button-height-l", handleClick: submit, text: "recoveryPsw.submitBtn", centreText: true }) })))] }));
58
+ return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.title }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "recoveryPsw.enterPhone" }) })), (0, jsx_runtime_1.jsx)(PhoneInput_1.PhoneInput, { withConfirm: true, isRecovery: true, requestId: types_1.ERequestIds.FlashCall, sendDataType: types_1.RecoverySubType.Phone, label: "recoveryPsw.phone", size: "large", section: 3, disabled: isRequestedCode, defaultValue: "", onChange: setPhone, requestCallback: callbackRequest, requestCode: sendCommand, sendKey: "09x_flash_call", itemsClasses: styles.items, countryInfo: countryInfo, withInfo: true })] }));
80
59
  };
81
60
  exports.default = LostPasswordPhoneForm;
@@ -0,0 +1 @@
1
+ export declare const NumberConfirmation: () => import("react/jsx-runtime").JSX.Element;
@@ -37,6 +37,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
37
37
  return (mod && mod.__esModule) ? mod : { "default": mod };
38
38
  };
39
39
  Object.defineProperty(exports, "__esModule", { value: true });
40
+ exports.NumberConfirmation = void 0;
40
41
  var jsx_runtime_1 = require("react/jsx-runtime");
41
42
  var react_1 = require("react");
42
43
  var classnames_1 = __importDefault(require("classnames"));
@@ -48,9 +49,15 @@ var constants_1 = require("./constants");
48
49
  var constant_1 = require("components/ui/Inputs/BaseInput/constant");
49
50
  var useCountDown_1 = require("hooks/useCountDown");
50
51
  var ModalContext_1 = require("context/logic/ModalContext");
51
- var styles = __importStar(require("./NumberConfirmarion.module.css"));
52
- var NumberConfirmarion = function () {
52
+ var selectors_1 = require("zustandStore/settings/selectors");
53
+ var store_1 = require("zustandStore/settings/store");
54
+ var store_2 = require("zustandStore/alerts/notification/store");
55
+ var selectors_2 = require("zustandStore/alerts/notification/selectors");
56
+ var styles = __importStar(require("./NumberConfirmation.module.css"));
57
+ var NumberConfirmation = function () {
53
58
  var useTransportControllers = (0, ModalContext_1.useHookProvider)().useTransportControllers;
59
+ var appType = (0, store_1.useZustandKitSettings)(selectors_1.getKitAppTypeSelector);
60
+ var notifications = (0, store_2.useZustandNotificationKitStore)(selectors_2.notificationKitSelectors.getNotificationsSelector);
54
61
  var sendCommand = useTransportControllers().sendCommand;
55
62
  var _a = (0, react_1.useState)(constant_1.DEFAULT_INPUT_VALUE), code = _a[0], setCode = _a[1];
56
63
  var timerValue = (0, react_1.useRef)(new Date().getTime() + 90000);
@@ -59,20 +66,23 @@ var NumberConfirmarion = function () {
59
66
  });
60
67
  var timeRemaining = countDown.timeRemaining;
61
68
  var submit = function () {
62
- sendCommand('31x', {
63
- sms: code.value,
69
+ sendCommand('31x_flash_call_code_check', {
70
+ sms: "".concat(55555),
71
+ // code.value,
64
72
  requestId: types_1.ERequestIds.RecoveryPasswordResponse,
65
73
  });
66
74
  };
67
75
  var handleRequestCode = function () {
68
76
  var baseData = {
69
77
  registrationType: types_1.RecoverySubType.Phone,
70
- appType: window.APP_TYPE,
71
- // value: prepareStringAsPhoneNumber(phone.value),
72
- requestId: types_1.ERequestIds.RecoveryPasswordSendCode,
78
+ appType: appType,
79
+ requestId: types_1.ERequestIds.FlashCall,
73
80
  section: 3,
74
81
  };
75
- sendCommand('22x', baseData);
82
+ // Phone
83
+ // handleFlashCall
84
+ // Email
85
+ sendCommand('09x_flash_call', baseData);
76
86
  };
77
87
  var handleResend = function () {
78
88
  timerValue.current = new Date().getTime() + 90000;
@@ -81,6 +91,15 @@ var NumberConfirmarion = function () {
81
91
  var handleChange = function (code) {
82
92
  setCode({ value: code, errorText: '' });
83
93
  };
84
- return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.wrapperNumberConfirmation, styles.column) }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.top, styles.column) }, { children: [(0, jsx_runtime_1.jsx)("img", { src: "/casino/icons-elon/ui-kit/recoveryPassword/phone/".concat(window.APP_TYPE, ".png"), className: styles.instructionImage }), (0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.column, styles.center) }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.enterDigits }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "recoveryPsw.numberConfirmation.enterDigits" }) })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.column, styles.center) }, { children: [(0, jsx_runtime_1.jsx)(InputCode_1.default, { errorText: code.errorText, handleChange: handleChange }), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.time }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "recoveryPsw.numberConfirmation.seconds", specValue: "".concat(Math.round(timeRemaining / 1000)) }) }))] }))] }))] })), !timeRemaining && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.resendCode, onClick: handleResend }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "recoveryPsw.numberConfirmation.resendCode" }) }))), (0, jsx_runtime_1.jsx)(Buttons_1.BaseButton, { text: "recoveryPsw.numberConfirmation.verify", handleClick: submit, size: "--button-full", buttonHeight: "--button-height-xl", color: "primary", centreText: true, disabled: code.value.length < constants_1.MAX_PHONE_CODE_LENGTH })] })));
94
+ (0, react_1.useEffect)(function () {
95
+ var hasAuthError = notifications.some(function (item) { return item.text === 'errors.recoveryPasswordFailed'; });
96
+ if (hasAuthError) {
97
+ setCode({
98
+ value: code.value,
99
+ errorText: 'errors.recoveryPasswordFailed',
100
+ });
101
+ }
102
+ }, [notifications]);
103
+ return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.wrapperNumberConfirmation, styles.column) }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.top, styles.column) }, { children: [(0, jsx_runtime_1.jsx)("img", { src: "/casino/icons-elon/ui-kit/recoveryPassword/phone/".concat(appType, ".png"), className: styles.instructionImage }), (0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.column, styles.center, styles.mediumGap) }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.enterDigits }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "recoveryPsw.numberConfirmation.enterDigits" }) })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.column, styles.center, styles.smallGap) }, { children: [(0, jsx_runtime_1.jsx)(InputCode_1.default, { errorText: code.errorText, handleChange: handleChange }), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.time }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "recoveryPsw.numberConfirmation.seconds", specValue: "".concat(Math.round(timeRemaining / 1000)) }) }))] }))] }))] })), !timeRemaining && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.resendCode, onClick: handleResend }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "recoveryPsw.numberConfirmation.resendCode" }) }))), (0, jsx_runtime_1.jsx)(Buttons_1.BaseButton, { text: "recoveryPsw.numberConfirmation.verify", handleClick: submit, size: "--button-full", buttonHeight: "--button-height-xl", color: "primary", centreText: true, disabled: code.value.length < constants_1.MAX_PHONE_CODE_LENGTH })] })));
85
104
  };
86
- exports.default = NumberConfirmarion;
105
+ exports.NumberConfirmation = NumberConfirmation;
@@ -54,12 +54,12 @@ var LostPassword = function () {
54
54
  var _a;
55
55
  var useTransportControllers = (0, ModalContext_1.useHookProvider)().useTransportControllers;
56
56
  var sendCommand = useTransportControllers().sendCommand;
57
- var _b = (0, react_1.useState)(types_1.RecoveryFormType.Email), activeValue = _b[0], setActiveValue = _b[1];
57
+ var _b = (0, react_1.useState)(types_1.RecoveryFormType.Phone), activeValue = _b[0], setActiveValue = _b[1];
58
58
  var data = (0, store_1.useZustandModalKitStore)(selectors_1.zustandModalKitSelector.getModalAdditionalInfoSelector) || {};
59
59
  var registrationTheme = data.registrationTheme;
60
60
  return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.wrapprLostePassword, (_a = {},
61
61
  _a[styles.yellow] = types_2.ESignUpTheme[registrationTheme] ===
62
62
  types_2.ESignUpTheme.BaseYellow,
63
- _a)) }, { children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tabs, { activeValue: activeValue, data: constants_1.RECOVERY_TABS, onChange: setActiveValue, classes: styles.tabWrapper, type: "underline" }), activeValue === types_1.RecoveryFormType.Email && ((0, jsx_runtime_1.jsx)(LostPasswordEmailForm_1.default, { sendCommand: sendCommand })), activeValue === types_1.RecoveryFormType.Phone && ((0, jsx_runtime_1.jsx)(LostPasswordPhoneForm_1.default, { sendCommand: sendCommand }))] })));
63
+ _a)) }, { children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tabs, { activeValue: activeValue, data: constants_1.RECOVERY_TABS, onChange: setActiveValue, classes: styles.tabWrapper, type: "underline" }), activeValue === types_1.RecoveryFormType.Email && (0, jsx_runtime_1.jsx)(LostPasswordEmailForm_1.default, {}), activeValue === types_1.RecoveryFormType.Phone && (0, jsx_runtime_1.jsx)(LostPasswordPhoneForm_1.default, {})] })));
64
64
  };
65
65
  exports.default = LostPassword;