@pelcro/react-pelcro-js 3.19.0-beta.4 → 3.19.0-beta.6

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 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,6 +14623,19 @@ 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
+ }
14626
14639
  return initSubscriptionFromURL();
14627
14640
  }
14628
14641
  if (view === "register") {
@@ -14671,18 +14684,6 @@ const initSubscriptionFromURL = () => {
14671
14684
  var _selectedProduct$plan;
14672
14685
  const productsList = window.Pelcro.product.list();
14673
14686
  if (!(productsList !== null && productsList !== void 0 && productsList.length)) {
14674
- // notifyBugsnag("initSubscriptionFromURL - Empty Products List");
14675
-
14676
- notifier.notify("initSubscriptionFromURL - Empty Products List", event => {
14677
- var _window$Pelcro, _window$Pelcro$site, _window$Pelcro2, _window$Pelcro2$user, _window$Pelcro3, _window$Pelcro3$uiSet, _window$Pelcro4, _window$Pelcro5, _window$Pelcro5$uiSet;
14678
- event.addMetadata("MetaData", {
14679
- 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(),
14680
- 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(),
14681
- 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,
14682
- environment: (_window$Pelcro4 = window.Pelcro) === null || _window$Pelcro4 === void 0 ? void 0 : _window$Pelcro4.environment
14683
- });
14684
- 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;
14685
- });
14686
14687
  return;
14687
14688
  }
14688
14689
  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,6 +14582,19 @@ 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
+ }
14585
14598
  return initSubscriptionFromURL();
14586
14599
  }
14587
14600
  if (view === "register") {
@@ -14630,18 +14643,6 @@ const initSubscriptionFromURL = () => {
14630
14643
  var _selectedProduct$plan;
14631
14644
  const productsList = window.Pelcro.product.list();
14632
14645
  if (!(productsList !== null && productsList !== void 0 && productsList.length)) {
14633
- // notifyBugsnag("initSubscriptionFromURL - Empty Products List");
14634
-
14635
- notifier.notify("initSubscriptionFromURL - Empty Products List", event => {
14636
- var _window$Pelcro, _window$Pelcro$site, _window$Pelcro2, _window$Pelcro2$user, _window$Pelcro3, _window$Pelcro3$uiSet, _window$Pelcro4, _window$Pelcro5, _window$Pelcro5$uiSet;
14637
- event.addMetadata("MetaData", {
14638
- 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(),
14639
- 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(),
14640
- 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,
14641
- environment: (_window$Pelcro4 = window.Pelcro) === null || _window$Pelcro4 === void 0 ? void 0 : _window$Pelcro4.environment
14642
- });
14643
- 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;
14644
- });
14645
14646
  return;
14646
14647
  }
14647
14648
  const [productId, planId, isGiftParam] = [window.Pelcro.helpers.getURLParameter("product_id"), window.Pelcro.helpers.getURLParameter("plan_id"), window.Pelcro.helpers.getURLParameter("is_gift")];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pelcro/react-pelcro-js",
3
3
  "description": "Pelcro's React UI Elements",
4
- "version": "3.19.0-beta.4",
4
+ "version": "3.19.0-beta.6",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",