@pelcro/react-pelcro-js 3.17.0-beta.12 → 3.17.0-beta.13

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
@@ -13194,6 +13194,7 @@ function LoginModal(_ref) {
13194
13194
  switchView,
13195
13195
  resetView,
13196
13196
  product,
13197
+ plan,
13197
13198
  order,
13198
13199
  switchToAddressView,
13199
13200
  switchToPaymentView
@@ -13204,13 +13205,16 @@ function LoginModal(_ref) {
13204
13205
  if (window.Pelcro.paywall.isArticleRestricted()) {
13205
13206
  initPaywalls();
13206
13207
  }
13207
- if (product) {
13208
+ if (product && plan) {
13208
13209
  if (product.address_required) {
13209
13210
  return switchToAddressView();
13210
13211
  } else {
13211
13212
  return switchToPaymentView();
13212
13213
  }
13213
13214
  }
13215
+ if (product && !plan) {
13216
+ return switchView("plan-select");
13217
+ }
13214
13218
  if (order) {
13215
13219
  return switchToAddressView();
13216
13220
  }
@@ -13757,6 +13761,7 @@ function RegisterModal(props) {
13757
13761
  switchToAddressView,
13758
13762
  switchToPaymentView,
13759
13763
  product,
13764
+ plan,
13760
13765
  order,
13761
13766
  giftCode,
13762
13767
  isGift
@@ -13795,13 +13800,16 @@ function RegisterModal(props) {
13795
13800
  if (order) {
13796
13801
  return switchToAddressView();
13797
13802
  }
13798
- if (product) {
13803
+ if (product && plan) {
13799
13804
  if (product.address_required) {
13800
13805
  return switchToAddressView();
13801
13806
  } else {
13802
13807
  return switchToPaymentView();
13803
13808
  }
13804
13809
  }
13810
+ if (product && !plan) {
13811
+ return switchView("plan-select");
13812
+ }
13805
13813
  return resetView();
13806
13814
  };
13807
13815
  return /*#__PURE__*/React__default['default'].createElement(Modal, {
@@ -30121,19 +30129,23 @@ const EmailVerifyModal = _ref => {
30121
30129
  } = _ref;
30122
30130
  const {
30123
30131
  product,
30132
+ plan,
30124
30133
  switchToAddressView,
30125
30134
  switchToPaymentView
30126
30135
  } = usePelcro();
30127
30136
  const onSuccess = res => {
30128
30137
  var _otherProps$onSuccess;
30129
30138
  (_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, res);
30130
- if (product) {
30139
+ if (product && plan) {
30131
30140
  if (product.address_required) {
30132
30141
  return switchToAddressView();
30133
30142
  } else {
30134
30143
  return switchToPaymentView();
30135
30144
  }
30136
30145
  }
30146
+ if (product && !plan) {
30147
+ return switchView("plan-select");
30148
+ }
30137
30149
  };
30138
30150
  return /*#__PURE__*/React__default['default'].createElement(Modal, {
30139
30151
  onDisplay: onDisplay,
package/dist/index.esm.js CHANGED
@@ -13164,6 +13164,7 @@ function LoginModal(_ref) {
13164
13164
  switchView,
13165
13165
  resetView,
13166
13166
  product,
13167
+ plan,
13167
13168
  order,
13168
13169
  switchToAddressView,
13169
13170
  switchToPaymentView
@@ -13174,13 +13175,16 @@ function LoginModal(_ref) {
13174
13175
  if (window.Pelcro.paywall.isArticleRestricted()) {
13175
13176
  initPaywalls();
13176
13177
  }
13177
- if (product) {
13178
+ if (product && plan) {
13178
13179
  if (product.address_required) {
13179
13180
  return switchToAddressView();
13180
13181
  } else {
13181
13182
  return switchToPaymentView();
13182
13183
  }
13183
13184
  }
13185
+ if (product && !plan) {
13186
+ return switchView("plan-select");
13187
+ }
13184
13188
  if (order) {
13185
13189
  return switchToAddressView();
13186
13190
  }
@@ -13727,6 +13731,7 @@ function RegisterModal(props) {
13727
13731
  switchToAddressView,
13728
13732
  switchToPaymentView,
13729
13733
  product,
13734
+ plan,
13730
13735
  order,
13731
13736
  giftCode,
13732
13737
  isGift
@@ -13765,13 +13770,16 @@ function RegisterModal(props) {
13765
13770
  if (order) {
13766
13771
  return switchToAddressView();
13767
13772
  }
13768
- if (product) {
13773
+ if (product && plan) {
13769
13774
  if (product.address_required) {
13770
13775
  return switchToAddressView();
13771
13776
  } else {
13772
13777
  return switchToPaymentView();
13773
13778
  }
13774
13779
  }
13780
+ if (product && !plan) {
13781
+ return switchView("plan-select");
13782
+ }
13775
13783
  return resetView();
13776
13784
  };
13777
13785
  return /*#__PURE__*/React__default.createElement(Modal, {
@@ -30091,19 +30099,23 @@ const EmailVerifyModal = _ref => {
30091
30099
  } = _ref;
30092
30100
  const {
30093
30101
  product,
30102
+ plan,
30094
30103
  switchToAddressView,
30095
30104
  switchToPaymentView
30096
30105
  } = usePelcro();
30097
30106
  const onSuccess = res => {
30098
30107
  var _otherProps$onSuccess;
30099
30108
  (_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, res);
30100
- if (product) {
30109
+ if (product && plan) {
30101
30110
  if (product.address_required) {
30102
30111
  return switchToAddressView();
30103
30112
  } else {
30104
30113
  return switchToPaymentView();
30105
30114
  }
30106
30115
  }
30116
+ if (product && !plan) {
30117
+ return switchView("plan-select");
30118
+ }
30107
30119
  };
30108
30120
  return /*#__PURE__*/React__default.createElement(Modal, {
30109
30121
  onDisplay: onDisplay,
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.17.0-beta.12",
4
+ "version": "3.17.0-beta.13",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",