tg-core-components 6.2.0-alpha.0 → 6.2.0-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/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 +0 -8
- 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/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 +0 -8
- 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 -127
- 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 -157
- 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
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
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
|
-
|
|
9
|
-
var _react = require('react');
|
|
10
|
-
|
|
11
|
-
var _react2 = _interopRequireDefault(_react);
|
|
12
|
-
|
|
13
|
-
var _Overview = require('./Overview');
|
|
14
|
-
|
|
15
|
-
var _Overview2 = _interopRequireDefault(_Overview);
|
|
16
|
-
|
|
17
|
-
var _Details = require('./Details');
|
|
18
|
-
|
|
19
|
-
var _Details2 = _interopRequireDefault(_Details);
|
|
20
|
-
|
|
21
|
-
var _bonus = require('../../lib/utils/bonus');
|
|
22
|
-
|
|
23
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
|
-
|
|
25
|
-
var BonusOffers = function BonusOffers(_ref) {
|
|
26
|
-
var bonuses = _ref.bonuses,
|
|
27
|
-
content = _ref.content,
|
|
28
|
-
defaultImage = _ref.defaultImage,
|
|
29
|
-
onClaim = _ref.onClaim,
|
|
30
|
-
onCancel = _ref.onCancel,
|
|
31
|
-
onReject = _ref.onReject,
|
|
32
|
-
onPreClaim = _ref.onPreClaim,
|
|
33
|
-
onTriggerByPromoCode = _ref.onTriggerByPromoCode,
|
|
34
|
-
onOther = _ref.onOther,
|
|
35
|
-
getBonus = _ref.getBonus,
|
|
36
|
-
alerts = _ref.alerts,
|
|
37
|
-
removeAlert = _ref.removeAlert,
|
|
38
|
-
scrollToTop = _ref.scrollToTop;
|
|
39
|
-
|
|
40
|
-
var _useState = (0, _react.useState)(null),
|
|
41
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
42
|
-
selectedBonus = _useState2[0],
|
|
43
|
-
_selectBonus = _useState2[1];
|
|
44
|
-
|
|
45
|
-
var mappedBonuses = (0, _bonus.categorizeByState)(bonuses);
|
|
46
|
-
var alert = alerts && alerts.length > 0 ? alerts[0] : null;
|
|
47
|
-
|
|
48
|
-
(0, _react.useEffect)(function () {
|
|
49
|
-
scrollToTop();
|
|
50
|
-
alert && removeAlert(alert.type);
|
|
51
|
-
}, [selectedBonus]);
|
|
52
|
-
|
|
53
|
-
(0, _react.useEffect)(function () {
|
|
54
|
-
alert && scrollToTop();
|
|
55
|
-
}, [alert]);
|
|
56
|
-
|
|
57
|
-
return _react2.default.createElement(
|
|
58
|
-
'div',
|
|
59
|
-
{ className: 'BonusOffers' },
|
|
60
|
-
!selectedBonus && _react2.default.createElement(_Overview2.default, {
|
|
61
|
-
bonuses: mappedBonuses,
|
|
62
|
-
content: content,
|
|
63
|
-
defaultImage: defaultImage,
|
|
64
|
-
selectBonus: function selectBonus(bonus) {
|
|
65
|
-
return _selectBonus(bonus);
|
|
66
|
-
},
|
|
67
|
-
onPreClaim: onPreClaim,
|
|
68
|
-
alert: alert
|
|
69
|
-
}),
|
|
70
|
-
selectedBonus && _react2.default.createElement(_Details2.default, {
|
|
71
|
-
bonus: selectedBonus,
|
|
72
|
-
content: content.find(function (c) {
|
|
73
|
-
return c.identifier === selectedBonus.Identifier;
|
|
74
|
-
}) || {},
|
|
75
|
-
defaultImage: defaultImage,
|
|
76
|
-
wageringProgress: (0, _bonus.getWageringProgress)(selectedBonus),
|
|
77
|
-
onBack: function onBack() {
|
|
78
|
-
return _selectBonus(null);
|
|
79
|
-
},
|
|
80
|
-
status: (0, _bonus.getStatus)(selectedBonus),
|
|
81
|
-
onClaim: onClaim,
|
|
82
|
-
onReject: onReject,
|
|
83
|
-
onCancel: onCancel,
|
|
84
|
-
onTriggerByPromoCode: onTriggerByPromoCode,
|
|
85
|
-
onOther: onOther,
|
|
86
|
-
getBonus: getBonus,
|
|
87
|
-
selectBonus: function selectBonus(bonus) {
|
|
88
|
-
return _selectBonus(bonus);
|
|
89
|
-
},
|
|
90
|
-
alert: alert
|
|
91
|
-
})
|
|
92
|
-
);
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
exports.default = BonusOffers;
|