@pelcro/react-pelcro-js 3.26.0-beta.36 → 3.26.0-beta.38
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 +24 -20
- package/dist/index.esm.js +24 -20
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -18960,22 +18960,26 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
18960
18960
|
}
|
|
18961
18961
|
});
|
|
18962
18962
|
}
|
|
18963
|
-
|
|
18964
|
-
|
|
18965
|
-
|
|
18966
|
-
|
|
18967
|
-
|
|
18968
|
-
|
|
18969
|
-
|
|
18970
|
-
|
|
18971
|
-
|
|
18972
|
-
|
|
18973
|
-
|
|
18963
|
+
if (res) {
|
|
18964
|
+
setTimeout(() => {
|
|
18965
|
+
window.Pelcro.paymentMethods.deletePaymentMethod({
|
|
18966
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
18967
|
+
payment_method_id: paymentMethodId
|
|
18968
|
+
}, (err, res) => {
|
|
18969
|
+
if (err) {
|
|
18970
|
+
onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
|
|
18971
|
+
return dispatch({
|
|
18972
|
+
type: SHOW_ALERT,
|
|
18973
|
+
payload: {
|
|
18974
|
+
type: "error",
|
|
18975
|
+
content: getErrorMessages(err)
|
|
18976
|
+
}
|
|
18977
|
+
});
|
|
18974
18978
|
}
|
|
18979
|
+
onSuccess(res);
|
|
18975
18980
|
});
|
|
18976
|
-
}
|
|
18977
|
-
|
|
18978
|
-
});
|
|
18981
|
+
}, 1000);
|
|
18982
|
+
}
|
|
18979
18983
|
});
|
|
18980
18984
|
}
|
|
18981
18985
|
function updateVantivCard() {
|
|
@@ -31414,9 +31418,7 @@ const MembershipsItems = () => {
|
|
|
31414
31418
|
};
|
|
31415
31419
|
if (memberships.length === 0) return null;
|
|
31416
31420
|
return memberships.sort((a, b) => a.created_at - b.created_at).map(membership => {
|
|
31417
|
-
|
|
31418
|
-
(_window$Pelcro$addres = window.Pelcro.address.list()) === null || _window$Pelcro$addres === void 0 ? void 0 : _window$Pelcro$addres.find(address => address.id === membership.address_id);
|
|
31419
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, membership.subscription.ended_at === null && /*#__PURE__*/React__default['default'].createElement("tr", {
|
|
31421
|
+
return /*#__PURE__*/React__default['default'].createElement("tr", {
|
|
31420
31422
|
key: membership.id,
|
|
31421
31423
|
className: `plc-w-full plc-align-top pelcro-membership-row`
|
|
31422
31424
|
}, /*#__PURE__*/React__default['default'].createElement("td", {
|
|
@@ -31432,12 +31434,13 @@ const MembershipsItems = () => {
|
|
|
31432
31434
|
}),
|
|
31433
31435
|
className: "plc-text-blue-400 focus:plc-ring-blue-500 pelcro-dashboard-membership-address-button",
|
|
31434
31436
|
onClick: () => onChangeAddressClick(membership.id)
|
|
31435
|
-
}, `${t("labels.editAddress")}`)))
|
|
31437
|
+
}, `${t("labels.editAddress")}`)));
|
|
31436
31438
|
});
|
|
31437
31439
|
};
|
|
31438
31440
|
function getActiveMemberships() {
|
|
31439
31441
|
var _window$Pelcro$user$r, _window$Pelcro$user$r2;
|
|
31440
|
-
|
|
31442
|
+
const subsStatuses = ["active", "extended", "trialing"];
|
|
31443
|
+
return (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read().memberships) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.filter(membership => membership.status === "active" && subsStatuses.includes(membership.subscription.status))) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
|
|
31441
31444
|
}
|
|
31442
31445
|
function getMemberShipStatus(status) {
|
|
31443
31446
|
return {
|
|
@@ -32177,7 +32180,8 @@ function hasDonationSubs() {
|
|
|
32177
32180
|
}
|
|
32178
32181
|
function hasActiveMemberships() {
|
|
32179
32182
|
var _window$Pelcro$user$r6, _window$Pelcro$user$r7;
|
|
32180
|
-
|
|
32183
|
+
const subsStatuses = ["active", "extended", "trialing"];
|
|
32184
|
+
return (_window$Pelcro$user$r6 = (_window$Pelcro$user$r7 = window.Pelcro.user.read().memberships) === null || _window$Pelcro$user$r7 === void 0 ? void 0 : _window$Pelcro$user$r7.some(membership => membership.status === "active" && subsStatuses.includes(membership.subscription.status))) !== null && _window$Pelcro$user$r6 !== void 0 ? _window$Pelcro$user$r6 : false;
|
|
32181
32185
|
}
|
|
32182
32186
|
const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
|
|
32183
32187
|
|
package/dist/index.esm.js
CHANGED
|
@@ -18930,22 +18930,26 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
18930
18930
|
}
|
|
18931
18931
|
});
|
|
18932
18932
|
}
|
|
18933
|
-
|
|
18934
|
-
|
|
18935
|
-
|
|
18936
|
-
|
|
18937
|
-
|
|
18938
|
-
|
|
18939
|
-
|
|
18940
|
-
|
|
18941
|
-
|
|
18942
|
-
|
|
18943
|
-
|
|
18933
|
+
if (res) {
|
|
18934
|
+
setTimeout(() => {
|
|
18935
|
+
window.Pelcro.paymentMethods.deletePaymentMethod({
|
|
18936
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
18937
|
+
payment_method_id: paymentMethodId
|
|
18938
|
+
}, (err, res) => {
|
|
18939
|
+
if (err) {
|
|
18940
|
+
onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
|
|
18941
|
+
return dispatch({
|
|
18942
|
+
type: SHOW_ALERT,
|
|
18943
|
+
payload: {
|
|
18944
|
+
type: "error",
|
|
18945
|
+
content: getErrorMessages(err)
|
|
18946
|
+
}
|
|
18947
|
+
});
|
|
18944
18948
|
}
|
|
18949
|
+
onSuccess(res);
|
|
18945
18950
|
});
|
|
18946
|
-
}
|
|
18947
|
-
|
|
18948
|
-
});
|
|
18951
|
+
}, 1000);
|
|
18952
|
+
}
|
|
18949
18953
|
});
|
|
18950
18954
|
}
|
|
18951
18955
|
function updateVantivCard() {
|
|
@@ -31384,9 +31388,7 @@ const MembershipsItems = () => {
|
|
|
31384
31388
|
};
|
|
31385
31389
|
if (memberships.length === 0) return null;
|
|
31386
31390
|
return memberships.sort((a, b) => a.created_at - b.created_at).map(membership => {
|
|
31387
|
-
|
|
31388
|
-
(_window$Pelcro$addres = window.Pelcro.address.list()) === null || _window$Pelcro$addres === void 0 ? void 0 : _window$Pelcro$addres.find(address => address.id === membership.address_id);
|
|
31389
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, membership.subscription.ended_at === null && /*#__PURE__*/React__default.createElement("tr", {
|
|
31391
|
+
return /*#__PURE__*/React__default.createElement("tr", {
|
|
31390
31392
|
key: membership.id,
|
|
31391
31393
|
className: `plc-w-full plc-align-top pelcro-membership-row`
|
|
31392
31394
|
}, /*#__PURE__*/React__default.createElement("td", {
|
|
@@ -31402,12 +31404,13 @@ const MembershipsItems = () => {
|
|
|
31402
31404
|
}),
|
|
31403
31405
|
className: "plc-text-blue-400 focus:plc-ring-blue-500 pelcro-dashboard-membership-address-button",
|
|
31404
31406
|
onClick: () => onChangeAddressClick(membership.id)
|
|
31405
|
-
}, `${t("labels.editAddress")}`)))
|
|
31407
|
+
}, `${t("labels.editAddress")}`)));
|
|
31406
31408
|
});
|
|
31407
31409
|
};
|
|
31408
31410
|
function getActiveMemberships() {
|
|
31409
31411
|
var _window$Pelcro$user$r, _window$Pelcro$user$r2;
|
|
31410
|
-
|
|
31412
|
+
const subsStatuses = ["active", "extended", "trialing"];
|
|
31413
|
+
return (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read().memberships) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.filter(membership => membership.status === "active" && subsStatuses.includes(membership.subscription.status))) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
|
|
31411
31414
|
}
|
|
31412
31415
|
function getMemberShipStatus(status) {
|
|
31413
31416
|
return {
|
|
@@ -32147,7 +32150,8 @@ function hasDonationSubs() {
|
|
|
32147
32150
|
}
|
|
32148
32151
|
function hasActiveMemberships() {
|
|
32149
32152
|
var _window$Pelcro$user$r6, _window$Pelcro$user$r7;
|
|
32150
|
-
|
|
32153
|
+
const subsStatuses = ["active", "extended", "trialing"];
|
|
32154
|
+
return (_window$Pelcro$user$r6 = (_window$Pelcro$user$r7 = window.Pelcro.user.read().memberships) === null || _window$Pelcro$user$r7 === void 0 ? void 0 : _window$Pelcro$user$r7.some(membership => membership.status === "active" && subsStatuses.includes(membership.subscription.status))) !== null && _window$Pelcro$user$r6 !== void 0 ? _window$Pelcro$user$r6 : false;
|
|
32151
32155
|
}
|
|
32152
32156
|
const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
|
|
32153
32157
|
|