react-gldn-kit 0.1.34 → 0.1.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/lib/components/Modals/Alert/components/Auth/SignUp/components/Forms/EmailSignUp/index.d.ts +3 -2
  3. package/dist/lib/components/Modals/Alert/components/Auth/SignUp/components/Forms/EmailSignUp/index.js +9 -9
  4. package/dist/lib/components/Modals/Alert/components/Auth/SignUp/components/Forms/OneClickKit/index.js +0 -3
  5. package/dist/lib/components/Modals/Alert/components/Auth/SignUp/components/Forms/PhoneSignUp/index.js +4 -4
  6. package/dist/lib/components/Modals/Alert/components/Auth/SignUp/index.js +2 -2
  7. package/dist/lib/components/SignUp/CountrySelector/index.js +5 -1
  8. package/dist/lib/components/SignUp/CountrySelector/types.d.ts +0 -2
  9. package/dist/lib/components/SignUp/PromoCode/constants.d.ts +2 -0
  10. package/dist/lib/components/SignUp/PromoCode/constants.js +6 -0
  11. package/dist/lib/components/SignUp/PromoCode/index.js +6 -5
  12. package/dist/lib/components/SignUp/PromoCode/types.d.ts +0 -1
  13. package/dist/lib/index.d.ts +1 -0
  14. package/dist/lib/index.js +4 -1
  15. package/package.json +1 -1
  16. package/dist/lib/components/Modals/Alert/components/Auth/SignUp/components/CountrySelector/index.d.ts +0 -7
  17. package/dist/lib/components/Modals/Alert/components/Auth/SignUp/components/CountrySelector/index.js +0 -54
  18. package/dist/lib/components/Modals/Alert/components/Auth/SignUp/components/CurrencySelector/index.d.ts +0 -7
  19. package/dist/lib/components/Modals/Alert/components/Auth/SignUp/components/CurrencySelector/index.js +0 -59
  20. package/dist/lib/components/Modals/Alert/components/Auth/SignUp/components/PromoCode/index.d.ts +0 -6
  21. package/dist/lib/components/Modals/Alert/components/Auth/SignUp/components/PromoCode/index.js +0 -65
@@ -1,9 +1,10 @@
1
1
  import { getRegistrationData } from 'zustandStore/forms/signUp/utils';
2
- import { CurrencyInfo } from 'react-memory-optimization/dist/lib/store/user/types';
2
+ import { CountryInfo, CurrencyInfo } from 'react-memory-optimization/dist/lib/store/user/types';
3
3
  type Props = {
4
4
  isSelected: boolean;
5
5
  handleRegistration: (k: string, data: ReturnType<typeof getRegistrationData>) => void;
6
6
  availableCurrencies: CurrencyInfo[];
7
+ countryInfo: CountryInfo | null;
7
8
  };
8
- export declare const EmailSignUp: ({ isSelected, handleRegistration, availableCurrencies, }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const EmailSignUp: (props: Props) => import("react/jsx-runtime").JSX.Element;
9
10
  export {};
@@ -42,8 +42,6 @@ var jsx_runtime_1 = require("react/jsx-runtime");
42
42
  var react_1 = require("react");
43
43
  var types_1 = require("react-memory-optimization/dist/lib/binary/types");
44
44
  var classnames_1 = __importDefault(require("classnames"));
45
- var CurrencySelector_1 = __importDefault(require("../../CurrencySelector"));
46
- var PromoCode_1 = __importDefault(require("../../PromoCode"));
47
45
  var DocsCheckBox_1 = __importDefault(require("../DocsCheckBox"));
48
46
  var styles = __importStar(require("../../../SignUp.module.css"));
49
47
  var stylesEmailSignUp = __importStar(require("./EmailSignUp.module.css"));
@@ -56,15 +54,17 @@ var validation_1 = require("service/validation");
56
54
  var BaseInput_1 = require("components/ui/Inputs/BaseInput");
57
55
  var BaseButton_1 = require("components/ui/Buttons/BaseButton");
58
56
  var utils_1 = require("zustandStore/forms/signUp/utils");
59
- var EmailSignUp = function (_a) {
60
- var _b = _a.isSelected, isSelected = _b === void 0 ? false : _b, handleRegistration = _a.handleRegistration, availableCurrencies = _a.availableCurrencies;
61
- var _c = (0, react_1.useState)(constant_1.DEFAULT_INPUT_VALUE), email = _c[0], setEmail = _c[1];
57
+ var PromoCode_1 = require("components/SignUp/PromoCode");
58
+ var CurrencySelector_1 = require("components/SignUp/CurrencySelector");
59
+ var EmailSignUp = function (props) {
60
+ var countryInfo = props.countryInfo, _a = props.isSelected, isSelected = _a === void 0 ? false : _a, handleRegistration = props.handleRegistration, availableCurrencies = props.availableCurrencies;
61
+ var _b = (0, react_1.useState)(constant_1.DEFAULT_INPUT_VALUE), email = _b[0], setEmail = _b[1];
62
62
  // const docs = useZustandWebConfiguration(getDocsSelector) || {};
63
- var _d = (0, react_1.useState)(constant_1.DEFAULT_INPUT_VALUE), password = _d[0], setPassword = _d[1];
63
+ var _c = (0, react_1.useState)(constant_1.DEFAULT_INPUT_VALUE), password = _c[0], setPassword = _c[1];
64
64
  var setRegisteredLogin = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.setRegisteredLoginAction);
65
65
  var activeCurrencyId = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.getActiveCurrencyIdSelector);
66
66
  var activeLang = (0, store_2.useZustandLanguagesKitStore)(selectors_2.languageSelectors.getActiveLanguageNameKitSelector);
67
- var _e = (0, react_1.useState)(isSelected), terms = _e[0], setTermsState = _e[1];
67
+ var _d = (0, react_1.useState)(isSelected), terms = _d[0], setTermsState = _d[1];
68
68
  var isDisabledSubmitButton = (0, react_1.useMemo)(function () {
69
69
  return Boolean(!activeCurrencyId ||
70
70
  !email.value ||
@@ -73,7 +73,7 @@ var EmailSignUp = function (_a) {
73
73
  password.errorText ||
74
74
  !terms);
75
75
  }, [activeCurrencyId, email, password, terms]);
76
- var _f = (0, react_1.useState)(''), promoCode = _f[0], setPromoCode = _f[1];
76
+ var _e = (0, react_1.useState)(''), promoCode = _e[0], setPromoCode = _e[1];
77
77
  var handleChange = function (t) { return function (value) {
78
78
  if (t === 'password') {
79
79
  var errorText = (0, validation_1.composeValidations)([
@@ -125,6 +125,6 @@ var EmailSignUp = function (_a) {
125
125
  // }
126
126
  // openExternalLink(link, true);
127
127
  };
128
- 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.default, { availableCurrencies: availableCurrencies }), (0, jsx_runtime_1.jsx)(PromoCode_1.default, { setPromoCode: setPromoCode }), (0, jsx_runtime_1.jsx)(DocsCheckBox_1.default, { terms: terms, handleOpenDoc: handleOpenDoc, handleToggleState: handleToggleState }), (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) })] })));
128
+ 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.default, { terms: terms, handleOpenDoc: handleOpenDoc, handleToggleState: handleToggleState }), (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) })] })));
129
129
  };
130
130
  exports.EmailSignUp = EmailSignUp;
@@ -13,7 +13,6 @@ var OneClickKit = function (props) {
13
13
  var activeCurrencyId = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.getActiveCurrencyIdSelector);
14
14
  var activeCountryId = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.getActiveCountryIdSelector);
15
15
  var activeLang = (0, store_2.useZustandLanguagesKitStore)(selectors_2.languageSelectors.getActiveLanguageNameKitSelector);
16
- // const docs = useZustandWebConfiguration(getDocsSelector) || {};
17
16
  var setActiveCountryId = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.setActiveCountryIdAction);
18
17
  var prepareRegistrationData = function (promoCode) {
19
18
  if (!activeCurrencyId || !activeCountryId) {
@@ -32,8 +31,6 @@ var OneClickKit = function (props) {
32
31
  availableCurrencies: availableCurrencies,
33
32
  countryInfo: countryInfo,
34
33
  }, countryProps: {
35
- activeCountryId: activeCountryId,
36
- setActiveCountryId: setActiveCountryId,
37
34
  countryInfo: countryInfo,
38
35
  }, isLoading: false }));
39
36
  };
@@ -40,15 +40,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
40
40
  exports.PhoneSignUp = void 0;
41
41
  var jsx_runtime_1 = require("react/jsx-runtime");
42
42
  var react_1 = require("react");
43
- var CountrySelector_1 = __importDefault(require("../../CountrySelector"));
44
- var CurrencySelector_1 = __importDefault(require("../../CurrencySelector"));
45
43
  var constant_1 = require("components/ui/Inputs/BaseInput/constant");
46
44
  var store_1 = require("zustandStore/languages/store");
47
45
  var selectors_1 = require("zustandStore/languages/selectors");
48
46
  var BaseInput_1 = require("components/ui/Inputs/BaseInput");
49
47
  var BaseButton_1 = require("components/ui/Buttons/BaseButton");
50
48
  var PhoneInput_1 = require("components/ui/Inputs/PhoneInput");
51
- var PromoCode_1 = __importDefault(require("../../PromoCode"));
52
49
  var DocsCheckBox_1 = __importDefault(require("../DocsCheckBox"));
53
50
  var constants_1 = require("./constants");
54
51
  var store_2 = require("zustandStore/forms/signUp/store");
@@ -58,6 +55,9 @@ var shared_1 = require("utils/shared");
58
55
  var styles = __importStar(require("../../../SignUp.module.css"));
59
56
  var types_1 = require("react-memory-optimization/dist/lib/binary/types");
60
57
  var utils_1 = require("zustandStore/forms/signUp/utils");
58
+ var PromoCode_1 = require("components/SignUp/PromoCode");
59
+ var CountrySelector_1 = require("components/SignUp/CountrySelector");
60
+ var CurrencySelector_1 = require("components/SignUp/CurrencySelector");
61
61
  var PhoneSignUp = function (props) {
62
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;
63
63
  var setRegisteredLogin = (0, store_2.useZustandRegistrationKitStore)(selectors_2.zustandRegistrationKitSelector.setRegisteredLoginAction);
@@ -144,6 +144,6 @@ var PhoneSignUp = function (props) {
144
144
  var PHONE_PROPS = withoutCode
145
145
  ? constants_1.PHONE_PROPS_WITHOUT_CONFIRMATION
146
146
  : constants_1.PHONE_PROPS_WITH_CONFIRMATION;
147
- 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)(CountrySelector_1.default, { countryInfo: countryInfo }), (0, jsx_runtime_1.jsx)(CurrencySelector_1.default, { availableCurrencies: availableCurrencies }), (0, jsx_runtime_1.jsx)(DocsCheckBox_1.default, { terms: terms, handleOpenDoc: handleOpenDoc, handleToggleState: handleToggleState }), (0, jsx_runtime_1.jsx)(PromoCode_1.default, { setPromoCode: setPromoCode }), (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: styles.marginB })] }));
147
+ 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)(CountrySelector_1.CountrySelector, { countryInfo: countryInfo, classes: styles.marginB }), (0, jsx_runtime_1.jsx)(CurrencySelector_1.CurrencySelector, { availableCurrencies: availableCurrencies, countryInfo: countryInfo, classes: styles.marginB }), (0, jsx_runtime_1.jsx)(DocsCheckBox_1.default, { terms: terms, handleOpenDoc: handleOpenDoc, handleToggleState: handleToggleState }), (0, jsx_runtime_1.jsx)(PromoCode_1.RegistrationPromoCode, { setPromoCode: setPromoCode, classes: styles.marginB }), (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: styles.marginB })] }));
148
148
  };
149
149
  exports.PhoneSignUp = PhoneSignUp;
@@ -68,7 +68,7 @@ var SignUp = function (props) {
68
68
  var setActiveForm = (0, store_2.useZustandRegistrationKitStore)(selectors_2.zustandRegistrationKitSelector.setActiveRegistrationFormAction);
69
69
  var setModal = (0, store_1.useZustandModalKitStore)(selectors_1.zustandModalKitSelector.closeAndOpenModalAction);
70
70
  var data = (0, store_1.useZustandModalKitStore)(selectors_1.zustandModalKitSelector.getModalAdditionalInfoSelector) || { sendCommand: console.info };
71
- var _a = data.bonusSignUp, bonusSignUp = _a === void 0 ? false : _a, _b = data.bonusText, bonusText = _b === void 0 ? '' : _b;
71
+ var _a = data.bonusSignUp, bonusSignUp = _a === void 0 ? false : _a, _b = data.bonusText, bonusText = _b === void 0 ? '' : _b, _c = data.bonusSubText, bonusSubText = _c === void 0 ? '' : _c;
72
72
  var openSignIn = function () {
73
73
  setModal(types_1.EModalTypes.SignIn);
74
74
  };
@@ -80,6 +80,6 @@ var SignUp = function (props) {
80
80
  setActiveForm(tabs[0].value);
81
81
  }
82
82
  }, [activeForm, tabs]);
83
- 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 && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.bonusText }, { children: [(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: "wheelTwo.secondPopUp.subTitle" }) })), (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: bonusText ? bonusText : '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, handleRegistration: handleRegistration, availableCurrencies: availableCurrencies || [] })), activeForm === types_2.ERegistrationForm.Phone && ((0, jsx_runtime_1.jsx)(PhoneSignUp_1.PhoneSignUp, { isSelected: true, requestCode: handleRegistration, handleRegistration: handleRegistration, countryInfo: countryInfo, availableCurrencies: availableCurrencies || [] })), activeForm === types_2.ERegistrationForm.PhoneWithoutCode && ((0, jsx_runtime_1.jsx)(PhoneSignUp_1.PhoneSignUp, { withoutCode: true, isSelected: true, requestCode: handleRegistration, handleRegistration: handleRegistration, countryInfo: countryInfo, availableCurrencies: availableCurrencies || [] })), activeForm === types_2.ERegistrationForm.OneClick && ((0, jsx_runtime_1.jsx)(OneClickKit_1.default, { isSelected: true, handleRegistration: handleRegistration, countryInfo: countryInfo, availableCurrencies: availableCurrencies || [] }))] }))] })), (0, jsx_runtime_1.jsx)(Buttons_1.BaseButton, { size: "--button-full", color: "dark", buttonHeight: "--button-height-full", text: "header.login", classes: styles.authButton, handleClick: openSignIn, centreText: true })] })) })));
83
+ 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 && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.bonusText }, { children: [(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: bonusSubText ? bonusSubText : 'wheelTwo.secondPopUp.subTitle' }) })), (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: bonusText ? bonusText : '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: handleRegistration, availableCurrencies: availableCurrencies || [] })), activeForm === types_2.ERegistrationForm.Phone && ((0, jsx_runtime_1.jsx)(PhoneSignUp_1.PhoneSignUp, { isSelected: true, requestCode: handleRegistration, handleRegistration: handleRegistration, countryInfo: countryInfo, availableCurrencies: availableCurrencies || [] })), activeForm === types_2.ERegistrationForm.PhoneWithoutCode && ((0, jsx_runtime_1.jsx)(PhoneSignUp_1.PhoneSignUp, { withoutCode: true, isSelected: true, requestCode: handleRegistration, handleRegistration: handleRegistration, countryInfo: countryInfo, availableCurrencies: availableCurrencies || [] })), activeForm === types_2.ERegistrationForm.OneClick && ((0, jsx_runtime_1.jsx)(OneClickKit_1.default, { isSelected: true, handleRegistration: handleRegistration, countryInfo: countryInfo, availableCurrencies: availableCurrencies || [] }))] }))] })), (0, jsx_runtime_1.jsx)(Buttons_1.BaseButton, { size: "--button-full", color: "dark", buttonHeight: "--button-height-full", text: "header.login", classes: styles.authButton, handleClick: openSignIn, centreText: true })] })) })));
84
84
  };
85
85
  exports.SignUp = SignUp;
@@ -5,8 +5,12 @@ var jsx_runtime_1 = require("react/jsx-runtime");
5
5
  var react_1 = require("react");
6
6
  var Selector_1 = require("components/ui/Selector");
7
7
  var mock_1 = require("constants/mock");
8
+ var store_1 = require("zustandStore/forms/signUp/store");
9
+ var selectors_1 = require("zustandStore/forms/signUp/selectors");
8
10
  var CountrySelector = function (props) {
9
- var classes = props.classes, activeCountryId = props.activeCountryId, countryInfo = props.countryInfo, setActiveCountryId = props.setActiveCountryId, _a = props.translateKey, translateKey = _a === void 0 ? 'registrations.selectors.country' : _a;
11
+ var classes = props.classes, countryInfo = props.countryInfo, _a = props.translateKey, translateKey = _a === void 0 ? 'registrations.selectors.country' : _a;
12
+ var activeCountryId = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.getActiveCountryIdSelector);
13
+ var setActiveCountryId = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.setActiveCountryIdAction);
10
14
  (0, react_1.useEffect)(function () {
11
15
  if (activeCountryId || !countryInfo) {
12
16
  return;
@@ -1,7 +1,5 @@
1
1
  export type CountrySelectorProps = {
2
2
  classes?: string;
3
- activeCountryId: number | null;
4
- setActiveCountryId: (c: number | null) => void;
5
3
  translateKey?: string;
6
4
  countryInfo: {
7
5
  countryId: number;
@@ -0,0 +1,2 @@
1
+ export declare const REFERRAL_KEY = "referral_code";
2
+ export declare const REFERRAL_CODE: string;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.REFERRAL_CODE = exports.REFERRAL_KEY = void 0;
4
+ var shared_1 = require("utils/shared");
5
+ exports.REFERRAL_KEY = 'referral_code';
6
+ exports.REFERRAL_CODE = (0, shared_1.getValueByIdFromUrl)(exports.REFERRAL_KEY, window.location.href);
@@ -41,8 +41,9 @@ var BaseInput_1 = require("components/ui/Inputs/BaseInput");
41
41
  var LotterySvg_1 = require("components/ui/Icons/Base/LotterySvg");
42
42
  var Text_1 = require("components/Text");
43
43
  var styles = __importStar(require("./PromoCode.module.css"));
44
+ var constants_1 = require("./constants");
44
45
  var RegistrationPromoCode = function (props) {
45
- var setPromoCode = props.setPromoCode, referralCode = props.referralCode, classes = props.classes, _a = props.translatesKeys, translatesKeys = _a === void 0 ? [
46
+ var setPromoCode = props.setPromoCode, classes = props.classes, _a = props.translatesKeys, translatesKeys = _a === void 0 ? [
46
47
  'registrations.promoCode.openPromoCodeTitle',
47
48
  'registrations.promoCode.placeholder',
48
49
  ] : _a;
@@ -51,13 +52,13 @@ var RegistrationPromoCode = function (props) {
51
52
  setPromoCodeState(!isShownPromoCode);
52
53
  };
53
54
  (0, react_1.useEffect)(function () {
54
- if (!referralCode) {
55
+ if (!constants_1.REFERRAL_CODE) {
55
56
  return;
56
57
  }
57
- setPromoCode("ref_code::".concat(referralCode));
58
+ setPromoCode("ref_code::".concat(constants_1.REFERRAL_CODE));
58
59
  }, []);
59
- if (referralCode) {
60
- return null;
60
+ if (constants_1.REFERRAL_CODE) {
61
+ return (0, jsx_runtime_1.jsx)("div", __assign({ className: classes }, { children: " " }));
61
62
  }
62
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 })) })));
63
64
  };
@@ -1,6 +1,5 @@
1
1
  export type RegistrationPromoCodeProps = {
2
2
  setPromoCode: (v: string) => void;
3
- referralCode?: string;
4
3
  classes?: string;
5
4
  translatesKeys?: [string, string];
6
5
  };
@@ -233,5 +233,6 @@ import { getAuthorizationData, getRegistrationData } from 'zustandStore/forms/si
233
233
  export { Logo, BaseButton, CloseButton, DrawerButton, AppSwitcher, CasinoCategoryButton, CasinoSubCategoriesButton, ProviderNameButton, DepositButton, ShowAllCard, BaseInput, BaseInputUi, PhoneInput, CheckBox, EmailInput, PasswordInput, JivoChatButton, JivoChatButtonProps, PaymentsMethods, PaymentMethodProps, EActiveMethodTab, DepositSkelet, DepositSkeletProps, DepositQrFormProps, PopUpHeader, Footer, Tabs, MainLoader, CircularLoader, HOCImageLoader, HOCOutsideClick, HOCErrorBoundary, HOCRequestLoader, useHookFabric, useElementResize, useOnClickOutside, useCountDown, useTranslate, useInView, JackpotWidget, JackPotInfoBox, Wheel, Scratch, TournamentCard, ReferralTable, ReferralTableProps, Pagination, ModalLayout, Alerts, BonusCardLayout, DrawerLayout, LandingLayoutTemplate, PortalLayout, CountDown, LastBigWinners, Banners, BannerTemplate, PromotionMobileApp, OneClick, DocsCheckBox, CurrencySelector, CountrySelector, RegistrationPromoCode, SignUp, EmailSignUp, PhoneSignUp, Selector, LanguageSelector, SignIn, ArrowSvg, DownloadSvg, LockSvg, CloseSvg, JabiInHouseSvg, ProviderSvg, HotSvg, WagerSvg, ElonHouseSvg, FSWinHouseSvg, ElonTreasureSvg, FSWinTreasureSvg, JabibetTreasureSvg, PlaySvg, InfoSvg, InstagramSvg, TelegramSvg, FacebookSvg, AvatarSvg, ProfileSvg, BonusGiftSvg, BurgerSvg, CalendarSvg, CashSvg, CloseEyeSvg, OpenEyeSvg, CoinSvg, CoinsSvg, CopySvg, DocSvg, FavoritesSvg, GoogleSvg, GrowSvg, DrawerTogglerSvg, LotterySvg, InfoLotterySvg, PlusSvg, SearchSvg, ProvidersBlocksSvg, SelectedSvg, ShareSvg, StarSvg, SupportSvg, ThreeDotsSvg, TrashSvg, WalletSvg, FirstBonusSvg, SecondBonusSvg, ThirdBonusSvg, VipClubSvg, BronzeSvg, SilverSvg, DiamondSvg, GoldSvg, GreenSvg, PlatinumSvg, PlatinumOneSvg, AzeSvg, BnSvg, BsSvg, ChSvg, DeSvg, EnSvg, EsSvg, FrSvg, HiSvg, ItSvg, KoSvg, KzSvg, NoSvg, PtSvg, RoSvg, RuSvg, TrSvg, UkrSvg, UzSvg, TournamentWagerSvg, ProvidersSvg, DefaultImgSvg, CasinoCoinSvg, RecommendedSvg, DepositSvg, ErrorSvg, SuccessSvg, WaitingSvg, WithdrawSvg, AmericanFootballSvg, AussieRulesSvg, BadmintonSvg, BaseballSvg, BasketballSvg, Basketball3x3Svg, BeachSoccerSvg, BoxingSvg, ChessSvg, CricketSvg, DartsSvg, EFifaSvg, ENbaSvg, ENhlSvg, EsportSvg, FieldHockeySvg, FutsalSvg, IceHockeySvg, KabaddiSvg, MmaSvg, RugbySvg, SnookerSvg, SoccerSvg, SquashSvg, TableTennisSvg, TennisSvg, VolleyballSvg, NotFoundBonusesSvg, NotificationWarningSvg, NotificationErrorSvg, NotificationSuccessSvg, Notifications, NavTournamentSvg, NavReferralSvg, NavMyBetsSvg, NavCasinoSvg, NavBonusesSvg, NavBettingLiveSvg, NavBettingSvg, BattlesCard, Step, Section, BattleBanner, Leaderboard, Accordion, useZustandLanguagesKitStore, languageSelectors, Text, useZustandNotificationKitStore, notificationKitSelectors, useZustandModalKitStore, zustandModalKitSelector, useZustandDeviceKitStore, zustandDeviceKitSelector, useZustandRegistrationKitStore, zustandRegistrationKitSelector, useZustandSignInKitStore, zustandSignInKitSelectors, useZustandRequestKitStore, requestSelectors, useZustandCasinoGamesKitStore, gamesSelectors, useZustandConnectionKitStore, connectionSelectors, useZustandWheelPromoKitStore, wheelPromoSelectors, EDirection, getCasinoCategoryIcon, sleep, getAuthorizationData, getRegistrationData, copyToClipboard, };
234
234
  export { Size, Color, EAppType } from 'types/ui';
235
235
  export { COUNTRY_MOCK } from 'constants/mock';
236
+ export { REFERRAL_KEY, REFERRAL_CODE, } from 'components/SignUp/PromoCode/constants';
236
237
  import './styles/global.module.css';
237
238
  import 'react-phone-number-input/style.css';
package/dist/lib/index.js CHANGED
@@ -7,7 +7,7 @@ exports.Pagination = exports.ReferralTable = exports.TournamentCard = exports.Sc
7
7
  exports.CoinsSvg = exports.CoinSvg = exports.OpenEyeSvg = exports.CloseEyeSvg = exports.CashSvg = exports.CalendarSvg = exports.BurgerSvg = exports.BonusGiftSvg = exports.ProfileSvg = exports.AvatarSvg = exports.FacebookSvg = exports.TelegramSvg = exports.InstagramSvg = exports.InfoSvg = exports.PlaySvg = exports.JabibetTreasureSvg = exports.FSWinTreasureSvg = exports.ElonTreasureSvg = exports.FSWinHouseSvg = exports.ElonHouseSvg = exports.WagerSvg = exports.HotSvg = exports.ProviderSvg = exports.JabiInHouseSvg = exports.CloseSvg = exports.LockSvg = exports.DownloadSvg = exports.ArrowSvg = exports.SignIn = exports.LanguageSelector = exports.Selector = exports.PhoneSignUp = exports.EmailSignUp = exports.SignUp = exports.RegistrationPromoCode = exports.CountrySelector = exports.CurrencySelector = exports.DocsCheckBox = exports.OneClick = exports.PromotionMobileApp = exports.BannerTemplate = exports.Banners = exports.LastBigWinners = exports.CountDown = exports.PortalLayout = exports.LandingLayoutTemplate = exports.DrawerLayout = exports.BonusCardLayout = exports.Alerts = exports.ModalLayout = void 0;
8
8
  exports.ProvidersSvg = exports.TournamentWagerSvg = exports.UzSvg = exports.UkrSvg = exports.TrSvg = exports.RuSvg = exports.RoSvg = exports.PtSvg = exports.NoSvg = exports.KzSvg = exports.KoSvg = exports.ItSvg = exports.HiSvg = exports.FrSvg = exports.EsSvg = exports.EnSvg = exports.DeSvg = exports.ChSvg = exports.BsSvg = exports.BnSvg = exports.AzeSvg = exports.PlatinumOneSvg = exports.PlatinumSvg = exports.GreenSvg = exports.GoldSvg = exports.DiamondSvg = exports.SilverSvg = exports.BronzeSvg = exports.VipClubSvg = exports.ThirdBonusSvg = exports.SecondBonusSvg = exports.FirstBonusSvg = exports.WalletSvg = exports.TrashSvg = exports.ThreeDotsSvg = exports.SupportSvg = exports.StarSvg = exports.ShareSvg = exports.SelectedSvg = exports.ProvidersBlocksSvg = exports.SearchSvg = exports.PlusSvg = exports.InfoLotterySvg = exports.LotterySvg = exports.DrawerTogglerSvg = exports.GrowSvg = exports.GoogleSvg = exports.FavoritesSvg = exports.DocSvg = exports.CopySvg = void 0;
9
9
  exports.Section = exports.Step = exports.BattlesCard = exports.NavBettingSvg = exports.NavBettingLiveSvg = exports.NavBonusesSvg = exports.NavCasinoSvg = exports.NavMyBetsSvg = exports.NavReferralSvg = exports.NavTournamentSvg = exports.Notifications = exports.NotificationSuccessSvg = exports.NotificationErrorSvg = exports.NotificationWarningSvg = exports.NotFoundBonusesSvg = exports.VolleyballSvg = exports.TennisSvg = exports.TableTennisSvg = exports.SquashSvg = exports.SoccerSvg = exports.SnookerSvg = exports.RugbySvg = exports.MmaSvg = exports.KabaddiSvg = exports.IceHockeySvg = exports.FutsalSvg = exports.FieldHockeySvg = exports.EsportSvg = exports.ENhlSvg = exports.ENbaSvg = exports.EFifaSvg = exports.DartsSvg = exports.CricketSvg = exports.ChessSvg = exports.BoxingSvg = exports.BeachSoccerSvg = exports.Basketball3x3Svg = exports.BasketballSvg = exports.BaseballSvg = exports.BadmintonSvg = exports.AussieRulesSvg = exports.AmericanFootballSvg = exports.WithdrawSvg = exports.WaitingSvg = exports.SuccessSvg = exports.ErrorSvg = exports.DepositSvg = exports.RecommendedSvg = exports.CasinoCoinSvg = exports.DefaultImgSvg = void 0;
10
- exports.COUNTRY_MOCK = exports.EAppType = exports.copyToClipboard = exports.getRegistrationData = exports.getAuthorizationData = exports.sleep = exports.getCasinoCategoryIcon = exports.EDirection = exports.wheelPromoSelectors = exports.useZustandWheelPromoKitStore = exports.connectionSelectors = exports.useZustandConnectionKitStore = exports.gamesSelectors = exports.useZustandCasinoGamesKitStore = exports.requestSelectors = exports.useZustandRequestKitStore = exports.zustandSignInKitSelectors = exports.useZustandSignInKitStore = exports.zustandRegistrationKitSelector = exports.useZustandRegistrationKitStore = exports.zustandDeviceKitSelector = exports.useZustandDeviceKitStore = exports.zustandModalKitSelector = exports.useZustandModalKitStore = exports.notificationKitSelectors = exports.useZustandNotificationKitStore = exports.Text = exports.languageSelectors = exports.useZustandLanguagesKitStore = exports.Accordion = exports.Leaderboard = exports.BattleBanner = void 0;
10
+ exports.REFERRAL_CODE = exports.REFERRAL_KEY = exports.COUNTRY_MOCK = exports.EAppType = exports.copyToClipboard = exports.getRegistrationData = exports.getAuthorizationData = exports.sleep = exports.getCasinoCategoryIcon = exports.EDirection = exports.wheelPromoSelectors = exports.useZustandWheelPromoKitStore = exports.connectionSelectors = exports.useZustandConnectionKitStore = exports.gamesSelectors = exports.useZustandCasinoGamesKitStore = exports.requestSelectors = exports.useZustandRequestKitStore = exports.zustandSignInKitSelectors = exports.useZustandSignInKitStore = exports.zustandRegistrationKitSelector = exports.useZustandRegistrationKitStore = exports.zustandDeviceKitSelector = exports.useZustandDeviceKitStore = exports.zustandModalKitSelector = exports.useZustandModalKitStore = exports.notificationKitSelectors = exports.useZustandNotificationKitStore = exports.Text = exports.languageSelectors = exports.useZustandLanguagesKitStore = exports.Accordion = exports.Leaderboard = exports.BattleBanner = void 0;
11
11
  // Buttons
12
12
  var Buttons_1 = require("components/ui/Buttons");
13
13
  Object.defineProperty(exports, "BaseButton", { enumerable: true, get: function () { return Buttons_1.BaseButton; } });
@@ -505,6 +505,9 @@ var ui_1 = require("types/ui");
505
505
  Object.defineProperty(exports, "EAppType", { enumerable: true, get: function () { return ui_1.EAppType; } });
506
506
  var mock_1 = require("constants/mock");
507
507
  Object.defineProperty(exports, "COUNTRY_MOCK", { enumerable: true, get: function () { return mock_1.COUNTRY_MOCK; } });
508
+ var constants_1 = require("components/SignUp/PromoCode/constants");
509
+ Object.defineProperty(exports, "REFERRAL_KEY", { enumerable: true, get: function () { return constants_1.REFERRAL_KEY; } });
510
+ Object.defineProperty(exports, "REFERRAL_CODE", { enumerable: true, get: function () { return constants_1.REFERRAL_CODE; } });
508
511
  // Icons
509
512
  require("./styles/global.module.css");
510
513
  require("react-phone-number-input/style.css");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-gldn-kit",
3
- "version": "0.1.34",
3
+ "version": "0.1.36",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "keywords": [],
@@ -1,7 +0,0 @@
1
- import { CountryInfo } from 'react-memory-optimization/dist/lib/store/user/types';
2
- type Props = {
3
- classes?: string;
4
- countryInfo: CountryInfo | null;
5
- };
6
- declare const CountrySelector: ({ classes, countryInfo }: Props) => import("react/jsx-runtime").JSX.Element;
7
- export default CountrySelector;
@@ -1,54 +0,0 @@
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
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- var jsx_runtime_1 = require("react/jsx-runtime");
30
- var react_1 = require("react");
31
- var classnames_1 = __importDefault(require("classnames"));
32
- var store_1 = require("zustandStore/forms/signUp/store");
33
- var selectors_1 = require("zustandStore/forms/signUp/selectors");
34
- var Selector_1 = require("components/ui/Selector");
35
- var styles = __importStar(require("../../SignUp.module.css"));
36
- var mock_1 = require("constants/mock");
37
- var CountrySelector = function (_a) {
38
- var classes = _a.classes, countryInfo = _a.countryInfo;
39
- var activeCountryId = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.getActiveCountryIdSelector);
40
- var setActiveCountryId = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.setActiveCountryIdAction);
41
- (0, react_1.useEffect)(function () {
42
- if (activeCountryId || !countryInfo) {
43
- return;
44
- }
45
- var isExist = mock_1.COUNTRY_MOCK.find(function (c) { return c.id === countryInfo.countryId; });
46
- if (isExist) {
47
- setActiveCountryId(countryInfo.countryId);
48
- return;
49
- }
50
- setActiveCountryId(mock_1.COUNTRY_MOCK[0].id);
51
- }, [activeCountryId, countryInfo]);
52
- return ((0, jsx_runtime_1.jsx)(Selector_1.Selector, { size: "full", classes: (0, classnames_1.default)(styles.marginB, classes), activeId: activeCountryId, handleClick: setActiveCountryId, placeholder: "registrations.selectors.country", data: mock_1.COUNTRY_MOCK }));
53
- };
54
- exports.default = CountrySelector;
@@ -1,7 +0,0 @@
1
- import { CurrencyInfo } from 'react-memory-optimization/dist/lib/store/user/types';
2
- type Props = {
3
- classes?: string;
4
- availableCurrencies: CurrencyInfo[];
5
- };
6
- declare const CurrencySelector: ({ classes, availableCurrencies }: Props) => import("react/jsx-runtime").JSX.Element;
7
- export default CurrencySelector;
@@ -1,59 +0,0 @@
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
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- var jsx_runtime_1 = require("react/jsx-runtime");
30
- var react_1 = require("react");
31
- var classnames_1 = __importDefault(require("classnames"));
32
- var store_1 = require("zustandStore/forms/signUp/store");
33
- var selectors_1 = require("zustandStore/forms/signUp/selectors");
34
- var Selector_1 = require("components/ui/Selector");
35
- var styles = __importStar(require("../../SignUp.module.css"));
36
- var CurrencySelector = function (_a) {
37
- var classes = _a.classes, availableCurrencies = _a.availableCurrencies;
38
- var activeCurrencyId = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.getActiveCurrencyIdSelector);
39
- var setActiveCurrencyId = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.setActiveCurrencyIdAction);
40
- var countryInfo = null;
41
- (0, react_1.useEffect)(function () {
42
- if (activeCurrencyId || !countryInfo) {
43
- return;
44
- }
45
- var isExist = availableCurrencies.find(function (c) {
46
- return countryInfo.currencyIds.includes(c.id);
47
- });
48
- if (isExist) {
49
- setActiveCurrencyId(countryInfo.currencyIds[0]);
50
- return;
51
- }
52
- if (!availableCurrencies[0]) {
53
- return;
54
- }
55
- setActiveCurrencyId(availableCurrencies[0].id);
56
- }, [availableCurrencies, activeCurrencyId, countryInfo]);
57
- return ((0, jsx_runtime_1.jsx)(Selector_1.Selector, { classes: (0, classnames_1.default)(styles.marginB, classes), size: "full", placeholder: "registrations.selectors.currency", handleClick: setActiveCurrencyId, activeId: activeCurrencyId, data: availableCurrencies }));
58
- };
59
- exports.default = CurrencySelector;
@@ -1,6 +0,0 @@
1
- type Props = {
2
- setPromoCode: (v: string) => void;
3
- initialReferralCode?: string;
4
- };
5
- declare const RegistrationPromoCode: ({ setPromoCode, initialReferralCode, }: Props) => import("react/jsx-runtime").JSX.Element;
6
- export default RegistrationPromoCode;
@@ -1,65 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- var desc = Object.getOwnPropertyDescriptor(m, k);
16
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
- desc = { enumerable: true, get: function() { return m[k]; } };
18
- }
19
- Object.defineProperty(o, k2, desc);
20
- }) : (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- o[k2] = m[k];
23
- }));
24
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
- Object.defineProperty(o, "default", { enumerable: true, value: v });
26
- }) : function(o, v) {
27
- o["default"] = v;
28
- });
29
- var __importStar = (this && this.__importStar) || function (mod) {
30
- if (mod && mod.__esModule) return mod;
31
- var result = {};
32
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
- __setModuleDefault(result, mod);
34
- return result;
35
- };
36
- Object.defineProperty(exports, "__esModule", { value: true });
37
- var jsx_runtime_1 = require("react/jsx-runtime");
38
- var react_1 = require("react");
39
- // import { Text, LotterySvg } from 'react-gldn-kit';
40
- // import ComponentKitBaseInput from 'components/ui/KitComponents/Inputs/ComponentKitBaseInput';
41
- // import { REFERRAL_CODE } from 'constants/ui';
42
- var styles = __importStar(require("../../SignUp.module.css"));
43
- var BaseInput_1 = require("components/ui/Inputs/BaseInput");
44
- var Text_1 = require("components/Text");
45
- var LotterySvg_1 = require("components/ui/Icons/Base/LotterySvg");
46
- var RegistrationPromoCode = function (_a) {
47
- var setPromoCode = _a.setPromoCode, initialReferralCode = _a.initialReferralCode;
48
- var _b = (0, react_1.useState)(false), isShownPromoCode = _b[0], setPromoCodeState = _b[1];
49
- var handleShowPromoCode = function (e) {
50
- e.preventDefault();
51
- e.stopPropagation();
52
- setPromoCodeState(!isShownPromoCode);
53
- };
54
- (0, react_1.useEffect)(function () {
55
- if (!initialReferralCode) {
56
- return;
57
- }
58
- setPromoCode("ref_code::".concat(initialReferralCode));
59
- }, [initialReferralCode]);
60
- if (initialReferralCode) {
61
- return null;
62
- }
63
- return ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.marginB }, { children: !isShownPromoCode ? ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.promoTitle, onClick: handleShowPromoCode }, { children: [(0, jsx_runtime_1.jsx)(LotterySvg_1.LotterySvg, { classes: styles.promocodeSvg }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "registrations.promoCode.openPromoCodeTitle" }) })] }))) : ((0, jsx_runtime_1.jsx)(BaseInput_1.BaseInput, { placeholder: "registrations.promoCode.placeholder", size: "full", isHidePlaceholder: true, onChange: setPromoCode, classes: styles.bigMargin })) })));
64
- };
65
- exports.default = RegistrationPromoCode;