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
|
@@ -4,13 +4,25 @@ import React from 'react';
|
|
|
4
4
|
import { FormattedNumber } from 'react-intl';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* For crypto we want more decimals.
|
|
9
|
+
*/
|
|
10
|
+
var fractionDigits = {
|
|
11
|
+
BTC: { min: 5, max: 5 },
|
|
12
|
+
LTC: { min: 5, max: 5 },
|
|
13
|
+
XBC: { min: 5, max: 5 },
|
|
14
|
+
ETH: { min: 5, max: 5 },
|
|
15
|
+
BCH: { min: 5, max: 5 },
|
|
16
|
+
XRP: { min: 3, max: 3 }
|
|
17
|
+
};
|
|
18
|
+
|
|
7
19
|
/**
|
|
8
20
|
* FormattedNumber component to display currency
|
|
9
21
|
*/
|
|
10
22
|
var Money = function Money(props) {
|
|
11
23
|
return React.createElement(FormattedNumber, _extends({
|
|
12
|
-
minimumFractionDigits: props.decimals ? 2 : 0,
|
|
13
|
-
maximumFractionDigits: props.decimals ? 2 : 0
|
|
24
|
+
minimumFractionDigits: props.decimals ? fractionDigits[props.currency] && fractionDigits[props.currency].min || 2 : 0,
|
|
25
|
+
maximumFractionDigits: props.decimals ? fractionDigits[props.currency] && fractionDigits[props.currency].max || 2 : 0
|
|
14
26
|
}, props, {
|
|
15
27
|
style: 'currency'
|
|
16
28
|
}));
|
|
@@ -34,4 +46,14 @@ Money.defaultProps = {
|
|
|
34
46
|
decimals: true
|
|
35
47
|
};
|
|
36
48
|
|
|
49
|
+
export var format = function format(currency) {
|
|
50
|
+
var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US';
|
|
51
|
+
return new Intl.NumberFormat(locale, {
|
|
52
|
+
style: 'currency',
|
|
53
|
+
currency: currency,
|
|
54
|
+
minimumFractionDigits: fractionDigits[currency] ? fractionDigits[currency].min : null,
|
|
55
|
+
maximumFractionDigits: fractionDigits[currency] ? fractionDigits[currency].max : null
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
|
|
37
59
|
export default Money;
|
package/es/index.js
CHANGED
|
@@ -51,9 +51,8 @@ import ResponsibleGamingAccordionSignUp from './widgets/ResponsibleGamingAccordi
|
|
|
51
51
|
import ResponsibleGamingSingleSignUp from './widgets/ResponsibleGamingSingleSignUp';
|
|
52
52
|
import ResponsibleGamingWidget from './widgets/ResponsibleGamingWidget';
|
|
53
53
|
import VerifyAccordionWidget from './widgets/VerifyAccordionWidget';
|
|
54
|
-
import BonusOffers from './widgets/BonusOffers';
|
|
55
54
|
|
|
56
55
|
// misc
|
|
57
56
|
import countryEmojiFlags from './misc/countryEmojiFlags';
|
|
58
57
|
|
|
59
|
-
export {
|
|
58
|
+
export { AcceptUpdatedTaC, Alert, Button, ButtonLoader, Checklist, Icon, Image, Input, InternalMessagesInbox, Loader, Money, Notification, Radio, Select, Single, Textarea, Uploader, AccordionWidget, AccountDetail, ActivateWidget, Balance, Bonus, Deposit, Withdraw, SignUp, ChangeUsername, ChangePassword, ResetPassword, RequestResetPassword, SignIn, Pagination, Settings, TableWidget, Verify, Subscriptions, CasinoHistoryTable, PaymentHistoryTable, SportsbookHistoryTable, DepositWidgetAccordion, WithdrawWidgetAccordion, ResponsibleGamingAccordion, ResponsibleGamingAccordionSignUp, ResponsibleGamingSingleSignUp, ResponsibleGamingWidget, List, VerifyAccordionWidget, Translate, Picture, countryEmojiFlags, Skeleton, AutocompleteInput };
|
|
@@ -8,55 +8,51 @@ var MILISECONDS = {
|
|
|
8
8
|
IN_A_YEAR: 31536000000
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
export var selectUnit = function selectUnit(
|
|
12
|
-
var isFuture = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
13
|
-
|
|
11
|
+
export var selectUnit = function selectUnit(from) {
|
|
14
12
|
var now = Date.now();
|
|
15
|
-
var ms =
|
|
16
|
-
|
|
17
|
-
var operatorCalc = isFuture ? 1 : -1;
|
|
13
|
+
var ms = now - from;
|
|
18
14
|
|
|
19
15
|
switch (true) {
|
|
20
16
|
case MILISECONDS.IN_A_SECOND < ms && ms < MILISECONDS.IN_A_MINUTE:
|
|
21
17
|
return {
|
|
22
|
-
value:
|
|
18
|
+
value: -1 * Math.floor(ms / MILISECONDS.IN_A_SECOND),
|
|
23
19
|
unit: 'second',
|
|
24
20
|
updateIntervalInSeconds: 1
|
|
25
21
|
};
|
|
26
22
|
|
|
27
23
|
case MILISECONDS.IN_A_MINUTE < ms && ms < MILISECONDS.IN_AN_HOUR:
|
|
28
24
|
return {
|
|
29
|
-
value:
|
|
25
|
+
value: -1 * Math.floor(ms / MILISECONDS.IN_A_MINUTE),
|
|
30
26
|
unit: 'minute'
|
|
31
27
|
};
|
|
32
28
|
|
|
33
29
|
case MILISECONDS.IN_AN_HOUR < ms && ms < MILISECONDS.IN_A_DAY:
|
|
34
30
|
return {
|
|
35
|
-
value:
|
|
31
|
+
value: -1 * Math.floor(ms / MILISECONDS.IN_AN_HOUR),
|
|
36
32
|
unit: 'hour'
|
|
37
33
|
};
|
|
38
34
|
|
|
39
35
|
case MILISECONDS.IN_A_DAY < ms && ms < MILISECONDS.IN_A_WEEK:
|
|
40
36
|
return {
|
|
41
|
-
value:
|
|
37
|
+
value: -1 * Math.floor(ms / MILISECONDS.IN_A_DAY),
|
|
42
38
|
unit: 'day'
|
|
43
39
|
};
|
|
44
40
|
|
|
45
41
|
case MILISECONDS.IN_A_WEEK < ms && ms < MILISECONDS.IN_A_MONTH:
|
|
46
42
|
return {
|
|
47
|
-
value:
|
|
43
|
+
value: -1 * Math.floor(ms / MILISECONDS.IN_A_WEEK),
|
|
48
44
|
unit: 'week'
|
|
49
45
|
};
|
|
50
46
|
|
|
51
47
|
case MILISECONDS.IN_A_MONTH < ms && ms < MILISECONDS.IN_A_YEAR:
|
|
52
48
|
return {
|
|
53
|
-
value:
|
|
49
|
+
value: -1 * Math.floor(ms / MILISECONDS.IN_A_MONTH),
|
|
54
50
|
unit: 'month'
|
|
55
51
|
};
|
|
56
52
|
|
|
57
53
|
case MILISECONDS.IN_A_YEAR < ms:
|
|
58
54
|
return {
|
|
59
|
-
value:
|
|
55
|
+
value: -1 * Math.floor(ms / MILISECONDS.IN_A_YEAR),
|
|
60
56
|
unit: 'year'
|
|
61
57
|
};
|
|
62
58
|
|
|
@@ -9,7 +9,7 @@ var translate = function translate(_ref, intl) {
|
|
|
9
9
|
values = _ref.values,
|
|
10
10
|
rest = _objectWithoutProperties(_ref, ['id', 'values']);
|
|
11
11
|
|
|
12
|
-
var cacheId = id + (JSON.stringify(values) || '');
|
|
12
|
+
var cacheId = id + (typeof intl !== 'undefined' ? intl.locale : '') + (JSON.stringify(values) || '');
|
|
13
13
|
if (cache[cacheId]) return cache[cacheId];
|
|
14
14
|
|
|
15
15
|
var g = typeof window !== 'undefined' && window || typeof global !== 'undefined' && global || {};
|
|
@@ -9,6 +9,7 @@ export default {
|
|
|
9
9
|
AG: '🇦🇬',
|
|
10
10
|
AU: '🇦🇺',
|
|
11
11
|
AT: '🇦🇹',
|
|
12
|
+
AW: '🇦🇼',
|
|
12
13
|
AZ: '🇦🇿',
|
|
13
14
|
BI: '🇧🇮',
|
|
14
15
|
BE: '🇧🇪',
|
|
@@ -24,6 +25,7 @@ export default {
|
|
|
24
25
|
BO: '🇧🇴',
|
|
25
26
|
BR: '🇧🇷',
|
|
26
27
|
BB: '🇧🇧',
|
|
28
|
+
BM: '🇧🇲',
|
|
27
29
|
BN: '🇧🇳',
|
|
28
30
|
BT: '🇧🇹',
|
|
29
31
|
BW: '🇧🇼',
|
|
@@ -33,6 +35,7 @@ export default {
|
|
|
33
35
|
CL: '🇨🇱',
|
|
34
36
|
CN: '🇨🇳',
|
|
35
37
|
CI: '🇨🇮',
|
|
38
|
+
CK: '🇨🇰',
|
|
36
39
|
CM: '🇨🇲',
|
|
37
40
|
CD: '🇨🇩',
|
|
38
41
|
CG: '🇨🇬',
|
|
@@ -167,6 +170,7 @@ export default {
|
|
|
167
170
|
SZ: '🇸🇿',
|
|
168
171
|
SC: '🇸🇨',
|
|
169
172
|
SY: '🇸🇾',
|
|
173
|
+
TC: '🇹🇨',
|
|
170
174
|
TD: '🇹🇩',
|
|
171
175
|
TG: '🇹🇬',
|
|
172
176
|
TH: '🇹🇭',
|
|
@@ -178,6 +182,7 @@ export default {
|
|
|
178
182
|
TN: '🇹🇳',
|
|
179
183
|
TR: '🇹🇷',
|
|
180
184
|
TV: '🇹🇻',
|
|
185
|
+
TW: '🇹🇼',
|
|
181
186
|
TZ: '🇹🇿',
|
|
182
187
|
UG: '🇺🇬',
|
|
183
188
|
UA: '🇺🇦',
|
|
@@ -12,13 +12,10 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
|
|
|
12
12
|
|
|
13
13
|
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; }
|
|
14
14
|
|
|
15
|
-
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; }
|
|
16
|
-
|
|
17
15
|
import React, { Component, useState } from 'react';
|
|
18
16
|
import PropTypes from 'prop-types';
|
|
19
17
|
import AnimateHeight from 'react-animate-height';
|
|
20
18
|
import Icon from '../../components/Icon';
|
|
21
|
-
import cn from 'classnames';
|
|
22
19
|
|
|
23
20
|
var AccordionHeader = function AccordionHeader(_ref) {
|
|
24
21
|
var expanded = _ref.expanded,
|
|
@@ -86,14 +83,10 @@ var AccordionContent = function AccordionContent(_ref2) {
|
|
|
86
83
|
var AccordionItem = function AccordionItem(_ref3) {
|
|
87
84
|
var header = _ref3.header,
|
|
88
85
|
content = _ref3.content,
|
|
89
|
-
expanded = _ref3.expanded
|
|
90
|
-
customClass = _ref3.customClass;
|
|
86
|
+
expanded = _ref3.expanded;
|
|
91
87
|
return React.createElement(
|
|
92
88
|
'div',
|
|
93
|
-
{
|
|
94
|
-
className: cn('AccordionItem', _defineProperty({
|
|
95
|
-
'AccordionItem--expanded': expanded
|
|
96
|
-
}, 'AccordionItem--' + customClass, customClass)) },
|
|
89
|
+
{ className: 'AccordionItem' + (expanded ? ' AccordionItem--expanded' : '') },
|
|
97
90
|
header,
|
|
98
91
|
content
|
|
99
92
|
);
|
|
@@ -182,8 +175,7 @@ var Accordion = function (_Component) {
|
|
|
182
175
|
animationDuration: animationDuration,
|
|
183
176
|
contentCollapsedHeight: contentCollapsedHeight
|
|
184
177
|
}),
|
|
185
|
-
key: index
|
|
186
|
-
customClass: item.customClass
|
|
178
|
+
key: index
|
|
187
179
|
};
|
|
188
180
|
});
|
|
189
181
|
|
|
@@ -148,14 +148,6 @@ var AccountDetail = function AccountDetail(_ref) {
|
|
|
148
148
|
id: 'title.mobile_number',
|
|
149
149
|
defaultMessage: 'Mobile number'
|
|
150
150
|
}, intl),
|
|
151
|
-
callingCodes: countries ? countries.value.sort(function (a, b) {
|
|
152
|
-
return Number(a.callingCode) - Number(b.callingCode);
|
|
153
|
-
}).map(function (i) {
|
|
154
|
-
return {
|
|
155
|
-
value: '00' + i.callingCode,
|
|
156
|
-
label: '+' + i.callingCode + ' ' + (countryEmojiFlags[i.value] || '')
|
|
157
|
-
};
|
|
158
|
-
}) : [],
|
|
159
151
|
name: 'MobilePhoneNumber',
|
|
160
152
|
autoComplete: 'off',
|
|
161
153
|
status: errors.MobilePhoneNumber && 'failure' || 'idle',
|
|
@@ -54,7 +54,7 @@ var ActivationCode = function ActivationCode(_ref) {
|
|
|
54
54
|
}, [autoFocus, code]);
|
|
55
55
|
|
|
56
56
|
useEffect(function () {
|
|
57
|
-
|
|
57
|
+
inputRef.current.value = code;
|
|
58
58
|
}, [code]);
|
|
59
59
|
|
|
60
60
|
var setCaretPosition = function setCaretPosition(from, to) {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
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"); } }; }();
|
|
2
2
|
|
|
3
|
-
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); } }
|
|
4
|
-
|
|
5
3
|
import React, { useState } from 'react';
|
|
6
4
|
import { FormattedNumber, FormattedDate } from 'react-intl';
|
|
7
5
|
import AccordionWidget from '../AccordionWidget';
|
|
@@ -9,7 +7,9 @@ import Button from '../../components/Button';
|
|
|
9
7
|
import BonusCode from './BonusCode';
|
|
10
8
|
import { List } from 'tg-core-components';
|
|
11
9
|
import Translate from '../../components/Translate';
|
|
10
|
+
import Money from '../../components/Money';
|
|
12
11
|
import { getBonusState } from './states';
|
|
12
|
+
import { getBonusType } from './types';
|
|
13
13
|
import marked from 'marked';
|
|
14
14
|
|
|
15
15
|
var ALEACC_BONUS_CLAIM_STATE = ['Initiated', 'PreClaimed'];
|
|
@@ -129,10 +129,7 @@ var BonusWidget = function BonusWidget(_ref3) {
|
|
|
129
129
|
var bonuses = _ref3.bonuses,
|
|
130
130
|
handleBonusCodeSubmit = _ref3.handleBonusCodeSubmit,
|
|
131
131
|
onClaimBonus = _ref3.onClaimBonus,
|
|
132
|
-
onRejectBonus = _ref3.onRejectBonus
|
|
133
|
-
_ref3$exclude = _ref3.exclude,
|
|
134
|
-
exclude = _ref3$exclude === undefined ? [] : _ref3$exclude,
|
|
135
|
-
disableBonusCodeForm = _ref3.disableBonusCodeForm;
|
|
132
|
+
onRejectBonus = _ref3.onRejectBonus;
|
|
136
133
|
|
|
137
134
|
var bonusList = { active: null, available: null, finished: null };
|
|
138
135
|
|
|
@@ -162,10 +159,11 @@ var BonusWidget = function BonusWidget(_ref3) {
|
|
|
162
159
|
var info = [[React.createElement(
|
|
163
160
|
'div',
|
|
164
161
|
null,
|
|
165
|
-
React.createElement(
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
162
|
+
React.createElement(
|
|
163
|
+
'span',
|
|
164
|
+
null,
|
|
165
|
+
item.Name || item.Description
|
|
166
|
+
)
|
|
169
167
|
), React.createElement(
|
|
170
168
|
'div',
|
|
171
169
|
null,
|
|
@@ -173,15 +171,8 @@ var BonusWidget = function BonusWidget(_ref3) {
|
|
|
173
171
|
)], [React.createElement(
|
|
174
172
|
'div',
|
|
175
173
|
{ className: 'amount' },
|
|
176
|
-
React.createElement(FormattedNumber, {
|
|
177
|
-
|
|
178
|
-
style: item.Type.toLowerCase() == 'freespins' ? 'decimal' : 'currency',
|
|
179
|
-
currency: item.Currency
|
|
180
|
-
})
|
|
181
|
-
), React.createElement(Translate, {
|
|
182
|
-
id: 'label.type.bonus.' + item.Type.toLowerCase(),
|
|
183
|
-
defaultMessage: item.Type.toLowerCase()
|
|
184
|
-
})]];
|
|
174
|
+
item.Type.toLowerCase() == 'freespins' ? React.createElement(FormattedNumber, { value: item.Amount, style: 'decimal' }) : React.createElement(Money, { value: item.Amount, currency: item.Currency })
|
|
175
|
+
), getBonusType(item.Type)]];
|
|
185
176
|
|
|
186
177
|
// Add bonus actions to not expired Fasttrack bonuses
|
|
187
178
|
if (item.Provider === 'fasttrack' && item.State !== 'Expired') info.push(React.createElement(BonusActionFT, { bonus: item, onClaimBonus: onClaimBonus }));
|
|
@@ -267,25 +258,19 @@ var BonusWidget = function BonusWidget(_ref3) {
|
|
|
267
258
|
|
|
268
259
|
var menu = {
|
|
269
260
|
identifier: 'account-history',
|
|
270
|
-
items: [
|
|
261
|
+
items: [{
|
|
271
262
|
name: React.createElement(Translate, { id: 'label.active', defaultMessage: 'Activate' }),
|
|
272
263
|
content: React.createElement(List, { data: bonusList['active'], noData: 'list.no_data.active' })
|
|
273
|
-
}
|
|
264
|
+
}, {
|
|
274
265
|
name: React.createElement(Translate, { id: 'label.available', defaultMessage: 'Available' }),
|
|
275
|
-
content: React.createElement(List, {
|
|
276
|
-
|
|
277
|
-
noData: 'list.no_data.available'
|
|
278
|
-
})
|
|
279
|
-
}] : []), _toConsumableArray(!exclude.includes('finished') ? [{
|
|
266
|
+
content: React.createElement(List, { data: bonusList['available'], noData: 'list.no_data.available' })
|
|
267
|
+
}, {
|
|
280
268
|
name: React.createElement(Translate, { id: 'label.finished', defaultMessage: 'Finished' }),
|
|
281
|
-
content: React.createElement(List, {
|
|
282
|
-
|
|
283
|
-
noData: 'list.no_data.finished'
|
|
284
|
-
})
|
|
285
|
-
}] : []), _toConsumableArray(disableBonusCodeForm && {
|
|
269
|
+
content: React.createElement(List, { data: bonusList['finished'], noData: 'list.no_data.finished' })
|
|
270
|
+
}, {
|
|
286
271
|
name: React.createElement(Translate, { id: 'label.bonus_code', defaultMessage: 'Bonus code' }),
|
|
287
272
|
content: React.createElement(BonusCode, { handleSubmit: handleBonusCodeSubmit })
|
|
288
|
-
}
|
|
273
|
+
}]
|
|
289
274
|
};
|
|
290
275
|
|
|
291
276
|
var items = menu.items.map(function (item, i) {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Translate from '../../components/Translate';
|
|
3
|
+
|
|
4
|
+
export var getBonusType = function getBonusType(type) {
|
|
5
|
+
var translations = {
|
|
6
|
+
Monetary: React.createElement(Translate, { id: 'label.type.bonus.monetary', defaultMessage: 'Monetary' }),
|
|
7
|
+
Freespins: React.createElement(Translate, { id: 'label.type.bonus.freespins', defaultMessage: 'Freespins' }),
|
|
8
|
+
FreespinsMonetary: React.createElement(Translate, {
|
|
9
|
+
id: 'label.type.bonus.freespinsMonetary',
|
|
10
|
+
defaultMessage: 'Freespins Monetary'
|
|
11
|
+
}),
|
|
12
|
+
FreeBetsMonetary: React.createElement(Translate, {
|
|
13
|
+
id: 'label.type.bonus.freeBetsMonetary',
|
|
14
|
+
defaultMessage: 'Free Bets Monetary'
|
|
15
|
+
})
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
return translations[type] || React.createElement(
|
|
19
|
+
'span',
|
|
20
|
+
null,
|
|
21
|
+
type
|
|
22
|
+
);
|
|
23
|
+
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
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; };
|
|
2
|
+
|
|
1
3
|
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; }; }();
|
|
2
4
|
|
|
3
5
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -40,9 +42,11 @@ var InjectedIframeHTML = function (_Component) {
|
|
|
40
42
|
value: function render() {
|
|
41
43
|
var _this2 = this;
|
|
42
44
|
|
|
43
|
-
var
|
|
45
|
+
var _props = this.props,
|
|
46
|
+
data = _props.data,
|
|
47
|
+
iframeProps = _props.iframeProps;
|
|
44
48
|
|
|
45
|
-
return React.createElement('iframe', {
|
|
49
|
+
return React.createElement('iframe', _extends({
|
|
46
50
|
ref: function ref(node) {
|
|
47
51
|
return _this2._iframe = node;
|
|
48
52
|
},
|
|
@@ -50,7 +54,7 @@ var InjectedIframeHTML = function (_Component) {
|
|
|
50
54
|
width: '100%',
|
|
51
55
|
height: data.redirectOutput.height,
|
|
52
56
|
onLoad: this.handleLoad
|
|
53
|
-
});
|
|
57
|
+
}, iframeProps));
|
|
54
58
|
}
|
|
55
59
|
}]);
|
|
56
60
|
|
|
@@ -94,6 +94,7 @@ var PaymentForm = function (_Component) {
|
|
|
94
94
|
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref3 = PaymentForm.__proto__ || Object.getPrototypeOf(PaymentForm)).call.apply(_ref3, [this].concat(args))), _this), _this.onMessage = function (message) {
|
|
95
95
|
var operatingSystem = _this.props.operatingSystem;
|
|
96
96
|
|
|
97
|
+
console.log({ message: message });
|
|
97
98
|
var data = JSON.parse(message.data);
|
|
98
99
|
|
|
99
100
|
if (data.method === 'OPEN_APP') {
|
|
@@ -124,7 +125,8 @@ var PaymentForm = function (_Component) {
|
|
|
124
125
|
onClose = _props.onClose,
|
|
125
126
|
onSuccess = _props.onSuccess,
|
|
126
127
|
redirect = _props.redirect,
|
|
127
|
-
details = _props.details
|
|
128
|
+
details = _props.details,
|
|
129
|
+
iframeProps = _props.iframeProps;
|
|
128
130
|
|
|
129
131
|
|
|
130
132
|
if (!data.success) {
|
|
@@ -161,19 +163,19 @@ var PaymentForm = function (_Component) {
|
|
|
161
163
|
target: redirect ? '_top' : frameId
|
|
162
164
|
}, data.redirectOutput));
|
|
163
165
|
} else if (data.redirectOutput.container == 'iframe' && data.redirectOutput.method == 'POST' && data.redirectOutput.html != null) {
|
|
164
|
-
return React.createElement(InjectedIframeHTML, { data: data });
|
|
166
|
+
return React.createElement(InjectedIframeHTML, { data: data, iframeProps: iframeProps });
|
|
165
167
|
} else if (data.redirectOutput.container == 'iframe' && data.redirectOutput.method == 'GET' && data.redirectOutput.html != null) {
|
|
166
|
-
return React.createElement(InjectedIframeHTML, { data: data });
|
|
168
|
+
return React.createElement(InjectedIframeHTML, { data: data, iframeProps: iframeProps });
|
|
167
169
|
} else if (data.redirectOutput.container == 'iframe' && data.redirectOutput.method == 'GET' && redirect) {
|
|
168
170
|
window.location.href = data.redirectOutput.url;
|
|
169
171
|
return null;
|
|
170
172
|
} else if (data.redirectOutput.container == 'iframe' && data.redirectOutput.method == 'GET') {
|
|
171
|
-
return React.createElement('iframe', {
|
|
173
|
+
return React.createElement('iframe', _extends({
|
|
172
174
|
src: data.redirectOutput.url,
|
|
173
175
|
width: data.redirectOutput.width,
|
|
174
176
|
height: data.redirectOutput.height,
|
|
175
177
|
frameBorder: '0'
|
|
176
|
-
});
|
|
178
|
+
}, iframeProps));
|
|
177
179
|
} else if (data.redirectOutput.container == 'window' && data.redirectOutput.method == 'POST') {
|
|
178
180
|
return React.createElement(DynamicForm, data.redirectOutput);
|
|
179
181
|
} else if (data.redirectOutput.container == 'window' && data.redirectOutput.method == 'GET') {
|
|
@@ -130,6 +130,27 @@ var VenusPoint = function VenusPoint(_ref3) {
|
|
|
130
130
|
);
|
|
131
131
|
};
|
|
132
132
|
|
|
133
|
+
var Vega = function Vega(_ref4) {
|
|
134
|
+
var account = _ref4.account,
|
|
135
|
+
intl = _ref4.intl;
|
|
136
|
+
|
|
137
|
+
return React.createElement(
|
|
138
|
+
'div',
|
|
139
|
+
{ className: 'payment-account-info' },
|
|
140
|
+
React.createElement(Input, {
|
|
141
|
+
disabled: account.accountId,
|
|
142
|
+
name: 'username',
|
|
143
|
+
value: account.maskedAccount,
|
|
144
|
+
label: translate({ id: 'cashier.details.username' }, intl)
|
|
145
|
+
}),
|
|
146
|
+
React.createElement(Input, {
|
|
147
|
+
type: 'password',
|
|
148
|
+
name: 'password',
|
|
149
|
+
label: translate({ id: 'cashier.details.password' }, intl)
|
|
150
|
+
})
|
|
151
|
+
);
|
|
152
|
+
};
|
|
153
|
+
|
|
133
154
|
var PPro = function PPro() {
|
|
134
155
|
return React.createElement(
|
|
135
156
|
'div',
|
|
@@ -138,9 +159,9 @@ var PPro = function PPro() {
|
|
|
138
159
|
);
|
|
139
160
|
};
|
|
140
161
|
|
|
141
|
-
var PhoneNumber = function PhoneNumber(
|
|
142
|
-
var account =
|
|
143
|
-
intl =
|
|
162
|
+
var PhoneNumber = function PhoneNumber(_ref5) {
|
|
163
|
+
var account = _ref5.account,
|
|
164
|
+
intl = _ref5.intl;
|
|
144
165
|
|
|
145
166
|
return React.createElement(
|
|
146
167
|
'div',
|
|
@@ -153,9 +174,9 @@ var PhoneNumber = function PhoneNumber(_ref4) {
|
|
|
153
174
|
);
|
|
154
175
|
};
|
|
155
176
|
|
|
156
|
-
var Email = function Email(
|
|
157
|
-
var account =
|
|
158
|
-
intl =
|
|
177
|
+
var Email = function Email(_ref6) {
|
|
178
|
+
var account = _ref6.account,
|
|
179
|
+
intl = _ref6.intl;
|
|
159
180
|
|
|
160
181
|
return React.createElement(
|
|
161
182
|
'div',
|
|
@@ -169,9 +190,9 @@ var Email = function Email(_ref5) {
|
|
|
169
190
|
);
|
|
170
191
|
};
|
|
171
192
|
|
|
172
|
-
var Banklocal = function Banklocal(
|
|
173
|
-
var account =
|
|
174
|
-
intl =
|
|
193
|
+
var Banklocal = function Banklocal(_ref7) {
|
|
194
|
+
var account = _ref7.account,
|
|
195
|
+
intl = _ref7.intl;
|
|
175
196
|
|
|
176
197
|
return React.createElement(
|
|
177
198
|
'div',
|
|
@@ -185,7 +206,7 @@ var Banklocal = function Banklocal(_ref6) {
|
|
|
185
206
|
React.createElement(Input, {
|
|
186
207
|
value: account.accountId ? account.maskedAccount.replace(/\d*-/g, '') : undefined,
|
|
187
208
|
name: 'accountNumber',
|
|
188
|
-
title: translate({ id: 'cashier.details.
|
|
209
|
+
title: translate({ id: 'cashier.details.iban' }, intl),
|
|
189
210
|
disabled: account.accountId
|
|
190
211
|
})
|
|
191
212
|
);
|
|
@@ -211,6 +232,11 @@ export var VenusPointDeposit = {
|
|
|
211
232
|
parser: Parser.parseVenusPoint
|
|
212
233
|
};
|
|
213
234
|
|
|
235
|
+
export var VegaDeposit = {
|
|
236
|
+
component: injectMethod('deposit', injectIntl(Vega)),
|
|
237
|
+
parser: Parser.parseVega
|
|
238
|
+
};
|
|
239
|
+
|
|
214
240
|
export var SiruDeposit = {
|
|
215
241
|
component: injectIntl(PhoneNumber),
|
|
216
242
|
parser: Parser.parsePhoneNumber
|
|
@@ -262,6 +288,11 @@ export var VenusPointWithdrawal = {
|
|
|
262
288
|
parser: Parser.parseVenusPoint
|
|
263
289
|
};
|
|
264
290
|
|
|
291
|
+
export var VegaWithdrawal = {
|
|
292
|
+
component: injectMethod('withdraw', injectIntl(Vega)),
|
|
293
|
+
parser: Parser.parseVega
|
|
294
|
+
};
|
|
295
|
+
|
|
265
296
|
export var NetellerWithdrawal = {
|
|
266
297
|
component: injectMethod('withdraw', injectIntl(Neteller)),
|
|
267
298
|
parser: Parser.parseNeteller
|
|
@@ -37,6 +37,12 @@ export var parseVenusPoint = function parseVenusPoint(account) {
|
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
+
export var parseVega = function parseVega(account) {
|
|
41
|
+
return {
|
|
42
|
+
account: account.maskedAccount || account.account
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
|
|
40
46
|
export var parsePhoneNumber = function parsePhoneNumber(account) {
|
|
41
47
|
return {
|
|
42
48
|
phoneNumber: account.phoneNumber || account.maskedAccount
|
|
@@ -265,7 +265,10 @@ var DepositWidget = function (_Component) {
|
|
|
265
265
|
if (amount < parseFloat(selectedMethod.limit.min) || amount < parseFloat(_this2.getMinDepositBonusAmount())) {
|
|
266
266
|
errors.amount.push(React.createElement(Translate, {
|
|
267
267
|
id: 'error.cashier.amount-below-method-limit',
|
|
268
|
-
defaultMessage: 'Amount is too low.'
|
|
268
|
+
defaultMessage: 'Amount is too low. Min amount: {min}',
|
|
269
|
+
values: {
|
|
270
|
+
min: Math.min(parseFloat(selectedMethod.limit.min), parseFloat(_this2.getMinDepositBonusAmount()))
|
|
271
|
+
}
|
|
269
272
|
}));
|
|
270
273
|
return errors;
|
|
271
274
|
}
|