tg-core-components 6.3.1 → 6.3.3-alpha.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/widgets/ResponsibleGaming/Amount.js +1 -1
- package/es/widgets/ResponsibleGamingWidget/Timespan.js +2 -0
- package/es/widgets/ResponsibleGamingWidget/messages.js +35 -29
- package/es/widgets/SignUp/ContactInfoStep.js +1 -1
- package/lib/widgets/ResponsibleGaming/Amount.js +1 -1
- package/lib/widgets/ResponsibleGamingWidget/Timespan.js +2 -0
- package/lib/widgets/ResponsibleGamingWidget/messages.js +35 -29
- package/lib/widgets/SignUp/ContactInfoStep.js +1 -1
- package/package.json +2 -2
|
@@ -31,7 +31,7 @@ var Amount = function Amount(_ref) {
|
|
|
31
31
|
React.createElement('p', { dangerouslySetInnerHTML: { __html: content } }),
|
|
32
32
|
React.createElement(Select, {
|
|
33
33
|
className: 'layout-item',
|
|
34
|
-
title: translate({ id: 'label.choose_limit' }),
|
|
34
|
+
title: translate({ id: 'label.choose_limit' }, intl),
|
|
35
35
|
options: types,
|
|
36
36
|
name: 'Timespan',
|
|
37
37
|
error: errors.Timespan && translate({ id: errors.Timespan }, intl)
|
|
@@ -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.
|
|
258
|
-
var intl = _ref16.intl
|
|
259
|
-
|
|
260
|
-
|
|
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(
|
|
268
|
-
var intl =
|
|
269
|
-
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(
|
|
276
|
-
var intl =
|
|
277
|
-
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(
|
|
284
|
-
var intl =
|
|
285
|
-
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(
|
|
292
|
-
var intl =
|
|
293
|
-
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(
|
|
300
|
-
var intl =
|
|
301
|
-
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(
|
|
308
|
-
var intl =
|
|
309
|
-
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(
|
|
316
|
-
var 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(
|
|
325
|
-
var intl =
|
|
326
|
-
Timespan =
|
|
327
|
-
Amount =
|
|
328
|
-
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:
|
|
105
|
+
error: errors.FirstName && translate({ id: errors.FirstName }, intl)
|
|
106
106
|
}),
|
|
107
107
|
React.createElement(Input, {
|
|
108
108
|
className: 'layout-item-6',
|
|
@@ -48,7 +48,7 @@ var Amount = function Amount(_ref) {
|
|
|
48
48
|
_react2.default.createElement('p', { dangerouslySetInnerHTML: { __html: content } }),
|
|
49
49
|
_react2.default.createElement(_Select2.default, {
|
|
50
50
|
className: 'layout-item',
|
|
51
|
-
title: translate({ id: 'label.choose_limit' }),
|
|
51
|
+
title: translate({ id: 'label.choose_limit' }, intl),
|
|
52
52
|
options: types,
|
|
53
53
|
name: 'Timespan',
|
|
54
54
|
error: errors.Timespan && translate({ id: errors.Timespan }, intl)
|
|
@@ -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.
|
|
279
|
-
var intl = _ref16.intl
|
|
280
|
-
|
|
281
|
-
|
|
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(
|
|
289
|
-
var intl =
|
|
290
|
-
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(
|
|
297
|
-
var intl =
|
|
298
|
-
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(
|
|
305
|
-
var intl =
|
|
306
|
-
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(
|
|
313
|
-
var intl =
|
|
314
|
-
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(
|
|
321
|
-
var intl =
|
|
322
|
-
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(
|
|
329
|
-
var intl =
|
|
330
|
-
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(
|
|
337
|
-
var 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(
|
|
346
|
-
var intl =
|
|
347
|
-
Timespan =
|
|
348
|
-
Amount =
|
|
349
|
-
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:
|
|
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.
|
|
3
|
+
"version": "6.3.3-alpha.0",
|
|
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": "
|
|
79
|
+
"gitHead": "878a6f7aa286af9936269fbabdd292b34401475a"
|
|
80
80
|
}
|