react-gldn-kit 0.1.54 → 0.1.55
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/dist/index.js +1 -1
- package/dist/lib/components/Layouts/ModalLayout/index.js +2 -2
- package/dist/lib/components/Layouts/ModalLayout/types.d.ts +1 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignIn/Third/components/EmailSignInForm/index.d.ts +7 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignIn/Third/components/EmailSignInForm/index.js +50 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignIn/Third/components/EmailSignInForm/types.d.ts +1 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignIn/Third/components/IdSignInForm/index.d.ts +6 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignIn/Third/components/IdSignInForm/index.js +65 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignIn/Third/components/IdSignInForm/types.d.ts +1 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignIn/Third/components/PhoneSignInForm/index.d.ts +6 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignIn/Third/components/PhoneSignInForm/index.js +52 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignIn/Third/components/PhoneSignInForm/types.d.ts +1 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignIn/Third/constants.d.ts +5 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignIn/Third/constants.js +18 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignIn/Third/index.d.ts +1 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignIn/Third/index.js +125 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/First/components/Forms/OneClickKit/types.js +2 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/First/components/Forms/PhoneSignUp/types.js +2 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/{types.d.ts → First/types.d.ts} +5 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/First/types.js +9 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/Third/components/Forms/EmailSignUp/index.d.ts +11 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/Third/components/Forms/EmailSignUp/index.js +137 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/Third/components/Forms/OneClickKit/constants.d.ts +9 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/Third/components/Forms/OneClickKit/constants.js +12 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/Third/components/Forms/OneClickKit/index.d.ts +3 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/Third/components/Forms/OneClickKit/index.js +125 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/Third/components/Forms/OneClickKit/types.d.ts +17 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/Third/components/Forms/OneClickKit/types.js +2 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/Third/components/Forms/PhoneSignUp/constants.d.ts +2 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/Third/components/Forms/PhoneSignUp/constants.js +14 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/Third/components/Forms/PhoneSignUp/index.d.ts +2 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/Third/components/Forms/PhoneSignUp/index.js +160 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/Third/components/Forms/PhoneSignUp/types.d.ts +11 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/Third/components/Forms/PhoneSignUp/types.js +2 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/Third/index.d.ts +2 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/Third/index.js +141 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/Third/types.d.ts +10 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/Third/types.js +9 -0
- package/dist/lib/components/Modals/Alert/components/LostPassword/{constants.d.ts → First/constants.d.ts} +1 -1
- package/dist/lib/components/Modals/Alert/components/LostPassword/{constants.js → First/constants.js} +1 -1
- package/dist/lib/components/Modals/Alert/components/LostPassword/{index.js → First/index.js} +2 -2
- package/dist/lib/components/Modals/Alert/components/LostPassword/Third/components/LostPasswordEmailForm/index.d.ts +5 -0
- package/dist/lib/components/Modals/Alert/components/{Auth/LostPassword → LostPassword/Third}/components/LostPasswordEmailForm/index.js +25 -21
- package/dist/lib/components/Modals/Alert/components/LostPassword/Third/components/LostPasswordPhoneForm/index.d.ts +5 -0
- package/dist/lib/components/Modals/Alert/components/LostPassword/Third/components/LostPasswordPhoneForm/index.js +90 -0
- package/dist/lib/components/Modals/Alert/components/LostPassword/Third/index.d.ts +2 -0
- package/dist/lib/components/Modals/Alert/components/LostPassword/Third/index.js +61 -0
- package/dist/lib/components/Modals/Alert/index.js +48 -7
- package/dist/lib/components/Scratch/index.js +5 -5
- package/dist/lib/components/Scratch/types.d.ts +3 -3
- package/dist/lib/components/Scratch/types.js +1 -2
- package/dist/lib/components/SignUp/CountrySelector/index.js +2 -2
- package/dist/lib/components/SignUp/CountrySelector/types.d.ts +2 -0
- package/dist/lib/components/SignUp/CurrencySelector/index.js +2 -2
- package/dist/lib/components/SignUp/CurrencySelector/types.d.ts +2 -0
- package/dist/lib/components/SignUpThree/DocsCheckBox/index.d.ts +9 -0
- package/dist/lib/components/SignUpThree/DocsCheckBox/index.js +41 -0
- package/dist/lib/components/Wheel/index.js +3 -1
- package/dist/lib/components/Wheel/types.d.ts +5 -42
- package/dist/lib/components/ui/Icons/Base/CheckSvg.d.ts +2 -0
- package/dist/lib/components/ui/Icons/Base/CheckSvg.js +20 -0
- package/dist/lib/components/ui/Inputs/CheckBox/index.d.ts +1 -0
- package/dist/lib/components/ui/Inputs/CheckBox/index.js +6 -3
- package/dist/lib/components/ui/Inputs/PhoneInput/index.js +2 -2
- package/dist/lib/components/ui/Inputs/PhoneInput/types.d.ts +1 -0
- package/dist/lib/components/ui/Selector/index.js +3 -3
- package/dist/lib/components/ui/Selector/types.d.ts +1 -0
- package/dist/lib/index.d.ts +9 -7
- package/dist/lib/index.js +14 -12
- package/dist/lib/zustandStore/alerts/modal/types.d.ts +4 -1
- package/dist/lib/zustandStore/alerts/modal/types.js +3 -0
- package/dist/main.css +916 -121
- package/package.json +1 -1
- package/dist/lib/components/Modals/Alert/components/Auth/LostPassword/components/LostPasswordEmailForm/index.d.ts +0 -4
- package/dist/lib/components/Modals/Alert/components/Auth/LostPassword/components/LostPasswordPhoneForm/index.d.ts +0 -4
- package/dist/lib/components/Modals/Alert/components/Auth/LostPassword/components/LostPasswordPhoneForm/index.js +0 -54
- package/dist/lib/components/Modals/Alert/components/Auth/LostPassword/index.d.ts +0 -3
- package/dist/lib/components/Modals/Alert/components/Auth/LostPassword/index.js +0 -50
- /package/dist/lib/components/Modals/Alert/components/Auth/SignIn/{components → First/components}/EmailSignInForm/index.d.ts +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignIn/{components → First/components}/EmailSignInForm/index.js +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignIn/{components → First/components}/EmailSignInForm/types.d.ts +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignIn/{components → First/components}/EmailSignInForm/types.js +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignIn/{components → First/components}/IdSignInForm/index.d.ts +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignIn/{components → First/components}/IdSignInForm/index.js +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignIn/{components → First/components}/IdSignInForm/types.d.ts +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignIn/{components → First/components}/IdSignInForm/types.js +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignIn/{components → First/components}/PhoneSignInForm/index.d.ts +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignIn/{components → First/components}/PhoneSignInForm/index.js +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignIn/{components → First/components}/PhoneSignInForm/types.d.ts +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignIn/{components → First/components}/PhoneSignInForm/types.js +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignIn/{constants.d.ts → First/constants.d.ts} +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignIn/{constants.js → First/constants.js} +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignIn/{index.d.ts → First/index.d.ts} +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignIn/{index.js → First/index.js} +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/{SignUp/components/Forms/OneClickKit → SignIn/Third/components/EmailSignInForm}/types.js +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/{SignUp/components/Forms/PhoneSignUp → SignIn/Third/components/IdSignInForm}/types.js +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/{SignUp → SignIn/Third/components/PhoneSignInForm}/types.js +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignUp/{components → First/components}/Forms/EmailSignUp/index.d.ts +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignUp/{components → First/components}/Forms/EmailSignUp/index.js +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignUp/{components → First/components}/Forms/OneClickKit/constants.d.ts +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignUp/{components → First/components}/Forms/OneClickKit/constants.js +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignUp/{components → First/components}/Forms/OneClickKit/index.d.ts +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignUp/{components → First/components}/Forms/OneClickKit/index.js +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignUp/{components → First/components}/Forms/OneClickKit/types.d.ts +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignUp/{components → First/components}/Forms/PhoneSignUp/constants.d.ts +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignUp/{components → First/components}/Forms/PhoneSignUp/constants.js +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignUp/{components → First/components}/Forms/PhoneSignUp/index.d.ts +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignUp/{components → First/components}/Forms/PhoneSignUp/index.js +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignUp/{components → First/components}/Forms/PhoneSignUp/types.d.ts +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignUp/{index.d.ts → First/index.d.ts} +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/SignUp/{index.js → First/index.js} +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/{SignUpTypeTwo → SignUp/Second}/index.d.ts +0 -0
- /package/dist/lib/components/Modals/Alert/components/Auth/{SignUpTypeTwo → SignUp/Second}/index.js +0 -0
- /package/dist/lib/components/Modals/Alert/components/LostPassword/{components → First/components}/LostPasswordEmailForm/index.d.ts +0 -0
- /package/dist/lib/components/Modals/Alert/components/LostPassword/{components → First/components}/LostPasswordEmailForm/index.js +0 -0
- /package/dist/lib/components/Modals/Alert/components/LostPassword/{components → First/components}/LostPasswordPhoneForm/index.d.ts +0 -0
- /package/dist/lib/components/Modals/Alert/components/LostPassword/{components → First/components}/LostPasswordPhoneForm/index.js +0 -0
- /package/dist/lib/components/Modals/Alert/components/LostPassword/{index.d.ts → First/index.d.ts} +0 -0
- /package/dist/lib/components/Modals/Alert/components/{Auth/LostPassword → LostPassword/Third}/constants.d.ts +0 -0
- /package/dist/lib/components/Modals/Alert/components/{Auth/LostPassword → LostPassword/Third}/constants.js +0 -0
- /package/dist/lib/components/Modals/Alert/components/{Auth/LostPassword → LostPassword/Third}/types.d.ts +0 -0
- /package/dist/lib/components/Modals/Alert/components/{Auth/LostPassword → LostPassword/Third}/types.js +0 -0
|
@@ -0,0 +1,125 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
|
+
var types_1 = require("react-memory-optimization/dist/lib/binary/types");
|
|
42
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
43
|
+
var selectors_1 = require("zustandStore/forms/signUp/selectors");
|
|
44
|
+
var store_1 = require("zustandStore/forms/signUp/store");
|
|
45
|
+
var selectors_2 = require("zustandStore/languages/selectors");
|
|
46
|
+
var store_2 = require("zustandStore/languages/store");
|
|
47
|
+
var utils_1 = require("zustandStore/forms/signUp/utils");
|
|
48
|
+
var styles = __importStar(require("./OneClick.module.css"));
|
|
49
|
+
var react_1 = require("react");
|
|
50
|
+
var store_3 = require("zustandStore/connection/store");
|
|
51
|
+
var selectors_3 = require("zustandStore/connection/selectors");
|
|
52
|
+
var constants_1 = require("./constants");
|
|
53
|
+
var CurrencySelector_1 = require("components/SignUp/CurrencySelector");
|
|
54
|
+
var CountrySelector_1 = require("components/SignUp/CountrySelector");
|
|
55
|
+
var HOCRequestLoader_1 = require("components/HOCs/HOCRequestLoader");
|
|
56
|
+
var CircularLoader_1 = require("components/ui/Loaders/CircularLoader");
|
|
57
|
+
var BaseButton_1 = require("components/ui/Buttons/BaseButton");
|
|
58
|
+
var DocsCheckBox_1 = require("components/SignUpThree/DocsCheckBox");
|
|
59
|
+
var OneClickKit = function (props) {
|
|
60
|
+
var isSelected = props.isSelected, handleRegistration = props.handleRegistration, _a = props.translates, translates = _a === void 0 ? constants_1.BASE_TRANSLATE_KEYS : _a, availableCurrencies = props.availableCurrencies, countryInfo = props.countryInfo, classes = props.classes;
|
|
61
|
+
var activeCountryId = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.getActiveCountryIdSelector);
|
|
62
|
+
var activeLang = (0, store_2.useZustandLanguagesKitStore)(selectors_2.languageSelectors.getActiveLanguageNameKitSelector);
|
|
63
|
+
var setActiveCountryId = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.setActiveCountryIdAction);
|
|
64
|
+
var _b = (0, react_1.useState)(isSelected), terms = _b[0], setTermsState = _b[1];
|
|
65
|
+
var _c = (0, react_1.useState)(isSelected), age = _c[0], setAgeState = _c[1];
|
|
66
|
+
var _d = (0, react_1.useState)(''), promoCode = _d[0], setPromoCode = _d[1];
|
|
67
|
+
var activeCurrencyId = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.getActiveCurrencyIdSelector);
|
|
68
|
+
var isConnectedApp = (0, store_3.useZustandConnectionKitStore)(selectors_3.connectionSelectors.isAvailableTransportSelector);
|
|
69
|
+
var isDisabledSubmitButton = (0, react_1.useMemo)(function () {
|
|
70
|
+
return Boolean(!activeCurrencyId || !activeCountryId || !terms || !isConnectedApp);
|
|
71
|
+
}, [activeCountryId, activeCurrencyId, terms, isConnectedApp]);
|
|
72
|
+
var handleToggleState = function (t) { return function () {
|
|
73
|
+
if (t === 'terms') {
|
|
74
|
+
setTermsState(!terms);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
setAgeState(!age);
|
|
78
|
+
}; };
|
|
79
|
+
var handleOpenDoc = function () {
|
|
80
|
+
if (!activeLang) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
// TODO terms
|
|
84
|
+
// const link = docs[1]?.link.replace('[lang]', activeLang);
|
|
85
|
+
// if (!link) {
|
|
86
|
+
// return;
|
|
87
|
+
// }
|
|
88
|
+
// openExternalLink(link);
|
|
89
|
+
};
|
|
90
|
+
var prepareRegistrationData = function () {
|
|
91
|
+
if (!activeCurrencyId || !activeCountryId) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
var data = (0, utils_1.getRegistrationData)({
|
|
95
|
+
countryId: activeCountryId,
|
|
96
|
+
currencyId: activeCurrencyId,
|
|
97
|
+
registrationType: types_1.RegistrationSubType.OneClick,
|
|
98
|
+
promoCode: promoCode,
|
|
99
|
+
countryName: "".concat(activeCountryId), // TODO back end is not validate this value
|
|
100
|
+
});
|
|
101
|
+
handleRegistration('05x', data, true);
|
|
102
|
+
};
|
|
103
|
+
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.fullWidth }, { children: [(0, jsx_runtime_1.jsx)(CurrencySelector_1.CurrencySelector, __assign({}, {
|
|
104
|
+
availableCurrencies: availableCurrencies,
|
|
105
|
+
countryInfo: countryInfo,
|
|
106
|
+
}, { translateKey: translates.currencyTitle, classes: (0, classnames_1.default)(styles.marginB, classes), dropdownClasses: styles.dropdown, classesItem: styles.selectorMainItem })), (0, jsx_runtime_1.jsx)(CountrySelector_1.CountrySelector, __assign({}, {
|
|
107
|
+
countryInfo: countryInfo,
|
|
108
|
+
}, { translateKey: translates.countryTitle, classes: (0, classnames_1.default)(styles.marginB, classes), dropdownClasses: styles.dropdown, classesItem: styles.selectorMainItem })), (0, jsx_runtime_1.jsx)(DocsCheckBox_1.DocsCheckBox, { terms: terms, age: age, handleOpenDoc: handleOpenDoc, handleToggleState: handleToggleState }), (0, jsx_runtime_1.jsx)(HOCRequestLoader_1.HOCRequestLoader, __assign({ command: "05x", requestId: types_1.ERequestIds.Registration, customLoader: (0, jsx_runtime_1.jsx)(CircularLoader_1.CircularLoader, {}) }, { children: (0, jsx_runtime_1.jsx)(BaseButton_1.BaseButton, { text: translates.registrationBtn, disabled: isDisabledSubmitButton, color: "primary", handleClick: prepareRegistrationData, size: "--button-full", centreText: true, buttonHeight: "--button-height-full", classes: (0, classnames_1.default)(styles.authButton, styles.marginB, classes) }) }))] }))
|
|
109
|
+
// <OneClick
|
|
110
|
+
// isSelected={isSelected}
|
|
111
|
+
// activeCountryId={activeCountryId}
|
|
112
|
+
// activeLang={activeLang}
|
|
113
|
+
// handleSubmit={prepareRegistrationData}
|
|
114
|
+
// docs={{}}
|
|
115
|
+
// currencyProps={{
|
|
116
|
+
// availableCurrencies,
|
|
117
|
+
// countryInfo,
|
|
118
|
+
// }}
|
|
119
|
+
// countryProps={{
|
|
120
|
+
// countryInfo,
|
|
121
|
+
// }}
|
|
122
|
+
// />
|
|
123
|
+
);
|
|
124
|
+
};
|
|
125
|
+
exports.default = OneClickKit;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CountryInfo, CurrencyInfo } from 'react-memory-optimization/dist/lib/store/user/types';
|
|
2
|
+
export type SignUpOneClickProps = {
|
|
3
|
+
isSelected: boolean;
|
|
4
|
+
availableCurrencies: CurrencyInfo[];
|
|
5
|
+
handleRegistration: (k: string, data: any, d?: boolean) => void;
|
|
6
|
+
countryInfo: CountryInfo | null;
|
|
7
|
+
translates?: {
|
|
8
|
+
loading: string;
|
|
9
|
+
registrationBtn: string;
|
|
10
|
+
terms: string;
|
|
11
|
+
promoCode: string;
|
|
12
|
+
promoCodeTitle: string;
|
|
13
|
+
countryTitle: string;
|
|
14
|
+
currencyTitle: string;
|
|
15
|
+
};
|
|
16
|
+
classes?: string;
|
|
17
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PHONE_PROPS_WITHOUT_CONFIRMATION = exports.PHONE_PROPS_WITH_CONFIRMATION = void 0;
|
|
4
|
+
exports.PHONE_PROPS_WITH_CONFIRMATION = {
|
|
5
|
+
requestId: -1,
|
|
6
|
+
sendDataType: 0,
|
|
7
|
+
sendKey: '09x',
|
|
8
|
+
section: 1,
|
|
9
|
+
withConfirm: true,
|
|
10
|
+
};
|
|
11
|
+
exports.PHONE_PROPS_WITHOUT_CONFIRMATION = {
|
|
12
|
+
sendDataType: 0,
|
|
13
|
+
withConfirm: false,
|
|
14
|
+
};
|
|
@@ -0,0 +1,160 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.PhoneSignUp = void 0;
|
|
41
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
42
|
+
var react_1 = require("react");
|
|
43
|
+
var types_1 = require("react-memory-optimization/dist/lib/binary/types");
|
|
44
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
45
|
+
var BaseInput_1 = require("components/ui/Inputs/BaseInput");
|
|
46
|
+
var BaseButton_1 = require("components/ui/Buttons/BaseButton");
|
|
47
|
+
var PhoneInput_1 = require("components/ui/Inputs/PhoneInput");
|
|
48
|
+
var DocsCheckBox_1 = require("components/SignUpThree/DocsCheckBox");
|
|
49
|
+
var HOCRequestLoader_1 = require("components/HOCs/HOCRequestLoader");
|
|
50
|
+
var CircularLoader_1 = require("components/ui/Loaders/CircularLoader");
|
|
51
|
+
var CountrySelector_1 = require("components/SignUp/CountrySelector");
|
|
52
|
+
var CurrencySelector_1 = require("components/SignUp/CurrencySelector");
|
|
53
|
+
var constant_1 = require("components/ui/Inputs/BaseInput/constant");
|
|
54
|
+
var constants_1 = require("./constants");
|
|
55
|
+
var store_1 = require("zustandStore/languages/store");
|
|
56
|
+
var selectors_1 = require("zustandStore/languages/selectors");
|
|
57
|
+
var store_2 = require("zustandStore/forms/signUp/store");
|
|
58
|
+
var selectors_2 = require("zustandStore/forms/signUp/selectors");
|
|
59
|
+
var store_3 = require("zustandStore/connection/store");
|
|
60
|
+
var selectors_3 = require("zustandStore/connection/selectors");
|
|
61
|
+
var shared_1 = require("utils/shared");
|
|
62
|
+
var utils_1 = require("zustandStore/forms/signUp/utils");
|
|
63
|
+
var styles = __importStar(require("../../../SignUpTypeThree.module.css"));
|
|
64
|
+
var phoneStyles = __importStar(require("./PhoneSignUp.module.css"));
|
|
65
|
+
var PhoneSignUp = function (props) {
|
|
66
|
+
var availableCurrencies = props.availableCurrencies, isSelected = props.isSelected, _a = props.withoutCode, withoutCode = _a === void 0 ? false : _a, countryInfo = props.countryInfo, handleRegistration = props.handleRegistration, _b = props.requestCode, requestCode = _b === void 0 ? console.info : _b, classes = props.classes;
|
|
67
|
+
var setRegisteredLogin = (0, store_2.useZustandRegistrationKitStore)(selectors_2.zustandRegistrationKitSelector.setRegisteredLoginAction);
|
|
68
|
+
// const { sendCommand } = useTransportControllers();
|
|
69
|
+
var isConnectedApp = (0, store_3.useZustandConnectionKitStore)(selectors_3.connectionSelectors.isAvailableTransportSelector);
|
|
70
|
+
var _c = (0, react_1.useState)(''), phone = _c[0], setPhone = _c[1];
|
|
71
|
+
var _d = (0, react_1.useState)(withoutCode
|
|
72
|
+
? {
|
|
73
|
+
value: ' ',
|
|
74
|
+
errorText: '',
|
|
75
|
+
}
|
|
76
|
+
: constant_1.DEFAULT_INPUT_VALUE), code = _d[0], setCode = _d[1];
|
|
77
|
+
var _e = (0, react_1.useState)(withoutCode), isRequestedCode = _e[0], setRequestedCodeState = _e[1];
|
|
78
|
+
var activeLang = (0, store_1.useZustandLanguagesKitStore)(selectors_1.languageSelectors.getActiveLanguageNameKitSelector);
|
|
79
|
+
var docs = {};
|
|
80
|
+
// useZustandWebConfiguration(getDocsSelector) || {};
|
|
81
|
+
var activeCountryId = (0, store_2.useZustandRegistrationKitStore)(selectors_2.zustandRegistrationKitSelector.getActiveCountryIdSelector);
|
|
82
|
+
var activeCurrencyId = (0, store_2.useZustandRegistrationKitStore)(selectors_2.zustandRegistrationKitSelector.getActiveCurrencyIdSelector);
|
|
83
|
+
var _f = (0, react_1.useState)(constant_1.DEFAULT_INPUT_VALUE), password = _f[0], setPassword = _f[1];
|
|
84
|
+
var _g = (0, react_1.useState)(isSelected), terms = _g[0], setTermsState = _g[1];
|
|
85
|
+
var _h = (0, react_1.useState)(isSelected), age = _h[0], setAgeState = _h[1];
|
|
86
|
+
var isPhoneError = Boolean(!phone);
|
|
87
|
+
var _j = (0, react_1.useState)(''), promoCode = _j[0], setPromoCode = _j[1];
|
|
88
|
+
var isDisabledSubmitButton = (0, react_1.useMemo)(function () {
|
|
89
|
+
return Boolean(isPhoneError ||
|
|
90
|
+
!password.value ||
|
|
91
|
+
password.errorText ||
|
|
92
|
+
code.errorText ||
|
|
93
|
+
!code.value ||
|
|
94
|
+
!isRequestedCode ||
|
|
95
|
+
!activeCountryId ||
|
|
96
|
+
!activeCurrencyId ||
|
|
97
|
+
!terms ||
|
|
98
|
+
!isConnectedApp);
|
|
99
|
+
}, [
|
|
100
|
+
isPhoneError,
|
|
101
|
+
password,
|
|
102
|
+
code,
|
|
103
|
+
isRequestedCode,
|
|
104
|
+
activeCountryId,
|
|
105
|
+
activeCurrencyId,
|
|
106
|
+
terms,
|
|
107
|
+
isConnectedApp,
|
|
108
|
+
]);
|
|
109
|
+
var handleIsRequested = function () {
|
|
110
|
+
setRequestedCodeState(true);
|
|
111
|
+
};
|
|
112
|
+
var handleChange = function (t) { return function (value) {
|
|
113
|
+
if (t === 'code') {
|
|
114
|
+
setCode({ value: value, errorText: '' });
|
|
115
|
+
}
|
|
116
|
+
if (t === 'password') {
|
|
117
|
+
setPassword({ value: value, errorText: '' });
|
|
118
|
+
}
|
|
119
|
+
}; };
|
|
120
|
+
var handleSubmitForm = function () {
|
|
121
|
+
if (!activeCountryId || !activeCurrencyId) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
var sendData = __assign(__assign({}, (0, utils_1.getRegistrationData)({
|
|
125
|
+
currencyId: activeCurrencyId,
|
|
126
|
+
countryId: activeCountryId,
|
|
127
|
+
registrationType: withoutCode
|
|
128
|
+
? types_1.RegistrationSubType.PhoneWithoutCode
|
|
129
|
+
: types_1.RegistrationSubType.Phone,
|
|
130
|
+
promoCode: promoCode,
|
|
131
|
+
countryName: '', // TODO back not validate this value
|
|
132
|
+
})), { letter: 0, login: phone, email: '', password: password.value, sms: code.value, requestId: types_1.ERequestIds.Registration });
|
|
133
|
+
setRegisteredLogin(phone);
|
|
134
|
+
handleRegistration('08x', sendData);
|
|
135
|
+
};
|
|
136
|
+
var handleToggleState = function (t) { return function () {
|
|
137
|
+
if (t === 'terms') {
|
|
138
|
+
setTermsState(!terms);
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
setAgeState(!age);
|
|
142
|
+
}; };
|
|
143
|
+
var handleOpenDoc = function () {
|
|
144
|
+
var _a;
|
|
145
|
+
if (!activeLang) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
// TODO terms
|
|
149
|
+
var link = (_a = docs[1]) === null || _a === void 0 ? void 0 : _a.link.replace('[lang]', activeLang);
|
|
150
|
+
if (!link) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
(0, shared_1.openExternalLink)(link, true);
|
|
154
|
+
};
|
|
155
|
+
var PHONE_PROPS = withoutCode
|
|
156
|
+
? constants_1.PHONE_PROPS_WITHOUT_CONFIRMATION
|
|
157
|
+
: constants_1.PHONE_PROPS_WITH_CONFIRMATION;
|
|
158
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(PhoneInput_1.PhoneInput, __assign({}, PHONE_PROPS, { placeholder: "registrations.inputs.phone", size: "full", defaultValue: "+", onChange: setPhone, countryInfo: countryInfo, requestCallback: handleIsRequested, classesWrapper: classes, disabled: isRequestedCode, classes: (0, classnames_1.default)(styles.marginB, styles.phoneInput, classes), requestCode: !withoutCode ? requestCode : undefined, buttonClasses: phoneStyles.authButton })), !withoutCode && isRequestedCode && ((0, jsx_runtime_1.jsx)(BaseInput_1.BaseInput, { placeholder: "registrations.inputs.code", size: "full", isHidePlaceholder: true, disabled: !isRequestedCode, onChange: handleChange('code'), classes: (0, classnames_1.default)(styles.marginB, classes) })), (0, jsx_runtime_1.jsx)(BaseInput_1.BaseInput, { placeholder: "registrations.inputs.password", size: "full", isHidePlaceholder: true, onChange: handleChange('password'), classes: (0, classnames_1.default)(styles.marginB, classes) }), (0, jsx_runtime_1.jsx)(CountrySelector_1.CountrySelector, { countryInfo: countryInfo, classes: (0, classnames_1.default)(styles.marginB, classes), dropdownClasses: styles.dropdown, classesItem: phoneStyles.selectorMainItem }), (0, jsx_runtime_1.jsx)(CurrencySelector_1.CurrencySelector, { availableCurrencies: availableCurrencies, countryInfo: countryInfo, classes: (0, classnames_1.default)(styles.marginB, classes), dropdownClasses: styles.dropdown, classesItem: phoneStyles.selectorMainItem }), (0, jsx_runtime_1.jsx)(DocsCheckBox_1.DocsCheckBox, { terms: terms, age: age, handleOpenDoc: handleOpenDoc, handleToggleState: handleToggleState }), (0, jsx_runtime_1.jsx)(HOCRequestLoader_1.HOCRequestLoader, __assign({ command: "08x", requestId: types_1.ERequestIds.Registration, customLoader: (0, jsx_runtime_1.jsx)(CircularLoader_1.CircularLoader, {}) }, { children: (0, jsx_runtime_1.jsx)(BaseButton_1.BaseButton, { text: 'registrations.submitBtn', disabled: isDisabledSubmitButton, color: "primary", handleClick: handleSubmitForm, size: "--button-full", centreText: true, buttonHeight: "--button-height-full", classes: (0, classnames_1.default)(phoneStyles.authButton, styles.marginB, classes) }) }))] }));
|
|
159
|
+
};
|
|
160
|
+
exports.PhoneSignUp = PhoneSignUp;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CurrencyInfo, CountryInfo } from 'react-memory-optimization/dist/lib/store/user/types';
|
|
2
|
+
export type PhoneSignUpProps = {
|
|
3
|
+
isSelected: boolean;
|
|
4
|
+
withoutCode?: boolean;
|
|
5
|
+
countryInfo: CountryInfo | null;
|
|
6
|
+
availableCurrencies: CurrencyInfo[];
|
|
7
|
+
handleRegistration: (l: string, data: any) => void;
|
|
8
|
+
classes?: string;
|
|
9
|
+
} & {
|
|
10
|
+
requestCode?: (l: string, data: any) => void;
|
|
11
|
+
};
|
|
@@ -0,0 +1,141 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.SignUpTypeThree = void 0;
|
|
41
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
42
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
43
|
+
var types_1 = require("./types");
|
|
44
|
+
var styles = __importStar(require("./SignUpTypeThree.module.css"));
|
|
45
|
+
var Text_1 = require("components/Text");
|
|
46
|
+
var store_1 = require("zustandStore/forms/signUp/store");
|
|
47
|
+
var selectors_1 = require("zustandStore/forms/signUp/selectors");
|
|
48
|
+
var store_2 = require("zustandStore/alerts/modal/store");
|
|
49
|
+
var selectors_2 = require("zustandStore/alerts/modal/selectors");
|
|
50
|
+
var types_2 = require("zustandStore/alerts/modal/types");
|
|
51
|
+
var types_3 = require("zustandStore/forms/signUp/types");
|
|
52
|
+
var react_1 = require("react");
|
|
53
|
+
var store_3 = require("zustandStore/device/store");
|
|
54
|
+
var selectors_3 = require("zustandStore/device/selectors");
|
|
55
|
+
var store_4 = require("zustandStore/languages/store");
|
|
56
|
+
var selectors_4 = require("zustandStore/languages/selectors");
|
|
57
|
+
var Logos_1 = require("components/ui/Logos");
|
|
58
|
+
var CrossSvg_1 = require("components/ui/Icons/Base/CrossSvg");
|
|
59
|
+
var EmailSignUp_1 = require("./components/Forms/EmailSignUp");
|
|
60
|
+
var PhoneSignUp_1 = require("./components/Forms/PhoneSignUp");
|
|
61
|
+
var OneClickKit_1 = __importDefault(require("./components/Forms/OneClickKit"));
|
|
62
|
+
var useHookFabric_1 = require("hooks/useHookFabric");
|
|
63
|
+
var ModalContext_1 = require("context/logic/ModalContext");
|
|
64
|
+
var Tabs_1 = require("components/ui/Tabs");
|
|
65
|
+
var SignUpTypeThree = function (props) {
|
|
66
|
+
var _a;
|
|
67
|
+
var _b = props.appType, appType = _b === void 0 ? 3 : _b;
|
|
68
|
+
var _c = (0, ModalContext_1.useHookProvider)(), useTransportControllers = _c.useTransportControllers, useCurrencies = _c.useCurrencies, useCountryInfo = _c.useCountryInfo;
|
|
69
|
+
var sendCommand = useTransportControllers().sendCommand;
|
|
70
|
+
var availableCurrencies = (0, useHookFabric_1.useHookFabric)({
|
|
71
|
+
fn: useCurrencies,
|
|
72
|
+
});
|
|
73
|
+
var countryInfo = (0, useHookFabric_1.useHookFabric)({
|
|
74
|
+
fn: useCountryInfo,
|
|
75
|
+
});
|
|
76
|
+
var activeForm = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.getActiveRegistrationFormSelector);
|
|
77
|
+
var setActiveForm = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.setActiveRegistrationFormAction);
|
|
78
|
+
var closeAndOpen = (0, store_2.useZustandModalKitStore)(selectors_2.zustandModalKitSelector.closeAndOpenModalAction);
|
|
79
|
+
var additionalSettings = (0, store_2.useZustandModalKitStore)(selectors_2.zustandModalKitSelector.getModalAdditionalInfoSelector) || {};
|
|
80
|
+
var _d = additionalSettings.bonusImagePath, bonusImagePath = _d === void 0 ? '' : _d, _e = additionalSettings.registrationTheme, registrationTheme = _e === void 0 ? types_1.ESignUpThreeTheme.Yellow : _e, _f = additionalSettings.promotionImagePath, promotionImagePath = _f === void 0 ? '' : _f;
|
|
81
|
+
var isMobile = (0, store_3.useZustandDeviceKitStore)(selectors_3.zustandDeviceKitSelector.isMobileDeviceSelector);
|
|
82
|
+
var tabs = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.getRegistrationTabsSelector);
|
|
83
|
+
var docs = {};
|
|
84
|
+
var lang = (0, store_4.useZustandLanguagesKitStore)(selectors_4.languageSelectors.getActiveLanguageNameKitSelector);
|
|
85
|
+
var countryId = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.getActiveCountryIdSelector);
|
|
86
|
+
var handleOpenSignIn = function () {
|
|
87
|
+
closeAndOpen(types_2.EModalTypes.SignInThree, {
|
|
88
|
+
preventClose: true,
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
var handleOpenDoc = function () {
|
|
92
|
+
var info = docs === null || docs === void 0 ? void 0 : docs[4].link;
|
|
93
|
+
if (!info || !lang) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
var validPathname = info.replace('[lang]', lang);
|
|
97
|
+
window.open("".concat(window.location.origin).concat(validPathname), '_blank', 'fullscreen=yes');
|
|
98
|
+
};
|
|
99
|
+
var openPopUp = function (type) { return function () {
|
|
100
|
+
closeAndOpen(type);
|
|
101
|
+
}; };
|
|
102
|
+
var handleRegistration = function (key, data) {
|
|
103
|
+
sendCommand(key, data, true);
|
|
104
|
+
};
|
|
105
|
+
(0, react_1.useEffect)(function () {
|
|
106
|
+
if (tabs.length && activeForm === null) {
|
|
107
|
+
setActiveForm(tabs[0].value);
|
|
108
|
+
}
|
|
109
|
+
}, [activeForm, tabs]);
|
|
110
|
+
(0, react_1.useEffect)(function () {
|
|
111
|
+
if (tabs.length && activeForm === null) {
|
|
112
|
+
setActiveForm(tabs[0].value);
|
|
113
|
+
}
|
|
114
|
+
}, [activeForm, tabs]);
|
|
115
|
+
(0, react_1.useEffect)(function () {
|
|
116
|
+
if (!countryId) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
var baseTabs = tabs;
|
|
120
|
+
if (countryId === 792) {
|
|
121
|
+
baseTabs = baseTabs.filter(function (t) { return t.value !== types_3.ERegistrationForm.Phone; });
|
|
122
|
+
}
|
|
123
|
+
}, [tabs, countryId]);
|
|
124
|
+
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.wrapperSignUpModal, (_a = {},
|
|
125
|
+
_a[styles.purple] = registrationTheme === types_1.ESignUpThreeTheme.Purple,
|
|
126
|
+
_a[styles.lightBlue] = registrationTheme === types_1.ESignUpThreeTheme.LightBlue,
|
|
127
|
+
_a)), style: { maxWidth: !isMobile ? 960 : '' } }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.leftSide }, { children: [!!(additionalSettings === null || additionalSettings === void 0 ? void 0 : additionalSettings.customRegImage) && ((0, jsx_runtime_1.jsx)(Logos_1.Logo, { appType: appType, isMobile: isMobile, classes: styles.marginBottom })), (0, jsx_runtime_1.jsx)("div", { className: styles.banner, style: {
|
|
128
|
+
backgroundImage: (additionalSettings === null || additionalSettings === void 0 ? void 0 : additionalSettings.bonusImagePath) ||
|
|
129
|
+
"url(/landings/assets-builder/signUpThree/".concat(appType, "/mob.png)"),
|
|
130
|
+
backgroundPosition: 'center',
|
|
131
|
+
backgroundSize: '100% 100%',
|
|
132
|
+
backgroundRepeat: 'no-repeat',
|
|
133
|
+
} }), (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.title }, { children: [(0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "signUpThree.title" }), !(additionalSettings === null || additionalSettings === void 0 ? void 0 : additionalSettings.preventClose) && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.close, onClick: openPopUp(types_2.EModalTypes.Unknown) }, { children: (0, jsx_runtime_1.jsx)(CrossSvg_1.CrossSvg, { classes: styles.closeIcon }) })))] })), (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, tabClasses: styles.tab, type: "underline" })), (0, jsx_runtime_1.jsx)("div", { className: styles.dash }), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.subTitle, onClick: handleOpenSignIn }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "signUpThree.description" }) })), activeForm === types_3.ERegistrationForm.Email && ((0, jsx_runtime_1.jsx)(EmailSignUp_1.EmailSignUp, { isSelected: true, countryInfo: countryInfo, handleRegistration: handleRegistration, availableCurrencies: availableCurrencies || [], classes: styles.marginBottom })), activeForm === types_3.ERegistrationForm.Phone && ((0, jsx_runtime_1.jsx)(PhoneSignUp_1.PhoneSignUp, { isSelected: true, requestCode: handleRegistration, handleRegistration: handleRegistration, countryInfo: countryInfo, availableCurrencies: availableCurrencies || [], classes: styles.marginBottom })), activeForm === types_3.ERegistrationForm.PhoneWithoutCode && ((0, jsx_runtime_1.jsx)(PhoneSignUp_1.PhoneSignUp, { withoutCode: true, isSelected: true, requestCode: handleRegistration, handleRegistration: handleRegistration, countryInfo: countryInfo, availableCurrencies: availableCurrencies || [], classes: styles.marginBottom })), activeForm === types_3.ERegistrationForm.OneClick && ((0, jsx_runtime_1.jsx)(OneClickKit_1.default, { isSelected: true, handleRegistration: handleRegistration, countryInfo: countryInfo, availableCurrencies: availableCurrencies || [], classes: styles.marginBottom }))] }))] })), (0, jsx_runtime_1.jsx)("div", { className: styles.rightSide, style: {
|
|
134
|
+
backgroundImage: promotionImagePath ||
|
|
135
|
+
"url(/landings/assets-builder/signUpThree/".concat(appType, "/desk.png)"),
|
|
136
|
+
backgroundPosition: 'top',
|
|
137
|
+
backgroundSize: '100% 100%',
|
|
138
|
+
backgroundRepeat: 'no-repeat',
|
|
139
|
+
} })] })));
|
|
140
|
+
};
|
|
141
|
+
exports.SignUpTypeThree = SignUpTypeThree;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ESignUpThreeTheme = void 0;
|
|
4
|
+
var ESignUpThreeTheme;
|
|
5
|
+
(function (ESignUpThreeTheme) {
|
|
6
|
+
ESignUpThreeTheme["Yellow"] = "yellow";
|
|
7
|
+
ESignUpThreeTheme["Purple"] = "purple";
|
|
8
|
+
ESignUpThreeTheme["LightBlue"] = "light-blue";
|
|
9
|
+
})(ESignUpThreeTheme = exports.ESignUpThreeTheme || (exports.ESignUpThreeTheme = {}));
|
package/dist/lib/components/Modals/Alert/components/LostPassword/{index.js → First/index.js}
RENAMED
|
@@ -43,9 +43,9 @@ var Tabs_1 = require("components/ui/Tabs");
|
|
|
43
43
|
var LostPasswordEmailForm_1 = __importDefault(require("./components/LostPasswordEmailForm"));
|
|
44
44
|
var LostPasswordPhoneForm_1 = __importDefault(require("./components/LostPasswordPhoneForm"));
|
|
45
45
|
var constants_1 = require("./constants");
|
|
46
|
-
var types_1 = require("
|
|
47
|
-
var styles = __importStar(require("./LostPassword.module.css"));
|
|
46
|
+
var types_1 = require("../types");
|
|
48
47
|
var ModalContext_1 = require("context/logic/ModalContext");
|
|
48
|
+
var styles = __importStar(require("./LostPassword.module.css"));
|
|
49
49
|
var LostPassword = function () {
|
|
50
50
|
var useTransportControllers = (0, ModalContext_1.useHookProvider)().useTransportControllers;
|
|
51
51
|
var sendCommand = useTransportControllers().sendCommand;
|