@pelcro/react-pelcro-js 3.17.0 → 3.17.1
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/dist/index.cjs.js +35 -3
- package/dist/index.esm.js +35 -3
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -3952,6 +3952,10 @@ var messages$W = {
|
|
|
3952
3952
|
success: "Subscription is successfully cancelled",
|
|
3953
3953
|
error: "Error while cancelling your subscription"
|
|
3954
3954
|
},
|
|
3955
|
+
subReactivation: {
|
|
3956
|
+
success: "Subscription is successfully reactivated",
|
|
3957
|
+
error: "Error while reactivating your subscription"
|
|
3958
|
+
},
|
|
3955
3959
|
subUnSuspend: {
|
|
3956
3960
|
isSureToUnSuspend: "Are you sure you want to unsuspend your subscription?",
|
|
3957
3961
|
loading: "Unsuspending your subscription",
|
|
@@ -4889,6 +4893,10 @@ var messages$C = {
|
|
|
4889
4893
|
success: "L'abonnement a été annulé avec succès",
|
|
4890
4894
|
error: "Une erreur s'est produite lors de l'annulation de l'abonnement"
|
|
4891
4895
|
},
|
|
4896
|
+
subReactivation: {
|
|
4897
|
+
success: "L'abonnement a été réactivé avec succès",
|
|
4898
|
+
error: "Erreur lors de la réactivation de votre abonnement"
|
|
4899
|
+
},
|
|
4892
4900
|
subUnSuspend: {
|
|
4893
4901
|
isSureToUnSuspend: "Êtes-vous sûr de vouloir annuler la suspension de votre abonnement ?",
|
|
4894
4902
|
loading: "Annulation de la suspension de votre abonnement",
|
|
@@ -5770,6 +5778,10 @@ var messages$l = {
|
|
|
5770
5778
|
success: "유료 멤버십이 성공적으로 취소되었습니다.",
|
|
5771
5779
|
error: "유료 멤버십 취소 과정에서 오류가 발생했습니다."
|
|
5772
5780
|
},
|
|
5781
|
+
subReactivation: {
|
|
5782
|
+
success: "구독이 성공적으로 재활성화되었습니다.",
|
|
5783
|
+
error: "구독을 재활성화하는 동안 오류가 발생했습니다."
|
|
5784
|
+
},
|
|
5773
5785
|
subUnSuspend: {
|
|
5774
5786
|
isSureToUnSuspend: "구독 일시 중단을 해제하시겠습니까?",
|
|
5775
5787
|
loading: "구독 일시 중단 해제",
|
|
@@ -6632,6 +6644,10 @@ var messages$4 = {
|
|
|
6632
6644
|
success: "La suscripción se canceló con éxito",
|
|
6633
6645
|
error: "Error al cancelar tu suscripción"
|
|
6634
6646
|
},
|
|
6647
|
+
subReactivation: {
|
|
6648
|
+
success: "La suscripción se reactivó con éxito",
|
|
6649
|
+
error: "Error al reactivar su suscripción"
|
|
6650
|
+
},
|
|
6635
6651
|
subUnSuspend: {
|
|
6636
6652
|
isSureToUnSuspend: "¿Estás seguro de que quieres reanudar tu suscripción?",
|
|
6637
6653
|
loading: "Reanudando tu suscripción",
|
|
@@ -13194,6 +13210,7 @@ function LoginModal(_ref) {
|
|
|
13194
13210
|
switchView,
|
|
13195
13211
|
resetView,
|
|
13196
13212
|
product,
|
|
13213
|
+
plan,
|
|
13197
13214
|
order,
|
|
13198
13215
|
switchToAddressView,
|
|
13199
13216
|
switchToPaymentView
|
|
@@ -13204,13 +13221,16 @@ function LoginModal(_ref) {
|
|
|
13204
13221
|
if (window.Pelcro.paywall.isArticleRestricted()) {
|
|
13205
13222
|
initPaywalls();
|
|
13206
13223
|
}
|
|
13207
|
-
if (product) {
|
|
13224
|
+
if (product && plan) {
|
|
13208
13225
|
if (product.address_required) {
|
|
13209
13226
|
return switchToAddressView();
|
|
13210
13227
|
} else {
|
|
13211
13228
|
return switchToPaymentView();
|
|
13212
13229
|
}
|
|
13213
13230
|
}
|
|
13231
|
+
if (product && !plan) {
|
|
13232
|
+
return switchView("plan-select");
|
|
13233
|
+
}
|
|
13214
13234
|
if (order) {
|
|
13215
13235
|
return switchToAddressView();
|
|
13216
13236
|
}
|
|
@@ -13757,6 +13777,7 @@ function RegisterModal(props) {
|
|
|
13757
13777
|
switchToAddressView,
|
|
13758
13778
|
switchToPaymentView,
|
|
13759
13779
|
product,
|
|
13780
|
+
plan,
|
|
13760
13781
|
order,
|
|
13761
13782
|
giftCode,
|
|
13762
13783
|
isGift
|
|
@@ -13795,13 +13816,16 @@ function RegisterModal(props) {
|
|
|
13795
13816
|
if (order) {
|
|
13796
13817
|
return switchToAddressView();
|
|
13797
13818
|
}
|
|
13798
|
-
if (product) {
|
|
13819
|
+
if (product && plan) {
|
|
13799
13820
|
if (product.address_required) {
|
|
13800
13821
|
return switchToAddressView();
|
|
13801
13822
|
} else {
|
|
13802
13823
|
return switchToPaymentView();
|
|
13803
13824
|
}
|
|
13804
13825
|
}
|
|
13826
|
+
if (product && !plan) {
|
|
13827
|
+
return switchView("plan-select");
|
|
13828
|
+
}
|
|
13805
13829
|
return resetView();
|
|
13806
13830
|
};
|
|
13807
13831
|
return /*#__PURE__*/React__default['default'].createElement(Modal, {
|
|
@@ -27726,6 +27750,10 @@ class Dashboard extends React.Component {
|
|
|
27726
27750
|
disableSubmit: false
|
|
27727
27751
|
});
|
|
27728
27752
|
this.props.onClose();
|
|
27753
|
+
if (err) {
|
|
27754
|
+
return notify$1.error(this.locale("messages.subReactivation.error"));
|
|
27755
|
+
}
|
|
27756
|
+
return notify$1.success(this.locale("messages.subReactivation.success"));
|
|
27729
27757
|
});
|
|
27730
27758
|
});
|
|
27731
27759
|
_defineProperty$3(this, "getSubscriptionStatus", sub => {
|
|
@@ -30121,6 +30149,7 @@ const EmailVerifyModal = _ref => {
|
|
|
30121
30149
|
} = _ref;
|
|
30122
30150
|
const {
|
|
30123
30151
|
product,
|
|
30152
|
+
plan,
|
|
30124
30153
|
switchToAddressView,
|
|
30125
30154
|
switchToPaymentView
|
|
30126
30155
|
} = usePelcro();
|
|
@@ -30128,13 +30157,16 @@ const EmailVerifyModal = _ref => {
|
|
|
30128
30157
|
const onSuccess = res => {
|
|
30129
30158
|
var _otherProps$onSuccess;
|
|
30130
30159
|
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, res);
|
|
30131
|
-
if (product) {
|
|
30160
|
+
if (product && plan) {
|
|
30132
30161
|
if (product.address_required) {
|
|
30133
30162
|
return switchToAddressView();
|
|
30134
30163
|
} else {
|
|
30135
30164
|
return switchToPaymentView();
|
|
30136
30165
|
}
|
|
30137
30166
|
}
|
|
30167
|
+
if (product && !plan) {
|
|
30168
|
+
return switchView("plan-select");
|
|
30169
|
+
}
|
|
30138
30170
|
};
|
|
30139
30171
|
return /*#__PURE__*/React__default['default'].createElement(Modal, {
|
|
30140
30172
|
onDisplay: onDisplay,
|
package/dist/index.esm.js
CHANGED
|
@@ -3922,6 +3922,10 @@ var messages$W = {
|
|
|
3922
3922
|
success: "Subscription is successfully cancelled",
|
|
3923
3923
|
error: "Error while cancelling your subscription"
|
|
3924
3924
|
},
|
|
3925
|
+
subReactivation: {
|
|
3926
|
+
success: "Subscription is successfully reactivated",
|
|
3927
|
+
error: "Error while reactivating your subscription"
|
|
3928
|
+
},
|
|
3925
3929
|
subUnSuspend: {
|
|
3926
3930
|
isSureToUnSuspend: "Are you sure you want to unsuspend your subscription?",
|
|
3927
3931
|
loading: "Unsuspending your subscription",
|
|
@@ -4859,6 +4863,10 @@ var messages$C = {
|
|
|
4859
4863
|
success: "L'abonnement a été annulé avec succès",
|
|
4860
4864
|
error: "Une erreur s'est produite lors de l'annulation de l'abonnement"
|
|
4861
4865
|
},
|
|
4866
|
+
subReactivation: {
|
|
4867
|
+
success: "L'abonnement a été réactivé avec succès",
|
|
4868
|
+
error: "Erreur lors de la réactivation de votre abonnement"
|
|
4869
|
+
},
|
|
4862
4870
|
subUnSuspend: {
|
|
4863
4871
|
isSureToUnSuspend: "Êtes-vous sûr de vouloir annuler la suspension de votre abonnement ?",
|
|
4864
4872
|
loading: "Annulation de la suspension de votre abonnement",
|
|
@@ -5740,6 +5748,10 @@ var messages$l = {
|
|
|
5740
5748
|
success: "유료 멤버십이 성공적으로 취소되었습니다.",
|
|
5741
5749
|
error: "유료 멤버십 취소 과정에서 오류가 발생했습니다."
|
|
5742
5750
|
},
|
|
5751
|
+
subReactivation: {
|
|
5752
|
+
success: "구독이 성공적으로 재활성화되었습니다.",
|
|
5753
|
+
error: "구독을 재활성화하는 동안 오류가 발생했습니다."
|
|
5754
|
+
},
|
|
5743
5755
|
subUnSuspend: {
|
|
5744
5756
|
isSureToUnSuspend: "구독 일시 중단을 해제하시겠습니까?",
|
|
5745
5757
|
loading: "구독 일시 중단 해제",
|
|
@@ -6602,6 +6614,10 @@ var messages$4 = {
|
|
|
6602
6614
|
success: "La suscripción se canceló con éxito",
|
|
6603
6615
|
error: "Error al cancelar tu suscripción"
|
|
6604
6616
|
},
|
|
6617
|
+
subReactivation: {
|
|
6618
|
+
success: "La suscripción se reactivó con éxito",
|
|
6619
|
+
error: "Error al reactivar su suscripción"
|
|
6620
|
+
},
|
|
6605
6621
|
subUnSuspend: {
|
|
6606
6622
|
isSureToUnSuspend: "¿Estás seguro de que quieres reanudar tu suscripción?",
|
|
6607
6623
|
loading: "Reanudando tu suscripción",
|
|
@@ -13164,6 +13180,7 @@ function LoginModal(_ref) {
|
|
|
13164
13180
|
switchView,
|
|
13165
13181
|
resetView,
|
|
13166
13182
|
product,
|
|
13183
|
+
plan,
|
|
13167
13184
|
order,
|
|
13168
13185
|
switchToAddressView,
|
|
13169
13186
|
switchToPaymentView
|
|
@@ -13174,13 +13191,16 @@ function LoginModal(_ref) {
|
|
|
13174
13191
|
if (window.Pelcro.paywall.isArticleRestricted()) {
|
|
13175
13192
|
initPaywalls();
|
|
13176
13193
|
}
|
|
13177
|
-
if (product) {
|
|
13194
|
+
if (product && plan) {
|
|
13178
13195
|
if (product.address_required) {
|
|
13179
13196
|
return switchToAddressView();
|
|
13180
13197
|
} else {
|
|
13181
13198
|
return switchToPaymentView();
|
|
13182
13199
|
}
|
|
13183
13200
|
}
|
|
13201
|
+
if (product && !plan) {
|
|
13202
|
+
return switchView("plan-select");
|
|
13203
|
+
}
|
|
13184
13204
|
if (order) {
|
|
13185
13205
|
return switchToAddressView();
|
|
13186
13206
|
}
|
|
@@ -13727,6 +13747,7 @@ function RegisterModal(props) {
|
|
|
13727
13747
|
switchToAddressView,
|
|
13728
13748
|
switchToPaymentView,
|
|
13729
13749
|
product,
|
|
13750
|
+
plan,
|
|
13730
13751
|
order,
|
|
13731
13752
|
giftCode,
|
|
13732
13753
|
isGift
|
|
@@ -13765,13 +13786,16 @@ function RegisterModal(props) {
|
|
|
13765
13786
|
if (order) {
|
|
13766
13787
|
return switchToAddressView();
|
|
13767
13788
|
}
|
|
13768
|
-
if (product) {
|
|
13789
|
+
if (product && plan) {
|
|
13769
13790
|
if (product.address_required) {
|
|
13770
13791
|
return switchToAddressView();
|
|
13771
13792
|
} else {
|
|
13772
13793
|
return switchToPaymentView();
|
|
13773
13794
|
}
|
|
13774
13795
|
}
|
|
13796
|
+
if (product && !plan) {
|
|
13797
|
+
return switchView("plan-select");
|
|
13798
|
+
}
|
|
13775
13799
|
return resetView();
|
|
13776
13800
|
};
|
|
13777
13801
|
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
@@ -27696,6 +27720,10 @@ class Dashboard extends Component {
|
|
|
27696
27720
|
disableSubmit: false
|
|
27697
27721
|
});
|
|
27698
27722
|
this.props.onClose();
|
|
27723
|
+
if (err) {
|
|
27724
|
+
return notify$1.error(this.locale("messages.subReactivation.error"));
|
|
27725
|
+
}
|
|
27726
|
+
return notify$1.success(this.locale("messages.subReactivation.success"));
|
|
27699
27727
|
});
|
|
27700
27728
|
});
|
|
27701
27729
|
_defineProperty$3(this, "getSubscriptionStatus", sub => {
|
|
@@ -30091,6 +30119,7 @@ const EmailVerifyModal = _ref => {
|
|
|
30091
30119
|
} = _ref;
|
|
30092
30120
|
const {
|
|
30093
30121
|
product,
|
|
30122
|
+
plan,
|
|
30094
30123
|
switchToAddressView,
|
|
30095
30124
|
switchToPaymentView
|
|
30096
30125
|
} = usePelcro();
|
|
@@ -30098,13 +30127,16 @@ const EmailVerifyModal = _ref => {
|
|
|
30098
30127
|
const onSuccess = res => {
|
|
30099
30128
|
var _otherProps$onSuccess;
|
|
30100
30129
|
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, res);
|
|
30101
|
-
if (product) {
|
|
30130
|
+
if (product && plan) {
|
|
30102
30131
|
if (product.address_required) {
|
|
30103
30132
|
return switchToAddressView();
|
|
30104
30133
|
} else {
|
|
30105
30134
|
return switchToPaymentView();
|
|
30106
30135
|
}
|
|
30107
30136
|
}
|
|
30137
|
+
if (product && !plan) {
|
|
30138
|
+
return switchView("plan-select");
|
|
30139
|
+
}
|
|
30108
30140
|
};
|
|
30109
30141
|
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
30110
30142
|
onDisplay: onDisplay,
|