@pelcro/react-pelcro-js 3.0.0-beta.5 → 3.0.0-beta.6
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 +11 -6
- package/dist/index.esm.js +11 -6
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -9118,11 +9118,13 @@ const showInvoiceDetailsFromUrl = () => {
|
|
|
9118
9118
|
const wasSetSuccessfully = setInvoice(invoiceId);
|
|
9119
9119
|
|
|
9120
9120
|
if (!wasSetSuccessfully) {
|
|
9121
|
-
const
|
|
9121
|
+
const errorMessage = i18next.t("messages:invalidInvoice", {
|
|
9122
9122
|
returnObjects: true
|
|
9123
9123
|
});
|
|
9124
|
-
notify.error(
|
|
9124
|
+
return notify.error(errorMessage);
|
|
9125
9125
|
}
|
|
9126
|
+
|
|
9127
|
+
return switchView("invoice-details");
|
|
9126
9128
|
});
|
|
9127
9129
|
};
|
|
9128
9130
|
|
|
@@ -22188,9 +22190,11 @@ const DonationsMenu = () => {
|
|
|
22188
22190
|
};
|
|
22189
22191
|
|
|
22190
22192
|
function getDonationSubs() {
|
|
22191
|
-
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
22193
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r;
|
|
22192
22194
|
|
|
22193
|
-
|
|
22195
|
+
const donations = (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => sub.plan.is_donation)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
|
|
22196
|
+
const canceledDonations = (_window$Pelcro$user$r = window.Pelcro.user.read().expired_subscriptions) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
|
|
22197
|
+
return [...donations, ...canceledDonations];
|
|
22194
22198
|
}
|
|
22195
22199
|
|
|
22196
22200
|
function formatStartDate(date) {
|
|
@@ -22902,10 +22906,11 @@ function hasInvoices() {
|
|
|
22902
22906
|
}
|
|
22903
22907
|
|
|
22904
22908
|
function hasDonationSubs() {
|
|
22905
|
-
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
22909
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r4;
|
|
22906
22910
|
|
|
22907
22911
|
const donations = (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => sub.plan.is_donation)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
|
|
22908
|
-
|
|
22912
|
+
const canceledDonations = (_window$Pelcro$user$r4 = window.Pelcro.user.read().expired_subscriptions) !== null && _window$Pelcro$user$r4 !== void 0 ? _window$Pelcro$user$r4 : [];
|
|
22913
|
+
return donations.length > 0 || canceledDonations.length > 0;
|
|
22909
22914
|
}
|
|
22910
22915
|
|
|
22911
22916
|
const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
|
package/dist/index.esm.js
CHANGED
|
@@ -9088,11 +9088,13 @@ const showInvoiceDetailsFromUrl = () => {
|
|
|
9088
9088
|
const wasSetSuccessfully = setInvoice(invoiceId);
|
|
9089
9089
|
|
|
9090
9090
|
if (!wasSetSuccessfully) {
|
|
9091
|
-
const
|
|
9091
|
+
const errorMessage = i18next.t("messages:invalidInvoice", {
|
|
9092
9092
|
returnObjects: true
|
|
9093
9093
|
});
|
|
9094
|
-
notify.error(
|
|
9094
|
+
return notify.error(errorMessage);
|
|
9095
9095
|
}
|
|
9096
|
+
|
|
9097
|
+
return switchView("invoice-details");
|
|
9096
9098
|
});
|
|
9097
9099
|
};
|
|
9098
9100
|
|
|
@@ -22158,9 +22160,11 @@ const DonationsMenu = () => {
|
|
|
22158
22160
|
};
|
|
22159
22161
|
|
|
22160
22162
|
function getDonationSubs() {
|
|
22161
|
-
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
22163
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r;
|
|
22162
22164
|
|
|
22163
|
-
|
|
22165
|
+
const donations = (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => sub.plan.is_donation)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
|
|
22166
|
+
const canceledDonations = (_window$Pelcro$user$r = window.Pelcro.user.read().expired_subscriptions) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
|
|
22167
|
+
return [...donations, ...canceledDonations];
|
|
22164
22168
|
}
|
|
22165
22169
|
|
|
22166
22170
|
function formatStartDate(date) {
|
|
@@ -22872,10 +22876,11 @@ function hasInvoices() {
|
|
|
22872
22876
|
}
|
|
22873
22877
|
|
|
22874
22878
|
function hasDonationSubs() {
|
|
22875
|
-
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
22879
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r4;
|
|
22876
22880
|
|
|
22877
22881
|
const donations = (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => sub.plan.is_donation)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
|
|
22878
|
-
|
|
22882
|
+
const canceledDonations = (_window$Pelcro$user$r4 = window.Pelcro.user.read().expired_subscriptions) !== null && _window$Pelcro$user$r4 !== void 0 ? _window$Pelcro$user$r4 : [];
|
|
22883
|
+
return donations.length > 0 || canceledDonations.length > 0;
|
|
22879
22884
|
}
|
|
22880
22885
|
|
|
22881
22886
|
const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
|