@pelcro/react-pelcro-js 3.26.0-beta.66 → 3.26.0-beta.67

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
@@ -23127,7 +23127,7 @@ function PaymentMethodUpdateSetDefault(props) {
23127
23127
  paymentMethodToEdit
23128
23128
  } = usePelcro();
23129
23129
  React.useEffect(() => {
23130
- if (paymentMethodToEdit !== null && paymentMethodToEdit !== void 0 && paymentMethodToEdit.is_default) {
23130
+ if (paymentMethodToEdit !== null && paymentMethodToEdit !== void 0 && paymentMethodToEdit.is_default || props !== null && props !== void 0 && props.paymentMethodDefaultChecked) {
23131
23131
  dispatch({
23132
23132
  type: SET_IS_DEFAULT_PAYMENT_METHOD,
23133
23133
  payload: {
@@ -23135,7 +23135,7 @@ function PaymentMethodUpdateSetDefault(props) {
23135
23135
  }
23136
23136
  });
23137
23137
  }
23138
- }, [paymentMethodToEdit]); // eslint-disable-line react-hooks/exhaustive-deps
23138
+ }, [paymentMethodToEdit, props === null || props === void 0 ? void 0 : props.paymentMethodDefaultChecked]); // eslint-disable-line react-hooks/exhaustive-deps
23139
23139
 
23140
23140
  const handleCheckboxChange = e => {
23141
23141
  dispatch({
@@ -23169,7 +23169,8 @@ function PaymentMethodView(_ref) {
23169
23169
  showOrderButton,
23170
23170
  showApplePayButton,
23171
23171
  order,
23172
- subCreateMetadata
23172
+ subCreateMetadata,
23173
+ ...props
23173
23174
  } = _ref;
23174
23175
  const {
23175
23176
  t
@@ -23244,10 +23245,10 @@ function PaymentMethodView(_ref) {
23244
23245
  type: type
23245
23246
  }), showCoupon && /*#__PURE__*/React__default['default'].createElement("div", {
23246
23247
  className: "plc-mb-2"
23247
- }, /*#__PURE__*/React__default['default'].createElement(CouponCode, null), /*#__PURE__*/React__default['default'].createElement(DiscountedPrice, null)), /*#__PURE__*/React__default['default'].createElement(TaxAmount, null), type === "updatePaymentSource" && /*#__PURE__*/React__default['default'].createElement(PaymentMethodUpdateSetDefault, {
23248
+ }, /*#__PURE__*/React__default['default'].createElement(CouponCode, null), /*#__PURE__*/React__default['default'].createElement(DiscountedPrice, null)), /*#__PURE__*/React__default['default'].createElement(TaxAmount, null), type === "updatePaymentSource" && /*#__PURE__*/React__default['default'].createElement(PaymentMethodUpdateSetDefault, Object.assign({
23248
23249
  id: "pelcro-input-is-default",
23249
23250
  label: t("labels.isDefault")
23250
- }), /*#__PURE__*/React__default['default'].createElement("div", {
23251
+ }, props)), /*#__PURE__*/React__default['default'].createElement("div", {
23251
23252
  className: "plc-grid plc-mt-4 plc-gap-y-2"
23252
23253
  }, /*#__PURE__*/React__default['default'].createElement(SubmitPaymentMethod, null), showExternalPaymentMethods && !supportsVantiv && !supportsCybersource && !supportsTap ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(PelcroPaymentRequestButton, null), /*#__PURE__*/React__default['default'].createElement(PaypalSubscribeButton, null)) : showExternalPaymentMethods && supportsVantiv ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(PaypalSubscribeButton, null)) : null, showApplePayButton && supportsVantiv ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(ApplePayButton, null)) : null)))));
23253
23254
  }
@@ -27623,7 +27624,7 @@ function PaymentMethodUpdateView(props) {
27623
27624
  className: "plc-mb-2 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
27624
27625
  }, /*#__PURE__*/React__default['default'].createElement("h4", {
27625
27626
  className: "plc-text-2xl plc-font-semibold "
27626
- }, t("update.title")), /*#__PURE__*/React__default['default'].createElement("p", null, t("update.subtitle"))), /*#__PURE__*/React__default['default'].createElement(PaymentMethodView, {
27627
+ }, t("update.title")), /*#__PURE__*/React__default['default'].createElement("p", null, t("update.subtitle"))), /*#__PURE__*/React__default['default'].createElement(PaymentMethodView, Object.assign({
27627
27628
  type: "updatePaymentSource",
27628
27629
  showCoupon: false,
27629
27630
  showExternalPaymentMethods: false,
@@ -27631,7 +27632,7 @@ function PaymentMethodUpdateView(props) {
27631
27632
  onDisplay: props.onDisplay,
27632
27633
  onFailure: props.onFailure,
27633
27634
  onSuccess: props.onSuccess
27634
- }));
27635
+ }, props)));
27635
27636
  }
27636
27637
 
27637
27638
  const PaymentMethodUpdateModal = props => {
package/dist/index.esm.js CHANGED
@@ -23097,7 +23097,7 @@ function PaymentMethodUpdateSetDefault(props) {
23097
23097
  paymentMethodToEdit
23098
23098
  } = usePelcro();
23099
23099
  useEffect(() => {
23100
- if (paymentMethodToEdit !== null && paymentMethodToEdit !== void 0 && paymentMethodToEdit.is_default) {
23100
+ if (paymentMethodToEdit !== null && paymentMethodToEdit !== void 0 && paymentMethodToEdit.is_default || props !== null && props !== void 0 && props.paymentMethodDefaultChecked) {
23101
23101
  dispatch({
23102
23102
  type: SET_IS_DEFAULT_PAYMENT_METHOD,
23103
23103
  payload: {
@@ -23105,7 +23105,7 @@ function PaymentMethodUpdateSetDefault(props) {
23105
23105
  }
23106
23106
  });
23107
23107
  }
23108
- }, [paymentMethodToEdit]); // eslint-disable-line react-hooks/exhaustive-deps
23108
+ }, [paymentMethodToEdit, props === null || props === void 0 ? void 0 : props.paymentMethodDefaultChecked]); // eslint-disable-line react-hooks/exhaustive-deps
23109
23109
 
23110
23110
  const handleCheckboxChange = e => {
23111
23111
  dispatch({
@@ -23139,7 +23139,8 @@ function PaymentMethodView(_ref) {
23139
23139
  showOrderButton,
23140
23140
  showApplePayButton,
23141
23141
  order,
23142
- subCreateMetadata
23142
+ subCreateMetadata,
23143
+ ...props
23143
23144
  } = _ref;
23144
23145
  const {
23145
23146
  t
@@ -23214,10 +23215,10 @@ function PaymentMethodView(_ref) {
23214
23215
  type: type
23215
23216
  }), showCoupon && /*#__PURE__*/React__default.createElement("div", {
23216
23217
  className: "plc-mb-2"
23217
- }, /*#__PURE__*/React__default.createElement(CouponCode, null), /*#__PURE__*/React__default.createElement(DiscountedPrice, null)), /*#__PURE__*/React__default.createElement(TaxAmount, null), type === "updatePaymentSource" && /*#__PURE__*/React__default.createElement(PaymentMethodUpdateSetDefault, {
23218
+ }, /*#__PURE__*/React__default.createElement(CouponCode, null), /*#__PURE__*/React__default.createElement(DiscountedPrice, null)), /*#__PURE__*/React__default.createElement(TaxAmount, null), type === "updatePaymentSource" && /*#__PURE__*/React__default.createElement(PaymentMethodUpdateSetDefault, Object.assign({
23218
23219
  id: "pelcro-input-is-default",
23219
23220
  label: t("labels.isDefault")
23220
- }), /*#__PURE__*/React__default.createElement("div", {
23221
+ }, props)), /*#__PURE__*/React__default.createElement("div", {
23221
23222
  className: "plc-grid plc-mt-4 plc-gap-y-2"
23222
23223
  }, /*#__PURE__*/React__default.createElement(SubmitPaymentMethod, null), showExternalPaymentMethods && !supportsVantiv && !supportsCybersource && !supportsTap ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(PelcroPaymentRequestButton, null), /*#__PURE__*/React__default.createElement(PaypalSubscribeButton, null)) : showExternalPaymentMethods && supportsVantiv ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(PaypalSubscribeButton, null)) : null, showApplePayButton && supportsVantiv ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ApplePayButton, null)) : null)))));
23223
23224
  }
@@ -27593,7 +27594,7 @@ function PaymentMethodUpdateView(props) {
27593
27594
  className: "plc-mb-2 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
27594
27595
  }, /*#__PURE__*/React__default.createElement("h4", {
27595
27596
  className: "plc-text-2xl plc-font-semibold "
27596
- }, t("update.title")), /*#__PURE__*/React__default.createElement("p", null, t("update.subtitle"))), /*#__PURE__*/React__default.createElement(PaymentMethodView, {
27597
+ }, t("update.title")), /*#__PURE__*/React__default.createElement("p", null, t("update.subtitle"))), /*#__PURE__*/React__default.createElement(PaymentMethodView, Object.assign({
27597
27598
  type: "updatePaymentSource",
27598
27599
  showCoupon: false,
27599
27600
  showExternalPaymentMethods: false,
@@ -27601,7 +27602,7 @@ function PaymentMethodUpdateView(props) {
27601
27602
  onDisplay: props.onDisplay,
27602
27603
  onFailure: props.onFailure,
27603
27604
  onSuccess: props.onSuccess
27604
- }));
27605
+ }, props)));
27605
27606
  }
27606
27607
 
27607
27608
  const PaymentMethodUpdateModal = props => {
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.26.0-beta.66",
4
+ "version": "3.26.0-beta.67",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",