tg-core-components 6.3.8 → 6.3.9-alpha.3

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.
Files changed (57) hide show
  1. package/.nx/workspace-data/file-map.json +975 -0
  2. package/.nx/workspace-data/lockfile.hash +1 -0
  3. package/.nx/workspace-data/nx_files.nxt +0 -0
  4. package/.nx/workspace-data/parsed-lock-file.json +33895 -0
  5. package/.nx/workspace-data/project-graph.json +30111 -0
  6. package/.nx/workspace-data/project-graph.lock +0 -0
  7. package/.nx/workspace-data/source-maps.json +1 -0
  8. package/auth +51 -0
  9. package/es/lib/WithValidation/index.js +0 -111
  10. package/es/widgets/AccountDetail/index.js +1 -19
  11. package/es/widgets/ActivateWidget/index.js +1 -11
  12. package/es/widgets/Bonus/bonusCode.js +1 -9
  13. package/es/widgets/BonusWidget/BonusCode.js +1 -9
  14. package/es/widgets/ChangePassword/index.js +1 -12
  15. package/es/widgets/ChangeUsername/index.js +1 -8
  16. package/es/widgets/RequestResetPassword/index.js +1 -9
  17. package/es/widgets/ResetPassword/index.js +1 -12
  18. package/es/widgets/ResponsibleGaming/index.js +1 -12
  19. package/es/widgets/ResponsibleGamingAccordion/PeriodItemContent/index.js +2 -2
  20. package/es/widgets/ResponsibleGamingAccordion/index.js +4 -42
  21. package/es/widgets/ResponsibleGamingAccordionSignUp/index.js +1 -12
  22. package/es/widgets/ResponsibleGamingWidget/Timespan.js +2 -2
  23. package/es/widgets/ResponsibleGamingWidget/index.js +2 -2
  24. package/es/widgets/SignIn/SignInForm.js +1 -10
  25. package/es/widgets/SignIn/index.js +1 -10
  26. package/es/widgets/SignUp/ActivationStep.js +1 -9
  27. package/es/widgets/SignUp/ConfirmContactInfoStep.js +2 -6
  28. package/es/widgets/SignUp/ContactInfoStep.js +1 -23
  29. package/es/widgets/SignUp/SetLimitsStep.js +1 -9
  30. package/es/widgets/SignUp/UserInfoStep.js +1 -18
  31. package/es/widgets/TableWidget/Tables/bonusCode.js +1 -9
  32. package/es/widgets/Verify/index.js +1 -4
  33. package/lib/lib/WithValidation/index.js +1 -132
  34. package/lib/widgets/AccountDetail/index.js +1 -41
  35. package/lib/widgets/ActivateWidget/index.js +1 -24
  36. package/lib/widgets/Bonus/bonusCode.js +1 -19
  37. package/lib/widgets/BonusWidget/BonusCode.js +1 -19
  38. package/lib/widgets/ChangePassword/index.js +1 -28
  39. package/lib/widgets/ChangeUsername/index.js +1 -18
  40. package/lib/widgets/RequestResetPassword/index.js +1 -21
  41. package/lib/widgets/ResetPassword/index.js +1 -30
  42. package/lib/widgets/ResponsibleGaming/index.js +1 -27
  43. package/lib/widgets/ResponsibleGamingAccordion/PeriodItemContent/index.js +2 -2
  44. package/lib/widgets/ResponsibleGamingAccordion/index.js +6 -55
  45. package/lib/widgets/ResponsibleGamingAccordionSignUp/index.js +1 -25
  46. package/lib/widgets/ResponsibleGamingWidget/Timespan.js +2 -2
  47. package/lib/widgets/ResponsibleGamingWidget/index.js +2 -2
  48. package/lib/widgets/SignIn/SignInForm.js +1 -20
  49. package/lib/widgets/SignIn/index.js +1 -20
  50. package/lib/widgets/SignUp/ActivationStep.js +1 -21
  51. package/lib/widgets/SignUp/ConfirmContactInfoStep.js +1 -13
  52. package/lib/widgets/SignUp/ContactInfoStep.js +1 -38
  53. package/lib/widgets/SignUp/SetLimitsStep.js +1 -21
  54. package/lib/widgets/SignUp/UserInfoStep.js +1 -41
  55. package/lib/widgets/TableWidget/Tables/bonusCode.js +1 -19
  56. package/lib/widgets/Verify/index.js +1 -11
  57. package/package.json +1 -1
File without changes
@@ -0,0 +1 @@
1
+ {}
package/auth ADDED
@@ -0,0 +1,51 @@
1
+
2
+ <!DOCTYPE html>
3
+ <html lang="sv">
4
+
5
+ <head>
6
+ <meta charset="utf-8">
7
+ <meta name="referrer" content="no-referrer">
8
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
9
+ <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
10
+ <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">
11
+ <title>Bethard</title>
12
+ <script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
13
+ <script src="https://cdn.ravenjs.com/3.26.4/raven.min.js" crossorigin="anonymous"></script>
14
+ <style type="text/css">
15
+
16
+ @font-face {
17
+ font-family: Futura;
18
+ font-style: normal;
19
+ font-weight: 400;
20
+ src: url("https://static.gii.cloud/futura_lt/Futura LT Medium.woff") format("woff"),url("https://static.gii.cloud/futura_lt/Futura LT Medium.ttf") format("truetype")
21
+ }
22
+ @font-face {
23
+ font-family: Futura;
24
+ src: local("Futura LT Bold"),local("Futura-LT-Bold"),url("https://static.gii.cloud/futura_lt/Futura LT Bold.woff") format("woff"),url("https://static.gii.cloud/futura_lt/Futura LT Bold.ttf") format("truetype");
25
+ font-weight: 600;
26
+ font-style: normal
27
+ }
28
+ @font-face {
29
+ font-family: Futura;
30
+ src: local("Futura LT Bold"),local("Futura-LT-Bold"),url("https://static.gii.cloud/futura_lt/Futura LT Bold.woff") format("woff"),url("https://static.gii.cloud/futura_lt/Futura LT Bold.ttf") format("truetype");
31
+ font-weight: 700;
32
+ font-style: normal
33
+ }
34
+
35
+ </style>
36
+ </head>
37
+
38
+ <body>
39
+ <main>
40
+ <div class="bankid-se-config" bankid-se-config="{&quot;relyingPartyName&quot;:&quot;Bethard&quot;,&quot;relyingPartyAvatar&quot;:&quot;https://www.icelondon.uk.com/__media/libraries/exhibitor-press-releases/8FA2DD80-5056-B779-246F1902D15A57A0-image.png&quot;,&quot;relyingPartyURL&quot;:&quot;https://www.bethard.com&quot;,&quot;theme&quot;:&quot;dark&quot;,&quot;themeConfig&quot;:&quot;\n\t\t{\n\t\t \&quot;shadows\&quot;: [],\n\t\t \&quot;props\&quot;: {\n\t\t \&quot;MuiButtonBase\&quot;: {\n\t\t \&quot;disableRipple\&quot;: true\n\t\t },\n\t\t \&quot;MuiPaper\&quot;: {\n\t\t \&quot;square\&quot;: true\n\t\t }\n\t\t },\n\t\t \&quot;typography\&quot;: {\n\t\t\t\t\&quot;fontFamily\&quot;: \&quot;Futura, sans-serif\&quot;,\n\t\t\t\t\&quot;fontSize\&quot;: 12\n\t\t\t},\n\t\t\t\&quot;palette\&quot;: {\n\t\t\t\t\&quot;type\&quot;: \&quot;dark\&quot;,\n\t\t\t\t\&quot;background\&quot;:{\n\t\t\t\t\t\&quot;default\&quot;: \&quot;#1a1a1a\&quot;\n\t\t\t\t},\n\t\t\t\t\&quot;primary\&quot;: {\n\t\t\t\t\t\&quot;main\&quot;: \&quot;#f7d146\&quot;\n\t\t\t\t},\n\t\t\t\t\&quot;secondary\&quot;: {\n\t\t\t\t\t\&quot;main\&quot;: \&quot;#C4A638\&quot;\n\t\t\t\t}\n\t\t\t},\n\t\t\t\&quot;shape\&quot;: {\n\t\t\t\t\&quot;borderRadius\&quot;: 0\n\t\t\t},\n\t\t \&quot;overrides\&quot;: {\n\t\t \&quot;MuiPaper\&quot;: {\n\t\t \&quot;root\&quot;: {\n\t\t\t\t\t\t\&quot;background\&quot;: \&quot;#1a1a1a!important\&quot;,\n\t\t\t\t\t\t\&quot;color\&quot;: \&quot;#dedede\&quot;\n\t\t }\n\t\t },\n\t\t \&quot;MuiTypography\&quot;: {\n\t\t \&quot;display1\&quot;: {\n\t\t \&quot;color\&quot;: \&quot;#f7d146!important\&quot;,\n\t\t \&quot;fontWeight\&quot;: \&quot;bold\&quot;,\n\t\t \&quot;textTransform\&quot;: \&quot;uppercase\&quot;\n\t\t },\n\t\t \&quot;title\&quot;: {\n\t\t \&quot;fontWeight\&quot;: \&quot;bold\&quot;,\n\t\t \&quot;textTransform\&quot;: \&quot;uppercase\&quot;\n\t\t },\n\t\t \&quot;headline\&quot;: {\n\t\t \&quot;fontWeight\&quot;: \&quot;bold\&quot;,\n\t\t \&quot;textTransform\&quot;: \&quot;uppercase\&quot;\n\t\t }\n\t\t },\n\t\t \&quot;MuiBottomNavigation\&quot;: {\n\t\t \&quot;root\&quot;: {\n\t\t \&quot;background\&quot;: \&quot;#282828!important\&quot;\n\t\t }\n\t\t },\n\t\t \&quot;MuiBottomNavigationAction\&quot;: {\n\t\t \&quot;selected\&quot;: {\n\t\t \&quot;color\&quot;: \&quot;#f7d146!important\&quot;\n\t\t },\n\t\t \&quot;label\&quot;: {\n\t\t \&quot;color\&quot;: \&quot;#dedede!important\&quot;\n\t\t }\n\t\t },\n\t\t \&quot;MuiButton\&quot;: {\n\t\t \&quot;root\&quot;: {\n\t\t \&quot;_fontWeight\&quot;: \&quot;bold\&quot;,\n\t\t \&quot;paddingLeft\&quot;: \&quot;3em!important\&quot;,\n\t\t \&quot;paddingRight\&quot;: \&quot;3em!important\&quot;\n\t\t },\n\t\t \&quot;outlined\&quot;: {\n\t\t \&quot;borderWidth\&quot;: 1.5,\n\t\t \&quot;borderColor\&quot;: \&quot;inherit\&quot;\n\t\t\t\t\t},\n\t\t\t\t\t\&quot;raised\&quot;: {\n\t\t\t\t\t\t\&quot;fontWeight\&quot;: \&quot;bold\&quot;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\&quot;MuiInputLabel\&quot;: {\n\t\t\t\t\t\&quot;root\&quot;: {\n\t\t\t\t\t\t\&quot;color\&quot;: \&quot;#dedede!important\&quot;\n\t\t\t\t\t},\n\t\t\t\t\t\&quot;shrink\&quot;: {\n\t\t\t\t\t\t\&quot;transform\&quot;: \&quot;translate(0, 1.5px) scale(0.875)\&quot;,\n\t\t\t\t\t\t\&quot;transformOrigin\&quot;: \&quot;top left\&quot;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\&quot;MuiCircularProgress\&quot;: {\n\t\t\t\t\t\&quot;_colorPrimary\&quot;: \&quot;#f7d14666\&quot;,\n\t\t\t\t\t\&quot;root\&quot;: {\n\t\t\t\t\t\t\&quot;width\&quot;: \&quot;70px!important\&quot;,\n \t\t \&quot;height\&quot;: \&quot;70px!important\&quot;,\n\t\t\t\t\t\t\&quot;color\&quot;: \&quot;#f7d146\&quot;\n\t\t\t\t\t},\n\t\t\t\t\t\&quot;circle\&quot;: {\n\t\t\t\t\t\t\&quot;strokeWidth\&quot;: 2\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t }\n\t\t}&quot;,&quot;fontURL&quot;:&quot;&quot;,&quot;faviconURL&quot;:&quot;&quot;,&quot;isIframe&quot;:true,&quot;isInline&quot;:false,&quot;css&quot;:&quot;&quot;,&quot;cssURL&quot;:&quot;&quot;,&quot;isPartial&quot;:false,&quot;hasFixedSSN&quot;:true,&quot;csrfToken&quot;:&quot;FQC/JSj+/5Knv6FcyGEwio+ILW161vDZsLzNhbt82EI=&quot;,&quot;collectURL&quot;:&quot;https://demo-api.gii.cloud/api/ip/bankid-se/auth/collect?id=880035236545495042\u0026csrfToken=FQC%2FJSj%2B%2F5Knv6FcyGEwio%2BILW161vDZsLzNhbt82EI%3D\u0026sessionID=96872c4a0e5e982ead7066a63ae065b231f5b3b03e6e4e58ffb2ea33ea86fa1a\u0026authRequestID=880035236525965314%2C341305621978906625%2CVqAgTCpjgN2%2B%2FjlHfeU9qoEqZdHNwFhBS5lc5VmQBUQ%3D&quot;,&quot;initSameDeviceURL&quot;:&quot;https://demo-api.gii.cloud/api/ip/bankid-se/auth/initSameDevice?id=880035236545495042\u0026csrfToken=FQC%2FJSj%2B%2F5Knv6FcyGEwio%2BILW161vDZsLzNhbt82EI%3D\u0026sessionID=96872c4a0e5e982ead7066a63ae065b231f5b3b03e6e4e58ffb2ea33ea86fa1a\u0026authRequestID=880035236525965314%2C341305621978906625%2CVqAgTCpjgN2%2B%2FjlHfeU9qoEqZdHNwFhBS5lc5VmQBUQ%3D&quot;,&quot;initOtherDeviceURL&quot;:&quot;https://demo-api.gii.cloud/api/ip/bankid-se/auth/initOtherDevice?id=880035236545495042\u0026csrfToken=FQC%2FJSj%2B%2F5Knv6FcyGEwio%2BILW161vDZsLzNhbt82EI%3D\u0026sessionID=96872c4a0e5e982ead7066a63ae065b231f5b3b03e6e4e58ffb2ea33ea86fa1a\u0026authRequestID=880035236525965314%2C341305621978906625%2CVqAgTCpjgN2%2B%2FjlHfeU9qoEqZdHNwFhBS5lc5VmQBUQ%3D&quot;,&quot;isSign&quot;:false,&quot;hasPersonalNumber&quot;:true,&quot;device&quot;:&quot;OTHER&quot;,&quot;other&quot;:&quot;&quot;,&quot;QR&quot;:&quot;FALSE&quot;,&quot;lang&quot;:&quot;sv&quot;,&quot;ssn&quot;:&quot;199202143112&quot;,&quot;isNativePlatform&quot;:false,&quot;redirectURL&quot;:&quot;&quot;,&quot;redirect&quot;:false,&quot;referer&quot;:&quot;&quot;,&quot;isPhone&quot;:false,&quot;cancelURL&quot;:&quot;https://demo-api.gii.cloud/api/ip/bankid-se/auth/cancel?id=880035236545495042\u0026csrfToken=FQC%2FJSj%2B%2F5Knv6FcyGEwio%2BILW161vDZsLzNhbt82EI%3D\u0026sessionID=96872c4a0e5e982ead7066a63ae065b231f5b3b03e6e4e58ffb2ea33ea86fa1a\u0026authRequestID=880035236525965314%2C341305621978906625%2CVqAgTCpjgN2%2B%2FjlHfeU9qoEqZdHNwFhBS5lc5VmQBUQ%3D&quot;}"></div>
41
+ <div class="bankid-se-lang" bankid-se-lang="{}"></div>
42
+
43
+ <script src="https://demo-api.gii.cloud/static/ip/bankidse/iframeResizer.contentWindow.min.js?rev=e05483705b84562824d8cb5f2ee1ce4657f40e18"></script>
44
+ <script src="https://demo-api.gii.cloud/static/ip/bankidse/bankidse-iframe.js?rev=e05483705b84562824d8cb5f2ee1ce4657f40e18"></script>
45
+
46
+ </main>
47
+
48
+
49
+ </body>
50
+
51
+ </html>
@@ -1,111 +0,0 @@
1
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
2
-
3
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
4
-
5
- var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
6
-
7
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
-
9
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
10
-
11
- import * as R from 'ramda';
12
- import withState from 'recompose/withState';
13
- import mapProps from 'recompose/mapProps';
14
- import compose from 'recompose/compose';
15
-
16
- var createPredicate = function createPredicate(_ref, inputs) {
17
- var _ref2 = _slicedToArray(_ref, 2),
18
- test = _ref2[0],
19
- errorMsg = _ref2[1];
20
-
21
- return function (a, inputs) {
22
- return test(a, inputs) ? null : errorMsg;
23
- };
24
- };
25
- var createPredicates = R.map(createPredicate);
26
- var runPredicates = function runPredicates(_ref3, data) {
27
- var _ref4 = _slicedToArray(_ref3, 2),
28
- input = _ref4[0],
29
- validations = _ref4[1];
30
-
31
- return R.map(function (predFn) {
32
- return predFn(input, data);
33
- }, createPredicates(validations, data));
34
- };
35
-
36
- var validate = R.compose(R.map(R.head), R.filter(R.length), function (data) {
37
- return R.map(function (dataItem) {
38
- return R.filter(R.identity, runPredicates(dataItem, data));
39
- }, data);
40
- }, R.mergeWithKey(function (k, l, r) {
41
- return [l, r];
42
- }));
43
-
44
- var WithValidation = function WithValidation(rules) {
45
- return compose(withState('errors', 'setErrors', {}), withState('formState', 'updateFormState', {}), mapProps(function (_ref5) {
46
- var formState = _ref5.formState,
47
- updateFormState = _ref5.updateFormState,
48
- errors = _ref5.errors,
49
- setErrors = _ref5.setErrors,
50
- onSubmitForm = _ref5.onSubmitForm,
51
- onFormError = _ref5.onFormError,
52
- onNextStep = _ref5.onNextStep,
53
- rest = _objectWithoutProperties(_ref5, ['formState', 'updateFormState', 'errors', 'setErrors', 'onSubmitForm', 'onFormError', 'onNextStep']);
54
-
55
- return _extends({
56
- onChange: function onChange(name, value) {
57
- return updateFormState(function (form) {
58
- return R.assocPath([name], value, form);
59
- });
60
- },
61
- setInitialState: function setInitialState(intialState) {
62
- return updateFormState(function (form) {
63
- return intialState;
64
- });
65
- },
66
- onBlur: function onBlur(name, value) {
67
- var _errors = validate(_defineProperty({}, name, value), _defineProperty({}, name, rules[name]));
68
-
69
- if (R.isEmpty(_errors)) {
70
- setErrors(R.omit(['' + name], errors));
71
- } else {
72
- setErrors(_extends({}, errors, _errors));
73
- }
74
- },
75
- onSubmit: function onSubmit(e) {
76
- e.preventDefault();
77
- var activeRules = R.keys(rules).reduce(function (_rules, keyName) {
78
- if (e.target.querySelector('[name=' + keyName + ']') !== null) _rules[keyName] = rules[keyName];
79
-
80
- return _rules;
81
- }, {});
82
-
83
- var formData = R.keys(activeRules).reduce(function (form, keyName) {
84
- var formValue = R.path(['value'], e.target.querySelector('[name=' + keyName + ']'));
85
-
86
- switch (typeof formValue === 'undefined' ? 'undefined' : _typeof(formValue)) {
87
- case 'string':
88
- form[keyName] = R.trim(formValue);
89
- break;
90
- default:
91
- form[keyName] = formValue;
92
- break;
93
- }
94
-
95
- return form;
96
- }, {});
97
- var data = R.merge(formData, formState);
98
- var _errors = validate(data, activeRules);
99
-
100
- setErrors(_errors);
101
-
102
- if (R.isEmpty(_errors)) {
103
- onSubmitForm && onSubmitForm(data, onNextStep);
104
- } else onFormError && onFormError(data);
105
- },
106
- errors: errors
107
- }, rest);
108
- }));
109
- };
110
-
111
- export default WithValidation;
@@ -1,13 +1,5 @@
1
1
  import React, { Fragment } from 'react';
2
- import compose from 'recompose/compose';
3
2
  import PropTypes from 'prop-types';
4
- import { injectIntl } from 'react-intl';
5
- import require from '../../lib/WithValidation/rules/required';
6
- import phone from '../../lib/WithValidation/rules/phone';
7
- import blacklistedCharacters from '../../lib/WithValidation/rules/blacklistedCharacters';
8
- import noSpecialCharacters from '../../lib/WithValidation/rules/noSpecialCharacters';
9
- import stringWithoutNumbers from '../../lib/WithValidation/rules/stringWithoutNumbers';
10
- import WithValidation from '../../lib/WithValidation';
11
3
  import Input from '../../components/Input';
12
4
  import Select from '../../components/Select';
13
5
  import translate from '../../lib/utils/translate';
@@ -278,14 +270,4 @@ AccountDetail.defaultProps = {
278
270
  isComplete: false
279
271
  };
280
272
 
281
- var rules = {
282
- MobilePhoneNumber: [[require, 'error.empty.mobilePhoneNumber'], [phone, 'error.condition.phone']],
283
- Address1: [[require, 'error.empty.address'], [blacklistedCharacters, 'error.format.address']],
284
- Zip: [[require, 'error.empty.zip_code'], [noSpecialCharacters, 'error.format.zip']],
285
- City: [[require, 'error.empty.city'], [stringWithoutNumbers, 'error.invalid.city'], [blacklistedCharacters, 'error.invalid.city']],
286
- Password: [[require, 'error.empty.password']],
287
- Country: [[require, 'error.empty.country']],
288
- Gender: [[require, 'error.empty.gender']]
289
- };
290
-
291
- export default compose(WithValidation(rules), injectIntl)(AccountDetail);
273
+ export default AccountDetail;
@@ -5,17 +5,12 @@ var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = [
5
5
  function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
6
6
 
7
7
  import React, { useState, useEffect, useRef } from 'react';
8
- import compose from 'recompose/compose';
9
- import { injectIntl } from 'react-intl';
10
8
  import Input from '../../components/Input';
11
9
  import Button from '../../components/Button';
12
10
  import Translate from '../../components/Translate';
13
11
  import PropTypes from 'prop-types';
14
12
  import translate from '../../lib/utils/translate';
15
13
  import cn from 'classnames';
16
- import withValidation from '../../lib/WithValidation';
17
- import email from '../../lib/WithValidation/rules/email';
18
- import require from '../../lib/WithValidation/rules/required';
19
14
 
20
15
  var KEY_CODE = {
21
16
  BACKSPACE: 'Backspace',
@@ -346,9 +341,4 @@ ActivateWidget.defaultProps = {
346
341
  onResend: Function
347
342
  };
348
343
 
349
- var rules = {
350
- Email: [[require, 'error.empty.email'], [email, 'error.condition.email']],
351
- ActivationCode: [[require, 'error.empty.activation_code']]
352
- };
353
-
354
- export default compose(withValidation(rules), injectIntl)(ActivateWidget);
344
+ export default ActivateWidget;
@@ -1,9 +1,5 @@
1
1
  import React from 'react';
2
2
  import Input from '../../components/Input';
3
- import compose from 'recompose/compose';
4
- import { injectIntl } from 'react-intl';
5
- import WithValidation from '../../lib/WithValidation';
6
- import require from '../../lib/WithValidation/rules/required';
7
3
  import PropTypes from 'prop-types';
8
4
  import translate from '../../lib/utils/translate';
9
5
 
@@ -75,8 +71,4 @@ BonusCodeForm.defaultProps = {
75
71
  withPlaceholder: false
76
72
  };
77
73
 
78
- var rules = {
79
- bonusCode: [[require, 'error.empty.bonusCode']]
80
- };
81
-
82
- export default compose(WithValidation(rules), injectIntl)(BonusCodeForm);
74
+ export default BonusCodeForm;
@@ -9,10 +9,6 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
9
9
  import React, { PureComponent } from 'react';
10
10
  import Input from 'tg-core-components/lib/components/Input';
11
11
  import Button from 'tg-core-components/lib/components/Button';
12
- import compose from 'recompose/compose';
13
- import { injectIntl } from 'react-intl';
14
- import WithValidation from 'tg-core-components/lib/lib/WithValidation';
15
- import require from 'tg-core-components/lib/lib/WithValidation/rules/required';
16
12
  import translate from '../../lib/utils/translate';
17
13
 
18
14
  var Bonus = function (_PureComponent) {
@@ -75,10 +71,6 @@ var BonusCodeForm = function BonusCodeForm(_ref3) {
75
71
  );
76
72
  };
77
73
 
78
- var rules = {
79
- bonusCode: [[require, 'error.empty.bonusCode']]
80
- };
81
-
82
- BonusCodeForm = compose(WithValidation(rules), injectIntl)(BonusCodeForm);
74
+ BonusCodeForm = BonusCodeForm;
83
75
 
84
76
  export default Bonus;
@@ -1,12 +1,6 @@
1
1
  import React from 'react';
2
- import compose from 'recompose/compose';
3
- import { injectIntl } from 'react-intl';
4
- import WithValidation from '../../lib/WithValidation';
5
2
  import Input from '../../components/Input';
6
3
  import Button from '../../components/Button';
7
- import require from '../../lib/WithValidation/rules/required';
8
- import password from '../../lib/WithValidation/rules/password';
9
- import match from '../../lib/WithValidation/rules/match';
10
4
  import PropTypes from 'prop-types';
11
5
  import translate from '../../lib/utils/translate';
12
6
 
@@ -92,10 +86,5 @@ ChangePassword.defaultProps = {
92
86
  onSubmit: Function,
93
87
  onBlur: Function
94
88
  };
95
- var rules = {
96
- NewPassword: [[require, 'error.empty.new_password'], [password, 'error.condition.password']],
97
- confirm_password: [[match('NewPassword'), 'error.match.new_password']],
98
- CurrentPassword: [[require, 'error.empty.old_password']]
99
- };
100
89
 
101
- export default compose(WithValidation(rules), injectIntl)(ChangePassword);
90
+ export default ChangePassword;
@@ -1,10 +1,6 @@
1
1
  import React from 'react';
2
- import compose from 'recompose/compose';
3
- import { injectIntl } from 'react-intl';
4
- import WithValidation from '../../lib/WithValidation';
5
2
  import Button from '../../components/Button';
6
3
  import Input from '../../components/Input';
7
- import require from '../../lib/WithValidation/rules/required';
8
4
  import PropTypes from 'prop-types';
9
5
  import translate from '../../lib/utils/translate';
10
6
 
@@ -56,8 +52,5 @@ ChangeUsername.defaultProps = {
56
52
  onSubmit: Function,
57
53
  onBlur: Function
58
54
  };
59
- var rules = {
60
- Username: [[require, 'error.empty.username']]
61
- };
62
55
 
63
- export default compose(WithValidation(rules), injectIntl)(ChangeUsername);
56
+ export default ChangeUsername;
@@ -7,12 +7,8 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
7
7
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
8
8
 
9
9
  import React, { Component } from 'react';
10
- import compose from 'recompose/compose';
11
- import { injectIntl } from 'react-intl';
12
- import WithValidation from '../../lib/WithValidation';
13
10
  import Input from '../../components/Input';
14
11
  import Button from '../../components/Button';
15
- import require from '../../lib/WithValidation/rules/required';
16
12
  import marked from 'marked';
17
13
  import PropTypes from 'prop-types';
18
14
  import translate from '../../lib/utils/translate';
@@ -90,8 +86,4 @@ RequestResetPassword.defaultProps = {
90
86
  };
91
87
 
92
88
 
93
- var rules = {
94
- UsernameOrEmail: [[require, 'error.empty.username_or_email']]
95
- };
96
-
97
- export default compose(WithValidation(rules), injectIntl)(RequestResetPassword);
89
+ export default RequestResetPassword;
@@ -7,14 +7,8 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
7
7
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
8
8
 
9
9
  import React, { Component } from 'react';
10
- import compose from 'recompose/compose';
11
- import { injectIntl } from 'react-intl';
12
- import WithValidation from '../../lib/WithValidation';
13
10
  import Input from '../../components/Input';
14
11
  import Button from '../../components/Button';
15
- import require from '../../lib/WithValidation/rules/required';
16
- import password from '../../lib/WithValidation/rules/password';
17
- import match from '../../lib/WithValidation/rules/match';
18
12
  import translate from '../../lib/utils/translate';
19
13
 
20
14
  import PropTypes from 'prop-types';
@@ -98,9 +92,4 @@ ResetPassword.defaultProps = {
98
92
  };
99
93
 
100
94
 
101
- var rules = {
102
- NewPassword: [[require, 'error.empty.new_password'], [password, 'error.condition.password']],
103
- confirm_password: [[match('NewPassword'), 'error.match.new_password']]
104
- };
105
-
106
- export default compose(WithValidation(rules), injectIntl)(ResetPassword);
95
+ export default ResetPassword;
@@ -9,12 +9,7 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
9
9
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
10
10
 
11
11
  import React, { PureComponent } from 'react';
12
- import compose from 'recompose/compose';
13
- import { injectIntl } from 'react-intl';
14
12
  import Select from '../../components/Select';
15
- import WithValidation from '../../lib/WithValidation';
16
- import require from '../../lib/WithValidation/rules/required';
17
- import number from '../../lib/WithValidation/rules/number';
18
13
  import Period from './Period';
19
14
  import Amount from './Amount';
20
15
  import translate from '../../lib/utils/translate';
@@ -121,10 +116,4 @@ ResponsibleGaming.propTypes = {
121
116
  };
122
117
 
123
118
 
124
- var rules = {
125
- Type: [[require, 'error.empty.type']],
126
- Timespan: [[require, 'error.empty.timespan']],
127
- Amount: [[require, number, 'error.number.amount']]
128
- };
129
-
130
- export default compose(WithValidation(rules), injectIntl)(ResponsibleGaming);
119
+ export default ResponsibleGaming;
@@ -32,8 +32,8 @@ var PeriodItemContent = function PeriodItemContent(_ref) {
32
32
 
33
33
  var types = config.map(function (c) {
34
34
  return {
35
- label: translate({ id: c.label }, intl),
36
- value: c.value
35
+ label: translate({ id: "asdf" + c.label }, intl),
36
+ value: c.value + "asdf"
37
37
  };
38
38
  });
39
39
 
@@ -1,5 +1,3 @@
1
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2
-
3
1
  var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
4
2
 
5
3
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -9,11 +7,6 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
9
7
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
10
8
 
11
9
  import React, { PureComponent } from 'react';
12
- import compose from 'recompose/compose';
13
- import { injectIntl } from 'react-intl';
14
- import WithValidation from '../../lib/WithValidation';
15
- import require from '../../lib/WithValidation/rules/required';
16
- import number from '../../lib/WithValidation/rules/number';
17
10
  import AccordionWidget from '../AccordionWidget';
18
11
  import AmountItemHeader from './AmountItemHeader';
19
12
  import AmountItemContent from './AmountItemContent';
@@ -472,7 +465,7 @@ var ResponsibleGaming = function (_PureComponent) {
472
465
 
473
466
  timeUntilDelete = canceledLimit && new Date(canceledLimit.Canceled + '+00:00');
474
467
 
475
- timeUntilNewLimit = React.createElement(FormattedRelativeTime, selectUnit(timeUntilNewLimit));
468
+ timeUntilNewLimit = React.createElement(FormattedRelativeTime, selectUnit(timeUntilNewLimit, Date.now(), "day"));
476
469
  timeUntilConfirm = React.createElement(FormattedRelativeTime, selectUnit(timeUntilConfirm));
477
470
  timeUntilDelete = React.createElement(FormattedRelativeTime, selectUnit(timeUntilDelete));
478
471
 
@@ -574,35 +567,10 @@ var ResponsibleGaming = function (_PureComponent) {
574
567
  tooltipOpen: item.action === 'Block',
575
568
  header: React.createElement(PeriodItemHeader, {
576
569
  item: item,
577
- title: translate({ id: 'label.type.' + item.action }, intl),
570
+ title: "header:" + translate({ id: 'label.type.' + item.action }, intl),
578
571
  displayLimit: displayLimit || null
579
572
  }),
580
- content: React.createElement(
581
- 'div',
582
- { className: 'responsiblegaming-limit-item-content' },
583
- React.createElement(PeriodItemContent, _extends({
584
- title: 'label.type.' + item.action,
585
- config: item.config,
586
- activeLimit: _this3.state.activeLimit,
587
- confirmLimit: _this3.state.confirmLimit,
588
- pendingLimit: _this3.state.pendingLimit,
589
- timespan: _this3.state.timespan,
590
- handleConfirm: handleConfirm,
591
- handleDecline: handleDecline,
592
- handleCancel: handleCancel,
593
- cooldownLimit: _this3.state.cooldownLimit,
594
- canceledLimit: _this3.state.canceledLimit,
595
- timeUntilNewLimit: timeUntilNewLimit,
596
- timeUntilConfirm: timeUntilConfirm,
597
- timeUntilDelete: timeUntilDelete,
598
- displayLimit: displayLimit,
599
- type: _this3.state.type,
600
- errors: errors,
601
- handlePeriodAmount: _this3.handlePeriodAmount,
602
- isLoading: isLoading,
603
- currency: currency
604
- }, defaultItem))
605
- ),
573
+ content: React.createElement('div', { className: 'responsiblegaming-limit-item-content' }),
606
574
  key: item.action + i
607
575
  };
608
576
  } else {
@@ -635,10 +603,4 @@ var ResponsibleGaming = function (_PureComponent) {
635
603
  return ResponsibleGaming;
636
604
  }(PureComponent);
637
605
 
638
- var rules = {
639
- Type: [[require, 'error.empty.type']],
640
- Timespan: [[require, 'error.empty.timespan']],
641
- Amount: [[require, number, 'error.number.amount']]
642
- };
643
-
644
- export default compose(WithValidation(rules), injectIntl)(ResponsibleGaming);
606
+ export default ResponsibleGaming;
@@ -9,11 +9,6 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
9
9
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
10
10
 
11
11
  import React, { PureComponent } from 'react';
12
- import compose from 'recompose/compose';
13
- import { injectIntl } from 'react-intl';
14
- import WithValidation from '../../lib/WithValidation';
15
- import require from '../../lib/WithValidation/rules/required';
16
- import number from '../../lib/WithValidation/rules/number';
17
12
  import AccordionWidget from '../AccordionWidget';
18
13
  import AmountItemHeader from './AmountItemHeader';
19
14
  import AmountItemContent from './AmountItemContent';
@@ -213,10 +208,4 @@ var ResponsibleGaming = function (_PureComponent) {
213
208
  return ResponsibleGaming;
214
209
  }(PureComponent);
215
210
 
216
- var rules = {
217
- Type: [[require, 'error.empty.type']],
218
- Timespan: [[require, 'error.empty.timespan']],
219
- Amount: [[require, number, 'error.number.amount']]
220
- };
221
-
222
- export default compose(WithValidation(rules), injectIntl)(ResponsibleGaming);
211
+ export default ResponsibleGaming;
@@ -273,8 +273,8 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
273
273
  return {
274
274
  value: v,
275
275
  label: value !== v && v === getByPath(currentLimit, 'Amount') ? messages.get('label.responsible-gaming.option.current-limit', {
276
- currentLimit: messages.getValue(v)
277
- }) : messages.getValue(v)
276
+ currentLimit: messages.getValue(v) + "/" + valueType
277
+ }) : messages.getValue(v) + "/" + valueType
278
278
  };
279
279
  });
280
280
  // If not allowed to increase limit -> remove options greater than current limit
@@ -242,8 +242,8 @@ var LimitContent = function LimitContent(_ref3) {
242
242
  validationState: getValidationState(t.timespan),
243
243
  currency: currency,
244
244
  values: values,
245
- valueType: valueType,
246
- hideRemainingLimit: hideRemainingLimit,
245
+ valueType: t.valueType || valueType // Allow overriding valueType with valueType from CMS
246
+ , hideRemainingLimit: hideRemainingLimit,
247
247
  showCurrentValue: showCurrentValue,
248
248
  hideOther: hideOther
249
249
  }, t));
@@ -1,10 +1,6 @@
1
1
  import React from 'react';
2
- import compose from 'recompose/compose';
3
- import { injectIntl } from 'react-intl';
4
2
  import Input from '../../components/Input';
5
3
  import ButtonLoader from '../../components/ButtonLoader';
6
- import WithValidation from '../../lib/WithValidation';
7
- import require from '../../lib/WithValidation/rules/required';
8
4
  import translate from '../../lib/utils/translate';
9
5
 
10
6
  var SignIn = function SignIn(_ref) {
@@ -72,9 +68,4 @@ var SignIn = function SignIn(_ref) {
72
68
  );
73
69
  };
74
70
 
75
- var rules = {
76
- username: [[require, 'error.empty.username_or_email']],
77
- password: [[require, 'error.empty.password']]
78
- };
79
-
80
- export default compose(WithValidation(rules), injectIntl)(SignIn);
71
+ export default SignIn;
@@ -1,10 +1,6 @@
1
1
  import React from 'react';
2
- import compose from 'recompose/compose';
3
- import { injectIntl } from 'react-intl';
4
2
  import Input from '../../components/Input';
5
3
  import Button from '../../components/Button';
6
- import WithValidation from '../../lib/WithValidation';
7
- import require from '../../lib/WithValidation/rules/required';
8
4
  import translate from '../../lib/utils/translate';
9
5
  import Icon from '../../components/Icon';
10
6
 
@@ -72,9 +68,4 @@ var SignIn = function SignIn(_ref) {
72
68
  );
73
69
  };
74
70
 
75
- var rules = {
76
- username: [[require, 'error.empty.username_or_email']],
77
- password: [[require, 'error.empty.password']]
78
- };
79
-
80
- export default compose(WithValidation(rules), injectIntl)(SignIn);
71
+ export default SignIn;
@@ -7,11 +7,7 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
7
7
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
8
8
 
9
9
  import React, { Component } from 'react';
10
- import compose from 'recompose/compose';
11
10
  import Input from '../../components/Input';
12
- import { injectIntl } from 'react-intl';
13
- import WithValidation from '../../lib/WithValidation';
14
- import require from '../../lib/WithValidation/rules/required';
15
11
  import { connect } from 'react-redux';
16
12
  import PropTypes from 'prop-types';
17
13
  import Translate from '../../components/Translate';
@@ -159,8 +155,4 @@ ActivationStep.propTypes = {
159
155
  };
160
156
 
161
157
 
162
- var rules = {
163
- activation_code: [[require, 'error.empty.activation_code']]
164
- };
165
-
166
- export default compose(WithValidation(rules), injectIntl)(ActivationStep);
158
+ export default ActivationStep;
@@ -7,9 +7,7 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
7
7
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
8
8
 
9
9
  import React, { Component } from 'react';
10
- import compose from 'recompose/compose';
11
- import { injectIntl, FormattedNumber } from 'react-intl';
12
- import WithValidation from '../../lib/WithValidation';
10
+ import { FormattedNumber } from 'react-intl';
13
11
  import Icon from '../../components/Icon';
14
12
  import PropTypes from 'prop-types';
15
13
  import Translate from '../../components/Translate';
@@ -245,6 +243,4 @@ ConfirmContactInfo.propTypes = {
245
243
  };
246
244
 
247
245
 
248
- var rules = {};
249
-
250
- export default compose(WithValidation(rules), injectIntl)(ConfirmContactInfo);
246
+ export default ConfirmContactInfo;