@ws-ui/formatter 1.9.3 → 1.10.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 +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +6 -5
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
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
|
|
739
|
-
const
|
|
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 =
|
|
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
|
-
|
|
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 =
|
|
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 };
|