tg-core-components 6.3.4-3.13 → 6.3.4-3.15

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.
@@ -6,13 +6,11 @@ import getByPath from 'lodash/get';
6
6
  * Helper function to get values using currency and timespan
7
7
  */
8
8
  export var getValues = function getValues(values, currency, timespan) {
9
- console.log('values', values, currency, timespan);
10
9
  values = getByPath(values, '[' + (currency || '').toUpperCase() + ']') || values;
11
- console.log('timespan: ', timespan, values);
12
10
  return (Array.isArray(values) ? values : []).filter(function (v) {
13
11
  return (typeof v === 'undefined' ? 'undefined' : _typeof(v)) === 'object' && v.timespan === timespan || typeof v === 'number';
14
12
  }).map(function (v) {
15
- return (typeof v === 'undefined' ? 'undefined' : _typeof(v)) === 'object' ? v.amount : v;
13
+ return (typeof v === 'undefined' ? 'undefined' : _typeof(v)) === 'object' ? v.amount ? v.amount : v.maxAmount : v;
16
14
  });
17
15
  };
18
16
 
@@ -113,9 +113,7 @@ var ResponsibleGaming = function ResponsibleGaming(_ref) {
113
113
  Product: product,
114
114
  Timespan: timespan,
115
115
  Amount: amount,
116
- MaxAmount: function MaxAmount() {
117
- return getValues(maxAmounts, currency, timespan);
118
- },
116
+ MaxAmount: _extends({}, getValues(maxAmounts, currency, timespan)),
119
117
  Status: 'NewLimit'
120
118
  };
121
119
  var limits = localLimits.filter(function (l) {
@@ -127,7 +125,6 @@ var ResponsibleGaming = function ResponsibleGaming(_ref) {
127
125
  };
128
126
 
129
127
  console.log(normalizedLimits);
130
-
131
128
  return React.createElement(
132
129
  'div',
133
130
  { className: cn('ResponsibleGamingWidget', className) },
@@ -17,13 +17,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
17
17
  * Helper function to get values using currency and timespan
18
18
  */
19
19
  var getValues = exports.getValues = function getValues(values, currency, timespan) {
20
- console.log('values', values, currency, timespan);
21
20
  values = (0, _get2.default)(values, '[' + (currency || '').toUpperCase() + ']') || values;
22
- console.log('timespan: ', timespan, values);
23
21
  return (Array.isArray(values) ? values : []).filter(function (v) {
24
22
  return (typeof v === 'undefined' ? 'undefined' : _typeof(v)) === 'object' && v.timespan === timespan || typeof v === 'number';
25
23
  }).map(function (v) {
26
- return (typeof v === 'undefined' ? 'undefined' : _typeof(v)) === 'object' ? v.amount : v;
24
+ return (typeof v === 'undefined' ? 'undefined' : _typeof(v)) === 'object' ? v.amount ? v.amount : v.maxAmount : v;
27
25
  });
28
26
  };
29
27
 
@@ -156,9 +156,7 @@ var ResponsibleGaming = function ResponsibleGaming(_ref) {
156
156
  Product: product,
157
157
  Timespan: timespan,
158
158
  Amount: amount,
159
- MaxAmount: function MaxAmount() {
160
- return (0, _helpers.getValues)(maxAmounts, currency, timespan);
161
- },
159
+ MaxAmount: _extends({}, (0, _helpers.getValues)(maxAmounts, currency, timespan)),
162
160
  Status: 'NewLimit'
163
161
  };
164
162
  var limits = localLimits.filter(function (l) {
@@ -170,7 +168,6 @@ var ResponsibleGaming = function ResponsibleGaming(_ref) {
170
168
  };
171
169
 
172
170
  console.log(normalizedLimits);
173
-
174
171
  return _react2.default.createElement(
175
172
  'div',
176
173
  { className: (0, _classnames2.default)('ResponsibleGamingWidget', className) },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tg-core-components",
3
- "version": "6.3.4-3.13",
3
+ "version": "6.3.4-3.15",
4
4
  "description": "tg-core-components",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",