@pelcro/react-pelcro-js 3.17.0-beta.11 → 3.17.0-beta.12
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 +98 -99
- package/dist/index.esm.js +98 -99
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -8528,17 +8528,17 @@ const createPelcroHook = store => {
|
|
|
8528
8528
|
*/
|
|
8529
8529
|
pelcroHook.override = fn => {
|
|
8530
8530
|
const partialState = fn(store.setState, store.getState);
|
|
8531
|
-
usePelcro
|
|
8531
|
+
usePelcro.setState(partialState);
|
|
8532
8532
|
};
|
|
8533
8533
|
pelcroHook.getStore = pelcroHook.getState;
|
|
8534
8534
|
return pelcroHook;
|
|
8535
8535
|
};
|
|
8536
8536
|
const pelcroStore = createPelcroStore();
|
|
8537
|
-
const usePelcro
|
|
8537
|
+
const usePelcro = createPelcroHook(pelcroStore);
|
|
8538
8538
|
|
|
8539
8539
|
/* istanbul ignore next */
|
|
8540
8540
|
if (process.env.NODE_ENV === "development") {
|
|
8541
|
-
c$1("Pelcro Store", usePelcro
|
|
8541
|
+
c$1("Pelcro Store", usePelcro);
|
|
8542
8542
|
}
|
|
8543
8543
|
|
|
8544
8544
|
/**
|
|
@@ -8730,7 +8730,7 @@ const trackSubscriptionOnGA = () => {
|
|
|
8730
8730
|
product,
|
|
8731
8731
|
plan,
|
|
8732
8732
|
couponCode
|
|
8733
|
-
} = usePelcro
|
|
8733
|
+
} = usePelcro.getStore();
|
|
8734
8734
|
|
|
8735
8735
|
/*
|
|
8736
8736
|
getting the latest subscription id from invoices instead of subscriptions
|
|
@@ -9037,7 +9037,7 @@ class SaveToMetadataButtonClass {
|
|
|
9037
9037
|
_defineProperty$3(this, "unauthenticated", () => {
|
|
9038
9038
|
const {
|
|
9039
9039
|
switchView
|
|
9040
|
-
} = usePelcro
|
|
9040
|
+
} = usePelcro.getStore();
|
|
9041
9041
|
_classPrivateFieldGet(this, _onClick).call(this, () => switchView("login"));
|
|
9042
9042
|
_classPrivateFieldGet(this, _unmarkAllSavedButtons).call(this);
|
|
9043
9043
|
});
|
|
@@ -9106,7 +9106,7 @@ class SaveToMetadataButtonClass {
|
|
|
9106
9106
|
const user = window.Pelcro.user.read();
|
|
9107
9107
|
const {
|
|
9108
9108
|
switchView
|
|
9109
|
-
} = usePelcro
|
|
9109
|
+
} = usePelcro.getStore();
|
|
9110
9110
|
const {
|
|
9111
9111
|
key,
|
|
9112
9112
|
...buttonMetadata
|
|
@@ -10207,7 +10207,7 @@ const init$1 = () => {
|
|
|
10207
10207
|
addToCart,
|
|
10208
10208
|
purchaseItem,
|
|
10209
10209
|
setSubscriptionToManageMembers
|
|
10210
|
-
} = usePelcro
|
|
10210
|
+
} = usePelcro.getStore();
|
|
10211
10211
|
const pelcroDashboardButtonsByClass = document.getElementsByClassName("pelcro-dashboard-button");
|
|
10212
10212
|
if (pelcroDashboardButtonsByClass.length !== 0) {
|
|
10213
10213
|
for (let i = 0; i < pelcroDashboardButtonsByClass.length; i++) {
|
|
@@ -10461,7 +10461,7 @@ const init = () => {
|
|
|
10461
10461
|
const {
|
|
10462
10462
|
switchView,
|
|
10463
10463
|
set
|
|
10464
|
-
} = usePelcro
|
|
10464
|
+
} = usePelcro.getStore();
|
|
10465
10465
|
const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
|
|
10466
10466
|
if (entitlementsProtectedElements.length === 0) {
|
|
10467
10467
|
return false;
|
|
@@ -10539,7 +10539,7 @@ function unblurElemWhenUserSubscribes(elem, entitlements) {
|
|
|
10539
10539
|
document.addEventListener("PelcroSubscriptionCreate", event => {
|
|
10540
10540
|
const {
|
|
10541
10541
|
isGift
|
|
10542
|
-
} = usePelcro
|
|
10542
|
+
} = usePelcro.getStore();
|
|
10543
10543
|
if (isGift) return;
|
|
10544
10544
|
const latestSub = event.detail.data.subscriptions[event.detail.data.subscriptions.length - 1];
|
|
10545
10545
|
const shouldUnblurContent = entitlements.some(ent => {
|
|
@@ -10866,7 +10866,7 @@ const initPaywalls = () => {
|
|
|
10866
10866
|
}
|
|
10867
10867
|
const {
|
|
10868
10868
|
switchView
|
|
10869
|
-
} = usePelcro
|
|
10869
|
+
} = usePelcro.getStore();
|
|
10870
10870
|
if (paywallMethods !== null && paywallMethods !== void 0 && paywallMethods.displayMeterPaywall()) {
|
|
10871
10871
|
/*
|
|
10872
10872
|
showing both the meter and the entitlements notification doesn't make sense from
|
|
@@ -10887,7 +10887,7 @@ const loadPaymentSDKs = () => {
|
|
|
10887
10887
|
// Lazy load stripe's SDK
|
|
10888
10888
|
const {
|
|
10889
10889
|
whenUserReady
|
|
10890
|
-
} = usePelcro
|
|
10890
|
+
} = usePelcro.getStore();
|
|
10891
10891
|
whenUserReady(() => {
|
|
10892
10892
|
if (!window.Stripe) {
|
|
10893
10893
|
pure_1(window.Pelcro.environment.stripe);
|
|
@@ -10931,7 +10931,7 @@ const loadAuth0SDK = () => {
|
|
|
10931
10931
|
const initSecuritySdk = () => {
|
|
10932
10932
|
const {
|
|
10933
10933
|
whenSiteReady
|
|
10934
|
-
} = usePelcro
|
|
10934
|
+
} = usePelcro.getStore();
|
|
10935
10935
|
whenSiteReady(() => {
|
|
10936
10936
|
var _window$Pelcro$site$r2;
|
|
10937
10937
|
const securityKey = (_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.security_key;
|
|
@@ -10964,7 +10964,7 @@ const dispatchModalDisplayEvents = modalName => {
|
|
|
10964
10964
|
const {
|
|
10965
10965
|
whenSiteReady,
|
|
10966
10966
|
whenEcommerceLoaded
|
|
10967
|
-
} = usePelcro
|
|
10967
|
+
} = usePelcro.getStore();
|
|
10968
10968
|
const renderShopView = shopComponent => {
|
|
10969
10969
|
whenEcommerceLoaded(() => {
|
|
10970
10970
|
const shopElement = document.getElementById("pelcro-shop");
|
|
@@ -11039,7 +11039,7 @@ const initViewFromURL = () => {
|
|
|
11039
11039
|
const {
|
|
11040
11040
|
switchView,
|
|
11041
11041
|
whenSiteReady
|
|
11042
|
-
} = usePelcro
|
|
11042
|
+
} = usePelcro.getStore();
|
|
11043
11043
|
if (isValidViewFromURL(view)) {
|
|
11044
11044
|
whenSiteReady(() => {
|
|
11045
11045
|
if (view === "plan-select") {
|
|
@@ -11086,7 +11086,7 @@ const initSubscriptionFromURL = () => {
|
|
|
11086
11086
|
switchView,
|
|
11087
11087
|
whenSiteReady,
|
|
11088
11088
|
set
|
|
11089
|
-
} = usePelcro
|
|
11089
|
+
} = usePelcro.getStore();
|
|
11090
11090
|
whenSiteReady(() => {
|
|
11091
11091
|
var _selectedProduct$plan;
|
|
11092
11092
|
const productsList = window.Pelcro.product.list();
|
|
@@ -11107,7 +11107,7 @@ const initSubscriptionFromURL = () => {
|
|
|
11107
11107
|
isAuthenticated,
|
|
11108
11108
|
switchToAddressView,
|
|
11109
11109
|
switchToPaymentView
|
|
11110
|
-
} = usePelcro
|
|
11110
|
+
} = usePelcro.getStore();
|
|
11111
11111
|
if (!isAuthenticated()) {
|
|
11112
11112
|
return switchView("register");
|
|
11113
11113
|
}
|
|
@@ -11134,7 +11134,7 @@ const initOfflineSubscriptionFromURL = offlinePlanId => {
|
|
|
11134
11134
|
switchToPaymentView,
|
|
11135
11135
|
switchToAddressView,
|
|
11136
11136
|
set
|
|
11137
|
-
} = usePelcro
|
|
11137
|
+
} = usePelcro.getStore();
|
|
11138
11138
|
whenSiteReady(() => {
|
|
11139
11139
|
window.Pelcro.plan.getPlan({
|
|
11140
11140
|
plan_id: offlinePlanId
|
|
@@ -11175,7 +11175,7 @@ const initPurchaseFromUrl = () => {
|
|
|
11175
11175
|
const {
|
|
11176
11176
|
whenEcommerceLoaded,
|
|
11177
11177
|
purchaseItem
|
|
11178
|
-
} = usePelcro
|
|
11178
|
+
} = usePelcro.getStore();
|
|
11179
11179
|
whenEcommerceLoaded(() => {
|
|
11180
11180
|
const skuId = window.Pelcro.helpers.getURLParameter("sku_id");
|
|
11181
11181
|
purchaseItem(skuId);
|
|
@@ -11191,7 +11191,7 @@ const initCartFromUrl = () => {
|
|
|
11191
11191
|
whenEcommerceLoaded,
|
|
11192
11192
|
addToCart,
|
|
11193
11193
|
switchView
|
|
11194
|
-
} = usePelcro
|
|
11194
|
+
} = usePelcro.getStore();
|
|
11195
11195
|
whenEcommerceLoaded(() => {
|
|
11196
11196
|
const skusIdsParam = window.Pelcro.helpers.getURLParameter("sku_id");
|
|
11197
11197
|
const skusIds = skusIdsParam === null || skusIdsParam === void 0 ? void 0 : skusIdsParam.split(",");
|
|
@@ -11209,7 +11209,7 @@ const verifyEmailTokenFromUrl = () => {
|
|
|
11209
11209
|
var _window$Pelcro$site$r5, _window$Pelcro$site$r6;
|
|
11210
11210
|
const {
|
|
11211
11211
|
whenSiteReady
|
|
11212
|
-
} = usePelcro
|
|
11212
|
+
} = usePelcro.getStore();
|
|
11213
11213
|
const translations = i18next.t("verifyEmail:messages", {
|
|
11214
11214
|
returnObjects: true
|
|
11215
11215
|
});
|
|
@@ -11235,7 +11235,7 @@ const verifyLinkTokenFromUrl = () => {
|
|
|
11235
11235
|
whenSiteReady,
|
|
11236
11236
|
resetView,
|
|
11237
11237
|
isAuthenticated
|
|
11238
|
-
} = usePelcro
|
|
11238
|
+
} = usePelcro.getStore();
|
|
11239
11239
|
const translations = i18next.t("verifyLinkToken:messages", {
|
|
11240
11240
|
returnObjects: true
|
|
11241
11241
|
});
|
|
@@ -11270,12 +11270,12 @@ const showPasswordlessRequestFromUrl = () => {
|
|
|
11270
11270
|
var _window$Pelcro$site$r8;
|
|
11271
11271
|
const {
|
|
11272
11272
|
isAuthenticated
|
|
11273
|
-
} = usePelcro
|
|
11273
|
+
} = usePelcro.getStore();
|
|
11274
11274
|
const passwordlessEnabled = (_window$Pelcro$site$r8 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r8 === void 0 ? void 0 : _window$Pelcro$site$r8.passwordless_enabled;
|
|
11275
11275
|
if (!passwordlessEnabled || isAuthenticated()) return;
|
|
11276
11276
|
const {
|
|
11277
11277
|
switchView
|
|
11278
|
-
} = usePelcro
|
|
11278
|
+
} = usePelcro.getStore();
|
|
11279
11279
|
return switchView("passwordless-request");
|
|
11280
11280
|
};
|
|
11281
11281
|
const showInvoiceDetailsFromUrl = () => {
|
|
@@ -11285,7 +11285,7 @@ const showInvoiceDetailsFromUrl = () => {
|
|
|
11285
11285
|
whenUserReady,
|
|
11286
11286
|
whenSiteReady,
|
|
11287
11287
|
switchView
|
|
11288
|
-
} = usePelcro
|
|
11288
|
+
} = usePelcro.getStore();
|
|
11289
11289
|
whenSiteReady(() => {
|
|
11290
11290
|
if (!isAuthenticated()) {
|
|
11291
11291
|
return switchView("login");
|
|
@@ -11301,7 +11301,7 @@ const showInvoiceDetailsFromUrl = () => {
|
|
|
11301
11301
|
}
|
|
11302
11302
|
const {
|
|
11303
11303
|
invoice
|
|
11304
|
-
} = usePelcro
|
|
11304
|
+
} = usePelcro.getStore();
|
|
11305
11305
|
if (invoice.total === 0) {
|
|
11306
11306
|
const errorMessage = i18next.t("messages:zeroTotalInvoice", {
|
|
11307
11307
|
returnObjects: true
|
|
@@ -11319,7 +11319,7 @@ const showSubscriptionManageMembersFromUrl = () => {
|
|
|
11319
11319
|
whenUserReady,
|
|
11320
11320
|
whenSiteReady,
|
|
11321
11321
|
switchView
|
|
11322
|
-
} = usePelcro
|
|
11322
|
+
} = usePelcro.getStore();
|
|
11323
11323
|
whenSiteReady(() => {
|
|
11324
11324
|
if (!isAuthenticated()) {
|
|
11325
11325
|
return switchView("login");
|
|
@@ -11357,7 +11357,7 @@ const PelcroModalController = _ref => {
|
|
|
11357
11357
|
view,
|
|
11358
11358
|
isAuthenticated,
|
|
11359
11359
|
whenSiteReady
|
|
11360
|
-
} = usePelcro
|
|
11360
|
+
} = usePelcro();
|
|
11361
11361
|
React__default.useEffect(() => {
|
|
11362
11362
|
init$1();
|
|
11363
11363
|
renderShopView(React__default.Children.map(children, child => child).find(_ref2 => {
|
|
@@ -13085,7 +13085,7 @@ function Modal(_ref) {
|
|
|
13085
13085
|
children,
|
|
13086
13086
|
...props
|
|
13087
13087
|
} = _ref;
|
|
13088
|
-
const resetView = usePelcro
|
|
13088
|
+
const resetView = usePelcro(state => state.resetView);
|
|
13089
13089
|
useEffect(() => {
|
|
13090
13090
|
onDisplay === null || onDisplay === void 0 ? void 0 : onDisplay();
|
|
13091
13091
|
dispatchModalDisplayEvents(id);
|
|
@@ -13167,7 +13167,7 @@ function LoginModal(_ref) {
|
|
|
13167
13167
|
order,
|
|
13168
13168
|
switchToAddressView,
|
|
13169
13169
|
switchToPaymentView
|
|
13170
|
-
} = usePelcro
|
|
13170
|
+
} = usePelcro();
|
|
13171
13171
|
const onSuccess = res => {
|
|
13172
13172
|
var _props$onSuccess;
|
|
13173
13173
|
(_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
|
|
@@ -13504,7 +13504,7 @@ function RegisterView(props) {
|
|
|
13504
13504
|
} = useTranslation("register");
|
|
13505
13505
|
const {
|
|
13506
13506
|
product
|
|
13507
|
-
} = usePelcro
|
|
13507
|
+
} = usePelcro();
|
|
13508
13508
|
const title = (_product$paywall$regi = product === null || product === void 0 ? void 0 : (_product$paywall = product.paywall) === null || _product$paywall === void 0 ? void 0 : _product$paywall.register_title) !== null && _product$paywall$regi !== void 0 ? _product$paywall$regi : t("title");
|
|
13509
13509
|
const subtitle = (_product$paywall$regi2 = product === null || product === void 0 ? void 0 : (_product$paywall2 = product.paywall) === null || _product$paywall2 === void 0 ? void 0 : _product$paywall2.register_subtitle) !== null && _product$paywall$regi2 !== void 0 ? _product$paywall$regi2 : t("subtitle");
|
|
13510
13510
|
const socialLoginEnabled = ((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.facebook_app_id) || ((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.google_app_id) || ((_window$Pelcro$site$r3 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r3 === void 0 ? void 0 : _window$Pelcro$site$r3.auth0_client_id);
|
|
@@ -13730,7 +13730,7 @@ function RegisterModal(props) {
|
|
|
13730
13730
|
order,
|
|
13731
13731
|
giftCode,
|
|
13732
13732
|
isGift
|
|
13733
|
-
} = usePelcro
|
|
13733
|
+
} = usePelcro();
|
|
13734
13734
|
const onSuccess = res => {
|
|
13735
13735
|
var _props$onSuccess;
|
|
13736
13736
|
(_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
|
|
@@ -13843,7 +13843,7 @@ function SelectModalWithHook(props) {
|
|
|
13843
13843
|
resetView,
|
|
13844
13844
|
view,
|
|
13845
13845
|
set
|
|
13846
|
-
} = usePelcro
|
|
13846
|
+
} = usePelcro();
|
|
13847
13847
|
const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
|
|
13848
13848
|
const entitlements = entitlementsProtectedElements.length > 0 ? getEntitlementsFromElem(entitlementsProtectedElements[0]) : null;
|
|
13849
13849
|
return /*#__PURE__*/React__default.createElement(SelectModalWithTrans, {
|
|
@@ -14084,7 +14084,7 @@ class SelectModal extends Component {
|
|
|
14084
14084
|
const {
|
|
14085
14085
|
switchToAddressView,
|
|
14086
14086
|
switchToPaymentView
|
|
14087
|
-
} = usePelcro
|
|
14087
|
+
} = usePelcro.getStore();
|
|
14088
14088
|
if (!isAuthenticated) {
|
|
14089
14089
|
return setView("register");
|
|
14090
14090
|
}
|
|
@@ -16185,16 +16185,16 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
16185
16185
|
const {
|
|
16186
16186
|
t
|
|
16187
16187
|
} = useTranslation("payment");
|
|
16188
|
-
const pelcroStore = usePelcro
|
|
16188
|
+
const pelcroStore = usePelcro();
|
|
16189
16189
|
const {
|
|
16190
16190
|
set,
|
|
16191
16191
|
order,
|
|
16192
16192
|
selectedPaymentMethodId,
|
|
16193
16193
|
couponCode
|
|
16194
|
-
} = usePelcro
|
|
16194
|
+
} = usePelcro();
|
|
16195
16195
|
const {
|
|
16196
16196
|
whenUserReady
|
|
16197
|
-
} = usePelcro
|
|
16197
|
+
} = usePelcro.getStore();
|
|
16198
16198
|
const product = (_props$product = props.product) !== null && _props$product !== void 0 ? _props$product : pelcroStore.product;
|
|
16199
16199
|
const plan = (_props$plan = props.plan) !== null && _props$plan !== void 0 ? _props$plan : pelcroStore.plan;
|
|
16200
16200
|
const subscriptionIdToRenew = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : pelcroStore.subscriptionIdToRenew;
|
|
@@ -17744,7 +17744,7 @@ const PaymentMethodContainer = props => {
|
|
|
17744
17744
|
const [isStripeLoaded, setIsStripeLoaded] = useState(Boolean(window.Stripe));
|
|
17745
17745
|
const {
|
|
17746
17746
|
whenUserReady
|
|
17747
|
-
} = usePelcro
|
|
17747
|
+
} = usePelcro.getStore();
|
|
17748
17748
|
useEffect(() => {
|
|
17749
17749
|
whenUserReady(() => {
|
|
17750
17750
|
if (!window.Stripe) {
|
|
@@ -17840,7 +17840,7 @@ const PelcroPaymentRequestButton = props => {
|
|
|
17840
17840
|
const CheckoutForm = () => {
|
|
17841
17841
|
const {
|
|
17842
17842
|
selectedPaymentMethodId
|
|
17843
|
-
} = usePelcro
|
|
17843
|
+
} = usePelcro();
|
|
17844
17844
|
const cardProcessor = getSiteCardProcessor();
|
|
17845
17845
|
if (selectedPaymentMethodId) {
|
|
17846
17846
|
return null;
|
|
@@ -17889,7 +17889,7 @@ const DiscountedPrice = props => {
|
|
|
17889
17889
|
const {
|
|
17890
17890
|
order,
|
|
17891
17891
|
plan
|
|
17892
|
-
} = usePelcro
|
|
17892
|
+
} = usePelcro();
|
|
17893
17893
|
const isTaxInclusive = (_window$Pelcro$site = window.Pelcro.site) === null || _window$Pelcro$site === void 0 ? void 0 : (_window$Pelcro$site$r = _window$Pelcro$site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.tax_inclusive;
|
|
17894
17894
|
const ecommOrderCurrency = (_order$currency = order === null || order === void 0 ? void 0 : order.currency) !== null && _order$currency !== void 0 ? _order$currency : order === null || order === void 0 ? void 0 : (_order$ = order[0]) === null || _order$ === void 0 ? void 0 : _order$.currency;
|
|
17895
17895
|
const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
|
|
@@ -17922,7 +17922,7 @@ const SubmitPaymentMethod = _ref => {
|
|
|
17922
17922
|
} = _ref;
|
|
17923
17923
|
const {
|
|
17924
17924
|
plan
|
|
17925
|
-
} = usePelcro
|
|
17925
|
+
} = usePelcro();
|
|
17926
17926
|
const {
|
|
17927
17927
|
t
|
|
17928
17928
|
} = useTranslation("checkoutForm");
|
|
@@ -18314,7 +18314,7 @@ const PaypalSubscribeButton = props => {
|
|
|
18314
18314
|
plan,
|
|
18315
18315
|
invoice,
|
|
18316
18316
|
selectedAddressId
|
|
18317
|
-
} = usePelcro
|
|
18317
|
+
} = usePelcro();
|
|
18318
18318
|
useEffect(() => {
|
|
18319
18319
|
var _ref, _ref2, _state$updatedPrice, _props$plan, _props$selectedAddres;
|
|
18320
18320
|
// sometimes, price is updated. eg. Coupon codes.
|
|
@@ -18451,7 +18451,7 @@ const SelectedPaymentMethod = () => {
|
|
|
18451
18451
|
const {
|
|
18452
18452
|
switchView,
|
|
18453
18453
|
selectedPaymentMethodId
|
|
18454
|
-
} = usePelcro
|
|
18454
|
+
} = usePelcro();
|
|
18455
18455
|
const paymentMethod = (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : (_window$Pelcro$user$r2 = _window$Pelcro$user$r.sources) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : (_window$Pelcro$user$r3 = _window$Pelcro$user$r2.find) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.call(_window$Pelcro$user$r2, source => {
|
|
18456
18456
|
return source.id == selectedPaymentMethodId;
|
|
18457
18457
|
});
|
|
@@ -18491,7 +18491,7 @@ const TaxAmount = () => {
|
|
|
18491
18491
|
} = useContext(store$k);
|
|
18492
18492
|
const {
|
|
18493
18493
|
plan
|
|
18494
|
-
} = usePelcro
|
|
18494
|
+
} = usePelcro();
|
|
18495
18495
|
const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
|
|
18496
18496
|
const priceFormatted = getFormattedPriceByLocal(taxAmount * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
|
|
18497
18497
|
const isTaxInclusive = (_window$Pelcro$site = window.Pelcro.site) === null || _window$Pelcro$site === void 0 ? void 0 : (_window$Pelcro$site$r = _window$Pelcro$site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.tax_inclusive;
|
|
@@ -18635,7 +18635,7 @@ const SubscriptionRenewView = _ref => {
|
|
|
18635
18635
|
const {
|
|
18636
18636
|
product,
|
|
18637
18637
|
plan
|
|
18638
|
-
} = usePelcro
|
|
18638
|
+
} = usePelcro();
|
|
18639
18639
|
const skipPayment = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.skipPaymentForFreePlans;
|
|
18640
18640
|
const showSubscriptionButton = skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0;
|
|
18641
18641
|
const getPricingText = plan => {
|
|
@@ -18688,7 +18688,7 @@ function SubscriptionRenewModal(_ref) {
|
|
|
18688
18688
|
} = _ref;
|
|
18689
18689
|
const {
|
|
18690
18690
|
switchView
|
|
18691
|
-
} = usePelcro
|
|
18691
|
+
} = usePelcro();
|
|
18692
18692
|
const onSuccess = res => {
|
|
18693
18693
|
var _otherProps$onSuccess, _ReactGA$event;
|
|
18694
18694
|
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, res);
|
|
@@ -18884,7 +18884,7 @@ const SubscriptionCancelNowButton = _ref => {
|
|
|
18884
18884
|
} = _ref;
|
|
18885
18885
|
const {
|
|
18886
18886
|
switchView
|
|
18887
|
-
} = usePelcro
|
|
18887
|
+
} = usePelcro();
|
|
18888
18888
|
const {
|
|
18889
18889
|
state: {
|
|
18890
18890
|
cancelationReason
|
|
@@ -18954,7 +18954,7 @@ const SubscriptionCancelLaterButton = _ref => {
|
|
|
18954
18954
|
} = _ref;
|
|
18955
18955
|
const {
|
|
18956
18956
|
switchView
|
|
18957
|
-
} = usePelcro
|
|
18957
|
+
} = usePelcro();
|
|
18958
18958
|
const {
|
|
18959
18959
|
state: {
|
|
18960
18960
|
cancelationReason
|
|
@@ -19019,7 +19019,7 @@ const SubscriptionCancelLaterButton = _ref => {
|
|
|
19019
19019
|
const SubscriptionCancelView = props => {
|
|
19020
19020
|
const {
|
|
19021
19021
|
subscriptionToCancel
|
|
19022
|
-
} = usePelcro
|
|
19022
|
+
} = usePelcro();
|
|
19023
19023
|
const {
|
|
19024
19024
|
t
|
|
19025
19025
|
} = useTranslation("subscriptionCancel");
|
|
@@ -19194,7 +19194,7 @@ const SubscriptionSuspendButton = _ref => {
|
|
|
19194
19194
|
} = _ref;
|
|
19195
19195
|
const {
|
|
19196
19196
|
switchView
|
|
19197
|
-
} = usePelcro
|
|
19197
|
+
} = usePelcro();
|
|
19198
19198
|
const {
|
|
19199
19199
|
state: {
|
|
19200
19200
|
suspendDate,
|
|
@@ -19255,7 +19255,7 @@ const SubscriptionSuspendButton = _ref => {
|
|
|
19255
19255
|
const SubscriptionSuspendView = props => {
|
|
19256
19256
|
const {
|
|
19257
19257
|
subscriptionToSuspend
|
|
19258
|
-
} = usePelcro
|
|
19258
|
+
} = usePelcro();
|
|
19259
19259
|
const {
|
|
19260
19260
|
t
|
|
19261
19261
|
} = useTranslation("subscriptionSuspend");
|
|
@@ -19345,7 +19345,7 @@ const getCurrentFlow = () => {
|
|
|
19345
19345
|
giftRecipient,
|
|
19346
19346
|
giftCode,
|
|
19347
19347
|
invoice
|
|
19348
|
-
} = usePelcro
|
|
19348
|
+
} = usePelcro.getStore();
|
|
19349
19349
|
if (invoice) {
|
|
19350
19350
|
return "invoicePayment";
|
|
19351
19351
|
} else if (giftRecipient) {
|
|
@@ -19361,7 +19361,7 @@ const getSuccessContent = i18n => {
|
|
|
19361
19361
|
const flow = getCurrentFlow();
|
|
19362
19362
|
const {
|
|
19363
19363
|
product
|
|
19364
|
-
} = usePelcro
|
|
19364
|
+
} = usePelcro.getStore();
|
|
19365
19365
|
const wordingDictionary = {
|
|
19366
19366
|
subscriptionSuccess: {
|
|
19367
19367
|
successIcon: /*#__PURE__*/React__default.createElement(SvgCheckSolid, {
|
|
@@ -19405,7 +19405,7 @@ function PaymentSuccessModal(_ref) {
|
|
|
19405
19405
|
} = _ref;
|
|
19406
19406
|
const {
|
|
19407
19407
|
resetView
|
|
19408
|
-
} = usePelcro
|
|
19408
|
+
} = usePelcro();
|
|
19409
19409
|
const onClose = () => {
|
|
19410
19410
|
var _props$onClose;
|
|
19411
19411
|
(_props$onClose = props.onClose) === null || _props$onClose === void 0 ? void 0 : _props$onClose.call(props);
|
|
@@ -19433,7 +19433,7 @@ function NewsletterWithHook(props) {
|
|
|
19433
19433
|
switchView,
|
|
19434
19434
|
resetView,
|
|
19435
19435
|
product
|
|
19436
|
-
} = usePelcro
|
|
19436
|
+
} = usePelcro();
|
|
19437
19437
|
return /*#__PURE__*/React__default.createElement(NewsLetter, {
|
|
19438
19438
|
onClose: () => {
|
|
19439
19439
|
var _props$onClose;
|
|
@@ -19899,7 +19899,7 @@ const MeterView = () => {
|
|
|
19899
19899
|
switchView,
|
|
19900
19900
|
product,
|
|
19901
19901
|
isAuthenticated
|
|
19902
|
-
} = usePelcro
|
|
19902
|
+
} = usePelcro();
|
|
19903
19903
|
const paywallProduct = product !== null && product !== void 0 ? product : window.Pelcro.paywall.getProduct();
|
|
19904
19904
|
const visitsLeft = window.Pelcro.paywall.freeVisitsLeft();
|
|
19905
19905
|
const title = `${paywallProduct === null || paywallProduct === void 0 ? void 0 : (_paywallProduct$paywa = paywallProduct.paywall) === null || _paywallProduct$paywa === void 0 ? void 0 : _paywallProduct$paywa.meter_title}: ${visitsLeft}`;
|
|
@@ -19921,7 +19921,7 @@ const MeterView = () => {
|
|
|
19921
19921
|
const MeterModal = props => {
|
|
19922
19922
|
const {
|
|
19923
19923
|
resetView
|
|
19924
|
-
} = usePelcro
|
|
19924
|
+
} = usePelcro();
|
|
19925
19925
|
useEffect(() => {
|
|
19926
19926
|
var _props$onDisplay;
|
|
19927
19927
|
(_props$onDisplay = props.onDisplay) === null || _props$onDisplay === void 0 ? void 0 : _props$onDisplay.call(props);
|
|
@@ -19955,7 +19955,7 @@ const SubscriptionCreateView = _ref => {
|
|
|
19955
19955
|
const {
|
|
19956
19956
|
product,
|
|
19957
19957
|
plan
|
|
19958
|
-
} = usePelcro
|
|
19958
|
+
} = usePelcro();
|
|
19959
19959
|
const skipPayment = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.skipPaymentForFreePlans;
|
|
19960
19960
|
const showSubscriptionButton = skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0;
|
|
19961
19961
|
const getPricingText = plan => {
|
|
@@ -20010,7 +20010,7 @@ function SubscriptionCreateModal(_ref) {
|
|
|
20010
20010
|
useTranslation("common");
|
|
20011
20011
|
const {
|
|
20012
20012
|
switchView
|
|
20013
|
-
} = usePelcro
|
|
20013
|
+
} = usePelcro();
|
|
20014
20014
|
const onSuccess = res => {
|
|
20015
20015
|
var _otherProps$onSuccess;
|
|
20016
20016
|
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, res);
|
|
@@ -20053,7 +20053,7 @@ const SubscriptionManageMembersContainer = _ref => {
|
|
|
20053
20053
|
} = _ref;
|
|
20054
20054
|
const {
|
|
20055
20055
|
subscriptionToManageMembers
|
|
20056
|
-
} = usePelcro
|
|
20056
|
+
} = usePelcro();
|
|
20057
20057
|
const subscription_id = subscriptionToManageMembers === null || subscriptionToManageMembers === void 0 ? void 0 : subscriptionToManageMembers.id;
|
|
20058
20058
|
const handleListMembers = (_ref2, dispatch) => {
|
|
20059
20059
|
var _window$Pelcro, _window$Pelcro$user, _window$Pelcro$user$r;
|
|
@@ -21108,7 +21108,7 @@ function UserUpdateModal(_ref) {
|
|
|
21108
21108
|
} = _ref;
|
|
21109
21109
|
const {
|
|
21110
21110
|
switchView
|
|
21111
|
-
} = usePelcro
|
|
21111
|
+
} = usePelcro();
|
|
21112
21112
|
const onPictureClick = () => {
|
|
21113
21113
|
switchView("profile-picture");
|
|
21114
21114
|
};
|
|
@@ -21182,7 +21182,7 @@ const AddressCreateContainer = _ref => {
|
|
|
21182
21182
|
order,
|
|
21183
21183
|
set,
|
|
21184
21184
|
selectedMembership
|
|
21185
|
-
} = usePelcro
|
|
21185
|
+
} = usePelcro();
|
|
21186
21186
|
const giftCode = (_props$giftCode = props.giftCode) !== null && _props$giftCode !== void 0 ? _props$giftCode : giftCodeFromStore;
|
|
21187
21187
|
const subscriptionIdToRenew = (_ref2 = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : subscriptionIdToRenewFromStore) !== null && _ref2 !== void 0 ? _ref2 : undefined;
|
|
21188
21188
|
useEffect(() => {
|
|
@@ -21834,7 +21834,7 @@ const AddressCreateView = props => {
|
|
|
21834
21834
|
} = useTranslation("address");
|
|
21835
21835
|
const {
|
|
21836
21836
|
giftRecipient
|
|
21837
|
-
} = usePelcro
|
|
21837
|
+
} = usePelcro();
|
|
21838
21838
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
21839
21839
|
id: "pelcro-address-create-view"
|
|
21840
21840
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -21906,7 +21906,7 @@ const AddressCreateModal = _ref => {
|
|
|
21906
21906
|
switchView,
|
|
21907
21907
|
switchToPaymentView,
|
|
21908
21908
|
resetView
|
|
21909
|
-
} = usePelcro
|
|
21909
|
+
} = usePelcro();
|
|
21910
21910
|
const onSuccess = newAddressId => {
|
|
21911
21911
|
var _otherProps$onSuccess;
|
|
21912
21912
|
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, newAddressId);
|
|
@@ -21992,7 +21992,7 @@ const AddressUpdateContainer = _ref => {
|
|
|
21992
21992
|
} = _ref;
|
|
21993
21993
|
const {
|
|
21994
21994
|
addressIdToEdit
|
|
21995
|
-
} = usePelcro
|
|
21995
|
+
} = usePelcro();
|
|
21996
21996
|
const addressId = (_props$addressId = props === null || props === void 0 ? void 0 : props.addressId) !== null && _props$addressId !== void 0 ? _props$addressId : addressIdToEdit;
|
|
21997
21997
|
const [t] = useTranslation("address");
|
|
21998
21998
|
useEffect(() => {
|
|
@@ -23056,7 +23056,7 @@ const PasswordForgotModal = _ref => {
|
|
|
23056
23056
|
} = useTranslation("passwordForgot");
|
|
23057
23057
|
const {
|
|
23058
23058
|
switchView
|
|
23059
|
-
} = usePelcro
|
|
23059
|
+
} = usePelcro();
|
|
23060
23060
|
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
23061
23061
|
id: "pelcro-password-forgot-modal",
|
|
23062
23062
|
onDisplay: onDisplay,
|
|
@@ -23644,7 +23644,7 @@ const CartContainer = _ref => {
|
|
|
23644
23644
|
const {
|
|
23645
23645
|
cartItems,
|
|
23646
23646
|
set
|
|
23647
|
-
} = usePelcro
|
|
23647
|
+
} = usePelcro();
|
|
23648
23648
|
const {
|
|
23649
23649
|
t
|
|
23650
23650
|
} = useTranslation("shop");
|
|
@@ -23746,7 +23746,7 @@ const CartRemoveItemButton = _ref => {
|
|
|
23746
23746
|
} = _ref;
|
|
23747
23747
|
const {
|
|
23748
23748
|
removeFromCart
|
|
23749
|
-
} = usePelcro
|
|
23749
|
+
} = usePelcro();
|
|
23750
23750
|
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
23751
23751
|
variant: "icon",
|
|
23752
23752
|
"data-key": itemId,
|
|
@@ -23811,7 +23811,7 @@ const CartTotalPrice = () => {
|
|
|
23811
23811
|
} = useContext(store$8);
|
|
23812
23812
|
const {
|
|
23813
23813
|
cartItems
|
|
23814
|
-
} = usePelcro
|
|
23814
|
+
} = usePelcro();
|
|
23815
23815
|
const totalPriceCurrency = cartItems[0].currency;
|
|
23816
23816
|
const {
|
|
23817
23817
|
t
|
|
@@ -23829,7 +23829,7 @@ const CartTotalPrice = () => {
|
|
|
23829
23829
|
const CartView = props => {
|
|
23830
23830
|
const {
|
|
23831
23831
|
cartItems
|
|
23832
|
-
} = usePelcro
|
|
23832
|
+
} = usePelcro();
|
|
23833
23833
|
const {
|
|
23834
23834
|
t
|
|
23835
23835
|
} = useTranslation("cart");
|
|
@@ -23891,7 +23891,7 @@ const CartModal = _ref => {
|
|
|
23891
23891
|
switchView,
|
|
23892
23892
|
switchToAddressView,
|
|
23893
23893
|
isAuthenticated
|
|
23894
|
-
} = usePelcro
|
|
23894
|
+
} = usePelcro();
|
|
23895
23895
|
const onSuccess = items => {
|
|
23896
23896
|
var _otherProps$onSuccess;
|
|
23897
23897
|
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, items);
|
|
@@ -23919,7 +23919,7 @@ const ShopSelectProductButton = _ref => {
|
|
|
23919
23919
|
} = _ref;
|
|
23920
23920
|
const {
|
|
23921
23921
|
addToCart
|
|
23922
|
-
} = usePelcro
|
|
23922
|
+
} = usePelcro();
|
|
23923
23923
|
const {
|
|
23924
23924
|
t
|
|
23925
23925
|
} = useTranslation("shop");
|
|
@@ -23950,7 +23950,7 @@ const ShopPurchaseButton = _ref => {
|
|
|
23950
23950
|
} = _ref;
|
|
23951
23951
|
const {
|
|
23952
23952
|
purchaseItem
|
|
23953
|
-
} = usePelcro
|
|
23953
|
+
} = usePelcro();
|
|
23954
23954
|
const {
|
|
23955
23955
|
t
|
|
23956
23956
|
} = useTranslation("shop");
|
|
@@ -24027,7 +24027,7 @@ const OrderCreateModal = _ref => {
|
|
|
24027
24027
|
} = _ref;
|
|
24028
24028
|
const {
|
|
24029
24029
|
switchView
|
|
24030
|
-
} = usePelcro
|
|
24030
|
+
} = usePelcro();
|
|
24031
24031
|
const onSuccess = () => {
|
|
24032
24032
|
var _otherProps$onSuccess;
|
|
24033
24033
|
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps);
|
|
@@ -24053,7 +24053,7 @@ const OrderConfirmModal = props => {
|
|
|
24053
24053
|
} = useTranslation("shop");
|
|
24054
24054
|
const {
|
|
24055
24055
|
resetView
|
|
24056
|
-
} = usePelcro
|
|
24056
|
+
} = usePelcro();
|
|
24057
24057
|
const onClose = () => {
|
|
24058
24058
|
var _props$onClose;
|
|
24059
24059
|
props === null || props === void 0 ? void 0 : (_props$onClose = props.onClose) === null || _props$onClose === void 0 ? void 0 : _props$onClose.call(props);
|
|
@@ -24142,7 +24142,7 @@ const GiftCreateContainer = _ref => {
|
|
|
24142
24142
|
} = useTranslation("register");
|
|
24143
24143
|
const {
|
|
24144
24144
|
set
|
|
24145
|
-
} = usePelcro
|
|
24145
|
+
} = usePelcro();
|
|
24146
24146
|
const handleSubmit = (state, dispatch) => {
|
|
24147
24147
|
const giftRecipient = {
|
|
24148
24148
|
email: state.email,
|
|
@@ -24422,7 +24422,7 @@ const GiftCreateModal = _ref => {
|
|
|
24422
24422
|
switchToAddressView,
|
|
24423
24423
|
switchToPaymentView,
|
|
24424
24424
|
product
|
|
24425
|
-
} = usePelcro
|
|
24425
|
+
} = usePelcro();
|
|
24426
24426
|
const onSuccess = giftRecipient => {
|
|
24427
24427
|
var _otherProps$onSuccess;
|
|
24428
24428
|
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, giftRecipient);
|
|
@@ -24474,13 +24474,13 @@ const GiftRedeemContainer = _ref => {
|
|
|
24474
24474
|
} = useTranslation("register");
|
|
24475
24475
|
const {
|
|
24476
24476
|
set
|
|
24477
|
-
} = usePelcro
|
|
24477
|
+
} = usePelcro();
|
|
24478
24478
|
const {
|
|
24479
24479
|
switchView,
|
|
24480
24480
|
switchToAddressView,
|
|
24481
24481
|
isAuthenticated,
|
|
24482
24482
|
subscriptionIdToRenew: subscriptionIdToRenewFromStore
|
|
24483
|
-
} = usePelcro
|
|
24483
|
+
} = usePelcro();
|
|
24484
24484
|
const subscriptionIdToRenew = (_ref2 = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : subscriptionIdToRenewFromStore) !== null && _ref2 !== void 0 ? _ref2 : undefined;
|
|
24485
24485
|
useEffect(() => {
|
|
24486
24486
|
onDisplay();
|
|
@@ -24688,7 +24688,7 @@ const GiftRedeemModal = _ref => {
|
|
|
24688
24688
|
switchView,
|
|
24689
24689
|
switchToAddressView,
|
|
24690
24690
|
isAuthenticated
|
|
24691
|
-
} = usePelcro
|
|
24691
|
+
} = usePelcro();
|
|
24692
24692
|
const onSuccess = giftCode => {
|
|
24693
24693
|
var _otherProps$onSuccess;
|
|
24694
24694
|
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, giftCode);
|
|
@@ -24749,7 +24749,7 @@ const AddressSelectContainer = _ref => {
|
|
|
24749
24749
|
subscriptionIdToRenew: subscriptionIdToRenewFromStore,
|
|
24750
24750
|
set,
|
|
24751
24751
|
selectedMembership
|
|
24752
|
-
} = usePelcro
|
|
24752
|
+
} = usePelcro();
|
|
24753
24753
|
const giftCode = (_props$giftCode = props.giftCode) !== null && _props$giftCode !== void 0 ? _props$giftCode : giftCodeFromStore;
|
|
24754
24754
|
const subscriptionIdToRenew = (_ref2 = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : subscriptionIdToRenewFromStore) !== null && _ref2 !== void 0 ? _ref2 : undefined;
|
|
24755
24755
|
const submitAddress = (_ref3, dispatch) => {
|
|
@@ -24982,7 +24982,7 @@ const AddressSelectModal = _ref => {
|
|
|
24982
24982
|
switchView,
|
|
24983
24983
|
switchToPaymentView,
|
|
24984
24984
|
resetView
|
|
24985
|
-
} = usePelcro
|
|
24985
|
+
} = usePelcro();
|
|
24986
24986
|
const onSuccess = selectedAddressId => {
|
|
24987
24987
|
var _otherProps$onSuccess;
|
|
24988
24988
|
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, selectedAddressId);
|
|
@@ -25049,7 +25049,7 @@ const PaymentMethodSelectContainer = _ref => {
|
|
|
25049
25049
|
const {
|
|
25050
25050
|
set,
|
|
25051
25051
|
selectedPaymentMethodId: selectedPaymentMethodIdFromStore
|
|
25052
|
-
} = usePelcro
|
|
25052
|
+
} = usePelcro();
|
|
25053
25053
|
const submitPaymentMethod = _ref2 => {
|
|
25054
25054
|
let {
|
|
25055
25055
|
selectedPaymentMethodId
|
|
@@ -25224,7 +25224,7 @@ const PaymentMethodSelectModal = _ref => {
|
|
|
25224
25224
|
switchToCheckoutForm,
|
|
25225
25225
|
set,
|
|
25226
25226
|
plan
|
|
25227
|
-
} = usePelcro
|
|
25227
|
+
} = usePelcro();
|
|
25228
25228
|
const skipPayment = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.skipPaymentForFreePlans;
|
|
25229
25229
|
useEffect(() => {
|
|
25230
25230
|
if (skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0) {
|
|
@@ -26535,7 +26535,7 @@ const SavedItems = _ref3 => {
|
|
|
26535
26535
|
const [isLoading, setLoading] = useState(false);
|
|
26536
26536
|
const {
|
|
26537
26537
|
isAuthenticated
|
|
26538
|
-
} = usePelcro
|
|
26538
|
+
} = usePelcro();
|
|
26539
26539
|
const removeItemFromMetadata = (category, title) => {
|
|
26540
26540
|
const user = window.Pelcro.user.read();
|
|
26541
26541
|
const oldValue = user.metadata[`metadata_saved_${category}`];
|
|
@@ -26724,7 +26724,7 @@ const SubscriptionsItems = _ref => {
|
|
|
26724
26724
|
setSubscriptionToCancel,
|
|
26725
26725
|
setSubscriptionToSuspend,
|
|
26726
26726
|
set
|
|
26727
|
-
} = usePelcro
|
|
26727
|
+
} = usePelcro();
|
|
26728
26728
|
const subs = getNonDonationSubs();
|
|
26729
26729
|
if (subs.length === 0) return null;
|
|
26730
26730
|
return subs.sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
|
|
@@ -27223,7 +27223,7 @@ const DonationsMenu = _ref => {
|
|
|
27223
27223
|
const {
|
|
27224
27224
|
switchView,
|
|
27225
27225
|
setSubscriptionToCancel
|
|
27226
|
-
} = usePelcro
|
|
27226
|
+
} = usePelcro();
|
|
27227
27227
|
const subscriptions = getDonationSubs().sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
|
|
27228
27228
|
// Cancel button click handlers
|
|
27229
27229
|
const onCancelClick = () => {
|
|
@@ -27334,7 +27334,7 @@ const InvoicesItems = () => {
|
|
|
27334
27334
|
const {
|
|
27335
27335
|
setInvoice,
|
|
27336
27336
|
switchView
|
|
27337
|
-
} = usePelcro
|
|
27337
|
+
} = usePelcro();
|
|
27338
27338
|
const invoices = (_window$Pelcro$invoic = (_window$Pelcro$invoic2 = window.Pelcro.invoice.list()) === null || _window$Pelcro$invoic2 === void 0 ? void 0 : _window$Pelcro$invoic2.filter(invoice => invoice.total > 0)) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
|
|
27339
27339
|
const showInvoiceDetails = event => {
|
|
27340
27340
|
if (setInvoice(event.target.dataset.id)) {
|
|
@@ -27454,7 +27454,7 @@ const MembershipsItems = () => {
|
|
|
27454
27454
|
switchView,
|
|
27455
27455
|
setSelectedMembership,
|
|
27456
27456
|
switchToAddressView
|
|
27457
|
-
} = usePelcro
|
|
27457
|
+
} = usePelcro();
|
|
27458
27458
|
const memberships = getActiveMemberships();
|
|
27459
27459
|
const onChangeAddressClick = membershipId => {
|
|
27460
27460
|
if (userMustVerifyEmail()) {
|
|
@@ -27526,7 +27526,7 @@ function DashboardWithHook(props) {
|
|
|
27526
27526
|
resetView,
|
|
27527
27527
|
logout,
|
|
27528
27528
|
set
|
|
27529
|
-
} = usePelcro
|
|
27529
|
+
} = usePelcro();
|
|
27530
27530
|
return /*#__PURE__*/React__default.createElement(DashboardWithTrans, {
|
|
27531
27531
|
setAddress: addressIdToEdit => set({
|
|
27532
27532
|
addressIdToEdit
|
|
@@ -28112,7 +28112,7 @@ const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
|
|
|
28112
28112
|
const DashboardOpenButton = () => {
|
|
28113
28113
|
const {
|
|
28114
28114
|
switchView
|
|
28115
|
-
} = usePelcro
|
|
28115
|
+
} = usePelcro();
|
|
28116
28116
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
28117
28117
|
className: "plc-fixed plc-right-4 plc-bottom-4 pelcro-open-dashboard-btn"
|
|
28118
28118
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
@@ -30091,13 +30091,12 @@ const EmailVerifyModal = _ref => {
|
|
|
30091
30091
|
} = _ref;
|
|
30092
30092
|
const {
|
|
30093
30093
|
product,
|
|
30094
|
-
plan,
|
|
30095
30094
|
switchToAddressView,
|
|
30096
30095
|
switchToPaymentView
|
|
30097
30096
|
} = usePelcro();
|
|
30098
30097
|
const onSuccess = res => {
|
|
30099
|
-
var
|
|
30100
|
-
(
|
|
30098
|
+
var _otherProps$onSuccess;
|
|
30099
|
+
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, res);
|
|
30101
30100
|
if (product) {
|
|
30102
30101
|
if (product.address_required) {
|
|
30103
30102
|
return switchToAddressView();
|
|
@@ -30256,7 +30255,7 @@ function VerifyLinkTokenModal(_ref) {
|
|
|
30256
30255
|
} = useTranslation("verifyLinkToken");
|
|
30257
30256
|
const {
|
|
30258
30257
|
resetView
|
|
30259
|
-
} = usePelcro
|
|
30258
|
+
} = usePelcro();
|
|
30260
30259
|
const onSuccess = res => {
|
|
30261
30260
|
var _props$onSuccess;
|
|
30262
30261
|
(_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
|
|
@@ -30304,7 +30303,7 @@ const InvoicePaymentModal = _ref => {
|
|
|
30304
30303
|
} = _ref;
|
|
30305
30304
|
const {
|
|
30306
30305
|
switchView
|
|
30307
|
-
} = usePelcro
|
|
30306
|
+
} = usePelcro();
|
|
30308
30307
|
const onSuccess = () => {
|
|
30309
30308
|
var _otherProps$onSuccess;
|
|
30310
30309
|
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps);
|
|
@@ -30378,7 +30377,7 @@ const InvoiceDetailsDownloadButton = _ref => {
|
|
|
30378
30377
|
} = useTranslation("invoiceDetails");
|
|
30379
30378
|
const {
|
|
30380
30379
|
invoice
|
|
30381
|
-
} = usePelcro
|
|
30380
|
+
} = usePelcro();
|
|
30382
30381
|
return /*#__PURE__*/React__default.createElement(Link, Object.assign({
|
|
30383
30382
|
className: `plc-px-6 plc-py-2 plc-uppercase plc-bg-transparent plc-text-primary-500 plc-border plc-border-primary-500 plc-rounded focus:plc-outline-none focus:plc-ring-2 focus:plc-ring-primary-300 plc-tracking-wider hover:plc-bg-primary-600 focus:plc-bg-primary-600 hover:plc-text-white focus:plc-text-white hover:plc-shadow-none plc-no-underline ${className}`,
|
|
30384
30383
|
id: "pelcro-download-invoice-link",
|
|
@@ -30416,7 +30415,7 @@ const InvoiceDetailsView = props => {
|
|
|
30416
30415
|
} = useTranslation("invoiceDetails");
|
|
30417
30416
|
const {
|
|
30418
30417
|
invoice
|
|
30419
|
-
} = usePelcro
|
|
30418
|
+
} = usePelcro();
|
|
30420
30419
|
const showPayButton = canPayInvoice(invoice);
|
|
30421
30420
|
const showDownloadButton = Boolean(invoice === null || invoice === void 0 ? void 0 : invoice.invoice_pdf);
|
|
30422
30421
|
const hasPlanDetails = Boolean(invoice.plan);
|
|
@@ -30484,7 +30483,7 @@ const InvoiceDetailsModal = _ref => {
|
|
|
30484
30483
|
} = _ref;
|
|
30485
30484
|
const {
|
|
30486
30485
|
switchToPaymentView
|
|
30487
|
-
} = usePelcro
|
|
30486
|
+
} = usePelcro();
|
|
30488
30487
|
const onSuccess = () => {
|
|
30489
30488
|
var _otherProps$onSuccess;
|
|
30490
30489
|
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps);
|
|
@@ -31919,4 +31918,4 @@ const QrCodeModal = _ref => {
|
|
|
31919
31918
|
};
|
|
31920
31919
|
QrCodeModal.viewId = "qrcode";
|
|
31921
31920
|
|
|
31922
|
-
export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateSetDefault, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateSetDefault, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankAuthenticationSuccess, 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, IncludeFirstName, IncludeLastName, IncludePhone, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginRequestLoginToken, LoginUsername, 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, QrCodeModal, QrCodeView, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCancelModal, SubscriptionCreateContainer, SubscriptionCreateFreePlanButton, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionManageMembersButton, SubscriptionManageMembersContainer, SubscriptionManageMembersEmails, SubscriptionManageMembersList, SubscriptionManageMembersModal, SubscriptionManageMembersView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, SubscriptionSuspendContainer, SubscriptionSuspendModal, SubscriptionSuspendView, TaxAmount, TextArea, Tooltip, UserNameInput, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateTin, UserUpdateUsername, UserUpdateView, VerifyLinkTokenContainer, VerifyLinkTokenLoader, VerifyLinkTokenModal, VerifyLinkTokenView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify$1 as notify, unauthenticatedButtons, usePelcro
|
|
31921
|
+
export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateSetDefault, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateSetDefault, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankAuthenticationSuccess, 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, IncludeFirstName, IncludeLastName, IncludePhone, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginRequestLoginToken, LoginUsername, 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, QrCodeModal, QrCodeView, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCancelModal, SubscriptionCreateContainer, SubscriptionCreateFreePlanButton, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionManageMembersButton, SubscriptionManageMembersContainer, SubscriptionManageMembersEmails, SubscriptionManageMembersList, SubscriptionManageMembersModal, SubscriptionManageMembersView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, SubscriptionSuspendContainer, SubscriptionSuspendModal, SubscriptionSuspendView, TaxAmount, TextArea, Tooltip, UserNameInput, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateTin, UserUpdateUsername, UserUpdateView, VerifyLinkTokenContainer, VerifyLinkTokenLoader, VerifyLinkTokenModal, VerifyLinkTokenView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify$1 as notify, unauthenticatedButtons, usePelcro };
|