@pelcro/react-pelcro-js 3.4.0 → 3.4.1-beta.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/dist/index.cjs.js +238 -48
- package/dist/index.esm.js +238 -48
- package/dist/pelcro.css +5 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -5048,6 +5048,7 @@ var labels$e = {
|
|
|
5048
5048
|
purchases: "Purchases",
|
|
5049
5049
|
subscriptions: "Subscriptions",
|
|
5050
5050
|
donations: "Donations",
|
|
5051
|
+
memberships: "Memberships",
|
|
5051
5052
|
invoices: "Invoices",
|
|
5052
5053
|
details: "Details",
|
|
5053
5054
|
view: "View",
|
|
@@ -5139,6 +5140,7 @@ var labels$d = {
|
|
|
5139
5140
|
purchases: "Achats",
|
|
5140
5141
|
subscriptions: "Abonnements",
|
|
5141
5142
|
donations: "Des dons",
|
|
5143
|
+
memberships: "Adhésions",
|
|
5142
5144
|
invoices: "Invoices",
|
|
5143
5145
|
details: "Details",
|
|
5144
5146
|
view: "View",
|
|
@@ -5230,6 +5232,7 @@ var labels$c = {
|
|
|
5230
5232
|
purchases: "구매",
|
|
5231
5233
|
subscriptions: "유료 멤버십",
|
|
5232
5234
|
donations: "기부",
|
|
5235
|
+
memberships: "멤버십",
|
|
5233
5236
|
invoices: "인보이스",
|
|
5234
5237
|
details: "세부 정보",
|
|
5235
5238
|
view: "보기",
|
|
@@ -7145,6 +7148,23 @@ class PelcroActions {
|
|
|
7145
7148
|
return true;
|
|
7146
7149
|
});
|
|
7147
7150
|
|
|
7151
|
+
_defineProperty$3(this, "setSelectedMembership", id => {
|
|
7152
|
+
var _window$Pelcro$user$r, _window$Pelcro$user$r2;
|
|
7153
|
+
|
|
7154
|
+
const memberships = (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.memberships) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
|
|
7155
|
+
const membership = memberships.find(membership => String(membership.id) === String(id));
|
|
7156
|
+
|
|
7157
|
+
if (!membership) {
|
|
7158
|
+
console.error("invalid membership id");
|
|
7159
|
+
return false;
|
|
7160
|
+
}
|
|
7161
|
+
|
|
7162
|
+
this.set({
|
|
7163
|
+
selectedMembership: membership
|
|
7164
|
+
});
|
|
7165
|
+
return true;
|
|
7166
|
+
});
|
|
7167
|
+
|
|
7148
7168
|
_defineProperty$3(this, "logout", () => {
|
|
7149
7169
|
var _ReactGA$event;
|
|
7150
7170
|
|
|
@@ -7352,6 +7372,8 @@ const initialState$l = {
|
|
|
7352
7372
|
// null | SKU[] | SKU,
|
|
7353
7373
|
// invoices
|
|
7354
7374
|
invoice: null,
|
|
7375
|
+
// memberships
|
|
7376
|
+
selectedMembership: null,
|
|
7355
7377
|
// User
|
|
7356
7378
|
isAuthenticated: () => window.Pelcro.user.isAuthenticated(),
|
|
7357
7379
|
selectedPaymentMethodId: null,
|
|
@@ -9087,7 +9109,7 @@ toast.confirm = (onConfirm, {
|
|
|
9087
9109
|
};
|
|
9088
9110
|
};
|
|
9089
9111
|
|
|
9090
|
-
const notify = toast;
|
|
9112
|
+
const notify$1 = toast;
|
|
9091
9113
|
|
|
9092
9114
|
const translations = i18next.t("common:buttons", {
|
|
9093
9115
|
returnObjects: true
|
|
@@ -9297,7 +9319,7 @@ const init$1 = () => {
|
|
|
9297
9319
|
const errorMsg = i18next.t("shop:messages.currencyMismatch", {
|
|
9298
9320
|
currency: userCurrency
|
|
9299
9321
|
});
|
|
9300
|
-
notify.error(errorMsg);
|
|
9322
|
+
notify$1.error(errorMsg);
|
|
9301
9323
|
}
|
|
9302
9324
|
});
|
|
9303
9325
|
}
|
|
@@ -9391,7 +9413,7 @@ const init = () => {
|
|
|
9391
9413
|
elemDeepClone.setAttribute("style", "filter:blur(3px) !important; pointer-events:none !important; user-select:none !important");
|
|
9392
9414
|
unblurElemWhenUserSubscribes(elemDeepClone, entitlements);
|
|
9393
9415
|
const NOTIFICATION_ID = "entitlement";
|
|
9394
|
-
notify( /*#__PURE__*/React__default['default'].createElement("p", null, /*#__PURE__*/React__default['default'].createElement(Trans, {
|
|
9416
|
+
notify$1( /*#__PURE__*/React__default['default'].createElement("p", null, /*#__PURE__*/React__default['default'].createElement(Trans, {
|
|
9395
9417
|
i18nKey: "messages:entitlement"
|
|
9396
9418
|
}, "Some of the content on this page is available with one or more of our plans.", /*#__PURE__*/React__default['default'].createElement(Link, {
|
|
9397
9419
|
onClick: () => {
|
|
@@ -9408,7 +9430,7 @@ const init = () => {
|
|
|
9408
9430
|
});
|
|
9409
9431
|
}
|
|
9410
9432
|
|
|
9411
|
-
notify.dismiss(NOTIFICATION_ID);
|
|
9433
|
+
notify$1.dismiss(NOTIFICATION_ID);
|
|
9412
9434
|
switchView("_plan-select-entitlements");
|
|
9413
9435
|
}
|
|
9414
9436
|
}, "Subscribe"), "now to get full page access.")), {
|
|
@@ -10152,10 +10174,10 @@ const verifyEmailTokenFromUrl = () => {
|
|
|
10152
10174
|
token: emailToken
|
|
10153
10175
|
}, (err, res) => {
|
|
10154
10176
|
if (err) {
|
|
10155
|
-
return notify.error(getErrorMessages(err));
|
|
10177
|
+
return notify$1.error(getErrorMessages(err));
|
|
10156
10178
|
}
|
|
10157
10179
|
|
|
10158
|
-
return notify.success(translations.success);
|
|
10180
|
+
return notify$1.success(translations.success);
|
|
10159
10181
|
});
|
|
10160
10182
|
}, {
|
|
10161
10183
|
once: true
|
|
@@ -10181,7 +10203,7 @@ const verifyLinkTokenFromUrl = () => {
|
|
|
10181
10203
|
token: loginToken
|
|
10182
10204
|
}, (err, res) => {
|
|
10183
10205
|
if (err) {
|
|
10184
|
-
return notify.error(getErrorMessages(err));
|
|
10206
|
+
return notify$1.error(getErrorMessages(err));
|
|
10185
10207
|
}
|
|
10186
10208
|
|
|
10187
10209
|
const {
|
|
@@ -10191,11 +10213,11 @@ const verifyLinkTokenFromUrl = () => {
|
|
|
10191
10213
|
auth_token
|
|
10192
10214
|
}, (err, res) => {
|
|
10193
10215
|
if (err) {
|
|
10194
|
-
return notify.error(getErrorMessages(err));
|
|
10216
|
+
return notify$1.error(getErrorMessages(err));
|
|
10195
10217
|
}
|
|
10196
10218
|
|
|
10197
10219
|
resetView();
|
|
10198
|
-
return notify.success(translations.success);
|
|
10220
|
+
return notify$1.success(translations.success);
|
|
10199
10221
|
});
|
|
10200
10222
|
});
|
|
10201
10223
|
}, {
|
|
@@ -10236,7 +10258,7 @@ const showInvoiceDetailsFromUrl = () => {
|
|
|
10236
10258
|
const errorMessage = i18next.t("messages:invalidInvoice", {
|
|
10237
10259
|
returnObjects: true
|
|
10238
10260
|
});
|
|
10239
|
-
return notify.error(errorMessage);
|
|
10261
|
+
return notify$1.error(errorMessage);
|
|
10240
10262
|
}
|
|
10241
10263
|
|
|
10242
10264
|
const {
|
|
@@ -10247,7 +10269,7 @@ const showInvoiceDetailsFromUrl = () => {
|
|
|
10247
10269
|
const errorMessage = i18next.t("messages:zeroTotalInvoice", {
|
|
10248
10270
|
returnObjects: true
|
|
10249
10271
|
});
|
|
10250
|
-
return notify.error(errorMessage);
|
|
10272
|
+
return notify$1.error(errorMessage);
|
|
10251
10273
|
}
|
|
10252
10274
|
|
|
10253
10275
|
return switchView("invoice-details");
|
|
@@ -12501,7 +12523,7 @@ class SelectModal extends React.Component {
|
|
|
12501
12523
|
}
|
|
12502
12524
|
}
|
|
12503
12525
|
|
|
12504
|
-
return `${startingPlan.amount_formatted}/${startingPlan.interval}`;
|
|
12526
|
+
return `${startingPlan.amount_formatted}/${startingPlan.interval_count > 1 ? `${startingPlan.interval_count} ${startingPlan.interval}s` : `${startingPlan.interval}`}`;
|
|
12505
12527
|
});
|
|
12506
12528
|
|
|
12507
12529
|
_defineProperty$3(this, "renderOneProduct", (product, index, options) => {
|
|
@@ -12527,7 +12549,7 @@ class SelectModal extends React.Component {
|
|
|
12527
12549
|
className: "plc-flex plc-items-end plc-w-full plc-mt-3"
|
|
12528
12550
|
}, product.plans && /*#__PURE__*/React__default['default'].createElement("p", {
|
|
12529
12551
|
className: "plc-w-1/2 plc-text-xs pelcro-select-product-cost"
|
|
12530
|
-
}, this.locale("labels.startingAt"), " ", this.countStartPrice(product.plans)), /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
|
|
12552
|
+
}, this.locale("labels.startingAt"), " ", this.countStartPrice(product.plans), console.log(product)), /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
|
|
12531
12553
|
onClick: productButtonCallback,
|
|
12532
12554
|
"data-key": product.id,
|
|
12533
12555
|
id: "pelcro-select-product-back-button",
|
|
@@ -17030,7 +17052,7 @@ const SubscriptionCancelNowButton = ({
|
|
|
17030
17052
|
|
|
17031
17053
|
switchView(null); //Show confirmation alert after closing the modal
|
|
17032
17054
|
|
|
17033
|
-
notify.confirm((onSuccess, onFailure) => {
|
|
17055
|
+
notify$1.confirm((onSuccess, onFailure) => {
|
|
17034
17056
|
cancelSubscription(payload, onSuccess, onFailure);
|
|
17035
17057
|
}, {
|
|
17036
17058
|
confirmMessage: t("messages.subCancellation.isSureToCancelNow"),
|
|
@@ -17102,7 +17124,7 @@ const SubscriptionCancelLaterButton = ({
|
|
|
17102
17124
|
|
|
17103
17125
|
switchView(null); //Show confirmation alert after closing the modal
|
|
17104
17126
|
|
|
17105
|
-
notify.confirm((onSuccess, onFailure) => {
|
|
17127
|
+
notify$1.confirm((onSuccess, onFailure) => {
|
|
17106
17128
|
cancelSubscription(payload, onSuccess, onFailure);
|
|
17107
17129
|
}, {
|
|
17108
17130
|
confirmMessage: t("messages.subCancellation.isSureToCancel"),
|
|
@@ -18433,6 +18455,7 @@ const AddressCreateContainer = ({
|
|
|
18433
18455
|
className = "",
|
|
18434
18456
|
type = "shipping",
|
|
18435
18457
|
onGiftRedemptionSuccess = () => {},
|
|
18458
|
+
onMembershipAdressUpdateSuccess = () => {},
|
|
18436
18459
|
onSuccess = () => {},
|
|
18437
18460
|
onFailure = () => {},
|
|
18438
18461
|
children,
|
|
@@ -18448,7 +18471,8 @@ const AddressCreateContainer = ({
|
|
|
18448
18471
|
subscriptionIdToRenew: subscriptionIdToRenewFromStore,
|
|
18449
18472
|
product,
|
|
18450
18473
|
order,
|
|
18451
|
-
set
|
|
18474
|
+
set,
|
|
18475
|
+
selectedMembership
|
|
18452
18476
|
} = usePelcro();
|
|
18453
18477
|
const giftCode = (_props$giftCode = props.giftCode) !== null && _props$giftCode !== void 0 ? _props$giftCode : giftCodeFromStore;
|
|
18454
18478
|
const subscriptionIdToRenew = (_ref = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : subscriptionIdToRenewFromStore) !== null && _ref !== void 0 ? _ref : undefined;
|
|
@@ -18526,6 +18550,37 @@ const AddressCreateContainer = ({
|
|
|
18526
18550
|
|
|
18527
18551
|
const newAddressId = String(getNewlyCreatedAddress(res.data.addresses).id);
|
|
18528
18552
|
|
|
18553
|
+
if (selectedMembership) {
|
|
18554
|
+
dispatch({
|
|
18555
|
+
type: LOADING,
|
|
18556
|
+
payload: true
|
|
18557
|
+
});
|
|
18558
|
+
return window.Pelcro.membership.update({
|
|
18559
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
18560
|
+
address_id: newAddressId,
|
|
18561
|
+
membership_id: selectedMembership.id
|
|
18562
|
+
}, (err, res) => {
|
|
18563
|
+
dispatch({
|
|
18564
|
+
type: LOADING,
|
|
18565
|
+
payload: false
|
|
18566
|
+
});
|
|
18567
|
+
|
|
18568
|
+
if (err) {
|
|
18569
|
+
dispatch({
|
|
18570
|
+
type: SHOW_ALERT,
|
|
18571
|
+
payload: {
|
|
18572
|
+
type: "error",
|
|
18573
|
+
content: getErrorMessages(err)
|
|
18574
|
+
}
|
|
18575
|
+
});
|
|
18576
|
+
return onFailure(err);
|
|
18577
|
+
}
|
|
18578
|
+
|
|
18579
|
+
notify.success(t("messages.addressUpdated"));
|
|
18580
|
+
return onMembershipAdressUpdateSuccess(res);
|
|
18581
|
+
});
|
|
18582
|
+
}
|
|
18583
|
+
|
|
18529
18584
|
if (product || order) {
|
|
18530
18585
|
set({
|
|
18531
18586
|
selectedAddressId: newAddressId
|
|
@@ -19190,6 +19245,13 @@ const AddressCreateModal = ({
|
|
|
19190
19245
|
|
|
19191
19246
|
(_otherProps$onGiftRed = otherProps.onGiftRedemptionSuccess) === null || _otherProps$onGiftRed === void 0 ? void 0 : _otherProps$onGiftRed.call(otherProps);
|
|
19192
19247
|
switchView("subscription-success");
|
|
19248
|
+
}; // FIXME: implement me
|
|
19249
|
+
|
|
19250
|
+
|
|
19251
|
+
const onMembershipAdressUpdateSuccess = () => {
|
|
19252
|
+
var _otherProps$onMembers;
|
|
19253
|
+
|
|
19254
|
+
(_otherProps$onMembers = otherProps.onMembershipAdressUpdateSuccess) === null || _otherProps$onMembers === void 0 ? void 0 : _otherProps$onMembers.call(otherProps);
|
|
19193
19255
|
};
|
|
19194
19256
|
|
|
19195
19257
|
return /*#__PURE__*/React__default['default'].createElement(Modal, {
|
|
@@ -19198,7 +19260,8 @@ const AddressCreateModal = ({
|
|
|
19198
19260
|
onClose: onClose
|
|
19199
19261
|
}, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(AddressCreateView, Object.assign({}, otherProps, {
|
|
19200
19262
|
onSuccess: onSuccess,
|
|
19201
|
-
onGiftRedemptionSuccess: onGiftRedemptionSuccess
|
|
19263
|
+
onGiftRedemptionSuccess: onGiftRedemptionSuccess,
|
|
19264
|
+
onMembershipAdressUpdateSuccess: onMembershipAdressUpdateSuccess
|
|
19202
19265
|
}))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
|
|
19203
19266
|
};
|
|
19204
19267
|
AddressCreateModal.viewId = "address-create";
|
|
@@ -22011,6 +22074,7 @@ const AddressSelectContainer = ({
|
|
|
22011
22074
|
style,
|
|
22012
22075
|
className = "",
|
|
22013
22076
|
onGiftRedemptionSuccess = () => {},
|
|
22077
|
+
onMembershipAdressUpdateSuccess = () => {},
|
|
22014
22078
|
onSuccess = () => {},
|
|
22015
22079
|
onFailure = () => {},
|
|
22016
22080
|
children,
|
|
@@ -22018,11 +22082,14 @@ const AddressSelectContainer = ({
|
|
|
22018
22082
|
}) => {
|
|
22019
22083
|
var _props$giftCode, _ref, _props$subscriptionId;
|
|
22020
22084
|
|
|
22021
|
-
|
|
22085
|
+
const {
|
|
22086
|
+
t
|
|
22087
|
+
} = useTranslation("address");
|
|
22022
22088
|
const {
|
|
22023
22089
|
giftCode: giftCodeFromStore,
|
|
22024
22090
|
subscriptionIdToRenew: subscriptionIdToRenewFromStore,
|
|
22025
|
-
set
|
|
22091
|
+
set,
|
|
22092
|
+
selectedMembership
|
|
22026
22093
|
} = usePelcro();
|
|
22027
22094
|
const giftCode = (_props$giftCode = props.giftCode) !== null && _props$giftCode !== void 0 ? _props$giftCode : giftCodeFromStore;
|
|
22028
22095
|
const subscriptionIdToRenew = (_ref = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : subscriptionIdToRenewFromStore) !== null && _ref !== void 0 ? _ref : undefined;
|
|
@@ -22034,39 +22101,70 @@ const AddressSelectContainer = ({
|
|
|
22034
22101
|
selectedAddressId
|
|
22035
22102
|
});
|
|
22036
22103
|
|
|
22037
|
-
if (
|
|
22038
|
-
|
|
22104
|
+
if (selectedMembership.id) {
|
|
22105
|
+
dispatch({
|
|
22106
|
+
type: LOADING,
|
|
22107
|
+
payload: true
|
|
22108
|
+
});
|
|
22109
|
+
return window.Pelcro.membership.update({
|
|
22110
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
22111
|
+
address_id: selectedAddressId,
|
|
22112
|
+
membership_id: selectedMembership.id
|
|
22113
|
+
}, (err, res) => {
|
|
22114
|
+
dispatch({
|
|
22115
|
+
type: LOADING,
|
|
22116
|
+
payload: false
|
|
22117
|
+
});
|
|
22118
|
+
|
|
22119
|
+
if (err) {
|
|
22120
|
+
dispatch({
|
|
22121
|
+
type: SHOW_ALERT,
|
|
22122
|
+
payload: {
|
|
22123
|
+
type: "error",
|
|
22124
|
+
content: getErrorMessages(err)
|
|
22125
|
+
}
|
|
22126
|
+
});
|
|
22127
|
+
return onFailure(err);
|
|
22128
|
+
}
|
|
22129
|
+
|
|
22130
|
+
notify$1.success(t("messages.addressUpdated"));
|
|
22131
|
+
return onMembershipAdressUpdateSuccess(res);
|
|
22132
|
+
});
|
|
22039
22133
|
}
|
|
22040
22134
|
|
|
22041
|
-
|
|
22042
|
-
type: LOADING,
|
|
22043
|
-
payload: true
|
|
22044
|
-
});
|
|
22045
|
-
window.Pelcro.subscription.redeemGift({
|
|
22046
|
-
auth_token: window.Pelcro.user.read().auth_token,
|
|
22047
|
-
gift_code: giftCode,
|
|
22048
|
-
address_id: selectedAddressId,
|
|
22049
|
-
// redeem gift as a future phase of an existing subscription
|
|
22050
|
-
subscription_id: subscriptionIdToRenew
|
|
22051
|
-
}, (err, res) => {
|
|
22135
|
+
if (giftCode) {
|
|
22052
22136
|
dispatch({
|
|
22053
22137
|
type: LOADING,
|
|
22054
|
-
payload:
|
|
22138
|
+
payload: true
|
|
22055
22139
|
});
|
|
22056
|
-
|
|
22057
|
-
|
|
22140
|
+
return window.Pelcro.subscription.redeemGift({
|
|
22141
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
22142
|
+
gift_code: giftCode,
|
|
22143
|
+
address_id: selectedAddressId,
|
|
22144
|
+
// redeem gift as a future phase of an existing subscription
|
|
22145
|
+
subscription_id: subscriptionIdToRenew
|
|
22146
|
+
}, (err, res) => {
|
|
22058
22147
|
dispatch({
|
|
22059
|
-
type:
|
|
22060
|
-
payload:
|
|
22061
|
-
type: "error",
|
|
22062
|
-
content: getErrorMessages(err)
|
|
22063
|
-
}
|
|
22148
|
+
type: LOADING,
|
|
22149
|
+
payload: false
|
|
22064
22150
|
});
|
|
22065
|
-
return onFailure(err);
|
|
22066
|
-
}
|
|
22067
22151
|
|
|
22068
|
-
|
|
22069
|
-
|
|
22152
|
+
if (err) {
|
|
22153
|
+
dispatch({
|
|
22154
|
+
type: SHOW_ALERT,
|
|
22155
|
+
payload: {
|
|
22156
|
+
type: "error",
|
|
22157
|
+
content: getErrorMessages(err)
|
|
22158
|
+
}
|
|
22159
|
+
});
|
|
22160
|
+
return onFailure(err);
|
|
22161
|
+
}
|
|
22162
|
+
|
|
22163
|
+
return onGiftRedemptionSuccess(res);
|
|
22164
|
+
});
|
|
22165
|
+
}
|
|
22166
|
+
|
|
22167
|
+
onSuccess(selectedAddressId);
|
|
22070
22168
|
};
|
|
22071
22169
|
|
|
22072
22170
|
const [state, dispatch] = useReducerWithSideEffects((state, action) => {
|
|
@@ -22245,6 +22343,13 @@ const AddressSelectModal = ({
|
|
|
22245
22343
|
|
|
22246
22344
|
const onAddNewAddress = () => {
|
|
22247
22345
|
switchView("address-create");
|
|
22346
|
+
}; // FIXME: implement me
|
|
22347
|
+
|
|
22348
|
+
|
|
22349
|
+
const onMembershipAdressUpdateSuccess = () => {
|
|
22350
|
+
var _otherProps$onMembers;
|
|
22351
|
+
|
|
22352
|
+
(_otherProps$onMembers = otherProps.onMembershipAdressUpdateSuccess) === null || _otherProps$onMembers === void 0 ? void 0 : _otherProps$onMembers.call(otherProps);
|
|
22248
22353
|
};
|
|
22249
22354
|
|
|
22250
22355
|
return /*#__PURE__*/React__default['default'].createElement(Modal, {
|
|
@@ -22255,7 +22360,8 @@ const AddressSelectModal = ({
|
|
|
22255
22360
|
onAddNewAddress: onAddNewAddress
|
|
22256
22361
|
}, otherProps, {
|
|
22257
22362
|
onSuccess: onSuccess,
|
|
22258
|
-
onGiftRedemptionSuccess: onGiftRedemptionSuccess
|
|
22363
|
+
onGiftRedemptionSuccess: onGiftRedemptionSuccess,
|
|
22364
|
+
onMembershipAdressUpdateSuccess: onMembershipAdressUpdateSuccess
|
|
22259
22365
|
}))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
|
|
22260
22366
|
};
|
|
22261
22367
|
AddressSelectModal.viewId = "address-select";
|
|
@@ -24013,7 +24119,7 @@ const SubscriptionsItems = ({
|
|
|
24013
24119
|
}
|
|
24014
24120
|
|
|
24015
24121
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
24016
|
-
notify.confirm((onSuccess, onFailure) => {
|
|
24122
|
+
notify$1.confirm((onSuccess, onFailure) => {
|
|
24017
24123
|
cancelSubscription(sub.id, onSuccess, onFailure);
|
|
24018
24124
|
}, {
|
|
24019
24125
|
confirmMessage: t("messages.subCancellation.isSureToCancel"),
|
|
@@ -24594,10 +24700,80 @@ function getInvoiceStatus(invoice) {
|
|
|
24594
24700
|
}
|
|
24595
24701
|
}
|
|
24596
24702
|
|
|
24703
|
+
const MembershipsMenu = props => {
|
|
24704
|
+
const {
|
|
24705
|
+
t
|
|
24706
|
+
} = useTranslation("dashboard");
|
|
24707
|
+
return /*#__PURE__*/React__default['default'].createElement("table", {
|
|
24708
|
+
className: "plc-w-full plc-table-fixed"
|
|
24709
|
+
}, /*#__PURE__*/React__default['default'].createElement("thead", {
|
|
24710
|
+
className: "plc-text-xs plc-font-semibold plc-tracking-wider plc-text-gray-400 plc-uppercase "
|
|
24711
|
+
}, /*#__PURE__*/React__default['default'].createElement("tr", null, /*#__PURE__*/React__default['default'].createElement("th", {
|
|
24712
|
+
className: "plc-w-5/12 "
|
|
24713
|
+
}, t("labels.plan")), /*#__PURE__*/React__default['default'].createElement("th", {
|
|
24714
|
+
className: "plc-w-4/12 "
|
|
24715
|
+
}, t("labels.status.title")), /*#__PURE__*/React__default['default'].createElement("th", {
|
|
24716
|
+
className: "plc-w-3/12 "
|
|
24717
|
+
}, t("labels.actions")))), /*#__PURE__*/React__default['default'].createElement("tbody", null, /*#__PURE__*/React__default['default'].createElement("tr", {
|
|
24718
|
+
className: "plc-h-4"
|
|
24719
|
+
})), /*#__PURE__*/React__default['default'].createElement(MembershipsItems, props));
|
|
24720
|
+
};
|
|
24721
|
+
|
|
24722
|
+
const MembershipsItems = () => {
|
|
24723
|
+
const {
|
|
24724
|
+
t
|
|
24725
|
+
} = useTranslation("dashboard");
|
|
24726
|
+
const {
|
|
24727
|
+
switchView,
|
|
24728
|
+
setSelectedMembership,
|
|
24729
|
+
switchToAddressView
|
|
24730
|
+
} = usePelcro();
|
|
24731
|
+
const memberships = getActiveMemberships();
|
|
24732
|
+
|
|
24733
|
+
const onChangeAddressClick = membershipId => {
|
|
24734
|
+
if (userMustVerifyEmail()) {
|
|
24735
|
+
return switchView("email-verify");
|
|
24736
|
+
}
|
|
24737
|
+
|
|
24738
|
+
if (setSelectedMembership(membershipId)) {
|
|
24739
|
+
return switchToAddressView();
|
|
24740
|
+
}
|
|
24741
|
+
};
|
|
24742
|
+
|
|
24743
|
+
if (memberships.length === 0) return null;
|
|
24744
|
+
return memberships.sort((a, b) => a.created_at - b.created_at).map(membership => {
|
|
24745
|
+
var _window$Pelcro$addres;
|
|
24746
|
+
|
|
24747
|
+
(_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);
|
|
24748
|
+
return /*#__PURE__*/React__default['default'].createElement("tr", {
|
|
24749
|
+
key: membership.id,
|
|
24750
|
+
className: `plc-w-full plc-align-top pelcro-membership-row`
|
|
24751
|
+
}, /*#__PURE__*/React__default['default'].createElement("td", {
|
|
24752
|
+
className: "plc-truncate"
|
|
24753
|
+
}, membership.subscription.plan.nickname && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
24754
|
+
className: "plc-font-semibold plc-text-gray-500 pelcro-membership-plan"
|
|
24755
|
+
}, membership.subscription.plan.nickname))), /*#__PURE__*/React__default['default'].createElement("td", null, /*#__PURE__*/React__default['default'].createElement("span", null, membership.status)), /*#__PURE__*/React__default['default'].createElement("td", null, /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
24756
|
+
variant: "ghost",
|
|
24757
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgEdit, {
|
|
24758
|
+
className: "plc-w-4 plc-h-4"
|
|
24759
|
+
}),
|
|
24760
|
+
className: "plc-text-blue-400 focus:plc-ring-blue-500 pelcro-dashboard-membership-address-button",
|
|
24761
|
+
onClick: () => onChangeAddressClick(membership.id)
|
|
24762
|
+
}, t("labels.edit"))));
|
|
24763
|
+
});
|
|
24764
|
+
};
|
|
24765
|
+
|
|
24766
|
+
function getActiveMemberships() {
|
|
24767
|
+
var _window$Pelcro$user$r, _window$Pelcro$user$r2;
|
|
24768
|
+
|
|
24769
|
+
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")) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
|
|
24770
|
+
}
|
|
24771
|
+
|
|
24597
24772
|
const SUB_MENUS = {
|
|
24598
24773
|
PROFILE: "profile",
|
|
24599
24774
|
SUBSCRIPTIONS: "subscriptions",
|
|
24600
24775
|
DONATIONS: "donations",
|
|
24776
|
+
MEMBERSHIPS: "memberships",
|
|
24601
24777
|
PAYMENT_CARDS: "payment-cards",
|
|
24602
24778
|
ADDRESSES: "addresses",
|
|
24603
24779
|
GIFTS: "gifts",
|
|
@@ -25128,6 +25304,14 @@ class Dashboard extends React.Component {
|
|
|
25128
25304
|
displayProductSelect: this.displayProductSelect,
|
|
25129
25305
|
displayRedeem: this.displayRedeem
|
|
25130
25306
|
})
|
|
25307
|
+
}), /*#__PURE__*/React__default['default'].createElement(Accordion.item, {
|
|
25308
|
+
show: hasActiveMemberships(),
|
|
25309
|
+
name: SUB_MENUS.MEMBERSHIPS,
|
|
25310
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgDonate, {
|
|
25311
|
+
className: "plc-transform plc-scale-120 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
|
|
25312
|
+
}),
|
|
25313
|
+
title: this.locale("labels.memberships"),
|
|
25314
|
+
content: /*#__PURE__*/React__default['default'].createElement(MembershipsMenu, null)
|
|
25131
25315
|
}), /*#__PURE__*/React__default['default'].createElement(Accordion.item, {
|
|
25132
25316
|
show: hasDonationSubs(),
|
|
25133
25317
|
name: SUB_MENUS.DONATIONS,
|
|
@@ -25183,6 +25367,12 @@ function hasDonationSubs() {
|
|
|
25183
25367
|
return donations.length > 0 || canceledDonations.length > 0;
|
|
25184
25368
|
}
|
|
25185
25369
|
|
|
25370
|
+
function hasActiveMemberships() {
|
|
25371
|
+
var _window$Pelcro$user$r6, _window$Pelcro$user$r7;
|
|
25372
|
+
|
|
25373
|
+
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")) !== null && _window$Pelcro$user$r6 !== void 0 ? _window$Pelcro$user$r6 : false;
|
|
25374
|
+
}
|
|
25375
|
+
|
|
25186
25376
|
const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
|
|
25187
25377
|
|
|
25188
25378
|
// The button in the lower right that shows the dashboard.
|
|
@@ -27337,7 +27527,7 @@ function VerifyLinkTokenModal({
|
|
|
27337
27527
|
|
|
27338
27528
|
(_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
|
|
27339
27529
|
resetView();
|
|
27340
|
-
notify.success(t("messages.success"));
|
|
27530
|
+
notify$1.success(t("messages.success"));
|
|
27341
27531
|
};
|
|
27342
27532
|
|
|
27343
27533
|
return /*#__PURE__*/React__default['default'].createElement(Modal, {
|
|
@@ -27791,6 +27981,6 @@ exports.i18n = i18next;
|
|
|
27791
27981
|
exports.initButtons = init$1;
|
|
27792
27982
|
exports.initContentEntitlement = init;
|
|
27793
27983
|
exports.invoicePaymentSubmitButton = invoicePaymentSubmitButton;
|
|
27794
|
-
exports.notify = notify;
|
|
27984
|
+
exports.notify = notify$1;
|
|
27795
27985
|
exports.unauthenticatedButtons = unauthenticatedButtons;
|
|
27796
27986
|
exports.usePelcro = usePelcro;
|
package/dist/index.esm.js
CHANGED
|
@@ -5018,6 +5018,7 @@ var labels$e = {
|
|
|
5018
5018
|
purchases: "Purchases",
|
|
5019
5019
|
subscriptions: "Subscriptions",
|
|
5020
5020
|
donations: "Donations",
|
|
5021
|
+
memberships: "Memberships",
|
|
5021
5022
|
invoices: "Invoices",
|
|
5022
5023
|
details: "Details",
|
|
5023
5024
|
view: "View",
|
|
@@ -5109,6 +5110,7 @@ var labels$d = {
|
|
|
5109
5110
|
purchases: "Achats",
|
|
5110
5111
|
subscriptions: "Abonnements",
|
|
5111
5112
|
donations: "Des dons",
|
|
5113
|
+
memberships: "Adhésions",
|
|
5112
5114
|
invoices: "Invoices",
|
|
5113
5115
|
details: "Details",
|
|
5114
5116
|
view: "View",
|
|
@@ -5200,6 +5202,7 @@ var labels$c = {
|
|
|
5200
5202
|
purchases: "구매",
|
|
5201
5203
|
subscriptions: "유료 멤버십",
|
|
5202
5204
|
donations: "기부",
|
|
5205
|
+
memberships: "멤버십",
|
|
5203
5206
|
invoices: "인보이스",
|
|
5204
5207
|
details: "세부 정보",
|
|
5205
5208
|
view: "보기",
|
|
@@ -7115,6 +7118,23 @@ class PelcroActions {
|
|
|
7115
7118
|
return true;
|
|
7116
7119
|
});
|
|
7117
7120
|
|
|
7121
|
+
_defineProperty$3(this, "setSelectedMembership", id => {
|
|
7122
|
+
var _window$Pelcro$user$r, _window$Pelcro$user$r2;
|
|
7123
|
+
|
|
7124
|
+
const memberships = (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.memberships) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
|
|
7125
|
+
const membership = memberships.find(membership => String(membership.id) === String(id));
|
|
7126
|
+
|
|
7127
|
+
if (!membership) {
|
|
7128
|
+
console.error("invalid membership id");
|
|
7129
|
+
return false;
|
|
7130
|
+
}
|
|
7131
|
+
|
|
7132
|
+
this.set({
|
|
7133
|
+
selectedMembership: membership
|
|
7134
|
+
});
|
|
7135
|
+
return true;
|
|
7136
|
+
});
|
|
7137
|
+
|
|
7118
7138
|
_defineProperty$3(this, "logout", () => {
|
|
7119
7139
|
var _ReactGA$event;
|
|
7120
7140
|
|
|
@@ -7322,6 +7342,8 @@ const initialState$l = {
|
|
|
7322
7342
|
// null | SKU[] | SKU,
|
|
7323
7343
|
// invoices
|
|
7324
7344
|
invoice: null,
|
|
7345
|
+
// memberships
|
|
7346
|
+
selectedMembership: null,
|
|
7325
7347
|
// User
|
|
7326
7348
|
isAuthenticated: () => window.Pelcro.user.isAuthenticated(),
|
|
7327
7349
|
selectedPaymentMethodId: null,
|
|
@@ -9057,7 +9079,7 @@ toast.confirm = (onConfirm, {
|
|
|
9057
9079
|
};
|
|
9058
9080
|
};
|
|
9059
9081
|
|
|
9060
|
-
const notify = toast;
|
|
9082
|
+
const notify$1 = toast;
|
|
9061
9083
|
|
|
9062
9084
|
const translations = i18next.t("common:buttons", {
|
|
9063
9085
|
returnObjects: true
|
|
@@ -9267,7 +9289,7 @@ const init$1 = () => {
|
|
|
9267
9289
|
const errorMsg = i18next.t("shop:messages.currencyMismatch", {
|
|
9268
9290
|
currency: userCurrency
|
|
9269
9291
|
});
|
|
9270
|
-
notify.error(errorMsg);
|
|
9292
|
+
notify$1.error(errorMsg);
|
|
9271
9293
|
}
|
|
9272
9294
|
});
|
|
9273
9295
|
}
|
|
@@ -9361,7 +9383,7 @@ const init = () => {
|
|
|
9361
9383
|
elemDeepClone.setAttribute("style", "filter:blur(3px) !important; pointer-events:none !important; user-select:none !important");
|
|
9362
9384
|
unblurElemWhenUserSubscribes(elemDeepClone, entitlements);
|
|
9363
9385
|
const NOTIFICATION_ID = "entitlement";
|
|
9364
|
-
notify( /*#__PURE__*/React__default.createElement("p", null, /*#__PURE__*/React__default.createElement(Trans, {
|
|
9386
|
+
notify$1( /*#__PURE__*/React__default.createElement("p", null, /*#__PURE__*/React__default.createElement(Trans, {
|
|
9365
9387
|
i18nKey: "messages:entitlement"
|
|
9366
9388
|
}, "Some of the content on this page is available with one or more of our plans.", /*#__PURE__*/React__default.createElement(Link, {
|
|
9367
9389
|
onClick: () => {
|
|
@@ -9378,7 +9400,7 @@ const init = () => {
|
|
|
9378
9400
|
});
|
|
9379
9401
|
}
|
|
9380
9402
|
|
|
9381
|
-
notify.dismiss(NOTIFICATION_ID);
|
|
9403
|
+
notify$1.dismiss(NOTIFICATION_ID);
|
|
9382
9404
|
switchView("_plan-select-entitlements");
|
|
9383
9405
|
}
|
|
9384
9406
|
}, "Subscribe"), "now to get full page access.")), {
|
|
@@ -10122,10 +10144,10 @@ const verifyEmailTokenFromUrl = () => {
|
|
|
10122
10144
|
token: emailToken
|
|
10123
10145
|
}, (err, res) => {
|
|
10124
10146
|
if (err) {
|
|
10125
|
-
return notify.error(getErrorMessages(err));
|
|
10147
|
+
return notify$1.error(getErrorMessages(err));
|
|
10126
10148
|
}
|
|
10127
10149
|
|
|
10128
|
-
return notify.success(translations.success);
|
|
10150
|
+
return notify$1.success(translations.success);
|
|
10129
10151
|
});
|
|
10130
10152
|
}, {
|
|
10131
10153
|
once: true
|
|
@@ -10151,7 +10173,7 @@ const verifyLinkTokenFromUrl = () => {
|
|
|
10151
10173
|
token: loginToken
|
|
10152
10174
|
}, (err, res) => {
|
|
10153
10175
|
if (err) {
|
|
10154
|
-
return notify.error(getErrorMessages(err));
|
|
10176
|
+
return notify$1.error(getErrorMessages(err));
|
|
10155
10177
|
}
|
|
10156
10178
|
|
|
10157
10179
|
const {
|
|
@@ -10161,11 +10183,11 @@ const verifyLinkTokenFromUrl = () => {
|
|
|
10161
10183
|
auth_token
|
|
10162
10184
|
}, (err, res) => {
|
|
10163
10185
|
if (err) {
|
|
10164
|
-
return notify.error(getErrorMessages(err));
|
|
10186
|
+
return notify$1.error(getErrorMessages(err));
|
|
10165
10187
|
}
|
|
10166
10188
|
|
|
10167
10189
|
resetView();
|
|
10168
|
-
return notify.success(translations.success);
|
|
10190
|
+
return notify$1.success(translations.success);
|
|
10169
10191
|
});
|
|
10170
10192
|
});
|
|
10171
10193
|
}, {
|
|
@@ -10206,7 +10228,7 @@ const showInvoiceDetailsFromUrl = () => {
|
|
|
10206
10228
|
const errorMessage = i18next.t("messages:invalidInvoice", {
|
|
10207
10229
|
returnObjects: true
|
|
10208
10230
|
});
|
|
10209
|
-
return notify.error(errorMessage);
|
|
10231
|
+
return notify$1.error(errorMessage);
|
|
10210
10232
|
}
|
|
10211
10233
|
|
|
10212
10234
|
const {
|
|
@@ -10217,7 +10239,7 @@ const showInvoiceDetailsFromUrl = () => {
|
|
|
10217
10239
|
const errorMessage = i18next.t("messages:zeroTotalInvoice", {
|
|
10218
10240
|
returnObjects: true
|
|
10219
10241
|
});
|
|
10220
|
-
return notify.error(errorMessage);
|
|
10242
|
+
return notify$1.error(errorMessage);
|
|
10221
10243
|
}
|
|
10222
10244
|
|
|
10223
10245
|
return switchView("invoice-details");
|
|
@@ -12471,7 +12493,7 @@ class SelectModal extends Component {
|
|
|
12471
12493
|
}
|
|
12472
12494
|
}
|
|
12473
12495
|
|
|
12474
|
-
return `${startingPlan.amount_formatted}/${startingPlan.interval}`;
|
|
12496
|
+
return `${startingPlan.amount_formatted}/${startingPlan.interval_count > 1 ? `${startingPlan.interval_count} ${startingPlan.interval}s` : `${startingPlan.interval}`}`;
|
|
12475
12497
|
});
|
|
12476
12498
|
|
|
12477
12499
|
_defineProperty$3(this, "renderOneProduct", (product, index, options) => {
|
|
@@ -12497,7 +12519,7 @@ class SelectModal extends Component {
|
|
|
12497
12519
|
className: "plc-flex plc-items-end plc-w-full plc-mt-3"
|
|
12498
12520
|
}, product.plans && /*#__PURE__*/React__default.createElement("p", {
|
|
12499
12521
|
className: "plc-w-1/2 plc-text-xs pelcro-select-product-cost"
|
|
12500
|
-
}, this.locale("labels.startingAt"), " ", this.countStartPrice(product.plans)), /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
12522
|
+
}, this.locale("labels.startingAt"), " ", this.countStartPrice(product.plans), console.log(product)), /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
12501
12523
|
onClick: productButtonCallback,
|
|
12502
12524
|
"data-key": product.id,
|
|
12503
12525
|
id: "pelcro-select-product-back-button",
|
|
@@ -17000,7 +17022,7 @@ const SubscriptionCancelNowButton = ({
|
|
|
17000
17022
|
|
|
17001
17023
|
switchView(null); //Show confirmation alert after closing the modal
|
|
17002
17024
|
|
|
17003
|
-
notify.confirm((onSuccess, onFailure) => {
|
|
17025
|
+
notify$1.confirm((onSuccess, onFailure) => {
|
|
17004
17026
|
cancelSubscription(payload, onSuccess, onFailure);
|
|
17005
17027
|
}, {
|
|
17006
17028
|
confirmMessage: t("messages.subCancellation.isSureToCancelNow"),
|
|
@@ -17072,7 +17094,7 @@ const SubscriptionCancelLaterButton = ({
|
|
|
17072
17094
|
|
|
17073
17095
|
switchView(null); //Show confirmation alert after closing the modal
|
|
17074
17096
|
|
|
17075
|
-
notify.confirm((onSuccess, onFailure) => {
|
|
17097
|
+
notify$1.confirm((onSuccess, onFailure) => {
|
|
17076
17098
|
cancelSubscription(payload, onSuccess, onFailure);
|
|
17077
17099
|
}, {
|
|
17078
17100
|
confirmMessage: t("messages.subCancellation.isSureToCancel"),
|
|
@@ -18403,6 +18425,7 @@ const AddressCreateContainer = ({
|
|
|
18403
18425
|
className = "",
|
|
18404
18426
|
type = "shipping",
|
|
18405
18427
|
onGiftRedemptionSuccess = () => {},
|
|
18428
|
+
onMembershipAdressUpdateSuccess = () => {},
|
|
18406
18429
|
onSuccess = () => {},
|
|
18407
18430
|
onFailure = () => {},
|
|
18408
18431
|
children,
|
|
@@ -18418,7 +18441,8 @@ const AddressCreateContainer = ({
|
|
|
18418
18441
|
subscriptionIdToRenew: subscriptionIdToRenewFromStore,
|
|
18419
18442
|
product,
|
|
18420
18443
|
order,
|
|
18421
|
-
set
|
|
18444
|
+
set,
|
|
18445
|
+
selectedMembership
|
|
18422
18446
|
} = usePelcro();
|
|
18423
18447
|
const giftCode = (_props$giftCode = props.giftCode) !== null && _props$giftCode !== void 0 ? _props$giftCode : giftCodeFromStore;
|
|
18424
18448
|
const subscriptionIdToRenew = (_ref = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : subscriptionIdToRenewFromStore) !== null && _ref !== void 0 ? _ref : undefined;
|
|
@@ -18496,6 +18520,37 @@ const AddressCreateContainer = ({
|
|
|
18496
18520
|
|
|
18497
18521
|
const newAddressId = String(getNewlyCreatedAddress(res.data.addresses).id);
|
|
18498
18522
|
|
|
18523
|
+
if (selectedMembership) {
|
|
18524
|
+
dispatch({
|
|
18525
|
+
type: LOADING,
|
|
18526
|
+
payload: true
|
|
18527
|
+
});
|
|
18528
|
+
return window.Pelcro.membership.update({
|
|
18529
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
18530
|
+
address_id: newAddressId,
|
|
18531
|
+
membership_id: selectedMembership.id
|
|
18532
|
+
}, (err, res) => {
|
|
18533
|
+
dispatch({
|
|
18534
|
+
type: LOADING,
|
|
18535
|
+
payload: false
|
|
18536
|
+
});
|
|
18537
|
+
|
|
18538
|
+
if (err) {
|
|
18539
|
+
dispatch({
|
|
18540
|
+
type: SHOW_ALERT,
|
|
18541
|
+
payload: {
|
|
18542
|
+
type: "error",
|
|
18543
|
+
content: getErrorMessages(err)
|
|
18544
|
+
}
|
|
18545
|
+
});
|
|
18546
|
+
return onFailure(err);
|
|
18547
|
+
}
|
|
18548
|
+
|
|
18549
|
+
notify.success(t("messages.addressUpdated"));
|
|
18550
|
+
return onMembershipAdressUpdateSuccess(res);
|
|
18551
|
+
});
|
|
18552
|
+
}
|
|
18553
|
+
|
|
18499
18554
|
if (product || order) {
|
|
18500
18555
|
set({
|
|
18501
18556
|
selectedAddressId: newAddressId
|
|
@@ -19160,6 +19215,13 @@ const AddressCreateModal = ({
|
|
|
19160
19215
|
|
|
19161
19216
|
(_otherProps$onGiftRed = otherProps.onGiftRedemptionSuccess) === null || _otherProps$onGiftRed === void 0 ? void 0 : _otherProps$onGiftRed.call(otherProps);
|
|
19162
19217
|
switchView("subscription-success");
|
|
19218
|
+
}; // FIXME: implement me
|
|
19219
|
+
|
|
19220
|
+
|
|
19221
|
+
const onMembershipAdressUpdateSuccess = () => {
|
|
19222
|
+
var _otherProps$onMembers;
|
|
19223
|
+
|
|
19224
|
+
(_otherProps$onMembers = otherProps.onMembershipAdressUpdateSuccess) === null || _otherProps$onMembers === void 0 ? void 0 : _otherProps$onMembers.call(otherProps);
|
|
19163
19225
|
};
|
|
19164
19226
|
|
|
19165
19227
|
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
@@ -19168,7 +19230,8 @@ const AddressCreateModal = ({
|
|
|
19168
19230
|
onClose: onClose
|
|
19169
19231
|
}, /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement(AddressCreateView, Object.assign({}, otherProps, {
|
|
19170
19232
|
onSuccess: onSuccess,
|
|
19171
|
-
onGiftRedemptionSuccess: onGiftRedemptionSuccess
|
|
19233
|
+
onGiftRedemptionSuccess: onGiftRedemptionSuccess,
|
|
19234
|
+
onMembershipAdressUpdateSuccess: onMembershipAdressUpdateSuccess
|
|
19172
19235
|
}))), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement(Authorship, null)));
|
|
19173
19236
|
};
|
|
19174
19237
|
AddressCreateModal.viewId = "address-create";
|
|
@@ -21981,6 +22044,7 @@ const AddressSelectContainer = ({
|
|
|
21981
22044
|
style,
|
|
21982
22045
|
className = "",
|
|
21983
22046
|
onGiftRedemptionSuccess = () => {},
|
|
22047
|
+
onMembershipAdressUpdateSuccess = () => {},
|
|
21984
22048
|
onSuccess = () => {},
|
|
21985
22049
|
onFailure = () => {},
|
|
21986
22050
|
children,
|
|
@@ -21988,11 +22052,14 @@ const AddressSelectContainer = ({
|
|
|
21988
22052
|
}) => {
|
|
21989
22053
|
var _props$giftCode, _ref, _props$subscriptionId;
|
|
21990
22054
|
|
|
21991
|
-
|
|
22055
|
+
const {
|
|
22056
|
+
t
|
|
22057
|
+
} = useTranslation("address");
|
|
21992
22058
|
const {
|
|
21993
22059
|
giftCode: giftCodeFromStore,
|
|
21994
22060
|
subscriptionIdToRenew: subscriptionIdToRenewFromStore,
|
|
21995
|
-
set
|
|
22061
|
+
set,
|
|
22062
|
+
selectedMembership
|
|
21996
22063
|
} = usePelcro();
|
|
21997
22064
|
const giftCode = (_props$giftCode = props.giftCode) !== null && _props$giftCode !== void 0 ? _props$giftCode : giftCodeFromStore;
|
|
21998
22065
|
const subscriptionIdToRenew = (_ref = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : subscriptionIdToRenewFromStore) !== null && _ref !== void 0 ? _ref : undefined;
|
|
@@ -22004,39 +22071,70 @@ const AddressSelectContainer = ({
|
|
|
22004
22071
|
selectedAddressId
|
|
22005
22072
|
});
|
|
22006
22073
|
|
|
22007
|
-
if (
|
|
22008
|
-
|
|
22074
|
+
if (selectedMembership.id) {
|
|
22075
|
+
dispatch({
|
|
22076
|
+
type: LOADING,
|
|
22077
|
+
payload: true
|
|
22078
|
+
});
|
|
22079
|
+
return window.Pelcro.membership.update({
|
|
22080
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
22081
|
+
address_id: selectedAddressId,
|
|
22082
|
+
membership_id: selectedMembership.id
|
|
22083
|
+
}, (err, res) => {
|
|
22084
|
+
dispatch({
|
|
22085
|
+
type: LOADING,
|
|
22086
|
+
payload: false
|
|
22087
|
+
});
|
|
22088
|
+
|
|
22089
|
+
if (err) {
|
|
22090
|
+
dispatch({
|
|
22091
|
+
type: SHOW_ALERT,
|
|
22092
|
+
payload: {
|
|
22093
|
+
type: "error",
|
|
22094
|
+
content: getErrorMessages(err)
|
|
22095
|
+
}
|
|
22096
|
+
});
|
|
22097
|
+
return onFailure(err);
|
|
22098
|
+
}
|
|
22099
|
+
|
|
22100
|
+
notify$1.success(t("messages.addressUpdated"));
|
|
22101
|
+
return onMembershipAdressUpdateSuccess(res);
|
|
22102
|
+
});
|
|
22009
22103
|
}
|
|
22010
22104
|
|
|
22011
|
-
|
|
22012
|
-
type: LOADING,
|
|
22013
|
-
payload: true
|
|
22014
|
-
});
|
|
22015
|
-
window.Pelcro.subscription.redeemGift({
|
|
22016
|
-
auth_token: window.Pelcro.user.read().auth_token,
|
|
22017
|
-
gift_code: giftCode,
|
|
22018
|
-
address_id: selectedAddressId,
|
|
22019
|
-
// redeem gift as a future phase of an existing subscription
|
|
22020
|
-
subscription_id: subscriptionIdToRenew
|
|
22021
|
-
}, (err, res) => {
|
|
22105
|
+
if (giftCode) {
|
|
22022
22106
|
dispatch({
|
|
22023
22107
|
type: LOADING,
|
|
22024
|
-
payload:
|
|
22108
|
+
payload: true
|
|
22025
22109
|
});
|
|
22026
|
-
|
|
22027
|
-
|
|
22110
|
+
return window.Pelcro.subscription.redeemGift({
|
|
22111
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
22112
|
+
gift_code: giftCode,
|
|
22113
|
+
address_id: selectedAddressId,
|
|
22114
|
+
// redeem gift as a future phase of an existing subscription
|
|
22115
|
+
subscription_id: subscriptionIdToRenew
|
|
22116
|
+
}, (err, res) => {
|
|
22028
22117
|
dispatch({
|
|
22029
|
-
type:
|
|
22030
|
-
payload:
|
|
22031
|
-
type: "error",
|
|
22032
|
-
content: getErrorMessages(err)
|
|
22033
|
-
}
|
|
22118
|
+
type: LOADING,
|
|
22119
|
+
payload: false
|
|
22034
22120
|
});
|
|
22035
|
-
return onFailure(err);
|
|
22036
|
-
}
|
|
22037
22121
|
|
|
22038
|
-
|
|
22039
|
-
|
|
22122
|
+
if (err) {
|
|
22123
|
+
dispatch({
|
|
22124
|
+
type: SHOW_ALERT,
|
|
22125
|
+
payload: {
|
|
22126
|
+
type: "error",
|
|
22127
|
+
content: getErrorMessages(err)
|
|
22128
|
+
}
|
|
22129
|
+
});
|
|
22130
|
+
return onFailure(err);
|
|
22131
|
+
}
|
|
22132
|
+
|
|
22133
|
+
return onGiftRedemptionSuccess(res);
|
|
22134
|
+
});
|
|
22135
|
+
}
|
|
22136
|
+
|
|
22137
|
+
onSuccess(selectedAddressId);
|
|
22040
22138
|
};
|
|
22041
22139
|
|
|
22042
22140
|
const [state, dispatch] = useReducerWithSideEffects((state, action) => {
|
|
@@ -22215,6 +22313,13 @@ const AddressSelectModal = ({
|
|
|
22215
22313
|
|
|
22216
22314
|
const onAddNewAddress = () => {
|
|
22217
22315
|
switchView("address-create");
|
|
22316
|
+
}; // FIXME: implement me
|
|
22317
|
+
|
|
22318
|
+
|
|
22319
|
+
const onMembershipAdressUpdateSuccess = () => {
|
|
22320
|
+
var _otherProps$onMembers;
|
|
22321
|
+
|
|
22322
|
+
(_otherProps$onMembers = otherProps.onMembershipAdressUpdateSuccess) === null || _otherProps$onMembers === void 0 ? void 0 : _otherProps$onMembers.call(otherProps);
|
|
22218
22323
|
};
|
|
22219
22324
|
|
|
22220
22325
|
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
@@ -22225,7 +22330,8 @@ const AddressSelectModal = ({
|
|
|
22225
22330
|
onAddNewAddress: onAddNewAddress
|
|
22226
22331
|
}, otherProps, {
|
|
22227
22332
|
onSuccess: onSuccess,
|
|
22228
|
-
onGiftRedemptionSuccess: onGiftRedemptionSuccess
|
|
22333
|
+
onGiftRedemptionSuccess: onGiftRedemptionSuccess,
|
|
22334
|
+
onMembershipAdressUpdateSuccess: onMembershipAdressUpdateSuccess
|
|
22229
22335
|
}))), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement(Authorship, null)));
|
|
22230
22336
|
};
|
|
22231
22337
|
AddressSelectModal.viewId = "address-select";
|
|
@@ -23983,7 +24089,7 @@ const SubscriptionsItems = ({
|
|
|
23983
24089
|
}
|
|
23984
24090
|
|
|
23985
24091
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
23986
|
-
notify.confirm((onSuccess, onFailure) => {
|
|
24092
|
+
notify$1.confirm((onSuccess, onFailure) => {
|
|
23987
24093
|
cancelSubscription(sub.id, onSuccess, onFailure);
|
|
23988
24094
|
}, {
|
|
23989
24095
|
confirmMessage: t("messages.subCancellation.isSureToCancel"),
|
|
@@ -24564,10 +24670,80 @@ function getInvoiceStatus(invoice) {
|
|
|
24564
24670
|
}
|
|
24565
24671
|
}
|
|
24566
24672
|
|
|
24673
|
+
const MembershipsMenu = props => {
|
|
24674
|
+
const {
|
|
24675
|
+
t
|
|
24676
|
+
} = useTranslation("dashboard");
|
|
24677
|
+
return /*#__PURE__*/React__default.createElement("table", {
|
|
24678
|
+
className: "plc-w-full plc-table-fixed"
|
|
24679
|
+
}, /*#__PURE__*/React__default.createElement("thead", {
|
|
24680
|
+
className: "plc-text-xs plc-font-semibold plc-tracking-wider plc-text-gray-400 plc-uppercase "
|
|
24681
|
+
}, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("th", {
|
|
24682
|
+
className: "plc-w-5/12 "
|
|
24683
|
+
}, t("labels.plan")), /*#__PURE__*/React__default.createElement("th", {
|
|
24684
|
+
className: "plc-w-4/12 "
|
|
24685
|
+
}, t("labels.status.title")), /*#__PURE__*/React__default.createElement("th", {
|
|
24686
|
+
className: "plc-w-3/12 "
|
|
24687
|
+
}, t("labels.actions")))), /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement("tr", {
|
|
24688
|
+
className: "plc-h-4"
|
|
24689
|
+
})), /*#__PURE__*/React__default.createElement(MembershipsItems, props));
|
|
24690
|
+
};
|
|
24691
|
+
|
|
24692
|
+
const MembershipsItems = () => {
|
|
24693
|
+
const {
|
|
24694
|
+
t
|
|
24695
|
+
} = useTranslation("dashboard");
|
|
24696
|
+
const {
|
|
24697
|
+
switchView,
|
|
24698
|
+
setSelectedMembership,
|
|
24699
|
+
switchToAddressView
|
|
24700
|
+
} = usePelcro();
|
|
24701
|
+
const memberships = getActiveMemberships();
|
|
24702
|
+
|
|
24703
|
+
const onChangeAddressClick = membershipId => {
|
|
24704
|
+
if (userMustVerifyEmail()) {
|
|
24705
|
+
return switchView("email-verify");
|
|
24706
|
+
}
|
|
24707
|
+
|
|
24708
|
+
if (setSelectedMembership(membershipId)) {
|
|
24709
|
+
return switchToAddressView();
|
|
24710
|
+
}
|
|
24711
|
+
};
|
|
24712
|
+
|
|
24713
|
+
if (memberships.length === 0) return null;
|
|
24714
|
+
return memberships.sort((a, b) => a.created_at - b.created_at).map(membership => {
|
|
24715
|
+
var _window$Pelcro$addres;
|
|
24716
|
+
|
|
24717
|
+
(_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);
|
|
24718
|
+
return /*#__PURE__*/React__default.createElement("tr", {
|
|
24719
|
+
key: membership.id,
|
|
24720
|
+
className: `plc-w-full plc-align-top pelcro-membership-row`
|
|
24721
|
+
}, /*#__PURE__*/React__default.createElement("td", {
|
|
24722
|
+
className: "plc-truncate"
|
|
24723
|
+
}, membership.subscription.plan.nickname && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", {
|
|
24724
|
+
className: "plc-font-semibold plc-text-gray-500 pelcro-membership-plan"
|
|
24725
|
+
}, membership.subscription.plan.nickname))), /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement("span", null, membership.status)), /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement(Button, {
|
|
24726
|
+
variant: "ghost",
|
|
24727
|
+
icon: /*#__PURE__*/React__default.createElement(SvgEdit, {
|
|
24728
|
+
className: "plc-w-4 plc-h-4"
|
|
24729
|
+
}),
|
|
24730
|
+
className: "plc-text-blue-400 focus:plc-ring-blue-500 pelcro-dashboard-membership-address-button",
|
|
24731
|
+
onClick: () => onChangeAddressClick(membership.id)
|
|
24732
|
+
}, t("labels.edit"))));
|
|
24733
|
+
});
|
|
24734
|
+
};
|
|
24735
|
+
|
|
24736
|
+
function getActiveMemberships() {
|
|
24737
|
+
var _window$Pelcro$user$r, _window$Pelcro$user$r2;
|
|
24738
|
+
|
|
24739
|
+
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")) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
|
|
24740
|
+
}
|
|
24741
|
+
|
|
24567
24742
|
const SUB_MENUS = {
|
|
24568
24743
|
PROFILE: "profile",
|
|
24569
24744
|
SUBSCRIPTIONS: "subscriptions",
|
|
24570
24745
|
DONATIONS: "donations",
|
|
24746
|
+
MEMBERSHIPS: "memberships",
|
|
24571
24747
|
PAYMENT_CARDS: "payment-cards",
|
|
24572
24748
|
ADDRESSES: "addresses",
|
|
24573
24749
|
GIFTS: "gifts",
|
|
@@ -25098,6 +25274,14 @@ class Dashboard extends Component {
|
|
|
25098
25274
|
displayProductSelect: this.displayProductSelect,
|
|
25099
25275
|
displayRedeem: this.displayRedeem
|
|
25100
25276
|
})
|
|
25277
|
+
}), /*#__PURE__*/React__default.createElement(Accordion.item, {
|
|
25278
|
+
show: hasActiveMemberships(),
|
|
25279
|
+
name: SUB_MENUS.MEMBERSHIPS,
|
|
25280
|
+
icon: /*#__PURE__*/React__default.createElement(SvgDonate, {
|
|
25281
|
+
className: "plc-transform plc-scale-120 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
|
|
25282
|
+
}),
|
|
25283
|
+
title: this.locale("labels.memberships"),
|
|
25284
|
+
content: /*#__PURE__*/React__default.createElement(MembershipsMenu, null)
|
|
25101
25285
|
}), /*#__PURE__*/React__default.createElement(Accordion.item, {
|
|
25102
25286
|
show: hasDonationSubs(),
|
|
25103
25287
|
name: SUB_MENUS.DONATIONS,
|
|
@@ -25153,6 +25337,12 @@ function hasDonationSubs() {
|
|
|
25153
25337
|
return donations.length > 0 || canceledDonations.length > 0;
|
|
25154
25338
|
}
|
|
25155
25339
|
|
|
25340
|
+
function hasActiveMemberships() {
|
|
25341
|
+
var _window$Pelcro$user$r6, _window$Pelcro$user$r7;
|
|
25342
|
+
|
|
25343
|
+
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")) !== null && _window$Pelcro$user$r6 !== void 0 ? _window$Pelcro$user$r6 : false;
|
|
25344
|
+
}
|
|
25345
|
+
|
|
25156
25346
|
const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
|
|
25157
25347
|
|
|
25158
25348
|
// The button in the lower right that shows the dashboard.
|
|
@@ -27307,7 +27497,7 @@ function VerifyLinkTokenModal({
|
|
|
27307
27497
|
|
|
27308
27498
|
(_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
|
|
27309
27499
|
resetView();
|
|
27310
|
-
notify.success(t("messages.success"));
|
|
27500
|
+
notify$1.success(t("messages.success"));
|
|
27311
27501
|
};
|
|
27312
27502
|
|
|
27313
27503
|
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
@@ -27551,4 +27741,4 @@ const InvoiceDetailsModal = ({
|
|
|
27551
27741
|
};
|
|
27552
27742
|
InvoiceDetailsModal.viewId = "invoice-details";
|
|
27553
27743
|
|
|
27554
|
-
export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankRedirection, Button, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, DashboardWithHook as Dashboard, DashboardOpenButton, DatePicker, DiscountedPrice, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GoogleLoginButton, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginRequestLoginToken, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, NewsletterWithHook as NewsLetter, NewsletterUpdateButton, NewsletterUpdateContainer, NewsletterUpdateList, NewsletterUpdateModal, NewsletterUpdateView, Notification, OrderConfirmModal, OrderCreateContainer, OrderCreateModal, OrderCreateSubmitButton, OrderCreateView, Password, PasswordChangeButton, PasswordChangeConfirmNewPassword, PasswordChangeContainer, PasswordChangeCurrentPassword, PasswordChangeModal, PasswordChangeNewPassword, PasswordChangeView, PasswordForgotButton, PasswordForgotContainer, PasswordForgotEmail, PasswordForgotModal, PasswordForgotView, PasswordResetButton, PasswordResetConfirmPassword, PasswordResetContainer, PasswordResetEmail, PasswordResetModal, PasswordResetPassword, PasswordResetView, PasswordlessRequestContainer, PasswordlessRequestEmail, PasswordlessRequestModal, PasswordlessRequestView, PasswordlessRequestViewButton, PaymentCreateContainer, PaymentCreateView, PaymentMethodContainer, PaymentMethodSelectContainer, PaymentMethodSelectList, PaymentMethodSelectModal, PaymentMethodSelectSubmit, PaymentMethodSelectView, PaymentMethodUpdateContainer, PaymentMethodUpdateModal, PaymentMethodUpdateView, PaymentMethodView, PaymentSuccessModal, PaymentSuccessView, PaypalSubscribeButton, PelcroCardCVC, PelcroCardExpiry, PelcroCardNumber, PelcroModalController, PelcroPaymentRequestButton, ProfilePicChangeButton, ProfilePicChangeContainer, ProfilePicChangeCropper, ProfilePicChangeModal, ProfilePicChangeRemoveButton, ProfilePicChangeSelectButton, ProfilePicChangeView, ProfilePicChangeZoom, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCancelModal, SubscriptionCreateContainer, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, TaxAmount, TextArea, Tooltip, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateView, VerifyLinkTokenContainer, VerifyLinkTokenLoader, VerifyLinkTokenModal, VerifyLinkTokenView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify, unauthenticatedButtons, usePelcro };
|
|
27744
|
+
export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankRedirection, Button, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, DashboardWithHook as Dashboard, DashboardOpenButton, DatePicker, DiscountedPrice, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GoogleLoginButton, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginRequestLoginToken, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, NewsletterWithHook as NewsLetter, NewsletterUpdateButton, NewsletterUpdateContainer, NewsletterUpdateList, NewsletterUpdateModal, NewsletterUpdateView, Notification, OrderConfirmModal, OrderCreateContainer, OrderCreateModal, OrderCreateSubmitButton, OrderCreateView, Password, PasswordChangeButton, PasswordChangeConfirmNewPassword, PasswordChangeContainer, PasswordChangeCurrentPassword, PasswordChangeModal, PasswordChangeNewPassword, PasswordChangeView, PasswordForgotButton, PasswordForgotContainer, PasswordForgotEmail, PasswordForgotModal, PasswordForgotView, PasswordResetButton, PasswordResetConfirmPassword, PasswordResetContainer, PasswordResetEmail, PasswordResetModal, PasswordResetPassword, PasswordResetView, PasswordlessRequestContainer, PasswordlessRequestEmail, PasswordlessRequestModal, PasswordlessRequestView, PasswordlessRequestViewButton, PaymentCreateContainer, PaymentCreateView, PaymentMethodContainer, PaymentMethodSelectContainer, PaymentMethodSelectList, PaymentMethodSelectModal, PaymentMethodSelectSubmit, PaymentMethodSelectView, PaymentMethodUpdateContainer, PaymentMethodUpdateModal, PaymentMethodUpdateView, PaymentMethodView, PaymentSuccessModal, PaymentSuccessView, PaypalSubscribeButton, PelcroCardCVC, PelcroCardExpiry, PelcroCardNumber, PelcroModalController, PelcroPaymentRequestButton, ProfilePicChangeButton, ProfilePicChangeContainer, ProfilePicChangeCropper, ProfilePicChangeModal, ProfilePicChangeRemoveButton, ProfilePicChangeSelectButton, ProfilePicChangeView, ProfilePicChangeZoom, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCancelModal, SubscriptionCreateContainer, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, TaxAmount, TextArea, Tooltip, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateView, VerifyLinkTokenContainer, VerifyLinkTokenLoader, VerifyLinkTokenModal, VerifyLinkTokenView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify$1 as notify, unauthenticatedButtons, usePelcro };
|
package/dist/pelcro.css
CHANGED
|
@@ -2643,6 +2643,11 @@ in order to scope selectors under pelcro-root
|
|
|
2643
2643
|
--tw-ring-color: rgba(96, 165, 250, var(--tw-ring-opacity));
|
|
2644
2644
|
}
|
|
2645
2645
|
|
|
2646
|
+
.pelcro-root .focus\:plc-ring-blue-500:focus {
|
|
2647
|
+
--tw-ring-opacity: 1;
|
|
2648
|
+
--tw-ring-color: rgba(59, 130, 246, var(--tw-ring-opacity));
|
|
2649
|
+
}
|
|
2650
|
+
|
|
2646
2651
|
.pelcro-root .plc-fill-current {
|
|
2647
2652
|
fill: currentColor;
|
|
2648
2653
|
}
|