@pelcro/react-pelcro-js 3.9.0-beta.10 → 3.9.0-beta.12

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
@@ -3823,7 +3823,7 @@ var labels$F = {
3823
3823
  "for": "for",
3824
3824
  interval: "{{count}} {{interval}}",
3825
3825
  interval_plural: "{{count}} {{interval}}s",
3826
- tax: "+ Tax",
3826
+ tax: "Tax",
3827
3827
  removeCoupon: "REMOVE",
3828
3828
  firstName: "First name",
3829
3829
  lastName: "Last name",
@@ -3853,7 +3853,7 @@ var labels$E = {
3853
3853
  "for": "pour",
3854
3854
  interval: "{{count}} {{interval}}",
3855
3855
  interval_plural: "{{count}} {{interval}}s",
3856
- tax: "+ Taxe",
3856
+ tax: "Taxe",
3857
3857
  removeCoupon: "RETIRER",
3858
3858
  firstName: "Prénom",
3859
3859
  lastName: "Nom de famille",
@@ -3883,7 +3883,7 @@ var labels$D = {
3883
3883
  "for": "관련",
3884
3884
  interval: "{{count}} {{interval}}",
3885
3885
  interval_plural: "{{count}} {{interval}}",
3886
- tax: "+ 세금",
3886
+ tax: "세금",
3887
3887
  removeCoupon: "제거",
3888
3888
  firstName: "이름",
3889
3889
  lastName: "성",
@@ -15540,21 +15540,6 @@ const PaymentMethodContainerWithoutStripe = ({
15540
15540
  };
15541
15541
 
15542
15542
  function handleTapPayment(paymentRequest) {
15543
- // if (paymentRequest) {
15544
- // const SUCCESS_STATUS = "870";
15545
- // if (paymentRequest.response !== SUCCESS_STATUS) {
15546
- // switch (paymentRequest.response) {
15547
- // case "871":
15548
- // return handlePaymentError({
15549
- // error: new Error("Invalid account number")
15550
- // });
15551
- // default:
15552
- // return handlePaymentError({
15553
- // error: new Error(paymentRequest.message)
15554
- // });
15555
- // }
15556
- // }
15557
- // }
15558
15543
  const isUsingExistingPaymentMethod = Boolean(selectedPaymentMethodId);
15559
15544
 
15560
15545
  if (type === "createPayment") {
@@ -17851,7 +17836,7 @@ const SelectedPaymentMethod = () => {
17851
17836
  };
17852
17837
 
17853
17838
  const TaxAmount = () => {
17854
- var _plan$quantity;
17839
+ var _plan$quantity, _window$Pelcro$site, _window$Pelcro$site$r;
17855
17840
 
17856
17841
  const {
17857
17842
  t
@@ -17866,13 +17851,14 @@ const TaxAmount = () => {
17866
17851
  } = usePelcro();
17867
17852
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
17868
17853
  const priceFormatted = getFormattedPriceByLocal(taxAmount * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
17854
+ const isTaxInclusive = (_window$Pelcro$site = window.Pelcro.site) === null || _window$Pelcro$site === void 0 ? void 0 : (_window$Pelcro$site$r = _window$Pelcro$site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.tax_inclusive;
17869
17855
 
17870
17856
  if (taxAmount) {
17871
17857
  return /*#__PURE__*/React__default['default'].createElement("div", {
17872
17858
  className: "plc-text-center pelcro-tax-amount"
17873
- }, t("labels.tax"), " ", /*#__PURE__*/React__default['default'].createElement("span", {
17859
+ }, isTaxInclusive && "(", isTaxInclusive ? `Includes ${t("labels.tax")}` : `+ ${t("labels.tax")}`, " ", /*#__PURE__*/React__default['default'].createElement("span", {
17874
17860
  className: "plc-font-bold"
17875
- }, priceFormatted));
17861
+ }, priceFormatted), isTaxInclusive && ")");
17876
17862
  }
17877
17863
 
17878
17864
  return null;
package/dist/index.esm.js CHANGED
@@ -3793,7 +3793,7 @@ var labels$F = {
3793
3793
  "for": "for",
3794
3794
  interval: "{{count}} {{interval}}",
3795
3795
  interval_plural: "{{count}} {{interval}}s",
3796
- tax: "+ Tax",
3796
+ tax: "Tax",
3797
3797
  removeCoupon: "REMOVE",
3798
3798
  firstName: "First name",
3799
3799
  lastName: "Last name",
@@ -3823,7 +3823,7 @@ var labels$E = {
3823
3823
  "for": "pour",
3824
3824
  interval: "{{count}} {{interval}}",
3825
3825
  interval_plural: "{{count}} {{interval}}s",
3826
- tax: "+ Taxe",
3826
+ tax: "Taxe",
3827
3827
  removeCoupon: "RETIRER",
3828
3828
  firstName: "Prénom",
3829
3829
  lastName: "Nom de famille",
@@ -3853,7 +3853,7 @@ var labels$D = {
3853
3853
  "for": "관련",
3854
3854
  interval: "{{count}} {{interval}}",
3855
3855
  interval_plural: "{{count}} {{interval}}",
3856
- tax: "+ 세금",
3856
+ tax: "세금",
3857
3857
  removeCoupon: "제거",
3858
3858
  firstName: "이름",
3859
3859
  lastName: "성",
@@ -15510,21 +15510,6 @@ const PaymentMethodContainerWithoutStripe = ({
15510
15510
  };
15511
15511
 
15512
15512
  function handleTapPayment(paymentRequest) {
15513
- // if (paymentRequest) {
15514
- // const SUCCESS_STATUS = "870";
15515
- // if (paymentRequest.response !== SUCCESS_STATUS) {
15516
- // switch (paymentRequest.response) {
15517
- // case "871":
15518
- // return handlePaymentError({
15519
- // error: new Error("Invalid account number")
15520
- // });
15521
- // default:
15522
- // return handlePaymentError({
15523
- // error: new Error(paymentRequest.message)
15524
- // });
15525
- // }
15526
- // }
15527
- // }
15528
15513
  const isUsingExistingPaymentMethod = Boolean(selectedPaymentMethodId);
15529
15514
 
15530
15515
  if (type === "createPayment") {
@@ -17821,7 +17806,7 @@ const SelectedPaymentMethod = () => {
17821
17806
  };
17822
17807
 
17823
17808
  const TaxAmount = () => {
17824
- var _plan$quantity;
17809
+ var _plan$quantity, _window$Pelcro$site, _window$Pelcro$site$r;
17825
17810
 
17826
17811
  const {
17827
17812
  t
@@ -17836,13 +17821,14 @@ const TaxAmount = () => {
17836
17821
  } = usePelcro();
17837
17822
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
17838
17823
  const priceFormatted = getFormattedPriceByLocal(taxAmount * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
17824
+ const isTaxInclusive = (_window$Pelcro$site = window.Pelcro.site) === null || _window$Pelcro$site === void 0 ? void 0 : (_window$Pelcro$site$r = _window$Pelcro$site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.tax_inclusive;
17839
17825
 
17840
17826
  if (taxAmount) {
17841
17827
  return /*#__PURE__*/React__default.createElement("div", {
17842
17828
  className: "plc-text-center pelcro-tax-amount"
17843
- }, t("labels.tax"), " ", /*#__PURE__*/React__default.createElement("span", {
17829
+ }, isTaxInclusive && "(", isTaxInclusive ? `Includes ${t("labels.tax")}` : `+ ${t("labels.tax")}`, " ", /*#__PURE__*/React__default.createElement("span", {
17844
17830
  className: "plc-font-bold"
17845
- }, priceFormatted));
17831
+ }, priceFormatted), isTaxInclusive && ")");
17846
17832
  }
17847
17833
 
17848
17834
  return null;
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.9.0-beta.10",
4
+ "version": "3.9.0-beta.12",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",