tg-core-components 6.1.17 → 6.1.19-alpha.0

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 (37) hide show
  1. package/es/components/Money/index.js +2 -24
  2. package/es/components/Picture/index.js +1 -1
  3. package/es/lib/utils/selectUnit.js +64 -0
  4. package/es/lib/utils/translate.js +1 -1
  5. package/es/misc/countryEmojiFlags.js +5 -0
  6. package/es/widgets/AccountDetail/index.js +0 -8
  7. package/es/widgets/ActivateWidget/index.js +1 -1
  8. package/es/widgets/BonusWidget/index.js +7 -8
  9. package/es/widgets/BonusWidget/types.js +23 -0
  10. package/es/widgets/Cashier/Deposit/PaymentForm/index.js +5 -2
  11. package/es/widgets/Cashier/Payment/PaymentAccountForms/index.js +41 -10
  12. package/es/widgets/Cashier/Payment/PaymentAccountParser.js +6 -0
  13. package/es/widgets/CashierAccordion/Payment/PaymentAccountForms/index.js +168 -62
  14. package/es/widgets/CashierAccordion/Payment/PaymentAccountParser.js +12 -0
  15. package/es/widgets/CashierAccordion/Withdraw/WithdrawWidget/index.js +1 -2
  16. package/es/widgets/HistoryWidget/index.js +20 -84
  17. package/es/widgets/ResponsibleGamingWidget/Timespan.js +5 -3
  18. package/es/widgets/VerifyAccordionWidget/index.js +1 -1
  19. package/lib/components/Money/index.js +2 -25
  20. package/lib/components/Picture/index.js +1 -1
  21. package/lib/lib/utils/selectUnit.js +69 -0
  22. package/lib/lib/utils/translate.js +1 -1
  23. package/lib/misc/countryEmojiFlags.js +5 -0
  24. package/lib/widgets/AccountDetail/index.js +0 -8
  25. package/lib/widgets/ActivateWidget/index.js +1 -1
  26. package/lib/widgets/BonusWidget/index.js +8 -8
  27. package/lib/widgets/BonusWidget/types.js +37 -0
  28. package/lib/widgets/Cashier/Deposit/PaymentForm/index.js +5 -2
  29. package/lib/widgets/Cashier/Payment/PaymentAccountForms/index.js +42 -11
  30. package/lib/widgets/Cashier/Payment/PaymentAccountParser.js +6 -0
  31. package/lib/widgets/CashierAccordion/Payment/PaymentAccountForms/index.js +169 -63
  32. package/lib/widgets/CashierAccordion/Payment/PaymentAccountParser.js +12 -0
  33. package/lib/widgets/CashierAccordion/Withdraw/WithdrawWidget/index.js +1 -2
  34. package/lib/widgets/HistoryWidget/index.js +24 -87
  35. package/lib/widgets/ResponsibleGamingWidget/Timespan.js +5 -3
  36. package/lib/widgets/VerifyAccordionWidget/index.js +3 -3
  37. package/package.json +2 -2
@@ -186,6 +186,34 @@ var VenusPoint = function VenusPoint(_ref3) {
186
186
  );
187
187
  };
188
188
 
189
+ var Vega = function Vega(_ref4) {
190
+ var account = _ref4.account,
191
+ intl = _ref4.intl,
192
+ change = _ref4.change;
193
+
194
+ return React.createElement(
195
+ 'div',
196
+ null,
197
+ React.createElement(Input, {
198
+ disabled: account.accountId,
199
+ name: 'username',
200
+ onChange: function onChange(e, username) {
201
+ return change('username', username);
202
+ },
203
+ value: account.maskedAccount,
204
+ label: translate({ id: 'cashier.details.username' }, intl)
205
+ }),
206
+ React.createElement(Input, {
207
+ type: 'password',
208
+ name: 'password',
209
+ onChange: function onChange(e, password) {
210
+ return change('password', password);
211
+ },
212
+ label: translate({ id: 'cashier.details.password' }, intl)
213
+ })
214
+ );
215
+ };
216
+
189
217
  var PPro = function PPro() {
190
218
  return React.createElement(
191
219
  'div',
@@ -194,11 +222,11 @@ var PPro = function PPro() {
194
222
  );
195
223
  };
196
224
 
197
- var PhoneNumber = function PhoneNumber(_ref4) {
198
- var account = _ref4.account,
199
- intl = _ref4.intl,
200
- change = _ref4.change,
201
- values = _ref4.values;
225
+ var PhoneNumber = function PhoneNumber(_ref5) {
226
+ var account = _ref5.account,
227
+ intl = _ref5.intl,
228
+ change = _ref5.change,
229
+ values = _ref5.values;
202
230
 
203
231
  return React.createElement(
204
232
  'div',
@@ -216,11 +244,11 @@ var PhoneNumber = function PhoneNumber(_ref4) {
216
244
  );
217
245
  };
218
246
 
219
- var Email = function Email(_ref5) {
220
- var account = _ref5.account,
221
- intl = _ref5.intl,
222
- change = _ref5.change,
223
- values = _ref5.values;
247
+ var Email = function Email(_ref6) {
248
+ var account = _ref6.account,
249
+ intl = _ref6.intl,
250
+ change = _ref6.change,
251
+ values = _ref6.values;
224
252
 
225
253
  return React.createElement(
226
254
  'div',
@@ -238,10 +266,10 @@ var Email = function Email(_ref5) {
238
266
  );
239
267
  };
240
268
 
241
- var Banklocal = function Banklocal(_ref6) {
242
- var account = _ref6.account,
243
- intl = _ref6.intl,
244
- change = _ref6.change;
269
+ var Banklocal = function Banklocal(_ref7) {
270
+ var account = _ref7.account,
271
+ intl = _ref7.intl,
272
+ change = _ref7.change;
245
273
 
246
274
  return React.createElement(
247
275
  'div',
@@ -261,17 +289,17 @@ var Banklocal = function Banklocal(_ref6) {
261
289
  return change('accountNumber', accountNumber);
262
290
  },
263
291
  name: 'accountNumber',
264
- label: translate({ id: 'cashier.details.accountNumber' }, intl),
292
+ label: translate({ id: 'cashier.details.iban' }, intl),
265
293
  disabled: account.accountId
266
294
  })
267
295
  );
268
296
  };
269
297
 
270
- var BankIBAN = function BankIBAN(_ref7) {
271
- var account = _ref7.account,
272
- intl = _ref7.intl,
273
- change = _ref7.change,
274
- values = _ref7.values;
298
+ var BankIBAN = function BankIBAN(_ref8) {
299
+ var account = _ref8.account,
300
+ intl = _ref8.intl,
301
+ change = _ref8.change,
302
+ values = _ref8.values;
275
303
 
276
304
  return React.createElement(
277
305
  'div',
@@ -317,15 +345,15 @@ var BankIBAN = function BankIBAN(_ref7) {
317
345
  );
318
346
  };
319
347
 
320
- var AstroPayBank = function AstroPayBank(_ref8) {
321
- var account = _ref8.account,
322
- intl = _ref8.intl,
323
- country = _ref8.country,
324
- method = _ref8.method,
325
- detail = _ref8.detail,
326
- change = _ref8.change,
327
- values = _ref8.values,
328
- config = _ref8.config;
348
+ var AstroPayBank = function AstroPayBank(_ref9) {
349
+ var account = _ref9.account,
350
+ intl = _ref9.intl,
351
+ country = _ref9.country,
352
+ method = _ref9.method,
353
+ detail = _ref9.detail,
354
+ change = _ref9.change,
355
+ values = _ref9.values,
356
+ config = _ref9.config;
329
357
 
330
358
  var _useState = useState([]),
331
359
  _useState2 = _slicedToArray(_useState, 2),
@@ -530,12 +558,12 @@ var AstroPayBank = function AstroPayBank(_ref8) {
530
558
  );
531
559
  };
532
560
 
533
- var BankIntl = function BankIntl(_ref9) {
534
- var account = _ref9.account,
535
- intl = _ref9.intl,
536
- values = _ref9.values,
537
- change = _ref9.change,
538
- country = _ref9.country;
561
+ var BankIntl = function BankIntl(_ref10) {
562
+ var account = _ref10.account,
563
+ intl = _ref10.intl,
564
+ values = _ref10.values,
565
+ change = _ref10.change,
566
+ country = _ref10.country;
539
567
 
540
568
  return React.createElement(
541
569
  'div',
@@ -547,7 +575,7 @@ var BankIntl = function BankIntl(_ref9) {
547
575
  onChange: function onChange(e, accountNumber) {
548
576
  return change('accountNumber', accountNumber);
549
577
  },
550
- label: translate({ id: 'cashier.details.accountNumber' }, intl),
578
+ label: translate({ id: 'cashier.details.iban' }, intl),
551
579
  disabled: account.accountId
552
580
  }),
553
581
  React.createElement(Input, {
@@ -587,12 +615,12 @@ var BankIntl = function BankIntl(_ref9) {
587
615
  );
588
616
  };
589
617
 
590
- var CryptoCurrency = function CryptoCurrency(_ref10) {
591
- var intl = _ref10.intl,
592
- detail = _ref10.detail,
593
- method = _ref10.method,
594
- values = _ref10.values,
595
- change = _ref10.change;
618
+ var CryptoCurrency = function CryptoCurrency(_ref11) {
619
+ var intl = _ref11.intl,
620
+ detail = _ref11.detail,
621
+ method = _ref11.method,
622
+ values = _ref11.values,
623
+ change = _ref11.change;
596
624
 
597
625
  var methodDetails = {
598
626
  cryptoCurrencies: getByPath(detail, 'config.cryptoCurrencies', [])
@@ -645,11 +673,11 @@ var CryptoCurrency = function CryptoCurrency(_ref10) {
645
673
  );
646
674
  };
647
675
 
648
- var Jeton = function Jeton(_ref11) {
649
- var account = _ref11.account,
650
- intl = _ref11.intl,
651
- values = _ref11.values,
652
- change = _ref11.change;
676
+ var Jeton = function Jeton(_ref12) {
677
+ var account = _ref12.account,
678
+ intl = _ref12.intl,
679
+ values = _ref12.values,
680
+ change = _ref12.change;
653
681
 
654
682
  return React.createElement(
655
683
  'div',
@@ -667,11 +695,11 @@ var Jeton = function Jeton(_ref11) {
667
695
  );
668
696
  };
669
697
 
670
- var BestPay = function BestPay(_ref12) {
671
- var account = _ref12.account,
672
- intl = _ref12.intl,
673
- values = _ref12.values,
674
- change = _ref12.change;
698
+ var BestPay = function BestPay(_ref13) {
699
+ var account = _ref13.account,
700
+ intl = _ref13.intl,
701
+ values = _ref13.values,
702
+ change = _ref13.change;
675
703
 
676
704
  return React.createElement(
677
705
  'div',
@@ -698,11 +726,11 @@ var BestPay = function BestPay(_ref12) {
698
726
  );
699
727
  };
700
728
 
701
- var Mifinity = function Mifinity(_ref13) {
702
- var account = _ref13.account,
703
- intl = _ref13.intl,
704
- change = _ref13.change,
705
- values = _ref13.values;
729
+ var Mifinity = function Mifinity(_ref14) {
730
+ var account = _ref14.account,
731
+ intl = _ref14.intl,
732
+ change = _ref14.change,
733
+ values = _ref14.values;
706
734
 
707
735
  return React.createElement(
708
736
  'div',
@@ -720,11 +748,11 @@ var Mifinity = function Mifinity(_ref13) {
720
748
  );
721
749
  };
722
750
 
723
- var EzeeWallet = function EzeeWallet(_ref14) {
724
- var account = _ref14.account,
725
- intl = _ref14.intl,
726
- method = _ref14.method,
727
- change = _ref14.change;
751
+ var EzeeWallet = function EzeeWallet(_ref15) {
752
+ var account = _ref15.account,
753
+ intl = _ref15.intl,
754
+ method = _ref15.method,
755
+ change = _ref15.change;
728
756
 
729
757
  return React.createElement(
730
758
  'div',
@@ -757,6 +785,69 @@ var EzeeWallet = function EzeeWallet(_ref14) {
757
785
  );
758
786
  };
759
787
 
788
+ var Paramount = function Paramount(_ref16) {
789
+ var account = _ref16.account,
790
+ intl = _ref16.intl,
791
+ values = _ref16.values,
792
+ change = _ref16.change,
793
+ detail = _ref16.detail;
794
+
795
+ var methodDetails = {
796
+ securityQuestions: getByPath(detail, 'config.securityQuestions', [])
797
+ };
798
+
799
+ return React.createElement(
800
+ 'div',
801
+ { className: 'payment-account-info' },
802
+ methodDetails.securityQuestions.length > 0 && React.createElement(
803
+ Select,
804
+ {
805
+ required: true,
806
+ disabled: account.accountId,
807
+ name: 'securityQuestion',
808
+ value: values['securityQuestion'],
809
+ onChange: function onChange(_, securityQuestion) {
810
+ return change('securityQuestion', securityQuestion);
811
+ },
812
+ label: translate({
813
+ id: 'cashier.details.securityQuestion',
814
+ defaultMessage: 'Security question'
815
+ }, intl) },
816
+ !values['securityQuestion'] && React.createElement(
817
+ Select.Option,
818
+ { value: '', selected: true, disabled: true },
819
+ translate({
820
+ id: 'cashier.details.select-securityQuestion',
821
+ defaultMessage: 'Select security question'
822
+ }, intl)
823
+ ),
824
+ methodDetails.securityQuestions.map(function (securityQuestion) {
825
+ return React.createElement(
826
+ Select.Option,
827
+ { value: securityQuestion.value },
828
+ translate({
829
+ id: securityQuestion.id,
830
+ defaultMessage: securityQuestion.value
831
+ }, intl)
832
+ );
833
+ })
834
+ ),
835
+ React.createElement(Input, {
836
+ required: true,
837
+ type: 'password',
838
+ name: 'securityAnswer',
839
+ value: values['securityAnswer'],
840
+ onChange: function onChange(_, securityAnswer) {
841
+ return change('securityAnswer', securityAnswer);
842
+ },
843
+ label: translate({
844
+ id: 'cashier.details.securityAnswer',
845
+ defaultMessage: 'Security answer'
846
+ }, intl)
847
+ })
848
+ );
849
+ };
850
+
760
851
  export var SkrillDeposit = {
761
852
  component: injectIntl(Email),
762
853
  parser: Parser.parseEmail
@@ -777,6 +868,11 @@ export var VenusPointDeposit = {
777
868
  parser: Parser.parseVenusPoint
778
869
  };
779
870
 
871
+ export var VegaDeposit = {
872
+ component: injectMethod('deposit', injectIntl(Vega)),
873
+ parser: Parser.parseVega
874
+ };
875
+
780
876
  export var SiruDeposit = {
781
877
  component: injectIntl(PhoneNumber),
782
878
  parser: Parser.parsePhoneNumber
@@ -884,6 +980,11 @@ export var VenusPointWithdrawal = {
884
980
  parser: Parser.parseVenusPoint
885
981
  };
886
982
 
983
+ export var VegaWithdrawal = {
984
+ component: injectMethod('withdraw', injectIntl(Vega)),
985
+ parser: Parser.parseVega
986
+ };
987
+
887
988
  export var NetellerWithdrawal = {
888
989
  component: injectMethod({ method: 'withdraw' }, injectIntl(Neteller)),
889
990
  parser: Parser.parseNeteller
@@ -918,6 +1019,11 @@ export var EzeeWalletWithdrawal = {
918
1019
  parser: identity
919
1020
  };
920
1021
 
1022
+ export var ParamountWithdrawal = {
1023
+ component: injectIntl(Paramount),
1024
+ parser: Parser.parseParamount
1025
+ };
1026
+
921
1027
  export var MiFinityEWalletWithdrawal = {
922
1028
  component: injectIntl(Mifinity),
923
1029
  parser: identity
@@ -39,8 +39,20 @@ export var parseVenusPoint = function parseVenusPoint(account) {
39
39
  };
40
40
  };
41
41
 
42
+ export var parseVega = function parseVega(account) {
43
+ return {
44
+ account: account.maskedAccount || account.account
45
+ };
46
+ };
47
+
42
48
  export var parseMifinity = function parseMifinity(account) {
43
49
  return {
44
50
  account: account.maskedAccount || account.account
45
51
  };
52
+ };
53
+
54
+ export var parseParamount = function parseParamount(account) {
55
+ return {
56
+ securityQuestion: account.maskedAccount || account.account
57
+ };
46
58
  };
@@ -141,8 +141,7 @@ var WithdrawWidget = function (_PureComponent) {
141
141
  if (amount === undefined) {
142
142
  return errors;
143
143
  }
144
-
145
- if (Number(amount) < parseFloat(selectedMethod.limit.min)) {
144
+ if (amount && Number(amount) < parseFloat(selectedMethod.limit.min)) {
146
145
  errors.amount.push(React.createElement(Translate, {
147
146
  id: 'error.cashier.amount-below-method-limit',
148
147
  defaultMessage: 'Amount is too low.'
@@ -17,71 +17,7 @@ import { SkeletonLine } from '../../components/Skeleton';
17
17
  import getByPath from 'lodash/get';
18
18
  import Translate from '../../components/Translate';
19
19
  import { getMessage } from './message';
20
-
21
- var MILISECONDS = {
22
- IN_A_SECOND: 1000,
23
- IN_A_MINUTE: 60000,
24
- IN_AN_HOUR: 3600000,
25
- IN_A_DAY: 86400000,
26
- IN_A_WEEK: 604800000,
27
- IN_A_MONTH: 2628000000,
28
- IN_A_YEAR: 31536000000
29
- };
30
-
31
- var selectUnit = function selectUnit(from) {
32
- var now = Date.now();
33
- var ms = now - from;
34
-
35
- switch (true) {
36
- case MILISECONDS.IN_A_SECOND < ms && ms < MILISECONDS.IN_A_MINUTE:
37
- return {
38
- value: -1 * Math.floor(ms / MILISECONDS.IN_A_SECOND),
39
- unit: 'second',
40
- updateIntervalInSeconds: 1
41
- };
42
-
43
- case MILISECONDS.IN_A_MINUTE < ms && ms < MILISECONDS.IN_AN_HOUR:
44
- return {
45
- value: -1 * Math.floor(ms / MILISECONDS.IN_A_MINUTE),
46
- unit: 'minute'
47
- };
48
-
49
- case MILISECONDS.IN_AN_HOUR < ms && ms < MILISECONDS.IN_A_DAY:
50
- return {
51
- value: -1 * Math.floor(ms / MILISECONDS.IN_AN_HOUR),
52
- unit: 'hour'
53
- };
54
-
55
- case MILISECONDS.IN_A_DAY < ms && ms < MILISECONDS.IN_A_WEEK:
56
- return {
57
- value: -1 * Math.floor(ms / MILISECONDS.IN_A_DAY),
58
- unit: 'day'
59
- };
60
-
61
- case MILISECONDS.IN_A_WEEK < ms && ms < MILISECONDS.IN_A_MONTH:
62
- return {
63
- value: -1 * Math.floor(ms / MILISECONDS.IN_A_WEEK),
64
- unit: 'week'
65
- };
66
-
67
- case MILISECONDS.IN_A_MONTH < ms && ms < MILISECONDS.IN_A_YEAR:
68
- return {
69
- value: -1 * Math.floor(ms / MILISECONDS.IN_A_MONTH),
70
- unit: 'month'
71
- };
72
-
73
- case MILISECONDS.IN_A_YEAR < ms:
74
- return {
75
- value: -1 * Math.floor(ms / MILISECONDS.IN_A_YEAR),
76
- unit: 'year'
77
- };
78
-
79
- default:
80
- return {
81
- value: 0
82
- };
83
- }
84
- };
20
+ import { selectUnit } from '../../lib/utils/selectUnit';
85
21
 
86
22
  var HistoryWidgetList = function (_React$Component) {
87
23
  _inherits(HistoryWidgetList, _React$Component);
@@ -109,7 +45,7 @@ var HistoryWidgetList = function (_React$Component) {
109
45
  minute: '2-digit',
110
46
  second: '2-digit'
111
47
  });
112
- }, _this.createListInfo = function (item, product, isLoading) {
48
+ }, _this.createListInfo = function (item, product, currency, isLoading) {
113
49
  if (isLoading) return [[React.createElement(SkeletonLine, { bold: true }), React.createElement(SkeletonLine, null)], [React.createElement(SkeletonLine, { bold: true }), React.createElement(SkeletonLine, null)]];
114
50
 
115
51
  if (product === 'casino') {
@@ -121,7 +57,7 @@ var HistoryWidgetList = function (_React$Component) {
121
57
  'div',
122
58
  null,
123
59
  getMessage(getByPath(item, 'Transactions[0].Status'))
124
- )], [React.createElement(Money, { value: item.Win - item.Bet, currency: item.Currency }), React.createElement(FormattedRelativeTime, selectUnit(new Date(item.StartTime + '+00:00')))]];
60
+ )], [React.createElement(Money, { value: item.Win - item.Bet, currency: currency }), React.createElement(FormattedRelativeTime, selectUnit(new Date(item.StartTime + '+00:00')))]];
125
61
  } else if (product === 'sportsbook') {
126
62
  var selection = item.Transactions[0].Description;
127
63
  var odds = item.Transactions[0].Odds;
@@ -137,10 +73,7 @@ var HistoryWidgetList = function (_React$Component) {
137
73
  'div',
138
74
  null,
139
75
  getMessage(item.Settled ? 'settled' : 'pendling')
140
- )], [React.createElement(Money, {
141
- value: item.TotalWin - item.TotalWager,
142
- currency: item.Currency
143
- }), React.createElement(FormattedRelativeTime, selectUnit(new Date(item.Created + '+00:00')))]];
76
+ )], [React.createElement(Money, { value: item.TotalWin - item.TotalWager, currency: currency }), React.createElement(FormattedRelativeTime, selectUnit(new Date(item.Created + '+00:00')))]];
144
77
  } else if (product === 'bingo') {
145
78
  return [[React.createElement(Translate, {
146
79
  tag: 'div'
@@ -152,7 +85,7 @@ var HistoryWidgetList = function (_React$Component) {
152
85
  getMessage(getByPath(item, 'Transactions[0].TransactionType'))
153
86
  )], [React.createElement(Money, {
154
87
  value: getByPath(item, 'Transactions[0].Amount'),
155
- currency: item.Currency
88
+ currency: currency
156
89
  }), React.createElement(FormattedRelativeTime, selectUnit(new Date(item.Created + '+00:00')))]];
157
90
  } else if (product === 'fantasy') {
158
91
  return [[React.createElement(
@@ -167,7 +100,7 @@ var HistoryWidgetList = function (_React$Component) {
167
100
  getMessage(item.Status === 'Default' ? 'initiated' : item.Status === 'Canceled' ? 'canceled' : 'completed')
168
101
  )], [React.createElement(Money, {
169
102
  value: item.Win - (item.Bet + item.Rake),
170
- currency: item.Currency
103
+ currency: currency
171
104
  }), React.createElement(FormattedRelativeTime, selectUnit(new Date(item.Created + '+00:00')))]];
172
105
  }
173
106
 
@@ -181,9 +114,9 @@ var HistoryWidgetList = function (_React$Component) {
181
114
  getMessage(item.Status)
182
115
  )], [React.createElement(Money, {
183
116
  value: item.TransactionType === 'Withdraw' ? -item.Amount : item.Amount,
184
- currency: item.Currency
117
+ currency: currency
185
118
  }), React.createElement(FormattedRelativeTime, selectUnit(new Date(item.Started + '+00:00')))]];
186
- }, _this.createListDetail = function (item, product) {
119
+ }, _this.createListDetail = function (item, product, currency) {
187
120
  if (product === 'casino') {
188
121
  return [[React.createElement(
189
122
  'div',
@@ -195,14 +128,14 @@ var HistoryWidgetList = function (_React$Component) {
195
128
  id: 'label.history.bet',
196
129
  defaultMessage: 'Bet: {value}',
197
130
  values: {
198
- value: React.createElement(Money, { value: item.Bet, currency: item.Currency })
131
+ value: React.createElement(Money, { value: item.Bet, currency: currency })
199
132
  }
200
133
  }), React.createElement(Translate, {
201
134
  tag: 'div',
202
135
  id: 'label.history.win',
203
136
  defaultMessage: 'Win: {value}',
204
137
  values: {
205
- value: React.createElement(Money, { value: item.Win, currency: item.Currency })
138
+ value: React.createElement(Money, { value: item.Win, currency: currency })
206
139
  }
207
140
  })]];
208
141
  } else if (product === 'sportsbook') {
@@ -231,14 +164,14 @@ var HistoryWidgetList = function (_React$Component) {
231
164
  id: 'label.history.bet',
232
165
  defaultMessage: 'Bet: {value}',
233
166
  values: {
234
- value: React.createElement(Money, { value: item.TotalWager, currency: item.Currency })
167
+ value: React.createElement(Money, { value: item.TotalWager, currency: currency })
235
168
  }
236
169
  }), React.createElement(Translate, {
237
170
  tag: 'div',
238
171
  id: 'label.history.win',
239
172
  defaultMessage: 'Win: {value}',
240
173
  values: {
241
- value: React.createElement(Money, { value: item.TotalWin, currency: item.Currency })
174
+ value: React.createElement(Money, { value: item.TotalWin, currency: currency })
242
175
  }
243
176
  })]];
244
177
  } else if (product === 'bingo') {
@@ -271,14 +204,14 @@ var HistoryWidgetList = function (_React$Component) {
271
204
  id: 'label.history.bet',
272
205
  defaultMessage: 'Bet: {value}',
273
206
  values: {
274
- value: React.createElement(Money, { value: item.Bet + item.Rake, currency: item.Currency })
207
+ value: React.createElement(Money, { value: item.Bet + item.Rake, currency: currency })
275
208
  }
276
209
  }), React.createElement(Translate, {
277
210
  tag: 'div',
278
211
  id: 'label.history.win',
279
212
  defaultMessage: 'Win: {value}',
280
213
  values: {
281
- value: React.createElement(Money, { value: item.Win, currency: item.Currency })
214
+ value: React.createElement(Money, { value: item.Win, currency: currency })
282
215
  }
283
216
  })]];
284
217
  }
@@ -340,7 +273,8 @@ var HistoryWidgetList = function (_React$Component) {
340
273
  var _props = this.props,
341
274
  items = _props.items,
342
275
  product = _props.product,
343
- limit = _props.limit;
276
+ limit = _props.limit,
277
+ currency = _props.currency;
344
278
  var page = this.state.page;
345
279
 
346
280
 
@@ -349,8 +283,8 @@ var HistoryWidgetList = function (_React$Component) {
349
283
  var listItems = pageItems.map(function (item) {
350
284
  return {
351
285
  id: item,
352
- info: _this2.createListInfo(item, product, items.isLoading),
353
- detail: _this2.createListDetail(item, product, items.isLoading)
286
+ info: _this2.createListInfo(item, product, currency, items.isLoading),
287
+ detail: _this2.createListDetail(item, product, currency, items.isLoading)
354
288
  };
355
289
  });
356
290
 
@@ -397,6 +331,7 @@ var HistoryWidget = function HistoryWidget(_ref2) {
397
331
  var getTransactions = _ref2.getTransactions,
398
332
  items = _ref2.items,
399
333
  products = _ref2.products,
334
+ currency = _ref2.currency,
400
335
  limit = _ref2.limit;
401
336
 
402
337
  var accordionItems = products.map(function (product) {
@@ -404,6 +339,7 @@ var HistoryWidget = function HistoryWidget(_ref2) {
404
339
  header: getMessage(product),
405
340
  content: React.createElement(HistoryWidgetList, {
406
341
  product: product,
342
+ currency: currency,
407
343
  limit: limit,
408
344
  getTransactions: getTransactions[product],
409
345
  items: items[product]
@@ -251,7 +251,7 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
251
251
  setValue = _useState2[1];
252
252
 
253
253
  useEffect(function () {
254
- if (newLimit && newLimit.Amount) {
254
+ if (newLimit) {
255
255
  setValue(newLimit.Amount);
256
256
  }
257
257
  }, [newLimit]);
@@ -282,7 +282,7 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
282
282
  });
283
283
  }
284
284
  // If not blocked from removing limit or 'No limit' option is selected -> add 'No limit' option
285
- if (!validationState['limit-remove-blocked'] || value === 0) {
285
+ if (!validationState['limit-remove-blocked'] || value === 0 || value === '') {
286
286
  options.unshift({
287
287
  value: 0,
288
288
  label: messages.get('label.responsible-gaming.option.no-limit')
@@ -319,6 +319,8 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
319
319
  }
320
320
  };
321
321
 
322
+ var isIphone = typeof window !== 'undefined' && navigator.platform === 'iPhone';
323
+
322
324
  return React.createElement(
323
325
  Fragment,
324
326
  null,
@@ -352,7 +354,7 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
352
354
  setValue(parseInt(value));
353
355
  if (value > 0) _onChange(value);
354
356
  },
355
- autoFocus: true,
357
+ autoFocus: !isIphone,
356
358
  min: validationState['limit-remove-blocked'] ? '1' : '0',
357
359
  max: validationState['limit-increase-blocked'] ? getByPath(currentLimit, 'Amount') : Infinity
358
360
  }),
@@ -19,10 +19,10 @@ import { FormattedRelativeTime } from 'react-intl';
19
19
  import getByPath from 'lodash/get';
20
20
  import PropTypes from 'prop-types';
21
21
  import Translate from '../../components/Translate';
22
- import { selectUnit } from '@formatjs/intl-utils';
23
22
  import { getKycType } from '../Verify/types';
24
23
  import { getKycReason } from '../Verify/reasons';
25
24
  import { getKycStatus } from '../Verify/status';
25
+ import { selectUnit } from '../../lib/utils/selectUnit';
26
26
 
27
27
  var UploadForm = function UploadForm(_ref) {
28
28
  var type = _ref.type,