tg-core-components 6.3.10-6 → 6.3.11-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.
@@ -31,7 +31,7 @@ var ActiveLimit = function ActiveLimit(_ref) {
31
31
  type === 'LoginTime' && React.createElement(
32
32
  'div',
33
33
  { className: 'active-limit-value' },
34
- Math.floor(amount / 60),
34
+ amount,
35
35
  ' ',
36
36
  React.createElement(Translate, { id: 'label.hours-short', defaultMessage: 'h' })
37
37
  ),
@@ -65,7 +65,7 @@ var ActiveLimit = function ActiveLimit(_ref) {
65
65
  ) : type === 'LoginTime' ? React.createElement(
66
66
  'div',
67
67
  { className: 'active-limit-value' },
68
- Math.floor(remainingAmount / 60),
68
+ remainingAmount,
69
69
  ' ',
70
70
  React.createElement(Translate, { id: 'label.hours-short', defaultMessage: 'h' })
71
71
  ) : React.createElement(
@@ -198,7 +198,7 @@ var DeletedLimit = function DeletedLimit(_ref4) {
198
198
  null,
199
199
  date
200
200
  ),
201
- amount: React.createElement(FormattedNumber, { value: type === 'LoginTime' ? Math.floor(amount / 60) : amount }),
201
+ amount: React.createElement(FormattedNumber, { value: amount }),
202
202
  hour: React.createElement(
203
203
  'span',
204
204
  null,
@@ -310,7 +310,7 @@ var PendingLimit = function PendingLimit(_ref6) {
310
310
  type === 'LoginTime' && React.createElement(
311
311
  'div',
312
312
  null,
313
- Math.floor(amount / 60),
313
+ amount,
314
314
  ' ',
315
315
  React.createElement(Translate, { id: 'label.hours-short', defaultMessage: 'h' })
316
316
  )
@@ -361,7 +361,7 @@ var CooldownLimit = function CooldownLimit(_ref7) {
361
361
  !['LoginTime', 'RealityCheck', 'Session'].includes(type) ? React.createElement(Money, { decimals: false, value: amount, currency: currency }) : React.createElement(
362
362
  'div',
363
363
  null,
364
- type === 'LoginTime' ? Math.floor(amount / 60) : amount,
364
+ amount,
365
365
  ' ',
366
366
  type === 'RealityCheck' || type === 'Session' ? React.createElement(Translate, { id: 'label.minutes', defaultMessage: 'min' }) : React.createElement(Translate, { id: 'label.hours-short', defaultMessage: 'h' })
367
367
  )
@@ -27,9 +27,9 @@ var AmountItemHeader = function AmountItemHeader(_ref) {
27
27
  displayLimit && type === 'LoginTime' && React.createElement(
28
28
  'span',
29
29
  { className: 'info-amount' },
30
- displayLimit.RemainingAmount / 60,
30
+ displayLimit.RemainingAmount,
31
31
  '/',
32
- displayLimit.Amount / 60,
32
+ displayLimit.Amount,
33
33
  ' ',
34
34
  translate({
35
35
  id: 'label.hours-short',
@@ -245,7 +245,8 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
245
245
  values = _ref10.values,
246
246
  messages = _ref10.messages,
247
247
  isTime = _ref10.isTime,
248
- valueType = _ref10.valueType;
248
+ valueType = _ref10.valueType,
249
+ setValueType = _ref10.setValueType;
249
250
 
250
251
  var _useState = useState(newLimit ? newLimit.Amount : currentLimit ? currentLimit.Amount : 0),
251
252
  _useState2 = _slicedToArray(_useState, 2),
@@ -294,7 +295,7 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
294
295
  if (!hideOther) {
295
296
  options.push({
296
297
  value: 'other',
297
- label: valueType !== 'currency' ? messages.get('label.responsible-gaming.option.other-' + valueType) : messages.get('label.responsible-gaming.option.other')
298
+ label: valueType !== 'currency' ? messages.get('label.responsible-gaming.option.other-' + (setValueType || valueType)) : messages.get('label.responsible-gaming.option.other')
298
299
  });
299
300
  }
300
301
  // Per transaction (0) limits are depricated, remove all other options but no limit.
@@ -180,6 +180,7 @@ var LimitContent = function LimitContent(_ref3) {
180
180
  currency = _ref3.currency,
181
181
  values = _ref3.values,
182
182
  valueType = _ref3.valueType,
183
+ setValueType = _ref3.setValueType,
183
184
  hideRemainingLimit = _ref3.hideRemainingLimit,
184
185
  showCurrentValue = _ref3.showCurrentValue,
185
186
  hideOther = _ref3.hideOther,
@@ -243,6 +244,7 @@ var LimitContent = function LimitContent(_ref3) {
243
244
  currency: currency,
244
245
  values: values,
245
246
  valueType: valueType,
247
+ setValueType: setValueType,
246
248
  hideRemainingLimit: hideRemainingLimit,
247
249
  showCurrentValue: showCurrentValue,
248
250
  hideOther: hideOther
@@ -18,7 +18,6 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
18
18
  * @param {Object} content - Optional cms content
19
19
  */
20
20
  var normalize = function normalize(limits, content) {
21
- console.log('normalize limits', limits, content);
22
21
  return (content ? content.items.map(function (l) {
23
22
  return {
24
23
  type: l.config.type,
@@ -52,7 +52,7 @@ var ActiveLimit = function ActiveLimit(_ref) {
52
52
  type === 'LoginTime' && _react2.default.createElement(
53
53
  'div',
54
54
  { className: 'active-limit-value' },
55
- Math.floor(amount / 60),
55
+ amount,
56
56
  ' ',
57
57
  _react2.default.createElement(_Translate2.default, { id: 'label.hours-short', defaultMessage: 'h' })
58
58
  ),
@@ -86,7 +86,7 @@ var ActiveLimit = function ActiveLimit(_ref) {
86
86
  ) : type === 'LoginTime' ? _react2.default.createElement(
87
87
  'div',
88
88
  { className: 'active-limit-value' },
89
- Math.floor(remainingAmount / 60),
89
+ remainingAmount,
90
90
  ' ',
91
91
  _react2.default.createElement(_Translate2.default, { id: 'label.hours-short', defaultMessage: 'h' })
92
92
  ) : _react2.default.createElement(
@@ -219,7 +219,7 @@ var DeletedLimit = function DeletedLimit(_ref4) {
219
219
  null,
220
220
  date
221
221
  ),
222
- amount: _react2.default.createElement(_reactIntl.FormattedNumber, { value: type === 'LoginTime' ? Math.floor(amount / 60) : amount }),
222
+ amount: _react2.default.createElement(_reactIntl.FormattedNumber, { value: amount }),
223
223
  hour: _react2.default.createElement(
224
224
  'span',
225
225
  null,
@@ -331,7 +331,7 @@ var PendingLimit = function PendingLimit(_ref6) {
331
331
  type === 'LoginTime' && _react2.default.createElement(
332
332
  'div',
333
333
  null,
334
- Math.floor(amount / 60),
334
+ amount,
335
335
  ' ',
336
336
  _react2.default.createElement(_Translate2.default, { id: 'label.hours-short', defaultMessage: 'h' })
337
337
  )
@@ -382,7 +382,7 @@ var CooldownLimit = function CooldownLimit(_ref7) {
382
382
  !['LoginTime', 'RealityCheck', 'Session'].includes(type) ? _react2.default.createElement(_Money2.default, { decimals: false, value: amount, currency: currency }) : _react2.default.createElement(
383
383
  'div',
384
384
  null,
385
- type === 'LoginTime' ? Math.floor(amount / 60) : amount,
385
+ amount,
386
386
  ' ',
387
387
  type === 'RealityCheck' || type === 'Session' ? _react2.default.createElement(_Translate2.default, { id: 'label.minutes', defaultMessage: 'min' }) : _react2.default.createElement(_Translate2.default, { id: 'label.hours-short', defaultMessage: 'h' })
388
388
  )
@@ -41,9 +41,9 @@ var AmountItemHeader = function AmountItemHeader(_ref) {
41
41
  displayLimit && type === 'LoginTime' && _react2.default.createElement(
42
42
  'span',
43
43
  { className: 'info-amount' },
44
- displayLimit.RemainingAmount / 60,
44
+ displayLimit.RemainingAmount,
45
45
  '/',
46
- displayLimit.Amount / 60,
46
+ displayLimit.Amount,
47
47
  ' ',
48
48
  (0, _translate2.default)({
49
49
  id: 'label.hours-short',
@@ -276,7 +276,8 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
276
276
  values = _ref10.values,
277
277
  messages = _ref10.messages,
278
278
  isTime = _ref10.isTime,
279
- valueType = _ref10.valueType;
279
+ valueType = _ref10.valueType,
280
+ setValueType = _ref10.setValueType;
280
281
 
281
282
  var _useState = (0, _react.useState)(newLimit ? newLimit.Amount : currentLimit ? currentLimit.Amount : 0),
282
283
  _useState2 = _slicedToArray(_useState, 2),
@@ -325,7 +326,7 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
325
326
  if (!hideOther) {
326
327
  options.push({
327
328
  value: 'other',
328
- label: valueType !== 'currency' ? messages.get('label.responsible-gaming.option.other-' + valueType) : messages.get('label.responsible-gaming.option.other')
329
+ label: valueType !== 'currency' ? messages.get('label.responsible-gaming.option.other-' + (setValueType || valueType)) : messages.get('label.responsible-gaming.option.other')
329
330
  });
330
331
  }
331
332
  // Per transaction (0) limits are depricated, remove all other options but no limit.
@@ -222,6 +222,7 @@ var LimitContent = function LimitContent(_ref3) {
222
222
  currency = _ref3.currency,
223
223
  values = _ref3.values,
224
224
  valueType = _ref3.valueType,
225
+ setValueType = _ref3.setValueType,
225
226
  hideRemainingLimit = _ref3.hideRemainingLimit,
226
227
  showCurrentValue = _ref3.showCurrentValue,
227
228
  hideOther = _ref3.hideOther,
@@ -285,6 +286,7 @@ var LimitContent = function LimitContent(_ref3) {
285
286
  currency: currency,
286
287
  values: values,
287
288
  valueType: valueType,
289
+ setValueType: setValueType,
288
290
  hideRemainingLimit: hideRemainingLimit,
289
291
  showCurrentValue: showCurrentValue,
290
292
  hideOther: hideOther
@@ -24,7 +24,6 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
24
24
  * @param {Object} content - Optional cms content
25
25
  */
26
26
  var normalize = function normalize(limits, content) {
27
- console.log('normalize limits', limits, content);
28
27
  return (content ? content.items.map(function (l) {
29
28
  return {
30
29
  type: l.config.type,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tg-core-components",
3
- "version": "6.3.10-6",
3
+ "version": "6.3.11-0",
4
4
  "description": "tg-core-components",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",