@pelcro/react-pelcro-js 3.0.0-beta.5 → 3.0.0-beta.8
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 +25 -10
- package/dist/index.esm.js +25 -10
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -4397,6 +4397,7 @@ var labels$7 = {
|
|
|
4397
4397
|
paid: "Paid",
|
|
4398
4398
|
open: "Open",
|
|
4399
4399
|
draft: "Draft",
|
|
4400
|
+
scheduled: "Scheduled",
|
|
4400
4401
|
uncollectible: "Uncollectible",
|
|
4401
4402
|
"void": "Void",
|
|
4402
4403
|
pastDue: "Past due",
|
|
@@ -4487,6 +4488,7 @@ var labels$6 = {
|
|
|
4487
4488
|
paid: "Paid",
|
|
4488
4489
|
open: "open",
|
|
4489
4490
|
draft: "Draft",
|
|
4491
|
+
scheduled: "Scheduled",
|
|
4490
4492
|
uncollectible: "Uncollectible",
|
|
4491
4493
|
"void": "Void",
|
|
4492
4494
|
pastDue: "Past due",
|
|
@@ -4647,13 +4649,13 @@ var verifyEmail_en = {
|
|
|
4647
4649
|
};
|
|
4648
4650
|
|
|
4649
4651
|
var labels$2 = {
|
|
4650
|
-
title: "
|
|
4651
|
-
instructions: "
|
|
4652
|
-
resend: "
|
|
4652
|
+
title: "Confirmez votre courriel",
|
|
4653
|
+
instructions: "Confirmez votre courriel.\nVeuillez cliquer sur le lien de vérification, qui vous a été envoyé à:",
|
|
4654
|
+
resend: "Renvoyer le courriel"
|
|
4653
4655
|
};
|
|
4654
4656
|
var messages = {
|
|
4655
4657
|
resent: "Renvoyé avec succès",
|
|
4656
|
-
success: "
|
|
4658
|
+
success: "Adresse courriel vérifiée avec succès"
|
|
4657
4659
|
};
|
|
4658
4660
|
var verifyEmail_fr = {
|
|
4659
4661
|
labels: labels$2,
|
|
@@ -9118,11 +9120,13 @@ const showInvoiceDetailsFromUrl = () => {
|
|
|
9118
9120
|
const wasSetSuccessfully = setInvoice(invoiceId);
|
|
9119
9121
|
|
|
9120
9122
|
if (!wasSetSuccessfully) {
|
|
9121
|
-
const
|
|
9123
|
+
const errorMessage = i18next.t("messages:invalidInvoice", {
|
|
9122
9124
|
returnObjects: true
|
|
9123
9125
|
});
|
|
9124
|
-
notify.error(
|
|
9126
|
+
return notify.error(errorMessage);
|
|
9125
9127
|
}
|
|
9128
|
+
|
|
9129
|
+
return switchView("invoice-details");
|
|
9126
9130
|
});
|
|
9127
9131
|
};
|
|
9128
9132
|
|
|
@@ -22188,9 +22192,11 @@ const DonationsMenu = () => {
|
|
|
22188
22192
|
};
|
|
22189
22193
|
|
|
22190
22194
|
function getDonationSubs() {
|
|
22191
|
-
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
22195
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r, _window$Pelcro$user$r2;
|
|
22192
22196
|
|
|
22193
|
-
|
|
22197
|
+
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 : [];
|
|
22198
|
+
const canceledDonations = (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read().expired_subscriptions) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.filter(sub => sub.plan.is_donation && !sub.is_gift_donor)) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
|
|
22199
|
+
return [...donations, ...canceledDonations];
|
|
22194
22200
|
}
|
|
22195
22201
|
|
|
22196
22202
|
function formatStartDate(date) {
|
|
@@ -22304,6 +22310,14 @@ function getInvoiceStatus(invoice) {
|
|
|
22304
22310
|
title: translations.draft
|
|
22305
22311
|
};
|
|
22306
22312
|
|
|
22313
|
+
case "scheduled":
|
|
22314
|
+
return {
|
|
22315
|
+
textColor: "plc-text-blue-700",
|
|
22316
|
+
bgColor: "plc-bg-blue-100",
|
|
22317
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgCalendar, null),
|
|
22318
|
+
title: translations.scheduled
|
|
22319
|
+
};
|
|
22320
|
+
|
|
22307
22321
|
case "uncollectible":
|
|
22308
22322
|
return {
|
|
22309
22323
|
textColor: "plc-text-red-700",
|
|
@@ -22902,10 +22916,11 @@ function hasInvoices() {
|
|
|
22902
22916
|
}
|
|
22903
22917
|
|
|
22904
22918
|
function hasDonationSubs() {
|
|
22905
|
-
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
22919
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
|
|
22906
22920
|
|
|
22907
22921
|
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
|
-
|
|
22922
|
+
const canceledDonations = (_window$Pelcro$user$r4 = (_window$Pelcro$user$r5 = window.Pelcro.user.read().expired_subscriptions) === null || _window$Pelcro$user$r5 === void 0 ? void 0 : _window$Pelcro$user$r5.filter(sub => sub.plan.is_donation && !sub.is_gift_donor)) !== null && _window$Pelcro$user$r4 !== void 0 ? _window$Pelcro$user$r4 : [];
|
|
22923
|
+
return donations.length > 0 || canceledDonations.length > 0;
|
|
22909
22924
|
}
|
|
22910
22925
|
|
|
22911
22926
|
const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
|
package/dist/index.esm.js
CHANGED
|
@@ -4367,6 +4367,7 @@ var labels$7 = {
|
|
|
4367
4367
|
paid: "Paid",
|
|
4368
4368
|
open: "Open",
|
|
4369
4369
|
draft: "Draft",
|
|
4370
|
+
scheduled: "Scheduled",
|
|
4370
4371
|
uncollectible: "Uncollectible",
|
|
4371
4372
|
"void": "Void",
|
|
4372
4373
|
pastDue: "Past due",
|
|
@@ -4457,6 +4458,7 @@ var labels$6 = {
|
|
|
4457
4458
|
paid: "Paid",
|
|
4458
4459
|
open: "open",
|
|
4459
4460
|
draft: "Draft",
|
|
4461
|
+
scheduled: "Scheduled",
|
|
4460
4462
|
uncollectible: "Uncollectible",
|
|
4461
4463
|
"void": "Void",
|
|
4462
4464
|
pastDue: "Past due",
|
|
@@ -4617,13 +4619,13 @@ var verifyEmail_en = {
|
|
|
4617
4619
|
};
|
|
4618
4620
|
|
|
4619
4621
|
var labels$2 = {
|
|
4620
|
-
title: "
|
|
4621
|
-
instructions: "
|
|
4622
|
-
resend: "
|
|
4622
|
+
title: "Confirmez votre courriel",
|
|
4623
|
+
instructions: "Confirmez votre courriel.\nVeuillez cliquer sur le lien de vérification, qui vous a été envoyé à:",
|
|
4624
|
+
resend: "Renvoyer le courriel"
|
|
4623
4625
|
};
|
|
4624
4626
|
var messages = {
|
|
4625
4627
|
resent: "Renvoyé avec succès",
|
|
4626
|
-
success: "
|
|
4628
|
+
success: "Adresse courriel vérifiée avec succès"
|
|
4627
4629
|
};
|
|
4628
4630
|
var verifyEmail_fr = {
|
|
4629
4631
|
labels: labels$2,
|
|
@@ -9088,11 +9090,13 @@ const showInvoiceDetailsFromUrl = () => {
|
|
|
9088
9090
|
const wasSetSuccessfully = setInvoice(invoiceId);
|
|
9089
9091
|
|
|
9090
9092
|
if (!wasSetSuccessfully) {
|
|
9091
|
-
const
|
|
9093
|
+
const errorMessage = i18next.t("messages:invalidInvoice", {
|
|
9092
9094
|
returnObjects: true
|
|
9093
9095
|
});
|
|
9094
|
-
notify.error(
|
|
9096
|
+
return notify.error(errorMessage);
|
|
9095
9097
|
}
|
|
9098
|
+
|
|
9099
|
+
return switchView("invoice-details");
|
|
9096
9100
|
});
|
|
9097
9101
|
};
|
|
9098
9102
|
|
|
@@ -22158,9 +22162,11 @@ const DonationsMenu = () => {
|
|
|
22158
22162
|
};
|
|
22159
22163
|
|
|
22160
22164
|
function getDonationSubs() {
|
|
22161
|
-
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
22165
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r, _window$Pelcro$user$r2;
|
|
22162
22166
|
|
|
22163
|
-
|
|
22167
|
+
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 : [];
|
|
22168
|
+
const canceledDonations = (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read().expired_subscriptions) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.filter(sub => sub.plan.is_donation && !sub.is_gift_donor)) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
|
|
22169
|
+
return [...donations, ...canceledDonations];
|
|
22164
22170
|
}
|
|
22165
22171
|
|
|
22166
22172
|
function formatStartDate(date) {
|
|
@@ -22274,6 +22280,14 @@ function getInvoiceStatus(invoice) {
|
|
|
22274
22280
|
title: translations.draft
|
|
22275
22281
|
};
|
|
22276
22282
|
|
|
22283
|
+
case "scheduled":
|
|
22284
|
+
return {
|
|
22285
|
+
textColor: "plc-text-blue-700",
|
|
22286
|
+
bgColor: "plc-bg-blue-100",
|
|
22287
|
+
icon: /*#__PURE__*/React__default.createElement(SvgCalendar, null),
|
|
22288
|
+
title: translations.scheduled
|
|
22289
|
+
};
|
|
22290
|
+
|
|
22277
22291
|
case "uncollectible":
|
|
22278
22292
|
return {
|
|
22279
22293
|
textColor: "plc-text-red-700",
|
|
@@ -22872,10 +22886,11 @@ function hasInvoices() {
|
|
|
22872
22886
|
}
|
|
22873
22887
|
|
|
22874
22888
|
function hasDonationSubs() {
|
|
22875
|
-
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
22889
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
|
|
22876
22890
|
|
|
22877
22891
|
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
|
-
|
|
22892
|
+
const canceledDonations = (_window$Pelcro$user$r4 = (_window$Pelcro$user$r5 = window.Pelcro.user.read().expired_subscriptions) === null || _window$Pelcro$user$r5 === void 0 ? void 0 : _window$Pelcro$user$r5.filter(sub => sub.plan.is_donation && !sub.is_gift_donor)) !== null && _window$Pelcro$user$r4 !== void 0 ? _window$Pelcro$user$r4 : [];
|
|
22893
|
+
return donations.length > 0 || canceledDonations.length > 0;
|
|
22879
22894
|
}
|
|
22880
22895
|
|
|
22881
22896
|
const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
|