adverich-kun-ui 0.1.203 → 0.1.204

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,5 +1,5 @@
1
- import { resolveComponent as n, createElementBlock as r, openBlock as t, createBlock as a, createCommentVNode as i, renderSlot as c } from "vue";
2
- const s = { class: "bg-appbar h-10 flex flex-row items-center py-2 px-2" }, m = {
1
+ import { resolveComponent as n, createElementBlock as r, openBlock as l, mergeProps as a, createBlock as i, createCommentVNode as s, renderSlot as c } from "vue";
2
+ const d = {
3
3
  __name: "KunToolbar",
4
4
  props: {
5
5
  density: {
@@ -12,18 +12,18 @@ const s = { class: "bg-appbar h-10 flex flex-row items-center py-2 px-2" }, m =
12
12
  }
13
13
  },
14
14
  setup(e) {
15
- return (l, u) => {
15
+ return (t, u) => {
16
16
  const o = n("KunToolbarTitle");
17
- return t(), r("div", s, [
18
- e.title ? (t(), a(o, {
17
+ return l(), r("div", a({ class: "h-10 flex flex-row items-center py-2 px-2" }, t.$attrs), [
18
+ e.title ? (l(), i(o, {
19
19
  key: 0,
20
20
  title: e.title
21
- }, null, 8, ["title"])) : i("", !0),
22
- c(l.$slots, "default", { density: e.density })
23
- ]);
21
+ }, null, 8, ["title"])) : s("", !0),
22
+ c(t.$slots, "default", { density: e.density })
23
+ ], 16);
24
24
  };
25
25
  }
26
26
  };
27
27
  export {
28
- m as default
28
+ d as default
29
29
  };
@@ -1,52 +1,52 @@
1
- function c(t, n) {
1
+ function c(n, t) {
2
2
  var r;
3
- if (!t || !t.value) return;
4
- if (t.columnType === "relation") {
5
- const o = a(n, t.relationPath);
3
+ if (!n || !n.value) return;
4
+ if (n.columnType === "relation") {
5
+ const o = s(t, n.relationPath);
6
6
  return u(o);
7
7
  }
8
- if (t.columnType === "function") {
9
- const o = (r = t.columnFunction) == null ? void 0 : r.call(t, n, t);
8
+ if (n.columnType === "function") {
9
+ const o = (r = n.columnFunction) == null ? void 0 : r.call(n, t, n);
10
10
  return u(o);
11
11
  }
12
- const e = n == null ? void 0 : n[t.value];
12
+ const e = t == null ? void 0 : t[n.value];
13
13
  return u(e);
14
14
  }
15
- function m(t, n) {
16
- return (i[t.columnFormat] || i.default)(n);
15
+ function m(n, t) {
16
+ return t == null ? "Sin datos" : (i[n.columnFormat] || i.default)(t);
17
17
  }
18
18
  const i = {
19
- default: (t) => t,
19
+ default: (n) => n,
20
20
  // TEXTS
21
- text: (t) => String(t),
22
- activeOrInactive: (t) => t ? "Activa" : "Inactiva",
23
- composed: (t) => t,
21
+ text: (n) => String(n),
22
+ activeOrInactive: (n) => n ? "Activa" : "Inactiva",
23
+ composed: (n) => n,
24
24
  // ya está procesado por getComposedValue
25
25
  // NUMBERS
26
- number: (t) => Number(t).toLocaleString("es-AR"),
27
- money: (t) => new Intl.NumberFormat("es-CL", {
26
+ number: (n) => Number(n).toLocaleString("es-AR"),
27
+ money: (n) => new Intl.NumberFormat("es-CL", {
28
28
  style: "currency",
29
29
  currency: "CLP",
30
30
  minimumFractionDigits: 2
31
- }).format(t ?? 0),
32
- noDecimal: (t) => parseFloat(t ?? 0).toFixed(0),
33
- withDecimals: (t, n = 2) => parseFloat(t ?? 0).toFixed(n),
34
- noCeros: (t) => parseFloat(t ?? 0),
35
- percentage: (t) => `${parseFloat(t ?? 0)}%`,
36
- date: (t) => {
37
- if (!t || t === "0000-00-00") return "Nunca";
38
- const n = Date.parse(t);
31
+ }).format(n ?? 0),
32
+ noDecimal: (n) => parseFloat(n ?? 0).toFixed(0),
33
+ withDecimals: (n, t = 2) => parseFloat(n ?? 0).toFixed(t),
34
+ noCeros: (n) => parseFloat(n ?? 0),
35
+ percentage: (n) => `${parseFloat(n ?? 0)}%`,
36
+ date: (n) => {
37
+ if (!n || n === "0000-00-00") return "Nunca";
38
+ const t = Date.parse(n);
39
39
  return new Intl.DateTimeFormat("es-MX", {
40
40
  locale: "es-ES",
41
41
  weekday: "short",
42
42
  day: "numeric",
43
43
  month: "short",
44
44
  year: "2-digit"
45
- }).format(n);
45
+ }).format(t);
46
46
  },
47
- dateTime: (t) => {
48
- if (!t || t === "0000-00-00") return "Nunca";
49
- const n = Date.parse(t);
47
+ dateTime: (n) => {
48
+ if (!n || n === "0000-00-00") return "Nunca";
49
+ const t = Date.parse(n);
50
50
  return new Intl.DateTimeFormat("es-MX", {
51
51
  day: "numeric",
52
52
  month: "short",
@@ -54,24 +54,24 @@ const i = {
54
54
  hour: "numeric",
55
55
  minute: "numeric",
56
56
  second: "numeric"
57
- }).format(n);
57
+ }).format(t);
58
58
  },
59
- secondsToTime: (t) => s(t ?? 0)
59
+ secondsToTime: (n) => a(n ?? 0)
60
60
  };
61
- function a(t, n) {
62
- return !t || !n ? t : n.split(".").reduce((e, r) => e == null ? void 0 : e[r], t);
61
+ function s(n, t) {
62
+ return !n || !t ? n : t.split(".").reduce((e, r) => e == null ? void 0 : e[r], n);
63
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`;
64
+ function a(n) {
65
+ const t = Math.floor(n / 3600), e = Math.floor(n % 3600 / 60), r = n % 60;
66
+ return `${t} horas, ${e} minutos y ${r} segundos`;
67
67
  }
68
- function u(t) {
69
- if (t != null && !(t === "null" || t === "undefined"))
70
- return t;
68
+ function u(n) {
69
+ if (n != null && !(n === "null" || n === "undefined"))
70
+ return n;
71
71
  }
72
72
  export {
73
73
  m as formatValue,
74
74
  i as formatters,
75
- a as getNestedValue,
75
+ s as getNestedValue,
76
76
  c as getValue
77
77
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.203",
3
+ "version": "0.1.204",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",