tg-core-components 6.3.2 → 6.3.3

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.
@@ -0,0 +1,3 @@
1
+ export default (function (value) {
2
+ return !value.match(/[\+\=?!@%&<>\[\]{}()<>|$€£#\/\\]/);
3
+ });
@@ -0,0 +1,3 @@
1
+ export default (function (value) {
2
+ return !value.match(/[\s!"#\$%&'\(\)\*\+,\-\.\/:;<>\?@\[\\\]\^_`{|}~]/);
3
+ });
@@ -1,3 +1,3 @@
1
- export default (function (phone) {
2
- return phone ? /^[\+]?[0-9]{0,4}[0-9]{8,12}$/.test(phone) : true;
1
+ export default (function (value) {
2
+ return value.match(/^\+?\d{9,17}$/);
3
3
  });
@@ -3,6 +3,10 @@ import compose from 'recompose/compose';
3
3
  import PropTypes from 'prop-types';
4
4
  import { injectIntl } from 'react-intl';
5
5
  import require from '../../lib/WithValidation/rules/required';
6
+ import phone from '../../lib/WithValidation/rules/phone';
7
+ import blacklistedCharacters from '../../lib/WithValidation/rules/blacklistedCharacters';
8
+ import noSpecialCharacters from '../../lib/WithValidation/rules/noSpecialCharacters';
9
+ import stringWithoutNumbers from '../../lib/WithValidation/rules/stringWithoutNumbers';
6
10
  import WithValidation from '../../lib/WithValidation';
7
11
  import Input from '../../components/Input';
8
12
  import Select from '../../components/Select';
@@ -44,7 +48,9 @@ var AccountDetail = function AccountDetail(_ref) {
44
48
  onSubmit = _ref.onSubmit,
45
49
  jurisdiction = _ref.jurisdiction,
46
50
  countries = _ref.countries,
47
- isLoading = _ref.isLoading;
51
+ isLoading = _ref.isLoading,
52
+ isComplete = _ref.isComplete,
53
+ showCallingCode = _ref.showCallingCode;
48
54
 
49
55
  return React.createElement(
50
56
  'form',
@@ -119,7 +125,7 @@ var AccountDetail = function AccountDetail(_ref) {
119
125
  React.createElement(
120
126
  Select,
121
127
  {
122
- disabled: Boolean(data.Country),
128
+ disabled: isComplete,
123
129
  className: 'layout-item-6',
124
130
  value: data.Country,
125
131
  label: translate({
@@ -156,6 +162,14 @@ var AccountDetail = function AccountDetail(_ref) {
156
162
  id: 'title.mobile_number',
157
163
  defaultMessage: 'Mobile number'
158
164
  }, intl),
165
+ callingCodes: showCallingCode && countries ? countries.sort(function (a, b) {
166
+ return Number(a.callingCode) - Number(b.callingCode);
167
+ }).map(function (i) {
168
+ return {
169
+ value: '00' + i.callingCode,
170
+ label: '+' + i.callingCode + ' ' + (countryEmojiFlags[i.value] || '')
171
+ };
172
+ }) : [],
159
173
  name: 'MobilePhoneNumber',
160
174
  autoComplete: 'off',
161
175
  status: errors.MobilePhoneNumber && 'failure' || 'idle',
@@ -248,7 +262,9 @@ AccountDetail.propTypes = {
248
262
  /** Array of validation errors where the error display depends on which invalid rule it breaks */
249
263
  error: PropTypes.array,
250
264
  /** The submission function firing when submitting the form */
251
- onSubmit: PropTypes.func
265
+ onSubmit: PropTypes.func,
266
+ /** If the user profile is complete or not */
267
+ isComplete: PropTypes.bool
252
268
  };
253
269
 
254
270
  AccountDetail.defaultProps = {
@@ -258,14 +274,15 @@ AccountDetail.defaultProps = {
258
274
  value: '',
259
275
  name: '',
260
276
  error: [],
261
- onSubmit: Function
277
+ onSubmit: Function,
278
+ isComplete: false
262
279
  };
263
280
 
264
281
  var rules = {
265
- MobilePhoneNumber: [[require, 'error.empty.mobilePhoneNumber']],
266
- Address1: [[require, 'error.empty.address']],
267
- Zip: [[require, 'error.empty.zip_code']],
268
- City: [[require, 'error.empty.city']],
282
+ MobilePhoneNumber: [[require, 'error.empty.mobilePhoneNumber'], [phone, 'error.condition.phone']],
283
+ Address1: [[require, 'error.empty.address'], [blacklistedCharacters, 'error.format.address']],
284
+ Zip: [[require, 'error.empty.zip_code'], [noSpecialCharacters, 'error.format.zip']],
285
+ City: [[require, 'error.empty.city'], [stringWithoutNumbers, 'error.invalid.city'], [blacklistedCharacters, 'error.invalid.city']],
269
286
  Password: [[require, 'error.empty.password']],
270
287
  Country: [[require, 'error.empty.country']],
271
288
  Gender: [[require, 'error.empty.gender']]
@@ -46,7 +46,7 @@ var BonusAction = function BonusAction(_ref) {
46
46
  return React.createElement(
47
47
  'div',
48
48
  { className: 'actions' },
49
- ALEACC_BONUS_CLAIM_STATE.includes(bonus.State) && React.createElement(
49
+ ALEACC_BONUS_CLAIM_STATE.includes(bonus.State) || bonus.Type === 'Deposit' && React.createElement(
50
50
  Button,
51
51
  {
52
52
  className: 'button primary small',
@@ -149,7 +149,7 @@ var BonusWidget = function BonusWidget(_ref3) {
149
149
 
150
150
  Object.keys(bonusList).forEach(function (bonusState) {
151
151
  var listData = bonuses.filter(function (bonus) {
152
- return bonusMapping[bonus.State] === bonusState;
152
+ return bonusMapping[bonus.State] === bonusState || bonus.Type === 'Deposit' && bonusState === 'available';
153
153
  });
154
154
 
155
155
  bonusList[bonusState] = listData.map(function (item) {
@@ -168,7 +168,7 @@ var BonusWidget = function BonusWidget(_ref3) {
168
168
  'div',
169
169
  null,
170
170
  getBonusState(item.State)
171
- )], [React.createElement(
171
+ )], [item.Amount && React.createElement(
172
172
  'div',
173
173
  { className: 'amount' },
174
174
  item.Type.toLowerCase() == 'freespins' ? React.createElement(FormattedNumber, { value: item.Amount, style: 'decimal' }) : React.createElement(Money, { value: item.Amount, currency: item.Currency })
@@ -177,7 +177,7 @@ var BonusWidget = function BonusWidget(_ref3) {
177
177
  // Add bonus actions to not expired Fasttrack bonuses
178
178
  if (item.Provider === 'fasttrack' && item.State !== 'Expired') info.push(React.createElement(BonusActionFT, { bonus: item, onClaimBonus: onClaimBonus }));
179
179
  // Add bonus actions to post claim bonuses from Aleacc
180
- else if (item.Provider !== 'fasttrack' && ALEACC_BONUS_ACTION_STATE.includes(item.State)) info.push(React.createElement(BonusAction, {
180
+ else if (item.Provider !== 'fasttrack' && ALEACC_BONUS_ACTION_STATE.includes(item.State) || item.Type === 'Deposit') info.push(React.createElement(BonusAction, {
181
181
  bonus: item,
182
182
  onClaimBonus: onClaimBonus,
183
183
  onRejectBonus: onRejectBonus
@@ -12,7 +12,8 @@ export var getBonusType = function getBonusType(type) {
12
12
  FreeBetsMonetary: React.createElement(Translate, {
13
13
  id: 'label.type.bonus.freeBetsMonetary',
14
14
  defaultMessage: 'Free Bets Monetary'
15
- })
15
+ }),
16
+ Deposit: React.createElement(Translate, { id: 'label.type.bonus.deposit', defaultMessage: 'Deposit' })
16
17
  };
17
18
 
18
19
  return translations[type] || React.createElement(
@@ -94,7 +94,6 @@ 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 });
98
97
  var data = JSON.parse(message.data);
99
98
 
100
99
  if (data.method === 'OPEN_APP') {
@@ -167,7 +166,7 @@ var PaymentForm = function (_Component) {
167
166
  } else if (data.redirectOutput.container == 'iframe' && data.redirectOutput.method == 'GET' && data.redirectOutput.html != null) {
168
167
  return React.createElement(InjectedIframeHTML, { data: data, iframeProps: iframeProps });
169
168
  } else if (data.redirectOutput.container == 'iframe' && data.redirectOutput.method == 'GET' && redirect) {
170
- window.location.href = data.redirectOutput.url;
169
+ window.location.replace(data.redirectOutput.url);
171
170
  return null;
172
171
  } else if (data.redirectOutput.container == 'iframe' && data.redirectOutput.method == 'GET') {
173
172
  return React.createElement('iframe', _extends({
@@ -31,6 +31,8 @@ var Timespan = function Timespan(_ref) {
31
31
  var getValue = function getValue(valueType, currency, intl) {
32
32
  return function (value) {
33
33
  if (valueType !== 'currency') {
34
+ if (value === 99999 && valueType === 'days') return get(intl)('label.responsible-gaming.unlimited');
35
+
34
36
  var values = convertTimeValues(value, valueType);
35
37
  return Object.entries(values).filter(function (_ref2) {
36
38
  var _ref3 = _slicedToArray(_ref2, 2),
@@ -254,66 +254,72 @@ var messages = (_messages = {}, _defineProperty(_messages, 'header.responsible-g
254
254
  id: 'label.responsible-gaming.option.other-years',
255
255
  defaultMessage: 'Other (Years)'
256
256
  }, intl);
257
- }), _defineProperty(_messages, 'label.responsible-gaming.currency', function labelResponsibleGamingCurrency(_ref16) {
258
- var intl = _ref16.intl,
259
- value = _ref16.value,
260
- currency = _ref16.currency;
257
+ }), _defineProperty(_messages, 'label.responsible-gaming.unlimited', function labelResponsibleGamingUnlimited(_ref16) {
258
+ var intl = _ref16.intl;
259
+ return translate({
260
+ id: 'label.responsible-gaming.unlimited',
261
+ defaultMessage: 'Unlimited'
262
+ }, intl);
263
+ }), _defineProperty(_messages, 'label.responsible-gaming.currency', function labelResponsibleGamingCurrency(_ref17) {
264
+ var intl = _ref17.intl,
265
+ value = _ref17.value,
266
+ currency = _ref17.currency;
261
267
  return intl.formatNumber(value, {
262
268
  style: 'currency',
263
269
  currency: currency,
264
270
  minimumFractionDigits: 0,
265
271
  maximumFractionDigits: 0
266
272
  });
267
- }), _defineProperty(_messages, 'label.responsible-gaming.minutes', function labelResponsibleGamingMinutes(_ref17) {
268
- var intl = _ref17.intl,
269
- value = _ref17.value;
273
+ }), _defineProperty(_messages, 'label.responsible-gaming.minutes', function labelResponsibleGamingMinutes(_ref18) {
274
+ var intl = _ref18.intl,
275
+ value = _ref18.value;
270
276
  return translate({
271
277
  id: 'label.responsible-gaming.minutes',
272
278
  defaultMessage: '{Amount, plural, one {# minute} other {# minutes}}',
273
279
  values: { Amount: value }
274
280
  }, intl);
275
- }), _defineProperty(_messages, 'label.responsible-gaming.hours', function labelResponsibleGamingHours(_ref18) {
276
- var intl = _ref18.intl,
277
- value = _ref18.value;
281
+ }), _defineProperty(_messages, 'label.responsible-gaming.hours', function labelResponsibleGamingHours(_ref19) {
282
+ var intl = _ref19.intl,
283
+ value = _ref19.value;
278
284
  return translate({
279
285
  id: 'label.responsible-gaming.hours',
280
286
  defaultMessage: '{Amount, plural, one {# hour} other {# hours}}',
281
287
  values: { Amount: value }
282
288
  }, intl);
283
- }), _defineProperty(_messages, 'label.responsible-gaming.days', function labelResponsibleGamingDays(_ref19) {
284
- var intl = _ref19.intl,
285
- value = _ref19.value;
289
+ }), _defineProperty(_messages, 'label.responsible-gaming.days', function labelResponsibleGamingDays(_ref20) {
290
+ var intl = _ref20.intl,
291
+ value = _ref20.value;
286
292
  return translate({
287
293
  id: 'label.responsible-gaming.days',
288
294
  defaultMessage: '{Amount, plural, one {# day} other {# days}}',
289
295
  values: { Amount: value }
290
296
  }, intl);
291
- }), _defineProperty(_messages, 'label.responsible-gaming.weeks', function labelResponsibleGamingWeeks(_ref20) {
292
- var intl = _ref20.intl,
293
- value = _ref20.value;
297
+ }), _defineProperty(_messages, 'label.responsible-gaming.weeks', function labelResponsibleGamingWeeks(_ref21) {
298
+ var intl = _ref21.intl,
299
+ value = _ref21.value;
294
300
  return translate({
295
301
  id: 'label.responsible-gaming.weeks',
296
302
  defaultMessage: '{Amount, plural, one {# week} other {# weeks}}',
297
303
  values: { Amount: value }
298
304
  }, intl);
299
- }), _defineProperty(_messages, 'label.responsible-gaming.months', function labelResponsibleGamingMonths(_ref21) {
300
- var intl = _ref21.intl,
301
- value = _ref21.value;
305
+ }), _defineProperty(_messages, 'label.responsible-gaming.months', function labelResponsibleGamingMonths(_ref22) {
306
+ var intl = _ref22.intl,
307
+ value = _ref22.value;
302
308
  return translate({
303
309
  id: 'label.responsible-gaming.months',
304
310
  defaultMessage: '{Amount, plural, one {# month} other {# months}}',
305
311
  values: { Amount: value }
306
312
  }, intl);
307
- }), _defineProperty(_messages, 'label.responsible-gaming.years', function labelResponsibleGamingYears(_ref22) {
308
- var intl = _ref22.intl,
309
- value = _ref22.value;
313
+ }), _defineProperty(_messages, 'label.responsible-gaming.years', function labelResponsibleGamingYears(_ref23) {
314
+ var intl = _ref23.intl,
315
+ value = _ref23.value;
310
316
  return translate({
311
317
  id: 'label.responsible-gaming.years',
312
318
  defaultMessage: '{Amount, plural, one {# year} other {# years}}',
313
319
  values: { Amount: value }
314
320
  }, intl);
315
- }), _defineProperty(_messages, 'alert_message.warning.responsible-gaming.admin-limits', function alert_messageWarningResponsibleGamingAdminLimits(_ref23) {
316
- var adminLimits = _ref23.adminLimits;
321
+ }), _defineProperty(_messages, 'alert_message.warning.responsible-gaming.admin-limits', function alert_messageWarningResponsibleGamingAdminLimits(_ref24) {
322
+ var adminLimits = _ref24.adminLimits;
317
323
  return React.createElement(Alert, {
318
324
  id: 'alert_message.warning.responsible-gaming.admin-limits',
319
325
  defaultMessage: 'Please note that we have locked the following limits on your account. These limits will apply even if you choose higher amounts in the boxes below. {AdminLimits} Contact support for further information.',
@@ -321,11 +327,11 @@ var messages = (_messages = {}, _defineProperty(_messages, 'header.responsible-g
321
327
  values: { AdminLimits: adminLimits },
322
328
  scrollIntoView: false
323
329
  });
324
- }), _defineProperty(_messages, 'label.responsible-gaming.admin-limits-row', function labelResponsibleGamingAdminLimitsRow(_ref24) {
325
- var intl = _ref24.intl,
326
- Timespan = _ref24.Timespan,
327
- Amount = _ref24.Amount,
328
- Product = _ref24.Product;
330
+ }), _defineProperty(_messages, 'label.responsible-gaming.admin-limits-row', function labelResponsibleGamingAdminLimitsRow(_ref25) {
331
+ var intl = _ref25.intl,
332
+ Timespan = _ref25.Timespan,
333
+ Amount = _ref25.Amount,
334
+ Product = _ref25.Product;
329
335
  return translate({
330
336
  id: 'label.responsible-gaming.admin-limits-row',
331
337
  defaultMessage: '{Timespan, select,\n 0 {Transaction}\n 1 {Daily}\n 7 {Weekly}\n 30 {Monthly}\n other {Other}\n }: {Amount} {Product, select,\n Casino {(Only applies for casino games)}\n other {}\n }',
@@ -102,7 +102,7 @@ var ContactInfo = function (_Component) {
102
102
  onBlur: function onBlur(value) {
103
103
  return _onBlur('FirstName', value);
104
104
  },
105
- error: (errors.FirstName && translate({ id: errors.FirstName }, intl))
105
+ error: errors.FirstName && translate({ id: errors.FirstName }, intl)
106
106
  }),
107
107
  React.createElement(Input, {
108
108
  className: 'layout-item-6',
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ exports.default = function (value) {
8
+ return !value.match(/[\+\=?!@%&<>\[\]{}()<>|$€£#\/\\]/);
9
+ };
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ exports.default = function (value) {
8
+ return !value.match(/[\s!"#\$%&'\(\)\*\+,\-\.\/:;<>\?@\[\\\]\^_`{|}~]/);
9
+ };
@@ -4,6 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- exports.default = function (phone) {
8
- return phone ? /^[\+]?[0-9]{0,4}[0-9]{8,12}$/.test(phone) : true;
7
+ exports.default = function (value) {
8
+ return value.match(/^\+?\d{9,17}$/);
9
9
  };
@@ -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);
@@ -85,7 +101,9 @@ var AccountDetail = function AccountDetail(_ref) {
85
101
  onSubmit = _ref.onSubmit,
86
102
  jurisdiction = _ref.jurisdiction,
87
103
  countries = _ref.countries,
88
- isLoading = _ref.isLoading;
104
+ isLoading = _ref.isLoading,
105
+ isComplete = _ref.isComplete,
106
+ showCallingCode = _ref.showCallingCode;
89
107
 
90
108
  return _react2.default.createElement(
91
109
  'form',
@@ -160,7 +178,7 @@ var AccountDetail = function AccountDetail(_ref) {
160
178
  _react2.default.createElement(
161
179
  _Select2.default,
162
180
  {
163
- disabled: Boolean(data.Country),
181
+ disabled: isComplete,
164
182
  className: 'layout-item-6',
165
183
  value: data.Country,
166
184
  label: (0, _translate2.default)({
@@ -197,6 +215,14 @@ var AccountDetail = function AccountDetail(_ref) {
197
215
  id: 'title.mobile_number',
198
216
  defaultMessage: 'Mobile number'
199
217
  }, intl),
218
+ callingCodes: showCallingCode && countries ? countries.sort(function (a, b) {
219
+ return Number(a.callingCode) - Number(b.callingCode);
220
+ }).map(function (i) {
221
+ return {
222
+ value: '00' + i.callingCode,
223
+ label: '+' + i.callingCode + ' ' + (_countryEmojiFlags2.default[i.value] || '')
224
+ };
225
+ }) : [],
200
226
  name: 'MobilePhoneNumber',
201
227
  autoComplete: 'off',
202
228
  status: errors.MobilePhoneNumber && 'failure' || 'idle',
@@ -289,7 +315,9 @@ AccountDetail.propTypes = {
289
315
  /** Array of validation errors where the error display depends on which invalid rule it breaks */
290
316
  error: _propTypes2.default.array,
291
317
  /** The submission function firing when submitting the form */
292
- onSubmit: _propTypes2.default.func
318
+ onSubmit: _propTypes2.default.func,
319
+ /** If the user profile is complete or not */
320
+ isComplete: _propTypes2.default.bool
293
321
  };
294
322
 
295
323
  AccountDetail.defaultProps = {
@@ -299,14 +327,15 @@ AccountDetail.defaultProps = {
299
327
  value: '',
300
328
  name: '',
301
329
  error: [],
302
- onSubmit: Function
330
+ onSubmit: Function,
331
+ isComplete: false
303
332
  };
304
333
 
305
334
  var rules = {
306
- MobilePhoneNumber: [[_required2.default, 'error.empty.mobilePhoneNumber']],
307
- Address1: [[_required2.default, 'error.empty.address']],
308
- Zip: [[_required2.default, 'error.empty.zip_code']],
309
- City: [[_required2.default, 'error.empty.city']],
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']],
310
339
  Password: [[_required2.default, 'error.empty.password']],
311
340
  Country: [[_required2.default, 'error.empty.country']],
312
341
  Gender: [[_required2.default, 'error.empty.gender']]
@@ -78,7 +78,7 @@ var BonusAction = function BonusAction(_ref) {
78
78
  return _react2.default.createElement(
79
79
  'div',
80
80
  { className: 'actions' },
81
- ALEACC_BONUS_CLAIM_STATE.includes(bonus.State) && _react2.default.createElement(
81
+ ALEACC_BONUS_CLAIM_STATE.includes(bonus.State) || bonus.Type === 'Deposit' && _react2.default.createElement(
82
82
  _Button2.default,
83
83
  {
84
84
  className: 'button primary small',
@@ -181,7 +181,7 @@ var BonusWidget = function BonusWidget(_ref3) {
181
181
 
182
182
  Object.keys(bonusList).forEach(function (bonusState) {
183
183
  var listData = bonuses.filter(function (bonus) {
184
- return bonusMapping[bonus.State] === bonusState;
184
+ return bonusMapping[bonus.State] === bonusState || bonus.Type === 'Deposit' && bonusState === 'available';
185
185
  });
186
186
 
187
187
  bonusList[bonusState] = listData.map(function (item) {
@@ -200,7 +200,7 @@ var BonusWidget = function BonusWidget(_ref3) {
200
200
  'div',
201
201
  null,
202
202
  (0, _states.getBonusState)(item.State)
203
- )], [_react2.default.createElement(
203
+ )], [item.Amount && _react2.default.createElement(
204
204
  'div',
205
205
  { className: 'amount' },
206
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 })
@@ -209,7 +209,7 @@ var BonusWidget = function BonusWidget(_ref3) {
209
209
  // Add bonus actions to not expired Fasttrack bonuses
210
210
  if (item.Provider === 'fasttrack' && item.State !== 'Expired') info.push(_react2.default.createElement(BonusActionFT, { bonus: item, onClaimBonus: onClaimBonus }));
211
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, {
212
+ else if (item.Provider !== 'fasttrack' && ALEACC_BONUS_ACTION_STATE.includes(item.State) || item.Type === 'Deposit') info.push(_react2.default.createElement(BonusAction, {
213
213
  bonus: item,
214
214
  onClaimBonus: onClaimBonus,
215
215
  onRejectBonus: onRejectBonus
@@ -26,7 +26,8 @@ var getBonusType = exports.getBonusType = function getBonusType(type) {
26
26
  FreeBetsMonetary: _react2.default.createElement(_Translate2.default, {
27
27
  id: 'label.type.bonus.freeBetsMonetary',
28
28
  defaultMessage: 'Free Bets Monetary'
29
- })
29
+ }),
30
+ Deposit: _react2.default.createElement(_Translate2.default, { id: 'label.type.bonus.deposit', defaultMessage: 'Deposit' })
30
31
  };
31
32
 
32
33
  return translations[type] || _react2.default.createElement(
@@ -126,7 +126,6 @@ var PaymentForm = function (_Component) {
126
126
  return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref3 = PaymentForm.__proto__ || Object.getPrototypeOf(PaymentForm)).call.apply(_ref3, [this].concat(args))), _this), _this.onMessage = function (message) {
127
127
  var operatingSystem = _this.props.operatingSystem;
128
128
 
129
- console.log({ message: message });
130
129
  var data = JSON.parse(message.data);
131
130
 
132
131
  if (data.method === 'OPEN_APP') {
@@ -199,7 +198,7 @@ var PaymentForm = function (_Component) {
199
198
  } else if (data.redirectOutput.container == 'iframe' && data.redirectOutput.method == 'GET' && data.redirectOutput.html != null) {
200
199
  return _react2.default.createElement(_InjectedIframeHTML2.default, { data: data, iframeProps: iframeProps });
201
200
  } else if (data.redirectOutput.container == 'iframe' && data.redirectOutput.method == 'GET' && redirect) {
202
- window.location.href = data.redirectOutput.url;
201
+ window.location.replace(data.redirectOutput.url);
203
202
  return null;
204
203
  } else if (data.redirectOutput.container == 'iframe' && data.redirectOutput.method == 'GET') {
205
204
  return _react2.default.createElement('iframe', _extends({
@@ -61,6 +61,8 @@ var Timespan = function Timespan(_ref) {
61
61
  var getValue = function getValue(valueType, currency, intl) {
62
62
  return function (value) {
63
63
  if (valueType !== 'currency') {
64
+ if (value === 99999 && valueType === 'days') return get(intl)('label.responsible-gaming.unlimited');
65
+
64
66
  var values = (0, _helpers.convertTimeValues)(value, valueType);
65
67
  return Object.entries(values).filter(function (_ref2) {
66
68
  var _ref3 = _slicedToArray(_ref2, 2),
@@ -275,66 +275,72 @@ var messages = (_messages = {}, _defineProperty(_messages, 'header.responsible-g
275
275
  id: 'label.responsible-gaming.option.other-years',
276
276
  defaultMessage: 'Other (Years)'
277
277
  }, intl);
278
- }), _defineProperty(_messages, 'label.responsible-gaming.currency', function labelResponsibleGamingCurrency(_ref16) {
279
- var intl = _ref16.intl,
280
- value = _ref16.value,
281
- currency = _ref16.currency;
278
+ }), _defineProperty(_messages, 'label.responsible-gaming.unlimited', function labelResponsibleGamingUnlimited(_ref16) {
279
+ var intl = _ref16.intl;
280
+ return (0, _translate2.default)({
281
+ id: 'label.responsible-gaming.unlimited',
282
+ defaultMessage: 'Unlimited'
283
+ }, intl);
284
+ }), _defineProperty(_messages, 'label.responsible-gaming.currency', function labelResponsibleGamingCurrency(_ref17) {
285
+ var intl = _ref17.intl,
286
+ value = _ref17.value,
287
+ currency = _ref17.currency;
282
288
  return intl.formatNumber(value, {
283
289
  style: 'currency',
284
290
  currency: currency,
285
291
  minimumFractionDigits: 0,
286
292
  maximumFractionDigits: 0
287
293
  });
288
- }), _defineProperty(_messages, 'label.responsible-gaming.minutes', function labelResponsibleGamingMinutes(_ref17) {
289
- var intl = _ref17.intl,
290
- value = _ref17.value;
294
+ }), _defineProperty(_messages, 'label.responsible-gaming.minutes', function labelResponsibleGamingMinutes(_ref18) {
295
+ var intl = _ref18.intl,
296
+ value = _ref18.value;
291
297
  return (0, _translate2.default)({
292
298
  id: 'label.responsible-gaming.minutes',
293
299
  defaultMessage: '{Amount, plural, one {# minute} other {# minutes}}',
294
300
  values: { Amount: value }
295
301
  }, intl);
296
- }), _defineProperty(_messages, 'label.responsible-gaming.hours', function labelResponsibleGamingHours(_ref18) {
297
- var intl = _ref18.intl,
298
- value = _ref18.value;
302
+ }), _defineProperty(_messages, 'label.responsible-gaming.hours', function labelResponsibleGamingHours(_ref19) {
303
+ var intl = _ref19.intl,
304
+ value = _ref19.value;
299
305
  return (0, _translate2.default)({
300
306
  id: 'label.responsible-gaming.hours',
301
307
  defaultMessage: '{Amount, plural, one {# hour} other {# hours}}',
302
308
  values: { Amount: value }
303
309
  }, intl);
304
- }), _defineProperty(_messages, 'label.responsible-gaming.days', function labelResponsibleGamingDays(_ref19) {
305
- var intl = _ref19.intl,
306
- value = _ref19.value;
310
+ }), _defineProperty(_messages, 'label.responsible-gaming.days', function labelResponsibleGamingDays(_ref20) {
311
+ var intl = _ref20.intl,
312
+ value = _ref20.value;
307
313
  return (0, _translate2.default)({
308
314
  id: 'label.responsible-gaming.days',
309
315
  defaultMessage: '{Amount, plural, one {# day} other {# days}}',
310
316
  values: { Amount: value }
311
317
  }, intl);
312
- }), _defineProperty(_messages, 'label.responsible-gaming.weeks', function labelResponsibleGamingWeeks(_ref20) {
313
- var intl = _ref20.intl,
314
- value = _ref20.value;
318
+ }), _defineProperty(_messages, 'label.responsible-gaming.weeks', function labelResponsibleGamingWeeks(_ref21) {
319
+ var intl = _ref21.intl,
320
+ value = _ref21.value;
315
321
  return (0, _translate2.default)({
316
322
  id: 'label.responsible-gaming.weeks',
317
323
  defaultMessage: '{Amount, plural, one {# week} other {# weeks}}',
318
324
  values: { Amount: value }
319
325
  }, intl);
320
- }), _defineProperty(_messages, 'label.responsible-gaming.months', function labelResponsibleGamingMonths(_ref21) {
321
- var intl = _ref21.intl,
322
- value = _ref21.value;
326
+ }), _defineProperty(_messages, 'label.responsible-gaming.months', function labelResponsibleGamingMonths(_ref22) {
327
+ var intl = _ref22.intl,
328
+ value = _ref22.value;
323
329
  return (0, _translate2.default)({
324
330
  id: 'label.responsible-gaming.months',
325
331
  defaultMessage: '{Amount, plural, one {# month} other {# months}}',
326
332
  values: { Amount: value }
327
333
  }, intl);
328
- }), _defineProperty(_messages, 'label.responsible-gaming.years', function labelResponsibleGamingYears(_ref22) {
329
- var intl = _ref22.intl,
330
- value = _ref22.value;
334
+ }), _defineProperty(_messages, 'label.responsible-gaming.years', function labelResponsibleGamingYears(_ref23) {
335
+ var intl = _ref23.intl,
336
+ value = _ref23.value;
331
337
  return (0, _translate2.default)({
332
338
  id: 'label.responsible-gaming.years',
333
339
  defaultMessage: '{Amount, plural, one {# year} other {# years}}',
334
340
  values: { Amount: value }
335
341
  }, intl);
336
- }), _defineProperty(_messages, 'alert_message.warning.responsible-gaming.admin-limits', function alert_messageWarningResponsibleGamingAdminLimits(_ref23) {
337
- var adminLimits = _ref23.adminLimits;
342
+ }), _defineProperty(_messages, 'alert_message.warning.responsible-gaming.admin-limits', function alert_messageWarningResponsibleGamingAdminLimits(_ref24) {
343
+ var adminLimits = _ref24.adminLimits;
338
344
  return _react2.default.createElement(_Alert2.default, {
339
345
  id: 'alert_message.warning.responsible-gaming.admin-limits',
340
346
  defaultMessage: 'Please note that we have locked the following limits on your account. These limits will apply even if you choose higher amounts in the boxes below. {AdminLimits} Contact support for further information.',
@@ -342,11 +348,11 @@ var messages = (_messages = {}, _defineProperty(_messages, 'header.responsible-g
342
348
  values: { AdminLimits: adminLimits },
343
349
  scrollIntoView: false
344
350
  });
345
- }), _defineProperty(_messages, 'label.responsible-gaming.admin-limits-row', function labelResponsibleGamingAdminLimitsRow(_ref24) {
346
- var intl = _ref24.intl,
347
- Timespan = _ref24.Timespan,
348
- Amount = _ref24.Amount,
349
- Product = _ref24.Product;
351
+ }), _defineProperty(_messages, 'label.responsible-gaming.admin-limits-row', function labelResponsibleGamingAdminLimitsRow(_ref25) {
352
+ var intl = _ref25.intl,
353
+ Timespan = _ref25.Timespan,
354
+ Amount = _ref25.Amount,
355
+ Product = _ref25.Product;
350
356
  return (0, _translate2.default)({
351
357
  id: 'label.responsible-gaming.admin-limits-row',
352
358
  defaultMessage: '{Timespan, select,\n 0 {Transaction}\n 1 {Daily}\n 7 {Weekly}\n 30 {Monthly}\n other {Other}\n }: {Amount} {Product, select,\n Casino {(Only applies for casino games)}\n other {}\n }',
@@ -141,7 +141,7 @@ var ContactInfo = function (_Component) {
141
141
  onBlur: function onBlur(value) {
142
142
  return _onBlur('FirstName', value);
143
143
  },
144
- error: (errors.FirstName && (0, _translate2.default)({ id: errors.FirstName }), intl)
144
+ error: errors.FirstName && (0, _translate2.default)({ id: errors.FirstName }, intl)
145
145
  }),
146
146
  _react2.default.createElement(_Input2.default, {
147
147
  className: 'layout-item-6',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tg-core-components",
3
- "version": "6.3.2",
3
+ "version": "6.3.3",
4
4
  "description": "tg-core-components",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -76,5 +76,5 @@
76
76
  "webpack": "^3.0.0",
77
77
  "webpack-blocks": "^1.0.0"
78
78
  },
79
- "gitHead": "655fb1956cc5f772c25bcb3a193836eb387d5122"
79
+ "gitHead": "df29624860793d17d9c0add85c5fcf03d3d5ac6b"
80
80
  }