@ws-ui/formatter 1.10.0 → 1.10.2

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.es.js CHANGED
@@ -735,8 +735,8 @@ var ga, tt;
735
735
  function $r() {
736
736
  return tt || (tt = 1, ga = kr()), ga;
737
737
  }
738
- var Er = $r();
739
- const Xt = /* @__PURE__ */ wr(Er);
738
+ var Xt = $r();
739
+ const Er = /* @__PURE__ */ wr(Xt);
740
740
  function Dr(t) {
741
741
  return t.split(" ").map(da).map(Ft).join(" ");
742
742
  }
@@ -32563,7 +32563,7 @@ function eG(t, e, r) {
32563
32563
  locale: ha[ja(r)]
32564
32564
  });
32565
32565
  }
32566
- function tG(t, { dataType: e, format: r, language: a = "en" }) {
32566
+ function tG(t, { dataType: e, format: r, language: a = navigator.language }) {
32567
32567
  switch (e) {
32568
32568
  // string formatting
32569
32569
  case "string":
@@ -32577,7 +32577,8 @@ function tG(t, { dataType: e, format: r, language: a = "en" }) {
32577
32577
  );
32578
32578
  // number formatting
32579
32579
  case "number":
32580
- return Xt(r)(isNaN(t) ? t : +t);
32580
+ const n = isNaN(t) ? t : +t;
32581
+ return Xt.format(r, n, a);
32581
32582
  // duration formatting
32582
32583
  case "duration":
32583
32584
  return Kq(
@@ -32591,7 +32592,7 @@ function tG(t, { dataType: e, format: r, language: a = "en" }) {
32591
32592
  function rG(t, e, r) {
32592
32593
  switch (t) {
32593
32594
  case "number": {
32594
- const a = Xt(e).color(
32595
+ const a = Er(e).color(
32595
32596
  isNaN(r) ? r : +r
32596
32597
  );
32597
32598
  return a === "black" && !e.toLowerCase().includes("[black]") ? {} : { color: a };