react-gldn-kit 0.1.82 → 0.1.84
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/Modals/Alert/components/AssignCurrency/index.js +8 -2
- package/dist/lib/components/Modals/Alert/components/Auth/SignIn/First/index.js +24 -14
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/First/components/Forms/OneClickKit/index.js +15 -11
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/First/components/Forms/PhoneSignUp/index.js +5 -1
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/First/index.js +13 -5
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/First/types.d.ts +2 -1
- package/dist/lib/components/Modals/Alert/components/LostPassword/First/index.js +12 -2
- package/dist/lib/components/Modals/Alert/index.js +5 -0
- package/dist/lib/context/logic/ModalContext.d.ts +4 -0
- package/dist/lib/zustandStore/forms/signUp/types.d.ts +4 -1
- package/dist/lib/zustandStore/forms/signUp/types.js +3 -0
- package/dist/main.css +42 -0
- package/package.json +1 -1
|
@@ -42,8 +42,10 @@ var react_1 = require("react");
|
|
|
42
42
|
var styles = __importStar(require("./AssignCurrency.module.css"));
|
|
43
43
|
var PromoCode_1 = require("components/SignUp/PromoCode");
|
|
44
44
|
var Buttons_1 = require("components/ui/Buttons");
|
|
45
|
+
var selectors_1 = require("zustandStore/forms/signUp/selectors");
|
|
46
|
+
var store_1 = require("zustandStore/forms/signUp/store");
|
|
45
47
|
var AssignCurrency = function () {
|
|
46
|
-
var _a = (0, ModalContext_1.useHookProvider)(), useCurrencies = _a.useCurrencies, useCountryInfo = _a.useCountryInfo;
|
|
48
|
+
var _a = (0, ModalContext_1.useHookProvider)(), useCurrencies = _a.useCurrencies, useCountryInfo = _a.useCountryInfo, registrationLastStep = _a.registrationLastStep;
|
|
47
49
|
var availableCurrencies = (0, useHookFabric_1.useHookFabric)({
|
|
48
50
|
fn: useCurrencies,
|
|
49
51
|
});
|
|
@@ -51,6 +53,10 @@ var AssignCurrency = function () {
|
|
|
51
53
|
fn: useCountryInfo,
|
|
52
54
|
});
|
|
53
55
|
var _b = (0, react_1.useState)(''), promo = _b[0], setPromo = _b[1];
|
|
54
|
-
|
|
56
|
+
var activeCurrencyId = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.getActiveCurrencyIdSelector);
|
|
57
|
+
var handlePrepareData = function () {
|
|
58
|
+
registrationLastStep({ promo: promo, currencyId: activeCurrencyId });
|
|
59
|
+
};
|
|
60
|
+
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.wrapperAssignCurrency }, { children: [(0, jsx_runtime_1.jsx)(CurrencySelector_1.CurrencySelector, { availableCurrencies: availableCurrencies || [], countryInfo: countryInfo, classes: styles.marginB }), (0, jsx_runtime_1.jsx)(PromoCode_1.RegistrationPromoCode, { setPromoCode: setPromo, classes: styles.marginB }), (0, jsx_runtime_1.jsx)(Buttons_1.BaseButton, { text: "T.Select", handleClick: handlePrepareData, size: "--button-full", buttonHeight: "--button-height-full", color: "primary", centreText: true, disabled: !activeCurrencyId, classes: styles.bigMargin })] })));
|
|
55
61
|
};
|
|
56
62
|
exports.default = AssignCurrency;
|
|
@@ -60,11 +60,12 @@ var store_3 = require("zustandStore/alerts/modal/store");
|
|
|
60
60
|
var selectors_3 = require("zustandStore/alerts/modal/selectors");
|
|
61
61
|
var types_2 = require("zustandStore/alerts/modal/types");
|
|
62
62
|
var types_3 = require("zustandStore/forms/signIn/types");
|
|
63
|
+
var types_4 = require("zustandStore/forms/signUp/types");
|
|
63
64
|
var utils_1 = require("zustandStore/forms/signUp/utils");
|
|
64
65
|
var ModalContext_1 = require("context/logic/ModalContext");
|
|
65
66
|
var styles = __importStar(require("./SignIn.module.css"));
|
|
66
67
|
var SignIn = function (_a) {
|
|
67
|
-
var _b;
|
|
68
|
+
var _b, _c;
|
|
68
69
|
var classes = _a.classes;
|
|
69
70
|
var useTransportControllers = (0, ModalContext_1.useHookProvider)().useTransportControllers;
|
|
70
71
|
var sendCommand = useTransportControllers().sendCommand;
|
|
@@ -72,14 +73,16 @@ var SignIn = function (_a) {
|
|
|
72
73
|
var setAuthFormType = (0, store_2.useZustandSignInKitStore)(selectors_2.zustandSignInKitSelectors.setActiveSignInFormAction);
|
|
73
74
|
var setModal = (0, store_3.useZustandModalKitStore)(selectors_3.zustandModalKitSelector.closeAndOpenModalAction);
|
|
74
75
|
var notifications = (0, store_1.useZustandNotificationKitStore)(selectors_1.notificationKitSelectors.getNotificationsSelector);
|
|
75
|
-
var
|
|
76
|
-
var
|
|
77
|
-
var
|
|
78
|
-
var
|
|
79
|
-
var
|
|
76
|
+
var data = (0, store_3.useZustandModalKitStore)(selectors_3.zustandModalKitSelector.getModalAdditionalInfoSelector) || {};
|
|
77
|
+
var registrationTheme = data.registrationTheme;
|
|
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];
|
|
82
|
+
var _h = (0, react_1.useState)({
|
|
80
83
|
form: types_3.EAuthFormType.Email,
|
|
81
84
|
errorText: '',
|
|
82
|
-
}), authError =
|
|
85
|
+
}), authError = _h[0], setAuthError = _h[1];
|
|
83
86
|
var handleSignIn = function () {
|
|
84
87
|
var logInInfo = activeForm === types_3.EAuthFormType.Phone ? phone : email;
|
|
85
88
|
if (activeForm === types_3.EAuthFormType.UserName) {
|
|
@@ -88,11 +91,11 @@ var SignIn = function (_a) {
|
|
|
88
91
|
var data = (0, utils_1.getAuthorizationData)(logInInfo, password, types_1.ERequestIds.AuthorizeByEmail);
|
|
89
92
|
sendCommand('x02', data, true);
|
|
90
93
|
};
|
|
91
|
-
var setModalType = function (t) {
|
|
94
|
+
var setModalType = function (t, additionalSettings) {
|
|
92
95
|
return function (e) {
|
|
93
96
|
e.preventDefault();
|
|
94
97
|
e.stopPropagation();
|
|
95
|
-
setModal(t);
|
|
98
|
+
setModal(t, additionalSettings);
|
|
96
99
|
};
|
|
97
100
|
};
|
|
98
101
|
var activeInput = (0, react_1.useMemo)(function () {
|
|
@@ -119,10 +122,17 @@ var SignIn = function (_a) {
|
|
|
119
122
|
errorText: '',
|
|
120
123
|
});
|
|
121
124
|
}, [activeForm, password, email, phone]);
|
|
122
|
-
return ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.wrapperReferralCopyContent, classes
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
return ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.wrapperReferralCopyContent, classes, (_b = {},
|
|
126
|
+
_b[styles.yellow] = types_4.ESignUpTheme[registrationTheme] ===
|
|
127
|
+
types_4.ESignUpTheme.BaseYellow,
|
|
128
|
+
_b)) }, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.content }, { children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tabs, { activeValue: activeForm, onChange: setAuthFormType, data: constants_1.AUTH_TABS, classes: styles.wrapperTabs, type: "underline" }), (0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.wrapperForms, (_c = {},
|
|
129
|
+
_c[styles.formOne] = activeForm === types_3.EAuthFormType.Phone,
|
|
130
|
+
_c[styles.formTwo] = activeForm === types_3.EAuthFormType.Email,
|
|
131
|
+
_c[styles.formThree] = activeForm === types_3.EAuthFormType.UserName,
|
|
132
|
+
_c)) }, { children: [(0, jsx_runtime_1.jsx)(PhoneSignInForm_1.PhoneSignInForm, { classes: (0, classnames_1.default)(styles.wrapperForm, styles.marginInput), onChange: setPhone, errorText: authError.errorText }), (0, jsx_runtime_1.jsx)(EmailSignInForm_1.EmailSignInForm, { classes: (0, classnames_1.default)(styles.wrapperForm, styles.marginInput), onChange: setEmail, sendCommand: sendCommand, errorText: authError.errorText }), (0, jsx_runtime_1.jsx)(IdSignInForm_1.IdSignInForm, { classes: (0, classnames_1.default)(styles.wrapperForm, styles.marginInput), onChange: setId, errorText: authError.errorText })] })), (0, jsx_runtime_1.jsx)(PasswordInput_1.default, { label: "authorization.inputs.password", size: "full", onChange: setPassword, classes: (0, classnames_1.default)(styles.passwordField, styles.marginInput), errorText: authError.errorText }), (0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.lostPsw, styles.marginInput), onClick: setModalType(types_2.EModalTypes.LostPassword, {
|
|
133
|
+
registrationTheme: registrationTheme,
|
|
134
|
+
}) }, { 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, {
|
|
135
|
+
registrationTheme: registrationTheme,
|
|
136
|
+
}), className: styles.noAccount }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "authorization.noAccount" }) }))] })) })));
|
|
127
137
|
};
|
|
128
138
|
exports.SignIn = SignIn;
|
|
@@ -33,26 +33,30 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
33
33
|
__setModuleDefault(result, mod);
|
|
34
34
|
return result;
|
|
35
35
|
};
|
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
36
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
40
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
|
+
var react_1 = require("react");
|
|
38
42
|
var types_1 = require("react-memory-optimization/dist/lib/binary/types");
|
|
43
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
44
|
+
var HOCRequestLoader_1 = require("components/HOCs/HOCRequestLoader");
|
|
45
|
+
var CircularLoader_1 = require("components/ui/Loaders/CircularLoader");
|
|
46
|
+
var BaseButton_1 = require("components/ui/Buttons/BaseButton");
|
|
47
|
+
var DocsCheckBox_1 = require("components/SignUp/DocsCheckBox");
|
|
48
|
+
var CurrencySelector_1 = require("components/SignUp/CurrencySelector");
|
|
49
|
+
var CountrySelector_1 = require("components/SignUp/CountrySelector");
|
|
50
|
+
var PromoCode_1 = require("components/SignUp/PromoCode");
|
|
51
|
+
var constants_1 = require("./constants");
|
|
39
52
|
var selectors_1 = require("zustandStore/forms/signUp/selectors");
|
|
40
53
|
var store_1 = require("zustandStore/forms/signUp/store");
|
|
41
54
|
var selectors_2 = require("zustandStore/languages/selectors");
|
|
42
55
|
var store_2 = require("zustandStore/languages/store");
|
|
43
56
|
var utils_1 = require("zustandStore/forms/signUp/utils");
|
|
44
|
-
var styles = __importStar(require("./OneClick.module.css"));
|
|
45
|
-
var react_1 = require("react");
|
|
46
57
|
var store_3 = require("zustandStore/connection/store");
|
|
47
58
|
var selectors_3 = require("zustandStore/connection/selectors");
|
|
48
|
-
var
|
|
49
|
-
var CurrencySelector_1 = require("components/SignUp/CurrencySelector");
|
|
50
|
-
var CountrySelector_1 = require("components/SignUp/CountrySelector");
|
|
51
|
-
var PromoCode_1 = require("components/SignUp/PromoCode");
|
|
52
|
-
var HOCRequestLoader_1 = require("components/HOCs/HOCRequestLoader");
|
|
53
|
-
var CircularLoader_1 = require("components/ui/Loaders/CircularLoader");
|
|
54
|
-
var BaseButton_1 = require("components/ui/Buttons/BaseButton");
|
|
55
|
-
var DocsCheckBox_1 = require("components/SignUp/DocsCheckBox");
|
|
59
|
+
var styles = __importStar(require("./OneClick.module.css"));
|
|
56
60
|
var OneClickKit = function (props) {
|
|
57
61
|
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, buttonText = props.buttonText;
|
|
58
62
|
var activeCountryId = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.getActiveCountryIdSelector);
|
|
@@ -97,7 +101,7 @@ var OneClickKit = function (props) {
|
|
|
97
101
|
countryInfo: countryInfo,
|
|
98
102
|
}, { translateKey: translates.currencyTitle, classes: styles.marginB })), (0, jsx_runtime_1.jsx)(CountrySelector_1.CountrySelector, __assign({}, {
|
|
99
103
|
countryInfo: countryInfo,
|
|
100
|
-
}, { translateKey: translates.countryTitle, classes: styles.marginB })), (0, jsx_runtime_1.jsx)(PromoCode_1.RegistrationPromoCode, { setPromoCode: setPromoCode, classes: styles.marginB, translatesKeys: [translates.promoCodeTitle, translates.promoCode] }), (0, jsx_runtime_1.jsx)(DocsCheckBox_1.DocsCheckBox, { terms: terms, handleOpenDoc: handleOpenDoc, translateKey: translates.terms, 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: buttonText || translates.registrationBtn, disabled: isDisabledSubmitButton, color: "primary", handleClick: prepareRegistrationData, size: "--button-full", centreText: true, buttonHeight: "--button-height-full", classes: styles.marginB }) }))] }))
|
|
104
|
+
}, { translateKey: translates.countryTitle, classes: styles.marginB })), (0, jsx_runtime_1.jsx)(PromoCode_1.RegistrationPromoCode, { setPromoCode: setPromoCode, classes: styles.marginB, translatesKeys: [translates.promoCodeTitle, translates.promoCode] }), (0, jsx_runtime_1.jsx)(DocsCheckBox_1.DocsCheckBox, { terms: terms, handleOpenDoc: handleOpenDoc, translateKey: translates.terms, 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: buttonText || translates.registrationBtn, disabled: isDisabledSubmitButton, color: "primary", handleClick: prepareRegistrationData, size: "--button-full", centreText: true, buttonHeight: "--button-height-full", classes: (0, classnames_1.default)(styles.marginB, styles.authButton) }) }))] }))
|
|
101
105
|
// <OneClick
|
|
102
106
|
// isSelected={isSelected}
|
|
103
107
|
// activeCountryId={activeCountryId}
|
|
@@ -33,11 +33,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
33
33
|
__setModuleDefault(result, mod);
|
|
34
34
|
return result;
|
|
35
35
|
};
|
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
36
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
40
|
exports.PhoneSignUp = void 0;
|
|
38
41
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
39
42
|
var react_1 = require("react");
|
|
40
43
|
var types_1 = require("react-memory-optimization/dist/lib/binary/types");
|
|
44
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
41
45
|
var BaseInput_1 = require("components/ui/Inputs/BaseInput");
|
|
42
46
|
var BaseButton_1 = require("components/ui/Buttons/BaseButton");
|
|
43
47
|
var PhoneInput_1 = require("components/ui/Inputs/PhoneInput");
|
|
@@ -146,6 +150,6 @@ var PhoneSignUp = function (props) {
|
|
|
146
150
|
var PHONE_PROPS = withoutCode
|
|
147
151
|
? constants_1.PHONE_PROPS_WITHOUT_CONFIRMATION
|
|
148
152
|
: constants_1.PHONE_PROPS_WITH_CONFIRMATION;
|
|
149
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(PhoneInput_1.PhoneInput, __assign({}, PHONE_PROPS, { label: "registrations.inputs.phone", size: "full", defaultValue: "+", onChange: setPhone, countryInfo: countryInfo, requestCallback: handleIsRequested, classesWrapper: styles.marginB, disabled: isRequestedCode, classes: styles.marginB, requestCode: !withoutCode ? requestCode : undefined })), !withoutCode && isRequestedCode && ((0, jsx_runtime_1.jsx)(BaseInput_1.BaseInput, { label: "registrations.inputs.code", size: "full", disabled: !isRequestedCode, onChange: handleChange('code'), classes: styles.marginB })), (0, jsx_runtime_1.jsx)(BaseInput_1.BaseInput, { label: "registrations.inputs.password", size: "full", isHidePlaceholder: true, onChange: handleChange('password'), classes: styles.marginB }), (0, jsx_runtime_1.jsx)(CurrencySelector_1.CurrencySelector, { availableCurrencies: availableCurrencies, countryInfo: countryInfo, classes: styles.marginB }), (0, jsx_runtime_1.jsx)(PromoCode_1.RegistrationPromoCode, { setPromoCode: setPromoCode, classes: styles.marginB }), (0, jsx_runtime_1.jsx)(DocsCheckBox_1.DocsCheckBox, { terms: terms, 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: buttonText || 'registrations.submitBtn', disabled: isDisabledSubmitButton, color: "primary", handleClick: handleSubmitForm, size: "--button-full", centreText: true, buttonHeight: "--button-height-full", classes: styles.marginB }) }))] }));
|
|
153
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(PhoneInput_1.PhoneInput, __assign({}, PHONE_PROPS, { label: "registrations.inputs.phone", size: "full", defaultValue: "+", onChange: setPhone, countryInfo: countryInfo, requestCallback: handleIsRequested, classesWrapper: styles.marginB, disabled: isRequestedCode, classes: styles.marginB, requestCode: !withoutCode ? requestCode : undefined, buttonClasses: styles.authButton })), !withoutCode && isRequestedCode && ((0, jsx_runtime_1.jsx)(BaseInput_1.BaseInput, { label: "registrations.inputs.code", size: "full", disabled: !isRequestedCode, onChange: handleChange('code'), classes: styles.marginB })), (0, jsx_runtime_1.jsx)(BaseInput_1.BaseInput, { label: "registrations.inputs.password", size: "full", isHidePlaceholder: true, onChange: handleChange('password'), classes: styles.marginB }), (0, jsx_runtime_1.jsx)(CurrencySelector_1.CurrencySelector, { availableCurrencies: availableCurrencies, countryInfo: countryInfo, classes: styles.marginB }), (0, jsx_runtime_1.jsx)(PromoCode_1.RegistrationPromoCode, { setPromoCode: setPromoCode, classes: styles.marginB }), (0, jsx_runtime_1.jsx)(DocsCheckBox_1.DocsCheckBox, { terms: terms, 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: buttonText || 'registrations.submitBtn', disabled: isDisabledSubmitButton, color: "primary", handleClick: handleSubmitForm, size: "--button-full", centreText: true, buttonHeight: "--button-height-full", classes: (0, classnames_1.default)(styles.marginB, styles.authButton) }) }))] }));
|
|
150
154
|
};
|
|
151
155
|
exports.PhoneSignUp = PhoneSignUp;
|
|
@@ -58,8 +58,9 @@ var ModalContext_1 = require("context/logic/ModalContext");
|
|
|
58
58
|
var useHookFabric_1 = require("hooks/useHookFabric");
|
|
59
59
|
var styles = __importStar(require("./SignUp.module.css"));
|
|
60
60
|
var SignUp = function (props) {
|
|
61
|
-
var
|
|
62
|
-
var
|
|
61
|
+
var _a;
|
|
62
|
+
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;
|
|
63
|
+
var _c = (0, ModalContext_1.useHookProvider)(), useTransportControllers = _c.useTransportControllers, useCurrencies = _c.useCurrencies, useCountryInfo = _c.useCountryInfo, sendRegistrationCommand = _c.sendRegistrationCommand;
|
|
63
64
|
var sendCommand = useTransportControllers().sendCommand;
|
|
64
65
|
var availableCurrencies = (0, useHookFabric_1.useHookFabric)({
|
|
65
66
|
fn: useCurrencies,
|
|
@@ -72,13 +73,17 @@ var SignUp = function (props) {
|
|
|
72
73
|
var setActiveForm = (0, store_2.useZustandRegistrationKitStore)(selectors_2.zustandRegistrationKitSelector.setActiveRegistrationFormAction);
|
|
73
74
|
var setModal = (0, store_1.useZustandModalKitStore)(selectors_1.zustandModalKitSelector.closeAndOpenModalAction);
|
|
74
75
|
var data = (0, store_1.useZustandModalKitStore)(selectors_1.zustandModalKitSelector.getModalAdditionalInfoSelector) || {};
|
|
75
|
-
var
|
|
76
|
+
var _d = data.bonusSignUp, bonusSignUp = _d === void 0 ? (registrationSettings === null || registrationSettings === void 0 ? void 0 : registrationSettings.bonusSignUp) || false : _d, _e = data.bonusText, modalBonusText = _e === void 0 ? (registrationSettings === null || registrationSettings === void 0 ? void 0 : registrationSettings.bonusText) || '' : _e, _f = data.bonusSubText, modalBonusSubText = _f === void 0 ? (registrationSettings === null || registrationSettings === void 0 ? void 0 : registrationSettings.bonusSubText) || '' : _f, _g = data.withCongratulationText, modalWithCongratulationText = _g === void 0 ? withCongratulationText : _g, _h = data.flow, flow = _h === void 0 ? (registrationSettings === null || registrationSettings === void 0 ? void 0 : registrationSettings.flow) || types_2.ERegistrationFlow.Socket : _h, _j = data.buttonText, buttonSignUpText = _j === void 0 ? '' : _j, _k = data.registrationTheme, registrationTheme = _k === void 0 ? types_2.ESignUpTheme.BaseGreen : _k;
|
|
77
|
+
var regType = (registrationSettings === null || registrationSettings === void 0 ? void 0 : registrationSettings.registrationTheme) ||
|
|
78
|
+
registrationTheme;
|
|
76
79
|
var isCongratulation = modalWithCongratulationText;
|
|
77
80
|
var customBonusText = bonusText || modalBonusText;
|
|
78
81
|
var customBonusSubText = bonusSubText || modalBonusSubText;
|
|
79
82
|
var customSignUpButtonText = buttonText || buttonSignUpText;
|
|
80
83
|
var openSignIn = function () {
|
|
81
|
-
setModal(types_1.EModalTypes.SignIn
|
|
84
|
+
setModal(types_1.EModalTypes.SignIn, {
|
|
85
|
+
registrationTheme: regType,
|
|
86
|
+
});
|
|
82
87
|
};
|
|
83
88
|
var handleRegistrationCode = function (key, data) {
|
|
84
89
|
sendCommand(key, data, true);
|
|
@@ -88,7 +93,10 @@ var SignUp = function (props) {
|
|
|
88
93
|
setActiveForm(tabs[0].value);
|
|
89
94
|
}
|
|
90
95
|
}, [activeForm, tabs]);
|
|
91
|
-
return ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.wrapperReferralFailure, classes) }, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className:
|
|
96
|
+
return ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.wrapperReferralFailure, classes) }, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.wrapperSignUpModal, (_a = {},
|
|
97
|
+
_a[styles.yellow] = types_2.ESignUpTheme[regType] === types_2.ESignUpTheme.BaseYellow,
|
|
98
|
+
_a[styles.white] = types_2.ESignUpTheme[regType] === types_2.ESignUpTheme.BaseWhite,
|
|
99
|
+
_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
|
|
92
100
|
? customBonusSubText
|
|
93
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(flow), availableCurrencies: availableCurrencies || [], buttonText: customSignUpButtonText })), activeForm === types_2.ERegistrationForm.Phone && ((0, jsx_runtime_1.jsx)(PhoneSignUp_1.PhoneSignUp, { isSelected: true, requestCode: handleRegistrationCode, handleRegistration: sendRegistrationCommand(flow), 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(flow), countryInfo: countryInfo, availableCurrencies: availableCurrencies || [], buttonText: customSignUpButtonText })), activeForm === types_2.ERegistrationForm.OneClick && ((0, jsx_runtime_1.jsx)(OneClickKit_1.default, { isSelected: true, handleRegistration: sendRegistrationCommand(flow), 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" }) }))] })) })));
|
|
94
102
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ERegistrationFlow } from 'zustandStore/forms/signUp/types';
|
|
1
|
+
import { ERegistrationFlow, ESignUpTheme } from 'zustandStore/forms/signUp/types';
|
|
2
2
|
export type SignUpProps = {
|
|
3
3
|
classes?: string;
|
|
4
4
|
bonusText?: string;
|
|
@@ -9,6 +9,7 @@ export type SignUpProps = {
|
|
|
9
9
|
bonusText?: string;
|
|
10
10
|
bonusSubText?: string;
|
|
11
11
|
bonusSignUp?: boolean;
|
|
12
|
+
registrationTheme?: keyof typeof ESignUpTheme;
|
|
12
13
|
};
|
|
13
14
|
buttonText?: string;
|
|
14
15
|
};
|
|
@@ -39,17 +39,27 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
40
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
41
|
var react_1 = require("react");
|
|
42
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
42
43
|
var Tabs_1 = require("components/ui/Tabs");
|
|
43
44
|
var LostPasswordEmailForm_1 = __importDefault(require("./components/LostPasswordEmailForm"));
|
|
44
45
|
var LostPasswordPhoneForm_1 = __importDefault(require("./components/LostPasswordPhoneForm"));
|
|
45
46
|
var constants_1 = require("./constants");
|
|
47
|
+
var store_1 = require("zustandStore/alerts/modal/store");
|
|
48
|
+
var selectors_1 = require("zustandStore/alerts/modal/selectors");
|
|
46
49
|
var types_1 = require("../types");
|
|
50
|
+
var types_2 = require("zustandStore/forms/signUp/types");
|
|
47
51
|
var ModalContext_1 = require("context/logic/ModalContext");
|
|
48
52
|
var styles = __importStar(require("./LostPassword.module.css"));
|
|
49
53
|
var LostPassword = function () {
|
|
54
|
+
var _a;
|
|
50
55
|
var useTransportControllers = (0, ModalContext_1.useHookProvider)().useTransportControllers;
|
|
51
56
|
var sendCommand = useTransportControllers().sendCommand;
|
|
52
|
-
var
|
|
53
|
-
|
|
57
|
+
var _b = (0, react_1.useState)(types_1.RecoveryFormType.Email), activeValue = _b[0], setActiveValue = _b[1];
|
|
58
|
+
var data = (0, store_1.useZustandModalKitStore)(selectors_1.zustandModalKitSelector.getModalAdditionalInfoSelector) || {};
|
|
59
|
+
var registrationTheme = data.registrationTheme;
|
|
60
|
+
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.wrapprLostePassword, (_a = {},
|
|
61
|
+
_a[styles.yellow] = types_2.ESignUpTheme[registrationTheme] ===
|
|
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 }))] })));
|
|
54
64
|
};
|
|
55
65
|
exports.default = LostPassword;
|
|
@@ -171,6 +171,7 @@ var AssignCurrency = (0, react_1.lazy)(function () { return __awaiter(void 0, vo
|
|
|
171
171
|
case 1: return [2 /*return*/, _a.sent()];
|
|
172
172
|
}
|
|
173
173
|
}); }); });
|
|
174
|
+
var types_2 = require("zustandStore/forms/signUp/types");
|
|
174
175
|
var shared_1 = require("utils/shared");
|
|
175
176
|
var styles = __importStar(require("./Alert.module.css"));
|
|
176
177
|
var Alerts = function (props) {
|
|
@@ -256,6 +257,10 @@ var Alerts = function (props) {
|
|
|
256
257
|
_b[styles.thirdAuth] = modalType === types_1.EModalTypes.SignUpThree ||
|
|
257
258
|
modalType === types_1.EModalTypes.SignInThree,
|
|
258
259
|
_b[styles.thirdLostpassword] = modalType === types_1.EModalTypes.LostPasswordThree,
|
|
260
|
+
_b[styles.yellowSignUp] = (modalType === types_1.EModalTypes.SignIn ||
|
|
261
|
+
modalType === types_1.EModalTypes.SignUp ||
|
|
262
|
+
modalType === types_1.EModalTypes.LostPassword) &&
|
|
263
|
+
types_2.ESignUpTheme[additionalSettings.registrationTheme] === types_2.ESignUpTheme.BaseYellow,
|
|
259
264
|
_b)), modalContentClasses: (0, classnames_1.default)((_c = {},
|
|
260
265
|
_c[styles.maxWidth] = modalType === types_1.EModalTypes.SignUpThree ||
|
|
261
266
|
modalType === types_1.EModalTypes.SignInThree,
|
|
@@ -7,6 +7,10 @@ type HookContextType = {
|
|
|
7
7
|
useCurrencies: () => null | CurrencyInfo[];
|
|
8
8
|
useCountryInfo: () => any;
|
|
9
9
|
useGoogleAuth: () => any;
|
|
10
|
+
registrationLastStep: (data: {
|
|
11
|
+
promo: string;
|
|
12
|
+
currencyId: number;
|
|
13
|
+
}) => any;
|
|
10
14
|
sendRegistrationCommand: (flow: ERegistrationFlow) => (key: string, data: any) => any;
|
|
11
15
|
appType: EAppType;
|
|
12
16
|
};
|
|
@@ -48,7 +48,10 @@ export declare enum ESignUpTheme {
|
|
|
48
48
|
SilverTwo = "silver-two",
|
|
49
49
|
GrayTwo = "gray-two",
|
|
50
50
|
Black = "black",
|
|
51
|
-
BlackRed = "black-red"
|
|
51
|
+
BlackRed = "black-red",
|
|
52
|
+
BaseGreen = "base-green",
|
|
53
|
+
BaseYellow = "base-yellow",
|
|
54
|
+
BaseWhite = "base-white"
|
|
52
55
|
}
|
|
53
56
|
export declare enum ERegistrationSocial {
|
|
54
57
|
Unknown = "Unknown",
|
|
@@ -28,6 +28,9 @@ var ESignUpTheme;
|
|
|
28
28
|
ESignUpTheme["GrayTwo"] = "gray-two";
|
|
29
29
|
ESignUpTheme["Black"] = "black";
|
|
30
30
|
ESignUpTheme["BlackRed"] = "black-red";
|
|
31
|
+
ESignUpTheme["BaseGreen"] = "base-green";
|
|
32
|
+
ESignUpTheme["BaseYellow"] = "base-yellow";
|
|
33
|
+
ESignUpTheme["BaseWhite"] = "base-white";
|
|
31
34
|
})(ESignUpTheme = exports.ESignUpTheme || (exports.ESignUpTheme = {}));
|
|
32
35
|
var ERegistrationSocial;
|
|
33
36
|
(function (ERegistrationSocial) {
|
package/dist/main.css
CHANGED
|
@@ -1292,6 +1292,18 @@
|
|
|
1292
1292
|
padding: var(--indent-xs);
|
|
1293
1293
|
}
|
|
1294
1294
|
|
|
1295
|
+
.KIT__SignUp-module__yellow___E9DiY {
|
|
1296
|
+
--green-100: rgba(255, 222, 106, 1);
|
|
1297
|
+
--input-background: rgba(36, 36, 36, 1);
|
|
1298
|
+
--selector-item-background: rgba(36, 36, 36, 1);
|
|
1299
|
+
--selector-main-bg-opened: rgba(36, 36, 36, 1);
|
|
1300
|
+
--phone-input-item-hover-background-color: rgba(48, 47, 47);
|
|
1301
|
+
--arrow-button-svg-path-fill: rgba(161, 166, 178, 1);
|
|
1302
|
+
--button-primary-border: none;
|
|
1303
|
+
--button-color-primary-text: rgb(0,0,0);
|
|
1304
|
+
--button-color-primary: linear-gradient(90deg, rgba(255,222,106, 1) 23%, rgba(224, 168, 37, 1) 67%);
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1295
1307
|
.KIT__SignUp-module__wrapperTitle___5QJvI {
|
|
1296
1308
|
padding: var(--indent-l);
|
|
1297
1309
|
}
|
|
@@ -2765,6 +2777,19 @@
|
|
|
2765
2777
|
}
|
|
2766
2778
|
|
|
2767
2779
|
|
|
2780
|
+
.KIT__SignIn-module__yellow___IgXCq {
|
|
2781
|
+
--green-100: rgba(255, 222, 106, 1);
|
|
2782
|
+
--input-background: rgba(36, 36, 36, 1);
|
|
2783
|
+
--selector-item-background: rgba(36, 36, 36, 1);
|
|
2784
|
+
--selector-main-bg-opened: rgba(36, 36, 36, 1);
|
|
2785
|
+
--phone-input-item-hover-background-color: rgba(48, 47, 47);
|
|
2786
|
+
--arrow-button-svg-path-fill: rgba(161, 166, 178, 1);
|
|
2787
|
+
--button-primary-border: none;
|
|
2788
|
+
--button-color-primary-text: var(--base-1000);
|
|
2789
|
+
--button-color-primary: linear-gradient(90deg, rgba(255,222,106, 1) 23%, rgba(224, 168, 37, 1) 67%);
|
|
2790
|
+
--sign-in-modal-lost-password-color: rgba(255, 255, 255, 0.6);
|
|
2791
|
+
}
|
|
2792
|
+
|
|
2768
2793
|
.KIT__SignIn-module__content___tU4ST {
|
|
2769
2794
|
width: 100%;
|
|
2770
2795
|
display: flex;
|
|
@@ -3509,6 +3534,19 @@
|
|
|
3509
3534
|
margin-bottom: var(--indent-xs);
|
|
3510
3535
|
}
|
|
3511
3536
|
|
|
3537
|
+
.KIT__LostPassword-module__yellow___dOi3Z {
|
|
3538
|
+
--green-100: rgba(255, 222, 106, 1);
|
|
3539
|
+
--input-background: rgba(36, 36, 36, 1);
|
|
3540
|
+
--phone-input-item-hover-background-color: rgba(48, 47, 47);
|
|
3541
|
+
--button-primary-border: none;
|
|
3542
|
+
--button-color-primary-text: var(--base-1000);
|
|
3543
|
+
--button-color-primary: linear-gradient(
|
|
3544
|
+
90deg,
|
|
3545
|
+
rgba(255, 222, 106, 1) 23%,
|
|
3546
|
+
rgba(224, 168, 37, 1) 67%
|
|
3547
|
+
);
|
|
3548
|
+
}
|
|
3549
|
+
|
|
3512
3550
|
.KIT__LostPassword-module__tabWrapper___M1C0O {
|
|
3513
3551
|
width: var(--full);
|
|
3514
3552
|
margin-bottom: var(--indent-m);
|
|
@@ -4074,6 +4112,10 @@
|
|
|
4074
4112
|
background: var(--third-modal-layout-background-color);
|
|
4075
4113
|
}
|
|
4076
4114
|
|
|
4115
|
+
.KIT__Alert-module__yellowSignUp___YdXau {
|
|
4116
|
+
background: var(--base-1000);
|
|
4117
|
+
}
|
|
4118
|
+
|
|
4077
4119
|
@media (min-width: 768px) {
|
|
4078
4120
|
.KIT__Alert-module__wrapperModal___lOle6 {
|
|
4079
4121
|
display: flex;
|