tg-core-components 5.4.3-bethard-account-changes.0 → 5.5.0-master
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/AcceptUpdatedTaC/index.js +8 -3
- package/es/components/Checkbox/index.js +93 -0
- package/es/components/Deposit/CardInput/index.js +1 -3
- package/es/components/Input/index.js +222 -22
- package/es/components/InputWrapper/index.js +69 -0
- package/es/components/List/ListItem.js +1 -7
- package/es/components/Notification.js +4 -4
- package/es/components/Select/index.js +202 -64
- package/es/components/Select/test.js +111 -0
- package/es/index.js +2 -2
- package/es/lib/utils/translate.js +1 -8
- package/es/misc/countryEmojiFlags.js +0 -1
- package/es/widgets/AccountDetail/index.js +53 -77
- package/es/widgets/ActivateWidget/index.js +59 -293
- package/es/widgets/BonusWidget/BonusCode.js +24 -17
- package/es/widgets/BonusWidget/index.js +83 -45
- package/es/widgets/Cashier/Payment/index.js +2 -0
- package/es/widgets/CashierAccordion/Deposit/BonusCodeInput/index.js +9 -6
- package/es/widgets/CashierAccordion/Deposit/DepositWidget/index.js +47 -85
- package/es/widgets/CashierAccordion/Deposit/PaymentForm/index.js +2 -6
- package/es/widgets/CashierAccordion/Payment/PaymentAccountForms/astroPayBankTransaltions.js +12 -0
- package/es/widgets/CashierAccordion/Payment/PaymentAccountForms/index.js +163 -347
- package/es/widgets/CashierAccordion/Payment/PaymentAccountParser.js +0 -6
- package/es/widgets/CashierAccordion/Payment/PaymentMethodSelector/index.js +2 -2
- package/es/widgets/CashierAccordion/Payment/index.js +2 -0
- package/es/widgets/CashierAccordion/Withdraw/WithdrawWidget/index.js +8 -22
- package/es/widgets/ChangePassword/index.js +53 -40
- package/es/widgets/HistoryWidget/index.js +69 -51
- package/es/widgets/HistoryWidget/message.js +17 -20
- package/es/widgets/RequestResetPassword/index.js +15 -14
- package/es/widgets/ResetPassword/index.js +22 -18
- package/es/widgets/ResponsibleGamingAccordion/LimitStatus/index.js +5 -2
- package/es/widgets/ResponsibleGamingAccordion/PeriodItemContent/index.js +1 -2
- package/es/widgets/ResponsibleGamingSingleSignUp/AmountItem/index.js +1 -2
- package/es/widgets/ResponsibleGamingWidget/Timespan.js +14 -24
- package/es/widgets/ResponsibleGamingWidget/helpers.js +2 -2
- package/es/widgets/ResponsibleGamingWidget/validate.js +2 -6
- package/es/widgets/Settings/index.js +2 -2
- package/es/widgets/SignIn/SignInForm.js +4 -6
- package/es/widgets/SignIn/index.js +21 -21
- package/es/widgets/SignUp/ContactInfoStep.js +5 -6
- package/es/widgets/SportsbookSettings/index.js +10 -24
- package/es/widgets/Subscriptions/index.js +3 -5
- package/lib/components/AcceptUpdatedTaC/index.js +11 -3
- package/lib/components/Checkbox/index.js +106 -0
- package/lib/components/Deposit/CardInput/index.js +1 -3
- package/lib/components/Input/index.js +223 -26
- package/lib/components/InputWrapper/index.js +85 -0
- package/lib/components/List/ListItem.js +1 -10
- package/lib/components/Notification.js +3 -3
- package/lib/components/Select/index.js +209 -63
- package/lib/components/Select/test.js +121 -0
- package/lib/index.js +7 -7
- package/lib/lib/utils/translate.js +1 -8
- package/lib/misc/countryEmojiFlags.js +0 -1
- package/lib/widgets/AccountDetail/index.js +53 -86
- package/lib/widgets/ActivateWidget/index.js +58 -305
- package/lib/widgets/BonusWidget/BonusCode.js +24 -20
- package/lib/widgets/BonusWidget/index.js +85 -44
- package/lib/widgets/Cashier/Payment/index.js +2 -0
- package/lib/widgets/CashierAccordion/Deposit/BonusCodeInput/index.js +13 -7
- package/lib/widgets/CashierAccordion/Deposit/DepositWidget/index.js +50 -88
- package/lib/widgets/CashierAccordion/Deposit/PaymentForm/index.js +2 -9
- package/lib/widgets/CashierAccordion/Payment/PaymentAccountForms/astroPayBankTransaltions.js +12 -0
- package/lib/widgets/CashierAccordion/Payment/PaymentAccountForms/index.js +195 -378
- package/lib/widgets/CashierAccordion/Payment/PaymentAccountParser.js +0 -6
- package/lib/widgets/CashierAccordion/Payment/PaymentMethodSelector/index.js +2 -2
- package/lib/widgets/CashierAccordion/Payment/index.js +2 -0
- package/lib/widgets/CashierAccordion/Withdraw/WithdrawWidget/index.js +10 -24
- package/lib/widgets/ChangePassword/index.js +53 -43
- package/lib/widgets/HistoryWidget/index.js +69 -51
- package/lib/widgets/HistoryWidget/message.js +17 -20
- package/lib/widgets/RequestResetPassword/index.js +15 -17
- package/lib/widgets/ResetPassword/index.js +25 -21
- package/lib/widgets/ResponsibleGamingAccordion/LimitStatus/index.js +5 -2
- package/lib/widgets/ResponsibleGamingAccordion/PeriodItemContent/index.js +1 -2
- package/lib/widgets/ResponsibleGamingSingleSignUp/AmountItem/index.js +1 -2
- package/lib/widgets/ResponsibleGamingWidget/Timespan.js +14 -24
- package/lib/widgets/ResponsibleGamingWidget/helpers.js +2 -2
- package/lib/widgets/ResponsibleGamingWidget/validate.js +2 -6
- package/lib/widgets/Settings/index.js +6 -6
- package/lib/widgets/SignIn/SignInForm.js +7 -6
- package/lib/widgets/SignIn/index.js +25 -25
- package/lib/widgets/SignUp/ContactInfoStep.js +8 -6
- package/lib/widgets/SportsbookSettings/index.js +10 -24
- package/lib/widgets/Subscriptions/index.js +3 -11
- package/package.json +8 -3
- package/es/components/AutocompleteInput/index.js +0 -104
- package/es/components/Input/BirthdateInput.js +0 -174
- package/es/components/Input/Checkbox.js +0 -51
- package/es/components/Input/Input.js +0 -73
- package/es/components/Input/PasswordInput.js +0 -84
- package/es/components/Input/PhoneNumberInput.js +0 -111
- package/es/components/Input/input.test.js +0 -80
- package/es/components/Input/old-input.test.js +0 -100
- package/es/components/common.js +0 -339
- package/es/widgets/CashierAccordion/Deposit/PaymentForm/NewTab.js +0 -28
- package/lib/components/AutocompleteInput/index.js +0 -118
- package/lib/components/Input/BirthdateInput.js +0 -195
- package/lib/components/Input/Checkbox.js +0 -65
- package/lib/components/Input/Input.js +0 -87
- package/lib/components/Input/PasswordInput.js +0 -101
- package/lib/components/Input/PhoneNumberInput.js +0 -128
- package/lib/components/Input/input.test.js +0 -89
- package/lib/components/Input/old-input.test.js +0 -107
- package/lib/components/common.js +0 -359
- package/lib/widgets/CashierAccordion/Deposit/PaymentForm/NewTab.js +0 -44
|
@@ -14,10 +14,6 @@ var _Input = require('tg-core-components/lib/components/Input');
|
|
|
14
14
|
|
|
15
15
|
var _Input2 = _interopRequireDefault(_Input);
|
|
16
16
|
|
|
17
|
-
var _Button = require('tg-core-components/lib/components/Button');
|
|
18
|
-
|
|
19
|
-
var _Button2 = _interopRequireDefault(_Button);
|
|
20
|
-
|
|
21
17
|
var _compose = require('recompose/compose');
|
|
22
18
|
|
|
23
19
|
var _compose2 = _interopRequireDefault(_compose);
|
|
@@ -83,23 +79,31 @@ var BonusCodeForm = function BonusCodeForm(_ref3) {
|
|
|
83
79
|
return _react2.default.createElement(
|
|
84
80
|
'form',
|
|
85
81
|
{ className: 'form', onSubmit: onSubmit },
|
|
86
|
-
_react2.default.createElement(_Input2.default, {
|
|
87
|
-
label: (0, _translate2.default)({
|
|
88
|
-
id: 'label.bonus_code',
|
|
89
|
-
defaultMessage: 'Bonus code'
|
|
90
|
-
}, intl),
|
|
91
|
-
type: 'text',
|
|
92
|
-
name: 'bonusCode',
|
|
93
|
-
status: errors.bonusCode && 'failure' || 'idle',
|
|
94
|
-
statusText: errors.bonusCode && (0, _translate2.default)({ id: errors.bonusCode }, intl)
|
|
95
|
-
}),
|
|
96
82
|
_react2.default.createElement(
|
|
97
|
-
|
|
98
|
-
{ className: '
|
|
99
|
-
(
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
83
|
+
'div',
|
|
84
|
+
{ className: 'bonus-code-form' },
|
|
85
|
+
_react2.default.createElement(_Input2.default, {
|
|
86
|
+
className: 'layout-item',
|
|
87
|
+
title: (0, _translate2.default)({
|
|
88
|
+
id: 'label.bonus_code',
|
|
89
|
+
defaultMessage: 'Bonus code'
|
|
90
|
+
}, intl),
|
|
91
|
+
type: 'text',
|
|
92
|
+
name: 'bonusCode',
|
|
93
|
+
error: errors.bonusCode && (0, _translate2.default)({ id: errors.bonusCode }, intl)
|
|
94
|
+
}),
|
|
95
|
+
_react2.default.createElement(
|
|
96
|
+
'div',
|
|
97
|
+
{ className: 'layout-item' },
|
|
98
|
+
_react2.default.createElement(
|
|
99
|
+
'button',
|
|
100
|
+
{ className: 'button primary wide', type: 'submit' },
|
|
101
|
+
(0, _translate2.default)({
|
|
102
|
+
id: 'label.activate',
|
|
103
|
+
defaultMessage: 'Activate'
|
|
104
|
+
}, intl)
|
|
105
|
+
)
|
|
106
|
+
)
|
|
103
107
|
)
|
|
104
108
|
);
|
|
105
109
|
};
|
|
@@ -4,6 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
+
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
|
8
|
+
|
|
7
9
|
var _react = require('react');
|
|
8
10
|
|
|
9
11
|
var _react2 = _interopRequireDefault(_react);
|
|
@@ -30,13 +32,68 @@ var _Translate2 = _interopRequireDefault(_Translate);
|
|
|
30
32
|
|
|
31
33
|
var _states = require('./states');
|
|
32
34
|
|
|
35
|
+
var _marked = require('marked');
|
|
36
|
+
|
|
37
|
+
var _marked2 = _interopRequireDefault(_marked);
|
|
38
|
+
|
|
33
39
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
34
40
|
|
|
41
|
+
var ALEACC_BONUS_CLAIM_STATE = ['Initiated', 'PreClaimed'];
|
|
42
|
+
var ALEACC_BONUS_REJECT_STATE = ['Initiated', 'PreClaimed', 'Pending', 'PreWager'];
|
|
43
|
+
var ALEACC_BONUS_ACTION_STATE = [].concat(ALEACC_BONUS_CLAIM_STATE, ALEACC_BONUS_REJECT_STATE);
|
|
44
|
+
|
|
35
45
|
var BonusAction = function BonusAction(_ref) {
|
|
36
46
|
var bonus = _ref.bonus,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
47
|
+
onClaimBonus = _ref.onClaimBonus,
|
|
48
|
+
onRejectBonus = _ref.onRejectBonus;
|
|
49
|
+
|
|
50
|
+
var _useState = (0, _react.useState)(false),
|
|
51
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
52
|
+
isLoadingClaim = _useState2[0],
|
|
53
|
+
setIsLoadingClaim = _useState2[1];
|
|
54
|
+
|
|
55
|
+
var _useState3 = (0, _react.useState)(false),
|
|
56
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
57
|
+
isLoadingReject = _useState4[0],
|
|
58
|
+
setIsLoadingReject = _useState4[1];
|
|
59
|
+
|
|
60
|
+
var claimBonus = function claimBonus(e) {
|
|
61
|
+
onClaimBonus(bonus, function (isLoading) {
|
|
62
|
+
return setIsLoadingClaim(isLoading);
|
|
63
|
+
}, e);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
var rejectBonus = function rejectBonus(e) {
|
|
67
|
+
onRejectBonus(bonus, function (isLoading) {
|
|
68
|
+
return setIsLoadingReject(isLoading);
|
|
69
|
+
}, e);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
return _react2.default.createElement(
|
|
73
|
+
'div',
|
|
74
|
+
{ className: 'actions' },
|
|
75
|
+
ALEACC_BONUS_CLAIM_STATE.includes(bonus.State) && _react2.default.createElement(
|
|
76
|
+
_Button2.default,
|
|
77
|
+
{
|
|
78
|
+
className: 'button primary small',
|
|
79
|
+
onClick: claimBonus,
|
|
80
|
+
isLoading: isLoadingClaim },
|
|
81
|
+
_react2.default.createElement(_Translate2.default, { id: 'action.bonus.claim', defaultMessage: 'Claim' })
|
|
82
|
+
),
|
|
83
|
+
ALEACC_BONUS_REJECT_STATE.includes(bonus.State) && _react2.default.createElement(
|
|
84
|
+
_Button2.default,
|
|
85
|
+
{
|
|
86
|
+
className: 'button secondary small',
|
|
87
|
+
onClick: rejectBonus,
|
|
88
|
+
isLoading: isLoadingReject },
|
|
89
|
+
_react2.default.createElement(_Translate2.default, { id: 'action.bonus.reject', defaultMessage: 'Reject' })
|
|
90
|
+
)
|
|
91
|
+
);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
var BonusActionFT = function BonusActionFT(_ref2) {
|
|
95
|
+
var bonus = _ref2.bonus,
|
|
96
|
+
onClaimBonus = _ref2.onClaimBonus;
|
|
40
97
|
|
|
41
98
|
// Atm it's only fasttrack that supports actions.
|
|
42
99
|
if (bonus.Provider !== 'fasttrack') return null;
|
|
@@ -44,9 +101,6 @@ var BonusAction = function BonusAction(_ref) {
|
|
|
44
101
|
// Expired bonuses has no actions
|
|
45
102
|
if (bonus.State === 'Expired') return null;
|
|
46
103
|
|
|
47
|
-
var gameUrl = '/casino';
|
|
48
|
-
if (device === 'Desktop' && bonus.DesktopGameUrl && bonus.DesktopGameUrl.trim()) gameUrl = bonus.DesktopGameUrl.trim();else if (device !== 'Desktop' && bonus.MobileGameUrl && bonus.MobileGameUrl.trim()) gameUrl = bonus.MobileGameUrl.trim();
|
|
49
|
-
|
|
50
104
|
// FTType 1 - Pending Bonus
|
|
51
105
|
// Claim bonus and redirect to game of present.
|
|
52
106
|
if (bonus.FTType === 1) {
|
|
@@ -54,10 +108,8 @@ var BonusAction = function BonusAction(_ref) {
|
|
|
54
108
|
return _react2.default.createElement(
|
|
55
109
|
_Button2.default,
|
|
56
110
|
{
|
|
57
|
-
onClick: function onClick() {
|
|
58
|
-
|
|
59
|
-
redirect(gameUrl);
|
|
60
|
-
});
|
|
111
|
+
onClick: function onClick(e) {
|
|
112
|
+
return onClaimBonus(bonus, null, e);
|
|
61
113
|
},
|
|
62
114
|
className: 'button primary action wide ' + (bonus.IsLocked && 'locked') },
|
|
63
115
|
_react2.default.createElement(_Translate2.default, { id: 'action.bonus.type1', defaultMessage: 'Action type1' })
|
|
@@ -70,14 +122,8 @@ var BonusAction = function BonusAction(_ref) {
|
|
|
70
122
|
return _react2.default.createElement(
|
|
71
123
|
_Button2.default,
|
|
72
124
|
{
|
|
73
|
-
onClick: function onClick() {
|
|
74
|
-
return
|
|
75
|
-
pathname: '/dashboard/deposit',
|
|
76
|
-
search: gameUrl ? '?ref_url=' + encodeURIComponent(gameUrl) : '',
|
|
77
|
-
state: {
|
|
78
|
-
bonusCode: bonus.PromoCode
|
|
79
|
-
}
|
|
80
|
-
});
|
|
125
|
+
onClick: function onClick(e) {
|
|
126
|
+
return onClaimBonus(bonus, null, e);
|
|
81
127
|
},
|
|
82
128
|
className: 'button primary action wide ' + (bonus.IsLocked && 'locked') },
|
|
83
129
|
_react2.default.createElement(_Translate2.default, { id: 'action.bonus.type2', defaultMessage: 'Action type2' })
|
|
@@ -90,20 +136,8 @@ var BonusAction = function BonusAction(_ref) {
|
|
|
90
136
|
return _react2.default.createElement(
|
|
91
137
|
_Button2.default,
|
|
92
138
|
{
|
|
93
|
-
onClick: function onClick() {
|
|
94
|
-
|
|
95
|
-
claimBonus(bonus.Id).then(function () {
|
|
96
|
-
redirect(gameUrl);
|
|
97
|
-
});
|
|
98
|
-
} else {
|
|
99
|
-
redirect({
|
|
100
|
-
pathname: '/dashboard/deposit',
|
|
101
|
-
search: '?ref_url=/dashboard/bonus',
|
|
102
|
-
state: {
|
|
103
|
-
bonusCode: bonus.PromoCode
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
}
|
|
139
|
+
onClick: function onClick(e) {
|
|
140
|
+
return onClaimBonus(bonus, null, e);
|
|
107
141
|
},
|
|
108
142
|
className: 'button primary action wide ' + (bonus.IsLocked && 'locked') },
|
|
109
143
|
!!bonus.IsLocked && _react2.default.createElement(_Translate2.default, {
|
|
@@ -117,12 +151,11 @@ var BonusAction = function BonusAction(_ref) {
|
|
|
117
151
|
return null;
|
|
118
152
|
};
|
|
119
153
|
|
|
120
|
-
var BonusWidget = function BonusWidget(
|
|
121
|
-
var bonuses =
|
|
122
|
-
handleBonusCodeSubmit =
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
redirect = _ref2.redirect;
|
|
154
|
+
var BonusWidget = function BonusWidget(_ref3) {
|
|
155
|
+
var bonuses = _ref3.bonuses,
|
|
156
|
+
handleBonusCodeSubmit = _ref3.handleBonusCodeSubmit,
|
|
157
|
+
onClaimBonus = _ref3.onClaimBonus,
|
|
158
|
+
onRejectBonus = _ref3.onRejectBonus;
|
|
126
159
|
|
|
127
160
|
var bonusList = { active: null, available: null, finished: null };
|
|
128
161
|
|
|
@@ -174,12 +207,13 @@ var BonusWidget = function BonusWidget(_ref2) {
|
|
|
174
207
|
})]];
|
|
175
208
|
|
|
176
209
|
// Add bonus actions to not expired Fasttrack bonuses
|
|
177
|
-
if (item.Provider === 'fasttrack' && item.State !== 'Expired') info.push(_react2.default.createElement(
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
210
|
+
if (item.Provider === 'fasttrack' && item.State !== 'Expired') info.push(_react2.default.createElement(BonusActionFT, { bonus: item, onClaimBonus: onClaimBonus }));
|
|
211
|
+
// Add bonus actions to post claim bonuses from Aleacc
|
|
212
|
+
else if (item.Provider !== 'fasttrack' && ALEACC_BONUS_ACTION_STATE.includes(item.State)) info.push(_react2.default.createElement(BonusAction, {
|
|
213
|
+
bonus: item,
|
|
214
|
+
onClaimBonus: onClaimBonus,
|
|
215
|
+
onRejectBonus: onRejectBonus
|
|
216
|
+
}));
|
|
183
217
|
|
|
184
218
|
var detail = [[_react2.default.createElement(
|
|
185
219
|
'span',
|
|
@@ -239,6 +273,13 @@ var BonusWidget = function BonusWidget(_ref2) {
|
|
|
239
273
|
})
|
|
240
274
|
)]];
|
|
241
275
|
|
|
276
|
+
info.push([_react2.default.createElement('div', {
|
|
277
|
+
className: 'disclaimer',
|
|
278
|
+
dangerouslySetInnerHTML: {
|
|
279
|
+
__html: item.content && item.content.disclaimer && (0, _marked2.default)(item.content.disclaimer || '') || item.promotion && item.promotion.shortDisclaimer
|
|
280
|
+
}
|
|
281
|
+
})]);
|
|
282
|
+
|
|
242
283
|
return {
|
|
243
284
|
id: item.Id,
|
|
244
285
|
info: info,
|
|
@@ -29,5 +29,7 @@ var matchProviderType = exports.matchProviderType = function matchProviderType(f
|
|
|
29
29
|
if (first.service) fType = fType + first.service;
|
|
30
30
|
if (second.service) sType = sType + second.service;
|
|
31
31
|
|
|
32
|
+
if (!fType || !sType) return;
|
|
33
|
+
|
|
32
34
|
return sType.toLowerCase() === fType.toLowerCase();
|
|
33
35
|
};
|
|
@@ -10,9 +10,13 @@ var _react = require('react');
|
|
|
10
10
|
|
|
11
11
|
var _react2 = _interopRequireDefault(_react);
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _TextInput = require('../../../../components/Deposit/TextInput');
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _TextInput2 = _interopRequireDefault(_TextInput);
|
|
16
|
+
|
|
17
|
+
var _Icon = require('../../../../components/Icon');
|
|
18
|
+
|
|
19
|
+
var _Icon2 = _interopRequireDefault(_Icon);
|
|
16
20
|
|
|
17
21
|
var _reactIntl = require('react-intl');
|
|
18
22
|
|
|
@@ -66,14 +70,16 @@ var BonusCodeInput = function (_Component) {
|
|
|
66
70
|
return _react2.default.createElement(
|
|
67
71
|
'div',
|
|
68
72
|
{ className: 'bonus-code-input-wrapper' },
|
|
69
|
-
_react2.default.createElement(
|
|
73
|
+
_react2.default.createElement(_TextInput2.default, {
|
|
70
74
|
name: 'bonusCode',
|
|
71
|
-
value: bonusCode,
|
|
72
|
-
onChange: onChange,
|
|
73
75
|
autoFocus: true,
|
|
74
|
-
|
|
76
|
+
placeholder: (0, _translate2.default)({ id: 'cashier.bonus_code' }, intl),
|
|
75
77
|
disabled: disabled,
|
|
76
|
-
|
|
78
|
+
onChange: onChange
|
|
79
|
+
}),
|
|
80
|
+
status && _react2.default.createElement(_Icon2.default, {
|
|
81
|
+
icon: status === 'active' ? 'check' : '',
|
|
82
|
+
className: 'bonus-icon bonus-' + status
|
|
77
83
|
})
|
|
78
84
|
);
|
|
79
85
|
}
|
|
@@ -46,9 +46,9 @@ var _marked = require('marked');
|
|
|
46
46
|
|
|
47
47
|
var _marked2 = _interopRequireDefault(_marked);
|
|
48
48
|
|
|
49
|
-
var
|
|
49
|
+
var _TextInput = require('../../../../components/Deposit/TextInput');
|
|
50
50
|
|
|
51
|
-
var
|
|
51
|
+
var _TextInput2 = _interopRequireDefault(_TextInput);
|
|
52
52
|
|
|
53
53
|
var _PaymentAmountSelector = require('../../Payment/PaymentAmountSelector');
|
|
54
54
|
|
|
@@ -90,6 +90,8 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
|
|
90
90
|
|
|
91
91
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
92
92
|
|
|
93
|
+
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); } }
|
|
94
|
+
|
|
93
95
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
94
96
|
|
|
95
97
|
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
@@ -233,8 +235,7 @@ var DepositWidget = function (_Component) {
|
|
|
233
235
|
renderAllowBonusWarning = _props.renderAllowBonusWarning,
|
|
234
236
|
paymentStats = _props.paymentStats,
|
|
235
237
|
_props$shouldAutoFocu = _props.shouldAutoFocus,
|
|
236
|
-
shouldAutoFocus = _props$shouldAutoFocu === undefined ? false : _props$shouldAutoFocu
|
|
237
|
-
hideSelectedBonus = _props.hideSelectedBonus;
|
|
238
|
+
shouldAutoFocus = _props$shouldAutoFocu === undefined ? false : _props$shouldAutoFocu;
|
|
238
239
|
|
|
239
240
|
|
|
240
241
|
var accountExclusions = payments.filter(function (provider) {
|
|
@@ -247,7 +248,11 @@ var DepositWidget = function (_Component) {
|
|
|
247
248
|
}).map(function (provider) {
|
|
248
249
|
return provider.providerType.toUpperCase();
|
|
249
250
|
});
|
|
250
|
-
var customAmountExclusions = [
|
|
251
|
+
var customAmountExclusions = [].concat(_toConsumableArray(payments.filter(function (provider) {
|
|
252
|
+
return provider.hideCustomAmount;
|
|
253
|
+
}).map(function (provider) {
|
|
254
|
+
return provider.providerType.toLowerCase();
|
|
255
|
+
})), ['reversewithdrawal']);
|
|
251
256
|
var minMaxExclusions = ['reversewithdrawal'];
|
|
252
257
|
|
|
253
258
|
var minDepositBonusAmount = this.getMinDepositBonusAmount();
|
|
@@ -258,8 +263,6 @@ var DepositWidget = function (_Component) {
|
|
|
258
263
|
return (0, _Payment.matchProviderType)(payment, selectedMethod);
|
|
259
264
|
});
|
|
260
265
|
|
|
261
|
-
var hasCustomAmounts = selectedMethodDetail && selectedMethodDetail.customAmounts;
|
|
262
|
-
|
|
263
266
|
var selectedBonus = bonuses.find(function (b) {
|
|
264
267
|
return b.PromoCode === bonusCode;
|
|
265
268
|
});
|
|
@@ -286,13 +289,13 @@ var DepositWidget = function (_Component) {
|
|
|
286
289
|
bonuses: bonuses,
|
|
287
290
|
onSelect: this.onSelectBonus,
|
|
288
291
|
selectedBonus: selectedBonus
|
|
289
|
-
}) :
|
|
292
|
+
}) : _react2.default.createElement(SelectedBonus, {
|
|
290
293
|
selectedBonus: selectedBonus,
|
|
291
294
|
onClick: function onClick() {
|
|
292
295
|
_this2.onSelectBonus('');
|
|
293
296
|
_this2.setState({ showBonusSlider: true });
|
|
294
297
|
}
|
|
295
|
-
})
|
|
298
|
+
})),
|
|
296
299
|
_react2.default.createElement(_reactFinalForm.Form, {
|
|
297
300
|
onSubmit: this.handleNextStep,
|
|
298
301
|
initialValues: {
|
|
@@ -356,7 +359,7 @@ var DepositWidget = function (_Component) {
|
|
|
356
359
|
onSelectMethod: _this2.onSelectMethod,
|
|
357
360
|
onDeleteAccount: _this2.onDeleteAccount,
|
|
358
361
|
methodContent: function methodContent(method) {
|
|
359
|
-
if (method.txType !== selectedMethod.txType
|
|
362
|
+
if (method.txType !== selectedMethod.txType) return null;
|
|
360
363
|
|
|
361
364
|
return _react2.default.createElement(
|
|
362
365
|
_react.Fragment,
|
|
@@ -366,7 +369,7 @@ var DepositWidget = function (_Component) {
|
|
|
366
369
|
renderNotVerifiedNotice && renderNotVerifiedNotice(currentAmount),
|
|
367
370
|
renderCanceledNotice && renderCanceledNotice(),
|
|
368
371
|
renderAllowBonusWarning && renderAllowBonusWarning(selectedMethodDetail, _this2.state.bonusCode),
|
|
369
|
-
selectedMethod.txType === 'SwishDeposit' && _react2.default.createElement(
|
|
372
|
+
selectedMethod.txType === 'SwishDeposit' && _react2.default.createElement(_TextInput2.default, {
|
|
370
373
|
className: 'swish-number',
|
|
371
374
|
name: 'swishNumber',
|
|
372
375
|
type: 'tel',
|
|
@@ -374,6 +377,7 @@ var DepositWidget = function (_Component) {
|
|
|
374
377
|
id: 'label.mobile_number_placeholder',
|
|
375
378
|
defaultMessage: 'eg. 0701234567'
|
|
376
379
|
}, intl),
|
|
380
|
+
isControlled: true,
|
|
377
381
|
value: _this2.state.swishNumber,
|
|
378
382
|
title: (0, _translate2.default)({
|
|
379
383
|
id: 'label.mobile_number'
|
|
@@ -402,30 +406,26 @@ var DepositWidget = function (_Component) {
|
|
|
402
406
|
return _this2.setState({ buttonLoading: buttonLoading });
|
|
403
407
|
}
|
|
404
408
|
}),
|
|
405
|
-
!customAmountExclusions.includes(selectedMethod.providerType.toLowerCase()) &&
|
|
409
|
+
!customAmountExclusions.includes(selectedMethod.providerType.toLowerCase()) && _react2.default.createElement(
|
|
406
410
|
'div',
|
|
407
411
|
{ className: 'custom-amount-and-submit' },
|
|
408
|
-
_react2.default.createElement(
|
|
409
|
-
required: true,
|
|
412
|
+
_react2.default.createElement(_TextInput2.default, {
|
|
410
413
|
pattern: '[0-9]*',
|
|
411
414
|
className: 'custom-amount',
|
|
412
415
|
name: 'amount',
|
|
413
416
|
type: 'number',
|
|
414
417
|
step: '0.01',
|
|
415
|
-
|
|
418
|
+
placeholder: (0, _translate2.default)({
|
|
416
419
|
id: 'label.amount'
|
|
417
420
|
}, intl),
|
|
418
|
-
|
|
419
|
-
|
|
421
|
+
showErrorText: false,
|
|
422
|
+
showErrorIcon: errors && errors.amount && errors.amount.length > 0,
|
|
420
423
|
onChange: function onChange(e) {
|
|
421
424
|
return _this2.setState({
|
|
422
425
|
currentAmount: e.target.value
|
|
423
426
|
});
|
|
424
427
|
},
|
|
425
|
-
autoFocus: shouldAutoFocus
|
|
426
|
-
setRef: function setRef(ref) {
|
|
427
|
-
return _this2.amountInputRef = ref;
|
|
428
|
-
}
|
|
428
|
+
autoFocus: shouldAutoFocus
|
|
429
429
|
}),
|
|
430
430
|
_react2.default.createElement(
|
|
431
431
|
_Button2.default,
|
|
@@ -449,7 +449,7 @@ var DepositWidget = function (_Component) {
|
|
|
449
449
|
_react2.default.createElement(
|
|
450
450
|
'div',
|
|
451
451
|
{ className: 'bonus-limit' },
|
|
452
|
-
!minMaxExclusions.includes(selectedMethod.providerType.toLowerCase()) && !
|
|
452
|
+
!minMaxExclusions.includes(selectedMethod.providerType.toLowerCase()) && !customAmountExclusions.includes(selectedMethod.providerType.toLowerCase()) && selectedMethod && selectedMethod.limit && _react2.default.createElement(_MethodMinMax2.default, {
|
|
453
453
|
method: selectedMethod,
|
|
454
454
|
currency: currency,
|
|
455
455
|
minDepositBonusAmount: minDepositBonusAmount,
|
|
@@ -521,8 +521,7 @@ var DepositWidget = function (_Component) {
|
|
|
521
521
|
render: function render(_ref5) {
|
|
522
522
|
var handleSubmit = _ref5.handleSubmit,
|
|
523
523
|
values = _ref5.values,
|
|
524
|
-
change = _ref5.change
|
|
525
|
-
form = _ref5.form;
|
|
524
|
+
change = _ref5.change;
|
|
526
525
|
return _react2.default.createElement(
|
|
527
526
|
_react.Fragment,
|
|
528
527
|
null,
|
|
@@ -547,10 +546,7 @@ var DepositWidget = function (_Component) {
|
|
|
547
546
|
_react2.default.createElement(
|
|
548
547
|
'div',
|
|
549
548
|
{ className: 'account-details' },
|
|
550
|
-
_react2.default.createElement(PaymentAccountForm,
|
|
551
|
-
change: form.change,
|
|
552
|
-
values: values
|
|
553
|
-
}))
|
|
549
|
+
_react2.default.createElement(PaymentAccountForm, paymentAccountFormProps)
|
|
554
550
|
),
|
|
555
551
|
_react2.default.createElement(
|
|
556
552
|
_Button2.default,
|
|
@@ -605,45 +601,18 @@ var DepositWidget = function (_Component) {
|
|
|
605
601
|
var _initialiseProps = function _initialiseProps() {
|
|
606
602
|
var _this3 = this;
|
|
607
603
|
|
|
608
|
-
this.componentDidUpdate = function (prevProps) {
|
|
609
|
-
if (prevProps.shouldRenderSgaWarning !== _this3.props.shouldRenderSgaWarning) {
|
|
610
|
-
var _state2 = _this3.state,
|
|
611
|
-
currentAmount = _state2.currentAmount,
|
|
612
|
-
bonusCode = _state2.bonusCode;
|
|
613
|
-
|
|
614
|
-
_this3.handleNextStep({ amount: currentAmount, bonusCode: bonusCode });
|
|
615
|
-
}
|
|
616
|
-
};
|
|
617
|
-
|
|
618
604
|
this.handleNextStep = function (_ref6) {
|
|
619
605
|
var amount = _ref6.amount,
|
|
620
606
|
bonusCode = _ref6.bonusCode;
|
|
621
|
-
var
|
|
622
|
-
selectedMethod =
|
|
623
|
-
preDepositBonus =
|
|
624
|
-
selectedAccount =
|
|
625
|
-
var _props2 = _this3.props,
|
|
626
|
-
paymentStats = _props2.paymentStats,
|
|
627
|
-
renderSgaWarningPopup = _props2.renderSgaWarningPopup,
|
|
628
|
-
shouldRenderSgaWarning = _props2.shouldRenderSgaWarning;
|
|
607
|
+
var _state2 = _this3.state,
|
|
608
|
+
selectedMethod = _state2.selectedMethod,
|
|
609
|
+
preDepositBonus = _state2.preDepositBonus,
|
|
610
|
+
selectedAccount = _state2.selectedAccount;
|
|
629
611
|
|
|
630
612
|
|
|
631
613
|
var formExists = !!PaymentAccountForms[(0, _Payment.getPaymentForm)(selectedMethod)];
|
|
632
614
|
var skipFillInStep = ['skrill', 'bestpay', 'jeton', 'bankiban', 'bankintl'];
|
|
633
615
|
|
|
634
|
-
var remainingAmount = 5000 - Number(paymentStats.TotalDepositLast7Days);
|
|
635
|
-
var renderSgaWarning = shouldRenderSgaWarning && Number(paymentStats.TotalDepositLast7Days) + Number(amount) > 5000;
|
|
636
|
-
|
|
637
|
-
if (renderSgaWarning) {
|
|
638
|
-
_this3.setState({
|
|
639
|
-
buttonLoading: null,
|
|
640
|
-
currentAmount: amount,
|
|
641
|
-
bonusCode: bonusCode
|
|
642
|
-
});
|
|
643
|
-
renderSgaWarningPopup(remainingAmount);
|
|
644
|
-
return;
|
|
645
|
-
}
|
|
646
|
-
|
|
647
616
|
if (!formExists || selectedAccount.accountId && skipFillInStep.includes(selectedMethod.providerType.toLowerCase())) {
|
|
648
617
|
return _this3.onSubmit({
|
|
649
618
|
currentAmount: amount,
|
|
@@ -661,9 +630,9 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
661
630
|
};
|
|
662
631
|
|
|
663
632
|
this.handleBackStep = function () {
|
|
664
|
-
var
|
|
665
|
-
currentStep =
|
|
666
|
-
buttonLoading =
|
|
633
|
+
var _state3 = _this3.state,
|
|
634
|
+
currentStep = _state3.currentStep,
|
|
635
|
+
buttonLoading = _state3.buttonLoading;
|
|
667
636
|
|
|
668
637
|
|
|
669
638
|
if (buttonLoading === 'fill-in-submit') return null;
|
|
@@ -680,13 +649,13 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
680
649
|
};
|
|
681
650
|
|
|
682
651
|
this.onSubmit = function (data) {
|
|
683
|
-
var
|
|
684
|
-
onSubmit =
|
|
685
|
-
countries =
|
|
686
|
-
user =
|
|
687
|
-
var
|
|
688
|
-
selectedMethod =
|
|
689
|
-
swishNumber =
|
|
652
|
+
var _props2 = _this3.props,
|
|
653
|
+
onSubmit = _props2.onSubmit,
|
|
654
|
+
countries = _props2.countries,
|
|
655
|
+
user = _props2.user;
|
|
656
|
+
var _state4 = _this3.state,
|
|
657
|
+
selectedMethod = _state4.selectedMethod,
|
|
658
|
+
swishNumber = _state4.swishNumber;
|
|
690
659
|
|
|
691
660
|
|
|
692
661
|
var submitData = _extends({}, _this3.state, data);
|
|
@@ -719,19 +688,12 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
719
688
|
|
|
720
689
|
this.onSelectMethod = function (_ref7) {
|
|
721
690
|
var method = _ref7.method;
|
|
722
|
-
var
|
|
723
|
-
currency =
|
|
724
|
-
paymentStats =
|
|
725
|
-
remainingDepositLimit =
|
|
726
|
-
payments =
|
|
727
|
-
shouldAutoFocus = _props4.shouldAutoFocus;
|
|
728
|
-
|
|
691
|
+
var _props3 = _this3.props,
|
|
692
|
+
currency = _props3.currency,
|
|
693
|
+
paymentStats = _props3.paymentStats,
|
|
694
|
+
remainingDepositLimit = _props3.remainingDepositLimit,
|
|
695
|
+
payments = _props3.payments;
|
|
729
696
|
|
|
730
|
-
if (shouldAutoFocus) {
|
|
731
|
-
setTimeout(function () {
|
|
732
|
-
_this3.amountInputRef && _this3.amountInputRef.focus();
|
|
733
|
-
}, 1);
|
|
734
|
-
}
|
|
735
697
|
|
|
736
698
|
var selectedMethodDetail = payments.find(function (payment) {
|
|
737
699
|
return (0, _Payment.matchProviderType)(payment, method);
|
|
@@ -789,9 +751,9 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
789
751
|
};
|
|
790
752
|
|
|
791
753
|
this.getMinDepositBonusAmount = function () {
|
|
792
|
-
var
|
|
793
|
-
bonuses =
|
|
794
|
-
currency =
|
|
754
|
+
var _props4 = _this3.props,
|
|
755
|
+
bonuses = _props4.bonuses,
|
|
756
|
+
currency = _props4.currency;
|
|
795
757
|
var bonusCode = _this3.state.bonusCode;
|
|
796
758
|
|
|
797
759
|
|
|
@@ -814,10 +776,10 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
814
776
|
};
|
|
815
777
|
|
|
816
778
|
this.getSpainRemainingDepositAmount = function () {
|
|
817
|
-
var
|
|
818
|
-
jurisdiction =
|
|
819
|
-
hasIdApproved =
|
|
820
|
-
paymentStats =
|
|
779
|
+
var _props5 = _this3.props,
|
|
780
|
+
jurisdiction = _props5.jurisdiction,
|
|
781
|
+
hasIdApproved = _props5.hasIdApproved,
|
|
782
|
+
paymentStats = _props5.paymentStats;
|
|
821
783
|
|
|
822
784
|
return jurisdiction.toLowerCase() === 'es' && !hasIdApproved && (150 - parseFloat(paymentStats.TotalDeposit) < 0 ? 0 : 150 - parseFloat(paymentStats.TotalDeposit));
|
|
823
785
|
};
|
|
@@ -29,10 +29,6 @@ var _PaymentResult = require('./PaymentResult');
|
|
|
29
29
|
|
|
30
30
|
var _PaymentResult2 = _interopRequireDefault(_PaymentResult);
|
|
31
31
|
|
|
32
|
-
var _NewTab = require('./NewTab');
|
|
33
|
-
|
|
34
|
-
var _NewTab2 = _interopRequireDefault(_NewTab);
|
|
35
|
-
|
|
36
32
|
var _flatten = require('lodash/flatten');
|
|
37
33
|
|
|
38
34
|
var _flatten2 = _interopRequireDefault(_flatten);
|
|
@@ -114,8 +110,7 @@ var PaymentForm = function (_Component) {
|
|
|
114
110
|
value: function render() {
|
|
115
111
|
var _props = this.props,
|
|
116
112
|
data = _props.data,
|
|
117
|
-
onClose = _props.onClose
|
|
118
|
-
details = _props.details;
|
|
113
|
+
onClose = _props.onClose;
|
|
119
114
|
|
|
120
115
|
if (!data.success) {
|
|
121
116
|
return _react2.default.createElement(PaymentError, { data: data, onClose: onClose });
|
|
@@ -134,9 +129,7 @@ var PaymentForm = function (_Component) {
|
|
|
134
129
|
frameBorder: 0
|
|
135
130
|
};
|
|
136
131
|
|
|
137
|
-
if (
|
|
138
|
-
return _react2.default.createElement(_NewTab2.default, { url: data.redirectOutput.url });
|
|
139
|
-
} else if (data.redirectOutput.container == 'iframe' && data.redirectOutput.method == 'POST' && data.redirectOutput.html == null) {
|
|
132
|
+
if (data.redirectOutput.container == 'iframe' && data.redirectOutput.method == 'POST' && data.redirectOutput.html == null) {
|
|
140
133
|
return _react2.default.createElement(FormWithIframe, _extends({
|
|
141
134
|
frameProps: frameProps,
|
|
142
135
|
target: frameId
|
package/lib/widgets/CashierAccordion/Payment/PaymentAccountForms/astroPayBankTransaltions.js
CHANGED
|
@@ -38,6 +38,18 @@ exports.default = function (intl, category, type) {
|
|
|
38
38
|
id: 'cashier.details.accountTypes.I',
|
|
39
39
|
defaultMessage: 'International account'
|
|
40
40
|
}, intl);
|
|
41
|
+
},
|
|
42
|
+
M: function M() {
|
|
43
|
+
return (0, _translate2.default)({
|
|
44
|
+
id: 'cashier.details.accountTypes.M',
|
|
45
|
+
defaultMessage: 'Master account'
|
|
46
|
+
}, intl);
|
|
47
|
+
},
|
|
48
|
+
V: function V() {
|
|
49
|
+
return (0, _translate2.default)({
|
|
50
|
+
id: 'cashier.details.accountTypes.V',
|
|
51
|
+
defaultMessage: 'Salary account'
|
|
52
|
+
}, intl);
|
|
41
53
|
}
|
|
42
54
|
},
|
|
43
55
|
services: {
|