@pelcro/react-pelcro-js 3.22.0-beta.17 → 3.22.0-beta.18

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
@@ -11164,16 +11164,12 @@ const initPaywalls = () => {
11164
11164
  };
11165
11165
  const loadPaymentSDKs = () => {
11166
11166
  // Lazy load stripe's SDK
11167
- const {
11168
- whenUserReady
11169
- } = usePelcro.getStore();
11167
+ usePelcro.getStore();
11170
11168
  const supportsVantiv = Boolean(window.Pelcro.site.read().vantiv_gateway_settings);
11171
11169
  const supportsTap = Boolean(window.Pelcro.site.read().tap_gateway_settings);
11172
- whenUserReady(() => {
11173
- if (!window.Stripe && !supportsVantiv && !supportsTap) {
11174
- pure_1(window.Pelcro.environment.stripe);
11175
- }
11176
- });
11170
+ if (!window.Stripe && !supportsVantiv && !supportsTap) {
11171
+ pure_1(window.Pelcro.environment.stripe);
11172
+ }
11177
11173
 
11178
11174
  // Load PayPal SDKs
11179
11175
  const supportsPaypal = Boolean(window.Pelcro.site.read().braintree_tokenization);
@@ -18798,18 +18794,14 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18798
18794
  const UnwrappedForm = es_12(PaymentMethodContainerWithoutStripe);
18799
18795
  const PaymentMethodContainer = props => {
18800
18796
  const [isStripeLoaded, setIsStripeLoaded] = React.useState(Boolean(window.Stripe));
18801
- const {
18802
- whenUserReady
18803
- } = usePelcro.getStore();
18797
+ usePelcro.getStore();
18804
18798
  const cardProcessor = getSiteCardProcessor();
18805
18799
  React.useEffect(() => {
18806
- whenUserReady(() => {
18807
- if (!window.Stripe && cardProcessor === "stripe") {
18808
- document.querySelector('script[src="https://js.stripe.com/v3"]').addEventListener("load", () => {
18809
- setIsStripeLoaded(true);
18810
- });
18811
- }
18812
- });
18800
+ if (!window.Stripe && cardProcessor === "stripe") {
18801
+ document.querySelector('script[src="https://js.stripe.com/v3"]').addEventListener("load", () => {
18802
+ setIsStripeLoaded(true);
18803
+ });
18804
+ }
18813
18805
  }, []);
18814
18806
  if (isStripeLoaded) {
18815
18807
  return /*#__PURE__*/React__default['default'].createElement(es_13, {
package/dist/index.esm.js CHANGED
@@ -11134,16 +11134,12 @@ const initPaywalls = () => {
11134
11134
  };
11135
11135
  const loadPaymentSDKs = () => {
11136
11136
  // Lazy load stripe's SDK
11137
- const {
11138
- whenUserReady
11139
- } = usePelcro.getStore();
11137
+ usePelcro.getStore();
11140
11138
  const supportsVantiv = Boolean(window.Pelcro.site.read().vantiv_gateway_settings);
11141
11139
  const supportsTap = Boolean(window.Pelcro.site.read().tap_gateway_settings);
11142
- whenUserReady(() => {
11143
- if (!window.Stripe && !supportsVantiv && !supportsTap) {
11144
- pure_1(window.Pelcro.environment.stripe);
11145
- }
11146
- });
11140
+ if (!window.Stripe && !supportsVantiv && !supportsTap) {
11141
+ pure_1(window.Pelcro.environment.stripe);
11142
+ }
11147
11143
 
11148
11144
  // Load PayPal SDKs
11149
11145
  const supportsPaypal = Boolean(window.Pelcro.site.read().braintree_tokenization);
@@ -18768,18 +18764,14 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18768
18764
  const UnwrappedForm = es_12(PaymentMethodContainerWithoutStripe);
18769
18765
  const PaymentMethodContainer = props => {
18770
18766
  const [isStripeLoaded, setIsStripeLoaded] = useState(Boolean(window.Stripe));
18771
- const {
18772
- whenUserReady
18773
- } = usePelcro.getStore();
18767
+ usePelcro.getStore();
18774
18768
  const cardProcessor = getSiteCardProcessor();
18775
18769
  useEffect(() => {
18776
- whenUserReady(() => {
18777
- if (!window.Stripe && cardProcessor === "stripe") {
18778
- document.querySelector('script[src="https://js.stripe.com/v3"]').addEventListener("load", () => {
18779
- setIsStripeLoaded(true);
18780
- });
18781
- }
18782
- });
18770
+ if (!window.Stripe && cardProcessor === "stripe") {
18771
+ document.querySelector('script[src="https://js.stripe.com/v3"]').addEventListener("load", () => {
18772
+ setIsStripeLoaded(true);
18773
+ });
18774
+ }
18783
18775
  }, []);
18784
18776
  if (isStripeLoaded) {
18785
18777
  return /*#__PURE__*/React__default.createElement(es_13, {
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.22.0-beta.17",
4
+ "version": "3.22.0-beta.18",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",