react-gldn-kit 0.1.62 → 0.1.64
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/584e853b008bbc39706d2eae62d68563.svg +13 -0
- package/dist/index.js +1 -1
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/First/components/Forms/EmailSignUp/index.d.ts +1 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/First/components/Forms/EmailSignUp/index.js +2 -2
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/First/components/Forms/OneClickKit/index.js +2 -2
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/First/components/Forms/OneClickKit/types.d.ts +1 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/First/components/Forms/PhoneSignUp/index.js +2 -3
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/First/components/Forms/PhoneSignUp/types.d.ts +1 -0
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/First/index.js +6 -5
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/First/types.d.ts +1 -0
- package/dist/lib/components/SignUp/CurrencySelector/index.js +25 -1
- package/dist/lib/components/SignUp/DocsCheckBox/index.js +1 -1
- package/dist/lib/components/SignUp/PromoCode/index.js +6 -2
- package/dist/lib/components/ui/Headers/PopUpHeader/index.js +1 -1
- package/dist/lib/components/ui/Inputs/BaseInput/BaseInputUi.js +12 -12
- package/dist/lib/components/ui/Inputs/BaseInput/types.d.ts +1 -0
- package/dist/lib/components/ui/Inputs/PhoneInput/components/PhoneView/index.d.ts +0 -1
- package/dist/lib/components/ui/Inputs/PhoneInput/components/PhoneView/index.js +3 -3
- package/dist/lib/components/ui/Inputs/PhoneInput/index.js +2 -2
- package/dist/lib/components/ui/Selector/index.js +4 -5
- package/dist/lib/components/ui/Selector/types.d.ts +1 -0
- package/dist/lib/components/ui/Tabs/index.js +1 -0
- package/dist/main.css +131 -67
- package/package.json +1 -1
- package/dist/44e37556cab6e2a7ab8cf131dca24fac.svg +0 -48
|
@@ -5,6 +5,7 @@ type Props = {
|
|
|
5
5
|
handleRegistration: (k: string, data: ReturnType<typeof getRegistrationData>) => void;
|
|
6
6
|
availableCurrencies: CurrencyInfo[];
|
|
7
7
|
countryInfo: CountryInfo | null;
|
|
8
|
+
buttonText?: string;
|
|
8
9
|
};
|
|
9
10
|
export declare const EmailSignUp: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -61,7 +61,7 @@ var styles = __importStar(require("../../../SignUp.module.css"));
|
|
|
61
61
|
var stylesEmailSignUp = __importStar(require("./EmailSignUp.module.css"));
|
|
62
62
|
var DocsCheckBox_1 = require("components/SignUp/DocsCheckBox");
|
|
63
63
|
var EmailSignUp = function (props) {
|
|
64
|
-
var countryInfo = props.countryInfo, _a = props.isSelected, isSelected = _a === void 0 ? false : _a, handleRegistration = props.handleRegistration, availableCurrencies = props.availableCurrencies;
|
|
64
|
+
var countryInfo = props.countryInfo, _a = props.isSelected, isSelected = _a === void 0 ? false : _a, handleRegistration = props.handleRegistration, availableCurrencies = props.availableCurrencies, buttonText = props.buttonText;
|
|
65
65
|
var _b = (0, react_1.useState)(constant_1.DEFAULT_INPUT_VALUE), email = _b[0], setEmail = _b[1];
|
|
66
66
|
// const docs = useZustandWebConfiguration(getDocsSelector) || {};
|
|
67
67
|
var _c = (0, react_1.useState)(constant_1.DEFAULT_INPUT_VALUE), password = _c[0], setPassword = _c[1];
|
|
@@ -131,6 +131,6 @@ var EmailSignUp = function (props) {
|
|
|
131
131
|
// }
|
|
132
132
|
// openExternalLink(link, true);
|
|
133
133
|
};
|
|
134
|
-
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: stylesEmailSignUp.animationFadeIn }, { children: [(0, jsx_runtime_1.jsx)(BaseInput_1.BaseInput, { placeholder: "registrations.inputs.email", size: "full", isHidePlaceholder: true, onChange: handleChange('email'), errorText: email.errorText, classes: styles.marginB }), (0, jsx_runtime_1.jsx)(BaseInput_1.BaseInput, { placeholder: "registrations.inputs.password", size: "full", isHidePlaceholder: true, onChange: handleChange('password'), errorText: password.errorText, 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: promoCode ? '06x_with_promo' : '06x', 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)(styles.marginB, styles.authButton) }) }))] })));
|
|
134
|
+
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: stylesEmailSignUp.animationFadeIn }, { children: [(0, jsx_runtime_1.jsx)(BaseInput_1.BaseInput, { placeholder: "registrations.inputs.email", size: "full", isHidePlaceholder: true, onChange: handleChange('email'), errorText: email.errorText, classes: styles.marginB }), (0, jsx_runtime_1.jsx)(BaseInput_1.BaseInput, { placeholder: "registrations.inputs.password", size: "full", isHidePlaceholder: true, onChange: handleChange('password'), errorText: password.errorText, 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: promoCode ? '06x_with_promo' : '06x', 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) }) }))] })));
|
|
135
135
|
};
|
|
136
136
|
exports.EmailSignUp = EmailSignUp;
|
|
@@ -54,7 +54,7 @@ var CircularLoader_1 = require("components/ui/Loaders/CircularLoader");
|
|
|
54
54
|
var BaseButton_1 = require("components/ui/Buttons/BaseButton");
|
|
55
55
|
var DocsCheckBox_1 = require("components/SignUp/DocsCheckBox");
|
|
56
56
|
var OneClickKit = function (props) {
|
|
57
|
-
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;
|
|
57
|
+
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
58
|
var activeCountryId = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.getActiveCountryIdSelector);
|
|
59
59
|
var activeLang = (0, store_2.useZustandLanguagesKitStore)(selectors_2.languageSelectors.getActiveLanguageNameKitSelector);
|
|
60
60
|
var setActiveCountryId = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.setActiveCountryIdAction);
|
|
@@ -97,7 +97,7 @@ var OneClickKit = function (props) {
|
|
|
97
97
|
countryInfo: countryInfo,
|
|
98
98
|
}, { translateKey: translates.currencyTitle, classes: styles.marginB })), (0, jsx_runtime_1.jsx)(CountrySelector_1.CountrySelector, __assign({}, {
|
|
99
99
|
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: translates.registrationBtn, disabled: isDisabledSubmitButton, color: "primary", handleClick: prepareRegistrationData, size: "--button-full", centreText: true, buttonHeight: "--button-height-full", classes: styles.marginB }) }))] }))
|
|
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 }) }))] }))
|
|
101
101
|
// <OneClick
|
|
102
102
|
// isSelected={isSelected}
|
|
103
103
|
// activeCountryId={activeCountryId}
|
|
@@ -44,7 +44,6 @@ var PhoneInput_1 = require("components/ui/Inputs/PhoneInput");
|
|
|
44
44
|
var HOCRequestLoader_1 = require("components/HOCs/HOCRequestLoader");
|
|
45
45
|
var CircularLoader_1 = require("components/ui/Loaders/CircularLoader");
|
|
46
46
|
var PromoCode_1 = require("components/SignUp/PromoCode");
|
|
47
|
-
var CountrySelector_1 = require("components/SignUp/CountrySelector");
|
|
48
47
|
var CurrencySelector_1 = require("components/SignUp/CurrencySelector");
|
|
49
48
|
var constant_1 = require("components/ui/Inputs/BaseInput/constant");
|
|
50
49
|
var constants_1 = require("./constants");
|
|
@@ -59,7 +58,7 @@ var utils_1 = require("zustandStore/forms/signUp/utils");
|
|
|
59
58
|
var styles = __importStar(require("../../../SignUp.module.css"));
|
|
60
59
|
var DocsCheckBox_1 = require("components/SignUp/DocsCheckBox");
|
|
61
60
|
var PhoneSignUp = function (props) {
|
|
62
|
-
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;
|
|
61
|
+
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, buttonText = props.buttonText;
|
|
63
62
|
var setRegisteredLogin = (0, store_2.useZustandRegistrationKitStore)(selectors_2.zustandRegistrationKitSelector.setRegisteredLoginAction);
|
|
64
63
|
// const { sendCommand } = useTransportControllers();
|
|
65
64
|
var isConnectedApp = (0, store_3.useZustandConnectionKitStore)(selectors_3.connectionSelectors.isAvailableTransportSelector);
|
|
@@ -146,6 +145,6 @@ var PhoneSignUp = function (props) {
|
|
|
146
145
|
var PHONE_PROPS = withoutCode
|
|
147
146
|
? constants_1.PHONE_PROPS_WITHOUT_CONFIRMATION
|
|
148
147
|
: 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, { placeholder: "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, { placeholder: "registrations.inputs.code", size: "full", isHidePlaceholder: true, disabled: !isRequestedCode, onChange: handleChange('code'), classes: styles.marginB })), (0, jsx_runtime_1.jsx)(BaseInput_1.BaseInput, { placeholder: "registrations.inputs.password", size: "full", isHidePlaceholder: true, onChange: handleChange('password'), classes: styles.marginB }), (0, jsx_runtime_1.jsx)(
|
|
148
|
+
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: styles.marginB, disabled: isRequestedCode, classes: styles.marginB, requestCode: !withoutCode ? requestCode : undefined })), !withoutCode && isRequestedCode && ((0, jsx_runtime_1.jsx)(BaseInput_1.BaseInput, { placeholder: "registrations.inputs.code", size: "full", isHidePlaceholder: true, disabled: !isRequestedCode, onChange: handleChange('code'), classes: styles.marginB })), (0, jsx_runtime_1.jsx)(BaseInput_1.BaseInput, { placeholder: "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 }) }))] }));
|
|
150
149
|
};
|
|
151
150
|
exports.PhoneSignUp = PhoneSignUp;
|
|
@@ -52,11 +52,11 @@ var types_1 = require("zustandStore/alerts/modal/types");
|
|
|
52
52
|
var store_2 = require("zustandStore/forms/signUp/store");
|
|
53
53
|
var selectors_2 = require("zustandStore/forms/signUp/selectors");
|
|
54
54
|
var types_2 = require("zustandStore/forms/signUp/types");
|
|
55
|
+
var ModalContext_1 = require("context/logic/ModalContext");
|
|
55
56
|
var useHookFabric_1 = require("hooks/useHookFabric");
|
|
56
57
|
var styles = __importStar(require("./SignUp.module.css"));
|
|
57
|
-
var ModalContext_1 = require("context/logic/ModalContext");
|
|
58
58
|
var SignUp = function (props) {
|
|
59
|
-
var classes = props.classes, bonusText = props.bonusText, bonusSubText = props.bonusSubText, _a = props.withCongratulationText, withCongratulationText = _a === void 0 ? true : _a, registrationSettings = props.registrationSettings;
|
|
59
|
+
var classes = props.classes, bonusText = props.bonusText, bonusSubText = props.bonusSubText, _a = props.withCongratulationText, withCongratulationText = _a === void 0 ? true : _a, registrationSettings = props.registrationSettings, buttonText = props.buttonText;
|
|
60
60
|
var _b = (0, ModalContext_1.useHookProvider)(), useTransportControllers = _b.useTransportControllers, useCurrencies = _b.useCurrencies, useCountryInfo = _b.useCountryInfo, sendRegistrationCommand = _b.sendRegistrationCommand;
|
|
61
61
|
var sendCommand = useTransportControllers().sendCommand;
|
|
62
62
|
var availableCurrencies = (0, useHookFabric_1.useHookFabric)({
|
|
@@ -70,10 +70,11 @@ var SignUp = function (props) {
|
|
|
70
70
|
var setActiveForm = (0, store_2.useZustandRegistrationKitStore)(selectors_2.zustandRegistrationKitSelector.setActiveRegistrationFormAction);
|
|
71
71
|
var setModal = (0, store_1.useZustandModalKitStore)(selectors_1.zustandModalKitSelector.closeAndOpenModalAction);
|
|
72
72
|
var data = (0, store_1.useZustandModalKitStore)(selectors_1.zustandModalKitSelector.getModalAdditionalInfoSelector) || {};
|
|
73
|
-
var _c = data.bonusSignUp, bonusSignUp = _c === void 0 ? false : _c, _d = data.bonusText, modalBonusText = _d === void 0 ? '' : _d, _e = data.bonusSubText, modalBonusSubText = _e === void 0 ? '' : _e, _f = data.withCongratulationText, modalWithCongratulationText = _f === void 0 ? withCongratulationText : _f, _g = data.flow, flow = _g === void 0 ? registrationSettings.flow || types_2.ERegistrationFlow.Socket : _g;
|
|
73
|
+
var _c = data.bonusSignUp, bonusSignUp = _c === void 0 ? false : _c, _d = data.bonusText, modalBonusText = _d === void 0 ? '' : _d, _e = data.bonusSubText, modalBonusSubText = _e === void 0 ? '' : _e, _f = data.withCongratulationText, modalWithCongratulationText = _f === void 0 ? withCongratulationText : _f, _g = data.flow, flow = _g === void 0 ? (registrationSettings === null || registrationSettings === void 0 ? void 0 : registrationSettings.flow) || types_2.ERegistrationFlow.Socket : _g, _h = data.buttonText, buttonSignUpText = _h === void 0 ? '' : _h;
|
|
74
74
|
var isCongratulation = modalWithCongratulationText;
|
|
75
75
|
var customBonusText = bonusText || modalBonusText;
|
|
76
76
|
var customBonusSubText = bonusSubText || modalBonusSubText;
|
|
77
|
+
var customSignUpButtonText = buttonText || buttonSignUpText;
|
|
77
78
|
var openSignIn = function () {
|
|
78
79
|
setModal(types_1.EModalTypes.SignIn);
|
|
79
80
|
};
|
|
@@ -85,8 +86,8 @@ var SignUp = function (props) {
|
|
|
85
86
|
setActiveForm(tabs[0].value);
|
|
86
87
|
}
|
|
87
88
|
}, [activeForm, tabs]);
|
|
88
|
-
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: styles.wrapperSignUpModal }, { children: [
|
|
89
|
+
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: styles.wrapperSignUpModal }, { 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
|
|
89
90
|
? customBonusSubText
|
|
90
|
-
: 'wheelTwo.secondPopUp.subTitle' }) })), (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: customBonusText ? customBonusText : 'wheelTwo.secondPopUp.bonus' })] }))), (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 || [] })), activeForm === types_2.ERegistrationForm.Phone && ((0, jsx_runtime_1.jsx)(PhoneSignUp_1.PhoneSignUp, { isSelected: true, requestCode: handleRegistrationCode, handleRegistration: sendRegistrationCommand(flow), countryInfo: countryInfo, availableCurrencies: availableCurrencies || [] })), 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 || [] })), 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" }) }))] })) })));
|
|
91
|
+
: 'wheelTwo.secondPopUp.subTitle' }) })), (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: customBonusText ? customBonusText : 'wheelTwo.secondPopUp.bonus' })] }))), (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" }) }))] })) })));
|
|
91
92
|
};
|
|
92
93
|
exports.SignUp = SignUp;
|
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.CurrencySelector = void 0;
|
|
4
27
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
@@ -6,6 +29,7 @@ var react_1 = require("react");
|
|
|
6
29
|
var Selector_1 = require("components/ui/Selector");
|
|
7
30
|
var store_1 = require("zustandStore/forms/signUp/store");
|
|
8
31
|
var selectors_1 = require("zustandStore/forms/signUp/selectors");
|
|
32
|
+
var styles = __importStar(require("./CurrencySelector.module.css"));
|
|
9
33
|
var CurrencySelector = function (props) {
|
|
10
34
|
var classes = props.classes, availableCurrencies = props.availableCurrencies, countryInfo = props.countryInfo, _a = props.translateKey, translateKey = _a === void 0 ? 'registrations.selectors.currency' : _a, dropdownClasses = props.dropdownClasses, classesItem = props.classesItem;
|
|
11
35
|
var activeCurrencyId = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.getActiveCurrencyIdSelector);
|
|
@@ -26,6 +50,6 @@ var CurrencySelector = function (props) {
|
|
|
26
50
|
}
|
|
27
51
|
setActiveCurrencyId(availableCurrencies[0].id);
|
|
28
52
|
}, [availableCurrencies, activeCurrencyId, countryInfo]);
|
|
29
|
-
return ((0, jsx_runtime_1.jsx)(Selector_1.Selector, { classes: classes, size: "full", placeholder: translateKey, handleClick: setActiveCurrencyId, activeId: activeCurrencyId, data: availableCurrencies, dropdownClasses: dropdownClasses, classesItem: classesItem }));
|
|
53
|
+
return ((0, jsx_runtime_1.jsx)(Selector_1.Selector, { classes: classes, size: "full", placeholder: translateKey, handleClick: setActiveCurrencyId, activeId: activeCurrencyId, data: availableCurrencies, dropdownClasses: dropdownClasses, classesItem: classesItem, arrowClasses: styles.arrow }));
|
|
30
54
|
};
|
|
31
55
|
exports.CurrencySelector = CurrencySelector;
|
|
@@ -29,6 +29,6 @@ var CheckBox_1 = require("components/ui/Inputs/CheckBox");
|
|
|
29
29
|
var styles = __importStar(require("./Docs.module.css"));
|
|
30
30
|
var DocsCheckBox = function (props) {
|
|
31
31
|
var terms = props.terms, handleToggleState = props.handleToggleState, handleOpenDoc = props.handleOpenDoc, _a = props.translateKey, translateKey = _a === void 0 ? 'registrations.termsAndConditions' : _a;
|
|
32
|
-
return ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { value: terms, onChange: handleToggleState, text: translateKey, classes: styles.checkbox,
|
|
32
|
+
return ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { value: terms, onChange: handleToggleState, text: translateKey, classes: styles.checkbox, handleText: handleOpenDoc }));
|
|
33
33
|
};
|
|
34
34
|
exports.DocsCheckBox = DocsCheckBox;
|
|
@@ -33,15 +33,19 @@ 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.RegistrationPromoCode = void 0;
|
|
38
41
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
39
42
|
var react_1 = require("react");
|
|
43
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
40
44
|
var BaseInput_1 = require("components/ui/Inputs/BaseInput");
|
|
41
45
|
var LotterySvg_1 = require("components/ui/Icons/Base/LotterySvg");
|
|
42
46
|
var Text_1 = require("components/Text");
|
|
43
|
-
var styles = __importStar(require("./PromoCode.module.css"));
|
|
44
47
|
var constants_1 = require("./constants");
|
|
48
|
+
var styles = __importStar(require("./PromoCode.module.css"));
|
|
45
49
|
var RegistrationPromoCode = function (props) {
|
|
46
50
|
var setPromoCode = props.setPromoCode, classes = props.classes, _a = props.translatesKeys, translatesKeys = _a === void 0 ? [
|
|
47
51
|
'registrations.promoCode.openPromoCodeTitle',
|
|
@@ -60,6 +64,6 @@ var RegistrationPromoCode = function (props) {
|
|
|
60
64
|
if (constants_1.REFERRAL_CODE) {
|
|
61
65
|
return (0, jsx_runtime_1.jsx)("div", __assign({ className: classes }, { children: " " }));
|
|
62
66
|
}
|
|
63
|
-
return ((0, jsx_runtime_1.jsx)("div", __assign({ className: classes }, { children: !isShownPromoCode ? ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.promoTitle, onClick: handleShowPromoCode }, { children: [(0, jsx_runtime_1.jsx)(LotterySvg_1.LotterySvg, { width: "24", height: "24" }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: translatesKeys[0] }) })] }))) : ((0, jsx_runtime_1.jsx)(BaseInput_1.BaseInput, { placeholder: translatesKeys[1], size: "full", isHidePlaceholder: true, onChange: setPromoCode, classes: styles.marginBottom })) })));
|
|
67
|
+
return ((0, jsx_runtime_1.jsx)("div", __assign({ className: classes }, { children: !isShownPromoCode ? ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.promoTitle, styles.marginBottom), onClick: handleShowPromoCode }, { children: [(0, jsx_runtime_1.jsx)(LotterySvg_1.LotterySvg, { width: "24", height: "24" }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: translatesKeys[0] }) })] }))) : ((0, jsx_runtime_1.jsx)(BaseInput_1.BaseInput, { placeholder: translatesKeys[1], size: "full", isHidePlaceholder: true, onChange: setPromoCode, classes: styles.marginBottom })) })));
|
|
64
68
|
};
|
|
65
69
|
exports.RegistrationPromoCode = RegistrationPromoCode;
|
|
@@ -54,6 +54,6 @@ var PopUpHeader = function (props) {
|
|
|
54
54
|
};
|
|
55
55
|
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.wrapperPopUpHeader, classes, (_a = {},
|
|
56
56
|
_a[styles.transparent] = transparent,
|
|
57
|
-
_a)) }, { children: [backButton && ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.closeButton, styles.left), onClick: handleBackButton }, { children: backSvg }))), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.title }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: title }) })), closeButton && ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.closeButton, styles.right), onClick: closeButton }, { children: (0, jsx_runtime_1.jsx)(CrossSvg_1.CrossSvg, { classes: styles.closeSvg }) })))] })));
|
|
57
|
+
_a)) }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.leftContent }, { children: [backButton && ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.closeButton, styles.left), onClick: handleBackButton }, { children: backSvg }))), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.title }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: title }) }))] })), closeButton && ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.closeButton, styles.right), onClick: closeButton }, { children: (0, jsx_runtime_1.jsx)(CrossSvg_1.CrossSvg, { classes: styles.closeSvg }) })))] })));
|
|
58
58
|
};
|
|
59
59
|
exports.PopUpHeader = PopUpHeader;
|
|
@@ -48,7 +48,7 @@ var Text_1 = require("components/Text");
|
|
|
48
48
|
var styles = __importStar(require("./BaseInputUi.module.css"));
|
|
49
49
|
var BaseInputUi = function (props) {
|
|
50
50
|
var _a, _b, _c;
|
|
51
|
-
var startIcon = props.startIcon, value = props.value, type = props.type, placeholder = props.placeholder, handleChange = props.handleChange, children = props.children, isHidePlaceholder = props.isHidePlaceholder, inputLabelType = props.inputLabelType, errorText = props.errorText, inputStyleType = props.inputStyleType, size = props.size, classes = props.classes, inputMode = props.inputMode, disabled = props.disabled, _d = props.bottomText, bottomText = _d === void 0 ? '' : _d, _e = props.withErrorSvg, withErrorSvg = _e === void 0 ? false : _e, onFocus = props.onFocus, _f = props.withClearValue, withClearValue = _f === void 0 ? false : _f, handleClearInputValue = props.handleClearInputValue, labelClasses = props.labelClasses, inputClasses = props.inputClasses;
|
|
51
|
+
var startIcon = props.startIcon, value = props.value, type = props.type, placeholder = props.placeholder, handleChange = props.handleChange, children = props.children, isHidePlaceholder = props.isHidePlaceholder, inputLabelType = props.inputLabelType, errorText = props.errorText, inputStyleType = props.inputStyleType, size = props.size, classes = props.classes, inputMode = props.inputMode, disabled = props.disabled, _d = props.bottomText, bottomText = _d === void 0 ? '' : _d, _e = props.withErrorSvg, withErrorSvg = _e === void 0 ? false : _e, onFocus = props.onFocus, _f = props.withClearValue, withClearValue = _f === void 0 ? false : _f, handleClearInputValue = props.handleClearInputValue, labelClasses = props.labelClasses, inputClasses = props.inputClasses, inputWrapperClasses = props.inputWrapperClasses;
|
|
52
52
|
var isBorderColorful = inputStyleType === 'border-colorful';
|
|
53
53
|
var sizeModifier = "inputWrapperSize-".concat(size);
|
|
54
54
|
var _g = (0, react_1.useState)(false), isFocused = _g[0], setFocusState = _g[1];
|
|
@@ -59,16 +59,16 @@ var BaseInputUi = function (props) {
|
|
|
59
59
|
var handleBlur = function () {
|
|
60
60
|
setFocusState(false);
|
|
61
61
|
};
|
|
62
|
-
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
62
|
+
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.mainContainer, styles[sizeModifier], classes) }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.inputWrapper, (_a = {},
|
|
63
|
+
_a[styles.fistIcon] = startIcon,
|
|
64
|
+
_a[styles.borderColorfulGreen] = isBorderColorful && isFocused,
|
|
65
|
+
_a[styles.borderColorfulRed] = errorText,
|
|
66
|
+
_a), inputWrapperClasses) }, { children: [startIcon, (0, jsx_runtime_1.jsx)("input", { onFocus: handleFocus, onBlur: handleBlur, inputMode: inputMode, className: (0, classnames_1.default)(styles.input, (_b = {},
|
|
67
|
+
_b[styles.disabled] = disabled,
|
|
68
|
+
_b), inputClasses), value: value, type: type, placeholder: placeholder, onChange: handleChange }), value && withClearValue && !errorText && ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.searchButton, styles.clearButton), onClick: handleClearInputValue }, { children: (0, jsx_runtime_1.jsx)(CrossSvg_1.CrossSvg, { classes: styles.crossSvg }) }))), value && withClearValue && errorText && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.searchButton }, { children: (0, jsx_runtime_1.jsx)(WarningSvg_1.WarningSvg, {}) }))), children && (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.rowChildrenData }, { children: children })), errorText && withErrorSvg && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.rowChildrenData }, { children: (0, jsx_runtime_1.jsx)(inputError_svg_1.ReactComponent, {}) }))), (0, jsx_runtime_1.jsx)("label", __assign({ className: (0, classnames_1.default)(styles.label, (_c = {},
|
|
69
|
+
_c[styles.labelRight] = startIcon,
|
|
70
|
+
_c[styles.hideLabel] = isHidePlaceholder,
|
|
71
|
+
_c[styles.labelUp] = inputLabelType === 'labelUp',
|
|
72
|
+
_c), labelClasses) }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: placeholder }) })), !errorText && bottomText && ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.errorText, styles.animationFadeIn, styles.resetErrorColor) }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: bottomText }) })))] })), errorText && ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.errorText, styles.animationFadeIn) }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: errorText }) })))] })));
|
|
73
73
|
};
|
|
74
74
|
exports.BaseInputUi = BaseInputUi;
|
|
@@ -46,7 +46,7 @@ var validation_1 = require("service/validation");
|
|
|
46
46
|
var styles = __importStar(require("./PhoneView.module.css"));
|
|
47
47
|
var PhoneView = function (props) {
|
|
48
48
|
var _a, _b, _c;
|
|
49
|
-
var phone = props.phone, Flag = props.Flag, children = props.children, toggleValue = props.toggleValue, isOpened = props.isOpened, mask = props.mask, code = props.code, handleSetValue = props.handleSetValue, classes = props.classes,
|
|
49
|
+
var phone = props.phone, Flag = props.Flag, children = props.children, toggleValue = props.toggleValue, isOpened = props.isOpened, mask = props.mask, code = props.code, handleSetValue = props.handleSetValue, classes = props.classes, name = props.name;
|
|
50
50
|
var value = phone.value, errorText = phone.errorText;
|
|
51
51
|
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.row, (_a = {},
|
|
52
52
|
_a[styles.opened] = isOpened,
|
|
@@ -54,8 +54,8 @@ var PhoneView = function (props) {
|
|
|
54
54
|
_a[styles.mainInput] = toggleValue,
|
|
55
55
|
_a), classes) }, { children: [toggleValue && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.phoneText }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "registrations.inputs.phone" }) }))), (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.content }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.codeWrapper, (_b = {},
|
|
56
56
|
_b[styles.column] = toggleValue,
|
|
57
|
-
_b)) }, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.code }, { children: [(0, jsx_runtime_1.jsx)(Flag, {}), toggleValue && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.arrow }, { children: (0, jsx_runtime_1.jsx)(ArrowButton_1.ArrowButton, {
|
|
57
|
+
_b)) }, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.code, onClick: toggleValue !== null && toggleValue !== void 0 ? toggleValue : undefined }, { children: [(0, jsx_runtime_1.jsx)(Flag, {}), toggleValue && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.arrow }, { children: (0, jsx_runtime_1.jsx)(ArrowButton_1.ArrowButton, {}) })))] })) })), name && (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.name }, { children: name })), (0, jsx_runtime_1.jsx)(BaseInputUi_1.BaseInputUi, __assign({ size: "full", placeholder: "", value: value, baseValue: code, defaultValue: code, handleChange: handleSetValue, patternFn: (0, validation_1.replaceValueByMask)(mask), classes: (0, classnames_1.default)(styles.input, (_c = {},
|
|
58
58
|
_c[styles.errorBorder] = errorText,
|
|
59
|
-
_c)), inputClasses: styles.inputText }, { children: children }))] }))] })));
|
|
59
|
+
_c)), inputClasses: styles.inputText, inputWrapperClasses: styles.inputWrapper }, { children: children }))] }))] })));
|
|
60
60
|
};
|
|
61
61
|
exports.default = PhoneView;
|
|
@@ -155,9 +155,9 @@ var PhoneInput = function (props) {
|
|
|
155
155
|
onChange('');
|
|
156
156
|
}, [phone, onChange]);
|
|
157
157
|
var Flag = (countryPhoneSettings || {}).Flag;
|
|
158
|
-
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.wrapper, classesWrapper) }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.list }, { children: [(0, jsx_runtime_1.jsx)(PhoneView_1.default, __assign({
|
|
158
|
+
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.wrapper, classesWrapper) }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.list }, { children: [(0, jsx_runtime_1.jsx)(PhoneView_1.default, __assign({ phone: phone, Flag: Flag || WorldSvg_1.WorldSvg, code: (countryPhoneSettings === null || countryPhoneSettings === void 0 ? void 0 : countryPhoneSettings.code) || '+', handleSetValue: handleSetValue, toggleValue: toggleValue, isOpened: isOpened, mask: countryPhoneSettings === null || countryPhoneSettings === void 0 ? void 0 : countryPhoneSettings.mask, classes: styles.disabledBorder }, { children: children })), isOpened && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.items }, { children: Object.values(constants_1.PHONE_MASK).map(function (p) {
|
|
159
159
|
var CountryFlag = p.Flag;
|
|
160
|
-
return ((0, jsx_runtime_1.jsx)("div", __assign({ onClick: handleChooseSettings(p), className: styles.item }, { children: (0, jsx_runtime_1.jsx)(PhoneView_1.default, {
|
|
160
|
+
return ((0, jsx_runtime_1.jsx)("div", __assign({ onClick: handleChooseSettings(p), className: styles.item }, { children: (0, jsx_runtime_1.jsx)(PhoneView_1.default, { phone: { value: p.code, errorText: '' }, Flag: CountryFlag, code: p.code, handleSetValue: console.info, mask: p.mask, name: p.name, classes: styles.disabledBorder }) }), p.code));
|
|
161
161
|
}) })))] })), phone.errorText && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.error }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: phone.errorText }) }))), withConfirm && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isRequestedCode ? ((0, jsx_runtime_1.jsx)(Timer_1.default, { handleRequestCode: handleRequestCode })) : ((0, jsx_runtime_1.jsx)(BaseButton_1.BaseButton, { text: "getCodeBtn", disabled: !isValidPhone, color: "primary", handleClick: showTimer, size: "--button-full", centreText: true, buttonHeight: "--button-height-full", classes: buttonClasses })) }))] })));
|
|
162
162
|
};
|
|
163
163
|
exports.PhoneInput = PhoneInput;
|
|
@@ -43,7 +43,6 @@ var classnames_1 = __importDefault(require("classnames"));
|
|
|
43
43
|
var react_1 = require("react");
|
|
44
44
|
var CloseSvg_1 = require("../Icons/CloseSvg");
|
|
45
45
|
var CheckBoxSvg_1 = require("../Icons/CheckBoxSvg");
|
|
46
|
-
var LockSvg_1 = require("../Icons/LockSvg");
|
|
47
46
|
var ArrowButton_1 = require("../Buttons/ArrowButton");
|
|
48
47
|
var HOCOutsideClick_1 = require("components/HOCs/HOCOutsideClick");
|
|
49
48
|
var Text_1 = require("components/Text");
|
|
@@ -51,7 +50,7 @@ var useTranslate_1 = require("hooks/useTranslate");
|
|
|
51
50
|
var styles = __importStar(require("./Selector.module.css"));
|
|
52
51
|
var Selector = function (props) {
|
|
53
52
|
var _a, _b;
|
|
54
|
-
var _c = props.placeholder, placeholder = _c === void 0 ? '' : _c, data = props.data, classes = props.classes, activeId = props.activeId, isOpenUp = props.isOpenUp, size = props.size, handleClick = props.handleClick, isAll = props.isAll, classesItem = props.classesItem, _d = props.selectedMainItemClasses, selectedMainItemClasses = _d === void 0 ? '' : _d, isMulti = props.isMulti, modalType = props.modalType, activeIds = props.activeIds, _e = props.joinSymbol, joinSymbol = _e === void 0 ? ',' : _e, _f = props.selectorStyleType, selectorStyleType = _f === void 0 ? 'base' : _f, _g = props.type, type = _g === void 0 ? 'base' : _g, additionalModalProps = props.additionalModalProps, setModalType = props.setModalType, dropdownClasses = props.dropdownClasses;
|
|
53
|
+
var _c = props.placeholder, placeholder = _c === void 0 ? '' : _c, data = props.data, classes = props.classes, activeId = props.activeId, isOpenUp = props.isOpenUp, size = props.size, handleClick = props.handleClick, isAll = props.isAll, classesItem = props.classesItem, _d = props.selectedMainItemClasses, selectedMainItemClasses = _d === void 0 ? '' : _d, isMulti = props.isMulti, modalType = props.modalType, activeIds = props.activeIds, _e = props.joinSymbol, joinSymbol = _e === void 0 ? ',' : _e, _f = props.selectorStyleType, selectorStyleType = _f === void 0 ? 'base' : _f, _g = props.type, type = _g === void 0 ? 'base' : _g, additionalModalProps = props.additionalModalProps, setModalType = props.setModalType, dropdownClasses = props.dropdownClasses, arrowClasses = props.arrowClasses;
|
|
55
54
|
var _h = (0, react_1.useState)(false), isOpened = _h[0], setOpenState = _h[1];
|
|
56
55
|
var _j = (0, react_1.useState)(true), isHideContent = _j[0], setHideContentState = _j[1];
|
|
57
56
|
var timer = (0, react_1.useRef)(null);
|
|
@@ -116,13 +115,13 @@ var Selector = function (props) {
|
|
|
116
115
|
}; }, []);
|
|
117
116
|
var directionModifier = "dropDownDirection-".concat(isOpenUp ? 'up' : 'down');
|
|
118
117
|
var sizeModifier = "dropDownContentSize-".concat(size);
|
|
119
|
-
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.wrapperSelector, styles[sizeModifier], classes) }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.mainContainer, styles
|
|
118
|
+
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.wrapperSelector, styles[sizeModifier], classes) }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.mainContainer, styles[sizeModifier], classesItem, (_a = {},
|
|
120
119
|
_a[styles.opacity] = isOpened,
|
|
121
120
|
_a[selectedMainItemClasses] = activeId || (activeIds === null || activeIds === void 0 ? void 0 : activeIds.length),
|
|
122
|
-
_a
|
|
121
|
+
_a[styles.disabled] = isDisabled,
|
|
122
|
+
_a)), onClick: isDisabled && type === 'base' ? undefined : handleToggleState }, { children: [selectorStyleType === 'labelUp' && placeholder && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.placeholder }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: placeholder }) }))), (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.left }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.arrowBox }, { children: (0, jsx_runtime_1.jsx)(ArrowButton_1.ArrowButton, { isOpened: isOpened, classes: styles.arrowButton }) })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.column }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.label }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: placeholder }) })), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.overflow }, { children: getTitle() }))] }))] })), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.iconBlock }, { children: !isDisabled && !!activeId && !!isAll && ((0, jsx_runtime_1.jsx)(CloseSvg_1.CloseSvg, { handleClick: resetValue })) }))] })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.dropDownWrapper, styles[directionModifier], styles[sizeModifier], (_b = {},
|
|
123
123
|
_b[styles.animationSelectorGrowing] = isOpened,
|
|
124
124
|
_b[styles.animationSelectorReducing] = !isOpened,
|
|
125
|
-
_b[styles.bigBorder] = isOpened,
|
|
126
125
|
_b[styles.disabledBottom] = isOpenUp,
|
|
127
126
|
_b[styles.disabledTop] = !isOpenUp,
|
|
128
127
|
_b), dropdownClasses) }, { children: [!isHideContent && isAll && ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.item, classesItem), onClick: setAndClose(null) }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "reset" }) }))), !isHideContent && ((0, jsx_runtime_1.jsx)(HOCOutsideClick_1.HOCOutsideClick, __assign({ handleFunc: handleToggleState }, { children: data.map(function (i) {
|
|
@@ -103,6 +103,7 @@ var Tabs = function (props) {
|
|
|
103
103
|
_a[styles.buttonTab] = isButtonView,
|
|
104
104
|
_a[styles.buttonTabActive] = isButtonView && activeValue === d.value,
|
|
105
105
|
_a[activeTabClasses] = activeValue === d.value,
|
|
106
|
+
_a[styles.border] = !isButtonView,
|
|
106
107
|
_a)), onClick: handleChange(d.value) }, { children: [d.startIcon, (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: d.label })] }), d.value));
|
|
107
108
|
}), activeInx !== null && ((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(styles.activeBlockIndicator, (_b = {},
|
|
108
109
|
_b[styles.buttonActiveIndicator] = isButtonView,
|