react-gldn-kit 0.1.81 → 0.1.83
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.
|
@@ -42,8 +42,10 @@ var react_1 = require("react");
|
|
|
42
42
|
var styles = __importStar(require("./AssignCurrency.module.css"));
|
|
43
43
|
var PromoCode_1 = require("components/SignUp/PromoCode");
|
|
44
44
|
var Buttons_1 = require("components/ui/Buttons");
|
|
45
|
+
var selectors_1 = require("zustandStore/forms/signUp/selectors");
|
|
46
|
+
var store_1 = require("zustandStore/forms/signUp/store");
|
|
45
47
|
var AssignCurrency = function () {
|
|
46
|
-
var _a = (0, ModalContext_1.useHookProvider)(), useCurrencies = _a.useCurrencies, useCountryInfo = _a.useCountryInfo;
|
|
48
|
+
var _a = (0, ModalContext_1.useHookProvider)(), useCurrencies = _a.useCurrencies, useCountryInfo = _a.useCountryInfo, registrationLastStep = _a.registrationLastStep;
|
|
47
49
|
var availableCurrencies = (0, useHookFabric_1.useHookFabric)({
|
|
48
50
|
fn: useCurrencies,
|
|
49
51
|
});
|
|
@@ -51,6 +53,10 @@ var AssignCurrency = function () {
|
|
|
51
53
|
fn: useCountryInfo,
|
|
52
54
|
});
|
|
53
55
|
var _b = (0, react_1.useState)(''), promo = _b[0], setPromo = _b[1];
|
|
54
|
-
|
|
56
|
+
var activeCurrencyId = (0, store_1.useZustandRegistrationKitStore)(selectors_1.zustandRegistrationKitSelector.getActiveCurrencyIdSelector);
|
|
57
|
+
var handlePrepareData = function () {
|
|
58
|
+
registrationLastStep({ promo: promo, currencyId: activeCurrencyId });
|
|
59
|
+
};
|
|
60
|
+
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.wrapperAssignCurrency }, { children: [(0, jsx_runtime_1.jsx)(CurrencySelector_1.CurrencySelector, { availableCurrencies: availableCurrencies || [], countryInfo: countryInfo, classes: styles.marginB }), (0, jsx_runtime_1.jsx)(PromoCode_1.RegistrationPromoCode, { setPromoCode: setPromo, classes: styles.marginB }), (0, jsx_runtime_1.jsx)(Buttons_1.BaseButton, { text: "T.Select", handleClick: handlePrepareData, size: "--button-full", buttonHeight: "--button-height-full", color: "primary", centreText: true, disabled: !activeCurrencyId, classes: styles.bigMargin })] })));
|
|
55
61
|
};
|
|
56
62
|
exports.default = AssignCurrency;
|
|
@@ -123,6 +123,7 @@ var PhoneBox = function (props) {
|
|
|
123
123
|
}) }))), (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.relative }, { children: [(0, jsx_runtime_1.jsx)("input", { className: (0, classnames_1.default)(styles.input, (_a = {},
|
|
124
124
|
_a[styles.colorfulBorder] = phone.value,
|
|
125
125
|
_a[styles.errorBorder] = phone.errorText,
|
|
126
|
-
_a
|
|
126
|
+
_a[styles.highlightX] = !phone.value,
|
|
127
|
+
_a)), pattern: "[0-9]", type: "text", value: phone.value, onChange: setPhoneValue, placeholder: countryPhoneSettings === null || countryPhoneSettings === void 0 ? void 0 : countryPhoneSettings.mask }), (countryPhoneSettings === null || countryPhoneSettings === void 0 ? void 0 : countryPhoneSettings.mask) && phone.value && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.value }, { children: highlightXs((0, validation_1.replaceValueByMaskReturnMask)(countryPhoneSettings === null || countryPhoneSettings === void 0 ? void 0 : countryPhoneSettings.mask)(phone.value)) })))] })), !!phone.errorText && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.errorText }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: phone.errorText }) })))] })));
|
|
127
128
|
};
|
|
128
129
|
exports.default = PhoneBox;
|
|
@@ -7,6 +7,10 @@ type HookContextType = {
|
|
|
7
7
|
useCurrencies: () => null | CurrencyInfo[];
|
|
8
8
|
useCountryInfo: () => any;
|
|
9
9
|
useGoogleAuth: () => any;
|
|
10
|
+
registrationLastStep: (data: {
|
|
11
|
+
promo: string;
|
|
12
|
+
currencyId: number;
|
|
13
|
+
}) => any;
|
|
10
14
|
sendRegistrationCommand: (flow: ERegistrationFlow) => (key: string, data: any) => any;
|
|
11
15
|
appType: EAppType;
|
|
12
16
|
};
|
package/dist/main.css
CHANGED
|
@@ -1802,6 +1802,11 @@
|
|
|
1802
1802
|
transition: 0.3s;
|
|
1803
1803
|
}
|
|
1804
1804
|
|
|
1805
|
+
.KIT__PhoneBox-module__input___cViDI:focus {
|
|
1806
|
+
position: relative;
|
|
1807
|
+
z-index: var(--layout-lvl-1);
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1805
1810
|
.KIT__PhoneBox-module__input___cViDI.KIT__PhoneBox-module__colorfulBorder___gnfjW {
|
|
1806
1811
|
border-color: var(--input-filled-border-color);
|
|
1807
1812
|
}
|