@pelcro/react-pelcro-js 3.9.0-beta.9 → 3.9.0

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: "성",
@@ -7256,8 +7256,7 @@ class PelcroActions {
7256
7256
  return this.set({
7257
7257
  view: "login"
7258
7258
  });
7259
- } // console.log(this.get().isAuthenticated(), );
7260
-
7259
+ }
7261
7260
 
7262
7261
  if (["passwordless-request"].includes(view) && (this.get().isAuthenticated() || !((_window$Pelcro$site$r = window.Pelcro.site.read()) !== null && _window$Pelcro$site$r !== void 0 && _window$Pelcro$site$r.passwordless_enabled))) {
7263
7262
  return this.set({
@@ -15541,21 +15540,6 @@ const PaymentMethodContainerWithoutStripe = ({
15541
15540
  };
15542
15541
 
15543
15542
  function handleTapPayment(paymentRequest) {
15544
- // if (paymentRequest) {
15545
- // const SUCCESS_STATUS = "870";
15546
- // if (paymentRequest.response !== SUCCESS_STATUS) {
15547
- // switch (paymentRequest.response) {
15548
- // case "871":
15549
- // return handlePaymentError({
15550
- // error: new Error("Invalid account number")
15551
- // });
15552
- // default:
15553
- // return handlePaymentError({
15554
- // error: new Error(paymentRequest.message)
15555
- // });
15556
- // }
15557
- // }
15558
- // }
15559
15543
  const isUsingExistingPaymentMethod = Boolean(selectedPaymentMethodId);
15560
15544
 
15561
15545
  if (type === "createPayment") {
@@ -17852,7 +17836,7 @@ const SelectedPaymentMethod = () => {
17852
17836
  };
17853
17837
 
17854
17838
  const TaxAmount = () => {
17855
- var _plan$quantity;
17839
+ var _plan$quantity, _window$Pelcro$site, _window$Pelcro$site$r;
17856
17840
 
17857
17841
  const {
17858
17842
  t
@@ -17867,13 +17851,14 @@ const TaxAmount = () => {
17867
17851
  } = usePelcro();
17868
17852
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
17869
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;
17870
17855
 
17871
17856
  if (taxAmount) {
17872
17857
  return /*#__PURE__*/React__default['default'].createElement("div", {
17873
17858
  className: "plc-text-center pelcro-tax-amount"
17874
- }, 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", {
17875
17860
  className: "plc-font-bold"
17876
- }, priceFormatted));
17861
+ }, priceFormatted), isTaxInclusive && ")");
17877
17862
  }
17878
17863
 
17879
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: "성",
@@ -7226,8 +7226,7 @@ class PelcroActions {
7226
7226
  return this.set({
7227
7227
  view: "login"
7228
7228
  });
7229
- } // console.log(this.get().isAuthenticated(), );
7230
-
7229
+ }
7231
7230
 
7232
7231
  if (["passwordless-request"].includes(view) && (this.get().isAuthenticated() || !((_window$Pelcro$site$r = window.Pelcro.site.read()) !== null && _window$Pelcro$site$r !== void 0 && _window$Pelcro$site$r.passwordless_enabled))) {
7233
7232
  return this.set({
@@ -15511,21 +15510,6 @@ const PaymentMethodContainerWithoutStripe = ({
15511
15510
  };
15512
15511
 
15513
15512
  function handleTapPayment(paymentRequest) {
15514
- // if (paymentRequest) {
15515
- // const SUCCESS_STATUS = "870";
15516
- // if (paymentRequest.response !== SUCCESS_STATUS) {
15517
- // switch (paymentRequest.response) {
15518
- // case "871":
15519
- // return handlePaymentError({
15520
- // error: new Error("Invalid account number")
15521
- // });
15522
- // default:
15523
- // return handlePaymentError({
15524
- // error: new Error(paymentRequest.message)
15525
- // });
15526
- // }
15527
- // }
15528
- // }
15529
15513
  const isUsingExistingPaymentMethod = Boolean(selectedPaymentMethodId);
15530
15514
 
15531
15515
  if (type === "createPayment") {
@@ -17822,7 +17806,7 @@ const SelectedPaymentMethod = () => {
17822
17806
  };
17823
17807
 
17824
17808
  const TaxAmount = () => {
17825
- var _plan$quantity;
17809
+ var _plan$quantity, _window$Pelcro$site, _window$Pelcro$site$r;
17826
17810
 
17827
17811
  const {
17828
17812
  t
@@ -17837,13 +17821,14 @@ const TaxAmount = () => {
17837
17821
  } = usePelcro();
17838
17822
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
17839
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;
17840
17825
 
17841
17826
  if (taxAmount) {
17842
17827
  return /*#__PURE__*/React__default.createElement("div", {
17843
17828
  className: "plc-text-center pelcro-tax-amount"
17844
- }, t("labels.tax"), " ", /*#__PURE__*/React__default.createElement("span", {
17829
+ }, isTaxInclusive && "(", isTaxInclusive ? `Includes ${t("labels.tax")}` : `+ ${t("labels.tax")}`, " ", /*#__PURE__*/React__default.createElement("span", {
17845
17830
  className: "plc-font-bold"
17846
- }, priceFormatted));
17831
+ }, priceFormatted), isTaxInclusive && ")");
17847
17832
  }
17848
17833
 
17849
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.9",
4
+ "version": "3.9.0",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",