react-gldn-kit 0.1.91 → 0.1.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/lib/components/Modals/Alert/components/LostPassword/First/components/EmailConfirmation/index.js +15 -3
- package/dist/lib/components/Modals/Alert/components/LostPassword/First/components/NumberConfirmation/index.js +14 -2
- package/dist/lib/components/Modals/Alert/index.js +1 -1
- package/dist/lib/utils/shared.js +1 -1
- package/dist/lib/zustandStore/alerts/modal/types.d.ts +1 -1
- package/dist/lib/zustandStore/alerts/modal/types.js +1 -1
- package/dist/main.css +19 -0
- package/package.json +1 -1
|
@@ -47,17 +47,20 @@ var Buttons_1 = require("components/ui/Buttons");
|
|
|
47
47
|
var constants_1 = require("../NumberConfirmation/constants");
|
|
48
48
|
var constant_1 = require("components/ui/Inputs/BaseInput/constant");
|
|
49
49
|
var constants_2 = require("components/ui/Timer/constants");
|
|
50
|
+
var selectors_1 = require("zustandStore/settings/selectors");
|
|
51
|
+
var store_1 = require("zustandStore/settings/store");
|
|
52
|
+
var store_2 = require("zustandStore/alerts/notification/store");
|
|
53
|
+
var selectors_2 = require("zustandStore/alerts/notification/selectors");
|
|
50
54
|
var ModalContext_1 = require("context/logic/ModalContext");
|
|
51
55
|
var useCountDown_1 = require("hooks/useCountDown");
|
|
52
56
|
var styles = __importStar(require("./EmailConfirmation.module.css"));
|
|
53
|
-
var selectors_1 = require("zustandStore/settings/selectors");
|
|
54
|
-
var store_1 = require("zustandStore/settings/store");
|
|
55
57
|
var EmailConfirmation = function () {
|
|
56
58
|
var useTransportControllers = (0, ModalContext_1.useHookProvider)().useTransportControllers;
|
|
57
59
|
var sendCommand = useTransportControllers().sendCommand;
|
|
58
60
|
var _a = (0, react_1.useState)(constant_1.DEFAULT_INPUT_VALUE), code = _a[0], setCode = _a[1];
|
|
59
61
|
var timerValue = (0, react_1.useRef)(new Date().getTime() + constants_2.DEFAULT_TIMER_VALUE);
|
|
60
62
|
var appType = (0, store_1.useZustandKitSettings)(selectors_1.getKitAppTypeSelector);
|
|
63
|
+
var notifications = (0, store_2.useZustandNotificationKitStore)(selectors_2.notificationKitSelectors.getNotificationsSelector);
|
|
61
64
|
var countDown = (0, useCountDown_1.useCountDown)({
|
|
62
65
|
endTimestamp: timerValue.current,
|
|
63
66
|
});
|
|
@@ -84,6 +87,15 @@ var EmailConfirmation = function () {
|
|
|
84
87
|
var handleChange = function (code) {
|
|
85
88
|
setCode({ value: code, errorText: '' });
|
|
86
89
|
};
|
|
87
|
-
|
|
90
|
+
(0, react_1.useEffect)(function () {
|
|
91
|
+
var hasAuthError = notifications.some(function (item) { return item.text === 'errors.recoveryPasswordFailed'; });
|
|
92
|
+
if (hasAuthError) {
|
|
93
|
+
setCode({
|
|
94
|
+
value: code.value,
|
|
95
|
+
errorText: 'errors.recoveryPasswordFailed',
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}, [notifications]);
|
|
99
|
+
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.wrapperEmailConfirmation, styles.column) }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.top, styles.column) }, { children: [(0, jsx_runtime_1.jsx)("img", { src: "/casino/icons-elon/ui-kit/recoveryPassword/email/".concat(appType, ".png"), className: styles.instructionImage }), (0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.column, styles.center, styles.mediumGap) }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.enterDigits }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "recoveryPsw.emailConfirmation.enterDigits" }) })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.column, styles.center, styles.smallGap) }, { children: [(0, jsx_runtime_1.jsx)(InputCode_1.default, { errorText: code.errorText, handleChange: handleChange, length: 5 }), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.time }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "recoveryPsw.emailConfirmation.seconds", specValue: "".concat(Math.round(timeRemaining / 1000)) }) }))] }))] }))] })), !timeRemaining && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.resendCode, onClick: handleResend }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "recoveryPsw.emailConfirmation.resendCode" }) }))), (0, jsx_runtime_1.jsx)(Buttons_1.BaseButton, { text: "recoveryPsw.emailConfirmation.verify", handleClick: submit, size: "--button-full", buttonHeight: "--button-height-xl", color: "primary", centreText: true, disabled: code.value.length < constants_1.MAX_EMAIL_CODE_LENGTH })] })));
|
|
88
100
|
};
|
|
89
101
|
exports.default = EmailConfirmation;
|
|
@@ -49,12 +49,15 @@ var constants_1 = require("./constants");
|
|
|
49
49
|
var constant_1 = require("components/ui/Inputs/BaseInput/constant");
|
|
50
50
|
var useCountDown_1 = require("hooks/useCountDown");
|
|
51
51
|
var ModalContext_1 = require("context/logic/ModalContext");
|
|
52
|
-
var styles = __importStar(require("./NumberConfirmation.module.css"));
|
|
53
52
|
var selectors_1 = require("zustandStore/settings/selectors");
|
|
54
53
|
var store_1 = require("zustandStore/settings/store");
|
|
54
|
+
var store_2 = require("zustandStore/alerts/notification/store");
|
|
55
|
+
var selectors_2 = require("zustandStore/alerts/notification/selectors");
|
|
56
|
+
var styles = __importStar(require("./NumberConfirmation.module.css"));
|
|
55
57
|
var NumberConfirmation = function () {
|
|
56
58
|
var useTransportControllers = (0, ModalContext_1.useHookProvider)().useTransportControllers;
|
|
57
59
|
var appType = (0, store_1.useZustandKitSettings)(selectors_1.getKitAppTypeSelector);
|
|
60
|
+
var notifications = (0, store_2.useZustandNotificationKitStore)(selectors_2.notificationKitSelectors.getNotificationsSelector);
|
|
58
61
|
var sendCommand = useTransportControllers().sendCommand;
|
|
59
62
|
var _a = (0, react_1.useState)(constant_1.DEFAULT_INPUT_VALUE), code = _a[0], setCode = _a[1];
|
|
60
63
|
var timerValue = (0, react_1.useRef)(new Date().getTime() + 90000);
|
|
@@ -88,6 +91,15 @@ var NumberConfirmation = function () {
|
|
|
88
91
|
var handleChange = function (code) {
|
|
89
92
|
setCode({ value: code, errorText: '' });
|
|
90
93
|
};
|
|
91
|
-
|
|
94
|
+
(0, react_1.useEffect)(function () {
|
|
95
|
+
var hasAuthError = notifications.some(function (item) { return item.text === 'errors.recoveryPasswordFailed'; });
|
|
96
|
+
if (hasAuthError) {
|
|
97
|
+
setCode({
|
|
98
|
+
value: code.value,
|
|
99
|
+
errorText: 'errors.recoveryPasswordFailed',
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}, [notifications]);
|
|
103
|
+
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.wrapperNumberConfirmation, styles.column) }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.top, styles.column) }, { children: [(0, jsx_runtime_1.jsx)("img", { src: "/casino/icons-elon/ui-kit/recoveryPassword/phone/".concat(appType, ".png"), className: styles.instructionImage }), (0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.column, styles.center, styles.mediumGap) }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.enterDigits }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "recoveryPsw.numberConfirmation.enterDigits" }) })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.column, styles.center, styles.smallGap) }, { children: [(0, jsx_runtime_1.jsx)(InputCode_1.default, { errorText: code.errorText, handleChange: handleChange }), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.time }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "recoveryPsw.numberConfirmation.seconds", specValue: "".concat(Math.round(timeRemaining / 1000)) }) }))] }))] }))] })), !timeRemaining && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.resendCode, onClick: handleResend }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "recoveryPsw.numberConfirmation.resendCode" }) }))), (0, jsx_runtime_1.jsx)(Buttons_1.BaseButton, { text: "recoveryPsw.numberConfirmation.verify", handleClick: submit, size: "--button-full", buttonHeight: "--button-height-xl", color: "primary", centreText: true, disabled: code.value.length < constants_1.MAX_PHONE_CODE_LENGTH })] })));
|
|
92
104
|
};
|
|
93
105
|
exports.NumberConfirmation = NumberConfirmation;
|
|
@@ -233,7 +233,7 @@ var Alerts = function (props) {
|
|
|
233
233
|
return (0, jsx_runtime_1.jsx)(AssignCurrency, {});
|
|
234
234
|
case types_1.EModalTypes.LostPassword:
|
|
235
235
|
return (0, jsx_runtime_1.jsx)(LostPassword, {});
|
|
236
|
-
case types_1.EModalTypes.
|
|
236
|
+
case types_1.EModalTypes.NumberConfirmation:
|
|
237
237
|
return (0, jsx_runtime_1.jsx)(NumberConfirmation, {});
|
|
238
238
|
case types_1.EModalTypes.EmailConfirmation:
|
|
239
239
|
return (0, jsx_runtime_1.jsx)(EmailConfirmation, {});
|
package/dist/lib/utils/shared.js
CHANGED
|
@@ -228,7 +228,7 @@ var getModalTitle = function (type) {
|
|
|
228
228
|
return translates_1.DICTIONARY.cancelBonus.title;
|
|
229
229
|
case types_1.EModalTypes.ClaimConfirmation:
|
|
230
230
|
return translates_1.DICTIONARY.claimConfirmation.title;
|
|
231
|
-
case types_1.EModalTypes.
|
|
231
|
+
case types_1.EModalTypes.NumberConfirmation:
|
|
232
232
|
return translates_1.DICTIONARY.numberConfirmation.title;
|
|
233
233
|
case types_1.EModalTypes.EmailConfirmation:
|
|
234
234
|
return translates_1.DICTIONARY.emailConfirmation.title;
|
|
@@ -64,7 +64,7 @@ var EModalTypes;
|
|
|
64
64
|
EModalTypes[EModalTypes["SignUpThree"] = 55] = "SignUpThree";
|
|
65
65
|
EModalTypes[EModalTypes["SignInThree"] = 56] = "SignInThree";
|
|
66
66
|
EModalTypes[EModalTypes["LostPasswordThree"] = 57] = "LostPasswordThree";
|
|
67
|
-
EModalTypes[EModalTypes["
|
|
67
|
+
EModalTypes[EModalTypes["NumberConfirmation"] = 58] = "NumberConfirmation";
|
|
68
68
|
EModalTypes[EModalTypes["EmailConfirmation"] = 59] = "EmailConfirmation";
|
|
69
69
|
EModalTypes["AssignCurrency"] = "assign-currency";
|
|
70
70
|
})(EModalTypes = exports.EModalTypes || (exports.EModalTypes = {}));
|
package/dist/main.css
CHANGED
|
@@ -726,6 +726,7 @@
|
|
|
726
726
|
transition: 0.5s;
|
|
727
727
|
order: -1;
|
|
728
728
|
line-height: 1;
|
|
729
|
+
pointer-events: none;
|
|
729
730
|
}
|
|
730
731
|
|
|
731
732
|
.KIT__BaseInputUi-module__labelRight___Q5n_d {
|
|
@@ -4124,6 +4125,7 @@
|
|
|
4124
4125
|
justify-content: space-between;
|
|
4125
4126
|
gap: var(--indent-l);
|
|
4126
4127
|
}
|
|
4128
|
+
|
|
4127
4129
|
.KIT__NumberConfirmation-module__top___MThMX {
|
|
4128
4130
|
gap: var(--indent-l);
|
|
4129
4131
|
}
|
|
@@ -4136,6 +4138,7 @@
|
|
|
4136
4138
|
.KIT__NumberConfirmation-module__center___mBjif {
|
|
4137
4139
|
align-items: center;
|
|
4138
4140
|
}
|
|
4141
|
+
|
|
4139
4142
|
.KIT__NumberConfirmation-module__instructionImage___vQCZx {
|
|
4140
4143
|
width: 100%;
|
|
4141
4144
|
}
|
|
@@ -4162,6 +4165,14 @@
|
|
|
4162
4165
|
font-weight: 600;
|
|
4163
4166
|
}
|
|
4164
4167
|
|
|
4168
|
+
.KIT__NumberConfirmation-module__mediumGap___OVFXc {
|
|
4169
|
+
gap: var(--indent-m);
|
|
4170
|
+
}
|
|
4171
|
+
|
|
4172
|
+
.KIT__NumberConfirmation-module__smallGap___u3RZI {
|
|
4173
|
+
gap: var(--indent-xs);
|
|
4174
|
+
}
|
|
4175
|
+
|
|
4165
4176
|
.KIT__EmailConfirmation-module__wrapperEmailConfirmation___IQart {
|
|
4166
4177
|
justify-content: space-between;
|
|
4167
4178
|
gap: var(--indent-l);
|
|
@@ -4205,6 +4216,14 @@
|
|
|
4205
4216
|
font-weight: 600;
|
|
4206
4217
|
}
|
|
4207
4218
|
|
|
4219
|
+
.KIT__EmailConfirmation-module__mediumGap____mnrR {
|
|
4220
|
+
gap: var(--indent-m);
|
|
4221
|
+
}
|
|
4222
|
+
|
|
4223
|
+
.KIT__EmailConfirmation-module__smallGap___GvhZd {
|
|
4224
|
+
gap: var(--indent-xs);
|
|
4225
|
+
}
|
|
4226
|
+
|
|
4208
4227
|
.KIT__Alert-module__wrapperModal___lOle6 {
|
|
4209
4228
|
width: 100%;
|
|
4210
4229
|
height: 100%;
|