tg-core-components 6.3.4-3.18 → 6.3.4-3.19
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.
|
@@ -113,7 +113,7 @@ var ResponsibleGaming = function ResponsibleGaming(_ref) {
|
|
|
113
113
|
Product: product,
|
|
114
114
|
Timespan: timespan,
|
|
115
115
|
Amount: amount,
|
|
116
|
-
MaxAmount: getValues(maxAmounts, currency, timespan)[0],
|
|
116
|
+
MaxAmount: maxAmounts ? getValues(maxAmounts[type], currency, timespan)[0] : Infinity,
|
|
117
117
|
Status: 'NewLimit'
|
|
118
118
|
};
|
|
119
119
|
var limits = localLimits.filter(function (l) {
|
|
@@ -124,7 +124,6 @@ var ResponsibleGaming = function ResponsibleGaming(_ref) {
|
|
|
124
124
|
};
|
|
125
125
|
};
|
|
126
126
|
|
|
127
|
-
console.log(normalizedLimits);
|
|
128
127
|
return React.createElement(
|
|
129
128
|
'div',
|
|
130
129
|
{ className: cn('ResponsibleGamingWidget', className) },
|
|
@@ -181,7 +180,6 @@ var LimitContent = function LimitContent(_ref3) {
|
|
|
181
180
|
getAlerts = _ref3.getAlerts,
|
|
182
181
|
isLoading = _ref3.isLoading,
|
|
183
182
|
currency = _ref3.currency,
|
|
184
|
-
maxAmounts = _ref3.maxAmounts,
|
|
185
183
|
values = _ref3.values,
|
|
186
184
|
valueType = _ref3.valueType,
|
|
187
185
|
hideRemainingLimit = _ref3.hideRemainingLimit,
|
|
@@ -227,36 +225,30 @@ var LimitContent = function LimitContent(_ref3) {
|
|
|
227
225
|
currency: currency
|
|
228
226
|
}),
|
|
229
227
|
Object.values(timespans).map(function (t) {
|
|
230
|
-
return React.createElement(
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
valueType: valueType,
|
|
255
|
-
hideRemainingLimit: hideRemainingLimit,
|
|
256
|
-
showCurrentValue: showCurrentValue,
|
|
257
|
-
hideOther: hideOther
|
|
258
|
-
}, t))
|
|
259
|
-
);
|
|
228
|
+
return React.createElement(Timespan, _extends({
|
|
229
|
+
key: t.timespan,
|
|
230
|
+
title: Object.values(timespans).length > 1 && messages.get('header.responsible-gaming.timespan.' + t.timespan),
|
|
231
|
+
onChangeLimit: onChangeLimit(t.timespan),
|
|
232
|
+
onResetLimit: function onResetLimit() {
|
|
233
|
+
return onSubmitLimits([t.currentLimit]);
|
|
234
|
+
},
|
|
235
|
+
onConfirmLimit: onConfirmLimit,
|
|
236
|
+
onDeclineLimit: onDeclineLimit,
|
|
237
|
+
onPickLimit: function onPickLimit(id) {
|
|
238
|
+
return onSubmitLimits(t.pickLimits.filter(function (l) {
|
|
239
|
+
return l.Id !== id;
|
|
240
|
+
}).map(function (l) {
|
|
241
|
+
return _extends({}, l, { Amount: 0 });
|
|
242
|
+
}));
|
|
243
|
+
},
|
|
244
|
+
validationState: getValidationState(t.timespan),
|
|
245
|
+
currency: currency,
|
|
246
|
+
values: values,
|
|
247
|
+
valueType: valueType,
|
|
248
|
+
hideRemainingLimit: hideRemainingLimit,
|
|
249
|
+
showCurrentValue: showCurrentValue,
|
|
250
|
+
hideOther: hideOther
|
|
251
|
+
}, t));
|
|
260
252
|
}),
|
|
261
253
|
!hideSubmit && React.createElement(
|
|
262
254
|
Button,
|
|
@@ -156,7 +156,7 @@ var ResponsibleGaming = function ResponsibleGaming(_ref) {
|
|
|
156
156
|
Product: product,
|
|
157
157
|
Timespan: timespan,
|
|
158
158
|
Amount: amount,
|
|
159
|
-
MaxAmount: (0, _helpers.getValues)(maxAmounts, currency, timespan)[0],
|
|
159
|
+
MaxAmount: maxAmounts ? (0, _helpers.getValues)(maxAmounts[type], currency, timespan)[0] : Infinity,
|
|
160
160
|
Status: 'NewLimit'
|
|
161
161
|
};
|
|
162
162
|
var limits = localLimits.filter(function (l) {
|
|
@@ -167,7 +167,6 @@ var ResponsibleGaming = function ResponsibleGaming(_ref) {
|
|
|
167
167
|
};
|
|
168
168
|
};
|
|
169
169
|
|
|
170
|
-
console.log(normalizedLimits);
|
|
171
170
|
return _react2.default.createElement(
|
|
172
171
|
'div',
|
|
173
172
|
{ className: (0, _classnames2.default)('ResponsibleGamingWidget', className) },
|
|
@@ -224,7 +223,6 @@ var LimitContent = function LimitContent(_ref3) {
|
|
|
224
223
|
getAlerts = _ref3.getAlerts,
|
|
225
224
|
isLoading = _ref3.isLoading,
|
|
226
225
|
currency = _ref3.currency,
|
|
227
|
-
maxAmounts = _ref3.maxAmounts,
|
|
228
226
|
values = _ref3.values,
|
|
229
227
|
valueType = _ref3.valueType,
|
|
230
228
|
hideRemainingLimit = _ref3.hideRemainingLimit,
|
|
@@ -270,36 +268,30 @@ var LimitContent = function LimitContent(_ref3) {
|
|
|
270
268
|
currency: currency
|
|
271
269
|
}),
|
|
272
270
|
Object.values(timespans).map(function (t) {
|
|
273
|
-
return _react2.default.createElement(
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
valueType: valueType,
|
|
298
|
-
hideRemainingLimit: hideRemainingLimit,
|
|
299
|
-
showCurrentValue: showCurrentValue,
|
|
300
|
-
hideOther: hideOther
|
|
301
|
-
}, t))
|
|
302
|
-
);
|
|
271
|
+
return _react2.default.createElement(_Timespan2.default, _extends({
|
|
272
|
+
key: t.timespan,
|
|
273
|
+
title: Object.values(timespans).length > 1 && _messages2.default.get('header.responsible-gaming.timespan.' + t.timespan),
|
|
274
|
+
onChangeLimit: onChangeLimit(t.timespan),
|
|
275
|
+
onResetLimit: function onResetLimit() {
|
|
276
|
+
return onSubmitLimits([t.currentLimit]);
|
|
277
|
+
},
|
|
278
|
+
onConfirmLimit: onConfirmLimit,
|
|
279
|
+
onDeclineLimit: onDeclineLimit,
|
|
280
|
+
onPickLimit: function onPickLimit(id) {
|
|
281
|
+
return onSubmitLimits(t.pickLimits.filter(function (l) {
|
|
282
|
+
return l.Id !== id;
|
|
283
|
+
}).map(function (l) {
|
|
284
|
+
return _extends({}, l, { Amount: 0 });
|
|
285
|
+
}));
|
|
286
|
+
},
|
|
287
|
+
validationState: getValidationState(t.timespan),
|
|
288
|
+
currency: currency,
|
|
289
|
+
values: values,
|
|
290
|
+
valueType: valueType,
|
|
291
|
+
hideRemainingLimit: hideRemainingLimit,
|
|
292
|
+
showCurrentValue: showCurrentValue,
|
|
293
|
+
hideOther: hideOther
|
|
294
|
+
}, t));
|
|
303
295
|
}),
|
|
304
296
|
!hideSubmit && _react2.default.createElement(
|
|
305
297
|
_Button2.default,
|