react-gldn-kit 0.1.72 → 0.1.74
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/LastBigWinners/components/LastBigWinner/LastBigWinner.js +9 -4
- package/dist/lib/components/Modals/Alert/components/Auth/SignUp/First/index.js +4 -5
- package/dist/lib/components/Modals/Alert/components/LostPassword/First/components/LostPasswordPhoneForm/index.d.ts +1 -1
- package/dist/lib/components/Modals/Alert/components/LostPassword/First/components/LostPasswordPhoneForm/index.js +1 -1
- package/dist/lib/components/Modals/Alert/components/LostPassword/First/index.js +1 -1
- package/dist/lib/components/SignUpTypeTwo/PhoneBox/index.js +7 -1
- package/dist/lib/components/SocialButtons/GoogleLoginButon/index.d.ts +2 -0
- package/dist/lib/components/SocialButtons/GoogleLoginButon/index.js +116 -0
- package/dist/lib/components/SocialButtons/index.js +6 -6
- package/dist/lib/components/ui/Inputs/BaseInput/BaseInputUi.js +2 -2
- package/dist/lib/components/ui/Inputs/PhoneInput/index.js +2 -2
- package/dist/lib/components/ui/Inputs/PhoneInput/types.d.ts +1 -0
- package/dist/lib/components/ui/Loaders/SkeletLoader/index.d.ts +2 -1
- package/dist/lib/components/ui/Loaders/SkeletLoader/index.js +2 -2
- package/dist/lib/components/ui/Selector/index.js +1 -1
- package/dist/lib/components/ui/ShowAll/index.js +1 -1
- package/dist/lib/constants/ui.d.ts +1 -0
- package/dist/lib/constants/ui.js +4 -0
- package/dist/main.css +155 -159
- package/package.json +14 -15
- package/dist/807840745cf8259a5f25933495817c5f.svg +0 -4
|
@@ -39,15 +39,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
40
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
41
|
var classnames_1 = __importDefault(require("classnames"));
|
|
42
|
-
var profile_svg_1 = require("assets/profile.svg");
|
|
43
42
|
var SkeletLoader_1 = __importDefault(require("components/ui/Loaders/SkeletLoader"));
|
|
43
|
+
var Text_1 = require("components/Text");
|
|
44
44
|
var styles = __importStar(require("./LastBigWinner.module.css"));
|
|
45
45
|
var LastBigWinner = function (props) {
|
|
46
46
|
var classes = props.classes, _a = props.isLoading, isLoading = _a === void 0 ? false : _a;
|
|
47
47
|
if (isLoading) {
|
|
48
|
-
return ((0, jsx_runtime_1.
|
|
48
|
+
return ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.wrapperLastBugWinner, classes) }, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.box }, { children: [(0, jsx_runtime_1.jsx)(SkeletLoader_1.default, { classes: (0, classnames_1.default)(styles.sum, styles.loaderSum), loaderClasses: styles.loader }), (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.userId }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.win }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "lastWin.win" }) })), (0, jsx_runtime_1.jsx)(SkeletLoader_1.default, { classes: styles.idLoader })] }))] })) })));
|
|
49
49
|
}
|
|
50
|
-
var _b = props, id = _b.id, _c = _b.gameImg, gameImg = _c === void 0 ? 'https://elondom.com/image/vertical_2/30201.webp' : _c, prize = _b.prize,
|
|
51
|
-
return ((0, jsx_runtime_1.
|
|
50
|
+
var _b = props, id = _b.id, _c = _b.gameImg, gameImg = _c === void 0 ? 'https://elondom.com/image/vertical_2/30201.webp' : _c, prize = _b.prize, handleClick = _b.handleClick, gameId = _b.gameId;
|
|
51
|
+
return ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.wrapperLastBugWinner, classes), onClick: handleClick(gameId), style: {
|
|
52
|
+
backgroundImage: "url(".concat(gameImg, ")"),
|
|
53
|
+
backgroundRepeat: 'no-repeat',
|
|
54
|
+
backgroundPosition: 'center',
|
|
55
|
+
backgroundSize: 'cover',
|
|
56
|
+
} }, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.box }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.sum }, { children: prize })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.userId }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.win }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "lastWin.win" }) })), "ID ", id] }))] })) })));
|
|
52
57
|
};
|
|
53
58
|
exports.default = LastBigWinner;
|
|
@@ -46,6 +46,8 @@ var Tabs_1 = require("components/ui/Tabs");
|
|
|
46
46
|
var EmailSignUp_1 = require("./components/Forms/EmailSignUp");
|
|
47
47
|
var OneClickKit_1 = __importDefault(require("./components/Forms/OneClickKit"));
|
|
48
48
|
var PhoneSignUp_1 = require("./components/Forms/PhoneSignUp");
|
|
49
|
+
var SocialButtons_1 = require("components/SocialButtons");
|
|
50
|
+
var ui_1 = require("constants/ui");
|
|
49
51
|
var store_1 = require("zustandStore/alerts/modal/store");
|
|
50
52
|
var selectors_1 = require("zustandStore/alerts/modal/selectors");
|
|
51
53
|
var types_1 = require("zustandStore/alerts/modal/types");
|
|
@@ -86,11 +88,8 @@ var SignUp = function (props) {
|
|
|
86
88
|
setActiveForm(tabs[0].value);
|
|
87
89
|
}
|
|
88
90
|
}, [activeForm, tabs]);
|
|
89
|
-
return ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.wrapperReferralFailure, classes) }, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.wrapperSignUpModal }, { children: [(bonusSignUp ||
|
|
90
|
-
customBonusText) && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.bonusText }, { children: [isCongratulation && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.textTitle }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "wheelTwo.secondPopUp.title" }) }))), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.subText }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: customBonusSubText
|
|
91
|
+
return ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.wrapperReferralFailure, classes) }, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.wrapperSignUpModal }, { children: [(bonusSignUp || customBonusText) && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.bonusText }, { children: [isCongratulation && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.textTitle }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "wheelTwo.secondPopUp.title" }) }))), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.subText }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: customBonusSubText
|
|
91
92
|
? customBonusSubText
|
|
92
|
-
: 'wheelTwo.secondPopUp.subTitle' }) })), (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: customBonusText
|
|
93
|
-
? customBonusText
|
|
94
|
-
: 'wheelTwo.secondPopUp.bonus' })] }))), (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.wrapperTabsAndForm }, { children: [activeForm !== null && tabs.length !== 1 && ((0, jsx_runtime_1.jsx)(Tabs_1.Tabs, { activeValue: activeForm, data: tabs, onChange: setActiveForm, classes: styles.tabs, type: "underline" })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.zIndex }, { children: [activeForm === types_2.ERegistrationForm.Email && ((0, jsx_runtime_1.jsx)(EmailSignUp_1.EmailSignUp, { isSelected: true, countryInfo: countryInfo, handleRegistration: sendRegistrationCommand(flow), availableCurrencies: availableCurrencies || [], buttonText: customSignUpButtonText })), activeForm === types_2.ERegistrationForm.Phone && ((0, jsx_runtime_1.jsx)(PhoneSignUp_1.PhoneSignUp, { isSelected: true, requestCode: handleRegistrationCode, handleRegistration: sendRegistrationCommand(flow), countryInfo: countryInfo, availableCurrencies: availableCurrencies || [], buttonText: customSignUpButtonText })), activeForm === types_2.ERegistrationForm.PhoneWithoutCode && ((0, jsx_runtime_1.jsx)(PhoneSignUp_1.PhoneSignUp, { withoutCode: true, isSelected: true, requestCode: handleRegistrationCode, handleRegistration: sendRegistrationCommand(flow), countryInfo: countryInfo, availableCurrencies: availableCurrencies || [], buttonText: customSignUpButtonText })), activeForm === types_2.ERegistrationForm.OneClick && ((0, jsx_runtime_1.jsx)(OneClickKit_1.default, { isSelected: true, handleRegistration: sendRegistrationCommand(flow), countryInfo: countryInfo, availableCurrencies: availableCurrencies || [] }))] }))] })), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.authButtonText, onClick: openSignIn }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "registration.logInButton" }) }))] })) })));
|
|
93
|
+
: 'wheelTwo.secondPopUp.subTitle' }) })), (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: customBonusText ? customBonusText : 'wheelTwo.secondPopUp.bonus' })] }))), ui_1.IS_DEV && (0, jsx_runtime_1.jsx)(SocialButtons_1.SocialButtons, { social: ['Google'] }), (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.wrapperTabsAndForm }, { children: [activeForm !== null && tabs.length !== 1 && ((0, jsx_runtime_1.jsx)(Tabs_1.Tabs, { activeValue: activeForm, data: tabs, onChange: setActiveForm, classes: styles.tabs, type: "underline" })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.zIndex }, { children: [activeForm === types_2.ERegistrationForm.Email && ((0, jsx_runtime_1.jsx)(EmailSignUp_1.EmailSignUp, { isSelected: true, countryInfo: countryInfo, handleRegistration: sendRegistrationCommand(flow), availableCurrencies: availableCurrencies || [], buttonText: customSignUpButtonText })), activeForm === types_2.ERegistrationForm.Phone && ((0, jsx_runtime_1.jsx)(PhoneSignUp_1.PhoneSignUp, { isSelected: true, requestCode: handleRegistrationCode, handleRegistration: sendRegistrationCommand(flow), countryInfo: countryInfo, availableCurrencies: availableCurrencies || [], buttonText: customSignUpButtonText })), activeForm === types_2.ERegistrationForm.PhoneWithoutCode && ((0, jsx_runtime_1.jsx)(PhoneSignUp_1.PhoneSignUp, { withoutCode: true, isSelected: true, requestCode: handleRegistrationCode, handleRegistration: sendRegistrationCommand(flow), countryInfo: countryInfo, availableCurrencies: availableCurrencies || [], buttonText: customSignUpButtonText })), activeForm === types_2.ERegistrationForm.OneClick && ((0, jsx_runtime_1.jsx)(OneClickKit_1.default, { isSelected: true, handleRegistration: sendRegistrationCommand(flow), countryInfo: countryInfo, availableCurrencies: availableCurrencies || [] }))] }))] })), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.authButtonText, onClick: openSignIn }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "registration.logInButton" }) }))] })) })));
|
|
95
94
|
};
|
|
96
95
|
exports.SignUp = SignUp;
|
|
@@ -69,6 +69,6 @@ var LostPasswordPhoneForm = function (_a) {
|
|
|
69
69
|
]);
|
|
70
70
|
setCode({ value: value, errorText: errorText });
|
|
71
71
|
};
|
|
72
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(PhoneInput_1.PhoneInput, { withConfirm: true, requestId: types_1.ERequestIds.RecoveryPasswordSendCode, sendDataType: types_1.RecoverySubType.Phone, label: "recoveryPsw.phone", size: "large", section: 3, disabled: isRequestedCode, defaultValue: "", onChange: setPhone, classes: isRequestedCode ? styles.formInput : styles.formPhoneWrapper, requestCallback: callbackRequest, requestCode: submit }), isRequestedCode && ((0, jsx_runtime_1.jsx)(BaseInput_1.BaseInput, { label: "recoveryPsw.code", size: "large", disabled: false, defaultValue: "", onChange: handleValidateCode, classes: styles.formInput })), isValidForm && ((0, jsx_runtime_1.jsx)(HOCRequestLoader_1.HOCRequestLoader, __assign({ command: "\\\\31x", requestId: types_1.ERequestIds.RecoveryPasswordResponse }, { children: (0, jsx_runtime_1.jsx)(Buttons_1.BaseButton, { color: "primary", size: "--button-full", buttonHeight: "--button-height-l", handleClick: submit, text: "recoveryPsw.submitBtn", centreText: true }) })))] }));
|
|
72
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(PhoneInput_1.PhoneInput, { withConfirm: true, requestId: types_1.ERequestIds.RecoveryPasswordSendCode, sendDataType: types_1.RecoverySubType.Phone, label: "recoveryPsw.phone", size: "large", section: 3, disabled: isRequestedCode, defaultValue: "", onChange: setPhone, classes: isRequestedCode ? styles.formInput : styles.formPhoneWrapper, requestCallback: callbackRequest, requestCode: submit, itemsClasses: styles.items }), isRequestedCode && ((0, jsx_runtime_1.jsx)(BaseInput_1.BaseInput, { label: "recoveryPsw.code", size: "large", disabled: false, defaultValue: "", onChange: handleValidateCode, classes: styles.formInput })), isValidForm && ((0, jsx_runtime_1.jsx)(HOCRequestLoader_1.HOCRequestLoader, __assign({ command: "\\\\31x", requestId: types_1.ERequestIds.RecoveryPasswordResponse }, { children: (0, jsx_runtime_1.jsx)(Buttons_1.BaseButton, { color: "primary", size: "--button-full", buttonHeight: "--button-height-l", handleClick: submit, text: "recoveryPsw.submitBtn", centreText: true }) })))] }));
|
|
73
73
|
};
|
|
74
74
|
exports.default = LostPasswordPhoneForm;
|
|
@@ -50,6 +50,6 @@ var LostPassword = function () {
|
|
|
50
50
|
var useTransportControllers = (0, ModalContext_1.useHookProvider)().useTransportControllers;
|
|
51
51
|
var sendCommand = useTransportControllers().sendCommand;
|
|
52
52
|
var _a = (0, react_1.useState)(types_1.RecoveryFormType.Email), activeValue = _a[0], setActiveValue = _a[1];
|
|
53
|
-
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.wrapprLostePassword }, { children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tabs, { activeValue: activeValue, data: constants_1.RECOVERY_TABS, onChange: setActiveValue, classes: styles.tabWrapper }), activeValue === types_1.RecoveryFormType.Email && ((0, jsx_runtime_1.jsx)(LostPasswordEmailForm_1.default, { sendCommand: sendCommand })), activeValue === types_1.RecoveryFormType.Phone && ((0, jsx_runtime_1.jsx)(LostPasswordPhoneForm_1.default, { sendCommand: sendCommand }))] })));
|
|
53
|
+
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.wrapprLostePassword }, { children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tabs, { activeValue: activeValue, data: constants_1.RECOVERY_TABS, onChange: setActiveValue, classes: styles.tabWrapper, type: "underline" }), activeValue === types_1.RecoveryFormType.Email && ((0, jsx_runtime_1.jsx)(LostPasswordEmailForm_1.default, { sendCommand: sendCommand })), activeValue === types_1.RecoveryFormType.Phone && ((0, jsx_runtime_1.jsx)(LostPasswordPhoneForm_1.default, { sendCommand: sendCommand }))] })));
|
|
54
54
|
};
|
|
55
55
|
exports.default = LostPassword;
|
|
@@ -90,6 +90,12 @@ var PhoneBox = function (props) {
|
|
|
90
90
|
setDropState(false);
|
|
91
91
|
onChange('');
|
|
92
92
|
}; };
|
|
93
|
+
var highlightXs = function (text) {
|
|
94
|
+
var parts = text.split(/(X+)/);
|
|
95
|
+
return parts.map(function (part, index) {
|
|
96
|
+
return part.startsWith('X') ? ((0, jsx_runtime_1.jsx)("span", __assign({ className: styles.highlightX }, { children: part }), index)) : (part);
|
|
97
|
+
});
|
|
98
|
+
};
|
|
93
99
|
(0, react_1.useEffect)(function () {
|
|
94
100
|
if (countryCodeDefault) {
|
|
95
101
|
var defaultValue = constants_1.PHONE_MASK[countryCodeDefault];
|
|
@@ -117,6 +123,6 @@ var PhoneBox = function (props) {
|
|
|
117
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 = {},
|
|
118
124
|
_a[styles.colorfulBorder] = phone.value,
|
|
119
125
|
_a[styles.errorBorder] = phone.errorText,
|
|
120
|
-
_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) && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.value }, { children: (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 }) })))] })));
|
|
126
|
+
_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) && ((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 }) })))] })));
|
|
121
127
|
};
|
|
122
128
|
exports.default = PhoneBox;
|
|
@@ -0,0 +1,116 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
46
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
47
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
48
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
49
|
+
function step(op) {
|
|
50
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
51
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
52
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
53
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
54
|
+
switch (op[0]) {
|
|
55
|
+
case 0: case 1: t = op; break;
|
|
56
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
57
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
58
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
59
|
+
default:
|
|
60
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
61
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
62
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
63
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
64
|
+
if (t[2]) _.ops.pop();
|
|
65
|
+
_.trys.pop(); continue;
|
|
66
|
+
}
|
|
67
|
+
op = body.call(thisArg, _);
|
|
68
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
69
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
73
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
74
|
+
var google_1 = require("@react-oauth/google");
|
|
75
|
+
var SocialButton_1 = require("components/ui/Buttons/SocialButton");
|
|
76
|
+
var GoogleSvg_1 = require("components/ui/Icons/Base/GoogleSvg");
|
|
77
|
+
var styles = __importStar(require("./GoogleLoginButton.module.css"));
|
|
78
|
+
var GoogleLoginButton = function () {
|
|
79
|
+
var saveToken = function (token) { return __awaiter(void 0, void 0, void 0, function () {
|
|
80
|
+
var res, data, error_1;
|
|
81
|
+
return __generator(this, function (_a) {
|
|
82
|
+
switch (_a.label) {
|
|
83
|
+
case 0:
|
|
84
|
+
_a.trys.push([0, 3, , 4]);
|
|
85
|
+
return [4 /*yield*/, fetch('https://data.elonsport.com/loginhub/sign-in/google', {
|
|
86
|
+
method: 'POST',
|
|
87
|
+
headers: {
|
|
88
|
+
'Content-Type': 'application/json',
|
|
89
|
+
},
|
|
90
|
+
body: JSON.stringify({ token: token, prefix: '2' }),
|
|
91
|
+
})];
|
|
92
|
+
case 1:
|
|
93
|
+
res = _a.sent();
|
|
94
|
+
return [4 /*yield*/, res.json()];
|
|
95
|
+
case 2:
|
|
96
|
+
data = _a.sent();
|
|
97
|
+
localStorage.setItem('token', data.token);
|
|
98
|
+
return [3 /*break*/, 4];
|
|
99
|
+
case 3:
|
|
100
|
+
error_1 = _a.sent();
|
|
101
|
+
console.error('🚀 :', error_1);
|
|
102
|
+
return [3 /*break*/, 4];
|
|
103
|
+
case 4: return [2 /*return*/];
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}); };
|
|
107
|
+
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.wrapperButton }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.hiddenButton }, { children: (0, jsx_runtime_1.jsx)(google_1.GoogleLogin, { onSuccess: function (credentialResponse) {
|
|
108
|
+
var token = credentialResponse.credential;
|
|
109
|
+
if (token) {
|
|
110
|
+
saveToken(token);
|
|
111
|
+
}
|
|
112
|
+
}, onError: function () {
|
|
113
|
+
console.log('❌ Login Failed');
|
|
114
|
+
} }) })), (0, jsx_runtime_1.jsx)(SocialButton_1.SocialButton, { title: "socialTabs.Google", Icon: (0, jsx_runtime_1.jsx)(GoogleSvg_1.GoogleSvg, { width: "28", height: "29" }), handleClick: console.info })] })));
|
|
115
|
+
};
|
|
116
|
+
exports.default = GoogleLoginButton;
|
|
@@ -33,18 +33,18 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
33
33
|
__setModuleDefault(result, mod);
|
|
34
34
|
return result;
|
|
35
35
|
};
|
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
36
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
40
|
exports.SocialButtons = void 0;
|
|
38
41
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
39
|
-
var
|
|
42
|
+
var google_1 = require("@react-oauth/google");
|
|
40
43
|
var Text_1 = require("components/Text");
|
|
41
|
-
var
|
|
44
|
+
var GoogleLoginButon_1 = __importDefault(require("./GoogleLoginButon"));
|
|
42
45
|
var styles = __importStar(require("./SocialButtons.module.css"));
|
|
43
46
|
var SocialButtons = function (_a) {
|
|
44
47
|
var social = _a.social;
|
|
45
|
-
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.wrapperSocialButtons }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.socialButtons }, { children: social.
|
|
46
|
-
var _a = socialButtons_1.SOCIAL_BUTTONS[socialKey], title = _a.title, Icon = _a.Icon;
|
|
47
|
-
return ((0, jsx_runtime_1.jsx)(SocialButton_1.SocialButton, { title: title, Icon: Icon, handleClick: console.info }, idx));
|
|
48
|
-
}) })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.row }, { children: [(0, jsx_runtime_1.jsx)("div", { className: styles.line }), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.or }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "socialTabs.or" }) })), (0, jsx_runtime_1.jsx)("div", { className: styles.line })] }))] })));
|
|
48
|
+
return ((0, jsx_runtime_1.jsx)(google_1.GoogleOAuthProvider, __assign({ clientId: "828082339451-68fenmptn46ha9tq3akbng271cbd1bhb.apps.googleusercontent.com" }, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.wrapperSocialButtons }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.socialButtons }, { children: social.includes('Google') && (0, jsx_runtime_1.jsx)(GoogleLoginButon_1.default, {}) })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.row }, { children: [(0, jsx_runtime_1.jsx)("div", { className: styles.line }), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.or }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "socialTabs.or" }) })), (0, jsx_runtime_1.jsx)("div", { className: styles.line })] }))] })) })));
|
|
49
49
|
};
|
|
50
50
|
exports.SocialButtons = SocialButtons;
|
|
@@ -65,10 +65,10 @@ var BaseInputUi = function (props) {
|
|
|
65
65
|
_a[styles.borderColorfulRed] = errorText,
|
|
66
66
|
_a), inputWrapperClasses) }, { children: [startIcon, (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.inputWithLabel }, { children: [(0, jsx_runtime_1.jsx)("input", { onFocus: handleFocus, onBlur: handleBlur, inputMode: inputMode, className: (0, classnames_1.default)(styles.input, (_b = {},
|
|
67
67
|
_b[styles.disabled] = disabled,
|
|
68
|
-
_b), inputClasses), value: value, type: type, placeholder: placeholder, onChange: handleChange }), label && (0, jsx_runtime_1.jsx)("label", __assign({ className: (0, classnames_1.default)(styles.label, (_c = {},
|
|
68
|
+
_b), inputClasses), value: value, type: type, placeholder: placeholder, onChange: handleChange }), label && ((0, jsx_runtime_1.jsx)("label", __assign({ className: (0, classnames_1.default)(styles.label, (_c = {},
|
|
69
69
|
_c[styles.labelRight] = startIcon,
|
|
70
70
|
_c[styles.hideLabel] = isHidePlaceholder,
|
|
71
71
|
_c[styles.labelUp] = inputLabelType === 'labelUp' || value,
|
|
72
|
-
_c), labelClasses) }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: label }) }))] })), value && withClearValue && !errorText && ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.searchButton, styles.clearButton), onClick: handleClearInputValue }, { children: (0, jsx_runtime_1.jsx)(CrossSvg_1.CrossSvg, { classes: styles.crossSvg }) }))), value && withClearValue && errorText && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.searchButton }, { children: (0, jsx_runtime_1.jsx)(WarningSvg_1.WarningSvg, {}) }))), children && ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.rowChildrenData, classesChildrenWrapper) }, { children: children }))), errorText && withErrorSvg && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.rowChildrenData }, { children: (0, jsx_runtime_1.jsx)(inputError_svg_1.ReactComponent, {}) }))), !errorText && bottomText && ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.errorText, styles.animationFadeIn, styles.resetErrorColor) }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: bottomText }) })))] })), errorText && ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.errorText, styles.animationFadeIn) }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: errorText }) })))] })));
|
|
72
|
+
_c), labelClasses) }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: label }) })))] })), value && withClearValue && !errorText && ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.searchButton, styles.clearButton), onClick: handleClearInputValue }, { children: (0, jsx_runtime_1.jsx)(CrossSvg_1.CrossSvg, { classes: styles.crossSvg }) }))), value && withClearValue && errorText && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.searchButton }, { children: (0, jsx_runtime_1.jsx)(WarningSvg_1.WarningSvg, {}) }))), children && ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.rowChildrenData, classesChildrenWrapper) }, { children: children }))), errorText && withErrorSvg && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.rowChildrenData }, { children: (0, jsx_runtime_1.jsx)(inputError_svg_1.ReactComponent, {}) }))), !errorText && bottomText && ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.errorText, styles.animationFadeIn, styles.resetErrorColor) }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: bottomText }) })))] })), errorText && ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.errorText, styles.animationFadeIn) }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: errorText }) })))] })));
|
|
73
73
|
};
|
|
74
74
|
exports.BaseInputUi = BaseInputUi;
|
|
@@ -52,7 +52,7 @@ var mock_1 = require("constants/mock");
|
|
|
52
52
|
var constants_1 = require("./constants");
|
|
53
53
|
var styles = __importStar(require("./PhoneInput.module.css"));
|
|
54
54
|
var PhoneInput = function (props) {
|
|
55
|
-
var withConfirm = props.withConfirm, requestId = props.requestId, sendDataType = props.sendDataType, children = props.children, classesWrapper = props.classesWrapper, requestCallback = props.requestCallback, onChange = props.onChange, sendKey = props.sendKey, countryCodeDefault = props.countryCodeDefault, _a = props.section, section = _a === void 0 ? undefined : _a, requestCode = props.requestCode, countryInfo = props.countryInfo, buttonClasses = props.buttonClasses, errorText = props.errorText;
|
|
55
|
+
var withConfirm = props.withConfirm, requestId = props.requestId, sendDataType = props.sendDataType, children = props.children, classesWrapper = props.classesWrapper, requestCallback = props.requestCallback, onChange = props.onChange, sendKey = props.sendKey, countryCodeDefault = props.countryCodeDefault, _a = props.section, section = _a === void 0 ? undefined : _a, requestCode = props.requestCode, countryInfo = props.countryInfo, buttonClasses = props.buttonClasses, errorText = props.errorText, itemsClasses = props.itemsClasses;
|
|
56
56
|
var _b = (0, react_1.useState)(__assign(__assign({}, constant_1.DEFAULT_INPUT_VALUE), { value: '+' })), phone = _b[0], setPhone = _b[1];
|
|
57
57
|
var _c = (0, react_1.useState)(false), isOpened = _c[0], setOpenState = _c[1];
|
|
58
58
|
var _d = (0, react_1.useState)(false), isRequestedCode = _d[0], setRequestedCodeStatus = _d[1];
|
|
@@ -155,7 +155,7 @@ var PhoneInput = function (props) {
|
|
|
155
155
|
onChange('');
|
|
156
156
|
}, [phone, onChange]);
|
|
157
157
|
var Flag = (countryPhoneSettings || {}).Flag;
|
|
158
|
-
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.wrapper, classesWrapper) }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.list }, { children: [(0, jsx_runtime_1.jsx)(PhoneView_1.default, __assign({ phone: phone, Flag: Flag || WorldSvg_1.WorldSvg, code: (countryPhoneSettings === null || countryPhoneSettings === void 0 ? void 0 : countryPhoneSettings.code) || '+', handleSetValue: handleSetValue, toggleValue: toggleValue, isOpened: isOpened, mask: countryPhoneSettings === null || countryPhoneSettings === void 0 ? void 0 : countryPhoneSettings.mask, classes: styles.disabledBorder, errorText: errorText }, { children: children })), isOpened && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.items }, { children: Object.values(constants_1.PHONE_MASK).map(function (p) {
|
|
158
|
+
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.wrapper, classesWrapper) }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.list }, { children: [(0, jsx_runtime_1.jsx)(PhoneView_1.default, __assign({ phone: phone, Flag: Flag || WorldSvg_1.WorldSvg, code: (countryPhoneSettings === null || countryPhoneSettings === void 0 ? void 0 : countryPhoneSettings.code) || '+', handleSetValue: handleSetValue, toggleValue: toggleValue, isOpened: isOpened, mask: countryPhoneSettings === null || countryPhoneSettings === void 0 ? void 0 : countryPhoneSettings.mask, classes: styles.disabledBorder, errorText: errorText }, { children: children })), isOpened && ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.items, itemsClasses) }, { children: Object.values(constants_1.PHONE_MASK).map(function (p) {
|
|
159
159
|
var CountryFlag = p.Flag;
|
|
160
160
|
return ((0, jsx_runtime_1.jsx)("div", __assign({ onClick: handleChooseSettings(p), className: styles.item }, { children: (0, jsx_runtime_1.jsx)(PhoneView_1.default, { phone: { value: p.code, errorText: '' }, Flag: CountryFlag, code: p.code, handleSetValue: console.info, mask: p.mask, name: p.name, classes: styles.disabledBorder }) }), p.code));
|
|
161
161
|
}) })))] })), (errorText || phone.errorText) && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.error }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: errorText || phone.errorText }) }))), withConfirm && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isRequestedCode ? ((0, jsx_runtime_1.jsx)(Timer_1.default, { handleRequestCode: handleRequestCode })) : ((0, jsx_runtime_1.jsx)(BaseButton_1.BaseButton, { text: "getCodeBtn", disabled: !isValidPhone, color: "primary", handleClick: showTimer, size: "--button-full", centreText: true, buttonHeight: "--button-height-full", classes: buttonClasses })) }))] })));
|
|
@@ -5,6 +5,7 @@ export type PhoneInputProps = BaseInputProps & (PhoneInputPropsWithConfirmation
|
|
|
5
5
|
countryCodeDefault?: string;
|
|
6
6
|
countryInfo?: any;
|
|
7
7
|
buttonClasses?: string;
|
|
8
|
+
itemsClasses?: string;
|
|
8
9
|
};
|
|
9
10
|
export type PhoneInputPropsWithoutConfirmation = {
|
|
10
11
|
withConfirm: false | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
type Props = {
|
|
2
2
|
classes?: string;
|
|
3
|
+
loaderClasses?: string;
|
|
3
4
|
};
|
|
4
|
-
declare const SkeletLoader: ({ classes }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const SkeletLoader: ({ classes, loaderClasses }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export default SkeletLoader;
|
|
@@ -41,7 +41,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
41
41
|
var classnames_1 = __importDefault(require("classnames"));
|
|
42
42
|
var styles = __importStar(require("./SkeletLoader.module.css"));
|
|
43
43
|
var SkeletLoader = function (_a) {
|
|
44
|
-
var classes = _a.classes;
|
|
45
|
-
return ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.wrapperSkeletLoader, classes) }, { children: (0, jsx_runtime_1.jsx)("div", { className: styles.loader }) })));
|
|
44
|
+
var classes = _a.classes, loaderClasses = _a.loaderClasses;
|
|
45
|
+
return ((0, jsx_runtime_1.jsx)("div", __assign({ className: (0, classnames_1.default)(styles.wrapperSkeletLoader, classes) }, { children: (0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(styles.loader, loaderClasses) }) })));
|
|
46
46
|
};
|
|
47
47
|
exports.default = SkeletLoader;
|
|
@@ -95,7 +95,7 @@ var Selector = function (props) {
|
|
|
95
95
|
.map(function (i) { return getText(i.name); })
|
|
96
96
|
.join(joinSymbol);
|
|
97
97
|
}
|
|
98
|
-
var name = ((_a = data.find(function (i) { return i.id === activeId; })) === null || _a === void 0 ? void 0 : _a.name) ||
|
|
98
|
+
var name = ((_a = data.find(function (i) { return i.id === activeId; })) === null || _a === void 0 ? void 0 : _a.name) || '';
|
|
99
99
|
return getText(name);
|
|
100
100
|
};
|
|
101
101
|
(0, react_1.useEffect)(function () {
|
|
@@ -40,7 +40,7 @@ var Text_1 = require("components/Text");
|
|
|
40
40
|
var styles = __importStar(require("./ShowAllCard.module.css"));
|
|
41
41
|
var ShowAllCard = function (_a) {
|
|
42
42
|
var handleClick = _a.handleClick, appType = _a.appType, bgPath = _a.bgPath;
|
|
43
|
-
var path = bgPath || "/icons-elon/games/".concat(appType, ".png");
|
|
43
|
+
var path = bgPath || "/casino/icons-elon/games/".concat(appType, ".png");
|
|
44
44
|
return ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.wrapperShowAllCard, onClick: handleClick, style: {
|
|
45
45
|
background: "url(".concat(path, ")"),
|
|
46
46
|
backgroundSize: 'cover',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const IS_DEV: boolean;
|