@tesouro/embedded-components-react 0.9.21 → 0.9.24

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.
@@ -1,5 +1,5 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.9.21", n = "d0d0d781706d4852340ed5b5cbb73fbb65e2ef93", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.9.24", n = "533409ecbd11e37896911603bf508158dc7f9a9b", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -1,6 +1,7 @@
1
1
  import { coerceAmountValueToMinorUnits as e } from "./lib/coerceAmountValueToMinorUnits.js";
2
2
  import { createCurrencyFormatter as t } from "./lib/createCurrencyFormatter.js";
3
3
  import { amountOutputToMajorUnits as n, minorExponentForCurrency as r } from "./lib/amountOutputToMajorUnits.js";
4
+ import "./lib/dateDisplay.js";
4
5
  import { formatCalendarDate as i } from "./lib/formatCalendarDate.js";
5
6
  import { formatTimestampDate as a } from "./lib/formatTimestampDate.js";
6
7
  import { formatRejectionDate as o } from "./lib/formatRejectionDate.js";
@@ -0,0 +1,8 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/lib/dateDisplay.js
2
+ var e = "en-US", t = {
3
+ month: "short",
4
+ day: "numeric",
5
+ year: "numeric"
6
+ };
7
+ //#endregion
8
+ export { e as DATE_DISPLAY_LOCALE, t as DATE_DISPLAY_OPTIONS };
@@ -1,13 +1,13 @@
1
+ import { DATE_DISPLAY_LOCALE as e, DATE_DISPLAY_OPTIONS as t } from "./dateDisplay.js";
1
2
  //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/lib/formatCalendarDate.js
2
- function e(e, t) {
3
- if (!e) return "";
4
- let [n, r, i] = e.split("-").map(Number);
5
- return !n || !r || !i ? e : new Date(Date.UTC(n, r - 1, i)).toLocaleDateString("en-US", {
6
- month: t?.month ?? "short",
7
- day: "numeric",
8
- year: "numeric",
3
+ function n(n, r) {
4
+ if (!n) return "";
5
+ let [i, a, o] = n.split("-").map(Number);
6
+ return !i || !a || !o ? n : new Date(Date.UTC(i, a - 1, o)).toLocaleDateString(e, {
7
+ ...t,
8
+ month: r?.month ?? t.month,
9
9
  timeZone: "UTC"
10
10
  });
11
11
  }
12
12
  //#endregion
13
- export { e as formatCalendarDate };
13
+ export { n as formatCalendarDate };
@@ -1,11 +1,12 @@
1
+ import { DATE_DISPLAY_LOCALE as e, DATE_DISPLAY_OPTIONS as t } from "./dateDisplay.js";
1
2
  //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/lib/formatRejectionDate.js
2
- function e(e, t = /* @__PURE__ */ new Date()) {
3
- let n = new Date(e), r = n.getFullYear() !== t.getFullYear();
4
- return n.toLocaleDateString("en-US", {
5
- month: "short",
6
- day: "numeric",
7
- ...r ? { year: "numeric" } : {}
3
+ function n(n, r = /* @__PURE__ */ new Date()) {
4
+ let i = new Date(n), a = i.getFullYear() !== r.getFullYear();
5
+ return i.toLocaleDateString(e, {
6
+ month: t.month,
7
+ day: t.day,
8
+ ...a ? { year: t.year } : {}
8
9
  });
9
10
  }
10
11
  //#endregion
11
- export { e as formatRejectionDate };
12
+ export { n as formatRejectionDate };
@@ -1,13 +1,13 @@
1
+ import { DATE_DISPLAY_LOCALE as e, DATE_DISPLAY_OPTIONS as t } from "./dateDisplay.js";
1
2
  //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/lib/formatTimestampDate.js
2
- function e(e, t) {
3
- if (!e) return "";
4
- let n = new Date(e);
5
- return Number.isNaN(n.getTime()) ? "" : n.toLocaleDateString("en-US", {
6
- month: t?.month ?? "short",
7
- day: "numeric",
8
- year: "numeric",
9
- timeZone: t?.timeZone
3
+ function n(n, r) {
4
+ if (!n) return "";
5
+ let i = new Date(n);
6
+ return Number.isNaN(i.getTime()) ? "" : i.toLocaleDateString(e, {
7
+ ...t,
8
+ month: r?.month ?? t.month,
9
+ timeZone: r?.timeZone
10
10
  });
11
11
  }
12
12
  //#endregion
13
- export { e as formatTimestampDate };
13
+ export { n as formatTimestampDate };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.9.21",
3
+ "version": "0.9.24",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": [