adverich-kun-ui 0.1.173 → 0.1.174

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,17 +1,21 @@
1
- function a(t, n) {
2
- return t.value && t.value in n ? n[t.value] : n;
3
- }
4
- function s(t, n) {
1
+ function c(t, n) {
5
2
  var r;
6
- if (t.columnType === "relation")
7
- return u(n, t.relationPath) ?? "Sin valor";
3
+ if (!t || !t.value) return;
4
+ if (t.columnType === "relation") {
5
+ const o = a(n, t.relationPath);
6
+ return u(o);
7
+ }
8
8
  if (t.columnType === "function") {
9
- const i = (r = t.columnFunction) == null ? void 0 : r.call(t, n, t);
10
- return t.columnFormat && e[t.columnFormat] ? e[t.columnFormat](i) : i;
9
+ const o = (r = t.columnFunction) == null ? void 0 : r.call(t, n, t);
10
+ return u(o);
11
11
  }
12
- return (e[t.columnFormat] || e.default)(n);
12
+ const e = n == null ? void 0 : n[t.value];
13
+ return u(e);
13
14
  }
14
- const e = {
15
+ function m(t, n) {
16
+ return (i[t.columnFormat] || i.default)(n);
17
+ }
18
+ const i = {
15
19
  default: (t) => t,
16
20
  // TEXTS
17
21
  text: (t) => String(t),
@@ -52,18 +56,22 @@ const e = {
52
56
  second: "numeric"
53
57
  }).format(n);
54
58
  },
55
- secondsToTime: (t) => m(t ?? 0)
59
+ secondsToTime: (t) => s(t ?? 0)
56
60
  };
57
- function u(t, n) {
58
- return !t || !n ? t : n.split(".").reduce((o, r) => o == null ? void 0 : o[r], t);
61
+ function a(t, n) {
62
+ return !t || !n ? t : n.split(".").reduce((e, r) => e == null ? void 0 : e[r], t);
63
+ }
64
+ function s(t) {
65
+ const n = Math.floor(t / 3600), e = Math.floor(t % 3600 / 60), r = t % 60;
66
+ return `${n} horas, ${e} minutos y ${r} segundos`;
59
67
  }
60
- function m(t) {
61
- const n = Math.floor(t / 3600), o = Math.floor(t % 3600 / 60), r = t % 60;
62
- return `${n} horas, ${o} minutos y ${r} segundos`;
68
+ function u(t) {
69
+ if (t != null && !(t === "null" || t === "undefined"))
70
+ return t;
63
71
  }
64
72
  export {
65
- s as formatValue,
66
- e as formatters,
67
- u as getNestedValue,
68
- a as getValue
73
+ m as formatValue,
74
+ i as formatters,
75
+ a as getNestedValue,
76
+ c as getValue
69
77
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.173",
3
+ "version": "0.1.174",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",