jtui-vite 1.0.30 → 1.0.31
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/jtui-vite.es.js +14 -16
- package/dist/jtui-vite.umd.js +1 -1
- package/package.json +1 -1
package/dist/jtui-vite.es.js
CHANGED
|
@@ -16661,22 +16661,20 @@ function td(e, t, o) {
|
|
|
16661
16661
|
}
|
|
16662
16662
|
function nd() {
|
|
16663
16663
|
let e = Ce([]);
|
|
16664
|
-
function t({
|
|
16665
|
-
|
|
16666
|
-
sortList: n
|
|
16667
|
-
|
|
16668
|
-
|
|
16669
|
-
|
|
16670
|
-
|
|
16671
|
-
|
|
16672
|
-
|
|
16673
|
-
|
|
16674
|
-
|
|
16675
|
-
|
|
16676
|
-
|
|
16677
|
-
|
|
16678
|
-
return !isNaN(g) && !isNaN(p) ? g - p : String(b).localeCompare(String(y));
|
|
16679
|
-
})), l === "desc" && a.reverse(), e.value = a.concat(u), a.concat(u);
|
|
16664
|
+
function t(o) {
|
|
16665
|
+
let n, r, l;
|
|
16666
|
+
if (o.sortList && o.sortList[0] ? (n = o.sortList[0].property, r = o.sortList[0].order, l = o.data) : (n = o.property, r = o.order, l = o.data), !l || !l.length)
|
|
16667
|
+
return l;
|
|
16668
|
+
let s = l.filter((d) => n in d && d[n] != null && d[n] !== "" && !(typeof d[n] == "string" && d[n].trim() === "")), u = l.filter((d) => !(n in d) || d[n] == null || d[n] === "" || typeof d[n] == "string" && d[n].trim() === ""), a = [];
|
|
16669
|
+
(r === "asc" || r === "desc") && (a = [...s].sort((d, b) => {
|
|
16670
|
+
const y = d[n], f = b[n], C = Date.parse(y), g = Date.parse(f), p = typeof y == "string" && /[-/:]/.test(y) && !isNaN(C), x = typeof f == "string" && /[-/:]/.test(f) && !isNaN(g);
|
|
16671
|
+
if (p && x)
|
|
16672
|
+
return C - g;
|
|
16673
|
+
const L = Number(y), O = Number(f);
|
|
16674
|
+
return !isNaN(L) && !isNaN(O) ? L - O : String(y).localeCompare(String(f));
|
|
16675
|
+
})), r === "desc" && a.reverse();
|
|
16676
|
+
const c = a.concat(u);
|
|
16677
|
+
return e.value = c, c;
|
|
16680
16678
|
}
|
|
16681
16679
|
return {
|
|
16682
16680
|
sortMethod: t,
|