@pelcro/react-pelcro-js 3.17.1 → 3.17.2-beta.1

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
@@ -3914,6 +3914,7 @@ var labels$U = {
3914
3914
  paymentSource: "Payment cards",
3915
3915
  actions: "Actions",
3916
3916
  expiresOn: "Ends",
3917
+ until: "Until",
3917
3918
  startsOn: "Starts",
3918
3919
  startDate: "Start date",
3919
3920
  renewsOn: "Renews",
@@ -4855,6 +4856,7 @@ var labels$z = {
4855
4856
  paymentSource: "Sources de paiement",
4856
4857
  actions: "Actes",
4857
4858
  expiresOn: "Expire le",
4859
+ until: "Jusqu'à ce que",
4858
4860
  startsOn: "Débute le",
4859
4861
  startDate: "Date de début",
4860
4862
  renewsOn: "Renouvelle le",
@@ -5680,6 +5682,7 @@ var labels$k = {
5680
5682
  paymentSource: "결제 카드",
5681
5683
  actions: "조치",
5682
5684
  expiresOn: "종료",
5685
+ until: "까지",
5683
5686
  startsOn: "시작",
5684
5687
  startDate: "시작일",
5685
5688
  renewsOn: "갱신",
@@ -6606,6 +6609,7 @@ var labels$5 = {
6606
6609
  paymentSource: "Datos de pago",
6607
6610
  actions: "Acciones",
6608
6611
  expiresOn: "Finaliza",
6612
+ until: "Hasta que",
6609
6613
  startsOn: "Inicia",
6610
6614
  startDate: "Fecha de inicio",
6611
6615
  renewsOn: "Renovación",
@@ -27727,6 +27731,12 @@ class Dashboard extends React.Component {
27727
27731
  if (subscription.status === "incomplete") {
27728
27732
  return `${this.locale("labels.status.incomplete")}`;
27729
27733
  }
27734
+ if (subscription.status === "extended") {
27735
+ // DateTime from BE is missing 3 zeros so we add them before instancing a date
27736
+ const expiryDate = new Date(Number(`${subscription.end_date}000`));
27737
+ const formattedExpiryDate = new Intl.DateTimeFormat("en-CA").format(expiryDate);
27738
+ return `${this.locale("labels.until")} ${formattedExpiryDate}`;
27739
+ }
27730
27740
  if (subscription.cancel_at_period_end) {
27731
27741
  // DateTime from BE is missing 3 zeros so we add them before instancing a date
27732
27742
  const expiryDate = new Date(Number(`${subscription.expires_at}000`));
package/dist/index.esm.js CHANGED
@@ -3884,6 +3884,7 @@ var labels$U = {
3884
3884
  paymentSource: "Payment cards",
3885
3885
  actions: "Actions",
3886
3886
  expiresOn: "Ends",
3887
+ until: "Until",
3887
3888
  startsOn: "Starts",
3888
3889
  startDate: "Start date",
3889
3890
  renewsOn: "Renews",
@@ -4825,6 +4826,7 @@ var labels$z = {
4825
4826
  paymentSource: "Sources de paiement",
4826
4827
  actions: "Actes",
4827
4828
  expiresOn: "Expire le",
4829
+ until: "Jusqu'à ce que",
4828
4830
  startsOn: "Débute le",
4829
4831
  startDate: "Date de début",
4830
4832
  renewsOn: "Renouvelle le",
@@ -5650,6 +5652,7 @@ var labels$k = {
5650
5652
  paymentSource: "결제 카드",
5651
5653
  actions: "조치",
5652
5654
  expiresOn: "종료",
5655
+ until: "까지",
5653
5656
  startsOn: "시작",
5654
5657
  startDate: "시작일",
5655
5658
  renewsOn: "갱신",
@@ -6576,6 +6579,7 @@ var labels$5 = {
6576
6579
  paymentSource: "Datos de pago",
6577
6580
  actions: "Acciones",
6578
6581
  expiresOn: "Finaliza",
6582
+ until: "Hasta que",
6579
6583
  startsOn: "Inicia",
6580
6584
  startDate: "Fecha de inicio",
6581
6585
  renewsOn: "Renovación",
@@ -27697,6 +27701,12 @@ class Dashboard extends Component {
27697
27701
  if (subscription.status === "incomplete") {
27698
27702
  return `${this.locale("labels.status.incomplete")}`;
27699
27703
  }
27704
+ if (subscription.status === "extended") {
27705
+ // DateTime from BE is missing 3 zeros so we add them before instancing a date
27706
+ const expiryDate = new Date(Number(`${subscription.end_date}000`));
27707
+ const formattedExpiryDate = new Intl.DateTimeFormat("en-CA").format(expiryDate);
27708
+ return `${this.locale("labels.until")} ${formattedExpiryDate}`;
27709
+ }
27700
27710
  if (subscription.cancel_at_period_end) {
27701
27711
  // DateTime from BE is missing 3 zeros so we add them before instancing a date
27702
27712
  const expiryDate = new Date(Number(`${subscription.expires_at}000`));
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.17.1",
4
+ "version": "3.17.2-beta.1",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",