tg-core-components 6.2.1-alpha.0 → 6.2.1-crypto.0
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/es/components/Money/index.js +24 -2
- package/es/components/Picture/index.js +1 -1
- package/es/index.js +1 -2
- package/es/lib/WithValidation/rules/blacklistedCharacters.js +3 -0
- package/es/lib/WithValidation/rules/noSpecialCharacters.js +3 -0
- package/es/lib/WithValidation/rules/phone.js +2 -2
- package/es/lib/utils/selectUnit.js +9 -13
- package/es/lib/utils/translate.js +1 -1
- package/es/misc/countryEmojiFlags.js +5 -0
- package/es/widgets/AccordionWidget/index.js +3 -11
- package/es/widgets/AccountDetail/index.js +100 -39
- package/es/widgets/ActivateWidget/index.js +1 -1
- package/es/widgets/BonusWidget/index.js +17 -32
- package/es/widgets/BonusWidget/types.js +23 -0
- package/es/widgets/Cashier/Deposit/PaymentForm/InjectedIframeHTML.js +7 -3
- package/es/widgets/Cashier/Deposit/PaymentForm/index.js +7 -5
- package/es/widgets/Cashier/Payment/PaymentAccountForms/index.js +41 -10
- package/es/widgets/Cashier/Payment/PaymentAccountParser.js +6 -0
- package/es/widgets/CashierAccordion/Deposit/DepositWidget/index.js +4 -1
- package/es/widgets/CashierAccordion/Payment/PaymentAccountForms/index.js +109 -71
- package/es/widgets/CashierAccordion/Payment/PaymentAccountParser.js +6 -0
- package/es/widgets/CashierAccordion/Withdraw/WithdrawWidget/index.js +5 -3
- package/es/widgets/HistoryWidget/index.js +19 -19
- package/es/widgets/ResponsibleGamingWidget/Timespan.js +5 -3
- package/lib/components/Money/index.js +25 -2
- package/lib/components/Picture/index.js +1 -1
- package/lib/index.js +6 -9
- package/lib/lib/WithValidation/rules/blacklistedCharacters.js +9 -0
- package/lib/lib/WithValidation/rules/noSpecialCharacters.js +9 -0
- package/lib/lib/WithValidation/rules/phone.js +2 -2
- package/lib/lib/utils/selectUnit.js +9 -13
- package/lib/lib/utils/translate.js +1 -1
- package/lib/misc/countryEmojiFlags.js +5 -0
- package/lib/widgets/AccordionWidget/index.js +3 -14
- package/lib/widgets/AccountDetail/index.js +112 -39
- package/lib/widgets/ActivateWidget/index.js +1 -1
- package/lib/widgets/BonusWidget/index.js +21 -32
- package/lib/widgets/BonusWidget/types.js +37 -0
- package/lib/widgets/Cashier/Deposit/PaymentForm/InjectedIframeHTML.js +7 -3
- package/lib/widgets/Cashier/Deposit/PaymentForm/index.js +7 -5
- package/lib/widgets/Cashier/Payment/PaymentAccountForms/index.js +42 -11
- package/lib/widgets/Cashier/Payment/PaymentAccountParser.js +6 -0
- package/lib/widgets/CashierAccordion/Deposit/DepositWidget/index.js +4 -1
- package/lib/widgets/CashierAccordion/Payment/PaymentAccountForms/index.js +110 -72
- package/lib/widgets/CashierAccordion/Payment/PaymentAccountParser.js +6 -0
- package/lib/widgets/CashierAccordion/Withdraw/WithdrawWidget/index.js +5 -3
- package/lib/widgets/HistoryWidget/index.js +19 -19
- package/lib/widgets/ResponsibleGamingWidget/Timespan.js +5 -3
- package/package.json +2 -2
- package/es/components/Message/index.js +0 -41
- package/es/lib/utils/bonus.js +0 -47
- package/es/widgets/BonusOffers/Actions.js +0 -167
- package/es/widgets/BonusOffers/BonusCode.js +0 -62
- package/es/widgets/BonusOffers/Details.js +0 -114
- package/es/widgets/BonusOffers/Finished.js +0 -18
- package/es/widgets/BonusOffers/List.js +0 -83
- package/es/widgets/BonusOffers/Overview.js +0 -51
- package/es/widgets/BonusOffers/index.js +0 -78
- package/lib/components/Message/index.js +0 -57
- package/lib/lib/utils/bonus.js +0 -52
- package/lib/widgets/BonusOffers/Actions.js +0 -182
- package/lib/widgets/BonusOffers/BonusCode.js +0 -85
- package/lib/widgets/BonusOffers/Details.js +0 -144
- package/lib/widgets/BonusOffers/Finished.js +0 -31
- package/lib/widgets/BonusOffers/List.js +0 -104
- package/lib/widgets/BonusOffers/Overview.js +0 -77
- package/lib/widgets/BonusOffers/index.js +0 -95
package/lib/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.AutocompleteInput = exports.Skeleton = exports.countryEmojiFlags = exports.Picture = exports.Translate = exports.VerifyAccordionWidget = exports.List = exports.ResponsibleGamingWidget = exports.ResponsibleGamingSingleSignUp = exports.ResponsibleGamingAccordionSignUp = exports.ResponsibleGamingAccordion = exports.WithdrawWidgetAccordion = exports.DepositWidgetAccordion = exports.SportsbookHistoryTable = exports.PaymentHistoryTable = exports.CasinoHistoryTable = exports.Subscriptions = exports.Verify = exports.TableWidget = exports.Settings = exports.Pagination = exports.SignIn = exports.RequestResetPassword = exports.ResetPassword = exports.ChangePassword = exports.ChangeUsername = exports.SignUp = exports.Withdraw = exports.Deposit = exports.Bonus = exports.Balance = exports.ActivateWidget = exports.AccountDetail = exports.AccordionWidget = exports.Uploader = exports.Textarea = exports.Single = exports.Select = exports.Radio = exports.Notification = exports.Money = exports.Loader = exports.InternalMessagesInbox = exports.Input = exports.Image = exports.Icon = exports.Checklist = exports.ButtonLoader = exports.Button = exports.Alert = exports.AcceptUpdatedTaC =
|
|
6
|
+
exports.AutocompleteInput = exports.Skeleton = exports.countryEmojiFlags = exports.Picture = exports.Translate = exports.VerifyAccordionWidget = exports.List = exports.ResponsibleGamingWidget = exports.ResponsibleGamingSingleSignUp = exports.ResponsibleGamingAccordionSignUp = exports.ResponsibleGamingAccordion = exports.WithdrawWidgetAccordion = exports.DepositWidgetAccordion = exports.SportsbookHistoryTable = exports.PaymentHistoryTable = exports.CasinoHistoryTable = exports.Subscriptions = exports.Verify = exports.TableWidget = exports.Settings = exports.Pagination = exports.SignIn = exports.RequestResetPassword = exports.ResetPassword = exports.ChangePassword = exports.ChangeUsername = exports.SignUp = exports.Withdraw = exports.Deposit = exports.Bonus = exports.Balance = exports.ActivateWidget = exports.AccountDetail = exports.AccordionWidget = exports.Uploader = exports.Textarea = exports.Single = exports.Select = exports.Radio = exports.Notification = exports.Money = exports.Loader = exports.InternalMessagesInbox = exports.Input = exports.Image = exports.Icon = exports.Checklist = exports.ButtonLoader = exports.Button = exports.Alert = exports.AcceptUpdatedTaC = undefined;
|
|
7
7
|
|
|
8
8
|
var _AcceptUpdatedTaC = require('./components/AcceptUpdatedTaC');
|
|
9
9
|
|
|
@@ -205,19 +205,12 @@ var _VerifyAccordionWidget = require('./widgets/VerifyAccordionWidget');
|
|
|
205
205
|
|
|
206
206
|
var _VerifyAccordionWidget2 = _interopRequireDefault(_VerifyAccordionWidget);
|
|
207
207
|
|
|
208
|
-
var _BonusOffers = require('./widgets/BonusOffers');
|
|
209
|
-
|
|
210
|
-
var _BonusOffers2 = _interopRequireDefault(_BonusOffers);
|
|
211
|
-
|
|
212
208
|
var _countryEmojiFlags = require('./misc/countryEmojiFlags');
|
|
213
209
|
|
|
214
210
|
var _countryEmojiFlags2 = _interopRequireDefault(_countryEmojiFlags);
|
|
215
211
|
|
|
216
212
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
217
213
|
|
|
218
|
-
// widgets
|
|
219
|
-
// components
|
|
220
|
-
exports.BonusOffers = _BonusOffers2.default;
|
|
221
214
|
exports.AcceptUpdatedTaC = _AcceptUpdatedTaC2.default;
|
|
222
215
|
exports.Alert = _Alert2.default;
|
|
223
216
|
exports.Button = _Button2.default;
|
|
@@ -270,4 +263,8 @@ exports.countryEmojiFlags = _countryEmojiFlags2.default;
|
|
|
270
263
|
exports.Skeleton = _Skeleton2.default;
|
|
271
264
|
exports.AutocompleteInput = _AutocompleteInput2.default;
|
|
272
265
|
|
|
273
|
-
// misc
|
|
266
|
+
// misc
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
// widgets
|
|
270
|
+
// components
|
|
@@ -13,55 +13,51 @@ var MILISECONDS = {
|
|
|
13
13
|
IN_A_YEAR: 31536000000
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
var selectUnit = exports.selectUnit = function selectUnit(
|
|
17
|
-
var isFuture = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
18
|
-
|
|
16
|
+
var selectUnit = exports.selectUnit = function selectUnit(from) {
|
|
19
17
|
var now = Date.now();
|
|
20
|
-
var ms =
|
|
21
|
-
|
|
22
|
-
var operatorCalc = isFuture ? 1 : -1;
|
|
18
|
+
var ms = now - from;
|
|
23
19
|
|
|
24
20
|
switch (true) {
|
|
25
21
|
case MILISECONDS.IN_A_SECOND < ms && ms < MILISECONDS.IN_A_MINUTE:
|
|
26
22
|
return {
|
|
27
|
-
value:
|
|
23
|
+
value: -1 * Math.floor(ms / MILISECONDS.IN_A_SECOND),
|
|
28
24
|
unit: 'second',
|
|
29
25
|
updateIntervalInSeconds: 1
|
|
30
26
|
};
|
|
31
27
|
|
|
32
28
|
case MILISECONDS.IN_A_MINUTE < ms && ms < MILISECONDS.IN_AN_HOUR:
|
|
33
29
|
return {
|
|
34
|
-
value:
|
|
30
|
+
value: -1 * Math.floor(ms / MILISECONDS.IN_A_MINUTE),
|
|
35
31
|
unit: 'minute'
|
|
36
32
|
};
|
|
37
33
|
|
|
38
34
|
case MILISECONDS.IN_AN_HOUR < ms && ms < MILISECONDS.IN_A_DAY:
|
|
39
35
|
return {
|
|
40
|
-
value:
|
|
36
|
+
value: -1 * Math.floor(ms / MILISECONDS.IN_AN_HOUR),
|
|
41
37
|
unit: 'hour'
|
|
42
38
|
};
|
|
43
39
|
|
|
44
40
|
case MILISECONDS.IN_A_DAY < ms && ms < MILISECONDS.IN_A_WEEK:
|
|
45
41
|
return {
|
|
46
|
-
value:
|
|
42
|
+
value: -1 * Math.floor(ms / MILISECONDS.IN_A_DAY),
|
|
47
43
|
unit: 'day'
|
|
48
44
|
};
|
|
49
45
|
|
|
50
46
|
case MILISECONDS.IN_A_WEEK < ms && ms < MILISECONDS.IN_A_MONTH:
|
|
51
47
|
return {
|
|
52
|
-
value:
|
|
48
|
+
value: -1 * Math.floor(ms / MILISECONDS.IN_A_WEEK),
|
|
53
49
|
unit: 'week'
|
|
54
50
|
};
|
|
55
51
|
|
|
56
52
|
case MILISECONDS.IN_A_MONTH < ms && ms < MILISECONDS.IN_A_YEAR:
|
|
57
53
|
return {
|
|
58
|
-
value:
|
|
54
|
+
value: -1 * Math.floor(ms / MILISECONDS.IN_A_MONTH),
|
|
59
55
|
unit: 'month'
|
|
60
56
|
};
|
|
61
57
|
|
|
62
58
|
case MILISECONDS.IN_A_YEAR < ms:
|
|
63
59
|
return {
|
|
64
|
-
value:
|
|
60
|
+
value: -1 * Math.floor(ms / MILISECONDS.IN_A_YEAR),
|
|
65
61
|
unit: 'year'
|
|
66
62
|
};
|
|
67
63
|
|
|
@@ -15,7 +15,7 @@ var translate = function translate(_ref, intl) {
|
|
|
15
15
|
values = _ref.values,
|
|
16
16
|
rest = _objectWithoutProperties(_ref, ['id', 'values']);
|
|
17
17
|
|
|
18
|
-
var cacheId = id + (JSON.stringify(values) || '');
|
|
18
|
+
var cacheId = id + (typeof intl !== 'undefined' ? intl.locale : '') + (JSON.stringify(values) || '');
|
|
19
19
|
if (cache[cacheId]) return cache[cacheId];
|
|
20
20
|
|
|
21
21
|
var g = typeof window !== 'undefined' && window || typeof global !== 'undefined' && global || {};
|
|
@@ -14,6 +14,7 @@ exports.default = {
|
|
|
14
14
|
AG: '🇦🇬',
|
|
15
15
|
AU: '🇦🇺',
|
|
16
16
|
AT: '🇦🇹',
|
|
17
|
+
AW: '🇦🇼',
|
|
17
18
|
AZ: '🇦🇿',
|
|
18
19
|
BI: '🇧🇮',
|
|
19
20
|
BE: '🇧🇪',
|
|
@@ -29,6 +30,7 @@ exports.default = {
|
|
|
29
30
|
BO: '🇧🇴',
|
|
30
31
|
BR: '🇧🇷',
|
|
31
32
|
BB: '🇧🇧',
|
|
33
|
+
BM: '🇧🇲',
|
|
32
34
|
BN: '🇧🇳',
|
|
33
35
|
BT: '🇧🇹',
|
|
34
36
|
BW: '🇧🇼',
|
|
@@ -38,6 +40,7 @@ exports.default = {
|
|
|
38
40
|
CL: '🇨🇱',
|
|
39
41
|
CN: '🇨🇳',
|
|
40
42
|
CI: '🇨🇮',
|
|
43
|
+
CK: '🇨🇰',
|
|
41
44
|
CM: '🇨🇲',
|
|
42
45
|
CD: '🇨🇩',
|
|
43
46
|
CG: '🇨🇬',
|
|
@@ -172,6 +175,7 @@ exports.default = {
|
|
|
172
175
|
SZ: '🇸🇿',
|
|
173
176
|
SC: '🇸🇨',
|
|
174
177
|
SY: '🇸🇾',
|
|
178
|
+
TC: '🇹🇨',
|
|
175
179
|
TD: '🇹🇩',
|
|
176
180
|
TG: '🇹🇬',
|
|
177
181
|
TH: '🇹🇭',
|
|
@@ -183,6 +187,7 @@ exports.default = {
|
|
|
183
187
|
TN: '🇹🇳',
|
|
184
188
|
TR: '🇹🇷',
|
|
185
189
|
TV: '🇹🇻',
|
|
190
|
+
TW: '🇹🇼',
|
|
186
191
|
TZ: '🇹🇿',
|
|
187
192
|
UG: '🇺🇬',
|
|
188
193
|
UA: '🇺🇦',
|
|
@@ -28,10 +28,6 @@ var _Icon = require('../../components/Icon');
|
|
|
28
28
|
|
|
29
29
|
var _Icon2 = _interopRequireDefault(_Icon);
|
|
30
30
|
|
|
31
|
-
var _classnames = require('classnames');
|
|
32
|
-
|
|
33
|
-
var _classnames2 = _interopRequireDefault(_classnames);
|
|
34
|
-
|
|
35
31
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
36
32
|
|
|
37
33
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -40,8 +36,6 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
|
|
|
40
36
|
|
|
41
37
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
42
38
|
|
|
43
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
44
|
-
|
|
45
39
|
var AccordionHeader = function AccordionHeader(_ref) {
|
|
46
40
|
var expanded = _ref.expanded,
|
|
47
41
|
header = _ref.header,
|
|
@@ -108,14 +102,10 @@ var AccordionContent = function AccordionContent(_ref2) {
|
|
|
108
102
|
var AccordionItem = function AccordionItem(_ref3) {
|
|
109
103
|
var header = _ref3.header,
|
|
110
104
|
content = _ref3.content,
|
|
111
|
-
expanded = _ref3.expanded
|
|
112
|
-
customClass = _ref3.customClass;
|
|
105
|
+
expanded = _ref3.expanded;
|
|
113
106
|
return _react2.default.createElement(
|
|
114
107
|
'div',
|
|
115
|
-
{
|
|
116
|
-
className: (0, _classnames2.default)('AccordionItem', _defineProperty({
|
|
117
|
-
'AccordionItem--expanded': expanded
|
|
118
|
-
}, 'AccordionItem--' + customClass, customClass)) },
|
|
108
|
+
{ className: 'AccordionItem' + (expanded ? ' AccordionItem--expanded' : '') },
|
|
119
109
|
header,
|
|
120
110
|
content
|
|
121
111
|
);
|
|
@@ -204,8 +194,7 @@ var Accordion = function (_Component) {
|
|
|
204
194
|
animationDuration: animationDuration,
|
|
205
195
|
contentCollapsedHeight: contentCollapsedHeight
|
|
206
196
|
}),
|
|
207
|
-
key: index
|
|
208
|
-
customClass: item.customClass
|
|
197
|
+
key: index
|
|
209
198
|
};
|
|
210
199
|
});
|
|
211
200
|
|
|
@@ -22,6 +22,22 @@ var _required = require('../../lib/WithValidation/rules/required');
|
|
|
22
22
|
|
|
23
23
|
var _required2 = _interopRequireDefault(_required);
|
|
24
24
|
|
|
25
|
+
var _phone = require('../../lib/WithValidation/rules/phone');
|
|
26
|
+
|
|
27
|
+
var _phone2 = _interopRequireDefault(_phone);
|
|
28
|
+
|
|
29
|
+
var _blacklistedCharacters = require('../../lib/WithValidation/rules/blacklistedCharacters');
|
|
30
|
+
|
|
31
|
+
var _blacklistedCharacters2 = _interopRequireDefault(_blacklistedCharacters);
|
|
32
|
+
|
|
33
|
+
var _noSpecialCharacters = require('../../lib/WithValidation/rules/noSpecialCharacters');
|
|
34
|
+
|
|
35
|
+
var _noSpecialCharacters2 = _interopRequireDefault(_noSpecialCharacters);
|
|
36
|
+
|
|
37
|
+
var _stringWithoutNumbers = require('../../lib/WithValidation/rules/stringWithoutNumbers');
|
|
38
|
+
|
|
39
|
+
var _stringWithoutNumbers2 = _interopRequireDefault(_stringWithoutNumbers);
|
|
40
|
+
|
|
25
41
|
var _WithValidation = require('../../lib/WithValidation');
|
|
26
42
|
|
|
27
43
|
var _WithValidation2 = _interopRequireDefault(_WithValidation);
|
|
@@ -52,6 +68,32 @@ var _Icon2 = _interopRequireDefault(_Icon);
|
|
|
52
68
|
|
|
53
69
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
54
70
|
|
|
71
|
+
var genders = [{
|
|
72
|
+
label: function label(intl) {
|
|
73
|
+
return (0, _translate2.default)({
|
|
74
|
+
id: 'noun.male',
|
|
75
|
+
defaultMessage: 'Male'
|
|
76
|
+
}, intl);
|
|
77
|
+
},
|
|
78
|
+
value: 'Male'
|
|
79
|
+
}, {
|
|
80
|
+
label: function label(intl) {
|
|
81
|
+
return (0, _translate2.default)({
|
|
82
|
+
id: 'noun.female',
|
|
83
|
+
defaultMessage: 'Female'
|
|
84
|
+
}, intl);
|
|
85
|
+
},
|
|
86
|
+
value: 'Female'
|
|
87
|
+
}, {
|
|
88
|
+
label: function label(intl) {
|
|
89
|
+
return (0, _translate2.default)({
|
|
90
|
+
id: 'noun.other',
|
|
91
|
+
defaultMessage: 'Other'
|
|
92
|
+
}, intl);
|
|
93
|
+
},
|
|
94
|
+
value: 'Other'
|
|
95
|
+
}];
|
|
96
|
+
|
|
55
97
|
var AccountDetail = function AccountDetail(_ref) {
|
|
56
98
|
var data = _ref.data,
|
|
57
99
|
intl = _ref.intl,
|
|
@@ -59,7 +101,9 @@ var AccountDetail = function AccountDetail(_ref) {
|
|
|
59
101
|
onSubmit = _ref.onSubmit,
|
|
60
102
|
jurisdiction = _ref.jurisdiction,
|
|
61
103
|
countries = _ref.countries,
|
|
62
|
-
isLoading = _ref.isLoading
|
|
104
|
+
isLoading = _ref.isLoading,
|
|
105
|
+
isComplete = _ref.isComplete,
|
|
106
|
+
showCallingCode = _ref.showCallingCode;
|
|
63
107
|
|
|
64
108
|
return _react2.default.createElement(
|
|
65
109
|
'form',
|
|
@@ -134,33 +178,24 @@ var AccountDetail = function AccountDetail(_ref) {
|
|
|
134
178
|
_react2.default.createElement(
|
|
135
179
|
_Select2.default,
|
|
136
180
|
{
|
|
137
|
-
disabled:
|
|
181
|
+
disabled: isComplete,
|
|
138
182
|
className: 'layout-item-6',
|
|
139
|
-
value:
|
|
140
|
-
return c.value === data.Country;
|
|
141
|
-
}) && countries.value.find(function (c) {
|
|
142
|
-
return c.value === data.Country;
|
|
143
|
-
}).value,
|
|
183
|
+
value: data.Country,
|
|
144
184
|
label: (0, _translate2.default)({
|
|
145
185
|
id: 'title.country',
|
|
146
186
|
defaultMessage: 'Country'
|
|
147
187
|
}, intl),
|
|
148
188
|
name: 'Country',
|
|
149
189
|
icon: _react2.default.createElement(_Icon2.default, { icon: 'flag' }) },
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
return c.value === data.Country;
|
|
160
|
-
}) && countries.value.find(function (c) {
|
|
161
|
-
return c.value === data.Country;
|
|
162
|
-
}).label
|
|
163
|
-
)
|
|
190
|
+
countries.sort(function (a, b) {
|
|
191
|
+
return a.label.localeCompare(b.label);
|
|
192
|
+
}).map(function (c) {
|
|
193
|
+
return _react2.default.createElement(
|
|
194
|
+
_Select2.default.Option,
|
|
195
|
+
{ key: c.value, value: c.value },
|
|
196
|
+
c.label
|
|
197
|
+
);
|
|
198
|
+
})
|
|
164
199
|
),
|
|
165
200
|
_react2.default.createElement(_Input2.default, {
|
|
166
201
|
disabled: true,
|
|
@@ -173,15 +208,6 @@ var AccountDetail = function AccountDetail(_ref) {
|
|
|
173
208
|
name: 'BirthDate'
|
|
174
209
|
})
|
|
175
210
|
),
|
|
176
|
-
_react2.default.createElement(_Input2.default, {
|
|
177
|
-
disabled: true,
|
|
178
|
-
value: data.Email,
|
|
179
|
-
label: (0, _translate2.default)({
|
|
180
|
-
id: 'title.email',
|
|
181
|
-
defaultMessage: 'Email'
|
|
182
|
-
}, intl),
|
|
183
|
-
name: 'Email'
|
|
184
|
-
}),
|
|
185
211
|
_react2.default.createElement(_Input2.default, {
|
|
186
212
|
value: data.MobilePhoneNumber,
|
|
187
213
|
type: 'tel',
|
|
@@ -189,7 +215,7 @@ var AccountDetail = function AccountDetail(_ref) {
|
|
|
189
215
|
id: 'title.mobile_number',
|
|
190
216
|
defaultMessage: 'Mobile number'
|
|
191
217
|
}, intl),
|
|
192
|
-
callingCodes: countries ? countries.
|
|
218
|
+
callingCodes: showCallingCode && countries ? countries.sort(function (a, b) {
|
|
193
219
|
return Number(a.callingCode) - Number(b.callingCode);
|
|
194
220
|
}).map(function (i) {
|
|
195
221
|
return {
|
|
@@ -202,6 +228,48 @@ var AccountDetail = function AccountDetail(_ref) {
|
|
|
202
228
|
status: errors.MobilePhoneNumber && 'failure' || 'idle',
|
|
203
229
|
statusText: errors.MobilePhoneNumber && (0, _translate2.default)({ id: errors.MobilePhoneNumber }, intl)
|
|
204
230
|
}),
|
|
231
|
+
_react2.default.createElement(
|
|
232
|
+
'div',
|
|
233
|
+
{ className: 'layout-item' },
|
|
234
|
+
_react2.default.createElement(_Input2.default, {
|
|
235
|
+
className: 'layout-item-6',
|
|
236
|
+
disabled: true,
|
|
237
|
+
value: data.Email,
|
|
238
|
+
label: (0, _translate2.default)({
|
|
239
|
+
id: 'title.email',
|
|
240
|
+
defaultMessage: 'Email'
|
|
241
|
+
}, intl),
|
|
242
|
+
name: 'Email'
|
|
243
|
+
}),
|
|
244
|
+
_react2.default.createElement(
|
|
245
|
+
_Select2.default,
|
|
246
|
+
{
|
|
247
|
+
className: 'layout-item-6',
|
|
248
|
+
value: data.Gender,
|
|
249
|
+
label: (0, _translate2.default)({
|
|
250
|
+
id: 'title.gender',
|
|
251
|
+
defaultMessage: 'Gender'
|
|
252
|
+
}, intl),
|
|
253
|
+
name: 'Gender',
|
|
254
|
+
status: errors.Gender && 'failure' || 'idle',
|
|
255
|
+
statusText: errors.Gender && (0, _translate2.default)({ id: errors.Gender }, intl) },
|
|
256
|
+
_react2.default.createElement(
|
|
257
|
+
_Select2.default.Option,
|
|
258
|
+
{ value: '', disabled: true },
|
|
259
|
+
(0, _translate2.default)({
|
|
260
|
+
id: 'label.select-gender',
|
|
261
|
+
defaultMessage: 'Select gender'
|
|
262
|
+
}, intl)
|
|
263
|
+
),
|
|
264
|
+
genders.map(function (gender) {
|
|
265
|
+
return _react2.default.createElement(
|
|
266
|
+
_Select2.default.Option,
|
|
267
|
+
{ value: gender.value },
|
|
268
|
+
gender.label(intl)
|
|
269
|
+
);
|
|
270
|
+
})
|
|
271
|
+
)
|
|
272
|
+
),
|
|
205
273
|
!['sga', 'dga'].includes(jurisdiction) && _react2.default.createElement(
|
|
206
274
|
_react.Fragment,
|
|
207
275
|
null,
|
|
@@ -216,7 +284,7 @@ var AccountDetail = function AccountDetail(_ref) {
|
|
|
216
284
|
name: 'Password',
|
|
217
285
|
status: errors.Password && 'failure' || 'idle',
|
|
218
286
|
statusText: errors.Password && (0, _translate2.default)({ id: errors.Password }, intl),
|
|
219
|
-
|
|
287
|
+
autocomplete: 'new-password'
|
|
220
288
|
})
|
|
221
289
|
),
|
|
222
290
|
_react2.default.createElement(
|
|
@@ -247,7 +315,9 @@ AccountDetail.propTypes = {
|
|
|
247
315
|
/** Array of validation errors where the error display depends on which invalid rule it breaks */
|
|
248
316
|
error: _propTypes2.default.array,
|
|
249
317
|
/** The submission function firing when submitting the form */
|
|
250
|
-
onSubmit: _propTypes2.default.func
|
|
318
|
+
onSubmit: _propTypes2.default.func,
|
|
319
|
+
/** If the user profile is complete or not */
|
|
320
|
+
isComplete: _propTypes2.default.bool
|
|
251
321
|
};
|
|
252
322
|
|
|
253
323
|
AccountDetail.defaultProps = {
|
|
@@ -257,15 +327,18 @@ AccountDetail.defaultProps = {
|
|
|
257
327
|
value: '',
|
|
258
328
|
name: '',
|
|
259
329
|
error: [],
|
|
260
|
-
onSubmit: Function
|
|
330
|
+
onSubmit: Function,
|
|
331
|
+
isComplete: false
|
|
261
332
|
};
|
|
262
333
|
|
|
263
334
|
var rules = {
|
|
264
|
-
MobilePhoneNumber: [[_required2.default, 'error.empty.mobilePhoneNumber']],
|
|
265
|
-
Address1: [[_required2.default, 'error.empty.address']],
|
|
266
|
-
Zip: [[_required2.default, 'error.empty.zip_code']],
|
|
267
|
-
City: [[_required2.default, 'error.empty.city']],
|
|
268
|
-
Password: [[_required2.default, 'error.empty.password']]
|
|
335
|
+
MobilePhoneNumber: [[_required2.default, 'error.empty.mobilePhoneNumber'], [_phone2.default, 'error.condition.phone']],
|
|
336
|
+
Address1: [[_required2.default, 'error.empty.address'], [_blacklistedCharacters2.default, 'error.format.address']],
|
|
337
|
+
Zip: [[_required2.default, 'error.empty.zip_code'], [_noSpecialCharacters2.default, 'error.format.zip']],
|
|
338
|
+
City: [[_required2.default, 'error.empty.city'], [_stringWithoutNumbers2.default, 'error.invalid.city'], [_blacklistedCharacters2.default, 'error.invalid.city']],
|
|
339
|
+
Password: [[_required2.default, 'error.empty.password']],
|
|
340
|
+
Country: [[_required2.default, 'error.empty.country']],
|
|
341
|
+
Gender: [[_required2.default, 'error.empty.gender']]
|
|
269
342
|
};
|
|
270
343
|
|
|
271
344
|
exports.default = (0, _compose2.default)((0, _WithValidation2.default)(rules), _reactIntl.injectIntl)(AccountDetail);
|
|
@@ -93,7 +93,7 @@ var ActivationCode = function ActivationCode(_ref) {
|
|
|
93
93
|
}, [autoFocus, code]);
|
|
94
94
|
|
|
95
95
|
(0, _react.useEffect)(function () {
|
|
96
|
-
|
|
96
|
+
inputRef.current.value = code;
|
|
97
97
|
}, [code]);
|
|
98
98
|
|
|
99
99
|
var setCaretPosition = function setCaretPosition(from, to) {
|
|
@@ -30,16 +30,20 @@ var _Translate = require('../../components/Translate');
|
|
|
30
30
|
|
|
31
31
|
var _Translate2 = _interopRequireDefault(_Translate);
|
|
32
32
|
|
|
33
|
+
var _Money = require('../../components/Money');
|
|
34
|
+
|
|
35
|
+
var _Money2 = _interopRequireDefault(_Money);
|
|
36
|
+
|
|
33
37
|
var _states = require('./states');
|
|
34
38
|
|
|
39
|
+
var _types = require('./types');
|
|
40
|
+
|
|
35
41
|
var _marked = require('marked');
|
|
36
42
|
|
|
37
43
|
var _marked2 = _interopRequireDefault(_marked);
|
|
38
44
|
|
|
39
45
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
40
46
|
|
|
41
|
-
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
|
42
|
-
|
|
43
47
|
var ALEACC_BONUS_CLAIM_STATE = ['Initiated', 'PreClaimed'];
|
|
44
48
|
var ALEACC_BONUS_REJECT_STATE = ['Initiated', 'PreClaimed', 'Pending', 'PreWager'];
|
|
45
49
|
var ALEACC_BONUS_ACTION_STATE = [].concat(ALEACC_BONUS_CLAIM_STATE, ALEACC_BONUS_REJECT_STATE);
|
|
@@ -157,10 +161,7 @@ var BonusWidget = function BonusWidget(_ref3) {
|
|
|
157
161
|
var bonuses = _ref3.bonuses,
|
|
158
162
|
handleBonusCodeSubmit = _ref3.handleBonusCodeSubmit,
|
|
159
163
|
onClaimBonus = _ref3.onClaimBonus,
|
|
160
|
-
onRejectBonus = _ref3.onRejectBonus
|
|
161
|
-
_ref3$exclude = _ref3.exclude,
|
|
162
|
-
exclude = _ref3$exclude === undefined ? [] : _ref3$exclude,
|
|
163
|
-
disableBonusCodeForm = _ref3.disableBonusCodeForm;
|
|
164
|
+
onRejectBonus = _ref3.onRejectBonus;
|
|
164
165
|
|
|
165
166
|
var bonusList = { active: null, available: null, finished: null };
|
|
166
167
|
|
|
@@ -190,10 +191,11 @@ var BonusWidget = function BonusWidget(_ref3) {
|
|
|
190
191
|
var info = [[_react2.default.createElement(
|
|
191
192
|
'div',
|
|
192
193
|
null,
|
|
193
|
-
_react2.default.createElement(
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
194
|
+
_react2.default.createElement(
|
|
195
|
+
'span',
|
|
196
|
+
null,
|
|
197
|
+
item.Name || item.Description
|
|
198
|
+
)
|
|
197
199
|
), _react2.default.createElement(
|
|
198
200
|
'div',
|
|
199
201
|
null,
|
|
@@ -201,15 +203,8 @@ var BonusWidget = function BonusWidget(_ref3) {
|
|
|
201
203
|
)], [_react2.default.createElement(
|
|
202
204
|
'div',
|
|
203
205
|
{ className: 'amount' },
|
|
204
|
-
_react2.default.createElement(_reactIntl.FormattedNumber, {
|
|
205
|
-
|
|
206
|
-
style: item.Type.toLowerCase() == 'freespins' ? 'decimal' : 'currency',
|
|
207
|
-
currency: item.Currency
|
|
208
|
-
})
|
|
209
|
-
), _react2.default.createElement(_Translate2.default, {
|
|
210
|
-
id: 'label.type.bonus.' + item.Type.toLowerCase(),
|
|
211
|
-
defaultMessage: item.Type.toLowerCase()
|
|
212
|
-
})]];
|
|
206
|
+
item.Type.toLowerCase() == 'freespins' ? _react2.default.createElement(_reactIntl.FormattedNumber, { value: item.Amount, style: 'decimal' }) : _react2.default.createElement(_Money2.default, { value: item.Amount, currency: item.Currency })
|
|
207
|
+
), (0, _types.getBonusType)(item.Type)]];
|
|
213
208
|
|
|
214
209
|
// Add bonus actions to not expired Fasttrack bonuses
|
|
215
210
|
if (item.Provider === 'fasttrack' && item.State !== 'Expired') info.push(_react2.default.createElement(BonusActionFT, { bonus: item, onClaimBonus: onClaimBonus }));
|
|
@@ -295,25 +290,19 @@ var BonusWidget = function BonusWidget(_ref3) {
|
|
|
295
290
|
|
|
296
291
|
var menu = {
|
|
297
292
|
identifier: 'account-history',
|
|
298
|
-
items: [
|
|
293
|
+
items: [{
|
|
299
294
|
name: _react2.default.createElement(_Translate2.default, { id: 'label.active', defaultMessage: 'Activate' }),
|
|
300
295
|
content: _react2.default.createElement(_tgCoreComponents.List, { data: bonusList['active'], noData: 'list.no_data.active' })
|
|
301
|
-
}
|
|
296
|
+
}, {
|
|
302
297
|
name: _react2.default.createElement(_Translate2.default, { id: 'label.available', defaultMessage: 'Available' }),
|
|
303
|
-
content: _react2.default.createElement(_tgCoreComponents.List, {
|
|
304
|
-
|
|
305
|
-
noData: 'list.no_data.available'
|
|
306
|
-
})
|
|
307
|
-
}] : []), _toConsumableArray(!exclude.includes('finished') ? [{
|
|
298
|
+
content: _react2.default.createElement(_tgCoreComponents.List, { data: bonusList['available'], noData: 'list.no_data.available' })
|
|
299
|
+
}, {
|
|
308
300
|
name: _react2.default.createElement(_Translate2.default, { id: 'label.finished', defaultMessage: 'Finished' }),
|
|
309
|
-
content: _react2.default.createElement(_tgCoreComponents.List, {
|
|
310
|
-
|
|
311
|
-
noData: 'list.no_data.finished'
|
|
312
|
-
})
|
|
313
|
-
}] : []), _toConsumableArray(disableBonusCodeForm && {
|
|
301
|
+
content: _react2.default.createElement(_tgCoreComponents.List, { data: bonusList['finished'], noData: 'list.no_data.finished' })
|
|
302
|
+
}, {
|
|
314
303
|
name: _react2.default.createElement(_Translate2.default, { id: 'label.bonus_code', defaultMessage: 'Bonus code' }),
|
|
315
304
|
content: _react2.default.createElement(_BonusCode2.default, { handleSubmit: handleBonusCodeSubmit })
|
|
316
|
-
}
|
|
305
|
+
}]
|
|
317
306
|
};
|
|
318
307
|
|
|
319
308
|
var items = menu.items.map(function (item, i) {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getBonusType = undefined;
|
|
7
|
+
|
|
8
|
+
var _react = require('react');
|
|
9
|
+
|
|
10
|
+
var _react2 = _interopRequireDefault(_react);
|
|
11
|
+
|
|
12
|
+
var _Translate = require('../../components/Translate');
|
|
13
|
+
|
|
14
|
+
var _Translate2 = _interopRequireDefault(_Translate);
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
var getBonusType = exports.getBonusType = function getBonusType(type) {
|
|
19
|
+
var translations = {
|
|
20
|
+
Monetary: _react2.default.createElement(_Translate2.default, { id: 'label.type.bonus.monetary', defaultMessage: 'Monetary' }),
|
|
21
|
+
Freespins: _react2.default.createElement(_Translate2.default, { id: 'label.type.bonus.freespins', defaultMessage: 'Freespins' }),
|
|
22
|
+
FreespinsMonetary: _react2.default.createElement(_Translate2.default, {
|
|
23
|
+
id: 'label.type.bonus.freespinsMonetary',
|
|
24
|
+
defaultMessage: 'Freespins Monetary'
|
|
25
|
+
}),
|
|
26
|
+
FreeBetsMonetary: _react2.default.createElement(_Translate2.default, {
|
|
27
|
+
id: 'label.type.bonus.freeBetsMonetary',
|
|
28
|
+
defaultMessage: 'Free Bets Monetary'
|
|
29
|
+
})
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
return translations[type] || _react2.default.createElement(
|
|
33
|
+
'span',
|
|
34
|
+
null,
|
|
35
|
+
type
|
|
36
|
+
);
|
|
37
|
+
};
|
|
@@ -4,6 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
8
|
+
|
|
7
9
|
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
8
10
|
|
|
9
11
|
var _react = require('react');
|
|
@@ -50,9 +52,11 @@ var InjectedIframeHTML = function (_Component) {
|
|
|
50
52
|
value: function render() {
|
|
51
53
|
var _this2 = this;
|
|
52
54
|
|
|
53
|
-
var
|
|
55
|
+
var _props = this.props,
|
|
56
|
+
data = _props.data,
|
|
57
|
+
iframeProps = _props.iframeProps;
|
|
54
58
|
|
|
55
|
-
return _react2.default.createElement('iframe', {
|
|
59
|
+
return _react2.default.createElement('iframe', _extends({
|
|
56
60
|
ref: function ref(node) {
|
|
57
61
|
return _this2._iframe = node;
|
|
58
62
|
},
|
|
@@ -60,7 +64,7 @@ var InjectedIframeHTML = function (_Component) {
|
|
|
60
64
|
width: '100%',
|
|
61
65
|
height: data.redirectOutput.height,
|
|
62
66
|
onLoad: this.handleLoad
|
|
63
|
-
});
|
|
67
|
+
}, iframeProps));
|
|
64
68
|
}
|
|
65
69
|
}]);
|
|
66
70
|
|