tg-core-components 6.1.16-vega-integration.2 → 6.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/Money/index.js +24 -2
- package/es/misc/countryEmojiFlags.js +0 -5
- package/es/widgets/AccountDetail/index.js +8 -0
- package/es/widgets/ActivateWidget/index.js +1 -1
- package/es/widgets/BonusWidget/index.js +8 -7
- package/es/widgets/Cashier/Deposit/PaymentForm/index.js +2 -5
- package/es/widgets/Cashier/Payment/PaymentAccountForms/index.js +10 -41
- package/es/widgets/Cashier/Payment/PaymentAccountParser.js +0 -6
- package/es/widgets/CashierAccordion/Deposit/DepositWidget/index.js +5 -5
- package/es/widgets/CashierAccordion/Payment/PaymentAccountForms/index.js +62 -168
- package/es/widgets/CashierAccordion/Payment/PaymentAccountParser.js +0 -12
- package/es/widgets/CashierAccordion/Withdraw/WithdrawWidget/index.js +3 -2
- package/es/widgets/HistoryWidget/index.js +84 -20
- package/es/widgets/ResponsibleGamingWidget/Timespan.js +3 -5
- package/es/widgets/VerifyAccordionWidget/index.js +1 -1
- package/lib/components/Money/index.js +25 -2
- package/lib/misc/countryEmojiFlags.js +0 -5
- package/lib/widgets/AccountDetail/index.js +8 -0
- package/lib/widgets/ActivateWidget/index.js +1 -1
- package/lib/widgets/BonusWidget/index.js +8 -8
- package/lib/widgets/Cashier/Deposit/PaymentForm/index.js +2 -5
- package/lib/widgets/Cashier/Payment/PaymentAccountForms/index.js +11 -42
- package/lib/widgets/Cashier/Payment/PaymentAccountParser.js +0 -6
- package/lib/widgets/CashierAccordion/Deposit/DepositWidget/index.js +5 -5
- package/lib/widgets/CashierAccordion/Payment/PaymentAccountForms/index.js +63 -169
- package/lib/widgets/CashierAccordion/Payment/PaymentAccountParser.js +0 -12
- package/lib/widgets/CashierAccordion/Withdraw/WithdrawWidget/index.js +3 -2
- package/lib/widgets/HistoryWidget/index.js +87 -24
- package/lib/widgets/ResponsibleGamingWidget/Timespan.js +3 -5
- package/lib/widgets/VerifyAccordionWidget/index.js +3 -3
- package/package.json +2 -2
- package/es/lib/utils/selectUnit.js +0 -64
- package/es/widgets/BonusWidget/types.js +0 -23
- package/lib/lib/utils/selectUnit.js +0 -69
- package/lib/widgets/BonusWidget/types.js +0 -37
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.InteracWithdrawal = exports.PaysafecardWithdrawal = exports.InstadebitWithdrawal = exports.IDebitWithdrawal = exports.IdealWithdrawal = exports.EProPaymentWallWithdrawal = exports.EcoPayzWithdrawal = exports.TrustlyWithdrawal = exports.BankWithdrawal = exports.ZimplerWithdrawal = exports.MiFinityEWalletWithdrawal = exports.
|
|
6
|
+
exports.InteracWithdrawal = exports.PaysafecardWithdrawal = exports.InstadebitWithdrawal = exports.IDebitWithdrawal = exports.IdealWithdrawal = exports.EProPaymentWallWithdrawal = exports.EcoPayzWithdrawal = exports.TrustlyWithdrawal = exports.BankWithdrawal = exports.ZimplerWithdrawal = exports.MiFinityEWalletWithdrawal = exports.EzeeWalletWithdrawal = exports.AstroPayBankWithdrawal = exports.MuchBetterWithdrawal = exports.NetellerWithdrawal = exports.VenusPointWithdrawal = exports.CreditcardWithdrawal = exports.SkrillWithdrawal = exports.BankIBANWithdrawal = exports.BankLocalWithdrawal = exports.JetonWithdrawal = exports.CryptoCurrencyWithdrawal = exports.BestPayWithdrawal = exports.BankIntlWithdrawal = exports.MiFinityEWalletDeposit = exports.BankIntlDeposit = exports.BestPayDeposit = exports.FunangaDeposit = exports.PaysafecardDeposit = exports.InstadebitDeposit = exports.IDebitDeposit = exports.IdealDeposit = exports.EProPaymentWallDeposit = exports.EcoPayzDeposit = exports.TrustlyDeposit = exports.BankDeposit = exports.ZimplerDeposit = exports.EzeeWalletDeposit = exports.CryptoCurrencyDeposit = exports.AstroPayBankDeposit = exports.MobilePayDeposit = exports.PProDeposit = exports.MuchBetterDeposit = exports.SiruDeposit = exports.VenusPointDeposit = exports.NetellerDeposit = exports.CreditcardDeposit = exports.SkrillDeposit = undefined;
|
|
7
7
|
|
|
8
8
|
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"); } }; }();
|
|
9
9
|
|
|
@@ -229,34 +229,6 @@ var VenusPoint = function VenusPoint(_ref3) {
|
|
|
229
229
|
);
|
|
230
230
|
};
|
|
231
231
|
|
|
232
|
-
var Vega = function Vega(_ref4) {
|
|
233
|
-
var account = _ref4.account,
|
|
234
|
-
intl = _ref4.intl,
|
|
235
|
-
change = _ref4.change;
|
|
236
|
-
|
|
237
|
-
return _react2.default.createElement(
|
|
238
|
-
'div',
|
|
239
|
-
null,
|
|
240
|
-
_react2.default.createElement(_Input2.default, {
|
|
241
|
-
disabled: account.accountId,
|
|
242
|
-
name: 'username',
|
|
243
|
-
onChange: function onChange(e, username) {
|
|
244
|
-
return change('username', username);
|
|
245
|
-
},
|
|
246
|
-
value: account.maskedAccount,
|
|
247
|
-
label: (0, _translate2.default)({ id: 'cashier.details.username' }, intl)
|
|
248
|
-
}),
|
|
249
|
-
_react2.default.createElement(_Input2.default, {
|
|
250
|
-
type: 'password',
|
|
251
|
-
name: 'password',
|
|
252
|
-
onChange: function onChange(e, password) {
|
|
253
|
-
return change('password', password);
|
|
254
|
-
},
|
|
255
|
-
label: (0, _translate2.default)({ id: 'cashier.details.password' }, intl)
|
|
256
|
-
})
|
|
257
|
-
);
|
|
258
|
-
};
|
|
259
|
-
|
|
260
232
|
var PPro = function PPro() {
|
|
261
233
|
return _react2.default.createElement(
|
|
262
234
|
'div',
|
|
@@ -265,11 +237,11 @@ var PPro = function PPro() {
|
|
|
265
237
|
);
|
|
266
238
|
};
|
|
267
239
|
|
|
268
|
-
var PhoneNumber = function PhoneNumber(
|
|
269
|
-
var account =
|
|
270
|
-
intl =
|
|
271
|
-
change =
|
|
272
|
-
values =
|
|
240
|
+
var PhoneNumber = function PhoneNumber(_ref4) {
|
|
241
|
+
var account = _ref4.account,
|
|
242
|
+
intl = _ref4.intl,
|
|
243
|
+
change = _ref4.change,
|
|
244
|
+
values = _ref4.values;
|
|
273
245
|
|
|
274
246
|
return _react2.default.createElement(
|
|
275
247
|
'div',
|
|
@@ -287,11 +259,11 @@ var PhoneNumber = function PhoneNumber(_ref5) {
|
|
|
287
259
|
);
|
|
288
260
|
};
|
|
289
261
|
|
|
290
|
-
var Email = function Email(
|
|
291
|
-
var account =
|
|
292
|
-
intl =
|
|
293
|
-
change =
|
|
294
|
-
values =
|
|
262
|
+
var Email = function Email(_ref5) {
|
|
263
|
+
var account = _ref5.account,
|
|
264
|
+
intl = _ref5.intl,
|
|
265
|
+
change = _ref5.change,
|
|
266
|
+
values = _ref5.values;
|
|
295
267
|
|
|
296
268
|
return _react2.default.createElement(
|
|
297
269
|
'div',
|
|
@@ -309,10 +281,10 @@ var Email = function Email(_ref6) {
|
|
|
309
281
|
);
|
|
310
282
|
};
|
|
311
283
|
|
|
312
|
-
var Banklocal = function Banklocal(
|
|
313
|
-
var account =
|
|
314
|
-
intl =
|
|
315
|
-
change =
|
|
284
|
+
var Banklocal = function Banklocal(_ref6) {
|
|
285
|
+
var account = _ref6.account,
|
|
286
|
+
intl = _ref6.intl,
|
|
287
|
+
change = _ref6.change;
|
|
316
288
|
|
|
317
289
|
return _react2.default.createElement(
|
|
318
290
|
'div',
|
|
@@ -332,17 +304,17 @@ var Banklocal = function Banklocal(_ref7) {
|
|
|
332
304
|
return change('accountNumber', accountNumber);
|
|
333
305
|
},
|
|
334
306
|
name: 'accountNumber',
|
|
335
|
-
label: (0, _translate2.default)({ id: 'cashier.details.
|
|
307
|
+
label: (0, _translate2.default)({ id: 'cashier.details.accountNumber' }, intl),
|
|
336
308
|
disabled: account.accountId
|
|
337
309
|
})
|
|
338
310
|
);
|
|
339
311
|
};
|
|
340
312
|
|
|
341
|
-
var BankIBAN = function BankIBAN(
|
|
342
|
-
var account =
|
|
343
|
-
intl =
|
|
344
|
-
change =
|
|
345
|
-
values =
|
|
313
|
+
var BankIBAN = function BankIBAN(_ref7) {
|
|
314
|
+
var account = _ref7.account,
|
|
315
|
+
intl = _ref7.intl,
|
|
316
|
+
change = _ref7.change,
|
|
317
|
+
values = _ref7.values;
|
|
346
318
|
|
|
347
319
|
return _react2.default.createElement(
|
|
348
320
|
'div',
|
|
@@ -388,15 +360,15 @@ var BankIBAN = function BankIBAN(_ref8) {
|
|
|
388
360
|
);
|
|
389
361
|
};
|
|
390
362
|
|
|
391
|
-
var AstroPayBank = function AstroPayBank(
|
|
392
|
-
var account =
|
|
393
|
-
intl =
|
|
394
|
-
country =
|
|
395
|
-
method =
|
|
396
|
-
detail =
|
|
397
|
-
change =
|
|
398
|
-
values =
|
|
399
|
-
config =
|
|
363
|
+
var AstroPayBank = function AstroPayBank(_ref8) {
|
|
364
|
+
var account = _ref8.account,
|
|
365
|
+
intl = _ref8.intl,
|
|
366
|
+
country = _ref8.country,
|
|
367
|
+
method = _ref8.method,
|
|
368
|
+
detail = _ref8.detail,
|
|
369
|
+
change = _ref8.change,
|
|
370
|
+
values = _ref8.values,
|
|
371
|
+
config = _ref8.config;
|
|
400
372
|
|
|
401
373
|
var _useState = (0, _react.useState)([]),
|
|
402
374
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -601,12 +573,12 @@ var AstroPayBank = function AstroPayBank(_ref9) {
|
|
|
601
573
|
);
|
|
602
574
|
};
|
|
603
575
|
|
|
604
|
-
var BankIntl = function BankIntl(
|
|
605
|
-
var account =
|
|
606
|
-
intl =
|
|
607
|
-
values =
|
|
608
|
-
change =
|
|
609
|
-
country =
|
|
576
|
+
var BankIntl = function BankIntl(_ref9) {
|
|
577
|
+
var account = _ref9.account,
|
|
578
|
+
intl = _ref9.intl,
|
|
579
|
+
values = _ref9.values,
|
|
580
|
+
change = _ref9.change,
|
|
581
|
+
country = _ref9.country;
|
|
610
582
|
|
|
611
583
|
return _react2.default.createElement(
|
|
612
584
|
'div',
|
|
@@ -618,7 +590,7 @@ var BankIntl = function BankIntl(_ref10) {
|
|
|
618
590
|
onChange: function onChange(e, accountNumber) {
|
|
619
591
|
return change('accountNumber', accountNumber);
|
|
620
592
|
},
|
|
621
|
-
label: (0, _translate2.default)({ id: 'cashier.details.
|
|
593
|
+
label: (0, _translate2.default)({ id: 'cashier.details.accountNumber' }, intl),
|
|
622
594
|
disabled: account.accountId
|
|
623
595
|
}),
|
|
624
596
|
_react2.default.createElement(_Input2.default, {
|
|
@@ -658,12 +630,12 @@ var BankIntl = function BankIntl(_ref10) {
|
|
|
658
630
|
);
|
|
659
631
|
};
|
|
660
632
|
|
|
661
|
-
var CryptoCurrency = function CryptoCurrency(
|
|
662
|
-
var intl =
|
|
663
|
-
detail =
|
|
664
|
-
method =
|
|
665
|
-
values =
|
|
666
|
-
change =
|
|
633
|
+
var CryptoCurrency = function CryptoCurrency(_ref10) {
|
|
634
|
+
var intl = _ref10.intl,
|
|
635
|
+
detail = _ref10.detail,
|
|
636
|
+
method = _ref10.method,
|
|
637
|
+
values = _ref10.values,
|
|
638
|
+
change = _ref10.change;
|
|
667
639
|
|
|
668
640
|
var methodDetails = {
|
|
669
641
|
cryptoCurrencies: (0, _get2.default)(detail, 'config.cryptoCurrencies', [])
|
|
@@ -716,11 +688,11 @@ var CryptoCurrency = function CryptoCurrency(_ref11) {
|
|
|
716
688
|
);
|
|
717
689
|
};
|
|
718
690
|
|
|
719
|
-
var Jeton = function Jeton(
|
|
720
|
-
var account =
|
|
721
|
-
intl =
|
|
722
|
-
values =
|
|
723
|
-
change =
|
|
691
|
+
var Jeton = function Jeton(_ref11) {
|
|
692
|
+
var account = _ref11.account,
|
|
693
|
+
intl = _ref11.intl,
|
|
694
|
+
values = _ref11.values,
|
|
695
|
+
change = _ref11.change;
|
|
724
696
|
|
|
725
697
|
return _react2.default.createElement(
|
|
726
698
|
'div',
|
|
@@ -738,11 +710,11 @@ var Jeton = function Jeton(_ref12) {
|
|
|
738
710
|
);
|
|
739
711
|
};
|
|
740
712
|
|
|
741
|
-
var BestPay = function BestPay(
|
|
742
|
-
var account =
|
|
743
|
-
intl =
|
|
744
|
-
values =
|
|
745
|
-
change =
|
|
713
|
+
var BestPay = function BestPay(_ref12) {
|
|
714
|
+
var account = _ref12.account,
|
|
715
|
+
intl = _ref12.intl,
|
|
716
|
+
values = _ref12.values,
|
|
717
|
+
change = _ref12.change;
|
|
746
718
|
|
|
747
719
|
return _react2.default.createElement(
|
|
748
720
|
'div',
|
|
@@ -769,11 +741,11 @@ var BestPay = function BestPay(_ref13) {
|
|
|
769
741
|
);
|
|
770
742
|
};
|
|
771
743
|
|
|
772
|
-
var Mifinity = function Mifinity(
|
|
773
|
-
var account =
|
|
774
|
-
intl =
|
|
775
|
-
change =
|
|
776
|
-
values =
|
|
744
|
+
var Mifinity = function Mifinity(_ref13) {
|
|
745
|
+
var account = _ref13.account,
|
|
746
|
+
intl = _ref13.intl,
|
|
747
|
+
change = _ref13.change,
|
|
748
|
+
values = _ref13.values;
|
|
777
749
|
|
|
778
750
|
return _react2.default.createElement(
|
|
779
751
|
'div',
|
|
@@ -791,11 +763,11 @@ var Mifinity = function Mifinity(_ref14) {
|
|
|
791
763
|
);
|
|
792
764
|
};
|
|
793
765
|
|
|
794
|
-
var EzeeWallet = function EzeeWallet(
|
|
795
|
-
var account =
|
|
796
|
-
intl =
|
|
797
|
-
method =
|
|
798
|
-
change =
|
|
766
|
+
var EzeeWallet = function EzeeWallet(_ref14) {
|
|
767
|
+
var account = _ref14.account,
|
|
768
|
+
intl = _ref14.intl,
|
|
769
|
+
method = _ref14.method,
|
|
770
|
+
change = _ref14.change;
|
|
799
771
|
|
|
800
772
|
return _react2.default.createElement(
|
|
801
773
|
'div',
|
|
@@ -828,69 +800,6 @@ var EzeeWallet = function EzeeWallet(_ref15) {
|
|
|
828
800
|
);
|
|
829
801
|
};
|
|
830
802
|
|
|
831
|
-
var Paramount = function Paramount(_ref16) {
|
|
832
|
-
var account = _ref16.account,
|
|
833
|
-
intl = _ref16.intl,
|
|
834
|
-
values = _ref16.values,
|
|
835
|
-
change = _ref16.change,
|
|
836
|
-
detail = _ref16.detail;
|
|
837
|
-
|
|
838
|
-
var methodDetails = {
|
|
839
|
-
securityQuestions: (0, _get2.default)(detail, 'config.securityQuestions', [])
|
|
840
|
-
};
|
|
841
|
-
|
|
842
|
-
return _react2.default.createElement(
|
|
843
|
-
'div',
|
|
844
|
-
{ className: 'payment-account-info' },
|
|
845
|
-
methodDetails.securityQuestions.length > 0 && _react2.default.createElement(
|
|
846
|
-
_Select2.default,
|
|
847
|
-
{
|
|
848
|
-
required: true,
|
|
849
|
-
disabled: account.accountId,
|
|
850
|
-
name: 'securityQuestion',
|
|
851
|
-
value: values['securityQuestion'],
|
|
852
|
-
onChange: function onChange(_, securityQuestion) {
|
|
853
|
-
return change('securityQuestion', securityQuestion);
|
|
854
|
-
},
|
|
855
|
-
label: (0, _translate2.default)({
|
|
856
|
-
id: 'cashier.details.securityQuestion',
|
|
857
|
-
defaultMessage: 'Security question'
|
|
858
|
-
}, intl) },
|
|
859
|
-
!values['securityQuestion'] && _react2.default.createElement(
|
|
860
|
-
_Select2.default.Option,
|
|
861
|
-
{ value: '', selected: true, disabled: true },
|
|
862
|
-
(0, _translate2.default)({
|
|
863
|
-
id: 'cashier.details.select-securityQuestion',
|
|
864
|
-
defaultMessage: 'Select security question'
|
|
865
|
-
}, intl)
|
|
866
|
-
),
|
|
867
|
-
methodDetails.securityQuestions.map(function (securityQuestion) {
|
|
868
|
-
return _react2.default.createElement(
|
|
869
|
-
_Select2.default.Option,
|
|
870
|
-
{ value: securityQuestion.value },
|
|
871
|
-
(0, _translate2.default)({
|
|
872
|
-
id: securityQuestion.id,
|
|
873
|
-
defaultMessage: securityQuestion.value
|
|
874
|
-
}, intl)
|
|
875
|
-
);
|
|
876
|
-
})
|
|
877
|
-
),
|
|
878
|
-
_react2.default.createElement(_Input2.default, {
|
|
879
|
-
required: true,
|
|
880
|
-
type: 'password',
|
|
881
|
-
name: 'securityAnswer',
|
|
882
|
-
value: values['securityAnswer'],
|
|
883
|
-
onChange: function onChange(_, securityAnswer) {
|
|
884
|
-
return change('securityAnswer', securityAnswer);
|
|
885
|
-
},
|
|
886
|
-
label: (0, _translate2.default)({
|
|
887
|
-
id: 'cashier.details.securityAnswer',
|
|
888
|
-
defaultMessage: 'Security answer'
|
|
889
|
-
}, intl)
|
|
890
|
-
})
|
|
891
|
-
);
|
|
892
|
-
};
|
|
893
|
-
|
|
894
803
|
var SkrillDeposit = exports.SkrillDeposit = {
|
|
895
804
|
component: (0, _reactIntl.injectIntl)(Email),
|
|
896
805
|
parser: Parser.parseEmail
|
|
@@ -911,11 +820,6 @@ var VenusPointDeposit = exports.VenusPointDeposit = {
|
|
|
911
820
|
parser: Parser.parseVenusPoint
|
|
912
821
|
};
|
|
913
822
|
|
|
914
|
-
var VegaDeposit = exports.VegaDeposit = {
|
|
915
|
-
component: injectMethod('deposit', (0, _reactIntl.injectIntl)(Vega)),
|
|
916
|
-
parser: Parser.parseVega
|
|
917
|
-
};
|
|
918
|
-
|
|
919
823
|
var SiruDeposit = exports.SiruDeposit = {
|
|
920
824
|
component: (0, _reactIntl.injectIntl)(PhoneNumber),
|
|
921
825
|
parser: Parser.parsePhoneNumber
|
|
@@ -1023,11 +927,6 @@ var VenusPointWithdrawal = exports.VenusPointWithdrawal = {
|
|
|
1023
927
|
parser: Parser.parseVenusPoint
|
|
1024
928
|
};
|
|
1025
929
|
|
|
1026
|
-
var VegaWithdrawal = exports.VegaWithdrawal = {
|
|
1027
|
-
component: injectMethod('withdraw', (0, _reactIntl.injectIntl)(Vega)),
|
|
1028
|
-
parser: Parser.parseVega
|
|
1029
|
-
};
|
|
1030
|
-
|
|
1031
930
|
var NetellerWithdrawal = exports.NetellerWithdrawal = {
|
|
1032
931
|
component: injectMethod({ method: 'withdraw' }, (0, _reactIntl.injectIntl)(Neteller)),
|
|
1033
932
|
parser: Parser.parseNeteller
|
|
@@ -1062,11 +961,6 @@ var EzeeWalletWithdrawal = exports.EzeeWalletWithdrawal = {
|
|
|
1062
961
|
parser: _identity2.default
|
|
1063
962
|
};
|
|
1064
963
|
|
|
1065
|
-
var ParamountWithdrawal = exports.ParamountWithdrawal = {
|
|
1066
|
-
component: (0, _reactIntl.injectIntl)(Paramount),
|
|
1067
|
-
parser: Parser.parseParamount
|
|
1068
|
-
};
|
|
1069
|
-
|
|
1070
964
|
var MiFinityEWalletWithdrawal = exports.MiFinityEWalletWithdrawal = {
|
|
1071
965
|
component: (0, _reactIntl.injectIntl)(Mifinity),
|
|
1072
966
|
parser: _identity2.default
|
|
@@ -44,20 +44,8 @@ var parseVenusPoint = exports.parseVenusPoint = function parseVenusPoint(account
|
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
var parseVega = exports.parseVega = function parseVega(account) {
|
|
48
|
-
return {
|
|
49
|
-
account: account.maskedAccount || account.account
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
|
|
53
47
|
var parseMifinity = exports.parseMifinity = function parseMifinity(account) {
|
|
54
48
|
return {
|
|
55
49
|
account: account.maskedAccount || account.account
|
|
56
50
|
};
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
var parseParamount = exports.parseParamount = function parseParamount(account) {
|
|
60
|
-
return {
|
|
61
|
-
securityQuestion: account.maskedAccount || account.account
|
|
62
|
-
};
|
|
63
51
|
};
|
|
@@ -198,7 +198,8 @@ var WithdrawWidget = function (_PureComponent) {
|
|
|
198
198
|
if (amount === undefined) {
|
|
199
199
|
return errors;
|
|
200
200
|
}
|
|
201
|
-
|
|
201
|
+
|
|
202
|
+
if (Number(amount) < parseFloat(selectedMethod.limit.min)) {
|
|
202
203
|
errors.amount.push(_react2.default.createElement(_Translate2.default, {
|
|
203
204
|
id: 'error.cashier.amount-below-method-limit',
|
|
204
205
|
defaultMessage: 'Amount is too low.'
|
|
@@ -206,7 +207,7 @@ var WithdrawWidget = function (_PureComponent) {
|
|
|
206
207
|
return errors;
|
|
207
208
|
}
|
|
208
209
|
|
|
209
|
-
if (Number(amount) > parseFloat(
|
|
210
|
+
if (Number(amount) > parseFloat(selectedMethod.limit.max)) {
|
|
210
211
|
errors.amount.push(_react2.default.createElement(_Translate2.default, {
|
|
211
212
|
id: 'error.cashier.amount-above-method-limit',
|
|
212
213
|
defaultMessage: 'Amount is too high.'
|
|
@@ -44,8 +44,6 @@ var _Translate2 = _interopRequireDefault(_Translate);
|
|
|
44
44
|
|
|
45
45
|
var _message = require('./message');
|
|
46
46
|
|
|
47
|
-
var _selectUnit = require('../../lib/utils/selectUnit');
|
|
48
|
-
|
|
49
47
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
50
48
|
|
|
51
49
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -54,6 +52,71 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
|
|
|
54
52
|
|
|
55
53
|
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; }
|
|
56
54
|
|
|
55
|
+
var MILISECONDS = {
|
|
56
|
+
IN_A_SECOND: 1000,
|
|
57
|
+
IN_A_MINUTE: 60000,
|
|
58
|
+
IN_AN_HOUR: 3600000,
|
|
59
|
+
IN_A_DAY: 86400000,
|
|
60
|
+
IN_A_WEEK: 604800000,
|
|
61
|
+
IN_A_MONTH: 2628000000,
|
|
62
|
+
IN_A_YEAR: 31536000000
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
var selectUnit = function selectUnit(from) {
|
|
66
|
+
var now = Date.now();
|
|
67
|
+
var ms = now - from;
|
|
68
|
+
|
|
69
|
+
switch (true) {
|
|
70
|
+
case MILISECONDS.IN_A_SECOND < ms && ms < MILISECONDS.IN_A_MINUTE:
|
|
71
|
+
return {
|
|
72
|
+
value: -1 * Math.floor(ms / MILISECONDS.IN_A_SECOND),
|
|
73
|
+
unit: 'second',
|
|
74
|
+
updateIntervalInSeconds: 1
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
case MILISECONDS.IN_A_MINUTE < ms && ms < MILISECONDS.IN_AN_HOUR:
|
|
78
|
+
return {
|
|
79
|
+
value: -1 * Math.floor(ms / MILISECONDS.IN_A_MINUTE),
|
|
80
|
+
unit: 'minute'
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
case MILISECONDS.IN_AN_HOUR < ms && ms < MILISECONDS.IN_A_DAY:
|
|
84
|
+
return {
|
|
85
|
+
value: -1 * Math.floor(ms / MILISECONDS.IN_AN_HOUR),
|
|
86
|
+
unit: 'hour'
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
case MILISECONDS.IN_A_DAY < ms && ms < MILISECONDS.IN_A_WEEK:
|
|
90
|
+
return {
|
|
91
|
+
value: -1 * Math.floor(ms / MILISECONDS.IN_A_DAY),
|
|
92
|
+
unit: 'day'
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
case MILISECONDS.IN_A_WEEK < ms && ms < MILISECONDS.IN_A_MONTH:
|
|
96
|
+
return {
|
|
97
|
+
value: -1 * Math.floor(ms / MILISECONDS.IN_A_WEEK),
|
|
98
|
+
unit: 'week'
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
case MILISECONDS.IN_A_MONTH < ms && ms < MILISECONDS.IN_A_YEAR:
|
|
102
|
+
return {
|
|
103
|
+
value: -1 * Math.floor(ms / MILISECONDS.IN_A_MONTH),
|
|
104
|
+
unit: 'month'
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
case MILISECONDS.IN_A_YEAR < ms:
|
|
108
|
+
return {
|
|
109
|
+
value: -1 * Math.floor(ms / MILISECONDS.IN_A_YEAR),
|
|
110
|
+
unit: 'year'
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
default:
|
|
114
|
+
return {
|
|
115
|
+
value: 0
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
|
|
57
120
|
var HistoryWidgetList = function (_React$Component) {
|
|
58
121
|
_inherits(HistoryWidgetList, _React$Component);
|
|
59
122
|
|
|
@@ -80,7 +143,7 @@ var HistoryWidgetList = function (_React$Component) {
|
|
|
80
143
|
minute: '2-digit',
|
|
81
144
|
second: '2-digit'
|
|
82
145
|
});
|
|
83
|
-
}, _this.createListInfo = function (item, product,
|
|
146
|
+
}, _this.createListInfo = function (item, product, isLoading) {
|
|
84
147
|
if (isLoading) return [[_react2.default.createElement(_Skeleton.SkeletonLine, { bold: true }), _react2.default.createElement(_Skeleton.SkeletonLine, null)], [_react2.default.createElement(_Skeleton.SkeletonLine, { bold: true }), _react2.default.createElement(_Skeleton.SkeletonLine, null)]];
|
|
85
148
|
|
|
86
149
|
if (product === 'casino') {
|
|
@@ -92,7 +155,7 @@ var HistoryWidgetList = function (_React$Component) {
|
|
|
92
155
|
'div',
|
|
93
156
|
null,
|
|
94
157
|
(0, _message.getMessage)((0, _get2.default)(item, 'Transactions[0].Status'))
|
|
95
|
-
)], [_react2.default.createElement(_Money2.default, { value: item.Win - item.Bet, currency:
|
|
158
|
+
)], [_react2.default.createElement(_Money2.default, { value: item.Win - item.Bet, currency: item.Currency }), _react2.default.createElement(_reactIntl.FormattedRelativeTime, selectUnit(new Date(item.StartTime + '+00:00')))]];
|
|
96
159
|
} else if (product === 'sportsbook') {
|
|
97
160
|
var selection = item.Transactions[0].Description;
|
|
98
161
|
var odds = item.Transactions[0].Odds;
|
|
@@ -108,7 +171,10 @@ var HistoryWidgetList = function (_React$Component) {
|
|
|
108
171
|
'div',
|
|
109
172
|
null,
|
|
110
173
|
(0, _message.getMessage)(item.Settled ? 'settled' : 'pendling')
|
|
111
|
-
)], [_react2.default.createElement(_Money2.default, {
|
|
174
|
+
)], [_react2.default.createElement(_Money2.default, {
|
|
175
|
+
value: item.TotalWin - item.TotalWager,
|
|
176
|
+
currency: item.Currency
|
|
177
|
+
}), _react2.default.createElement(_reactIntl.FormattedRelativeTime, selectUnit(new Date(item.Created + '+00:00')))]];
|
|
112
178
|
} else if (product === 'bingo') {
|
|
113
179
|
return [[_react2.default.createElement(_Translate2.default, {
|
|
114
180
|
tag: 'div'
|
|
@@ -120,8 +186,8 @@ var HistoryWidgetList = function (_React$Component) {
|
|
|
120
186
|
(0, _message.getMessage)((0, _get2.default)(item, 'Transactions[0].TransactionType'))
|
|
121
187
|
)], [_react2.default.createElement(_Money2.default, {
|
|
122
188
|
value: (0, _get2.default)(item, 'Transactions[0].Amount'),
|
|
123
|
-
currency:
|
|
124
|
-
}), _react2.default.createElement(_reactIntl.FormattedRelativeTime,
|
|
189
|
+
currency: item.Currency
|
|
190
|
+
}), _react2.default.createElement(_reactIntl.FormattedRelativeTime, selectUnit(new Date(item.Created + '+00:00')))]];
|
|
125
191
|
} else if (product === 'fantasy') {
|
|
126
192
|
return [[_react2.default.createElement(
|
|
127
193
|
'div',
|
|
@@ -135,8 +201,8 @@ var HistoryWidgetList = function (_React$Component) {
|
|
|
135
201
|
(0, _message.getMessage)(item.Status === 'Default' ? 'initiated' : item.Status === 'Canceled' ? 'canceled' : 'completed')
|
|
136
202
|
)], [_react2.default.createElement(_Money2.default, {
|
|
137
203
|
value: item.Win - (item.Bet + item.Rake),
|
|
138
|
-
currency:
|
|
139
|
-
}), _react2.default.createElement(_reactIntl.FormattedRelativeTime,
|
|
204
|
+
currency: item.Currency
|
|
205
|
+
}), _react2.default.createElement(_reactIntl.FormattedRelativeTime, selectUnit(new Date(item.Created + '+00:00')))]];
|
|
140
206
|
}
|
|
141
207
|
|
|
142
208
|
return [[_react2.default.createElement(
|
|
@@ -149,9 +215,9 @@ var HistoryWidgetList = function (_React$Component) {
|
|
|
149
215
|
(0, _message.getMessage)(item.Status)
|
|
150
216
|
)], [_react2.default.createElement(_Money2.default, {
|
|
151
217
|
value: item.TransactionType === 'Withdraw' ? -item.Amount : item.Amount,
|
|
152
|
-
currency:
|
|
153
|
-
}), _react2.default.createElement(_reactIntl.FormattedRelativeTime,
|
|
154
|
-
}, _this.createListDetail = function (item, product
|
|
218
|
+
currency: item.Currency
|
|
219
|
+
}), _react2.default.createElement(_reactIntl.FormattedRelativeTime, selectUnit(new Date(item.Started + '+00:00')))]];
|
|
220
|
+
}, _this.createListDetail = function (item, product) {
|
|
155
221
|
if (product === 'casino') {
|
|
156
222
|
return [[_react2.default.createElement(
|
|
157
223
|
'div',
|
|
@@ -163,14 +229,14 @@ var HistoryWidgetList = function (_React$Component) {
|
|
|
163
229
|
id: 'label.history.bet',
|
|
164
230
|
defaultMessage: 'Bet: {value}',
|
|
165
231
|
values: {
|
|
166
|
-
value: _react2.default.createElement(_Money2.default, { value: item.Bet, currency:
|
|
232
|
+
value: _react2.default.createElement(_Money2.default, { value: item.Bet, currency: item.Currency })
|
|
167
233
|
}
|
|
168
234
|
}), _react2.default.createElement(_Translate2.default, {
|
|
169
235
|
tag: 'div',
|
|
170
236
|
id: 'label.history.win',
|
|
171
237
|
defaultMessage: 'Win: {value}',
|
|
172
238
|
values: {
|
|
173
|
-
value: _react2.default.createElement(_Money2.default, { value: item.Win, currency:
|
|
239
|
+
value: _react2.default.createElement(_Money2.default, { value: item.Win, currency: item.Currency })
|
|
174
240
|
}
|
|
175
241
|
})]];
|
|
176
242
|
} else if (product === 'sportsbook') {
|
|
@@ -199,14 +265,14 @@ var HistoryWidgetList = function (_React$Component) {
|
|
|
199
265
|
id: 'label.history.bet',
|
|
200
266
|
defaultMessage: 'Bet: {value}',
|
|
201
267
|
values: {
|
|
202
|
-
value: _react2.default.createElement(_Money2.default, { value: item.TotalWager, currency:
|
|
268
|
+
value: _react2.default.createElement(_Money2.default, { value: item.TotalWager, currency: item.Currency })
|
|
203
269
|
}
|
|
204
270
|
}), _react2.default.createElement(_Translate2.default, {
|
|
205
271
|
tag: 'div',
|
|
206
272
|
id: 'label.history.win',
|
|
207
273
|
defaultMessage: 'Win: {value}',
|
|
208
274
|
values: {
|
|
209
|
-
value: _react2.default.createElement(_Money2.default, { value: item.TotalWin, currency:
|
|
275
|
+
value: _react2.default.createElement(_Money2.default, { value: item.TotalWin, currency: item.Currency })
|
|
210
276
|
}
|
|
211
277
|
})]];
|
|
212
278
|
} else if (product === 'bingo') {
|
|
@@ -239,14 +305,14 @@ var HistoryWidgetList = function (_React$Component) {
|
|
|
239
305
|
id: 'label.history.bet',
|
|
240
306
|
defaultMessage: 'Bet: {value}',
|
|
241
307
|
values: {
|
|
242
|
-
value: _react2.default.createElement(_Money2.default, { value: item.Bet + item.Rake, currency:
|
|
308
|
+
value: _react2.default.createElement(_Money2.default, { value: item.Bet + item.Rake, currency: item.Currency })
|
|
243
309
|
}
|
|
244
310
|
}), _react2.default.createElement(_Translate2.default, {
|
|
245
311
|
tag: 'div',
|
|
246
312
|
id: 'label.history.win',
|
|
247
313
|
defaultMessage: 'Win: {value}',
|
|
248
314
|
values: {
|
|
249
|
-
value: _react2.default.createElement(_Money2.default, { value: item.Win, currency:
|
|
315
|
+
value: _react2.default.createElement(_Money2.default, { value: item.Win, currency: item.Currency })
|
|
250
316
|
}
|
|
251
317
|
})]];
|
|
252
318
|
}
|
|
@@ -308,8 +374,7 @@ var HistoryWidgetList = function (_React$Component) {
|
|
|
308
374
|
var _props = this.props,
|
|
309
375
|
items = _props.items,
|
|
310
376
|
product = _props.product,
|
|
311
|
-
limit = _props.limit
|
|
312
|
-
currency = _props.currency;
|
|
377
|
+
limit = _props.limit;
|
|
313
378
|
var page = this.state.page;
|
|
314
379
|
|
|
315
380
|
|
|
@@ -318,8 +383,8 @@ var HistoryWidgetList = function (_React$Component) {
|
|
|
318
383
|
var listItems = pageItems.map(function (item) {
|
|
319
384
|
return {
|
|
320
385
|
id: item,
|
|
321
|
-
info: _this2.createListInfo(item, product,
|
|
322
|
-
detail: _this2.createListDetail(item, product,
|
|
386
|
+
info: _this2.createListInfo(item, product, items.isLoading),
|
|
387
|
+
detail: _this2.createListDetail(item, product, items.isLoading)
|
|
323
388
|
};
|
|
324
389
|
});
|
|
325
390
|
|
|
@@ -366,7 +431,6 @@ var HistoryWidget = function HistoryWidget(_ref2) {
|
|
|
366
431
|
var getTransactions = _ref2.getTransactions,
|
|
367
432
|
items = _ref2.items,
|
|
368
433
|
products = _ref2.products,
|
|
369
|
-
currency = _ref2.currency,
|
|
370
434
|
limit = _ref2.limit;
|
|
371
435
|
|
|
372
436
|
var accordionItems = products.map(function (product) {
|
|
@@ -374,7 +438,6 @@ var HistoryWidget = function HistoryWidget(_ref2) {
|
|
|
374
438
|
header: (0, _message.getMessage)(product),
|
|
375
439
|
content: _react2.default.createElement(HistoryWidgetList, {
|
|
376
440
|
product: product,
|
|
377
|
-
currency: currency,
|
|
378
441
|
limit: limit,
|
|
379
442
|
getTransactions: getTransactions[product],
|
|
380
443
|
items: items[product]
|
|
@@ -282,7 +282,7 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
|
|
|
282
282
|
setValue = _useState2[1];
|
|
283
283
|
|
|
284
284
|
(0, _react.useEffect)(function () {
|
|
285
|
-
if (newLimit) {
|
|
285
|
+
if (newLimit && newLimit.Amount) {
|
|
286
286
|
setValue(newLimit.Amount);
|
|
287
287
|
}
|
|
288
288
|
}, [newLimit]);
|
|
@@ -313,7 +313,7 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
|
|
|
313
313
|
});
|
|
314
314
|
}
|
|
315
315
|
// If not blocked from removing limit or 'No limit' option is selected -> add 'No limit' option
|
|
316
|
-
if (!validationState['limit-remove-blocked'] || value === 0
|
|
316
|
+
if (!validationState['limit-remove-blocked'] || value === 0) {
|
|
317
317
|
options.unshift({
|
|
318
318
|
value: 0,
|
|
319
319
|
label: messages.get('label.responsible-gaming.option.no-limit')
|
|
@@ -350,8 +350,6 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
|
|
|
350
350
|
}
|
|
351
351
|
};
|
|
352
352
|
|
|
353
|
-
var isIphone = typeof window !== 'undefined' && navigator.platform === 'iPhone';
|
|
354
|
-
|
|
355
353
|
return _react2.default.createElement(
|
|
356
354
|
_react.Fragment,
|
|
357
355
|
null,
|
|
@@ -385,7 +383,7 @@ var DefaultTimespan = function DefaultTimespan(_ref10) {
|
|
|
385
383
|
setValue(parseInt(value));
|
|
386
384
|
if (value > 0) _onChange(value);
|
|
387
385
|
},
|
|
388
|
-
autoFocus:
|
|
386
|
+
autoFocus: true,
|
|
389
387
|
min: validationState['limit-remove-blocked'] ? '1' : '0',
|
|
390
388
|
max: validationState['limit-increase-blocked'] ? (0, _get2.default)(currentLimit, 'Amount') : Infinity
|
|
391
389
|
}),
|