@pelcro/react-pelcro-js 3.10.1-beta.15 → 3.10.1-beta.17

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
@@ -15417,22 +15417,16 @@ const PaymentMethodContainerWithoutStripe = ({
15417
15417
  const isRenewingGift = (_props$isRenewingGift = props.isRenewingGift) !== null && _props$isRenewingGift !== void 0 ? _props$isRenewingGift : pelcroStore.isRenewingGift;
15418
15418
  const invoice = (_props$invoice = props.invoice) !== null && _props$invoice !== void 0 ? _props$invoice : pelcroStore.invoice;
15419
15419
  const cardProcessor = getSiteCardProcessor();
15420
- const [isTapLoaded, setIsTapLoaded] = React.useState(Boolean(window.Tapjsli)); // useEffect(() => {
15421
- // whenUserReady(() => {
15422
- // if (cardProcessor === "tap" && !window.Tapjsli) {
15423
- // window.Pelcro.helpers.loadSDK(
15424
- // "https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js",
15425
- // "tap-bluebird"
15426
- // );
15427
- // window.Pelcro.helpers.loadSDK(
15428
- // "https://secure.gosell.io/js/sdk/tap.min.js",
15429
- // "tap-sdk"
15430
- // );
15431
- // setIsTapLoaded(true);
15432
- // }
15433
- // });
15434
- // }, []);
15435
-
15420
+ const [isTapLoaded, setIsTapLoaded] = React.useState(Boolean(window.Tapjsli));
15421
+ React.useEffect(() => {
15422
+ whenUserReady(() => {
15423
+ if (cardProcessor === "tap" && !window.Tapjsli) {
15424
+ window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
15425
+ window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
15426
+ setIsTapLoaded(true);
15427
+ }
15428
+ });
15429
+ }, [isTapLoaded]);
15436
15430
  React.useEffect(() => {
15437
15431
  if (window.Pelcro.coupon.getFromUrl()) {
15438
15432
  dispatch({
@@ -15988,15 +15982,9 @@ const PaymentMethodContainerWithoutStripe = ({
15988
15982
  window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
15989
15983
  window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
15990
15984
  setIsTapLoaded(true);
15991
- }); // window.Pelcro.helpers.loadSDK(
15992
- // "https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js",
15993
- // "tap-bluebird"
15994
- // );
15995
- // window.Pelcro.helpers.loadSDK(
15996
- // "https://secure.gosell.io/js/sdk/tap.min.js",
15997
- // "tap-sdk"
15998
- // );
15999
-
15985
+ });
15986
+ window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
15987
+ window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
16000
15988
  setIsTapLoaded(true);
16001
15989
  }
16002
15990
  }, [selectedPaymentMethodId, isTapLoaded]);
@@ -17120,17 +17108,26 @@ const PaymentMethodContainerWithoutStripe = ({
17120
17108
  const UnwrappedForm = es_12(PaymentMethodContainerWithoutStripe);
17121
17109
 
17122
17110
  const PaymentMethodContainer = props => {
17111
+ console.log("Inside Payment Method Container");
17123
17112
  const [isStripeLoaded, setIsStripeLoaded] = React.useState(Boolean(window.Stripe));
17124
17113
  const {
17125
17114
  whenUserReady
17126
17115
  } = usePelcro.getStore();
17116
+ const cardProcessor = getSiteCardProcessor();
17127
17117
  React.useEffect(() => {
17128
17118
  whenUserReady(() => {
17129
17119
  if (!window.Stripe) {
17120
+ console.log("Inside Payment Method Container and window.Stripe is not loaded");
17130
17121
  document.querySelector('script[src="https://js.stripe.com/v3"]').addEventListener("load", () => {
17131
17122
  setIsStripeLoaded(true);
17132
17123
  });
17133
17124
  }
17125
+
17126
+ if (cardProcessor === "tap" && !window.Tapjsli) {
17127
+ console.log("Inside Payment Method Container and window.Tapjsli is not loaded");
17128
+ window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
17129
+ window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
17130
+ }
17134
17131
  });
17135
17132
  }, []);
17136
17133
 
package/dist/index.esm.js CHANGED
@@ -15387,22 +15387,16 @@ const PaymentMethodContainerWithoutStripe = ({
15387
15387
  const isRenewingGift = (_props$isRenewingGift = props.isRenewingGift) !== null && _props$isRenewingGift !== void 0 ? _props$isRenewingGift : pelcroStore.isRenewingGift;
15388
15388
  const invoice = (_props$invoice = props.invoice) !== null && _props$invoice !== void 0 ? _props$invoice : pelcroStore.invoice;
15389
15389
  const cardProcessor = getSiteCardProcessor();
15390
- const [isTapLoaded, setIsTapLoaded] = useState(Boolean(window.Tapjsli)); // useEffect(() => {
15391
- // whenUserReady(() => {
15392
- // if (cardProcessor === "tap" && !window.Tapjsli) {
15393
- // window.Pelcro.helpers.loadSDK(
15394
- // "https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js",
15395
- // "tap-bluebird"
15396
- // );
15397
- // window.Pelcro.helpers.loadSDK(
15398
- // "https://secure.gosell.io/js/sdk/tap.min.js",
15399
- // "tap-sdk"
15400
- // );
15401
- // setIsTapLoaded(true);
15402
- // }
15403
- // });
15404
- // }, []);
15405
-
15390
+ const [isTapLoaded, setIsTapLoaded] = useState(Boolean(window.Tapjsli));
15391
+ useEffect(() => {
15392
+ whenUserReady(() => {
15393
+ if (cardProcessor === "tap" && !window.Tapjsli) {
15394
+ window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
15395
+ window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
15396
+ setIsTapLoaded(true);
15397
+ }
15398
+ });
15399
+ }, [isTapLoaded]);
15406
15400
  useEffect(() => {
15407
15401
  if (window.Pelcro.coupon.getFromUrl()) {
15408
15402
  dispatch({
@@ -15958,15 +15952,9 @@ const PaymentMethodContainerWithoutStripe = ({
15958
15952
  window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
15959
15953
  window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
15960
15954
  setIsTapLoaded(true);
15961
- }); // window.Pelcro.helpers.loadSDK(
15962
- // "https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js",
15963
- // "tap-bluebird"
15964
- // );
15965
- // window.Pelcro.helpers.loadSDK(
15966
- // "https://secure.gosell.io/js/sdk/tap.min.js",
15967
- // "tap-sdk"
15968
- // );
15969
-
15955
+ });
15956
+ window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
15957
+ window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
15970
15958
  setIsTapLoaded(true);
15971
15959
  }
15972
15960
  }, [selectedPaymentMethodId, isTapLoaded]);
@@ -17090,17 +17078,26 @@ const PaymentMethodContainerWithoutStripe = ({
17090
17078
  const UnwrappedForm = es_12(PaymentMethodContainerWithoutStripe);
17091
17079
 
17092
17080
  const PaymentMethodContainer = props => {
17081
+ console.log("Inside Payment Method Container");
17093
17082
  const [isStripeLoaded, setIsStripeLoaded] = useState(Boolean(window.Stripe));
17094
17083
  const {
17095
17084
  whenUserReady
17096
17085
  } = usePelcro.getStore();
17086
+ const cardProcessor = getSiteCardProcessor();
17097
17087
  useEffect(() => {
17098
17088
  whenUserReady(() => {
17099
17089
  if (!window.Stripe) {
17090
+ console.log("Inside Payment Method Container and window.Stripe is not loaded");
17100
17091
  document.querySelector('script[src="https://js.stripe.com/v3"]').addEventListener("load", () => {
17101
17092
  setIsStripeLoaded(true);
17102
17093
  });
17103
17094
  }
17095
+
17096
+ if (cardProcessor === "tap" && !window.Tapjsli) {
17097
+ console.log("Inside Payment Method Container and window.Tapjsli is not loaded");
17098
+ window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
17099
+ window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
17100
+ }
17104
17101
  });
17105
17102
  }, []);
17106
17103
 
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.10.1-beta.15",
4
+ "version": "3.10.1-beta.17",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",