react-gldn-kit 0.1.39 → 0.1.41

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.
@@ -47,8 +47,8 @@ var InfoSecondSvg_1 = require("components/ui/Icons/InfoSecondSvg");
47
47
  var styles = __importStar(require("./BonusCardLayout.module.css"));
48
48
  var BonusCardLayout = function (props) {
49
49
  var _a;
50
- var bonusImagePath = props.bonusImagePath, title = props.title, value = props.value, _b = props.endTimestamp, endTimestamp = _b === void 0 ? 0 : _b, description = props.description, buttonText = props.buttonText, handleClaim = props.handleClaim, counterProps = props.counterProps, categoryName = props.categoryName, currencyName = props.currencyName, _c = props.isAvailable, isAvailable = _c === void 0 ? true : _c, lockImagePath = props.lockImagePath, infoCallback = props.infoCallback;
51
- return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.wrapperBonusCardLayout }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.container }, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.info }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.row }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.categoryName }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: categoryName }) })), (0, jsx_runtime_1.jsx)(InfoSecondSvg_1.InfoSecondSvg, { classes: styles.infoSvg, handleClick: infoCallback })] })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.box }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.row }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.title }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: title }) })) })), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.description }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: description }) })), !!endTimestamp && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.timer }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.expiration }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "bonusCabinet.expiration" }) })), (0, jsx_runtime_1.jsx)(CountDown_1.CountDown, __assign({}, counterProps, { endTimestamp: endTimestamp, wrapperClasses: (0, classnames_1.default)(styles.maxWidth, styles.timerBg), type: "row", timeBlockClasses: styles.timeBlock }))] }))), value && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.row }, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.value }, { children: [currencyName, value] })) })))] }))] })) })), (0, jsx_runtime_1.jsx)(Buttons_1.BaseButton, { text: buttonText, handleClick: handleClaim, buttonHeight: "--button-height-full", size: "--button-full", color: "primary", disabled: !+value, centreText: true, classes: (0, classnames_1.default)(styles.btn, (_a = {},
50
+ var bonusImagePath = props.bonusImagePath, title = props.title, value = props.value, _b = props.endTimestamp, endTimestamp = _b === void 0 ? 0 : _b, description = props.description, buttonText = props.buttonText, handleClaim = props.handleClaim, counterProps = props.counterProps, categoryName = props.categoryName, currencyName = props.currencyName, _c = props.isAvailable, isAvailable = _c === void 0 ? true : _c, lockImagePath = props.lockImagePath, infoCallback = props.infoCallback, isWithInfo = props.isWithInfo;
51
+ return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.wrapperBonusCardLayout }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.container }, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.info }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.row }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.categoryName }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: categoryName }) })), isWithInfo && ((0, jsx_runtime_1.jsx)(InfoSecondSvg_1.InfoSecondSvg, { classes: styles.infoSvg, handleClick: infoCallback }))] })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.box }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.row }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.title }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: title }) })) })), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.description }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: description }) })), !!endTimestamp && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.timer }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.expiration }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "bonusCabinet.expiration" }) })), (0, jsx_runtime_1.jsx)(CountDown_1.CountDown, __assign({}, counterProps, { endTimestamp: endTimestamp, wrapperClasses: (0, classnames_1.default)(styles.maxWidth, styles.timerBg), type: "row", timeBlockClasses: styles.timeBlock }))] }))), value && isAvailable && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.row }, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.value }, { children: [currencyName, value] })) })))] }))] })) })), (0, jsx_runtime_1.jsx)(Buttons_1.BaseButton, { text: buttonText, handleClick: handleClaim, buttonHeight: "--button-height-full", size: "--button-full", color: "primary", disabled: !+value, centreText: true, classes: (0, classnames_1.default)(styles.btn, (_a = {},
52
52
  _a[styles.dark] = !+value,
53
53
  _a)) }), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.img }, { children: (0, jsx_runtime_1.jsx)("img", { src: bonusImagePath, className: styles.wrapperBonusCard }) })), !isAvailable && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.blockedContent }, { children: [(0, jsx_runtime_1.jsx)("img", { src: lockImagePath, className: styles.lock }), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.blockedText }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "bonusCabinet.availableFrom" }) }))] })))] })));
54
54
  };
@@ -13,4 +13,5 @@ export type BonusCardLayoutProps = {
13
13
  isAvailable?: boolean;
14
14
  lockImagePath: string;
15
15
  infoCallback?: () => void;
16
+ isWithInfo: boolean;
16
17
  };
@@ -1,5 +1,5 @@
1
- import { getRegistrationData } from 'zustandStore/forms/signUp/utils';
2
1
  import { CountryInfo, CurrencyInfo } from 'react-memory-optimization/dist/lib/store/user/types';
2
+ import { getRegistrationData } from 'zustandStore/forms/signUp/utils';
3
3
  type Props = {
4
4
  isSelected: boolean;
5
5
  handleRegistration: (k: string, data: ReturnType<typeof getRegistrationData>) => void;
@@ -43,19 +43,23 @@ 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
45
  var DocsCheckBox_1 = __importDefault(require("../DocsCheckBox"));
46
- var styles = __importStar(require("../../../SignUp.module.css"));
47
- var stylesEmailSignUp = __importStar(require("./EmailSignUp.module.css"));
46
+ var PromoCode_1 = require("components/SignUp/PromoCode");
47
+ var CurrencySelector_1 = require("components/SignUp/CurrencySelector");
48
+ var HOCRequestLoader_1 = require("components/HOCs/HOCRequestLoader");
49
+ var CircularLoader_1 = require("components/ui/Loaders/CircularLoader");
50
+ var BaseInput_1 = require("components/ui/Inputs/BaseInput");
51
+ var BaseButton_1 = require("components/ui/Buttons/BaseButton");
48
52
  var constant_1 = require("components/ui/Inputs/BaseInput/constant");
49
53
  var store_1 = require("zustandStore/forms/signUp/store");
50
54
  var selectors_1 = require("zustandStore/forms/signUp/selectors");
51
55
  var selectors_2 = require("zustandStore/languages/selectors");
52
56
  var store_2 = require("zustandStore/languages/store");
57
+ var store_3 = require("zustandStore/connection/store");
58
+ var selectors_3 = require("zustandStore/connection/selectors");
53
59
  var validation_1 = require("service/validation");
54
- var BaseInput_1 = require("components/ui/Inputs/BaseInput");
55
- var BaseButton_1 = require("components/ui/Buttons/BaseButton");
56
60
  var utils_1 = require("zustandStore/forms/signUp/utils");
57
- var PromoCode_1 = require("components/SignUp/PromoCode");
58
- var CurrencySelector_1 = require("components/SignUp/CurrencySelector");
61
+ var styles = __importStar(require("../../../SignUp.module.css"));
62
+ var stylesEmailSignUp = __importStar(require("./EmailSignUp.module.css"));
59
63
  var EmailSignUp = function (props) {
60
64
  var countryInfo = props.countryInfo, _a = props.isSelected, isSelected = _a === void 0 ? false : _a, handleRegistration = props.handleRegistration, availableCurrencies = props.availableCurrencies;
61
65
  var _b = (0, react_1.useState)(constant_1.DEFAULT_INPUT_VALUE), email = _b[0], setEmail = _b[1];
@@ -64,6 +68,7 @@ var EmailSignUp = function (props) {
64
68
  var setRegisteredLogin = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.setRegisteredLoginAction);
65
69
  var activeCurrencyId = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.getActiveCurrencyIdSelector);
66
70
  var activeLang = (0, store_2.useZustandLanguagesKitStore)(selectors_2.languageSelectors.getActiveLanguageNameKitSelector);
71
+ var isConnectedApp = (0, store_3.useZustandConnectionKitStore)(selectors_3.connectionSelectors.isAvailableTransportSelector);
67
72
  var _d = (0, react_1.useState)(isSelected), terms = _d[0], setTermsState = _d[1];
68
73
  var isDisabledSubmitButton = (0, react_1.useMemo)(function () {
69
74
  return Boolean(!activeCurrencyId ||
@@ -71,7 +76,8 @@ var EmailSignUp = function (props) {
71
76
  email.errorText ||
72
77
  !password.value ||
73
78
  password.errorText ||
74
- !terms);
79
+ !terms ||
80
+ !isConnectedApp);
75
81
  }, [activeCurrencyId, email, password, terms]);
76
82
  var _e = (0, react_1.useState)(''), promoCode = _e[0], setPromoCode = _e[1];
77
83
  var handleChange = function (t) { return function (value) {
@@ -125,6 +131,6 @@ var EmailSignUp = function (props) {
125
131
  // }
126
132
  // openExternalLink(link, true);
127
133
  };
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) })] })));
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.default, { 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) }) }))] })));
129
135
  };
130
136
  exports.EmailSignUp = EmailSignUp;
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var jsx_runtime_1 = require("react/jsx-runtime");
4
- var OneClick_1 = require("components/SignUp/OneClick");
5
4
  var types_1 = require("react-memory-optimization/dist/lib/binary/types");
5
+ var OneClick_1 = require("components/SignUp/OneClick");
6
6
  var selectors_1 = require("zustandStore/forms/signUp/selectors");
7
7
  var store_1 = require("zustandStore/forms/signUp/store");
8
- var utils_1 = require("zustandStore/forms/signUp/utils");
9
8
  var selectors_2 = require("zustandStore/languages/selectors");
10
9
  var store_2 = require("zustandStore/languages/store");
10
+ var utils_1 = require("zustandStore/forms/signUp/utils");
11
11
  var OneClickKit = function (props) {
12
12
  var isSelected = props.isSelected, availableCurrencies = props.availableCurrencies, handleRegistration = props.handleRegistration, countryInfo = props.countryInfo;
13
13
  var activeCurrencyId = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.getActiveCurrencyIdSelector);
@@ -32,6 +32,6 @@ var OneClickKit = function (props) {
32
32
  countryInfo: countryInfo,
33
33
  }, countryProps: {
34
34
  countryInfo: countryInfo,
35
- }, isLoading: false }));
35
+ } }));
36
36
  };
37
37
  exports.default = OneClickKit;
@@ -40,29 +40,32 @@ 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 constant_1 = require("components/ui/Inputs/BaseInput/constant");
44
- var store_1 = require("zustandStore/languages/store");
45
- var selectors_1 = require("zustandStore/languages/selectors");
43
+ var types_1 = require("react-memory-optimization/dist/lib/binary/types");
46
44
  var BaseInput_1 = require("components/ui/Inputs/BaseInput");
47
45
  var BaseButton_1 = require("components/ui/Buttons/BaseButton");
48
46
  var PhoneInput_1 = require("components/ui/Inputs/PhoneInput");
49
47
  var DocsCheckBox_1 = __importDefault(require("../DocsCheckBox"));
48
+ var HOCRequestLoader_1 = require("components/HOCs/HOCRequestLoader");
49
+ var CircularLoader_1 = require("components/ui/Loaders/CircularLoader");
50
+ var PromoCode_1 = require("components/SignUp/PromoCode");
51
+ var CountrySelector_1 = require("components/SignUp/CountrySelector");
52
+ var CurrencySelector_1 = require("components/SignUp/CurrencySelector");
53
+ var constant_1 = require("components/ui/Inputs/BaseInput/constant");
50
54
  var constants_1 = require("./constants");
55
+ var store_1 = require("zustandStore/languages/store");
56
+ var selectors_1 = require("zustandStore/languages/selectors");
51
57
  var store_2 = require("zustandStore/forms/signUp/store");
52
58
  var selectors_2 = require("zustandStore/forms/signUp/selectors");
53
- var useTranslate_1 = require("hooks/useTranslate");
59
+ var store_3 = require("zustandStore/connection/store");
60
+ var selectors_3 = require("zustandStore/connection/selectors");
54
61
  var shared_1 = require("utils/shared");
55
- var styles = __importStar(require("../../../SignUp.module.css"));
56
- var types_1 = require("react-memory-optimization/dist/lib/binary/types");
57
62
  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");
63
+ var styles = __importStar(require("../../../SignUp.module.css"));
61
64
  var PhoneSignUp = function (props) {
62
65
  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
66
  var setRegisteredLogin = (0, store_2.useZustandRegistrationKitStore)(selectors_2.zustandRegistrationKitSelector.setRegisteredLoginAction);
64
67
  // const { sendCommand } = useTransportControllers();
65
- var getText = (0, useTranslate_1.useTranslate)('', '').getText;
68
+ var isConnectedApp = (0, store_3.useZustandConnectionKitStore)(selectors_3.connectionSelectors.isAvailableTransportSelector);
66
69
  var _c = (0, react_1.useState)(''), phone = _c[0], setPhone = _c[1];
67
70
  var _d = (0, react_1.useState)(withoutCode
68
71
  ? {
@@ -89,7 +92,8 @@ var PhoneSignUp = function (props) {
89
92
  !isRequestedCode ||
90
93
  !activeCountryId ||
91
94
  !activeCurrencyId ||
92
- !terms);
95
+ !terms ||
96
+ !isConnectedApp);
93
97
  }, [
94
98
  isPhoneError,
95
99
  password,
@@ -98,6 +102,7 @@ var PhoneSignUp = function (props) {
98
102
  activeCountryId,
99
103
  activeCurrencyId,
100
104
  terms,
105
+ isConnectedApp,
101
106
  ]);
102
107
  var handleIsRequested = function () {
103
108
  setRequestedCodeState(true);
@@ -144,6 +149,6 @@ var PhoneSignUp = function (props) {
144
149
  var PHONE_PROPS = withoutCode
145
150
  ? constants_1.PHONE_PROPS_WITHOUT_CONFIRMATION
146
151
  : 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.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 })] }));
152
+ 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)(HOCRequestLoader_1.HOCRequestLoader, __assign({ command: "08x", requestId: types_1.ERequestIds.Registration, customLoader: (0, jsx_runtime_1.jsx)(CircularLoader_1.CircularLoader, {}) }, { children: (0, jsx_runtime_1.jsx)(BaseButton_1.BaseButton, { text: 'registrations.submitBtn', disabled: isDisabledSubmitButton, color: "primary", handleClick: handleSubmitForm, size: "--button-full", centreText: true, buttonHeight: "--button-height-full", classes: styles.marginB }) }))] }));
148
153
  };
149
154
  exports.PhoneSignUp = PhoneSignUp;
@@ -1,5 +1,5 @@
1
- import { CurrencySelectorProps } from '../CurrencySelector/types';
2
1
  import { CountrySelectorProps } from '../CountrySelector/types';
2
+ import { CurrencySelectorProps } from '../CurrencySelector/types';
3
3
  type OneClickProps = {
4
4
  isSelected: boolean;
5
5
  activeCountryId: number | null;
@@ -11,7 +11,6 @@ type OneClickProps = {
11
11
  };
12
12
  };
13
13
  handleSubmit: (promoCode: string) => void;
14
- isLoading?: boolean;
15
14
  currencyProps: CurrencySelectorProps;
16
15
  countryProps: CountrySelectorProps;
17
16
  translates?: {
@@ -41,22 +41,30 @@ exports.OneClick = void 0;
41
41
  var jsx_runtime_1 = require("react/jsx-runtime");
42
42
  var react_1 = require("react");
43
43
  var classnames_1 = __importDefault(require("classnames"));
44
+ var types_1 = require("react-memory-optimization/dist/lib/binary/types");
44
45
  var CurrencySelector_1 = require("../CurrencySelector");
46
+ var HOCRequestLoader_1 = require("components/HOCs/HOCRequestLoader");
47
+ var CircularLoader_1 = require("components/ui/Loaders/CircularLoader");
45
48
  var CountrySelector_1 = require("../CountrySelector");
46
49
  var DocsCheckBox_1 = require("../DocsCheckBox");
47
50
  var PromoCode_1 = require("../PromoCode");
48
51
  var Buttons_1 = require("components/ui/Buttons");
49
- var Text_1 = require("components/Text");
50
- var styles = __importStar(require("./OneClick.module.css"));
51
52
  var constants_1 = require("./constants");
52
- var shared_1 = require("utils/shared");
53
53
  var store_1 = require("zustandStore/forms/signUp/store");
54
54
  var selectors_1 = require("zustandStore/forms/signUp/selectors");
55
+ var store_2 = require("zustandStore/connection/store");
56
+ var selectors_2 = require("zustandStore/connection/selectors");
57
+ var shared_1 = require("utils/shared");
58
+ var styles = __importStar(require("./OneClick.module.css"));
55
59
  var OneClick = function (props) {
56
- var isSelected = props.isSelected, activeCountryId = props.activeCountryId, handleSubmit = props.handleSubmit, activeLang = props.activeLang, docs = props.docs, currencyProps = props.currencyProps, countryProps = props.countryProps, _a = props.isLoading, isLoading = _a === void 0 ? false : _a, _b = props.translates, translates = _b === void 0 ? constants_1.BASE_TRANSLATE_KEYS : _b;
57
- var _c = (0, react_1.useState)(isSelected), terms = _c[0], setTermsState = _c[1];
58
- var _d = (0, react_1.useState)(''), promoCode = _d[0], setPromoCode = _d[1];
60
+ var isSelected = props.isSelected, activeCountryId = props.activeCountryId, handleSubmit = props.handleSubmit, activeLang = props.activeLang, docs = props.docs, currencyProps = props.currencyProps, countryProps = props.countryProps, _a = props.translates, translates = _a === void 0 ? constants_1.BASE_TRANSLATE_KEYS : _a;
61
+ var _b = (0, react_1.useState)(isSelected), terms = _b[0], setTermsState = _b[1];
62
+ var _c = (0, react_1.useState)(''), promoCode = _c[0], setPromoCode = _c[1];
59
63
  var activeCurrencyId = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.getActiveCurrencyIdSelector);
64
+ var isConnectedApp = (0, store_2.useZustandConnectionKitStore)(selectors_2.connectionSelectors.isAvailableTransportSelector);
65
+ var isDisabledSubmitButton = (0, react_1.useMemo)(function () {
66
+ return Boolean(!activeCurrencyId || !activeCountryId || !terms || !isConnectedApp);
67
+ }, [activeCountryId, activeCurrencyId, terms, isConnectedApp]);
60
68
  var handleRegistration = function () {
61
69
  if (!activeCountryId || !terms) {
62
70
  return;
@@ -78,6 +86,6 @@ var OneClick = function (props) {
78
86
  }
79
87
  (0, shared_1.openExternalLink)(link);
80
88
  };
81
- return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.fullWidth }, { children: [(0, jsx_runtime_1.jsx)(CurrencySelector_1.CurrencySelector, __assign({}, currencyProps, { translateKey: translates.currencyTitle, classes: (0, classnames_1.default)(currencyProps.classes, styles.marginB) })), (0, jsx_runtime_1.jsx)(CountrySelector_1.CountrySelector, __assign({}, countryProps, { translateKey: translates.countryTitle, classes: (0, classnames_1.default)(countryProps.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 }), isLoading ? ((0, jsx_runtime_1.jsx)("div", __assign({ style: { height: 'var(--height-48)' } }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: translates.loading }) }))) : ((0, jsx_runtime_1.jsx)(Buttons_1.BaseButton, { text: translates.registrationBtn, disabled: !activeCurrencyId || !activeCountryId || !terms, color: "primary", handleClick: handleRegistration, size: "--button-full", centreText: true, buttonHeight: "--button-height-full", classes: styles.marginB }))] })));
89
+ return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.fullWidth }, { children: [(0, jsx_runtime_1.jsx)(CurrencySelector_1.CurrencySelector, __assign({}, currencyProps, { translateKey: translates.currencyTitle, classes: (0, classnames_1.default)(currencyProps.classes, styles.marginB) })), (0, jsx_runtime_1.jsx)(CountrySelector_1.CountrySelector, __assign({}, countryProps, { translateKey: translates.countryTitle, classes: (0, classnames_1.default)(countryProps.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)(Buttons_1.BaseButton, { text: translates.registrationBtn, disabled: isDisabledSubmitButton, color: "primary", handleClick: handleRegistration, size: "--button-full", centreText: true, buttonHeight: "--button-height-full", classes: styles.marginB }) }))] })));
82
90
  };
83
91
  exports.OneClick = OneClick;
@@ -46,7 +46,7 @@ var useElementResize_1 = require("hooks/useElementResize");
46
46
  var styles = __importStar(require("./Tabs.module.css"));
47
47
  var Tabs = function (props) {
48
48
  var _a, _b;
49
- var activeValue = props.activeValue, onChange = props.onChange, data = props.data, _c = props.classes, classes = _c === void 0 ? '' : _c, _d = props.tabClasses, tabClasses = _d === void 0 ? '' : _d, startItem = props.startItem, endItem = props.endItem, _e = props.type, type = _e === void 0 ? 'button' : _e;
49
+ var activeValue = props.activeValue, onChange = props.onChange, data = props.data, _c = props.classes, classes = _c === void 0 ? '' : _c, _d = props.tabClasses, tabClasses = _d === void 0 ? '' : _d, startItem = props.startItem, endItem = props.endItem, _e = props.type, type = _e === void 0 ? 'button' : _e, indicatorClasses = props.indicatorClasses, activeTabClasses = props.activeTabClasses;
50
50
  var container = (0, react_1.useRef)(null);
51
51
  var indicator = (0, react_1.useRef)(null);
52
52
  var _f = (0, react_1.useState)(null), activeInx = _f[0], setActiveInx = _f[1];
@@ -99,12 +99,13 @@ var Tabs = function (props) {
99
99
  _a[styles.bg] = isButtonView,
100
100
  _a)), ref: container }, { children: [startItem, data.map(function (d) {
101
101
  var _a;
102
- return ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.tab, tabClasses, (_a = {},
102
+ return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.tab, tabClasses, (_a = {},
103
103
  _a[styles.buttonTab] = isButtonView,
104
104
  _a[styles.buttonTabActive] = isButtonView && activeValue === d.value,
105
- _a)), onClick: handleChange(d.value) }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: d.label }) }), d.value));
105
+ _a[activeTabClasses] = activeValue === d.value,
106
+ _a)), onClick: handleChange(d.value) }, { children: [d.startIcon, (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: d.label })] }), d.value));
106
107
  }), activeInx !== null && ((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(styles.activeBlockIndicator, (_b = {},
107
108
  _b[styles.buttonActiveIndicator] = isButtonView,
108
- _b)), ref: indicator })), endItem] })));
109
+ _b), indicatorClasses), ref: indicator })), endItem] })));
109
110
  };
110
111
  exports.Tabs = Tabs;
@@ -8,8 +8,11 @@ export type TabsProps = {
8
8
  startItem?: React.ReactElement;
9
9
  endItem?: React.ReactElement;
10
10
  type?: 'button' | 'underline';
11
+ indicatorClasses?: string;
12
+ activeTabClasses?: string;
11
13
  };
12
14
  export type Tab = {
15
+ startIcon?: string;
13
16
  label: string;
14
17
  value: number;
15
18
  };
package/dist/main.css CHANGED
@@ -1099,6 +1099,13 @@
1099
1099
  max-height: 0;
1100
1100
  }
1101
1101
  }
1102
+ .KIT__HOCRequestLoader-module__loader___xFYfs {
1103
+ width: inherit;
1104
+ height: inherit;
1105
+ background-color: var(--hoc-request-loader-background-color);
1106
+ color: var(--hoc-request-loader-color);
1107
+ }
1108
+
1102
1109
 
1103
1110
  .KIT__CheckBox-module__checkboxWrapperBig___lQiT2 .KIT__CheckBox-module__switch___l_7bC {
1104
1111
  display: inline-block;
@@ -1194,6 +1201,7 @@
1194
1201
  transition: 0.3s;
1195
1202
  cursor: pointer;
1196
1203
  display: flex;
1204
+ align-items: center;
1197
1205
  justify-content: center;
1198
1206
  position: relative;
1199
1207
  z-index: 2;
@@ -1201,6 +1209,7 @@
1201
1209
  white-space: nowrap;
1202
1210
  text-overflow: ellipsis;
1203
1211
  width: 100%;
1212
+ gap: var(--indent-s);
1204
1213
  }
1205
1214
  .KIT__Tabs-module__wrapperTabs___rFoBY .KIT__Tabs-module__tab___NBVtA.KIT__Tabs-module__buttonTab___Tpphz {
1206
1215
  padding: var(--indent-s);
@@ -1515,13 +1524,6 @@
1515
1524
  width: 500px;
1516
1525
  }
1517
1526
  }
1518
- .KIT__HOCRequestLoader-module__loader___xFYfs {
1519
- width: inherit;
1520
- height: inherit;
1521
- background-color: var(--hoc-request-loader-background-color);
1522
- color: var(--hoc-request-loader-color);
1523
- }
1524
-
1525
1527
  .KIT__PopUpHeader-module__wrapperPopUpHeader___GmjiQ {
1526
1528
  display: flex;
1527
1529
  justify-content: center;
@@ -1620,7 +1622,7 @@
1620
1622
  flex-direction: column;
1621
1623
  align-items: center;
1622
1624
 
1623
- max-height: calc(100vh - var(--height-48));
1625
+ max-height: calc(100% - var(--height-48));
1624
1626
  transition: 0.5s;
1625
1627
  max-width: 500px;
1626
1628
  width: 100%;
@@ -1788,7 +1790,6 @@
1788
1790
  .KIT__BonusCardLayout-module__wrapperBonusCardLayout___klMSg {
1789
1791
  position: relative;
1790
1792
  width: 100%;
1791
- height: 100%;
1792
1793
  min-height: 220px;
1793
1794
  min-width: 280px;
1794
1795
  padding: var(--indent-m);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-gldn-kit",
3
- "version": "0.1.39",
3
+ "version": "0.1.41",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "keywords": [],