adverich-kun-ui 0.1.583 → 0.1.584

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,9 +1,9 @@
1
1
  import { kunConfig as c } from "../config/kunConfig.js";
2
- function f(t, n) {
2
+ function p(t, n) {
3
3
  var e;
4
4
  if (!t || !t.value) return;
5
5
  if (t.columnType === "relation") {
6
- const r = s(n, t.relationPath);
6
+ const r = f(n, t.relationPath);
7
7
  return u(r);
8
8
  }
9
9
  if (t.columnType === "function") {
@@ -13,7 +13,7 @@ function f(t, n) {
13
13
  const o = n == null ? void 0 : n[t.value];
14
14
  return u(o);
15
15
  }
16
- function d(t, n) {
16
+ function g(t, n) {
17
17
  return t.columnType === "toComplete" ? "" : n == null ? "Sin datos" : t.columnType === "dateTime" || t.columnType === "date" ? (i[t.columnType] || i.default)(n) : (i[t.columnFormat] || i.default)(n);
18
18
  }
19
19
  const i = {
@@ -42,20 +42,20 @@ const i = {
42
42
  noCeros: (t) => parseFloat(t ?? 0),
43
43
  percentage: (t) => `${parseFloat(t ?? 0)}%`,
44
44
  date: (t) => {
45
- var r;
46
- if (!t || t === "0000-00-00" || !a(t)) return "Nunca";
47
- const n = new Date(t), o = c.current, e = o.locale;
48
- return new Intl.DateTimeFormat(e, {
45
+ var s;
46
+ if (!t || t === "0000-00-00" || !m(t)) return "Nunca";
47
+ const [n, o, e] = t.split("-").map(Number), r = new Date(n, o - 1, e, 12, 0, 0), a = c.current, l = a.locale;
48
+ return new Intl.DateTimeFormat(l, {
49
49
  weekday: "short",
50
50
  day: "2-digit",
51
51
  month: "short",
52
52
  year: "2-digit",
53
- ...(r = o.date) == null ? void 0 : r.dateFormat
54
- }).format(n);
53
+ ...(s = a.date) == null ? void 0 : s.dateFormat
54
+ }).format(r);
55
55
  },
56
56
  dateTime: (t) => {
57
57
  var r;
58
- if (!t || t === "0000-00-00" || !a(t)) return "Nunca";
58
+ if (!t || t === "0000-00-00" || !m(t)) return "Nunca";
59
59
  const n = new Date(t), o = c.current, e = o.locale;
60
60
  return new Intl.DateTimeFormat(e, {
61
61
  weekday: "short",
@@ -69,12 +69,12 @@ const i = {
69
69
  ...(r = o.date) == null ? void 0 : r.dateTimeFormat
70
70
  }).format(n);
71
71
  },
72
- secondsToTime: (t) => l(t ?? 0)
72
+ secondsToTime: (t) => d(t ?? 0)
73
73
  };
74
- function s(t, n) {
74
+ function f(t, n) {
75
75
  return !t || !n ? t : n.split(".").reduce((o, e) => o == null ? void 0 : o[e], t);
76
76
  }
77
- function l(t) {
77
+ function d(t) {
78
78
  const n = Math.floor(t / 3600), o = Math.floor(t % 3600 / 60), e = t % 60;
79
79
  return `${n} horas, ${o} minutos y ${e} segundos`;
80
80
  }
@@ -82,13 +82,13 @@ function u(t) {
82
82
  if (t != null && !(t === "null" || t === "undefined"))
83
83
  return t;
84
84
  }
85
- function a(t) {
85
+ function m(t) {
86
86
  const n = new Date(t);
87
87
  return !isNaN(n.getTime());
88
88
  }
89
89
  export {
90
- d as formatValue,
90
+ g as formatValue,
91
91
  i as formatters,
92
- s as getNestedValue,
93
- f as getValue
92
+ f as getNestedValue,
93
+ p as getValue
94
94
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.583",
3
+ "version": "0.1.584",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",