tg-core-components 5.4.5-bethard → 5.5.1-master

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 (105) hide show
  1. package/es/components/AcceptUpdatedTaC/index.js +8 -3
  2. package/es/components/Checkbox/index.js +93 -0
  3. package/es/components/Deposit/CardInput/index.js +1 -3
  4. package/es/components/Input/index.js +222 -22
  5. package/es/components/InputWrapper/index.js +69 -0
  6. package/es/components/Notification.js +4 -4
  7. package/es/components/Select/index.js +202 -64
  8. package/es/components/Select/test.js +111 -0
  9. package/es/index.js +2 -2
  10. package/es/lib/utils/translate.js +1 -8
  11. package/es/misc/countryEmojiFlags.js +0 -1
  12. package/es/widgets/AccountDetail/index.js +53 -77
  13. package/es/widgets/ActivateWidget/index.js +59 -293
  14. package/es/widgets/BonusWidget/BonusCode.js +24 -17
  15. package/es/widgets/BonusWidget/index.js +83 -45
  16. package/es/widgets/Cashier/Payment/index.js +2 -0
  17. package/es/widgets/CashierAccordion/Deposit/BonusCodeInput/index.js +9 -6
  18. package/es/widgets/CashierAccordion/Deposit/DepositWidget/index.js +22 -33
  19. package/es/widgets/CashierAccordion/Deposit/PaymentForm/index.js +2 -6
  20. package/es/widgets/CashierAccordion/Payment/PaymentAccountForms/astroPayBankTransaltions.js +12 -0
  21. package/es/widgets/CashierAccordion/Payment/PaymentAccountForms/index.js +163 -347
  22. package/es/widgets/CashierAccordion/Payment/PaymentAccountParser.js +0 -6
  23. package/es/widgets/CashierAccordion/Payment/PaymentMethodSelector/index.js +2 -2
  24. package/es/widgets/CashierAccordion/Payment/index.js +2 -0
  25. package/es/widgets/CashierAccordion/Withdraw/WithdrawWidget/index.js +9 -23
  26. package/es/widgets/ChangePassword/index.js +53 -40
  27. package/es/widgets/HistoryWidget/index.js +69 -51
  28. package/es/widgets/HistoryWidget/message.js +17 -20
  29. package/es/widgets/RequestResetPassword/index.js +15 -14
  30. package/es/widgets/ResetPassword/index.js +22 -18
  31. package/es/widgets/ResponsibleGamingAccordion/LimitStatus/index.js +5 -2
  32. package/es/widgets/ResponsibleGamingAccordion/PeriodItemContent/index.js +1 -2
  33. package/es/widgets/ResponsibleGamingSingleSignUp/AmountItem/index.js +1 -2
  34. package/es/widgets/ResponsibleGamingWidget/Timespan.js +14 -24
  35. package/es/widgets/ResponsibleGamingWidget/helpers.js +2 -2
  36. package/es/widgets/ResponsibleGamingWidget/validate.js +2 -6
  37. package/es/widgets/Settings/index.js +2 -2
  38. package/es/widgets/SignIn/SignInForm.js +4 -6
  39. package/es/widgets/SignIn/index.js +21 -21
  40. package/es/widgets/SignUp/ContactInfoStep.js +5 -6
  41. package/es/widgets/SportsbookSettings/index.js +10 -24
  42. package/es/widgets/Subscriptions/index.js +3 -5
  43. package/lib/components/AcceptUpdatedTaC/index.js +11 -3
  44. package/lib/components/Checkbox/index.js +106 -0
  45. package/lib/components/Deposit/CardInput/index.js +1 -3
  46. package/lib/components/Input/index.js +223 -26
  47. package/lib/components/InputWrapper/index.js +85 -0
  48. package/lib/components/Notification.js +3 -3
  49. package/lib/components/Select/index.js +209 -63
  50. package/lib/components/Select/test.js +121 -0
  51. package/lib/index.js +7 -7
  52. package/lib/lib/utils/translate.js +1 -8
  53. package/lib/misc/countryEmojiFlags.js +0 -1
  54. package/lib/widgets/AccountDetail/index.js +53 -86
  55. package/lib/widgets/ActivateWidget/index.js +58 -305
  56. package/lib/widgets/BonusWidget/BonusCode.js +24 -20
  57. package/lib/widgets/BonusWidget/index.js +85 -44
  58. package/lib/widgets/Cashier/Payment/index.js +2 -0
  59. package/lib/widgets/CashierAccordion/Deposit/BonusCodeInput/index.js +13 -7
  60. package/lib/widgets/CashierAccordion/Deposit/DepositWidget/index.js +25 -36
  61. package/lib/widgets/CashierAccordion/Deposit/PaymentForm/index.js +2 -9
  62. package/lib/widgets/CashierAccordion/Payment/PaymentAccountForms/astroPayBankTransaltions.js +12 -0
  63. package/lib/widgets/CashierAccordion/Payment/PaymentAccountForms/index.js +195 -378
  64. package/lib/widgets/CashierAccordion/Payment/PaymentAccountParser.js +0 -6
  65. package/lib/widgets/CashierAccordion/Payment/PaymentMethodSelector/index.js +2 -2
  66. package/lib/widgets/CashierAccordion/Payment/index.js +2 -0
  67. package/lib/widgets/CashierAccordion/Withdraw/WithdrawWidget/index.js +11 -25
  68. package/lib/widgets/ChangePassword/index.js +53 -43
  69. package/lib/widgets/HistoryWidget/index.js +69 -51
  70. package/lib/widgets/HistoryWidget/message.js +17 -20
  71. package/lib/widgets/RequestResetPassword/index.js +15 -17
  72. package/lib/widgets/ResetPassword/index.js +25 -21
  73. package/lib/widgets/ResponsibleGamingAccordion/LimitStatus/index.js +5 -2
  74. package/lib/widgets/ResponsibleGamingAccordion/PeriodItemContent/index.js +1 -2
  75. package/lib/widgets/ResponsibleGamingSingleSignUp/AmountItem/index.js +1 -2
  76. package/lib/widgets/ResponsibleGamingWidget/Timespan.js +14 -24
  77. package/lib/widgets/ResponsibleGamingWidget/helpers.js +2 -2
  78. package/lib/widgets/ResponsibleGamingWidget/validate.js +2 -6
  79. package/lib/widgets/Settings/index.js +6 -6
  80. package/lib/widgets/SignIn/SignInForm.js +7 -6
  81. package/lib/widgets/SignIn/index.js +25 -25
  82. package/lib/widgets/SignUp/ContactInfoStep.js +8 -6
  83. package/lib/widgets/SportsbookSettings/index.js +10 -24
  84. package/lib/widgets/Subscriptions/index.js +3 -11
  85. package/package.json +8 -3
  86. package/es/components/AutocompleteInput/index.js +0 -104
  87. package/es/components/Input/BirthdateInput.js +0 -174
  88. package/es/components/Input/Checkbox.js +0 -51
  89. package/es/components/Input/Input.js +0 -73
  90. package/es/components/Input/PasswordInput.js +0 -84
  91. package/es/components/Input/PhoneNumberInput.js +0 -113
  92. package/es/components/Input/input.test.js +0 -80
  93. package/es/components/Input/old-input.test.js +0 -100
  94. package/es/components/common.js +0 -339
  95. package/es/widgets/CashierAccordion/Deposit/PaymentForm/NewTab.js +0 -28
  96. package/lib/components/AutocompleteInput/index.js +0 -118
  97. package/lib/components/Input/BirthdateInput.js +0 -195
  98. package/lib/components/Input/Checkbox.js +0 -65
  99. package/lib/components/Input/Input.js +0 -87
  100. package/lib/components/Input/PasswordInput.js +0 -101
  101. package/lib/components/Input/PhoneNumberInput.js +0 -130
  102. package/lib/components/Input/input.test.js +0 -89
  103. package/lib/components/Input/old-input.test.js +0 -107
  104. package/lib/components/common.js +0 -359
  105. package/lib/widgets/CashierAccordion/Deposit/PaymentForm/NewTab.js +0 -44
@@ -8,7 +8,6 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
8
8
 
9
9
  import React, { PureComponent } from 'react';
10
10
  import Input from 'tg-core-components/lib/components/Input';
11
- import Button from 'tg-core-components/lib/components/Button';
12
11
  import compose from 'recompose/compose';
13
12
  import { injectIntl } from 'react-intl';
14
13
  import WithValidation from 'tg-core-components/lib/lib/WithValidation';
@@ -54,23 +53,31 @@ var BonusCodeForm = function BonusCodeForm(_ref3) {
54
53
  return React.createElement(
55
54
  'form',
56
55
  { className: 'form', onSubmit: onSubmit },
57
- React.createElement(Input, {
58
- label: translate({
59
- id: 'label.bonus_code',
60
- defaultMessage: 'Bonus code'
61
- }, intl),
62
- type: 'text',
63
- name: 'bonusCode',
64
- status: errors.bonusCode && 'failure' || 'idle',
65
- statusText: errors.bonusCode && translate({ id: errors.bonusCode }, intl)
66
- }),
67
56
  React.createElement(
68
- Button,
69
- { className: 'button primary wide', type: 'submit' },
70
- translate({
71
- id: 'label.activate',
72
- defaultMessage: 'Activate'
73
- }, intl)
57
+ 'div',
58
+ { className: 'bonus-code-form' },
59
+ React.createElement(Input, {
60
+ className: 'layout-item',
61
+ title: translate({
62
+ id: 'label.bonus_code',
63
+ defaultMessage: 'Bonus code'
64
+ }, intl),
65
+ type: 'text',
66
+ name: 'bonusCode',
67
+ error: errors.bonusCode && translate({ id: errors.bonusCode }, intl)
68
+ }),
69
+ React.createElement(
70
+ 'div',
71
+ { className: 'layout-item' },
72
+ React.createElement(
73
+ 'button',
74
+ { className: 'button primary wide', type: 'submit' },
75
+ translate({
76
+ id: 'label.activate',
77
+ defaultMessage: 'Activate'
78
+ }, intl)
79
+ )
80
+ )
74
81
  )
75
82
  );
76
83
  };
@@ -1,4 +1,6 @@
1
- import React from 'react';
1
+ 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"); } }; }();
2
+
3
+ import React, { useState } from 'react';
2
4
  import { FormattedNumber, FormattedDate } from 'react-intl';
3
5
  import AccordionWidget from '../AccordionWidget';
4
6
  import Button from '../../components/Button';
@@ -6,12 +8,64 @@ import BonusCode from './BonusCode';
6
8
  import { List } from 'tg-core-components';
7
9
  import Translate from '../../components/Translate';
8
10
  import { getBonusState } from './states';
11
+ import marked from 'marked';
12
+
13
+ var ALEACC_BONUS_CLAIM_STATE = ['Initiated', 'PreClaimed'];
14
+ var ALEACC_BONUS_REJECT_STATE = ['Initiated', 'PreClaimed', 'Pending', 'PreWager'];
15
+ var ALEACC_BONUS_ACTION_STATE = [].concat(ALEACC_BONUS_CLAIM_STATE, ALEACC_BONUS_REJECT_STATE);
9
16
 
10
17
  var BonusAction = function BonusAction(_ref) {
11
18
  var bonus = _ref.bonus,
12
- claimBonus = _ref.claimBonus,
13
- device = _ref.device,
14
- redirect = _ref.redirect;
19
+ onClaimBonus = _ref.onClaimBonus,
20
+ onRejectBonus = _ref.onRejectBonus;
21
+
22
+ var _useState = useState(false),
23
+ _useState2 = _slicedToArray(_useState, 2),
24
+ isLoadingClaim = _useState2[0],
25
+ setIsLoadingClaim = _useState2[1];
26
+
27
+ var _useState3 = useState(false),
28
+ _useState4 = _slicedToArray(_useState3, 2),
29
+ isLoadingReject = _useState4[0],
30
+ setIsLoadingReject = _useState4[1];
31
+
32
+ var claimBonus = function claimBonus(e) {
33
+ onClaimBonus(bonus, function (isLoading) {
34
+ return setIsLoadingClaim(isLoading);
35
+ }, e);
36
+ };
37
+
38
+ var rejectBonus = function rejectBonus(e) {
39
+ onRejectBonus(bonus, function (isLoading) {
40
+ return setIsLoadingReject(isLoading);
41
+ }, e);
42
+ };
43
+
44
+ return React.createElement(
45
+ 'div',
46
+ { className: 'actions' },
47
+ ALEACC_BONUS_CLAIM_STATE.includes(bonus.State) && React.createElement(
48
+ Button,
49
+ {
50
+ className: 'button primary small',
51
+ onClick: claimBonus,
52
+ isLoading: isLoadingClaim },
53
+ React.createElement(Translate, { id: 'action.bonus.claim', defaultMessage: 'Claim' })
54
+ ),
55
+ ALEACC_BONUS_REJECT_STATE.includes(bonus.State) && React.createElement(
56
+ Button,
57
+ {
58
+ className: 'button secondary small',
59
+ onClick: rejectBonus,
60
+ isLoading: isLoadingReject },
61
+ React.createElement(Translate, { id: 'action.bonus.reject', defaultMessage: 'Reject' })
62
+ )
63
+ );
64
+ };
65
+
66
+ var BonusActionFT = function BonusActionFT(_ref2) {
67
+ var bonus = _ref2.bonus,
68
+ onClaimBonus = _ref2.onClaimBonus;
15
69
 
16
70
  // Atm it's only fasttrack that supports actions.
17
71
  if (bonus.Provider !== 'fasttrack') return null;
@@ -19,9 +73,6 @@ var BonusAction = function BonusAction(_ref) {
19
73
  // Expired bonuses has no actions
20
74
  if (bonus.State === 'Expired') return null;
21
75
 
22
- var gameUrl = '/casino';
23
- if (device === 'Desktop' && bonus.DesktopGameUrl && bonus.DesktopGameUrl.trim()) gameUrl = bonus.DesktopGameUrl.trim();else if (device !== 'Desktop' && bonus.MobileGameUrl && bonus.MobileGameUrl.trim()) gameUrl = bonus.MobileGameUrl.trim();
24
-
25
76
  // FTType 1 - Pending Bonus
26
77
  // Claim bonus and redirect to game of present.
27
78
  if (bonus.FTType === 1) {
@@ -29,10 +80,8 @@ var BonusAction = function BonusAction(_ref) {
29
80
  return React.createElement(
30
81
  Button,
31
82
  {
32
- onClick: function onClick() {
33
- claimBonus(bonus.Id).then(function () {
34
- redirect(gameUrl);
35
- });
83
+ onClick: function onClick(e) {
84
+ return onClaimBonus(bonus, null, e);
36
85
  },
37
86
  className: 'button primary action wide ' + (bonus.IsLocked && 'locked') },
38
87
  React.createElement(Translate, { id: 'action.bonus.type1', defaultMessage: 'Action type1' })
@@ -45,14 +94,8 @@ var BonusAction = function BonusAction(_ref) {
45
94
  return React.createElement(
46
95
  Button,
47
96
  {
48
- onClick: function onClick() {
49
- return redirect({
50
- pathname: '/dashboard/deposit',
51
- search: gameUrl ? '?ref_url=' + encodeURIComponent(gameUrl) : '',
52
- state: {
53
- bonusCode: bonus.PromoCode
54
- }
55
- });
97
+ onClick: function onClick(e) {
98
+ return onClaimBonus(bonus, null, e);
56
99
  },
57
100
  className: 'button primary action wide ' + (bonus.IsLocked && 'locked') },
58
101
  React.createElement(Translate, { id: 'action.bonus.type2', defaultMessage: 'Action type2' })
@@ -65,20 +108,8 @@ var BonusAction = function BonusAction(_ref) {
65
108
  return React.createElement(
66
109
  Button,
67
110
  {
68
- onClick: function onClick() {
69
- if (!bonus.IsLocked) {
70
- claimBonus(bonus.Id).then(function () {
71
- redirect(gameUrl);
72
- });
73
- } else {
74
- redirect({
75
- pathname: '/dashboard/deposit',
76
- search: '?ref_url=/dashboard/bonus',
77
- state: {
78
- bonusCode: bonus.PromoCode
79
- }
80
- });
81
- }
111
+ onClick: function onClick(e) {
112
+ return onClaimBonus(bonus, null, e);
82
113
  },
83
114
  className: 'button primary action wide ' + (bonus.IsLocked && 'locked') },
84
115
  !!bonus.IsLocked && React.createElement(Translate, {
@@ -92,12 +123,11 @@ var BonusAction = function BonusAction(_ref) {
92
123
  return null;
93
124
  };
94
125
 
95
- var BonusWidget = function BonusWidget(_ref2) {
96
- var bonuses = _ref2.bonuses,
97
- handleBonusCodeSubmit = _ref2.handleBonusCodeSubmit,
98
- claimBonus = _ref2.claimBonus,
99
- device = _ref2.device,
100
- redirect = _ref2.redirect;
126
+ var BonusWidget = function BonusWidget(_ref3) {
127
+ var bonuses = _ref3.bonuses,
128
+ handleBonusCodeSubmit = _ref3.handleBonusCodeSubmit,
129
+ onClaimBonus = _ref3.onClaimBonus,
130
+ onRejectBonus = _ref3.onRejectBonus;
101
131
 
102
132
  var bonusList = { active: null, available: null, finished: null };
103
133
 
@@ -149,12 +179,13 @@ var BonusWidget = function BonusWidget(_ref2) {
149
179
  })]];
150
180
 
151
181
  // Add bonus actions to not expired Fasttrack bonuses
152
- if (item.Provider === 'fasttrack' && item.State !== 'Expired') info.push(React.createElement(BonusAction, {
153
- bonus: item,
154
- claimBonus: claimBonus,
155
- device: device,
156
- redirect: redirect
157
- }));
182
+ if (item.Provider === 'fasttrack' && item.State !== 'Expired') info.push(React.createElement(BonusActionFT, { bonus: item, onClaimBonus: onClaimBonus }));
183
+ // Add bonus actions to post claim bonuses from Aleacc
184
+ else if (item.Provider !== 'fasttrack' && ALEACC_BONUS_ACTION_STATE.includes(item.State)) info.push(React.createElement(BonusAction, {
185
+ bonus: item,
186
+ onClaimBonus: onClaimBonus,
187
+ onRejectBonus: onRejectBonus
188
+ }));
158
189
 
159
190
  var detail = [[React.createElement(
160
191
  'span',
@@ -214,6 +245,13 @@ var BonusWidget = function BonusWidget(_ref2) {
214
245
  })
215
246
  )]];
216
247
 
248
+ info.push([React.createElement('div', {
249
+ className: 'disclaimer',
250
+ dangerouslySetInnerHTML: {
251
+ __html: item.content && item.content.disclaimer && marked(item.content.disclaimer || '') || item.promotion && item.promotion.shortDisclaimer
252
+ }
253
+ })]);
254
+
217
255
  return {
218
256
  id: item.Id,
219
257
  info: info,
@@ -24,5 +24,7 @@ export var matchProviderType = function matchProviderType(first, second) {
24
24
  if (first.service) fType = fType + first.service;
25
25
  if (second.service) sType = sType + second.service;
26
26
 
27
+ if (!fType || !sType) return;
28
+
27
29
  return sType.toLowerCase() === fType.toLowerCase();
28
30
  };
@@ -7,7 +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 Input from '../../../../components/Input';
10
+ import TextInput from '../../../../components/Deposit/TextInput';
11
+ import Icon from '../../../../components/Icon';
11
12
  import { injectIntl } from 'react-intl';
12
13
  import translate from '../../../../lib/utils/translate';
13
14
 
@@ -49,14 +50,16 @@ var BonusCodeInput = function (_Component) {
49
50
  return React.createElement(
50
51
  'div',
51
52
  { className: 'bonus-code-input-wrapper' },
52
- React.createElement(Input, {
53
+ React.createElement(TextInput, {
53
54
  name: 'bonusCode',
54
- value: bonusCode,
55
- onChange: onChange,
56
55
  autoFocus: true,
57
- label: translate({ id: 'cashier.bonus_code' }, intl),
56
+ placeholder: translate({ id: 'cashier.bonus_code' }, intl),
58
57
  disabled: disabled,
59
- status: status === 'active' && 'success' || status === 'pending' && 'loading'
58
+ onChange: onChange
59
+ }),
60
+ status && React.createElement(Icon, {
61
+ icon: status === 'active' ? 'check' : '',
62
+ className: 'bonus-icon bonus-' + status
60
63
  })
61
64
  );
62
65
  }
@@ -2,6 +2,8 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
2
2
 
3
3
  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
4
 
5
+ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
6
+
5
7
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6
8
 
7
9
  function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
@@ -20,7 +22,7 @@ import BonusCodeInput from '../BonusCodeInput';
20
22
  import { matchProviderType, getPaymentForm } from '../../Payment';
21
23
  import Icon from '../../../../components/Icon';
22
24
  import marked from 'marked';
23
- import Input from '../../../../components/Input';
25
+ import Input from '../../../../components/Deposit/TextInput';
24
26
  import PaymentAmountSelector from '../../Payment/PaymentAmountSelector';
25
27
  import MethodMinMax from '../../Payment/MethodMinMax';
26
28
  import DelayVisibility from '../../../../components/Deposit/DelayVisibility';
@@ -168,8 +170,7 @@ var DepositWidget = function (_Component) {
168
170
  renderAllowBonusWarning = _props.renderAllowBonusWarning,
169
171
  paymentStats = _props.paymentStats,
170
172
  _props$shouldAutoFocu = _props.shouldAutoFocus,
171
- shouldAutoFocus = _props$shouldAutoFocu === undefined ? false : _props$shouldAutoFocu,
172
- hideSelectedBonus = _props.hideSelectedBonus;
173
+ shouldAutoFocus = _props$shouldAutoFocu === undefined ? false : _props$shouldAutoFocu;
173
174
 
174
175
 
175
176
  var accountExclusions = payments.filter(function (provider) {
@@ -182,7 +183,11 @@ var DepositWidget = function (_Component) {
182
183
  }).map(function (provider) {
183
184
  return provider.providerType.toUpperCase();
184
185
  });
185
- var customAmountExclusions = ['reversewithdrawal'];
186
+ var customAmountExclusions = [].concat(_toConsumableArray(payments.filter(function (provider) {
187
+ return provider.hideCustomAmount;
188
+ }).map(function (provider) {
189
+ return provider.providerType.toLowerCase();
190
+ })), ['reversewithdrawal']);
186
191
  var minMaxExclusions = ['reversewithdrawal'];
187
192
 
188
193
  var minDepositBonusAmount = this.getMinDepositBonusAmount();
@@ -193,8 +198,6 @@ var DepositWidget = function (_Component) {
193
198
  return matchProviderType(payment, selectedMethod);
194
199
  });
195
200
 
196
- var hasCustomAmounts = selectedMethodDetail && selectedMethodDetail.customAmounts;
197
-
198
201
  var selectedBonus = bonuses.find(function (b) {
199
202
  return b.PromoCode === bonusCode;
200
203
  });
@@ -221,13 +224,13 @@ var DepositWidget = function (_Component) {
221
224
  bonuses: bonuses,
222
225
  onSelect: this.onSelectBonus,
223
226
  selectedBonus: selectedBonus
224
- }) : !hideSelectedBonus ? React.createElement(SelectedBonus, {
227
+ }) : React.createElement(SelectedBonus, {
225
228
  selectedBonus: selectedBonus,
226
229
  onClick: function onClick() {
227
230
  _this2.onSelectBonus('');
228
231
  _this2.setState({ showBonusSlider: true });
229
232
  }
230
- }) : null),
233
+ })),
231
234
  React.createElement(Form, {
232
235
  onSubmit: this.handleNextStep,
233
236
  initialValues: {
@@ -291,7 +294,7 @@ var DepositWidget = function (_Component) {
291
294
  onSelectMethod: _this2.onSelectMethod,
292
295
  onDeleteAccount: _this2.onDeleteAccount,
293
296
  methodContent: function methodContent(method) {
294
- if (method.txType !== selectedMethod.txType || method.service !== selectedMethod.service) return null;
297
+ if (method.txType !== selectedMethod.txType) return null;
295
298
 
296
299
  return React.createElement(
297
300
  Fragment,
@@ -309,6 +312,7 @@ var DepositWidget = function (_Component) {
309
312
  id: 'label.mobile_number_placeholder',
310
313
  defaultMessage: 'eg. 0701234567'
311
314
  }, intl),
315
+ isControlled: true,
312
316
  value: _this2.state.swishNumber,
313
317
  title: translate({
314
318
  id: 'label.mobile_number'
@@ -337,30 +341,26 @@ var DepositWidget = function (_Component) {
337
341
  return _this2.setState({ buttonLoading: buttonLoading });
338
342
  }
339
343
  }),
340
- !customAmountExclusions.includes(selectedMethod.providerType.toLowerCase()) && !hasCustomAmounts && React.createElement(
344
+ !customAmountExclusions.includes(selectedMethod.providerType.toLowerCase()) && React.createElement(
341
345
  'div',
342
346
  { className: 'custom-amount-and-submit' },
343
347
  React.createElement(Input, {
344
- required: true,
345
348
  pattern: '[0-9]*',
346
349
  className: 'custom-amount',
347
350
  name: 'amount',
348
351
  type: 'number',
349
352
  step: '0.01',
350
- label: translate({
353
+ placeholder: translate({
351
354
  id: 'label.amount'
352
355
  }, intl),
353
- status: errors && errors.amount && errors.amount.length ? 'failure' : '',
354
- value: currentAmount,
356
+ showErrorText: false,
357
+ showErrorIcon: errors && errors.amount && errors.amount.length > 0,
355
358
  onChange: function onChange(e) {
356
359
  return _this2.setState({
357
360
  currentAmount: e.target.value
358
361
  });
359
362
  },
360
- autoFocus: shouldAutoFocus,
361
- setRef: function setRef(ref) {
362
- return _this2.amountInputRef = ref;
363
- }
363
+ autoFocus: shouldAutoFocus
364
364
  }),
365
365
  React.createElement(
366
366
  Button,
@@ -384,7 +384,7 @@ var DepositWidget = function (_Component) {
384
384
  React.createElement(
385
385
  'div',
386
386
  { className: 'bonus-limit' },
387
- !minMaxExclusions.includes(selectedMethod.providerType.toLowerCase()) && !hasCustomAmounts && selectedMethod && selectedMethod.limit && React.createElement(MethodMinMax, {
387
+ !minMaxExclusions.includes(selectedMethod.providerType.toLowerCase()) && !customAmountExclusions.includes(selectedMethod.providerType.toLowerCase()) && selectedMethod && selectedMethod.limit && React.createElement(MethodMinMax, {
388
388
  method: selectedMethod,
389
389
  currency: currency,
390
390
  minDepositBonusAmount: minDepositBonusAmount,
@@ -456,8 +456,7 @@ var DepositWidget = function (_Component) {
456
456
  render: function render(_ref5) {
457
457
  var handleSubmit = _ref5.handleSubmit,
458
458
  values = _ref5.values,
459
- change = _ref5.change,
460
- form = _ref5.form;
459
+ change = _ref5.change;
461
460
  return React.createElement(
462
461
  Fragment,
463
462
  null,
@@ -482,10 +481,7 @@ var DepositWidget = function (_Component) {
482
481
  React.createElement(
483
482
  'div',
484
483
  { className: 'account-details' },
485
- React.createElement(PaymentAccountForm, _extends({}, paymentAccountFormProps, {
486
- change: form.change,
487
- values: values
488
- }))
484
+ React.createElement(PaymentAccountForm, paymentAccountFormProps)
489
485
  ),
490
486
  React.createElement(
491
487
  Button,
@@ -631,16 +627,9 @@ var _initialiseProps = function _initialiseProps() {
631
627
  currency = _props3.currency,
632
628
  paymentStats = _props3.paymentStats,
633
629
  remainingDepositLimit = _props3.remainingDepositLimit,
634
- payments = _props3.payments,
635
- shouldAutoFocus = _props3.shouldAutoFocus;
630
+ payments = _props3.payments;
636
631
 
637
632
 
638
- if (shouldAutoFocus) {
639
- setTimeout(function () {
640
- _this3.amountInputRef && _this3.amountInputRef.focus();
641
- }, 1);
642
- }
643
-
644
633
  var selectedMethodDetail = payments.find(function (payment) {
645
634
  return matchProviderType(payment, method);
646
635
  });
@@ -13,7 +13,6 @@ import FramedComponent from '../../hoc/FramedComponent';
13
13
  import InjectedIframeHTML from './InjectedIframeHTML';
14
14
  import DynamicForm from './DynamicForm';
15
15
  import PaymentResult from './PaymentResult';
16
- import NewTab from './NewTab';
17
16
  import flatten from 'lodash/flatten';
18
17
  import Translate from '../../../../components/Translate';
19
18
 
@@ -82,8 +81,7 @@ var PaymentForm = function (_Component) {
82
81
  value: function render() {
83
82
  var _props = this.props,
84
83
  data = _props.data,
85
- onClose = _props.onClose,
86
- details = _props.details;
84
+ onClose = _props.onClose;
87
85
 
88
86
  if (!data.success) {
89
87
  return React.createElement(PaymentError, { data: data, onClose: onClose });
@@ -102,9 +100,7 @@ var PaymentForm = function (_Component) {
102
100
  frameBorder: 0
103
101
  };
104
102
 
105
- if (details && details.newTab) {
106
- return React.createElement(NewTab, { url: data.redirectOutput.url });
107
- } else if (data.redirectOutput.container == 'iframe' && data.redirectOutput.method == 'POST' && data.redirectOutput.html == null) {
103
+ if (data.redirectOutput.container == 'iframe' && data.redirectOutput.method == 'POST' && data.redirectOutput.html == null) {
108
104
  return React.createElement(FormWithIframe, _extends({
109
105
  frameProps: frameProps,
110
106
  target: frameId
@@ -25,6 +25,18 @@ export default (function (intl, category, type) {
25
25
  id: 'cashier.details.accountTypes.I',
26
26
  defaultMessage: 'International account'
27
27
  }, intl);
28
+ },
29
+ M: function M() {
30
+ return translate({
31
+ id: 'cashier.details.accountTypes.M',
32
+ defaultMessage: 'Master account'
33
+ }, intl);
34
+ },
35
+ V: function V() {
36
+ return translate({
37
+ id: 'cashier.details.accountTypes.V',
38
+ defaultMessage: 'Salary account'
39
+ }, intl);
28
40
  }
29
41
  },
30
42
  services: {