tg-core-components 6.3.11-4 → 6.3.11-5

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.
@@ -313,12 +313,12 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
313
313
  setInputMode('select');
314
314
  };
315
315
 
316
- var _onChange = function _onChange(value) {
316
+ var _onChange = function _onChange(value, isOther) {
317
317
  if (value === 'other') {
318
318
  setInputMode('input');
319
319
  setValue('');
320
320
  } else {
321
- onChangeLimit(isNaN(parseInt(value)) ? getByPath(currentLimit, 'Amount') : parseInt(value));
321
+ onChangeLimit(isNaN(parseInt(value)) ? getByPath(currentLimit, 'Amount') : parseInt(value), isOther);
322
322
  }
323
323
  };
324
324
 
@@ -355,7 +355,7 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
355
355
  value: value,
356
356
  onChange: function onChange(e, value) {
357
357
  setValue(parseInt(value));
358
- if (value > 0) _onChange(value);
358
+ if (value > 0) _onChange(value, true);
359
359
  },
360
360
  autoFocus: !isIphone,
361
361
  min: validationState['limit-remove-blocked'] ? '1' : '0',
@@ -105,7 +105,7 @@ var ResponsibleGaming = function ResponsibleGaming(_ref) {
105
105
  * There can only be one limit with status "NewLimit" for each type/timespan
106
106
  */
107
107
  var onChangeLimit = function onChangeLimit(type, product) {
108
- return function (timespan) {
108
+ return function (timespan, isOther) {
109
109
  return function (amount) {
110
110
  var newLimit = {
111
111
  Id: getByPath(normalizedLimits, '[' + type + '].timespans[' + timespan + '].currentLimit.Id'),
@@ -113,7 +113,8 @@ var ResponsibleGaming = function ResponsibleGaming(_ref) {
113
113
  Product: product,
114
114
  Timespan: timespan,
115
115
  Amount: amount,
116
- Status: 'NewLimit'
116
+ Status: 'NewLimit',
117
+ IsOther: isOther
117
118
  };
118
119
  var limits = localLimits.filter(function (l) {
119
120
  return !(l.Type === newLimit.Type && l.Product === newLimit.Product && l.Timespan === newLimit.Timespan && l.Status === newLimit.Status);
@@ -344,12 +344,12 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
344
344
  setInputMode('select');
345
345
  };
346
346
 
347
- var _onChange = function _onChange(value) {
347
+ var _onChange = function _onChange(value, isOther) {
348
348
  if (value === 'other') {
349
349
  setInputMode('input');
350
350
  setValue('');
351
351
  } else {
352
- onChangeLimit(isNaN(parseInt(value)) ? (0, _get2.default)(currentLimit, 'Amount') : parseInt(value));
352
+ onChangeLimit(isNaN(parseInt(value)) ? (0, _get2.default)(currentLimit, 'Amount') : parseInt(value), isOther);
353
353
  }
354
354
  };
355
355
 
@@ -386,7 +386,7 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
386
386
  value: value,
387
387
  onChange: function onChange(e, value) {
388
388
  setValue(parseInt(value));
389
- if (value > 0) _onChange(value);
389
+ if (value > 0) _onChange(value, true);
390
390
  },
391
391
  autoFocus: !isIphone,
392
392
  min: validationState['limit-remove-blocked'] ? '1' : '0',
@@ -147,7 +147,7 @@ var ResponsibleGaming = function ResponsibleGaming(_ref) {
147
147
  * There can only be one limit with status "NewLimit" for each type/timespan
148
148
  */
149
149
  var onChangeLimit = function onChangeLimit(type, product) {
150
- return function (timespan) {
150
+ return function (timespan, isOther) {
151
151
  return function (amount) {
152
152
  var newLimit = {
153
153
  Id: (0, _get2.default)(normalizedLimits, '[' + type + '].timespans[' + timespan + '].currentLimit.Id'),
@@ -155,7 +155,8 @@ var ResponsibleGaming = function ResponsibleGaming(_ref) {
155
155
  Product: product,
156
156
  Timespan: timespan,
157
157
  Amount: amount,
158
- Status: 'NewLimit'
158
+ Status: 'NewLimit',
159
+ IsOther: isOther
159
160
  };
160
161
  var limits = localLimits.filter(function (l) {
161
162
  return !(l.Type === newLimit.Type && l.Product === newLimit.Product && l.Timespan === newLimit.Timespan && l.Status === newLimit.Status);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tg-core-components",
3
- "version": "6.3.11-4",
3
+ "version": "6.3.11-5",
4
4
  "description": "tg-core-components",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",