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

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: "성",
@@ -17851,7 +17851,7 @@ const SelectedPaymentMethod = () => {
17851
17851
  };
17852
17852
 
17853
17853
  const TaxAmount = () => {
17854
- var _plan$quantity;
17854
+ var _plan$quantity, _window$Pelcro$site, _window$Pelcro$site$r;
17855
17855
 
17856
17856
  const {
17857
17857
  t
@@ -17866,13 +17866,14 @@ const TaxAmount = () => {
17866
17866
  } = usePelcro();
17867
17867
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
17868
17868
  const priceFormatted = getFormattedPriceByLocal(taxAmount * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
17869
+ 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
17870
 
17870
17871
  if (taxAmount) {
17871
17872
  return /*#__PURE__*/React__default['default'].createElement("div", {
17872
17873
  className: "plc-text-center pelcro-tax-amount"
17873
- }, t("labels.tax"), " ", /*#__PURE__*/React__default['default'].createElement("span", {
17874
+ }, isTaxInclusive && "(", isTaxInclusive ? `Includes ${t("labels.tax")}` : `+ ${t("labels.tax")}`, " ", /*#__PURE__*/React__default['default'].createElement("span", {
17874
17875
  className: "plc-font-bold"
17875
- }, priceFormatted));
17876
+ }, priceFormatted), isTaxInclusive && ")");
17876
17877
  }
17877
17878
 
17878
17879
  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: "성",
@@ -17821,7 +17821,7 @@ const SelectedPaymentMethod = () => {
17821
17821
  };
17822
17822
 
17823
17823
  const TaxAmount = () => {
17824
- var _plan$quantity;
17824
+ var _plan$quantity, _window$Pelcro$site, _window$Pelcro$site$r;
17825
17825
 
17826
17826
  const {
17827
17827
  t
@@ -17836,13 +17836,14 @@ const TaxAmount = () => {
17836
17836
  } = usePelcro();
17837
17837
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
17838
17838
  const priceFormatted = getFormattedPriceByLocal(taxAmount * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
17839
+ 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
17840
 
17840
17841
  if (taxAmount) {
17841
17842
  return /*#__PURE__*/React__default.createElement("div", {
17842
17843
  className: "plc-text-center pelcro-tax-amount"
17843
- }, t("labels.tax"), " ", /*#__PURE__*/React__default.createElement("span", {
17844
+ }, isTaxInclusive && "(", isTaxInclusive ? `Includes ${t("labels.tax")}` : `+ ${t("labels.tax")}`, " ", /*#__PURE__*/React__default.createElement("span", {
17844
17845
  className: "plc-font-bold"
17845
- }, priceFormatted));
17846
+ }, priceFormatted), isTaxInclusive && ")");
17846
17847
  }
17847
17848
 
17848
17849
  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.11",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",