tg-core-components 5.4.5-bethard → 5.5.1-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/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 +22 -33
- 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 +9 -23
- 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/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 +25 -36
- 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 +11 -25
- 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 -113
- 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 -130
- 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
|
@@ -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,
|
|
@@ -696,16 +692,9 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
696
692
|
currency = _props3.currency,
|
|
697
693
|
paymentStats = _props3.paymentStats,
|
|
698
694
|
remainingDepositLimit = _props3.remainingDepositLimit,
|
|
699
|
-
payments = _props3.payments
|
|
700
|
-
shouldAutoFocus = _props3.shouldAutoFocus;
|
|
695
|
+
payments = _props3.payments;
|
|
701
696
|
|
|
702
697
|
|
|
703
|
-
if (shouldAutoFocus) {
|
|
704
|
-
setTimeout(function () {
|
|
705
|
-
_this3.amountInputRef && _this3.amountInputRef.focus();
|
|
706
|
-
}, 1);
|
|
707
|
-
}
|
|
708
|
-
|
|
709
698
|
var selectedMethodDetail = payments.find(function (payment) {
|
|
710
699
|
return (0, _Payment.matchProviderType)(payment, method);
|
|
711
700
|
});
|
|
@@ -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: {
|