@pelcro/react-pelcro-js 3.22.0-beta.11 → 3.22.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
@@ -3457,7 +3457,8 @@ var labels$10 = {
3457
3457
  removeCoupon: "REMOVE",
3458
3458
  firstName: "First name",
3459
3459
  lastName: "Last name",
3460
- phone: "Phone"
3460
+ phone: "Phone",
3461
+ freeItems: "Free Items"
3461
3462
  };
3462
3463
  var checkoutForm_en = {
3463
3464
  messages: messages$14,
@@ -4398,7 +4399,8 @@ var labels$H = {
4398
4399
  removeCoupon: "RETIRER",
4399
4400
  firstName: "Prénom",
4400
4401
  lastName: "Nom de famille",
4401
- phone: "Téléphoner"
4402
+ phone: "Téléphoner",
4403
+ freeItems: "Articles gratuits"
4402
4404
  };
4403
4405
  var checkoutForm_fr = {
4404
4406
  messages: messages$M,
@@ -5225,7 +5227,8 @@ var labels$s = {
5225
5227
  removeCoupon: "제거",
5226
5228
  firstName: "이름",
5227
5229
  lastName: "성",
5228
- phone: "핸드폰"
5230
+ phone: "핸드폰",
5231
+ freeItems: "무료 아이템"
5229
5232
  };
5230
5233
  var checkoutForm_ko = {
5231
5234
  messages: messages$v,
@@ -6156,7 +6159,8 @@ var labels$d = {
6156
6159
  removeCoupon: "ELIMINAR",
6157
6160
  firstName: "Nombre",
6158
6161
  lastName: "Apellido",
6159
- phone: "Teléfono"
6162
+ phone: "Teléfono",
6163
+ freeItems: "Artículos gratis"
6160
6164
  };
6161
6165
  var checkoutForm_es = {
6162
6166
  messages: messages$e,
@@ -16403,7 +16407,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
16403
16407
  const isUsingExistingPaymentMethod = Boolean(selectedPaymentMethodId);
16404
16408
  if (isUsingExistingPaymentMethod) {
16405
16409
  // no need to create a new source using tap
16406
- return handleTapPayment(null);
16410
+ return handleTapPayment(null, state);
16407
16411
  }
16408
16412
  if (!tapInstanceRef.current) {
16409
16413
  return console.error("Tap sdk script wasn't loaded, you need to load tap sdk before rendering the tap payment flow");
@@ -16688,7 +16692,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
16688
16692
  const isUsingExistingPaymentMethod = Boolean(selectedPaymentMethodId);
16689
16693
  if (isUsingExistingPaymentMethod) {
16690
16694
  // no need to create a new source using vantiv
16691
- return handleVantivPayment(null);
16695
+ return handleVantivPayment(null, state.couponCode);
16692
16696
  }
16693
16697
  if (!vantivInstanceRef.current) {
16694
16698
  return console.error("Vantiv sdk script wasn't loaded, you need to load vantiv sdk before rendering the vantiv payment flow");
@@ -16841,7 +16845,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
16841
16845
  const tapInstanceRef = React__default['default'].useRef(null);
16842
16846
  const tapInstanceCard = React__default['default'].useRef(null);
16843
16847
  React.useEffect(() => {
16844
- if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || (order === null || order === void 0 ? void 0 : order.price) === 0)) return;
16848
+ if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || props !== null && props !== void 0 && props.freeOrders)) return;
16845
16849
  if (cardProcessor === "vantiv" && !selectedPaymentMethodId) {
16846
16850
  var _window$Pelcro$site$r2, _window$Pelcro$site$r3;
16847
16851
  const payPageId = (_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.vantiv_gateway_settings.pay_page_id;
@@ -16877,7 +16881,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
16877
16881
  }, [vantivPaymentRequest]);
16878
16882
  React.useEffect(() => {
16879
16883
  whenUserReady(() => {
16880
- if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || (order === null || order === void 0 ? void 0 : order.price) === 0)) return;
16884
+ if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || props !== null && props !== void 0 && props.freeOrders)) return;
16881
16885
  if (cardProcessor === "tap" && !window.Tapjsli) {
16882
16886
  window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
16883
16887
  window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
@@ -16891,7 +16895,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
16891
16895
  });
16892
16896
  }, [selectedPaymentMethodId]);
16893
16897
  const initPaymentRequest = (state, dispatch) => {
16894
- if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || (order === null || order === void 0 ? void 0 : order.price) === 0)) return;
16898
+ if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || props !== null && props !== void 0 && props.freeOrders)) return;
16895
16899
  try {
16896
16900
  const paymentRequest = stripe.paymentRequest({
16897
16901
  country: window.Pelcro.user.location.countryCode || "US",
@@ -16960,7 +16964,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
16960
16964
  */
16961
16965
  const updateTotalAmountWithTax = () => {
16962
16966
  var _window$Pelcro$site$r4;
16963
- if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || (order === null || order === void 0 ? void 0 : order.price) === 0)) return;
16967
+ if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || props !== null && props !== void 0 && props.freeOrders)) return;
16964
16968
  const taxesEnabled = (_window$Pelcro$site$r4 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r4 === void 0 ? void 0 : _window$Pelcro$site$r4.taxes_enabled;
16965
16969
  if (taxesEnabled && type === "createPayment") {
16966
16970
  dispatch({
@@ -17564,7 +17568,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17564
17568
  });
17565
17569
  };
17566
17570
  const submitPayment = (state, dispatch) => {
17567
- if (skipPayment && (order === null || order === void 0 ? void 0 : order.price) === 0) {
17571
+ if (skipPayment && props !== null && props !== void 0 && props.freeOrders) {
17568
17572
  const isQuickPurchase = !Array.isArray(order);
17569
17573
  const mappedOrderItems = isQuickPurchase ? [{
17570
17574
  sku_id: order.id,
@@ -17820,11 +17824,11 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17820
17824
  disableSubmit: true,
17821
17825
  isLoading: true
17822
17826
  }, (state, dispatch) => {
17823
- if (skipPayment && (order === null || order === void 0 ? void 0 : order.price) === 0) {
17827
+ if (skipPayment && props !== null && props !== void 0 && props.freeOrders) {
17824
17828
  return submitPayment(state);
17825
17829
  }
17826
17830
  if (getSiteCardProcessor() === "vantiv") {
17827
- return submitUsingVantiv();
17831
+ return submitUsingVantiv(state);
17828
17832
  }
17829
17833
  if (getSiteCardProcessor() === "tap") {
17830
17834
  return submitUsingTap(state);
@@ -18821,7 +18825,7 @@ const OrderCreateFreeButton = _ref => {
18821
18825
  *
18822
18826
  */
18823
18827
  function PaymentMethodView(_ref) {
18824
- var _window$Pelcro$site$r, _window$Pelcro$site$r2;
18828
+ var _window$Pelcro$site$r, _window$Pelcro$site$r2, _calcAndFormatItemsTo, _order$;
18825
18829
  let {
18826
18830
  onSuccess,
18827
18831
  onGiftRenewalSuccess,
@@ -18844,15 +18848,17 @@ function PaymentMethodView(_ref) {
18844
18848
  const isUserPhone = Boolean(window.Pelcro.user.read().phone);
18845
18849
  return /*#__PURE__*/React__default['default'].createElement("div", {
18846
18850
  className: "plc-flex plc-flex-col plc-items-center plc-mt-4 sm:plc-px-8 pelcro-payment-block"
18847
- }, order && !Array.isArray(order) && /*#__PURE__*/React__default['default'].createElement("div", {
18851
+ }, order && /*#__PURE__*/React__default['default'].createElement("div", {
18848
18852
  className: "plc-w-full plc-p-2 plc-mb-4 plc-font-semibold plc-text-center plc-text-gray-900 plc-bg-gray-100 plc-border plc-border-gray-200"
18849
18853
  }, /*#__PURE__*/React__default['default'].createElement("p", {
18850
18854
  className: "plc-text-gray-600"
18851
- }, /*#__PURE__*/React__default['default'].createElement("span", {
18855
+ }, !Array.isArray(order) ? /*#__PURE__*/React__default['default'].createElement("span", {
18852
18856
  className: "plc-tracking-wider plc-uppercase"
18853
- }, order === null || order === void 0 ? void 0 : order.name), /*#__PURE__*/React__default['default'].createElement("br", null), /*#__PURE__*/React__default['default'].createElement("span", {
18857
+ }, order === null || order === void 0 ? void 0 : order.name) : /*#__PURE__*/React__default['default'].createElement("span", {
18858
+ className: "plc-tracking-wider plc-uppercase"
18859
+ }, t("labels.freeItems")), /*#__PURE__*/React__default['default'].createElement("br", null), /*#__PURE__*/React__default['default'].createElement("span", {
18854
18860
  className: "plc-text-xl plc-font-semibold plc-text-primary-600"
18855
- }, getFormattedPriceByLocal(order === null || order === void 0 ? void 0 : order.price, order === null || order === void 0 ? void 0 : order.currency, getPageOrDefaultLanguage())))), cardProcessor === "stripe" && !showSubscriptionButton && !showOrderButton && /*#__PURE__*/React__default['default'].createElement("div", {
18861
+ }, (_calcAndFormatItemsTo = calcAndFormatItemsTotal(order, (_order$ = order[0]) === null || _order$ === void 0 ? void 0 : _order$.currency)) !== null && _calcAndFormatItemsTo !== void 0 ? _calcAndFormatItemsTo : getFormattedPriceByLocal(order === null || order === void 0 ? void 0 : order.price, order === null || order === void 0 ? void 0 : order.currency, getPageOrDefaultLanguage())))), cardProcessor === "stripe" && !showSubscriptionButton && !showOrderButton && /*#__PURE__*/React__default['default'].createElement("div", {
18856
18862
  className: "plc-flex plc-items-center plc-w-full plc-px-4 plc-py-2 plc-text-center plc-text-green-600 plc-border plc-border-green-400 plc-rounded plc-bg-green-50"
18857
18863
  }, /*#__PURE__*/React__default['default'].createElement(SvgLock, {
18858
18864
  className: "plc-w-5 plc-h-5 plc-mr-1"
@@ -18868,7 +18874,8 @@ function PaymentMethodView(_ref) {
18868
18874
  type: type,
18869
18875
  onSuccess: onSuccess,
18870
18876
  onGiftRenewalSuccess: onGiftRenewalSuccess,
18871
- onFailure: onFailure
18877
+ onFailure: onFailure,
18878
+ freeOrders: showOrderButton
18872
18879
  }, /*#__PURE__*/React__default['default'].createElement(AlertWithContext, {
18873
18880
  className: "plc-mb-2"
18874
18881
  }), showSubscriptionButton && /*#__PURE__*/React__default['default'].createElement(SubscriptionCreateFreePlanButton, null), showOrderButton && /*#__PURE__*/React__default['default'].createElement(OrderCreateFreeButton, null), !showSubscriptionButton && !showOrderButton && /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(BankRedirection, null), /*#__PURE__*/React__default['default'].createElement(BankAuthenticationSuccess, null), /*#__PURE__*/React__default['default'].createElement(SelectedPaymentMethod, null), supportsTap && (!isUserFirstName || !isUserLastName || !isUserPhone) && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
@@ -24294,7 +24301,7 @@ const OrderCreateView = props => {
24294
24301
  order
24295
24302
  } = usePelcro();
24296
24303
  const skipPayment = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.skipPaymentForFreePlans;
24297
- const showOrderButton = skipPayment && (order === null || order === void 0 ? void 0 : order.price) === 0;
24304
+ const showOrderButton = skipPayment && ((order === null || order === void 0 ? void 0 : order.price) === 0 || (order === null || order === void 0 ? void 0 : order.length) > 0 && order.every(item => (item === null || item === void 0 ? void 0 : item.price) === 0));
24298
24305
  return /*#__PURE__*/React__default['default'].createElement("div", {
24299
24306
  id: "pelcro-order-create-view"
24300
24307
  }, /*#__PURE__*/React__default['default'].createElement("div", {
package/dist/index.esm.js CHANGED
@@ -3427,7 +3427,8 @@ var labels$10 = {
3427
3427
  removeCoupon: "REMOVE",
3428
3428
  firstName: "First name",
3429
3429
  lastName: "Last name",
3430
- phone: "Phone"
3430
+ phone: "Phone",
3431
+ freeItems: "Free Items"
3431
3432
  };
3432
3433
  var checkoutForm_en = {
3433
3434
  messages: messages$14,
@@ -4368,7 +4369,8 @@ var labels$H = {
4368
4369
  removeCoupon: "RETIRER",
4369
4370
  firstName: "Prénom",
4370
4371
  lastName: "Nom de famille",
4371
- phone: "Téléphoner"
4372
+ phone: "Téléphoner",
4373
+ freeItems: "Articles gratuits"
4372
4374
  };
4373
4375
  var checkoutForm_fr = {
4374
4376
  messages: messages$M,
@@ -5195,7 +5197,8 @@ var labels$s = {
5195
5197
  removeCoupon: "제거",
5196
5198
  firstName: "이름",
5197
5199
  lastName: "성",
5198
- phone: "핸드폰"
5200
+ phone: "핸드폰",
5201
+ freeItems: "무료 아이템"
5199
5202
  };
5200
5203
  var checkoutForm_ko = {
5201
5204
  messages: messages$v,
@@ -6126,7 +6129,8 @@ var labels$d = {
6126
6129
  removeCoupon: "ELIMINAR",
6127
6130
  firstName: "Nombre",
6128
6131
  lastName: "Apellido",
6129
- phone: "Teléfono"
6132
+ phone: "Teléfono",
6133
+ freeItems: "Artículos gratis"
6130
6134
  };
6131
6135
  var checkoutForm_es = {
6132
6136
  messages: messages$e,
@@ -16373,7 +16377,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
16373
16377
  const isUsingExistingPaymentMethod = Boolean(selectedPaymentMethodId);
16374
16378
  if (isUsingExistingPaymentMethod) {
16375
16379
  // no need to create a new source using tap
16376
- return handleTapPayment(null);
16380
+ return handleTapPayment(null, state);
16377
16381
  }
16378
16382
  if (!tapInstanceRef.current) {
16379
16383
  return console.error("Tap sdk script wasn't loaded, you need to load tap sdk before rendering the tap payment flow");
@@ -16658,7 +16662,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
16658
16662
  const isUsingExistingPaymentMethod = Boolean(selectedPaymentMethodId);
16659
16663
  if (isUsingExistingPaymentMethod) {
16660
16664
  // no need to create a new source using vantiv
16661
- return handleVantivPayment(null);
16665
+ return handleVantivPayment(null, state.couponCode);
16662
16666
  }
16663
16667
  if (!vantivInstanceRef.current) {
16664
16668
  return console.error("Vantiv sdk script wasn't loaded, you need to load vantiv sdk before rendering the vantiv payment flow");
@@ -16811,7 +16815,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
16811
16815
  const tapInstanceRef = React__default.useRef(null);
16812
16816
  const tapInstanceCard = React__default.useRef(null);
16813
16817
  useEffect(() => {
16814
- if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || (order === null || order === void 0 ? void 0 : order.price) === 0)) return;
16818
+ if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || props !== null && props !== void 0 && props.freeOrders)) return;
16815
16819
  if (cardProcessor === "vantiv" && !selectedPaymentMethodId) {
16816
16820
  var _window$Pelcro$site$r2, _window$Pelcro$site$r3;
16817
16821
  const payPageId = (_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.vantiv_gateway_settings.pay_page_id;
@@ -16847,7 +16851,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
16847
16851
  }, [vantivPaymentRequest]);
16848
16852
  useEffect(() => {
16849
16853
  whenUserReady(() => {
16850
- if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || (order === null || order === void 0 ? void 0 : order.price) === 0)) return;
16854
+ if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || props !== null && props !== void 0 && props.freeOrders)) return;
16851
16855
  if (cardProcessor === "tap" && !window.Tapjsli) {
16852
16856
  window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
16853
16857
  window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
@@ -16861,7 +16865,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
16861
16865
  });
16862
16866
  }, [selectedPaymentMethodId]);
16863
16867
  const initPaymentRequest = (state, dispatch) => {
16864
- if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || (order === null || order === void 0 ? void 0 : order.price) === 0)) return;
16868
+ if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || props !== null && props !== void 0 && props.freeOrders)) return;
16865
16869
  try {
16866
16870
  const paymentRequest = stripe.paymentRequest({
16867
16871
  country: window.Pelcro.user.location.countryCode || "US",
@@ -16930,7 +16934,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
16930
16934
  */
16931
16935
  const updateTotalAmountWithTax = () => {
16932
16936
  var _window$Pelcro$site$r4;
16933
- if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || (order === null || order === void 0 ? void 0 : order.price) === 0)) return;
16937
+ if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || props !== null && props !== void 0 && props.freeOrders)) return;
16934
16938
  const taxesEnabled = (_window$Pelcro$site$r4 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r4 === void 0 ? void 0 : _window$Pelcro$site$r4.taxes_enabled;
16935
16939
  if (taxesEnabled && type === "createPayment") {
16936
16940
  dispatch({
@@ -17534,7 +17538,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17534
17538
  });
17535
17539
  };
17536
17540
  const submitPayment = (state, dispatch) => {
17537
- if (skipPayment && (order === null || order === void 0 ? void 0 : order.price) === 0) {
17541
+ if (skipPayment && props !== null && props !== void 0 && props.freeOrders) {
17538
17542
  const isQuickPurchase = !Array.isArray(order);
17539
17543
  const mappedOrderItems = isQuickPurchase ? [{
17540
17544
  sku_id: order.id,
@@ -17790,11 +17794,11 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17790
17794
  disableSubmit: true,
17791
17795
  isLoading: true
17792
17796
  }, (state, dispatch) => {
17793
- if (skipPayment && (order === null || order === void 0 ? void 0 : order.price) === 0) {
17797
+ if (skipPayment && props !== null && props !== void 0 && props.freeOrders) {
17794
17798
  return submitPayment(state);
17795
17799
  }
17796
17800
  if (getSiteCardProcessor() === "vantiv") {
17797
- return submitUsingVantiv();
17801
+ return submitUsingVantiv(state);
17798
17802
  }
17799
17803
  if (getSiteCardProcessor() === "tap") {
17800
17804
  return submitUsingTap(state);
@@ -18791,7 +18795,7 @@ const OrderCreateFreeButton = _ref => {
18791
18795
  *
18792
18796
  */
18793
18797
  function PaymentMethodView(_ref) {
18794
- var _window$Pelcro$site$r, _window$Pelcro$site$r2;
18798
+ var _window$Pelcro$site$r, _window$Pelcro$site$r2, _calcAndFormatItemsTo, _order$;
18795
18799
  let {
18796
18800
  onSuccess,
18797
18801
  onGiftRenewalSuccess,
@@ -18814,15 +18818,17 @@ function PaymentMethodView(_ref) {
18814
18818
  const isUserPhone = Boolean(window.Pelcro.user.read().phone);
18815
18819
  return /*#__PURE__*/React__default.createElement("div", {
18816
18820
  className: "plc-flex plc-flex-col plc-items-center plc-mt-4 sm:plc-px-8 pelcro-payment-block"
18817
- }, order && !Array.isArray(order) && /*#__PURE__*/React__default.createElement("div", {
18821
+ }, order && /*#__PURE__*/React__default.createElement("div", {
18818
18822
  className: "plc-w-full plc-p-2 plc-mb-4 plc-font-semibold plc-text-center plc-text-gray-900 plc-bg-gray-100 plc-border plc-border-gray-200"
18819
18823
  }, /*#__PURE__*/React__default.createElement("p", {
18820
18824
  className: "plc-text-gray-600"
18821
- }, /*#__PURE__*/React__default.createElement("span", {
18825
+ }, !Array.isArray(order) ? /*#__PURE__*/React__default.createElement("span", {
18822
18826
  className: "plc-tracking-wider plc-uppercase"
18823
- }, order === null || order === void 0 ? void 0 : order.name), /*#__PURE__*/React__default.createElement("br", null), /*#__PURE__*/React__default.createElement("span", {
18827
+ }, order === null || order === void 0 ? void 0 : order.name) : /*#__PURE__*/React__default.createElement("span", {
18828
+ className: "plc-tracking-wider plc-uppercase"
18829
+ }, t("labels.freeItems")), /*#__PURE__*/React__default.createElement("br", null), /*#__PURE__*/React__default.createElement("span", {
18824
18830
  className: "plc-text-xl plc-font-semibold plc-text-primary-600"
18825
- }, getFormattedPriceByLocal(order === null || order === void 0 ? void 0 : order.price, order === null || order === void 0 ? void 0 : order.currency, getPageOrDefaultLanguage())))), cardProcessor === "stripe" && !showSubscriptionButton && !showOrderButton && /*#__PURE__*/React__default.createElement("div", {
18831
+ }, (_calcAndFormatItemsTo = calcAndFormatItemsTotal(order, (_order$ = order[0]) === null || _order$ === void 0 ? void 0 : _order$.currency)) !== null && _calcAndFormatItemsTo !== void 0 ? _calcAndFormatItemsTo : getFormattedPriceByLocal(order === null || order === void 0 ? void 0 : order.price, order === null || order === void 0 ? void 0 : order.currency, getPageOrDefaultLanguage())))), cardProcessor === "stripe" && !showSubscriptionButton && !showOrderButton && /*#__PURE__*/React__default.createElement("div", {
18826
18832
  className: "plc-flex plc-items-center plc-w-full plc-px-4 plc-py-2 plc-text-center plc-text-green-600 plc-border plc-border-green-400 plc-rounded plc-bg-green-50"
18827
18833
  }, /*#__PURE__*/React__default.createElement(SvgLock, {
18828
18834
  className: "plc-w-5 plc-h-5 plc-mr-1"
@@ -18838,7 +18844,8 @@ function PaymentMethodView(_ref) {
18838
18844
  type: type,
18839
18845
  onSuccess: onSuccess,
18840
18846
  onGiftRenewalSuccess: onGiftRenewalSuccess,
18841
- onFailure: onFailure
18847
+ onFailure: onFailure,
18848
+ freeOrders: showOrderButton
18842
18849
  }, /*#__PURE__*/React__default.createElement(AlertWithContext, {
18843
18850
  className: "plc-mb-2"
18844
18851
  }), showSubscriptionButton && /*#__PURE__*/React__default.createElement(SubscriptionCreateFreePlanButton, null), showOrderButton && /*#__PURE__*/React__default.createElement(OrderCreateFreeButton, null), !showSubscriptionButton && !showOrderButton && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(BankRedirection, null), /*#__PURE__*/React__default.createElement(BankAuthenticationSuccess, null), /*#__PURE__*/React__default.createElement(SelectedPaymentMethod, null), supportsTap && (!isUserFirstName || !isUserLastName || !isUserPhone) && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
@@ -24264,7 +24271,7 @@ const OrderCreateView = props => {
24264
24271
  order
24265
24272
  } = usePelcro();
24266
24273
  const skipPayment = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.skipPaymentForFreePlans;
24267
- const showOrderButton = skipPayment && (order === null || order === void 0 ? void 0 : order.price) === 0;
24274
+ const showOrderButton = skipPayment && ((order === null || order === void 0 ? void 0 : order.price) === 0 || (order === null || order === void 0 ? void 0 : order.length) > 0 && order.every(item => (item === null || item === void 0 ? void 0 : item.price) === 0));
24268
24275
  return /*#__PURE__*/React__default.createElement("div", {
24269
24276
  id: "pelcro-order-create-view"
24270
24277
  }, /*#__PURE__*/React__default.createElement("div", {
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.11",
4
+ "version": "3.22.0-beta.13",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",