tg-core-components 6.3.11-4 → 6.3.11-7
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 +4 -3
- package/es/widgets/ResponsibleGamingWidget/index.js +8 -3
- package/lib/widgets/ResponsibleGamingWidget/Timespan.js +4 -3
- package/lib/widgets/ResponsibleGamingWidget/index.js +8 -3
- package/new.txt +1 -0
- package/old.txt +1 -0
- package/package.json +1 -1
|
@@ -313,12 +313,13 @@ 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
|
+
console.log('Changing value', value, isOther);
|
|
317
318
|
if (value === 'other') {
|
|
318
319
|
setInputMode('input');
|
|
319
320
|
setValue('');
|
|
320
321
|
} else {
|
|
321
|
-
onChangeLimit(isNaN(parseInt(value)) ? getByPath(currentLimit, 'Amount') : parseInt(value));
|
|
322
|
+
onChangeLimit(isNaN(parseInt(value)) ? getByPath(currentLimit, 'Amount') : parseInt(value), isOther);
|
|
322
323
|
}
|
|
323
324
|
};
|
|
324
325
|
|
|
@@ -355,7 +356,7 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
|
|
|
355
356
|
value: value,
|
|
356
357
|
onChange: function onChange(e, value) {
|
|
357
358
|
setValue(parseInt(value));
|
|
358
|
-
if (value > 0) _onChange(value);
|
|
359
|
+
if (value > 0) _onChange(value, true);
|
|
359
360
|
},
|
|
360
361
|
autoFocus: !isIphone,
|
|
361
362
|
min: validationState['limit-remove-blocked'] ? '1' : '0',
|
|
@@ -90,7 +90,11 @@ var ResponsibleGaming = function ResponsibleGaming(_ref) {
|
|
|
90
90
|
|
|
91
91
|
var onSubmitLimits = function onSubmitLimits(type, product, transform) {
|
|
92
92
|
return function (limits) {
|
|
93
|
-
|
|
93
|
+
var transformedLimits = transform ? limits.map(function (l) {
|
|
94
|
+
return _extends({}, l, { Amount: transform(l.Amount, l, l.IsOther) });
|
|
95
|
+
}) : limits;
|
|
96
|
+
console.log('Submitting limits', limits, transformedLimits, type, product, transform);
|
|
97
|
+
|
|
94
98
|
return typeof onSubmit === 'function' && onSubmit({
|
|
95
99
|
type: type,
|
|
96
100
|
product: product,
|
|
@@ -105,7 +109,7 @@ var ResponsibleGaming = function ResponsibleGaming(_ref) {
|
|
|
105
109
|
* There can only be one limit with status "NewLimit" for each type/timespan
|
|
106
110
|
*/
|
|
107
111
|
var onChangeLimit = function onChangeLimit(type, product) {
|
|
108
|
-
return function (timespan) {
|
|
112
|
+
return function (timespan, isOther) {
|
|
109
113
|
return function (amount) {
|
|
110
114
|
var newLimit = {
|
|
111
115
|
Id: getByPath(normalizedLimits, '[' + type + '].timespans[' + timespan + '].currentLimit.Id'),
|
|
@@ -113,7 +117,8 @@ var ResponsibleGaming = function ResponsibleGaming(_ref) {
|
|
|
113
117
|
Product: product,
|
|
114
118
|
Timespan: timespan,
|
|
115
119
|
Amount: amount,
|
|
116
|
-
Status: 'NewLimit'
|
|
120
|
+
Status: 'NewLimit',
|
|
121
|
+
IsOther: isOther
|
|
117
122
|
};
|
|
118
123
|
var limits = localLimits.filter(function (l) {
|
|
119
124
|
return !(l.Type === newLimit.Type && l.Product === newLimit.Product && l.Timespan === newLimit.Timespan && l.Status === newLimit.Status);
|
|
@@ -344,12 +344,13 @@ 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
|
+
console.log('Changing value', value, isOther);
|
|
348
349
|
if (value === 'other') {
|
|
349
350
|
setInputMode('input');
|
|
350
351
|
setValue('');
|
|
351
352
|
} else {
|
|
352
|
-
onChangeLimit(isNaN(parseInt(value)) ? (0, _get2.default)(currentLimit, 'Amount') : parseInt(value));
|
|
353
|
+
onChangeLimit(isNaN(parseInt(value)) ? (0, _get2.default)(currentLimit, 'Amount') : parseInt(value), isOther);
|
|
353
354
|
}
|
|
354
355
|
};
|
|
355
356
|
|
|
@@ -386,7 +387,7 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
|
|
|
386
387
|
value: value,
|
|
387
388
|
onChange: function onChange(e, value) {
|
|
388
389
|
setValue(parseInt(value));
|
|
389
|
-
if (value > 0) _onChange(value);
|
|
390
|
+
if (value > 0) _onChange(value, true);
|
|
390
391
|
},
|
|
391
392
|
autoFocus: !isIphone,
|
|
392
393
|
min: validationState['limit-remove-blocked'] ? '1' : '0',
|
|
@@ -132,7 +132,11 @@ var ResponsibleGaming = function ResponsibleGaming(_ref) {
|
|
|
132
132
|
|
|
133
133
|
var onSubmitLimits = function onSubmitLimits(type, product, transform) {
|
|
134
134
|
return function (limits) {
|
|
135
|
-
|
|
135
|
+
var transformedLimits = transform ? limits.map(function (l) {
|
|
136
|
+
return _extends({}, l, { Amount: transform(l.Amount, l, l.IsOther) });
|
|
137
|
+
}) : limits;
|
|
138
|
+
console.log('Submitting limits', limits, transformedLimits, type, product, transform);
|
|
139
|
+
|
|
136
140
|
return typeof onSubmit === 'function' && onSubmit({
|
|
137
141
|
type: type,
|
|
138
142
|
product: product,
|
|
@@ -147,7 +151,7 @@ var ResponsibleGaming = function ResponsibleGaming(_ref) {
|
|
|
147
151
|
* There can only be one limit with status "NewLimit" for each type/timespan
|
|
148
152
|
*/
|
|
149
153
|
var onChangeLimit = function onChangeLimit(type, product) {
|
|
150
|
-
return function (timespan) {
|
|
154
|
+
return function (timespan, isOther) {
|
|
151
155
|
return function (amount) {
|
|
152
156
|
var newLimit = {
|
|
153
157
|
Id: (0, _get2.default)(normalizedLimits, '[' + type + '].timespans[' + timespan + '].currentLimit.Id'),
|
|
@@ -155,7 +159,8 @@ var ResponsibleGaming = function ResponsibleGaming(_ref) {
|
|
|
155
159
|
Product: product,
|
|
156
160
|
Timespan: timespan,
|
|
157
161
|
Amount: amount,
|
|
158
|
-
Status: 'NewLimit'
|
|
162
|
+
Status: 'NewLimit',
|
|
163
|
+
IsOther: isOther
|
|
159
164
|
};
|
|
160
165
|
var limits = localLimits.filter(function (l) {
|
|
161
166
|
return !(l.Type === newLimit.Type && l.Product === newLimit.Product && l.Timespan === newLimit.Timespan && l.Status === newLimit.Status);
|
package/new.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"total":10,"skip":1000,"limit":10,"items":[{"fields":{"identifier":"header.betsoft"},"sys":{"id":"6kkah47cpg1ALE6UbWebiZ","type":"Entry","version":1,"locale":"sv-SE","space":{"sys":{"type":"Link","linkType":"Space","id":"uyE6dnrEc31G"}},"environment":{"sys":{"type":"Link","linkType":"Environment","id":"NLC-games-import"}},"contentType":{"sys":{"type":"Link","linkType":"ContentType","id":"translation"}},"updatedAt":"2022-05-05T21:16:45+00:00","createdAt":"2022-05-05T21:16:45+00:00"}},{"fields":{"identifier":"action.back-to-calendar"},"sys":{"id":"4WSoIKnhTAkMTFMs2qZT0I","type":"Entry","version":1,"locale":"sv-SE","space":{"sys":{"type":"Link","linkType":"Space","id":"uyE6dnrEc31G"}},"environment":{"sys":{"type":"Link","linkType":"Environment","id":"NLC-games-import"}},"contentType":{"sys":{"type":"Link","linkType":"ContentType","id":"translation"}},"updatedAt":"2022-05-05T21:16:46+00:00","createdAt":"2022-05-05T21:16:45+00:00"}},{"fields":{"identifier":"action.casino.back-to-overview"},"sys":{"id":"os4fb3rtgMJBl2cNZCcxK","type":"Entry","version":1,"locale":"sv-SE","space":{"sys":{"type":"Link","linkType":"Space","id":"uyE6dnrEc31G"}},"environment":{"sys":{"type":"Link","linkType":"Environment","id":"NLC-games-import"}},"contentType":{"sys":{"type":"Link","linkType":"ContentType","id":"translation"}},"updatedAt":"2022-05-05T21:16:46+00:00","createdAt":"2022-05-05T21:16:46+00:00"}},{"fields":{"identifier":"alert_message.success.activate_complete","translation":"Ditt konto har aktiverats!"},"sys":{"id":"6a00dwZm3kFkXTSmafBcQq","type":"Entry","version":1,"locale":"sv-SE","space":{"sys":{"type":"Link","linkType":"Space","id":"uyE6dnrEc31G"}},"environment":{"sys":{"type":"Link","linkType":"Environment","id":"NLC-games-import"}},"contentType":{"sys":{"type":"Link","linkType":"ContentType","id":"translation"}},"updatedAt":"2022-05-05T21:16:47+00:00","createdAt":"2022-05-05T21:16:47+00:00"}},{"fields":{"identifier":"label.history.status-pending"},"sys":{"id":"QdXGbLG0JrDq1kBAL5p9a","type":"Entry","version":1,"locale":"sv-SE","space":{"sys":{"type":"Link","linkType":"Space","id":"uyE6dnrEc31G"}},"environment":{"sys":{"type":"Link","linkType":"Environment","id":"NLC-games-import"}},"contentType":{"sys":{"type":"Link","linkType":"ContentType","id":"translation"}},"updatedAt":"2022-05-05T21:16:48+00:00","createdAt":"2022-05-05T21:16:47+00:00"}},{"fields":{"identifier":"header.weekend-booster"},"sys":{"id":"5Wbw0Wne30ZlCe0GFc5dxr","type":"Entry","version":1,"locale":"sv-SE","space":{"sys":{"type":"Link","linkType":"Space","id":"uyE6dnrEc31G"}},"environment":{"sys":{"type":"Link","linkType":"Environment","id":"NLC-games-import"}},"contentType":{"sys":{"type":"Link","linkType":"ContentType","id":"translation"}},"updatedAt":"2022-05-05T21:16:48+00:00","createdAt":"2022-05-05T21:16:48+00:00"}},{"fields":{"identifier":"label.gameplay.require-sign-in","translation":"Du beh\u00f6ver logga in och g\u00f6ra en {link} f\u00f6r att spela det h\u00e4r spelet."},"sys":{"id":"2I03HdGAlgYW6zMWdwJ6f2","type":"Entry","version":1,"locale":"sv-SE","space":{"sys":{"type":"Link","linkType":"Space","id":"uyE6dnrEc31G"}},"environment":{"sys":{"type":"Link","linkType":"Environment","id":"NLC-games-import"}},"contentType":{"sys":{"type":"Link","linkType":"ContentType","id":"translation"}},"updatedAt":"2022-05-05T21:17:08+00:00","createdAt":"2022-05-05T21:17:08+00:00"}},{"fields":{"identifier":"responsible_gaming.questions.answer1","translation":"Aldrig"},"sys":{"id":"2AXKSCAFxj2De8pIOfS1qR","type":"Entry","version":1,"locale":"sv-SE","space":{"sys":{"type":"Link","linkType":"Space","id":"uyE6dnrEc31G"}},"environment":{"sys":{"type":"Link","linkType":"Environment","id":"NLC-games-import"}},"contentType":{"sys":{"type":"Link","linkType":"ContentType","id":"translation"}},"updatedAt":"2022-05-05T21:17:17+00:00","createdAt":"2022-05-05T21:17:17+00:00"}},{"fields":{"identifier":"responsible_gaming.questions.answer2","translation":"Ibland"},"sys":{"id":"5DUWD6fyUiuW5sxUxc7jOW","type":"Entry","version":1,"locale":"sv-SE","space":{"sys":{"type":"Link","linkType":"Space","id":"uyE6dnrEc31G"}},"environment":{"sys":{"type":"Link","linkType":"Environment","id":"NLC-games-import"}},"contentType":{"sys":{"type":"Link","linkType":"ContentType","id":"translation"}},"updatedAt":"2022-05-05T21:17:18+00:00","createdAt":"2022-05-05T21:17:18+00:00"}},{"fields":{"identifier":"responsible_gaming.questions.answer3","translation":"Ofta"},"sys":{"id":"3YVGdBIBR70woZwxNNFtMR","type":"Entry","version":1,"locale":"sv-SE","space":{"sys":{"type":"Link","linkType":"Space","id":"uyE6dnrEc31G"}},"environment":{"sys":{"type":"Link","linkType":"Environment","id":"NLC-games-import"}},"contentType":{"sys":{"type":"Link","linkType":"ContentType","id":"translation"}},"updatedAt":"2022-05-05T21:17:19+00:00","createdAt":"2022-05-05T21:17:18+00:00"}}],"includes":{"Entry":[],"Asset":[]}}
|
package/old.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"total":10,"skip":1000,"limit":10,"items":[{"fields":{"identifier":"header.betsoft"},"sys":{"id":"6kkah47cpg1ALE6UbWebiZ","type":"Entry","version":1,"locale":"sv-SE","space":{"sys":{"type":"Link","linkType":"Space","id":"uyE6dnrEc31G"}},"environment":{"sys":{"type":"Link","linkType":"Environment","id":"NLC-games-import"}},"contentType":{"sys":{"type":"Link","linkType":"ContentType","id":"translation"}},"updatedAt":"2022-05-05T21:16:45+00:00","createdAt":"2022-05-05T21:16:45+00:00"}},{"fields":{"identifier":"action.back-to-calendar"},"sys":{"id":"4WSoIKnhTAkMTFMs2qZT0I","type":"Entry","version":1,"locale":"sv-SE","space":{"sys":{"type":"Link","linkType":"Space","id":"uyE6dnrEc31G"}},"environment":{"sys":{"type":"Link","linkType":"Environment","id":"NLC-games-import"}},"contentType":{"sys":{"type":"Link","linkType":"ContentType","id":"translation"}},"updatedAt":"2022-05-05T21:16:46+00:00","createdAt":"2022-05-05T21:16:45+00:00"}},{"fields":{"identifier":"action.casino.back-to-overview"},"sys":{"id":"os4fb3rtgMJBl2cNZCcxK","type":"Entry","version":1,"locale":"sv-SE","space":{"sys":{"type":"Link","linkType":"Space","id":"uyE6dnrEc31G"}},"environment":{"sys":{"type":"Link","linkType":"Environment","id":"NLC-games-import"}},"contentType":{"sys":{"type":"Link","linkType":"ContentType","id":"translation"}},"updatedAt":"2022-05-05T21:16:46+00:00","createdAt":"2022-05-05T21:16:46+00:00"}},{"fields":{"identifier":"alert_message.success.activate_complete","translation":"Ditt konto har aktiverats!"},"sys":{"id":"6a00dwZm3kFkXTSmafBcQq","type":"Entry","version":1,"locale":"sv-SE","space":{"sys":{"type":"Link","linkType":"Space","id":"uyE6dnrEc31G"}},"environment":{"sys":{"type":"Link","linkType":"Environment","id":"NLC-games-import"}},"contentType":{"sys":{"type":"Link","linkType":"ContentType","id":"translation"}},"updatedAt":"2022-05-05T21:16:47+00:00","createdAt":"2022-05-05T21:16:47+00:00"}},{"fields":{"identifier":"label.history.status-pending"},"sys":{"id":"QdXGbLG0JrDq1kBAL5p9a","type":"Entry","version":1,"locale":"sv-SE","space":{"sys":{"type":"Link","linkType":"Space","id":"uyE6dnrEc31G"}},"environment":{"sys":{"type":"Link","linkType":"Environment","id":"NLC-games-import"}},"contentType":{"sys":{"type":"Link","linkType":"ContentType","id":"translation"}},"updatedAt":"2022-05-05T21:16:48+00:00","createdAt":"2022-05-05T21:16:47+00:00"}},{"fields":{"identifier":"header.weekend-booster"},"sys":{"id":"5Wbw0Wne30ZlCe0GFc5dxr","type":"Entry","version":1,"locale":"sv-SE","space":{"sys":{"type":"Link","linkType":"Space","id":"uyE6dnrEc31G"}},"environment":{"sys":{"type":"Link","linkType":"Environment","id":"NLC-games-import"}},"contentType":{"sys":{"type":"Link","linkType":"ContentType","id":"translation"}},"updatedAt":"2022-05-05T21:16:48+00:00","createdAt":"2022-05-05T21:16:48+00:00"}},{"fields":{"identifier":"label.gameplay.require-sign-in","translation":"Du beh\u00f6ver logga in och g\u00f6ra en {link} f\u00f6r att spela det h\u00e4r spelet."},"sys":{"id":"2I03HdGAlgYW6zMWdwJ6f2","type":"Entry","version":1,"locale":"sv-SE","space":{"sys":{"type":"Link","linkType":"Space","id":"uyE6dnrEc31G"}},"environment":{"sys":{"type":"Link","linkType":"Environment","id":"NLC-games-import"}},"contentType":{"sys":{"type":"Link","linkType":"ContentType","id":"translation"}},"updatedAt":"2022-05-05T21:17:08+00:00","createdAt":"2022-05-05T21:17:08+00:00"}},{"fields":{"identifier":"responsible_gaming.questions.answer1","translation":"Aldrig"},"sys":{"id":"2AXKSCAFxj2De8pIOfS1qR","type":"Entry","version":1,"locale":"sv-SE","space":{"sys":{"type":"Link","linkType":"Space","id":"uyE6dnrEc31G"}},"environment":{"sys":{"type":"Link","linkType":"Environment","id":"NLC-games-import"}},"contentType":{"sys":{"type":"Link","linkType":"ContentType","id":"translation"}},"updatedAt":"2022-05-05T21:17:17+00:00","createdAt":"2022-05-05T21:17:17+00:00"}},{"fields":{"identifier":"responsible_gaming.questions.answer2","translation":"Ibland"},"sys":{"id":"5DUWD6fyUiuW5sxUxc7jOW","type":"Entry","version":1,"locale":"sv-SE","space":{"sys":{"type":"Link","linkType":"Space","id":"uyE6dnrEc31G"}},"environment":{"sys":{"type":"Link","linkType":"Environment","id":"NLC-games-import"}},"contentType":{"sys":{"type":"Link","linkType":"ContentType","id":"translation"}},"updatedAt":"2022-05-05T21:17:18+00:00","createdAt":"2022-05-05T21:17:18+00:00"}},{"fields":{"identifier":"responsible_gaming.questions.answer3","translation":"Ofta"},"sys":{"id":"3YVGdBIBR70woZwxNNFtMR","type":"Entry","version":1,"locale":"sv-SE","space":{"sys":{"type":"Link","linkType":"Space","id":"uyE6dnrEc31G"}},"environment":{"sys":{"type":"Link","linkType":"Environment","id":"NLC-games-import"}},"contentType":{"sys":{"type":"Link","linkType":"ContentType","id":"translation"}},"updatedAt":"2022-05-05T21:17:19+00:00","createdAt":"2022-05-05T21:17:18+00:00"}}],"includes":{"Entry":[],"Asset":[]}}
|