tg-core-components 6.0.2 → 6.0.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.
- package/es/widgets/BonusWidget/BonusCode.js +2 -2
- package/es/widgets/CashierAccordion/Deposit/DepositWidget/index.js +27 -54
- package/es/widgets/CashierAccordion/Payment/PaymentAccountForms/index.js +8 -1
- package/lib/widgets/BonusWidget/BonusCode.js +2 -2
- package/lib/widgets/CashierAccordion/Deposit/DepositWidget/index.js +27 -54
- package/lib/widgets/CashierAccordion/Payment/PaymentAccountForms/index.js +8 -1
- package/package.json +2 -2
|
@@ -75,10 +75,10 @@ var BonusCodeForm = function BonusCodeForm(_ref3) {
|
|
|
75
75
|
);
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
-
BonusCodeForm = compose(WithValidation(rules), injectIntl)(BonusCodeForm);
|
|
79
|
-
|
|
80
78
|
var rules = {
|
|
81
79
|
bonusCode: [[require, 'error.empty.bonusCode']]
|
|
82
80
|
};
|
|
83
81
|
|
|
82
|
+
BonusCodeForm = compose(WithValidation(rules), injectIntl)(BonusCodeForm);
|
|
83
|
+
|
|
84
84
|
export default Bonus;
|
|
@@ -544,45 +544,18 @@ var DepositWidget = function (_Component) {
|
|
|
544
544
|
var _initialiseProps = function _initialiseProps() {
|
|
545
545
|
var _this3 = this;
|
|
546
546
|
|
|
547
|
-
this.componentDidUpdate = function (prevProps) {
|
|
548
|
-
if (prevProps.shouldRenderSgaWarning !== _this3.props.shouldRenderSgaWarning) {
|
|
549
|
-
var _state2 = _this3.state,
|
|
550
|
-
currentAmount = _state2.currentAmount,
|
|
551
|
-
bonusCode = _state2.bonusCode;
|
|
552
|
-
|
|
553
|
-
_this3.handleNextStep({ amount: currentAmount, bonusCode: bonusCode });
|
|
554
|
-
}
|
|
555
|
-
};
|
|
556
|
-
|
|
557
547
|
this.handleNextStep = function (_ref6) {
|
|
558
548
|
var amount = _ref6.amount,
|
|
559
549
|
bonusCode = _ref6.bonusCode;
|
|
560
|
-
var
|
|
561
|
-
selectedMethod =
|
|
562
|
-
preDepositBonus =
|
|
563
|
-
selectedAccount =
|
|
564
|
-
var _props2 = _this3.props,
|
|
565
|
-
paymentStats = _props2.paymentStats,
|
|
566
|
-
renderSgaWarningPopup = _props2.renderSgaWarningPopup,
|
|
567
|
-
shouldRenderSgaWarning = _props2.shouldRenderSgaWarning;
|
|
550
|
+
var _state2 = _this3.state,
|
|
551
|
+
selectedMethod = _state2.selectedMethod,
|
|
552
|
+
preDepositBonus = _state2.preDepositBonus,
|
|
553
|
+
selectedAccount = _state2.selectedAccount;
|
|
568
554
|
|
|
569
555
|
|
|
570
556
|
var formExists = !!PaymentAccountForms[getPaymentForm(selectedMethod)];
|
|
571
557
|
var skipFillInStep = ['skrill', 'bestpay', 'jeton', 'bankiban', 'bankintl'];
|
|
572
558
|
|
|
573
|
-
var remainingAmount = 5000 - Number(paymentStats.TotalDepositLast7Days);
|
|
574
|
-
var renderSgaWarning = shouldRenderSgaWarning && Number(paymentStats.TotalDepositLast7Days) + Number(amount) > 5000;
|
|
575
|
-
|
|
576
|
-
if (renderSgaWarning) {
|
|
577
|
-
_this3.setState({
|
|
578
|
-
buttonLoading: null,
|
|
579
|
-
currentAmount: amount,
|
|
580
|
-
bonusCode: bonusCode
|
|
581
|
-
});
|
|
582
|
-
renderSgaWarningPopup(remainingAmount);
|
|
583
|
-
return;
|
|
584
|
-
}
|
|
585
|
-
|
|
586
559
|
if (!formExists || selectedAccount.accountId && skipFillInStep.includes(selectedMethod.providerType.toLowerCase())) {
|
|
587
560
|
return _this3.onSubmit({
|
|
588
561
|
currentAmount: amount,
|
|
@@ -600,9 +573,9 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
600
573
|
};
|
|
601
574
|
|
|
602
575
|
this.handleBackStep = function () {
|
|
603
|
-
var
|
|
604
|
-
currentStep =
|
|
605
|
-
buttonLoading =
|
|
576
|
+
var _state3 = _this3.state,
|
|
577
|
+
currentStep = _state3.currentStep,
|
|
578
|
+
buttonLoading = _state3.buttonLoading;
|
|
606
579
|
|
|
607
580
|
|
|
608
581
|
if (buttonLoading === 'fill-in-submit') return null;
|
|
@@ -619,13 +592,13 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
619
592
|
};
|
|
620
593
|
|
|
621
594
|
this.onSubmit = function (data) {
|
|
622
|
-
var
|
|
623
|
-
onSubmit =
|
|
624
|
-
countries =
|
|
625
|
-
user =
|
|
626
|
-
var
|
|
627
|
-
selectedMethod =
|
|
628
|
-
swishNumber =
|
|
595
|
+
var _props2 = _this3.props,
|
|
596
|
+
onSubmit = _props2.onSubmit,
|
|
597
|
+
countries = _props2.countries,
|
|
598
|
+
user = _props2.user;
|
|
599
|
+
var _state4 = _this3.state,
|
|
600
|
+
selectedMethod = _state4.selectedMethod,
|
|
601
|
+
swishNumber = _state4.swishNumber;
|
|
629
602
|
|
|
630
603
|
|
|
631
604
|
var submitData = _extends({}, _this3.state, data);
|
|
@@ -658,12 +631,12 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
658
631
|
|
|
659
632
|
this.onSelectMethod = function (_ref7) {
|
|
660
633
|
var method = _ref7.method;
|
|
661
|
-
var
|
|
662
|
-
currency =
|
|
663
|
-
paymentStats =
|
|
664
|
-
remainingDepositLimit =
|
|
665
|
-
payments =
|
|
666
|
-
shouldAutoFocus =
|
|
634
|
+
var _props3 = _this3.props,
|
|
635
|
+
currency = _props3.currency,
|
|
636
|
+
paymentStats = _props3.paymentStats,
|
|
637
|
+
remainingDepositLimit = _props3.remainingDepositLimit,
|
|
638
|
+
payments = _props3.payments,
|
|
639
|
+
shouldAutoFocus = _props3.shouldAutoFocus;
|
|
667
640
|
|
|
668
641
|
|
|
669
642
|
if (shouldAutoFocus) {
|
|
@@ -728,9 +701,9 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
728
701
|
};
|
|
729
702
|
|
|
730
703
|
this.getMinDepositBonusAmount = function () {
|
|
731
|
-
var
|
|
732
|
-
bonuses =
|
|
733
|
-
currency =
|
|
704
|
+
var _props4 = _this3.props,
|
|
705
|
+
bonuses = _props4.bonuses,
|
|
706
|
+
currency = _props4.currency;
|
|
734
707
|
var bonusCode = _this3.state.bonusCode;
|
|
735
708
|
|
|
736
709
|
|
|
@@ -753,10 +726,10 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
753
726
|
};
|
|
754
727
|
|
|
755
728
|
this.getSpainRemainingDepositAmount = function () {
|
|
756
|
-
var
|
|
757
|
-
jurisdiction =
|
|
758
|
-
hasIdApproved =
|
|
759
|
-
paymentStats =
|
|
729
|
+
var _props5 = _this3.props,
|
|
730
|
+
jurisdiction = _props5.jurisdiction,
|
|
731
|
+
hasIdApproved = _props5.hasIdApproved,
|
|
732
|
+
paymentStats = _props5.paymentStats;
|
|
760
733
|
|
|
761
734
|
return jurisdiction.toLowerCase() === 'es' && !hasIdApproved && (150 - parseFloat(paymentStats.TotalDeposit) < 0 ? 0 : 150 - parseFloat(paymentStats.TotalDeposit));
|
|
762
735
|
};
|
|
@@ -665,7 +665,8 @@ var Mifinity = function Mifinity(_ref13) {
|
|
|
665
665
|
var EzeeWallet = function EzeeWallet(_ref14) {
|
|
666
666
|
var account = _ref14.account,
|
|
667
667
|
intl = _ref14.intl,
|
|
668
|
-
method = _ref14.method
|
|
668
|
+
method = _ref14.method,
|
|
669
|
+
change = _ref14.change;
|
|
669
670
|
|
|
670
671
|
return React.createElement(
|
|
671
672
|
'div',
|
|
@@ -678,12 +679,18 @@ var EzeeWallet = function EzeeWallet(_ref14) {
|
|
|
678
679
|
defaultMessage: 'Wallet ID'
|
|
679
680
|
}, intl),
|
|
680
681
|
disabled: account.accountId,
|
|
682
|
+
onChange: function onChange(_, walletId) {
|
|
683
|
+
return change('walletId', walletId);
|
|
684
|
+
},
|
|
681
685
|
value: account.maskedAccount
|
|
682
686
|
}),
|
|
683
687
|
method === 'deposit' && React.createElement(Input, {
|
|
684
688
|
required: true,
|
|
685
689
|
type: 'password',
|
|
686
690
|
name: 'walletPassword',
|
|
691
|
+
onChange: function onChange(_, walletPassword) {
|
|
692
|
+
return change('walletPassword', walletPassword);
|
|
693
|
+
},
|
|
687
694
|
label: translate({
|
|
688
695
|
id: 'cashier.details.walletPassword',
|
|
689
696
|
defaultMessage: 'Wallet password'
|
|
@@ -104,10 +104,10 @@ var BonusCodeForm = function BonusCodeForm(_ref3) {
|
|
|
104
104
|
);
|
|
105
105
|
};
|
|
106
106
|
|
|
107
|
-
BonusCodeForm = (0, _compose2.default)((0, _WithValidation2.default)(rules), _reactIntl.injectIntl)(BonusCodeForm);
|
|
108
|
-
|
|
109
107
|
var rules = {
|
|
110
108
|
bonusCode: [[_required2.default, 'error.empty.bonusCode']]
|
|
111
109
|
};
|
|
112
110
|
|
|
111
|
+
BonusCodeForm = (0, _compose2.default)((0, _WithValidation2.default)(rules), _reactIntl.injectIntl)(BonusCodeForm);
|
|
112
|
+
|
|
113
113
|
exports.default = Bonus;
|
|
@@ -609,45 +609,18 @@ var DepositWidget = function (_Component) {
|
|
|
609
609
|
var _initialiseProps = function _initialiseProps() {
|
|
610
610
|
var _this3 = this;
|
|
611
611
|
|
|
612
|
-
this.componentDidUpdate = function (prevProps) {
|
|
613
|
-
if (prevProps.shouldRenderSgaWarning !== _this3.props.shouldRenderSgaWarning) {
|
|
614
|
-
var _state2 = _this3.state,
|
|
615
|
-
currentAmount = _state2.currentAmount,
|
|
616
|
-
bonusCode = _state2.bonusCode;
|
|
617
|
-
|
|
618
|
-
_this3.handleNextStep({ amount: currentAmount, bonusCode: bonusCode });
|
|
619
|
-
}
|
|
620
|
-
};
|
|
621
|
-
|
|
622
612
|
this.handleNextStep = function (_ref6) {
|
|
623
613
|
var amount = _ref6.amount,
|
|
624
614
|
bonusCode = _ref6.bonusCode;
|
|
625
|
-
var
|
|
626
|
-
selectedMethod =
|
|
627
|
-
preDepositBonus =
|
|
628
|
-
selectedAccount =
|
|
629
|
-
var _props2 = _this3.props,
|
|
630
|
-
paymentStats = _props2.paymentStats,
|
|
631
|
-
renderSgaWarningPopup = _props2.renderSgaWarningPopup,
|
|
632
|
-
shouldRenderSgaWarning = _props2.shouldRenderSgaWarning;
|
|
615
|
+
var _state2 = _this3.state,
|
|
616
|
+
selectedMethod = _state2.selectedMethod,
|
|
617
|
+
preDepositBonus = _state2.preDepositBonus,
|
|
618
|
+
selectedAccount = _state2.selectedAccount;
|
|
633
619
|
|
|
634
620
|
|
|
635
621
|
var formExists = !!PaymentAccountForms[(0, _Payment.getPaymentForm)(selectedMethod)];
|
|
636
622
|
var skipFillInStep = ['skrill', 'bestpay', 'jeton', 'bankiban', 'bankintl'];
|
|
637
623
|
|
|
638
|
-
var remainingAmount = 5000 - Number(paymentStats.TotalDepositLast7Days);
|
|
639
|
-
var renderSgaWarning = shouldRenderSgaWarning && Number(paymentStats.TotalDepositLast7Days) + Number(amount) > 5000;
|
|
640
|
-
|
|
641
|
-
if (renderSgaWarning) {
|
|
642
|
-
_this3.setState({
|
|
643
|
-
buttonLoading: null,
|
|
644
|
-
currentAmount: amount,
|
|
645
|
-
bonusCode: bonusCode
|
|
646
|
-
});
|
|
647
|
-
renderSgaWarningPopup(remainingAmount);
|
|
648
|
-
return;
|
|
649
|
-
}
|
|
650
|
-
|
|
651
624
|
if (!formExists || selectedAccount.accountId && skipFillInStep.includes(selectedMethod.providerType.toLowerCase())) {
|
|
652
625
|
return _this3.onSubmit({
|
|
653
626
|
currentAmount: amount,
|
|
@@ -665,9 +638,9 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
665
638
|
};
|
|
666
639
|
|
|
667
640
|
this.handleBackStep = function () {
|
|
668
|
-
var
|
|
669
|
-
currentStep =
|
|
670
|
-
buttonLoading =
|
|
641
|
+
var _state3 = _this3.state,
|
|
642
|
+
currentStep = _state3.currentStep,
|
|
643
|
+
buttonLoading = _state3.buttonLoading;
|
|
671
644
|
|
|
672
645
|
|
|
673
646
|
if (buttonLoading === 'fill-in-submit') return null;
|
|
@@ -684,13 +657,13 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
684
657
|
};
|
|
685
658
|
|
|
686
659
|
this.onSubmit = function (data) {
|
|
687
|
-
var
|
|
688
|
-
onSubmit =
|
|
689
|
-
countries =
|
|
690
|
-
user =
|
|
691
|
-
var
|
|
692
|
-
selectedMethod =
|
|
693
|
-
swishNumber =
|
|
660
|
+
var _props2 = _this3.props,
|
|
661
|
+
onSubmit = _props2.onSubmit,
|
|
662
|
+
countries = _props2.countries,
|
|
663
|
+
user = _props2.user;
|
|
664
|
+
var _state4 = _this3.state,
|
|
665
|
+
selectedMethod = _state4.selectedMethod,
|
|
666
|
+
swishNumber = _state4.swishNumber;
|
|
694
667
|
|
|
695
668
|
|
|
696
669
|
var submitData = _extends({}, _this3.state, data);
|
|
@@ -723,12 +696,12 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
723
696
|
|
|
724
697
|
this.onSelectMethod = function (_ref7) {
|
|
725
698
|
var method = _ref7.method;
|
|
726
|
-
var
|
|
727
|
-
currency =
|
|
728
|
-
paymentStats =
|
|
729
|
-
remainingDepositLimit =
|
|
730
|
-
payments =
|
|
731
|
-
shouldAutoFocus =
|
|
699
|
+
var _props3 = _this3.props,
|
|
700
|
+
currency = _props3.currency,
|
|
701
|
+
paymentStats = _props3.paymentStats,
|
|
702
|
+
remainingDepositLimit = _props3.remainingDepositLimit,
|
|
703
|
+
payments = _props3.payments,
|
|
704
|
+
shouldAutoFocus = _props3.shouldAutoFocus;
|
|
732
705
|
|
|
733
706
|
|
|
734
707
|
if (shouldAutoFocus) {
|
|
@@ -793,9 +766,9 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
793
766
|
};
|
|
794
767
|
|
|
795
768
|
this.getMinDepositBonusAmount = function () {
|
|
796
|
-
var
|
|
797
|
-
bonuses =
|
|
798
|
-
currency =
|
|
769
|
+
var _props4 = _this3.props,
|
|
770
|
+
bonuses = _props4.bonuses,
|
|
771
|
+
currency = _props4.currency;
|
|
799
772
|
var bonusCode = _this3.state.bonusCode;
|
|
800
773
|
|
|
801
774
|
|
|
@@ -818,10 +791,10 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
818
791
|
};
|
|
819
792
|
|
|
820
793
|
this.getSpainRemainingDepositAmount = function () {
|
|
821
|
-
var
|
|
822
|
-
jurisdiction =
|
|
823
|
-
hasIdApproved =
|
|
824
|
-
paymentStats =
|
|
794
|
+
var _props5 = _this3.props,
|
|
795
|
+
jurisdiction = _props5.jurisdiction,
|
|
796
|
+
hasIdApproved = _props5.hasIdApproved,
|
|
797
|
+
paymentStats = _props5.paymentStats;
|
|
825
798
|
|
|
826
799
|
return jurisdiction.toLowerCase() === 'es' && !hasIdApproved && (150 - parseFloat(paymentStats.TotalDeposit) < 0 ? 0 : 150 - parseFloat(paymentStats.TotalDeposit));
|
|
827
800
|
};
|
|
@@ -702,7 +702,8 @@ var Mifinity = function Mifinity(_ref13) {
|
|
|
702
702
|
var EzeeWallet = function EzeeWallet(_ref14) {
|
|
703
703
|
var account = _ref14.account,
|
|
704
704
|
intl = _ref14.intl,
|
|
705
|
-
method = _ref14.method
|
|
705
|
+
method = _ref14.method,
|
|
706
|
+
change = _ref14.change;
|
|
706
707
|
|
|
707
708
|
return _react2.default.createElement(
|
|
708
709
|
'div',
|
|
@@ -715,12 +716,18 @@ var EzeeWallet = function EzeeWallet(_ref14) {
|
|
|
715
716
|
defaultMessage: 'Wallet ID'
|
|
716
717
|
}, intl),
|
|
717
718
|
disabled: account.accountId,
|
|
719
|
+
onChange: function onChange(_, walletId) {
|
|
720
|
+
return change('walletId', walletId);
|
|
721
|
+
},
|
|
718
722
|
value: account.maskedAccount
|
|
719
723
|
}),
|
|
720
724
|
method === 'deposit' && _react2.default.createElement(_Input2.default, {
|
|
721
725
|
required: true,
|
|
722
726
|
type: 'password',
|
|
723
727
|
name: 'walletPassword',
|
|
728
|
+
onChange: function onChange(_, walletPassword) {
|
|
729
|
+
return change('walletPassword', walletPassword);
|
|
730
|
+
},
|
|
724
731
|
label: (0, _translate2.default)({
|
|
725
732
|
id: 'cashier.details.walletPassword',
|
|
726
733
|
defaultMessage: 'Wallet password'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tg-core-components",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.3",
|
|
4
4
|
"description": "tg-core-components",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"webpack": "^3.0.0",
|
|
77
77
|
"webpack-blocks": "^1.0.0"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "3e934ce4a7473235e2defd2f7e98d2a91eaf158e"
|
|
80
80
|
}
|