tg-core-components 6.3.4-2.6 → 6.3.4-2.8
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/ResponsibleGamingWidget/Timespan.js +2 -2
- package/es/widgets/ResponsibleGamingWidget/index.js +1 -0
- package/es/widgets/ResponsibleGamingWidget/validate.js +5 -1
- package/lib/widgets/ResponsibleGamingWidget/Timespan.js +2 -2
- package/lib/widgets/ResponsibleGamingWidget/index.js +1 -0
- package/lib/widgets/ResponsibleGamingWidget/validate.js +5 -1
- package/package.json +1 -1
|
@@ -348,7 +348,7 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
|
|
|
348
348
|
inputMode === 'input' && React.createElement(
|
|
349
349
|
Fragment,
|
|
350
350
|
null,
|
|
351
|
-
console.log(
|
|
351
|
+
console.log(newLimit),
|
|
352
352
|
React.createElement(Input, {
|
|
353
353
|
type: 'number',
|
|
354
354
|
pattern: '\\d*',
|
|
@@ -359,7 +359,7 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
|
|
|
359
359
|
},
|
|
360
360
|
autoFocus: !isIphone,
|
|
361
361
|
min: validationState['limit-remove-blocked'] ? '1' : '0',
|
|
362
|
-
max: validationState['limit-increase-blocked'] ? getByPath(currentLimit, 'Amount') :
|
|
362
|
+
max: validationState['limit-increase-blocked'] ? getByPath(currentLimit, 'Amount') : Infinity
|
|
363
363
|
}),
|
|
364
364
|
React.createElement(
|
|
365
365
|
Button,
|
|
@@ -42,10 +42,14 @@ var validate = function validate(_ref) {
|
|
|
42
42
|
return getByPath(t, 'newLimit.Type') === 'Deposit' && t.timespan === 30;
|
|
43
43
|
});
|
|
44
44
|
|
|
45
|
+
var exceedingMaxLimitAmount = timespans.find(function (t) {
|
|
46
|
+
return getByPath(t, 'newLimit.Amount') > getByPath(t, 'newLimit.MaxAmount');
|
|
47
|
+
});
|
|
48
|
+
|
|
45
49
|
/**
|
|
46
50
|
* Compose jurisdictions with rules
|
|
47
51
|
*/
|
|
48
|
-
var common = (_common = {}, _defineProperty(_common, 'show-confirm-on-submit', type === 'Block' || type === 'SelfExclude'), _defineProperty(_common, 'insufficient-limit-count', false), _defineProperty(_common, 'limits-are-pristine', limitsArePristine), _defineProperty(_common, 'limit-increase-blocked', false), _defineProperty(_common, 'limit-remove-blocked', false), _defineProperty(_common, 'isValid', function isValid() {
|
|
52
|
+
var common = (_common = {}, _defineProperty(_common, 'show-confirm-on-submit', type === 'Block' || type === 'SelfExclude'), _defineProperty(_common, 'insufficient-limit-count', false), _defineProperty(_common, 'limits-are-pristine', limitsArePristine), _defineProperty(_common, 'limit-increase-blocked', false), _defineProperty(_common, 'limit-remove-blocked', false), _defineProperty(_common, 'limit-above-maxlimit', exceedingMaxLimitAmount), _defineProperty(_common, 'isValid', function isValid() {
|
|
49
53
|
return !this['insufficient-limit-count'] && !(this['limit-increase-blocked'] && isIncreasingLimit) && !(this['limit-remove-blocked'] && isRemovingLimit);
|
|
50
54
|
}), _common);
|
|
51
55
|
var mga = {};
|
|
@@ -379,7 +379,7 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
|
|
|
379
379
|
inputMode === 'input' && _react2.default.createElement(
|
|
380
380
|
_react.Fragment,
|
|
381
381
|
null,
|
|
382
|
-
console.log(
|
|
382
|
+
console.log(newLimit),
|
|
383
383
|
_react2.default.createElement(_Input2.default, {
|
|
384
384
|
type: 'number',
|
|
385
385
|
pattern: '\\d*',
|
|
@@ -390,7 +390,7 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
|
|
|
390
390
|
},
|
|
391
391
|
autoFocus: !isIphone,
|
|
392
392
|
min: validationState['limit-remove-blocked'] ? '1' : '0',
|
|
393
|
-
max: validationState['limit-increase-blocked'] ? (0, _get2.default)(currentLimit, 'Amount') :
|
|
393
|
+
max: validationState['limit-increase-blocked'] ? (0, _get2.default)(currentLimit, 'Amount') : Infinity
|
|
394
394
|
}),
|
|
395
395
|
_react2.default.createElement(
|
|
396
396
|
_Button2.default,
|
|
@@ -167,6 +167,7 @@ var ResponsibleGaming = function ResponsibleGaming(_ref) {
|
|
|
167
167
|
return _react2.default.createElement(
|
|
168
168
|
'div',
|
|
169
169
|
{ className: (0, _classnames2.default)('ResponsibleGamingWidget', className) },
|
|
170
|
+
console.log(normalizedLimits),
|
|
170
171
|
_react2.default.createElement(
|
|
171
172
|
_AccordionWidget2.default,
|
|
172
173
|
{
|
|
@@ -52,10 +52,14 @@ var validate = function validate(_ref) {
|
|
|
52
52
|
return (0, _get2.default)(t, 'newLimit.Type') === 'Deposit' && t.timespan === 30;
|
|
53
53
|
});
|
|
54
54
|
|
|
55
|
+
var exceedingMaxLimitAmount = timespans.find(function (t) {
|
|
56
|
+
return (0, _get2.default)(t, 'newLimit.Amount') > (0, _get2.default)(t, 'newLimit.MaxAmount');
|
|
57
|
+
});
|
|
58
|
+
|
|
55
59
|
/**
|
|
56
60
|
* Compose jurisdictions with rules
|
|
57
61
|
*/
|
|
58
|
-
var common = (_common = {}, _defineProperty(_common, 'show-confirm-on-submit', type === 'Block' || type === 'SelfExclude'), _defineProperty(_common, 'insufficient-limit-count', false), _defineProperty(_common, 'limits-are-pristine', limitsArePristine), _defineProperty(_common, 'limit-increase-blocked', false), _defineProperty(_common, 'limit-remove-blocked', false), _defineProperty(_common, 'isValid', function isValid() {
|
|
62
|
+
var common = (_common = {}, _defineProperty(_common, 'show-confirm-on-submit', type === 'Block' || type === 'SelfExclude'), _defineProperty(_common, 'insufficient-limit-count', false), _defineProperty(_common, 'limits-are-pristine', limitsArePristine), _defineProperty(_common, 'limit-increase-blocked', false), _defineProperty(_common, 'limit-remove-blocked', false), _defineProperty(_common, 'limit-above-maxlimit', exceedingMaxLimitAmount), _defineProperty(_common, 'isValid', function isValid() {
|
|
59
63
|
return !this['insufficient-limit-count'] && !(this['limit-increase-blocked'] && isIncreasingLimit) && !(this['limit-remove-blocked'] && isRemovingLimit);
|
|
60
64
|
}), _common);
|
|
61
65
|
var mga = {};
|