@pelcro/react-pelcro-js 3.19.0-beta.5 → 3.19.0-beta.7
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 +19 -17
- package/dist/index.esm.js +19 -17
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -14468,8 +14468,10 @@ const loadPaymentSDKs = () => {
|
|
|
14468
14468
|
const {
|
|
14469
14469
|
whenUserReady
|
|
14470
14470
|
} = usePelcro.getStore();
|
|
14471
|
+
const supportsVantiv = Boolean(window.Pelcro.site.read().vantiv_gateway_settings);
|
|
14472
|
+
const supportsTap = Boolean(window.Pelcro.site.read().tap_gateway_settings);
|
|
14471
14473
|
whenUserReady(() => {
|
|
14472
|
-
if (!window.Stripe) {
|
|
14474
|
+
if (!window.Stripe && !supportsVantiv && !supportsTap) {
|
|
14473
14475
|
pure_1(window.Pelcro.environment.stripe);
|
|
14474
14476
|
}
|
|
14475
14477
|
});
|
|
@@ -14482,7 +14484,6 @@ const loadPaymentSDKs = () => {
|
|
|
14482
14484
|
}
|
|
14483
14485
|
|
|
14484
14486
|
// Load Vantiv SDKs
|
|
14485
|
-
const supportsVantiv = Boolean(window.Pelcro.site.read().vantiv_gateway_settings);
|
|
14486
14487
|
if (supportsVantiv) {
|
|
14487
14488
|
if (!window.jQuery) {
|
|
14488
14489
|
window.Pelcro.helpers.loadSDK("https://code.jquery.com/jquery-3.6.0.slim.min.js", "vantiv-jquery-sdk");
|
|
@@ -14496,7 +14497,6 @@ const loadPaymentSDKs = () => {
|
|
|
14496
14497
|
}
|
|
14497
14498
|
|
|
14498
14499
|
// Load Tap SDKs
|
|
14499
|
-
const supportsTap = Boolean(window.Pelcro.site.read().tap_gateway_settings);
|
|
14500
14500
|
if (supportsTap) {
|
|
14501
14501
|
window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
|
|
14502
14502
|
window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
|
|
@@ -14623,19 +14623,6 @@ const initViewFromURL = () => {
|
|
|
14623
14623
|
if (isValidViewFromURL(view)) {
|
|
14624
14624
|
whenSiteReady(() => {
|
|
14625
14625
|
if (view === "plan-select") {
|
|
14626
|
-
if (!initSubscriptionFromURL()) {
|
|
14627
|
-
notifier.notify("initSubscriptionFromURL - Empty Products List", event => {
|
|
14628
|
-
var _window$Pelcro, _window$Pelcro$site, _window$Pelcro2, _window$Pelcro2$user, _window$Pelcro3, _window$Pelcro3$uiSet, _window$Pelcro4, _window$Pelcro5, _window$Pelcro5$uiSet;
|
|
14629
|
-
event.addMetadata("MetaData", {
|
|
14630
|
-
site: (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$site = _window$Pelcro.site) === null || _window$Pelcro$site === void 0 ? void 0 : _window$Pelcro$site.read(),
|
|
14631
|
-
user: (_window$Pelcro2 = window.Pelcro) === null || _window$Pelcro2 === void 0 ? void 0 : (_window$Pelcro2$user = _window$Pelcro2.user) === null || _window$Pelcro2$user === void 0 ? void 0 : _window$Pelcro2$user.read(),
|
|
14632
|
-
uiVersion: (_window$Pelcro3 = window.Pelcro) === null || _window$Pelcro3 === void 0 ? void 0 : (_window$Pelcro3$uiSet = _window$Pelcro3.uiSettings) === null || _window$Pelcro3$uiSet === void 0 ? void 0 : _window$Pelcro3$uiSet.uiVersion,
|
|
14633
|
-
environment: (_window$Pelcro4 = window.Pelcro) === null || _window$Pelcro4 === void 0 ? void 0 : _window$Pelcro4.environment
|
|
14634
|
-
});
|
|
14635
|
-
event.app.version = (_window$Pelcro5 = window.Pelcro) === null || _window$Pelcro5 === void 0 ? void 0 : (_window$Pelcro5$uiSet = _window$Pelcro5.uiSettings) === null || _window$Pelcro5$uiSet === void 0 ? void 0 : _window$Pelcro5$uiSet.uiVersion;
|
|
14636
|
-
});
|
|
14637
|
-
return;
|
|
14638
|
-
}
|
|
14639
14626
|
return initSubscriptionFromURL();
|
|
14640
14627
|
}
|
|
14641
14628
|
if (view === "register") {
|
|
@@ -14681,9 +14668,24 @@ const initSubscriptionFromURL = () => {
|
|
|
14681
14668
|
set
|
|
14682
14669
|
} = usePelcro.getStore();
|
|
14683
14670
|
whenSiteReady(() => {
|
|
14684
|
-
var _selectedProduct$plan;
|
|
14671
|
+
var _window$Pelcro, _window$Pelcro$site, _window$Pelcro2, _window$Pelcro2$user, _window$Pelcro3, _window$Pelcro3$uiSet, _window$Pelcro4, _window$Pelcro5, _window$Pelcro5$uiSet, _selectedProduct$plan;
|
|
14685
14672
|
const productsList = window.Pelcro.product.list();
|
|
14673
|
+
console.log({
|
|
14674
|
+
site: (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$site = _window$Pelcro.site) === null || _window$Pelcro$site === void 0 ? void 0 : _window$Pelcro$site.read(),
|
|
14675
|
+
user: (_window$Pelcro2 = window.Pelcro) === null || _window$Pelcro2 === void 0 ? void 0 : (_window$Pelcro2$user = _window$Pelcro2.user) === null || _window$Pelcro2$user === void 0 ? void 0 : _window$Pelcro2$user.read(),
|
|
14676
|
+
uiVersion: (_window$Pelcro3 = window.Pelcro) === null || _window$Pelcro3 === void 0 ? void 0 : (_window$Pelcro3$uiSet = _window$Pelcro3.uiSettings) === null || _window$Pelcro3$uiSet === void 0 ? void 0 : _window$Pelcro3$uiSet.uiVersion,
|
|
14677
|
+
environment: (_window$Pelcro4 = window.Pelcro) === null || _window$Pelcro4 === void 0 ? void 0 : _window$Pelcro4.environment,
|
|
14678
|
+
uiVersionApp: (_window$Pelcro5 = window.Pelcro) === null || _window$Pelcro5 === void 0 ? void 0 : (_window$Pelcro5$uiSet = _window$Pelcro5.uiSettings) === null || _window$Pelcro5$uiSet === void 0 ? void 0 : _window$Pelcro5$uiSet.uiVersion
|
|
14679
|
+
});
|
|
14686
14680
|
if (!(productsList !== null && productsList !== void 0 && productsList.length)) {
|
|
14681
|
+
// notifyBugsnag("initSubscriptionFromURL - Empty Products List");
|
|
14682
|
+
|
|
14683
|
+
notifier.notify("initSubscriptionFromURL Empty Products List", event => {
|
|
14684
|
+
var _window$Pelcro6, _window$Pelcro6$site;
|
|
14685
|
+
event.addMetadata("MetaData", {
|
|
14686
|
+
site: JSON.stringify((_window$Pelcro6 = window.Pelcro) === null || _window$Pelcro6 === void 0 ? void 0 : (_window$Pelcro6$site = _window$Pelcro6.site) === null || _window$Pelcro6$site === void 0 ? void 0 : _window$Pelcro6$site.read())
|
|
14687
|
+
});
|
|
14688
|
+
});
|
|
14687
14689
|
return;
|
|
14688
14690
|
}
|
|
14689
14691
|
const [productId, planId, isGiftParam] = [window.Pelcro.helpers.getURLParameter("product_id"), window.Pelcro.helpers.getURLParameter("plan_id"), window.Pelcro.helpers.getURLParameter("is_gift")];
|
package/dist/index.esm.js
CHANGED
|
@@ -14427,8 +14427,10 @@ const loadPaymentSDKs = () => {
|
|
|
14427
14427
|
const {
|
|
14428
14428
|
whenUserReady
|
|
14429
14429
|
} = usePelcro.getStore();
|
|
14430
|
+
const supportsVantiv = Boolean(window.Pelcro.site.read().vantiv_gateway_settings);
|
|
14431
|
+
const supportsTap = Boolean(window.Pelcro.site.read().tap_gateway_settings);
|
|
14430
14432
|
whenUserReady(() => {
|
|
14431
|
-
if (!window.Stripe) {
|
|
14433
|
+
if (!window.Stripe && !supportsVantiv && !supportsTap) {
|
|
14432
14434
|
pure_1(window.Pelcro.environment.stripe);
|
|
14433
14435
|
}
|
|
14434
14436
|
});
|
|
@@ -14441,7 +14443,6 @@ const loadPaymentSDKs = () => {
|
|
|
14441
14443
|
}
|
|
14442
14444
|
|
|
14443
14445
|
// Load Vantiv SDKs
|
|
14444
|
-
const supportsVantiv = Boolean(window.Pelcro.site.read().vantiv_gateway_settings);
|
|
14445
14446
|
if (supportsVantiv) {
|
|
14446
14447
|
if (!window.jQuery) {
|
|
14447
14448
|
window.Pelcro.helpers.loadSDK("https://code.jquery.com/jquery-3.6.0.slim.min.js", "vantiv-jquery-sdk");
|
|
@@ -14455,7 +14456,6 @@ const loadPaymentSDKs = () => {
|
|
|
14455
14456
|
}
|
|
14456
14457
|
|
|
14457
14458
|
// Load Tap SDKs
|
|
14458
|
-
const supportsTap = Boolean(window.Pelcro.site.read().tap_gateway_settings);
|
|
14459
14459
|
if (supportsTap) {
|
|
14460
14460
|
window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
|
|
14461
14461
|
window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
|
|
@@ -14582,19 +14582,6 @@ const initViewFromURL = () => {
|
|
|
14582
14582
|
if (isValidViewFromURL(view)) {
|
|
14583
14583
|
whenSiteReady(() => {
|
|
14584
14584
|
if (view === "plan-select") {
|
|
14585
|
-
if (!initSubscriptionFromURL()) {
|
|
14586
|
-
notifier.notify("initSubscriptionFromURL - Empty Products List", event => {
|
|
14587
|
-
var _window$Pelcro, _window$Pelcro$site, _window$Pelcro2, _window$Pelcro2$user, _window$Pelcro3, _window$Pelcro3$uiSet, _window$Pelcro4, _window$Pelcro5, _window$Pelcro5$uiSet;
|
|
14588
|
-
event.addMetadata("MetaData", {
|
|
14589
|
-
site: (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$site = _window$Pelcro.site) === null || _window$Pelcro$site === void 0 ? void 0 : _window$Pelcro$site.read(),
|
|
14590
|
-
user: (_window$Pelcro2 = window.Pelcro) === null || _window$Pelcro2 === void 0 ? void 0 : (_window$Pelcro2$user = _window$Pelcro2.user) === null || _window$Pelcro2$user === void 0 ? void 0 : _window$Pelcro2$user.read(),
|
|
14591
|
-
uiVersion: (_window$Pelcro3 = window.Pelcro) === null || _window$Pelcro3 === void 0 ? void 0 : (_window$Pelcro3$uiSet = _window$Pelcro3.uiSettings) === null || _window$Pelcro3$uiSet === void 0 ? void 0 : _window$Pelcro3$uiSet.uiVersion,
|
|
14592
|
-
environment: (_window$Pelcro4 = window.Pelcro) === null || _window$Pelcro4 === void 0 ? void 0 : _window$Pelcro4.environment
|
|
14593
|
-
});
|
|
14594
|
-
event.app.version = (_window$Pelcro5 = window.Pelcro) === null || _window$Pelcro5 === void 0 ? void 0 : (_window$Pelcro5$uiSet = _window$Pelcro5.uiSettings) === null || _window$Pelcro5$uiSet === void 0 ? void 0 : _window$Pelcro5$uiSet.uiVersion;
|
|
14595
|
-
});
|
|
14596
|
-
return;
|
|
14597
|
-
}
|
|
14598
14585
|
return initSubscriptionFromURL();
|
|
14599
14586
|
}
|
|
14600
14587
|
if (view === "register") {
|
|
@@ -14640,9 +14627,24 @@ const initSubscriptionFromURL = () => {
|
|
|
14640
14627
|
set
|
|
14641
14628
|
} = usePelcro.getStore();
|
|
14642
14629
|
whenSiteReady(() => {
|
|
14643
|
-
var _selectedProduct$plan;
|
|
14630
|
+
var _window$Pelcro, _window$Pelcro$site, _window$Pelcro2, _window$Pelcro2$user, _window$Pelcro3, _window$Pelcro3$uiSet, _window$Pelcro4, _window$Pelcro5, _window$Pelcro5$uiSet, _selectedProduct$plan;
|
|
14644
14631
|
const productsList = window.Pelcro.product.list();
|
|
14632
|
+
console.log({
|
|
14633
|
+
site: (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$site = _window$Pelcro.site) === null || _window$Pelcro$site === void 0 ? void 0 : _window$Pelcro$site.read(),
|
|
14634
|
+
user: (_window$Pelcro2 = window.Pelcro) === null || _window$Pelcro2 === void 0 ? void 0 : (_window$Pelcro2$user = _window$Pelcro2.user) === null || _window$Pelcro2$user === void 0 ? void 0 : _window$Pelcro2$user.read(),
|
|
14635
|
+
uiVersion: (_window$Pelcro3 = window.Pelcro) === null || _window$Pelcro3 === void 0 ? void 0 : (_window$Pelcro3$uiSet = _window$Pelcro3.uiSettings) === null || _window$Pelcro3$uiSet === void 0 ? void 0 : _window$Pelcro3$uiSet.uiVersion,
|
|
14636
|
+
environment: (_window$Pelcro4 = window.Pelcro) === null || _window$Pelcro4 === void 0 ? void 0 : _window$Pelcro4.environment,
|
|
14637
|
+
uiVersionApp: (_window$Pelcro5 = window.Pelcro) === null || _window$Pelcro5 === void 0 ? void 0 : (_window$Pelcro5$uiSet = _window$Pelcro5.uiSettings) === null || _window$Pelcro5$uiSet === void 0 ? void 0 : _window$Pelcro5$uiSet.uiVersion
|
|
14638
|
+
});
|
|
14645
14639
|
if (!(productsList !== null && productsList !== void 0 && productsList.length)) {
|
|
14640
|
+
// notifyBugsnag("initSubscriptionFromURL - Empty Products List");
|
|
14641
|
+
|
|
14642
|
+
notifier.notify("initSubscriptionFromURL Empty Products List", event => {
|
|
14643
|
+
var _window$Pelcro6, _window$Pelcro6$site;
|
|
14644
|
+
event.addMetadata("MetaData", {
|
|
14645
|
+
site: JSON.stringify((_window$Pelcro6 = window.Pelcro) === null || _window$Pelcro6 === void 0 ? void 0 : (_window$Pelcro6$site = _window$Pelcro6.site) === null || _window$Pelcro6$site === void 0 ? void 0 : _window$Pelcro6$site.read())
|
|
14646
|
+
});
|
|
14647
|
+
});
|
|
14646
14648
|
return;
|
|
14647
14649
|
}
|
|
14648
14650
|
const [productId, planId, isGiftParam] = [window.Pelcro.helpers.getURLParameter("product_id"), window.Pelcro.helpers.getURLParameter("plan_id"), window.Pelcro.helpers.getURLParameter("is_gift")];
|