@wgalleti/primevue-components 0.3.7 → 0.3.8

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.js CHANGED
@@ -1,4 +1,4 @@
1
- import { inject as Ie, defineComponent as de, openBlock as s, createElementBlock as m, createBlock as A, unref as v, toDisplayString as T, ref as q, watch as nt, computed as H, reactive as ge, resolveDirective as kt, Fragment as le, createElementVNode as h, createVNode as N, withDirectives as fe, withCtx as ne, createCommentVNode as $, renderList as ie, normalizeStyle as je, createTextVNode as Pe, normalizeClass as re, renderSlot as O, isRef as Ut, withModifiers as qt, createSlots as ot, normalizeProps as lt, guardReactiveProps as st, useSlots as Ht, onMounted as Kt, createStaticVNode as Gt } from "vue";
1
+ import { inject as Ie, defineComponent as de, openBlock as s, createElementBlock as m, createBlock as A, unref as v, toDisplayString as T, ref as q, watch as nt, computed as H, reactive as ge, resolveDirective as kt, Fragment as le, createElementVNode as h, createVNode as O, withDirectives as fe, withCtx as ne, createCommentVNode as w, renderList as ie, normalizeStyle as je, createTextVNode as Pe, normalizeClass as re, renderSlot as Y, isRef as Ut, withModifiers as qt, createSlots as ot, normalizeProps as lt, guardReactiveProps as st, useSlots as Ht, onMounted as Kt, createStaticVNode as Gt } from "vue";
2
2
  import $t from "primevue/datatable";
3
3
  import ze from "primevue/column";
4
4
  import ee from "primevue/button";
@@ -33,7 +33,7 @@ function ra() {
33
33
  (function(a, o) {
34
34
  e.exports = o();
35
35
  })(ia, (function() {
36
- var a = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, o = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, l = /\d/, i = /\d\d/, r = /\d\d?/, y = /\d*[^-_:/,()\s\d]+/, c = {}, w = function(g) {
36
+ var a = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, o = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, l = /\d/, i = /\d\d/, r = /\d\d?/, y = /\d*[^-_:/,()\s\d]+/, c = {}, k = function(g) {
37
37
  return (g = +g) + (g > 68 ? 1900 : 2e3);
38
38
  }, F = function(g) {
39
39
  return function(b) {
@@ -42,21 +42,21 @@ function ra() {
42
42
  }, V = [/[+-]\d\d:?(\d\d)?|Z/, function(g) {
43
43
  (this.zone || (this.zone = {})).offset = (function(b) {
44
44
  if (!b || b === "Z") return 0;
45
- var k = b.match(/([+-]|\d\d)/g), x = 60 * k[1] + (+k[2] || 0);
46
- return x === 0 ? 0 : k[0] === "+" ? -x : x;
45
+ var $ = b.match(/([+-]|\d\d)/g), x = 60 * $[1] + (+$[2] || 0);
46
+ return x === 0 ? 0 : $[0] === "+" ? -x : x;
47
47
  })(g);
48
48
  }], W = function(g) {
49
49
  var b = c[g];
50
50
  return b && (b.indexOf ? b : b.s.concat(b.f));
51
51
  }, L = function(g, b) {
52
- var k, x = c.meridiem;
52
+ var $, x = c.meridiem;
53
53
  if (x) {
54
54
  for (var j = 1; j <= 24; j += 1) if (g.indexOf(x(j, 0, b)) > -1) {
55
- k = j > 12;
55
+ $ = j > 12;
56
56
  break;
57
57
  }
58
- } else k = g === (b ? "pm" : "PM");
59
- return k;
58
+ } else $ = g === (b ? "pm" : "PM");
59
+ return $;
60
60
  }, J = { A: [y, function(g) {
61
61
  this.afternoon = L(g, !1);
62
62
  }], a: [y, function(g) {
@@ -70,32 +70,32 @@ function ra() {
70
70
  }], SSS: [/\d{3}/, function(g) {
71
71
  this.milliseconds = +g;
72
72
  }], s: [r, F("seconds")], ss: [r, F("seconds")], m: [r, F("minutes")], mm: [r, F("minutes")], H: [r, F("hours")], h: [r, F("hours")], HH: [r, F("hours")], hh: [r, F("hours")], D: [r, F("day")], DD: [i, F("day")], Do: [y, function(g) {
73
- var b = c.ordinal, k = g.match(/\d+/);
74
- if (this.day = k[0], b) for (var x = 1; x <= 31; x += 1) b(x).replace(/\[|\]/g, "") === g && (this.day = x);
73
+ var b = c.ordinal, $ = g.match(/\d+/);
74
+ if (this.day = $[0], b) for (var x = 1; x <= 31; x += 1) b(x).replace(/\[|\]/g, "") === g && (this.day = x);
75
75
  }], w: [r, F("week")], ww: [i, F("week")], M: [r, F("month")], MM: [i, F("month")], MMM: [y, function(g) {
76
- var b = W("months"), k = (W("monthsShort") || b.map((function(x) {
76
+ var b = W("months"), $ = (W("monthsShort") || b.map((function(x) {
77
77
  return x.slice(0, 3);
78
78
  }))).indexOf(g) + 1;
79
- if (k < 1) throw new Error();
80
- this.month = k % 12 || k;
79
+ if ($ < 1) throw new Error();
80
+ this.month = $ % 12 || $;
81
81
  }], MMMM: [y, function(g) {
82
82
  var b = W("months").indexOf(g) + 1;
83
83
  if (b < 1) throw new Error();
84
84
  this.month = b % 12 || b;
85
85
  }], Y: [/[+-]?\d+/, F("year")], YY: [i, function(g) {
86
- this.year = w(g);
86
+ this.year = k(g);
87
87
  }], YYYY: [/\d{4}/, F("year")], Z: V, ZZ: V };
88
88
  function Z(g) {
89
- var b, k;
90
- b = g, k = c && c.formats;
89
+ var b, $;
90
+ b = g, $ = c && c.formats;
91
91
  for (var x = (g = b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(oe, ae, _) {
92
92
  var f = _ && _.toUpperCase();
93
- return ae || k[_] || a[_] || k[f].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(P, u, n) {
93
+ return ae || $[_] || a[_] || $[f].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(P, u, n) {
94
94
  return u || n.slice(1);
95
95
  }));
96
96
  }))).match(o), j = x.length, U = 0; U < j; U += 1) {
97
- var Y = x[U], K = J[Y], B = K && K[0], X = K && K[1];
98
- x[U] = X ? { regex: B, parser: X } : Y.replace(/^\[|\]$/g, "");
97
+ var N = x[U], K = J[N], B = K && K[0], X = K && K[1];
98
+ x[U] = X ? { regex: B, parser: X } : N.replace(/^\[|\]$/g, "");
99
99
  }
100
100
  return function(oe) {
101
101
  for (var ae = {}, _ = 0, f = 0; _ < j; _ += 1) {
@@ -115,16 +115,16 @@ function ra() {
115
115
  })(ae), ae;
116
116
  };
117
117
  }
118
- return function(g, b, k) {
119
- k.p.customParseFormat = !0, g && g.parseTwoDigitYear && (w = g.parseTwoDigitYear);
118
+ return function(g, b, $) {
119
+ $.p.customParseFormat = !0, g && g.parseTwoDigitYear && (k = g.parseTwoDigitYear);
120
120
  var x = b.prototype, j = x.parse;
121
121
  x.parse = function(U) {
122
- var Y = U.date, K = U.utc, B = U.args;
122
+ var N = U.date, K = U.utc, B = U.args;
123
123
  this.$u = K;
124
124
  var X = B[1];
125
125
  if (typeof X == "string") {
126
126
  var oe = B[2] === !0, ae = B[3] === !0, _ = oe || ae, f = B[2];
127
- ae && (f = B[2]), c = this.$locale(), !oe && f && (c = k.Ls[f]), this.$d = (function(p, d, E, R) {
127
+ ae && (f = B[2]), c = this.$locale(), !oe && f && (c = $.Ls[f]), this.$d = (function(p, d, E, R) {
128
128
  try {
129
129
  if (["x", "X"].indexOf(d) > -1) return new Date((d === "X" ? 1e3 : 1) * p);
130
130
  var G = Z(d)(p), se = G.year, pe = G.month, Ne = G.day, Ye = G.hours, we = G.minutes, ke = G.seconds, ue = G.milliseconds, ve = G.zone, Ce = G.week, Ee = /* @__PURE__ */ new Date(), De = Ne || (se || pe ? 1 : Ee.getDate()), Me = se || Ee.getFullYear(), ye = 0;
@@ -134,10 +134,10 @@ function ra() {
134
134
  } catch {
135
135
  return /* @__PURE__ */ new Date("");
136
136
  }
137
- })(Y, X, K, k), this.init(), f && f !== !0 && (this.$L = this.locale(f).$L), _ && Y != this.format(X) && (this.$d = /* @__PURE__ */ new Date("")), c = {};
137
+ })(N, X, K, $), this.init(), f && f !== !0 && (this.$L = this.locale(f).$L), _ && N != this.format(X) && (this.$d = /* @__PURE__ */ new Date("")), c = {};
138
138
  } else if (X instanceof Array) for (var P = X.length, u = 1; u <= P; u += 1) {
139
139
  B[1] = X[u - 1];
140
- var n = k.apply(this, B);
140
+ var n = $.apply(this, B);
141
141
  if (n.isValid()) {
142
142
  this.$d = n.$d, this.$L = n.$L, this.init();
143
143
  break;
@@ -264,11 +264,11 @@ function rt() {
264
264
  function o(c) {
265
265
  return c == null ? "—" : ga(t, a).format(c);
266
266
  }
267
- function l(c, w = 2) {
268
- return c == null ? "—" : vt(t, w).format(c);
267
+ function l(c, k = 2) {
268
+ return c == null ? "—" : vt(t, k).format(c);
269
269
  }
270
- function i(c, w) {
271
- return ca(c, w ?? (e == null ? void 0 : e.dateFormat) ?? "DD/MM/YYYY");
270
+ function i(c, k) {
271
+ return ca(c, k ?? (e == null ? void 0 : e.dateFormat) ?? "DD/MM/YYYY");
272
272
  }
273
273
  function r(c) {
274
274
  return fa(c);
@@ -349,15 +349,15 @@ const gt = {
349
349
  }, Sa = (e, t = !0, a) => {
350
350
  var o, l, i, r;
351
351
  const y = ((o = a.number) == null ? void 0 : o.unsigned) !== !0 && e.startsWith("-") ? "-" : "", c = ((l = a.number) == null ? void 0 : l.fraction) ?? 0;
352
- let w = yt(0, c, a);
353
- const F = w.formatToParts(1000.12), V = ((i = F.find((g) => g.type === "group")) == null ? void 0 : i.value) ?? " ", W = ((r = F.find((g) => g.type === "decimal")) == null ? void 0 : r.value) ?? ".", L = ht(e, V, W);
352
+ let k = yt(0, c, a);
353
+ const F = k.formatToParts(1000.12), V = ((i = F.find((g) => g.type === "group")) == null ? void 0 : i.value) ?? " ", W = ((r = F.find((g) => g.type === "decimal")) == null ? void 0 : r.value) ?? ".", L = ht(e, V, W);
354
354
  if (Number.isNaN(parseFloat(L))) return y;
355
355
  const J = L.split(".");
356
356
  if (J[1] != null && J[1].length >= 1) {
357
357
  const g = J[1].length <= c ? J[1].length : c;
358
- w = yt(g, c, a);
358
+ k = yt(g, c, a);
359
359
  }
360
- let Z = w.format(parseFloat(L));
360
+ let Z = k.format(parseFloat(L));
361
361
  return t ? c > 0 && L.endsWith(".") && !L.slice(0, -1).includes(".") && (Z += W) : Z = ht(Z, V, W), y + Z;
362
362
  }, At = (e) => JSON.parse(e.replaceAll("'", '"')), Pa = (e, t = {}) => {
363
363
  const a = { ...t };
@@ -436,19 +436,19 @@ class Ma {
436
436
  if (a == null) return t;
437
437
  const l = `v=${t},mr=${a},m=${o ? 1 : 0}`;
438
438
  if (this.memo.has(l)) return this.memo.get(l);
439
- const { mask: i, escaped: r } = this.escapeMask(a), y = [], c = this.opts.tokens != null ? this.opts.tokens : {}, w = this.isReversed() ? -1 : 1, F = this.isReversed() ? "unshift" : "push", V = this.isReversed() ? 0 : i.length - 1, W = this.isReversed() ? () => g > -1 && b > -1 : () => g < i.length && b < t.length, L = (x) => !this.isReversed() && x <= V || this.isReversed() && x >= V;
440
- let J, Z = -1, g = this.isReversed() ? i.length - 1 : 0, b = this.isReversed() ? t.length - 1 : 0, k = !1;
439
+ const { mask: i, escaped: r } = this.escapeMask(a), y = [], c = this.opts.tokens != null ? this.opts.tokens : {}, k = this.isReversed() ? -1 : 1, F = this.isReversed() ? "unshift" : "push", V = this.isReversed() ? 0 : i.length - 1, W = this.isReversed() ? () => g > -1 && b > -1 : () => g < i.length && b < t.length, L = (x) => !this.isReversed() && x <= V || this.isReversed() && x >= V;
440
+ let J, Z = -1, g = this.isReversed() ? i.length - 1 : 0, b = this.isReversed() ? t.length - 1 : 0, $ = !1;
441
441
  for (; W(); ) {
442
442
  const x = i.charAt(g), j = c[x], U = (j == null ? void 0 : j.transform) != null ? j.transform(t.charAt(b)) : t.charAt(b);
443
- if (!r.includes(g) && j != null ? (U.match(j.pattern) != null ? (y[F](U), j.repeated ? (Z === -1 ? Z = g : g === V && g !== Z && (g = Z - w), V === Z && (g -= w)) : j.multiple && (k = !0, g -= w), g += w) : j.multiple ? k && (g += w, b -= w, k = !1) : U === J ? J = void 0 : j.optional && (g += w, b -= w), b += w) : (o && !this.isEager() && y[F](x), U === x && !this.isEager() ? b += w : J = x, this.isEager() || (g += w)), this.isEager())
443
+ if (!r.includes(g) && j != null ? (U.match(j.pattern) != null ? (y[F](U), j.repeated ? (Z === -1 ? Z = g : g === V && g !== Z && (g = Z - k), V === Z && (g -= k)) : j.multiple && ($ = !0, g -= k), g += k) : j.multiple ? $ && (g += k, b -= k, $ = !1) : U === J ? J = void 0 : j.optional && (g += k, b -= k), b += k) : (o && !this.isEager() && y[F](x), U === x && !this.isEager() ? b += k : J = x, this.isEager() || (g += k)), this.isEager())
444
444
  for (; L(g) && (c[i.charAt(g)] == null || r.includes(g)); ) {
445
445
  if (o) {
446
446
  if (y[F](i.charAt(g)), t.charAt(b) === i.charAt(g)) {
447
- g += w, b += w;
447
+ g += k, b += k;
448
448
  continue;
449
449
  }
450
- } else i.charAt(g) === t.charAt(b) && (b += w);
451
- g += w;
450
+ } else i.charAt(g) === t.charAt(b) && (b += k);
451
+ g += k;
452
452
  }
453
453
  }
454
454
  return this.memo.set(l, y.join("")), this.memo.get(l);
@@ -497,10 +497,10 @@ class Fa {
497
497
  var l, i;
498
498
  const r = t.selectionStart, y = t.value;
499
499
  if (o(), r === null || r === y.length && !a) return;
500
- const c = t.value, w = y.slice(0, r), F = c.slice(0, r), V = (l = this.processInput(t, w)) == null ? void 0 : l.unmasked, W = (i = this.processInput(t, F)) == null ? void 0 : i.unmasked;
500
+ const c = t.value, k = y.slice(0, r), F = c.slice(0, r), V = (l = this.processInput(t, k)) == null ? void 0 : l.unmasked, W = (i = this.processInput(t, F)) == null ? void 0 : i.unmasked;
501
501
  if (V === void 0 || W === void 0) return;
502
502
  let L = r;
503
- w !== F && (L += a ? c.length - y.length : V.length - W.length), t.setSelectionRange(L, L);
503
+ k !== F && (L += a ? c.length - y.length : V.length - W.length), t.setSelectionRange(L, L);
504
504
  }
505
505
  setValue(t, a) {
506
506
  const o = this.processInput(t, a);
@@ -674,7 +674,7 @@ function Ke(e, t = "Erro inesperado") {
674
674
  const l = o.detail ?? o;
675
675
  return Oa(l) || t;
676
676
  }
677
- function Jl() {
677
+ function Zl() {
678
678
  return { extractApiError: Ke };
679
679
  }
680
680
  const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-autocompletefk-toolbar" }, Ua = { class: "w-autocompletefk-toolbar-actions" }, qa = { class: "flex items-center justify-end gap-1" }, Ha = { class: "w-autocompletefk-footer" }, Lt = /* @__PURE__ */ de({
@@ -706,7 +706,7 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
706
706
  throw new Error(
707
707
  "[wPrimeVueComponents] dataProvider não encontrado. Registre o WPrimeVuePlugin."
708
708
  );
709
- const i = l, r = It(), { confirmDelete: y } = Tt(), c = q(null), w = q([]), F = q(!1);
709
+ const i = l, r = It(), { confirmDelete: y } = Tt(), c = q(null), k = q([]), F = q(!1);
710
710
  let V = null;
711
711
  async function W(C) {
712
712
  try {
@@ -725,9 +725,9 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
725
725
  };
726
726
  C && (S.search = C);
727
727
  const te = await i.list(a.endpoint, S);
728
- w.value = te.data;
728
+ k.value = te.data;
729
729
  } catch {
730
- w.value = [];
730
+ k.value = [];
731
731
  } finally {
732
732
  F.value = !1;
733
733
  }
@@ -735,7 +735,7 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
735
735
  function J(C) {
736
736
  const S = C.query || "";
737
737
  if (S.length < a.minLength) {
738
- w.value = [];
738
+ k.value = [];
739
739
  return;
740
740
  }
741
741
  V && clearTimeout(V), V = setTimeout(() => L(S), 300);
@@ -760,7 +760,7 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
760
760
  },
761
761
  { immediate: !0 }
762
762
  );
763
- const b = q(!1), k = q([]), x = q(!1), j = q(""), U = q(1), Y = q(15), K = q(0), B = q(null), X = q(null), oe = q(0);
763
+ const b = q(!1), $ = q([]), x = q(!1), j = q(""), U = q(1), N = q(15), K = q(0), B = q(null), X = q(null), oe = q(0);
764
764
  let ae = null;
765
765
  const _ = q([]), f = H(() => {
766
766
  var C;
@@ -784,14 +784,14 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
784
784
  try {
785
785
  const z = {
786
786
  page: U.value,
787
- page_size: Y.value,
787
+ page_size: N.value,
788
788
  ...a.endpointParams
789
789
  };
790
790
  j.value && (z.search = j.value), X.value && oe.value !== 0 && (z.ordering = oe.value === -1 ? `-${X.value}` : X.value);
791
791
  const ce = await i.list(a.endpoint, z);
792
- k.value = ce.data, K.value = ce.rows, (C = ce.extras) != null && C.fields && !((S = a.columns) != null && S.length) && !((te = a.crudFields) != null && te.length) && (_.value = ce.extras.fields);
792
+ $.value = ce.data, K.value = ce.rows, (C = ce.extras) != null && C.fields && !((S = a.columns) != null && S.length) && !((te = a.crudFields) != null && te.length) && (_.value = ce.extras.fields);
793
793
  } catch {
794
- k.value = [], K.value = 0;
794
+ $.value = [], K.value = 0;
795
795
  } finally {
796
796
  x.value = !1;
797
797
  }
@@ -800,7 +800,7 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
800
800
  a.disabled || (j.value = "", U.value = 1, X.value = null, oe.value = 0, B.value = null, b.value = !0, R());
801
801
  }
802
802
  function se(C) {
803
- U.value = C.page + 1, Y.value = C.rows, R();
803
+ U.value = C.page + 1, N.value = C.rows, R();
804
804
  }
805
805
  function pe(C) {
806
806
  X.value = C.sortField ?? null, oe.value = C.sortOrder ?? 0, U.value = 1, R();
@@ -863,10 +863,10 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
863
863
  te,
864
864
  C
865
865
  );
866
- const z = k.value.findIndex((ce) => ce[a.optionValue] === te);
867
- z !== -1 && (k.value[z] = S.data), r.success("Registro atualizado com sucesso");
866
+ const z = $.value.findIndex((ce) => ce[a.optionValue] === te);
867
+ z !== -1 && ($.value[z] = S.data), r.success("Registro atualizado com sucesso");
868
868
  } else
869
- S = await i.create(a.endpoint, C), k.value.unshift(S.data), K.value++, r.success("Registro criado com sucesso");
869
+ S = await i.create(a.endpoint, C), $.value.unshift(S.data), K.value++, r.success("Registro criado com sucesso");
870
870
  we.value = !1, ue.value = null, B.value = S.data;
871
871
  } catch (C) {
872
872
  r.error(Ke(C, "Erro ao salvar registro"));
@@ -879,8 +879,8 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
879
879
  try {
880
880
  const S = C[a.optionValue];
881
881
  await i.delete(a.endpoint, S);
882
- const te = k.value.findIndex((z) => z[a.optionValue] === S);
883
- te !== -1 && (k.value.splice(te, 1), K.value--), c.value && c.value[a.optionValue] === S && (c.value = null, o("update:modelValue", null)), B.value && B.value[a.optionValue] === S && (B.value = null), r.success("Registro excluído com sucesso");
882
+ const te = $.value.findIndex((z) => z[a.optionValue] === S);
883
+ te !== -1 && ($.value.splice(te, 1), K.value--), c.value && c.value[a.optionValue] === S && (c.value = null, o("update:modelValue", null)), B.value && B.value[a.optionValue] === S && (B.value = null), r.success("Registro excluído com sucesso");
884
884
  } catch (S) {
885
885
  r.error(Ke(S, "Erro ao excluir registro"));
886
886
  }
@@ -890,9 +890,9 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
890
890
  const te = kt("tooltip");
891
891
  return s(), m(le, null, [
892
892
  h("div", Ba, [
893
- N(v(xt), {
893
+ O(v(xt), {
894
894
  "model-value": c.value,
895
- suggestions: w.value,
895
+ suggestions: k.value,
896
896
  "option-label": e.optionLabel,
897
897
  placeholder: e.placeholder,
898
898
  disabled: e.disabled,
@@ -919,7 +919,7 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
919
919
  ]
920
920
  ])
921
921
  ]),
922
- N(v(Dt), {
922
+ O(v(Dt), {
923
923
  visible: b.value,
924
924
  "onUpdate:visible": S[4] || (S[4] = (z) => b.value = z),
925
925
  header: e.dialogHeader || "Pesquisar",
@@ -930,13 +930,13 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
930
930
  }, {
931
931
  footer: ne(() => [
932
932
  h("div", Ha, [
933
- N(v(ee), {
933
+ O(v(ee), {
934
934
  label: "Cancelar",
935
935
  severity: "secondary",
936
936
  text: "",
937
937
  onClick: S[3] || (S[3] = (z) => b.value = !1)
938
938
  }),
939
- N(v(ee), {
939
+ O(v(ee), {
940
940
  label: "Selecionar",
941
941
  icon: "pi pi-check",
942
942
  disabled: !B.value,
@@ -946,10 +946,10 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
946
946
  ]),
947
947
  default: ne(() => [
948
948
  h("div", ja, [
949
- N(v(qe), { class: "w-autocompletefk-toolbar-search" }, {
949
+ O(v(qe), { class: "w-autocompletefk-toolbar-search" }, {
950
950
  default: ne(() => [
951
- N(v(He), { class: "pi pi-search" }),
952
- N(v(me), {
951
+ O(v(He), { class: "pi pi-search" }),
952
+ O(v(me), {
953
953
  modelValue: j.value,
954
954
  "onUpdate:modelValue": S[0] || (S[0] = (z) => j.value = z),
955
955
  placeholder: "Pesquisar...",
@@ -965,20 +965,20 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
965
965
  icon: "pi pi-plus",
966
966
  size: "small",
967
967
  onClick: ye
968
- })) : $("", !0)
968
+ })) : w("", !0)
969
969
  ])
970
970
  ]),
971
- N(v($t), {
971
+ O(v($t), {
972
972
  selection: B.value,
973
973
  "onUpdate:selection": S[1] || (S[1] = (z) => B.value = z),
974
- value: k.value,
974
+ value: $.value,
975
975
  loading: x.value,
976
976
  paginator: "",
977
977
  lazy: "",
978
978
  "striped-rows": "",
979
979
  "removable-sort": "",
980
980
  size: "small",
981
- rows: Y.value,
981
+ rows: N.value,
982
982
  "total-records": K.value,
983
983
  "sort-field": X.value ?? void 0,
984
984
  "sort-order": oe.value,
@@ -992,7 +992,7 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
992
992
  h("div", { class: "w-autocompletefk-empty" }, "Nenhum registro encontrado", -1)
993
993
  ])]),
994
994
  default: ne(() => [
995
- N(v(ze), {
995
+ O(v(ze), {
996
996
  "selection-mode": "single",
997
997
  "header-style": "width: 3rem"
998
998
  }),
@@ -1036,7 +1036,7 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
1036
1036
  void 0,
1037
1037
  { top: !0 }
1038
1038
  ]
1039
- ]) : $("", !0),
1039
+ ]) : w("", !0),
1040
1040
  n.value ? fe((s(), A(v(ee), {
1041
1041
  key: 1,
1042
1042
  icon: "pi pi-trash",
@@ -1052,11 +1052,11 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
1052
1052
  void 0,
1053
1053
  { top: !0 }
1054
1054
  ]
1055
- ]) : $("", !0)
1055
+ ]) : w("", !0)
1056
1056
  ])
1057
1057
  ]),
1058
1058
  _: 1
1059
- })) : $("", !0)
1059
+ })) : w("", !0)
1060
1060
  ]),
1061
1061
  _: 1
1062
1062
  }, 8, ["selection", "value", "loading", "rows", "total-records", "sort-field", "sort-order", "data-key"])
@@ -1077,7 +1077,7 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
1077
1077
  }),
1078
1078
  "onUpdate:field": Fe,
1079
1079
  onSave: Ae
1080
- }, null, 8, ["visible", "title", "fields", "form-data", "is-editing", "saving", "width"])) : $("", !0)
1080
+ }, null, 8, ["visible", "title", "fields", "form-data", "is-editing", "saving", "width"])) : w("", !0)
1081
1081
  ], 64);
1082
1082
  };
1083
1083
  }
@@ -1106,15 +1106,15 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
1106
1106
  }).format(c);
1107
1107
  });
1108
1108
  function y(c) {
1109
- const w = c.target.value.replace(/\D/g, "");
1110
- if (!w) {
1109
+ const k = c.target.value.replace(/\D/g, "");
1110
+ if (!k) {
1111
1111
  o("update:modelValue", null);
1112
1112
  return;
1113
1113
  }
1114
- const F = Number(w) / Math.pow(10, a.decimals);
1114
+ const F = Number(k) / Math.pow(10, a.decimals);
1115
1115
  o("update:modelValue", F);
1116
1116
  }
1117
- return (c, w) => i.value ? (s(), A(v(oa), {
1117
+ return (c, k) => i.value ? (s(), A(v(oa), {
1118
1118
  key: 0,
1119
1119
  class: "w-money-input"
1120
1120
  }, {
@@ -1124,8 +1124,8 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
1124
1124
  Pe(T(l.value), 1)
1125
1125
  ]),
1126
1126
  _: 1
1127
- })) : $("", !0),
1128
- N(v(me), {
1127
+ })) : w("", !0),
1128
+ O(v(me), {
1129
1129
  "model-value": r.value,
1130
1130
  inputmode: "numeric",
1131
1131
  class: "w-money-input__field",
@@ -1139,7 +1139,7 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
1139
1139
  Pe(T(e.suffix), 1)
1140
1140
  ]),
1141
1141
  _: 1
1142
- })) : $("", !0)
1142
+ })) : w("", !0)
1143
1143
  ]),
1144
1144
  _: 1
1145
1145
  })) : (s(), A(v(me), {
@@ -1176,12 +1176,12 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
1176
1176
  function c(b) {
1177
1177
  return b[a.trackBy];
1178
1178
  }
1179
- function w(b) {
1179
+ function k(b) {
1180
1180
  return String(b[a.optionLabel] ?? "");
1181
1181
  }
1182
- function F(b, k) {
1183
- if (!k) return !0;
1184
- const x = k.toLowerCase();
1182
+ function F(b, $) {
1183
+ if (!$) return !0;
1184
+ const x = $.toLowerCase();
1185
1185
  return y.value.some(
1186
1186
  (j) => String(b[j] ?? "").toLowerCase().includes(x)
1187
1187
  );
@@ -1200,8 +1200,8 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
1200
1200
  }
1201
1201
  function J(b) {
1202
1202
  if (a.disabled) return;
1203
- const k = c(b);
1204
- o("update:selected", a.selected.filter((x) => x !== k));
1203
+ const $ = c(b);
1204
+ o("update:selected", a.selected.filter((x) => x !== $));
1205
1205
  }
1206
1206
  function Z() {
1207
1207
  a.disabled || o("update:selected", a.source.map(c));
@@ -1209,20 +1209,20 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
1209
1209
  function g() {
1210
1210
  a.disabled || o("update:selected", []);
1211
1211
  }
1212
- return (b, k) => (s(), m("div", {
1212
+ return (b, $) => (s(), m("div", {
1213
1213
  class: re(["w-transfer", { "w-transfer--disabled": e.disabled }])
1214
1214
  }, [
1215
1215
  h("div", Ka, [
1216
1216
  h("div", Ga, [
1217
- k[2] || (k[2] = h("span", { class: "w-transfer__title" }, "Disponíveis", -1)),
1217
+ $[2] || ($[2] = h("span", { class: "w-transfer__title" }, "Disponíveis", -1)),
1218
1218
  h("span", Ja, T(V.value.length), 1)
1219
1219
  ]),
1220
- N(v(qe), { class: "w-transfer__search" }, {
1220
+ O(v(qe), { class: "w-transfer__search" }, {
1221
1221
  default: ne(() => [
1222
- N(v(He), { class: "pi pi-search" }),
1223
- N(v(me), {
1222
+ O(v(He), { class: "pi pi-search" }),
1223
+ O(v(me), {
1224
1224
  modelValue: l.value,
1225
- "onUpdate:modelValue": k[0] || (k[0] = (x) => l.value = x),
1225
+ "onUpdate:modelValue": $[0] || ($[0] = (x) => l.value = x),
1226
1226
  placeholder: "Buscar...",
1227
1227
  fluid: ""
1228
1228
  }, null, 8, ["modelValue"])
@@ -1235,14 +1235,14 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
1235
1235
  class: "w-transfer__item",
1236
1236
  onClick: (j) => L(x)
1237
1237
  }, [
1238
- h("span", null, T(w(x)), 1),
1239
- k[3] || (k[3] = h("i", { class: "pi pi-angle-right" }, null, -1))
1238
+ h("span", null, T(k(x)), 1),
1239
+ $[3] || ($[3] = h("i", { class: "pi pi-angle-right" }, null, -1))
1240
1240
  ], 8, Xa))), 128)),
1241
- V.value.length ? $("", !0) : (s(), m("li", Qa, "Nenhum item"))
1241
+ V.value.length ? w("", !0) : (s(), m("li", Qa, "Nenhum item"))
1242
1242
  ])
1243
1243
  ]),
1244
1244
  h("div", _a, [
1245
- N(v(ee), {
1245
+ O(v(ee), {
1246
1246
  type: "button",
1247
1247
  icon: "pi pi-angle-double-right",
1248
1248
  text: "",
@@ -1250,7 +1250,7 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
1250
1250
  disabled: e.disabled || !V.value.length,
1251
1251
  onClick: Z
1252
1252
  }, null, 8, ["disabled"]),
1253
- N(v(ee), {
1253
+ O(v(ee), {
1254
1254
  type: "button",
1255
1255
  icon: "pi pi-angle-double-left",
1256
1256
  text: "",
@@ -1261,15 +1261,15 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
1261
1261
  ]),
1262
1262
  h("div", en, [
1263
1263
  h("div", tn, [
1264
- k[4] || (k[4] = h("span", { class: "w-transfer__title" }, "Selecionados", -1)),
1264
+ $[4] || ($[4] = h("span", { class: "w-transfer__title" }, "Selecionados", -1)),
1265
1265
  h("span", an, T(W.value.length), 1)
1266
1266
  ]),
1267
- N(v(qe), { class: "w-transfer__search" }, {
1267
+ O(v(qe), { class: "w-transfer__search" }, {
1268
1268
  default: ne(() => [
1269
- N(v(He), { class: "pi pi-search" }),
1270
- N(v(me), {
1269
+ O(v(He), { class: "pi pi-search" }),
1270
+ O(v(me), {
1271
1271
  modelValue: i.value,
1272
- "onUpdate:modelValue": k[1] || (k[1] = (x) => i.value = x),
1272
+ "onUpdate:modelValue": $[1] || ($[1] = (x) => i.value = x),
1273
1273
  placeholder: "Buscar...",
1274
1274
  fluid: ""
1275
1275
  }, null, 8, ["modelValue"])
@@ -1282,10 +1282,10 @@ const Ba = { class: "w-autocompletefk" }, Wa = ["disabled"], ja = { class: "w-au
1282
1282
  class: "w-transfer__item",
1283
1283
  onClick: (j) => J(x)
1284
1284
  }, [
1285
- k[5] || (k[5] = h("i", { class: "pi pi-angle-left" }, null, -1)),
1286
- h("span", null, T(w(x)), 1)
1285
+ $[5] || ($[5] = h("i", { class: "pi pi-angle-left" }, null, -1)),
1286
+ h("span", null, T(k(x)), 1)
1287
1287
  ], 8, on))), 128)),
1288
- W.value.length ? $("", !0) : (s(), m("li", ln, "Nenhum item"))
1288
+ W.value.length ? w("", !0) : (s(), m("li", ln, "Nenhum item"))
1289
1289
  ])
1290
1290
  ])
1291
1291
  ], 2));
@@ -1350,7 +1350,7 @@ const rn = { class: "w-crud-form" }, un = {
1350
1350
  emits: ["update:field"],
1351
1351
  setup(e, { expose: t, emit: a }) {
1352
1352
  const o = e, l = a, i = ge({}), r = ge({}), y = ge({}), c = ge({});
1353
- function w(f, P) {
1353
+ function k(f, P) {
1354
1354
  const u = P.target.value, n = u.replace(/\D/g, "");
1355
1355
  l("update:field", f.field, u), y[f.field] = null, c[f.field] && (clearTimeout(c[f.field]), c[f.field] = null), n.length === 8 && (c[f.field] = setTimeout(async () => {
1356
1356
  r[f.field] = !0, y[f.field] = null;
@@ -1405,7 +1405,7 @@ const rn = { class: "w-crud-form" }, un = {
1405
1405
  const u = P.target.value.replace(/\D/g, "").slice(0, 14);
1406
1406
  l("update:field", f, u);
1407
1407
  }
1408
- const k = ge({});
1408
+ const $ = ge({});
1409
1409
  function x(f) {
1410
1410
  const P = o.formData[f.field];
1411
1411
  if (P == null) return null;
@@ -1415,15 +1415,15 @@ const rn = { class: "w-crud-form" }, un = {
1415
1415
  ) ?? null;
1416
1416
  }
1417
1417
  function j(f) {
1418
- return k[f.field] || [];
1418
+ return $[f.field] || [];
1419
1419
  }
1420
1420
  function U(f, P) {
1421
1421
  const u = (P.query || "").toLowerCase(), n = W(f.options) || [], p = f.optionLabel || "label";
1422
- k[f.field] = n.filter(
1422
+ $[f.field] = n.filter(
1423
1423
  (d) => String(d[p] || "").toLowerCase().includes(u)
1424
1424
  );
1425
1425
  }
1426
- function Y(f, P) {
1426
+ function N(f, P) {
1427
1427
  const u = f.optionValue || "value";
1428
1428
  l("update:field", f.field, P.value[u]);
1429
1429
  }
@@ -1476,10 +1476,10 @@ const rn = { class: "w-crud-form" }, un = {
1476
1476
  }, [
1477
1477
  u.title ? (s(), m("div", un, [
1478
1478
  h("h3", dn, T(u.title), 1),
1479
- u.description ? (s(), m("p", cn, T(u.description), 1)) : $("", !0)
1480
- ])) : $("", !0),
1479
+ u.description ? (s(), m("p", cn, T(u.description), 1)) : w("", !0)
1480
+ ])) : w("", !0),
1481
1481
  h("div", fn, [
1482
- (s(!0), m(le, null, ie(u.fields, (n) => O(f.$slots, `field-${n.field}`, {
1482
+ (s(!0), m(le, null, ie(u.fields, (n) => Y(f.$slots, `field-${n.field}`, {
1483
1483
  key: n.field,
1484
1484
  field: n,
1485
1485
  formData: e.formData,
@@ -1487,7 +1487,7 @@ const rn = { class: "w-crud-form" }, un = {
1487
1487
  setFormField: (p, d) => l("update:field", p, d)
1488
1488
  }, () => [
1489
1489
  n.type === "switch" ? (s(), m("div", mn, [
1490
- N(v(_t), {
1490
+ O(v(_t), {
1491
1491
  "model-value": e.formData[n.field],
1492
1492
  disabled: V(n),
1493
1493
  "onUpdate:modelValue": (p) => l("update:field", n.field, p)
@@ -1496,15 +1496,15 @@ const rn = { class: "w-crud-form" }, un = {
1496
1496
  ])) : n.type === "color" ? (s(), m("div", vn, [
1497
1497
  h("label", gn, [
1498
1498
  Pe(T(n.label) + " ", 1),
1499
- n.required ? (s(), m("span", hn, "*")) : $("", !0)
1499
+ n.required ? (s(), m("span", hn, "*")) : w("", !0)
1500
1500
  ]),
1501
1501
  h("div", yn, [
1502
- N(v(ea), {
1502
+ O(v(ea), {
1503
1503
  "model-value": K(n),
1504
1504
  disabled: V(n),
1505
1505
  "onUpdate:modelValue": (p) => B(n, p)
1506
1506
  }, null, 8, ["model-value", "disabled", "onUpdate:modelValue"]),
1507
- N(v(me), {
1507
+ O(v(me), {
1508
1508
  "model-value": e.formData[n.field],
1509
1509
  class: "w-28",
1510
1510
  maxlength: "7",
@@ -1515,7 +1515,7 @@ const rn = { class: "w-crud-form" }, un = {
1515
1515
  ])
1516
1516
  ])) : n.type === "image" ? (s(), m("div", bn, [
1517
1517
  h("label", wn, T(n.label), 1),
1518
- O(f.$slots, `image-${n.field}`, {
1518
+ Y(f.$slots, `image-${n.field}`, {
1519
1519
  field: n,
1520
1520
  formData: e.formData
1521
1521
  }, () => [
@@ -1533,9 +1533,9 @@ const rn = { class: "w-crud-form" }, un = {
1533
1533
  ])) : n.type === "transfer" ? (s(), m("div", $n, [
1534
1534
  h("label", Cn, [
1535
1535
  Pe(T(n.label) + " ", 1),
1536
- n.required ? (s(), m("span", Dn, "*")) : $("", !0)
1536
+ n.required ? (s(), m("span", Dn, "*")) : w("", !0)
1537
1537
  ]),
1538
- N(Nt, {
1538
+ O(Nt, {
1539
1539
  source: W(n.options) || [],
1540
1540
  selected: e.formData[n.field] || [],
1541
1541
  "track-by": n.optionValue || "id",
@@ -1550,8 +1550,8 @@ const rn = { class: "w-crud-form" }, un = {
1550
1550
  }, [
1551
1551
  h("label", xn, [
1552
1552
  Pe(T(n.label) + " ", 1),
1553
- n.required ? (s(), m("span", Sn, "*")) : $("", !0),
1554
- r[n.field] ? (s(), m("i", Pn)) : $("", !0)
1553
+ n.required ? (s(), m("span", Sn, "*")) : w("", !0),
1554
+ r[n.field] ? (s(), m("i", Pn)) : w("", !0)
1555
1555
  ]),
1556
1556
  (!n.type || n.type === "text") && n.mask ? fe((s(), A(v(me), {
1557
1557
  key: 0,
@@ -1645,7 +1645,7 @@ const rn = { class: "w-crud-form" }, un = {
1645
1645
  placeholder: n.placeholder,
1646
1646
  disabled: V(n),
1647
1647
  onComplete: (p) => U(n, p),
1648
- onItemSelect: (p) => Y(n, p),
1648
+ onItemSelect: (p) => N(n, p),
1649
1649
  onClear: (p) => l("update:field", n.field, null)
1650
1650
  }, null, 8, ["model-value", "suggestions", "option-label", "placeholder", "disabled", "onComplete", "onItemSelect", "onClear"])) : n.type === "fk" ? (s(), A(Lt, {
1651
1651
  key: 9,
@@ -1706,7 +1706,7 @@ const rn = { class: "w-crud-form" }, un = {
1706
1706
  placeholder: n.placeholder || "00000-000",
1707
1707
  disabled: V(n),
1708
1708
  invalid: !!y[n.field],
1709
- onInput: (p) => w(n, p)
1709
+ onInput: (p) => k(n, p)
1710
1710
  }, null, 8, ["model-value", "placeholder", "disabled", "invalid", "onInput"])), [
1711
1711
  [v(at), { mask: "#####-###" }]
1712
1712
  ]) : n.type === "textarea" ? (s(), A(v(Xt), {
@@ -1718,8 +1718,8 @@ const rn = { class: "w-crud-form" }, un = {
1718
1718
  placeholder: n.placeholder,
1719
1719
  disabled: V(n),
1720
1720
  "onUpdate:modelValue": (p) => l("update:field", n.field, p)
1721
- }, null, 8, ["model-value", "autofocus", "rows", "placeholder", "disabled", "onUpdate:modelValue"])) : $("", !0),
1722
- y[n.field] ? (s(), m("small", Vn, T(y[n.field]), 1)) : i[n.field] ? (s(), m("small", En, T(i[n.field]), 1)) : $("", !0)
1721
+ }, null, 8, ["model-value", "autofocus", "rows", "placeholder", "disabled", "onUpdate:modelValue"])) : w("", !0),
1722
+ y[n.field] ? (s(), m("small", Vn, T(y[n.field]), 1)) : i[n.field] ? (s(), m("small", En, T(i[n.field]), 1)) : w("", !0)
1723
1723
  ], 2))
1724
1724
  ])), 128))
1725
1725
  ])
@@ -1763,34 +1763,34 @@ const rn = { class: "w-crud-form" }, un = {
1763
1763
  class: "w-crud-form",
1764
1764
  onSubmit: qt(i, ["prevent"])
1765
1765
  }, [
1766
- N(Mn, {
1766
+ O(Mn, {
1767
1767
  ref_key: "rendererRef",
1768
1768
  ref: l,
1769
1769
  fields: e.fields,
1770
1770
  "form-data": e.formData,
1771
1771
  "is-editing": e.isEditing,
1772
1772
  disabled: e.disabled,
1773
- "onUpdate:field": y[0] || (y[0] = (c, w) => o("update:field", c, w))
1773
+ "onUpdate:field": y[0] || (y[0] = (c, k) => o("update:field", c, k))
1774
1774
  }, ot({ _: 2 }, [
1775
1775
  ie(e.fields, (c) => ({
1776
1776
  name: `field-${c.field}`,
1777
- fn: ne((w) => [
1778
- O(r.$slots, `field-${c.field}`, lt(st(w)))
1777
+ fn: ne((k) => [
1778
+ Y(r.$slots, `field-${c.field}`, lt(st(k)))
1779
1779
  ])
1780
1780
  })),
1781
1781
  ie(e.fields.filter((c) => c.type === "image"), (c) => ({
1782
1782
  name: `image-${c.field}`,
1783
- fn: ne((w) => [
1784
- O(r.$slots, `image-${c.field}`, lt(st(w)))
1783
+ fn: ne((k) => [
1784
+ Y(r.$slots, `image-${c.field}`, lt(st(k)))
1785
1785
  ])
1786
1786
  }))
1787
1787
  ]), 1032, ["fields", "form-data", "is-editing", "disabled"]),
1788
1788
  h("div", Fn, [
1789
- O(r.$slots, "footer", {
1789
+ Y(r.$slots, "footer", {
1790
1790
  saving: e.saving,
1791
1791
  disabled: e.disabled
1792
1792
  }, () => [
1793
- N(v(ee), {
1793
+ O(v(ee), {
1794
1794
  type: "button",
1795
1795
  label: e.disabled ? "Fechar" : "Cancelar",
1796
1796
  severity: "secondary",
@@ -1798,7 +1798,7 @@ const rn = { class: "w-crud-form" }, un = {
1798
1798
  disabled: e.saving,
1799
1799
  onClick: y[1] || (y[1] = (c) => o("update:visible", !1))
1800
1800
  }, null, 8, ["label", "disabled"]),
1801
- e.disabled ? $("", !0) : (s(), A(v(ee), {
1801
+ e.disabled ? w("", !0) : (s(), A(v(ee), {
1802
1802
  key: 0,
1803
1803
  type: "submit",
1804
1804
  label: e.isEditing ? "Atualizar" : "Salvar",
@@ -1871,7 +1871,10 @@ const Tn = { class: "w-crud" }, Ln = {
1871
1871
  }, fo = {
1872
1872
  key: 1,
1873
1873
  class: "w-crud-rail-sep"
1874
- }, mo = /* @__PURE__ */ de({
1874
+ }, mo = {
1875
+ key: 2,
1876
+ class: "w-crud-rail-sep"
1877
+ }, po = /* @__PURE__ */ de({
1875
1878
  __name: "WCrudView",
1876
1879
  props: {
1877
1880
  crud: {},
@@ -1891,6 +1894,7 @@ const Tn = { class: "w-crud" }, Ln = {
1891
1894
  cardFields: { default: 4 },
1892
1895
  actionRail: { type: Boolean, default: !0 },
1893
1896
  contextMenu: { type: Boolean, default: !0 },
1897
+ showPrint: { type: Boolean, default: !1 },
1894
1898
  exportCsv: { type: Boolean, default: !0 },
1895
1899
  csvFilename: { default: "export.csv" },
1896
1900
  csvScope: { default: "all" },
@@ -1902,7 +1906,7 @@ const Tn = { class: "w-crud" }, Ln = {
1902
1906
  function c(u) {
1903
1907
  return y.value === u;
1904
1908
  }
1905
- function w(u) {
1909
+ function k(u) {
1906
1910
  y.value = u;
1907
1911
  }
1908
1912
  const F = H(
@@ -1937,7 +1941,7 @@ const Tn = { class: "w-crud" }, Ln = {
1937
1941
  }
1938
1942
  u.action === "edit" ? a.crud.openEditDialog(n) : u.action === "view" ? a.crud.openViewDialog(n) : u.action === "duplicate" ? a.crud.openDuplicateDialog(n) : u.action === "delete" && a.crud.confirmDelete(n);
1939
1943
  }
1940
- function k(u, n) {
1944
+ function $(u, n) {
1941
1945
  return u.visible ? u.visible(n) : !0;
1942
1946
  }
1943
1947
  function x(u, n) {
@@ -1952,20 +1956,20 @@ const Tn = { class: "w-crud" }, Ln = {
1952
1956
  }), u.push(...a.extraKpis), u;
1953
1957
  });
1954
1958
  H(() => a.crud.config.labels ?? {});
1955
- const U = H(() => a.crud.config.canCreate !== !1), Y = q(null), K = q(null);
1959
+ const U = H(() => a.crud.config.canCreate !== !1), N = q(null), K = q(null);
1956
1960
  function B(u) {
1957
- Y.value = u;
1961
+ N.value = u;
1958
1962
  }
1959
1963
  function X(u) {
1960
1964
  var n;
1961
- a.contextMenu && (Y.value = u.data, (n = K.value) == null || n.show(u.originalEvent));
1965
+ a.contextMenu && (N.value = u.data, (n = K.value) == null || n.show(u.originalEvent));
1962
1966
  }
1963
1967
  function oe(u, n) {
1964
1968
  var p;
1965
- a.contextMenu && (u.preventDefault(), Y.value = n, (p = K.value) == null || p.show(u));
1969
+ a.contextMenu && (u.preventDefault(), N.value = n, (p = K.value) == null || p.show(u));
1966
1970
  }
1967
1971
  const ae = H(() => {
1968
- const u = Y.value;
1972
+ const u = N.value;
1969
1973
  if (!u) return [];
1970
1974
  const n = [
1971
1975
  {
@@ -1975,14 +1979,14 @@ const Tn = { class: "w-crud" }, Ln = {
1975
1979
  }
1976
1980
  ];
1977
1981
  for (const p of Z.value)
1978
- k(p, u) && n.push({
1982
+ $(p, u) && n.push({
1979
1983
  label: p.tooltip ?? p.action,
1980
1984
  icon: p.icon,
1981
1985
  class: p.severity === "danger" ? "w-crud-ctx-danger" : void 0,
1982
1986
  disabled: x(p, u),
1983
1987
  command: () => b(p, u)
1984
1988
  });
1985
- return n.push({
1989
+ return a.showPrint && n.push({
1986
1990
  label: "Imprimir",
1987
1991
  icon: "pi pi-print",
1988
1992
  command: () => o("print", u)
@@ -1993,7 +1997,7 @@ const Tn = { class: "w-crud" }, Ln = {
1993
1997
  })), n;
1994
1998
  });
1995
1999
  function _() {
1996
- Y.value && o("print", Y.value);
2000
+ N.value && o("print", N.value);
1997
2001
  }
1998
2002
  const f = q(!1);
1999
2003
  async function P() {
@@ -2015,19 +2019,19 @@ const Tn = { class: "w-crud" }, Ln = {
2015
2019
  e.showHeader ? (s(), m("div", Ln, [
2016
2020
  h("div", zn, [
2017
2021
  h("h1", Nn, T(e.title), 1),
2018
- e.subtitle ? (s(), m("p", Yn, T(e.subtitle), 1)) : $("", !0)
2022
+ e.subtitle ? (s(), m("p", Yn, T(e.subtitle), 1)) : w("", !0)
2019
2023
  ]),
2020
2024
  h("div", On, [
2021
- O(u.$slots, "header-actions"),
2022
- U.value ? (s(), A(v(ee), {
2025
+ Y(u.$slots, "header-actions"),
2026
+ U.value && !e.actionRail ? (s(), A(v(ee), {
2023
2027
  key: 0,
2024
2028
  label: "Novo",
2025
2029
  icon: "pi pi-plus",
2026
2030
  onClick: n[0] || (n[0] = (d) => e.crud.openCreateDialog())
2027
- })) : $("", !0)
2031
+ })) : w("", !0)
2028
2032
  ])
2029
- ])) : $("", !0),
2030
- O(u.$slots, "before-table", {}, () => [
2033
+ ])) : w("", !0),
2034
+ Y(u.$slots, "before-table", {}, () => [
2031
2035
  j.value.length ? (s(), m("div", Bn, [
2032
2036
  (s(!0), m(le, null, ie(j.value, (d, E) => (s(), m("div", {
2033
2037
  key: E,
@@ -2046,14 +2050,14 @@ const Tn = { class: "w-crud" }, Ln = {
2046
2050
  h("div", Un, T(d.value), 1)
2047
2051
  ])
2048
2052
  ]))), 128))
2049
- ])) : $("", !0)
2053
+ ])) : w("", !0)
2050
2054
  ]),
2051
2055
  h("div", {
2052
2056
  class: re(["w-crud-content", { "w-crud-content--rail": e.actionRail }])
2053
2057
  }, [
2054
2058
  h("div", qn, [
2055
2059
  y.value === "table" ? (s(), m("div", Hn, [
2056
- N(v($t), {
2060
+ O(v($t), {
2057
2061
  value: e.crud.items.value,
2058
2062
  loading: e.crud.loading.value,
2059
2063
  "expanded-rows": r.value,
@@ -2072,12 +2076,12 @@ const Tn = { class: "w-crud" }, Ln = {
2072
2076
  "sort-field": e.crud.sort.field ?? void 0,
2073
2077
  "sort-order": e.crud.sort.order,
2074
2078
  "data-key": e.crud.config.pk || "id",
2075
- selection: e.actionRail || e.contextMenu ? Y.value : void 0,
2079
+ selection: e.actionRail || e.contextMenu ? N.value : void 0,
2076
2080
  "selection-mode": e.actionRail || e.contextMenu ? "single" : void 0,
2077
2081
  "context-menu": e.contextMenu,
2078
- "context-menu-selection": e.contextMenu ? Y.value : void 0,
2079
- "onUpdate:selection": n[5] || (n[5] = (d) => Y.value = d),
2080
- "onUpdate:contextMenuSelection": n[6] || (n[6] = (d) => Y.value = d),
2082
+ "context-menu-selection": e.contextMenu ? N.value : void 0,
2083
+ "onUpdate:selection": n[5] || (n[5] = (d) => N.value = d),
2084
+ "onUpdate:contextMenuSelection": n[6] || (n[6] = (d) => N.value = d),
2081
2085
  onRowContextmenu: X,
2082
2086
  onPage: e.crud.onPage,
2083
2087
  onSort: n[7] || (n[7] = (d) => e.crud.onSort({ sortField: d.sortField, sortOrder: d.sortOrder })),
@@ -2089,8 +2093,8 @@ const Tn = { class: "w-crud" }, Ln = {
2089
2093
  h("div", Gn, [
2090
2094
  e.showSearch ? (s(), A(v(qe), { key: 0 }, {
2091
2095
  default: ne(() => [
2092
- N(v(He), { class: "pi pi-search" }),
2093
- N(v(me), {
2096
+ O(v(He), { class: "pi pi-search" }),
2097
+ O(v(me), {
2094
2098
  "model-value": e.crud.search.value,
2095
2099
  placeholder: "Buscar...",
2096
2100
  class: "w-72",
@@ -2098,12 +2102,12 @@ const Tn = { class: "w-crud" }, Ln = {
2098
2102
  }, null, 8, ["model-value", "onInput"])
2099
2103
  ]),
2100
2104
  _: 1
2101
- })) : $("", !0),
2102
- O(u.$slots, "toolbar-start"),
2103
- O(u.$slots, "toolbar-filters")
2105
+ })) : w("", !0),
2106
+ Y(u.$slots, "toolbar-start"),
2107
+ Y(u.$slots, "toolbar-filters")
2104
2108
  ]),
2105
2109
  h("div", Jn, [
2106
- O(u.$slots, "toolbar-actions"),
2110
+ Y(u.$slots, "toolbar-actions"),
2107
2111
  e.exportCsv ? fe((s(), A(v(ee), {
2108
2112
  key: 0,
2109
2113
  icon: "pi pi-download",
@@ -2118,34 +2122,34 @@ const Tn = { class: "w-crud" }, Ln = {
2118
2122
  void 0,
2119
2123
  { top: !0 }
2120
2124
  ]
2121
- ]) : $("", !0),
2125
+ ]) : w("", !0),
2122
2126
  e.viewToggle ? (s(), m("div", Zn, [
2123
- N(v(ee), {
2127
+ O(v(ee), {
2124
2128
  icon: "pi pi-table",
2125
2129
  size: "small",
2126
2130
  text: !c("table"),
2127
2131
  outlined: c("table"),
2128
- onClick: n[1] || (n[1] = (d) => w("table"))
2132
+ onClick: n[1] || (n[1] = (d) => k("table"))
2129
2133
  }, null, 8, ["text", "outlined"]),
2130
- N(v(ee), {
2134
+ O(v(ee), {
2131
2135
  icon: "pi pi-th-large",
2132
2136
  size: "small",
2133
2137
  text: !c("cards"),
2134
2138
  outlined: c("cards"),
2135
- onClick: n[2] || (n[2] = (d) => w("cards"))
2139
+ onClick: n[2] || (n[2] = (d) => k("cards"))
2136
2140
  }, null, 8, ["text", "outlined"])
2137
- ])) : $("", !0),
2138
- !e.showHeader && U.value ? (s(), A(v(ee), {
2141
+ ])) : w("", !0),
2142
+ !e.showHeader && U.value && !e.actionRail ? (s(), A(v(ee), {
2139
2143
  key: 2,
2140
2144
  label: "Novo",
2141
2145
  icon: "pi pi-plus",
2142
2146
  onClick: n[3] || (n[3] = (d) => e.crud.openCreateDialog())
2143
- })) : $("", !0)
2147
+ })) : w("", !0)
2144
2148
  ])
2145
2149
  ])
2146
2150
  ]),
2147
2151
  empty: ne(() => [
2148
- O(u.$slots, "empty", {}, () => [
2152
+ Y(u.$slots, "empty", {}, () => [
2149
2153
  n[17] || (n[17] = h("div", { class: "w-crud-empty" }, [
2150
2154
  h("div", { class: "w-crud-empty-icon" }, [
2151
2155
  h("i", { class: "pi pi-inbox" })
@@ -2160,7 +2164,7 @@ const Tn = { class: "w-crud" }, Ln = {
2160
2164
  key: 0,
2161
2165
  expander: "",
2162
2166
  style: { width: "3rem" }
2163
- })) : $("", !0),
2167
+ })) : w("", !0),
2164
2168
  (s(!0), m(le, null, ie(V.value, (d) => (s(), A(v(ze), {
2165
2169
  key: d.field,
2166
2170
  field: d.field,
@@ -2171,11 +2175,11 @@ const Tn = { class: "w-crud" }, Ln = {
2171
2175
  "body-class": W(d)
2172
2176
  }, {
2173
2177
  body: ne(({ data: E }) => [
2174
- O(u.$slots, `column-${d.field}`, {
2178
+ Y(u.$slots, `column-${d.field}`, {
2175
2179
  data: E,
2176
2180
  value: E[d.field]
2177
2181
  }, () => [
2178
- N(Qe, {
2182
+ O(Qe, {
2179
2183
  column: d,
2180
2184
  value: E[d.field],
2181
2185
  "row-data": E
@@ -2194,7 +2198,7 @@ const Tn = { class: "w-crud" }, Ln = {
2194
2198
  (s(!0), m(le, null, ie(Z.value, (E) => (s(), m(le, {
2195
2199
  key: E.action
2196
2200
  }, [
2197
- k(E, d) ? fe((s(), A(v(ee), {
2201
+ $(E, d) ? fe((s(), A(v(ee), {
2198
2202
  key: 0,
2199
2203
  icon: E.icon,
2200
2204
  text: "",
@@ -2210,23 +2214,23 @@ const Tn = { class: "w-crud" }, Ln = {
2210
2214
  void 0,
2211
2215
  { top: !0 }
2212
2216
  ]
2213
- ]) : $("", !0)
2217
+ ]) : w("", !0)
2214
2218
  ], 64))), 128)),
2215
- O(u.$slots, "row-actions", {
2219
+ Y(u.$slots, "row-actions", {
2216
2220
  data: d,
2217
2221
  crud: e.crud
2218
2222
  })
2219
2223
  ])
2220
2224
  ]),
2221
2225
  _: 3
2222
- }, 8, ["style"])) : $("", !0)
2226
+ }, 8, ["style"])) : w("", !0)
2223
2227
  ]),
2224
2228
  _: 2
2225
2229
  }, [
2226
2230
  e.expandable ? {
2227
2231
  name: "expansion",
2228
2232
  fn: ne((d) => [
2229
- O(u.$slots, "expansion", {
2233
+ Y(u.$slots, "expansion", {
2230
2234
  data: d.data
2231
2235
  })
2232
2236
  ]),
@@ -2238,8 +2242,8 @@ const Tn = { class: "w-crud" }, Ln = {
2238
2242
  h("div", eo, [
2239
2243
  e.showSearch ? (s(), A(v(qe), { key: 0 }, {
2240
2244
  default: ne(() => [
2241
- N(v(He), { class: "pi pi-search" }),
2242
- N(v(me), {
2245
+ O(v(He), { class: "pi pi-search" }),
2246
+ O(v(me), {
2243
2247
  "model-value": e.crud.search.value,
2244
2248
  placeholder: "Buscar...",
2245
2249
  class: "w-72",
@@ -2247,12 +2251,12 @@ const Tn = { class: "w-crud" }, Ln = {
2247
2251
  }, null, 8, ["model-value", "onInput"])
2248
2252
  ]),
2249
2253
  _: 1
2250
- })) : $("", !0),
2251
- O(u.$slots, "toolbar-start"),
2252
- O(u.$slots, "toolbar-filters")
2254
+ })) : w("", !0),
2255
+ Y(u.$slots, "toolbar-start"),
2256
+ Y(u.$slots, "toolbar-filters")
2253
2257
  ]),
2254
2258
  h("div", to, [
2255
- O(u.$slots, "toolbar-actions"),
2259
+ Y(u.$slots, "toolbar-actions"),
2256
2260
  e.exportCsv ? fe((s(), A(v(ee), {
2257
2261
  key: 0,
2258
2262
  icon: "pi pi-download",
@@ -2267,29 +2271,29 @@ const Tn = { class: "w-crud" }, Ln = {
2267
2271
  void 0,
2268
2272
  { top: !0 }
2269
2273
  ]
2270
- ]) : $("", !0),
2274
+ ]) : w("", !0),
2271
2275
  e.viewToggle ? (s(), m("div", ao, [
2272
- N(v(ee), {
2276
+ O(v(ee), {
2273
2277
  icon: "pi pi-table",
2274
2278
  size: "small",
2275
2279
  text: !c("table"),
2276
2280
  outlined: c("table"),
2277
- onClick: n[10] || (n[10] = (d) => w("table"))
2281
+ onClick: n[10] || (n[10] = (d) => k("table"))
2278
2282
  }, null, 8, ["text", "outlined"]),
2279
- N(v(ee), {
2283
+ O(v(ee), {
2280
2284
  icon: "pi pi-th-large",
2281
2285
  size: "small",
2282
2286
  text: !c("cards"),
2283
2287
  outlined: c("cards"),
2284
- onClick: n[11] || (n[11] = (d) => w("cards"))
2288
+ onClick: n[11] || (n[11] = (d) => k("cards"))
2285
2289
  }, null, 8, ["text", "outlined"])
2286
- ])) : $("", !0),
2287
- !e.showHeader && U.value ? (s(), A(v(ee), {
2290
+ ])) : w("", !0),
2291
+ !e.showHeader && U.value && !e.actionRail ? (s(), A(v(ee), {
2288
2292
  key: 2,
2289
2293
  label: "Novo",
2290
2294
  icon: "pi pi-plus",
2291
2295
  onClick: n[12] || (n[12] = (d) => e.crud.openCreateDialog())
2292
- })) : $("", !0)
2296
+ })) : w("", !0)
2293
2297
  ])
2294
2298
  ]),
2295
2299
  e.crud.loading.value ? (s(), m("div", no, [...n[18] || (n[18] = [
@@ -2297,7 +2301,7 @@ const Tn = { class: "w-crud" }, Ln = {
2297
2301
  ])])) : e.crud.items.value.length ? (s(), m("div", oo, [
2298
2302
  (s(!0), m(le, null, ie(e.crud.items.value, (d, E) => (s(), m("div", {
2299
2303
  key: d[e.crud.config.pk || "id"] ?? E,
2300
- class: re(["w-crud-card", { "w-crud-card--selected": Y.value === d }]),
2304
+ class: re(["w-crud-card", { "w-crud-card--selected": N.value === d }]),
2301
2305
  onClick: (R) => B(d),
2302
2306
  onDblclick: (R) => e.crud.config.canEdit !== !1 && e.crud.openEditDialog(d),
2303
2307
  onContextmenu: (R) => oe(R, d)
@@ -2307,13 +2311,13 @@ const Tn = { class: "w-crud" }, Ln = {
2307
2311
  key: R.field,
2308
2312
  class: re(["w-crud-card-row", { "w-crud-card-row--title": G === 0 }])
2309
2313
  }, [
2310
- G !== 0 ? (s(), m("span", io, T(R.header), 1)) : $("", !0),
2314
+ G !== 0 ? (s(), m("span", io, T(R.header), 1)) : w("", !0),
2311
2315
  h("span", ro, [
2312
- O(u.$slots, `column-${R.field}`, {
2316
+ Y(u.$slots, `column-${R.field}`, {
2313
2317
  data: d,
2314
2318
  value: d[R.field]
2315
2319
  }, () => [
2316
- N(Qe, {
2320
+ O(Qe, {
2317
2321
  column: R,
2318
2322
  value: d[R.field],
2319
2323
  "row-data": d
@@ -2326,7 +2330,7 @@ const Tn = { class: "w-crud" }, Ln = {
2326
2330
  (s(!0), m(le, null, ie(Z.value, (R) => (s(), m(le, {
2327
2331
  key: R.action
2328
2332
  }, [
2329
- k(R, d) ? fe((s(), A(v(ee), {
2333
+ $(R, d) ? fe((s(), A(v(ee), {
2330
2334
  key: 0,
2331
2335
  icon: R.icon,
2332
2336
  text: "",
@@ -2342,15 +2346,15 @@ const Tn = { class: "w-crud" }, Ln = {
2342
2346
  void 0,
2343
2347
  { top: !0 }
2344
2348
  ]
2345
- ]) : $("", !0)
2349
+ ]) : w("", !0)
2346
2350
  ], 64))), 128)),
2347
- O(u.$slots, "row-actions", {
2351
+ Y(u.$slots, "row-actions", {
2348
2352
  data: d,
2349
2353
  crud: e.crud
2350
2354
  })
2351
- ])) : $("", !0)
2355
+ ])) : w("", !0)
2352
2356
  ], 42, lo))), 128))
2353
- ])) : O(u.$slots, "empty", { key: 1 }, () => [
2357
+ ])) : Y(u.$slots, "empty", { key: 1 }, () => [
2354
2358
  n[19] || (n[19] = Gt('<div class="w-crud-empty"><div class="w-crud-empty-icon"><i class="pi pi-inbox"></i></div><p class="w-crud-empty-title">Nenhum registro encontrado</p><p class="w-crud-empty-text">Tente ajustar sua busca ou crie um novo registro</p></div>', 1))
2355
2359
  ]),
2356
2360
  e.crud.items.value.length ? (s(), A(v(Jt), {
@@ -2363,7 +2367,7 @@ const Tn = { class: "w-crud" }, Ln = {
2363
2367
  "current-page-report-template": "Página {currentPage} de {totalPages}",
2364
2368
  class: "w-crud-paginator",
2365
2369
  onPage: e.crud.onPage
2366
- }, null, 8, ["rows", "total-records", "first", "onPage"])) : $("", !0)
2370
+ }, null, 8, ["rows", "total-records", "first", "onPage"])) : w("", !0)
2367
2371
  ]))
2368
2372
  ]),
2369
2373
  e.actionRail ? (s(), m("aside", co, [
@@ -2379,19 +2383,19 @@ const Tn = { class: "w-crud" }, Ln = {
2379
2383
  void 0,
2380
2384
  { left: !0 }
2381
2385
  ]
2382
- ]) : $("", !0),
2383
- U.value && Z.value.length ? (s(), m("div", fo)) : $("", !0),
2386
+ ]) : w("", !0),
2387
+ U.value && Z.value.length ? (s(), m("div", fo)) : w("", !0),
2384
2388
  (s(!0), m(le, null, ie(Z.value, (d) => (s(), m(le, {
2385
2389
  key: d.action
2386
2390
  }, [
2387
- !Y.value || k(d, Y.value) ? fe((s(), A(v(ee), {
2391
+ !N.value || $(d, N.value) ? fe((s(), A(v(ee), {
2388
2392
  key: 0,
2389
2393
  icon: d.icon,
2390
2394
  text: "",
2391
2395
  rounded: "",
2392
2396
  severity: d.severity,
2393
- disabled: !Y.value || x(d, Y.value),
2394
- onClick: (E) => Y.value && b(d, Y.value)
2397
+ disabled: !N.value || x(d, N.value),
2398
+ onClick: (E) => N.value && b(d, N.value)
2395
2399
  }, null, 8, ["icon", "severity", "disabled", "onClick"])), [
2396
2400
  [
2397
2401
  p,
@@ -2399,29 +2403,30 @@ const Tn = { class: "w-crud" }, Ln = {
2399
2403
  void 0,
2400
2404
  { left: !0 }
2401
2405
  ]
2402
- ]) : $("", !0)
2406
+ ]) : w("", !0)
2403
2407
  ], 64))), 128)),
2404
- O(u.$slots, "rail-actions", {
2405
- selected: Y.value,
2408
+ Y(u.$slots, "rail-actions", {
2409
+ selected: N.value,
2406
2410
  crud: e.crud
2407
2411
  }),
2408
- n[20] || (n[20] = h("div", { class: "w-crud-rail-sep" }, null, -1)),
2409
- fe(N(v(ee), {
2412
+ e.showPrint || e.exportCsv ? (s(), m("div", mo)) : w("", !0),
2413
+ e.showPrint ? fe((s(), A(v(ee), {
2414
+ key: 3,
2410
2415
  icon: "pi pi-print",
2411
2416
  text: "",
2412
2417
  rounded: "",
2413
- disabled: !Y.value,
2418
+ disabled: !N.value,
2414
2419
  onClick: _
2415
- }, null, 8, ["disabled"]), [
2420
+ }, null, 8, ["disabled"])), [
2416
2421
  [
2417
2422
  p,
2418
2423
  "Imprimir",
2419
2424
  void 0,
2420
2425
  { left: !0 }
2421
2426
  ]
2422
- ]),
2427
+ ]) : w("", !0),
2423
2428
  e.exportCsv ? fe((s(), A(v(ee), {
2424
- key: 2,
2429
+ key: 4,
2425
2430
  icon: "pi pi-download",
2426
2431
  text: "",
2427
2432
  rounded: "",
@@ -2434,22 +2439,22 @@ const Tn = { class: "w-crud" }, Ln = {
2434
2439
  void 0,
2435
2440
  { left: !0 }
2436
2441
  ]
2437
- ]) : $("", !0)
2438
- ])) : $("", !0)
2442
+ ]) : w("", !0)
2443
+ ])) : w("", !0)
2439
2444
  ], 2),
2440
2445
  e.contextMenu ? (s(), A(v(Zt), {
2441
2446
  key: 1,
2442
2447
  ref_key: "cm",
2443
2448
  ref: K,
2444
2449
  model: ae.value
2445
- }, null, 8, ["model"])) : $("", !0),
2446
- O(u.$slots, "form-dialog", {
2450
+ }, null, 8, ["model"])) : w("", !0),
2451
+ Y(u.$slots, "form-dialog", {
2447
2452
  crud: e.crud,
2448
2453
  dialogWidth: e.dialogWidth
2449
2454
  }, () => {
2450
2455
  var d;
2451
2456
  return [
2452
- N(ut, {
2457
+ O(ut, {
2453
2458
  visible: e.crud.dialogVisible.value,
2454
2459
  title: e.crud.dialogTitle.value,
2455
2460
  fields: e.crud.config.form,
@@ -2467,7 +2472,7 @@ const Tn = { class: "w-crud" }, Ln = {
2467
2472
  ie(e.crud.config.form, (E) => ({
2468
2473
  name: `field-${E.field}`,
2469
2474
  fn: ne((R) => [
2470
- O(u.$slots, `field-${E.field}`, lt(st(R)))
2475
+ Y(u.$slots, `field-${E.field}`, lt(st(R)))
2471
2476
  ])
2472
2477
  }))
2473
2478
  ]), 1032, ["visible", "title", "fields", "form-data", "is-editing", "saving", "disabled", "width"])
@@ -2476,7 +2481,7 @@ const Tn = { class: "w-crud" }, Ln = {
2476
2481
  ]);
2477
2482
  };
2478
2483
  }
2479
- }), po = /* @__PURE__ */ de({
2484
+ }), vo = /* @__PURE__ */ de({
2480
2485
  __name: "WStatusTag",
2481
2486
  props: {
2482
2487
  value: {},
@@ -2516,10 +2521,10 @@ const Tn = { class: "w-crud" }, Ln = {
2516
2521
  severity: o.value.severity
2517
2522
  }, null, 8, ["value", "severity"]));
2518
2523
  }
2519
- }), vo = { class: "w-page-header" }, go = { class: "w-page-header-content" }, ho = { class: "w-page-header-title" }, yo = {
2524
+ }), go = { class: "w-page-header" }, ho = { class: "w-page-header-content" }, yo = { class: "w-page-header-title" }, bo = {
2520
2525
  key: 0,
2521
2526
  class: "w-page-header-subtitle"
2522
- }, bo = { class: "w-page-header-actions" }, Zl = /* @__PURE__ */ de({
2527
+ }, wo = { class: "w-page-header-actions" }, Xl = /* @__PURE__ */ de({
2523
2528
  __name: "WPageHeader",
2524
2529
  props: {
2525
2530
  title: {},
@@ -2530,26 +2535,26 @@ const Tn = { class: "w-crud" }, Ln = {
2530
2535
  emits: ["action"],
2531
2536
  setup(e, { emit: t }) {
2532
2537
  const a = t;
2533
- return (o, l) => (s(), m("div", vo, [
2534
- h("div", go, [
2535
- h("h2", ho, T(e.title), 1),
2536
- e.subtitle ? (s(), m("p", yo, T(e.subtitle), 1)) : $("", !0)
2538
+ return (o, l) => (s(), m("div", go, [
2539
+ h("div", ho, [
2540
+ h("h2", yo, T(e.title), 1),
2541
+ e.subtitle ? (s(), m("p", bo, T(e.subtitle), 1)) : w("", !0)
2537
2542
  ]),
2538
- h("div", bo, [
2539
- O(o.$slots, "actions"),
2543
+ h("div", wo, [
2544
+ Y(o.$slots, "actions"),
2540
2545
  e.actionLabel ? (s(), A(v(ee), {
2541
2546
  key: 0,
2542
2547
  label: e.actionLabel,
2543
2548
  icon: e.actionIcon,
2544
2549
  onClick: l[0] || (l[0] = (i) => a("action"))
2545
- }, null, 8, ["label", "icon"])) : $("", !0)
2550
+ }, null, 8, ["label", "icon"])) : w("", !0)
2546
2551
  ])
2547
2552
  ]));
2548
2553
  }
2549
- }), wo = { class: "w-empty-state" }, ko = { class: "w-empty-state-icon" }, $o = { class: "w-empty-state-title" }, Co = {
2554
+ }), ko = { class: "w-empty-state" }, $o = { class: "w-empty-state-icon" }, Co = { class: "w-empty-state-title" }, Do = {
2550
2555
  key: 0,
2551
2556
  class: "w-empty-state-description"
2552
- }, Xl = /* @__PURE__ */ de({
2557
+ }, Ql = /* @__PURE__ */ de({
2553
2558
  __name: "WEmptyState",
2554
2559
  props: {
2555
2560
  icon: {},
@@ -2561,14 +2566,14 @@ const Tn = { class: "w-crud" }, Ln = {
2561
2566
  emits: ["action"],
2562
2567
  setup(e, { emit: t }) {
2563
2568
  const a = t;
2564
- return (o, l) => (s(), m("div", wo, [
2565
- h("div", ko, [
2569
+ return (o, l) => (s(), m("div", ko, [
2570
+ h("div", $o, [
2566
2571
  h("i", {
2567
2572
  class: re(e.icon)
2568
2573
  }, null, 2)
2569
2574
  ]),
2570
- h("p", $o, T(e.title), 1),
2571
- e.description ? (s(), m("p", Co, T(e.description), 1)) : $("", !0),
2575
+ h("p", Co, T(e.title), 1),
2576
+ e.description ? (s(), m("p", Do, T(e.description), 1)) : w("", !0),
2572
2577
  e.actionLabel ? (s(), A(v(ee), {
2573
2578
  key: 1,
2574
2579
  label: e.actionLabel,
@@ -2576,7 +2581,7 @@ const Tn = { class: "w-crud" }, Ln = {
2576
2581
  size: "small",
2577
2582
  class: "mt-3",
2578
2583
  onClick: l[0] || (l[0] = (i) => a("action"))
2579
- }, null, 8, ["label", "icon"])) : $("", !0)
2584
+ }, null, 8, ["label", "icon"])) : w("", !0)
2580
2585
  ]));
2581
2586
  }
2582
2587
  });
@@ -2588,7 +2593,7 @@ const Tn = { class: "w-crud" }, Ln = {
2588
2593
  Symbol(process.env.NODE_ENV !== "production" ? "navigation failure" : "");
2589
2594
  Symbol(process.env.NODE_ENV !== "production" ? "router view location matched" : "");
2590
2595
  Symbol(process.env.NODE_ENV !== "production" ? "router view depth" : "");
2591
- const Do = Symbol(process.env.NODE_ENV !== "production" ? "router" : "");
2596
+ const xo = Symbol(process.env.NODE_ENV !== "production" ? "router" : "");
2592
2597
  Symbol(process.env.NODE_ENV !== "production" ? "route location" : "");
2593
2598
  Symbol(process.env.NODE_ENV !== "production" ? "router view location" : "");
2594
2599
  /*!
@@ -2596,13 +2601,13 @@ Symbol(process.env.NODE_ENV !== "production" ? "router view location" : "");
2596
2601
  * (c) 2025 Eduardo San Martin Morote
2597
2602
  * @license MIT
2598
2603
  */
2599
- function xo() {
2600
- return Ie(Do);
2604
+ function So() {
2605
+ return Ie(xo);
2601
2606
  }
2602
- const So = { class: "w-detail-header" }, Po = { class: "w-detail-header-left" }, Vo = { class: "w-detail-header-content" }, Eo = { class: "w-detail-header-title" }, Mo = {
2607
+ const Po = { class: "w-detail-header" }, Vo = { class: "w-detail-header-left" }, Eo = { class: "w-detail-header-content" }, Mo = { class: "w-detail-header-title" }, Fo = {
2603
2608
  key: 0,
2604
2609
  class: "w-detail-header-subtitle"
2605
- }, Fo = { class: "w-detail-header-actions" }, Ql = /* @__PURE__ */ de({
2610
+ }, Ao = { class: "w-detail-header-actions" }, _l = /* @__PURE__ */ de({
2606
2611
  __name: "WDetailHeader",
2607
2612
  props: {
2608
2613
  title: {},
@@ -2614,13 +2619,13 @@ const So = { class: "w-detail-header" }, Po = { class: "w-detail-header-left" },
2614
2619
  statusMap: {}
2615
2620
  },
2616
2621
  setup(e) {
2617
- const t = e, a = xo();
2622
+ const t = e, a = So();
2618
2623
  function o() {
2619
2624
  t.backTo ? a.push(typeof t.backTo == "string" ? { name: t.backTo } : t.backTo) : t.backRoute ? a.push({ name: t.backRoute }) : a.back();
2620
2625
  }
2621
- return (l, i) => (s(), m("div", So, [
2622
- h("div", Po, [
2623
- N(v(ee), {
2626
+ return (l, i) => (s(), m("div", Po, [
2627
+ h("div", Vo, [
2628
+ O(v(ee), {
2624
2629
  icon: "pi pi-arrow-left",
2625
2630
  text: "",
2626
2631
  rounded: "",
@@ -2629,26 +2634,26 @@ const So = { class: "w-detail-header" }, Po = { class: "w-detail-header-left" },
2629
2634
  e.icon ? (s(), m("i", {
2630
2635
  key: 0,
2631
2636
  class: re([e.icon, "w-detail-header-icon"])
2632
- }, null, 2)) : $("", !0),
2633
- h("div", Vo, [
2634
- h("h2", Eo, T(e.title), 1),
2635
- e.subtitle ? (s(), m("p", Mo, T(e.subtitle), 1)) : $("", !0)
2637
+ }, null, 2)) : w("", !0),
2638
+ h("div", Eo, [
2639
+ h("h2", Mo, T(e.title), 1),
2640
+ e.subtitle ? (s(), m("p", Fo, T(e.subtitle), 1)) : w("", !0)
2636
2641
  ]),
2637
- e.status ? (s(), A(po, {
2642
+ e.status ? (s(), A(vo, {
2638
2643
  key: 1,
2639
2644
  value: e.status,
2640
2645
  map: e.statusMap
2641
- }, null, 8, ["value", "map"])) : $("", !0)
2646
+ }, null, 8, ["value", "map"])) : w("", !0)
2642
2647
  ]),
2643
- h("div", Fo, [
2644
- O(l.$slots, "actions")
2648
+ h("div", Ao, [
2649
+ Y(l.$slots, "actions")
2645
2650
  ])
2646
2651
  ]));
2647
2652
  }
2648
- }), Ao = { class: "w-info-card" }, Ro = {
2653
+ }), Ro = { class: "w-info-card" }, Io = {
2649
2654
  key: 0,
2650
2655
  class: "w-info-card-title"
2651
- }, Io = { class: "w-info-card-grid" }, To = { class: "w-info-card-label" }, Lo = { class: "w-info-card-value" }, _l = /* @__PURE__ */ de({
2656
+ }, To = { class: "w-info-card-grid" }, Lo = { class: "w-info-card-label" }, zo = { class: "w-info-card-value" }, es = /* @__PURE__ */ de({
2652
2657
  __name: "WInfoCard",
2653
2658
  props: {
2654
2659
  title: {},
@@ -2660,35 +2665,35 @@ const So = { class: "w-detail-header" }, Po = { class: "w-detail-header-left" },
2660
2665
  const r = i.value;
2661
2666
  return r == null || r === "" ? "-" : i.format === "currency" ? t(Number(r)) : i.format === "date" ? a(String(r)) : i.format === "datetime" ? a(String(r), "DD/MM/YYYY HH:mm") : i.format === "number" ? o(Number(r)) : String(r);
2662
2667
  }
2663
- return (i, r) => (s(), m("div", Ao, [
2664
- e.title ? (s(), m("h3", Ro, T(e.title), 1)) : $("", !0),
2665
- h("div", Io, [
2668
+ return (i, r) => (s(), m("div", Ro, [
2669
+ e.title ? (s(), m("h3", Io, T(e.title), 1)) : w("", !0),
2670
+ h("div", To, [
2666
2671
  (s(!0), m(le, null, ie(e.fields, (y) => (s(), m("div", {
2667
2672
  key: y.label,
2668
2673
  class: "w-info-card-field"
2669
2674
  }, [
2670
- h("span", To, T(y.label), 1),
2671
- h("span", Lo, T(l(y)), 1)
2675
+ h("span", Lo, T(y.label), 1),
2676
+ h("span", zo, T(l(y)), 1)
2672
2677
  ]))), 128))
2673
2678
  ])
2674
2679
  ]));
2675
2680
  }
2676
- }), zo = {
2681
+ }), No = {
2677
2682
  key: 0,
2678
2683
  class: "w-kpi-card__loading"
2679
- }, No = { class: "w-kpi-card__loading-content" }, Yo = { class: "w-kpi-card__header" }, Oo = {
2684
+ }, Yo = { class: "w-kpi-card__loading-content" }, Oo = { class: "w-kpi-card__header" }, Bo = {
2680
2685
  key: 0,
2681
2686
  class: "w-kpi-card__icon"
2682
- }, Bo = {
2687
+ }, Wo = {
2683
2688
  key: 1,
2684
2689
  class: "w-kpi-card__trend"
2685
- }, Wo = { class: "w-kpi-card__content" }, jo = { class: "w-kpi-card__label" }, Uo = { class: "w-kpi-card__value" }, qo = {
2690
+ }, jo = { class: "w-kpi-card__content" }, Uo = { class: "w-kpi-card__label" }, qo = { class: "w-kpi-card__value" }, Ho = {
2686
2691
  key: 0,
2687
2692
  class: "w-kpi-card__hint"
2688
- }, Ho = {
2693
+ }, Ko = {
2689
2694
  key: 0,
2690
2695
  class: "w-kpi-card__footer"
2691
- }, Ko = /* @__PURE__ */ de({
2696
+ }, Go = /* @__PURE__ */ de({
2692
2697
  __name: "WKpiCard",
2693
2698
  props: {
2694
2699
  label: {},
@@ -2703,64 +2708,64 @@ const So = { class: "w-detail-header" }, Po = { class: "w-detail-header-left" },
2703
2708
  return (t, a) => (s(), m("article", {
2704
2709
  class: re(["w-kpi-card", e.severity ? `w-kpi-card--${e.severity}` : ""])
2705
2710
  }, [
2706
- e.loading ? (s(), m("div", zo, [
2707
- N(v(Ge), {
2711
+ e.loading ? (s(), m("div", No, [
2712
+ O(v(Ge), {
2708
2713
  shape: "circle",
2709
2714
  size: "2.75rem"
2710
2715
  }),
2711
- h("div", No, [
2712
- N(v(Ge), {
2716
+ h("div", Yo, [
2717
+ O(v(Ge), {
2713
2718
  width: "6rem",
2714
2719
  height: "0.75rem"
2715
2720
  }),
2716
- N(v(Ge), {
2721
+ O(v(Ge), {
2717
2722
  width: "7.5rem",
2718
2723
  height: "1.5rem"
2719
2724
  }),
2720
- N(v(Ge), {
2725
+ O(v(Ge), {
2721
2726
  width: "5rem",
2722
2727
  height: "0.75rem"
2723
2728
  })
2724
2729
  ])
2725
2730
  ])) : (s(), m(le, { key: 1 }, [
2726
- h("div", Yo, [
2727
- e.icon || t.$slots.icon ? (s(), m("div", Oo, [
2728
- O(t.$slots, "icon", {}, () => [
2731
+ h("div", Oo, [
2732
+ e.icon || t.$slots.icon ? (s(), m("div", Bo, [
2733
+ Y(t.$slots, "icon", {}, () => [
2729
2734
  e.icon ? (s(), m("i", {
2730
2735
  key: 0,
2731
2736
  class: re(e.icon)
2732
- }, null, 2)) : $("", !0)
2737
+ }, null, 2)) : w("", !0)
2733
2738
  ])
2734
- ])) : $("", !0),
2735
- e.trend || t.$slots.trend ? (s(), m("div", Bo, [
2736
- O(t.$slots, "trend", {}, () => [
2739
+ ])) : w("", !0),
2740
+ e.trend || t.$slots.trend ? (s(), m("div", Wo, [
2741
+ Y(t.$slots, "trend", {}, () => [
2737
2742
  e.trend ? (s(), m("span", {
2738
2743
  key: 0,
2739
2744
  class: re(["w-kpi-card__trend-badge", e.trend.direction ? `w-kpi-card__trend-badge--${e.trend.direction}` : ""])
2740
- }, T(e.trend.value), 3)) : $("", !0)
2745
+ }, T(e.trend.value), 3)) : w("", !0)
2741
2746
  ])
2742
- ])) : $("", !0)
2747
+ ])) : w("", !0)
2743
2748
  ]),
2744
- h("div", Wo, [
2745
- h("p", jo, T(e.label), 1),
2746
- h("div", Uo, [
2747
- O(t.$slots, "value", {}, () => [
2749
+ h("div", jo, [
2750
+ h("p", Uo, T(e.label), 1),
2751
+ h("div", qo, [
2752
+ Y(t.$slots, "value", {}, () => [
2748
2753
  Pe(T(e.value), 1)
2749
2754
  ])
2750
2755
  ]),
2751
- e.hint || t.$slots.hint ? (s(), m("p", qo, [
2752
- O(t.$slots, "hint", {}, () => [
2756
+ e.hint || t.$slots.hint ? (s(), m("p", Ho, [
2757
+ Y(t.$slots, "hint", {}, () => [
2753
2758
  Pe(T(e.hint), 1)
2754
2759
  ])
2755
- ])) : $("", !0)
2760
+ ])) : w("", !0)
2756
2761
  ]),
2757
- t.$slots.footer ? (s(), m("footer", Ho, [
2758
- O(t.$slots, "footer")
2759
- ])) : $("", !0)
2762
+ t.$slots.footer ? (s(), m("footer", Ko, [
2763
+ Y(t.$slots, "footer")
2764
+ ])) : w("", !0)
2760
2765
  ], 64))
2761
2766
  ], 2));
2762
2767
  }
2763
- }), es = /* @__PURE__ */ de({
2768
+ }), ts = /* @__PURE__ */ de({
2764
2769
  __name: "WKpiGrid",
2765
2770
  props: {
2766
2771
  items: { default: () => [] },
@@ -2775,11 +2780,11 @@ const So = { class: "w-detail-header" }, Po = { class: "w-detail-header-left" },
2775
2780
  return (o, l) => (s(), m("div", {
2776
2781
  class: re(["w-kpi-grid", a.value])
2777
2782
  }, [
2778
- o.$slots.item ? (s(!0), m(le, { key: 0 }, ie(e.items, (i, r) => O(o.$slots, "item", {
2783
+ o.$slots.item ? (s(!0), m(le, { key: 0 }, ie(e.items, (i, r) => Y(o.$slots, "item", {
2779
2784
  key: r,
2780
2785
  item: i,
2781
2786
  index: r
2782
- })), 128)) : (s(!0), m(le, { key: 1 }, ie(e.items, (i, r) => (s(), A(Ko, {
2787
+ })), 128)) : (s(!0), m(le, { key: 1 }, ie(e.items, (i, r) => (s(), A(Go, {
2783
2788
  key: r,
2784
2789
  label: i.label,
2785
2790
  value: i.value,
@@ -2791,16 +2796,16 @@ const So = { class: "w-detail-header" }, Po = { class: "w-detail-header-left" },
2791
2796
  }, null, 8, ["label", "value", "icon", "severity", "hint", "trend", "loading"]))), 128))
2792
2797
  ], 2));
2793
2798
  }
2794
- }), Go = { class: "w-section-header__main" }, Jo = {
2799
+ }), Jo = { class: "w-section-header__main" }, Zo = {
2795
2800
  key: 0,
2796
2801
  class: "w-section-header__icon"
2797
- }, Zo = { class: "w-section-header__content" }, Xo = { class: "w-section-header__title-row" }, Qo = { class: "w-section-header__title" }, _o = {
2802
+ }, Xo = { class: "w-section-header__content" }, Qo = { class: "w-section-header__title-row" }, _o = { class: "w-section-header__title" }, el = {
2798
2803
  key: 0,
2799
2804
  class: "w-section-header__subtitle"
2800
- }, el = {
2805
+ }, tl = {
2801
2806
  key: 0,
2802
2807
  class: "w-section-header__actions"
2803
- }, ts = /* @__PURE__ */ de({
2808
+ }, as = /* @__PURE__ */ de({
2804
2809
  __name: "WSectionHeader",
2805
2810
  props: {
2806
2811
  title: {},
@@ -2812,38 +2817,38 @@ const So = { class: "w-detail-header" }, Po = { class: "w-detail-header-left" },
2812
2817
  return (t, a) => (s(), m("div", {
2813
2818
  class: re(["w-section-header", { "w-section-header--compact": e.compact }])
2814
2819
  }, [
2815
- h("div", Go, [
2816
- e.icon || t.$slots.icon ? (s(), m("div", Jo, [
2817
- O(t.$slots, "icon", {}, () => [
2820
+ h("div", Jo, [
2821
+ e.icon || t.$slots.icon ? (s(), m("div", Zo, [
2822
+ Y(t.$slots, "icon", {}, () => [
2818
2823
  e.icon ? (s(), m("i", {
2819
2824
  key: 0,
2820
2825
  class: re(e.icon)
2821
- }, null, 2)) : $("", !0)
2826
+ }, null, 2)) : w("", !0)
2822
2827
  ])
2823
- ])) : $("", !0),
2824
- h("div", Zo, [
2825
- h("div", Xo, [
2826
- h("h3", Qo, T(e.title), 1),
2827
- O(t.$slots, "meta")
2828
+ ])) : w("", !0),
2829
+ h("div", Xo, [
2830
+ h("div", Qo, [
2831
+ h("h3", _o, T(e.title), 1),
2832
+ Y(t.$slots, "meta")
2828
2833
  ]),
2829
- e.subtitle ? (s(), m("p", _o, T(e.subtitle), 1)) : $("", !0)
2834
+ e.subtitle ? (s(), m("p", el, T(e.subtitle), 1)) : w("", !0)
2830
2835
  ])
2831
2836
  ]),
2832
- t.$slots.actions ? (s(), m("div", el, [
2833
- O(t.$slots, "actions")
2834
- ])) : $("", !0)
2837
+ t.$slots.actions ? (s(), m("div", tl, [
2838
+ Y(t.$slots, "actions")
2839
+ ])) : w("", !0)
2835
2840
  ], 2));
2836
2841
  }
2837
- }), tl = {
2842
+ }), al = {
2838
2843
  key: 0,
2839
2844
  class: "w-form-section__header"
2840
- }, al = { class: "w-form-section__content" }, nl = { class: "w-form-section__title" }, ol = {
2845
+ }, nl = { class: "w-form-section__content" }, ol = { class: "w-form-section__title" }, ll = {
2841
2846
  key: 0,
2842
2847
  class: "w-form-section__description"
2843
- }, ll = {
2848
+ }, sl = {
2844
2849
  key: 0,
2845
2850
  class: "w-form-section__actions"
2846
- }, sl = { class: "w-form-section__body" }, as = /* @__PURE__ */ de({
2851
+ }, il = { class: "w-form-section__body" }, ns = /* @__PURE__ */ de({
2847
2852
  __name: "WFormSection",
2848
2853
  props: {
2849
2854
  title: {},
@@ -2854,30 +2859,30 @@ const So = { class: "w-detail-header" }, Po = { class: "w-detail-header-left" },
2854
2859
  return (t, a) => (s(), m("section", {
2855
2860
  class: re(["w-form-section", e.variant ? `w-form-section--${e.variant}` : ""])
2856
2861
  }, [
2857
- e.title || e.description || t.$slots.actions ? (s(), m("div", tl, [
2858
- h("div", al, [
2859
- h("h3", nl, T(e.title), 1),
2860
- e.description ? (s(), m("p", ol, T(e.description), 1)) : $("", !0)
2862
+ e.title || e.description || t.$slots.actions ? (s(), m("div", al, [
2863
+ h("div", nl, [
2864
+ h("h3", ol, T(e.title), 1),
2865
+ e.description ? (s(), m("p", ll, T(e.description), 1)) : w("", !0)
2861
2866
  ]),
2862
- t.$slots.actions ? (s(), m("div", ll, [
2863
- O(t.$slots, "actions")
2864
- ])) : $("", !0)
2865
- ])) : $("", !0),
2866
- h("div", sl, [
2867
- O(t.$slots, "default")
2867
+ t.$slots.actions ? (s(), m("div", sl, [
2868
+ Y(t.$slots, "actions")
2869
+ ])) : w("", !0)
2870
+ ])) : w("", !0),
2871
+ h("div", il, [
2872
+ Y(t.$slots, "default")
2868
2873
  ])
2869
2874
  ], 2));
2870
2875
  }
2871
- }), il = {
2876
+ }), rl = {
2872
2877
  key: 0,
2873
2878
  class: "w-action-bar__primary"
2874
- }, rl = {
2879
+ }, ul = {
2875
2880
  key: 1,
2876
2881
  class: "w-action-bar__filters"
2877
- }, ul = {
2882
+ }, dl = {
2878
2883
  key: 2,
2879
2884
  class: "w-action-bar__secondary"
2880
- }, ns = /* @__PURE__ */ de({
2885
+ }, os = /* @__PURE__ */ de({
2881
2886
  __name: "WActionBar",
2882
2887
  props: {
2883
2888
  align: { default: "between" },
@@ -2890,23 +2895,23 @@ const So = { class: "w-detail-header" }, Po = { class: "w-detail-header-left" },
2890
2895
  { "w-action-bar--stack": e.stackOnMobile }
2891
2896
  ]])
2892
2897
  }, [
2893
- t.$slots.primary || t.$slots.default ? (s(), m("div", il, [
2894
- O(t.$slots, "primary", {}, () => [
2895
- O(t.$slots, "default")
2898
+ t.$slots.primary || t.$slots.default ? (s(), m("div", rl, [
2899
+ Y(t.$slots, "primary", {}, () => [
2900
+ Y(t.$slots, "default")
2896
2901
  ])
2897
- ])) : $("", !0),
2898
- t.$slots.filters ? (s(), m("div", rl, [
2899
- O(t.$slots, "filters")
2900
- ])) : $("", !0),
2901
- t.$slots.secondary ? (s(), m("div", ul, [
2902
- O(t.$slots, "secondary")
2903
- ])) : $("", !0)
2902
+ ])) : w("", !0),
2903
+ t.$slots.filters ? (s(), m("div", ul, [
2904
+ Y(t.$slots, "filters")
2905
+ ])) : w("", !0),
2906
+ t.$slots.secondary ? (s(), m("div", dl, [
2907
+ Y(t.$slots, "secondary")
2908
+ ])) : w("", !0)
2904
2909
  ], 2));
2905
2910
  }
2906
- }), dl = { class: "w-progress-flow__marker" }, cl = { class: "w-progress-flow__content" }, fl = { class: "w-progress-flow__label" }, ml = {
2911
+ }), cl = { class: "w-progress-flow__marker" }, fl = { class: "w-progress-flow__content" }, ml = { class: "w-progress-flow__label" }, pl = {
2907
2912
  key: 0,
2908
2913
  class: "w-progress-flow__description"
2909
- }, os = /* @__PURE__ */ de({
2914
+ }, ls = /* @__PURE__ */ de({
2910
2915
  __name: "WProgressFlow",
2911
2916
  props: {
2912
2917
  steps: {},
@@ -2927,24 +2932,24 @@ const So = { class: "w-detail-header" }, Po = { class: "w-detail-header-left" },
2927
2932
  key: r.key,
2928
2933
  class: re(["w-progress-flow__step", `w-progress-flow__step--${o(y)}`])
2929
2934
  }, [
2930
- O(l.$slots, "step", {
2935
+ Y(l.$slots, "step", {
2931
2936
  step: r,
2932
2937
  index: y,
2933
2938
  state: o(y)
2934
2939
  }, () => [
2935
- h("div", dl, [
2940
+ h("div", cl, [
2936
2941
  h("span", null, T(y + 1), 1)
2937
2942
  ]),
2938
- h("div", cl, [
2939
- h("p", fl, T(r.label), 1),
2940
- r.description ? (s(), m("p", ml, T(r.description), 1)) : $("", !0)
2943
+ h("div", fl, [
2944
+ h("p", ml, T(r.label), 1),
2945
+ r.description ? (s(), m("p", pl, T(r.description), 1)) : w("", !0)
2941
2946
  ])
2942
2947
  ])
2943
2948
  ], 2))), 128))
2944
2949
  ], 2));
2945
2950
  }
2946
2951
  });
2947
- function pl(e, t, a) {
2952
+ function vl(e, t, a) {
2948
2953
  const o = e;
2949
2954
  return Array.isArray(o.results) ? {
2950
2955
  data: o.results,
@@ -2966,11 +2971,11 @@ function pl(e, t, a) {
2966
2971
  extras: {}
2967
2972
  };
2968
2973
  }
2969
- function vl(e) {
2974
+ function gl(e) {
2970
2975
  return {
2971
2976
  async list(t, a = {}) {
2972
2977
  const o = await e.get(t, { params: a });
2973
- return pl(
2978
+ return vl(
2974
2979
  o.data,
2975
2980
  Number(a.page ?? 1),
2976
2981
  Number(a.page_size ?? 20)
@@ -2994,13 +2999,13 @@ function vl(e) {
2994
2999
  }
2995
3000
  };
2996
3001
  }
2997
- const ls = {
3002
+ const ss = {
2998
3003
  install(e, t) {
2999
3004
  if (!(t != null && t.axios) && !(t != null && t.dataProvider))
3000
3005
  throw new Error(
3001
3006
  '[wPrimeVueComponents] Informe "axios" ou "dataProvider" ao registrar o WPrimeVuePlugin.'
3002
3007
  );
3003
- const a = t.dataProvider ?? vl(t.axios), o = {
3008
+ const a = t.dataProvider ?? gl(t.axios), o = {
3004
3009
  axios: t.axios,
3005
3010
  dataProvider: a,
3006
3011
  defaultPageSize: t.defaultPageSize ?? 20,
@@ -3009,9 +3014,9 @@ const ls = {
3009
3014
  locale: t.locale ?? "pt-BR",
3010
3015
  currency: t.currency ?? "BRL"
3011
3016
  };
3012
- t.axios && e.provide(la, t.axios), e.provide(_e, a), e.provide(et, o), t.registerComponents !== !1 && (e.component("WCrudView", mo), e.component("WCrudFormDialog", ut), e.component("WCrudColumnRenderer", Qe), e.component("WAutoCompleteFK", Lt), e.component("WMoneyInput", zt), e.component("WTransferList", Nt));
3017
+ t.axios && e.provide(la, t.axios), e.provide(_e, a), e.provide(et, o), t.registerComponents !== !1 && (e.component("WCrudView", po), e.component("WCrudFormDialog", ut), e.component("WCrudColumnRenderer", Qe), e.component("WAutoCompleteFK", Lt), e.component("WMoneyInput", zt), e.component("WTransferList", Nt));
3013
3018
  }
3014
- }, gl = {
3019
+ }, hl = {
3015
3020
  createTitle: "Novo Registro",
3016
3021
  editTitle: "Editar Registro",
3017
3022
  createButton: "Novo",
@@ -3026,13 +3031,13 @@ const ls = {
3026
3031
  successUpdate: "Registro atualizado com sucesso",
3027
3032
  successDelete: "Registro excluído com sucesso"
3028
3033
  };
3029
- function hl(e, t) {
3034
+ function yl(e, t) {
3030
3035
  const a = {};
3031
3036
  for (const o of Object.keys(t))
3032
3037
  JSON.stringify(e[o]) !== JSON.stringify(t[o]) && (a[o] = t[o]);
3033
3038
  return a;
3034
3039
  }
3035
- function ss(e) {
3040
+ function is(e) {
3036
3041
  const {
3037
3042
  endpoint: t,
3038
3043
  columns: a,
@@ -3042,7 +3047,7 @@ function ss(e) {
3042
3047
  partialUpdate: r = !0,
3043
3048
  refetchOnSave: y = !0,
3044
3049
  canCreate: c = !0,
3045
- canEdit: w = !0,
3050
+ canEdit: k = !0,
3046
3051
  canDelete: F = !0,
3047
3052
  rowActions: V = void 0,
3048
3053
  filterParams: W = void 0,
@@ -3055,7 +3060,7 @@ function ss(e) {
3055
3060
  throw new Error(
3056
3061
  "[wPrimeVueComponents] dataProvider não encontrado. Registre o WPrimeVuePlugin antes de usar useCrudManager."
3057
3062
  );
3058
- const k = b, x = Ie(et), j = e.pageSize ?? (x == null ? void 0 : x.defaultPageSize) ?? 20, U = { ...gl, ...e.labels }, Y = It(), { confirmDelete: K } = Tt(), B = q([]), X = q({}), oe = q(!1), ae = q(!1), _ = q(""), f = q(!1), P = q(!1), u = q(null), n = ge({});
3063
+ const $ = b, x = Ie(et), j = e.pageSize ?? (x == null ? void 0 : x.defaultPageSize) ?? 20, U = { ...hl, ...e.labels }, N = It(), { confirmDelete: K } = Tt(), B = q([]), X = q({}), oe = q(!1), ae = q(!1), _ = q(""), f = q(!1), P = q(!1), u = q(null), n = ge({});
3059
3064
  let p = null;
3060
3065
  const d = ge({
3061
3066
  page: 1,
@@ -3090,7 +3095,7 @@ function ss(e) {
3090
3095
  ...D
3091
3096
  };
3092
3097
  _.value && (M.search = _.value), E.field && E.order !== 0 && (M.ordering = E.order === -1 ? `-${E.field}` : E.field), W && Object.assign(M, W());
3093
- const I = await k.list(t, M);
3098
+ const I = await $.list(t, M);
3094
3099
  B.value = I.data, d.rows = I.rows, X.value = I.extras ?? {}, I.page && (d.page = I.page), I.page_size && (d.pageSize = I.page_size), d.totalPages = Math.ceil(d.rows / d.pageSize) || 0;
3095
3100
  } finally {
3096
3101
  oe.value = !1;
@@ -3109,7 +3114,7 @@ function ss(e) {
3109
3114
  let Q = 1;
3110
3115
  const Le = 1e4;
3111
3116
  for (; Q <= Le; ) {
3112
- const be = await k.list(t, {
3117
+ const be = await $.list(t, {
3113
3118
  ...M,
3114
3119
  page: Q,
3115
3120
  page_size: D
@@ -3206,12 +3211,12 @@ function ss(e) {
3206
3211
  if (D.validate) {
3207
3212
  const M = D.validate(n[D.field]);
3208
3213
  if (M)
3209
- return Y.error(M), null;
3214
+ return N.error(M), null;
3210
3215
  }
3211
3216
  if (D.required) {
3212
3217
  const M = n[D.field];
3213
3218
  if (M == null || M === "")
3214
- return Y.error(`${D.label} é obrigatório`), null;
3219
+ return N.error(`${D.label} é obrigatório`), null;
3215
3220
  }
3216
3221
  }
3217
3222
  ae.value = !0;
@@ -3219,7 +3224,7 @@ function ss(e) {
3219
3224
  let D = dt(n);
3220
3225
  if (!se.value && L && Object.assign(D, L()), se.value && r && p) {
3221
3226
  const he = dt(p);
3222
- if (D = hl(he, D), Object.keys(D).length === 0 && !J) {
3227
+ if (D = yl(he, D), Object.keys(D).length === 0 && !J) {
3223
3228
  f.value = !1;
3224
3229
  const Se = u.value;
3225
3230
  return u.value = null, p = null, Se;
@@ -3249,7 +3254,7 @@ function ss(e) {
3249
3254
  let be;
3250
3255
  if (se.value && u.value) {
3251
3256
  const he = u.value[l];
3252
- if (be = await k.update(
3257
+ if (be = await $.update(
3253
3258
  t,
3254
3259
  he,
3255
3260
  I,
@@ -3260,12 +3265,12 @@ function ss(e) {
3260
3265
  );
3261
3266
  Se !== -1 && (B.value[Se] = be.data);
3262
3267
  }
3263
- Y.success(U.successUpdate);
3268
+ N.success(U.successUpdate);
3264
3269
  } else
3265
- be = await k.create(t, I, Le), y || (B.value.unshift(be.data), d.rows++), Y.success(U.successCreate);
3270
+ be = await $.create(t, I, Le), y || (B.value.unshift(be.data), d.rows++), N.success(U.successCreate);
3266
3271
  return f.value = !1, u.value = null, p = null, y && await ue(), Z && Z(be.data, se.value), be.data;
3267
3272
  } catch (D) {
3268
- return Y.error(Ke(D, "Erro ao salvar registro")), null;
3273
+ return N.error(Ke(D, "Erro ao salvar registro")), null;
3269
3274
  } finally {
3270
3275
  ae.value = !1;
3271
3276
  }
@@ -3274,11 +3279,11 @@ function ss(e) {
3274
3279
  K(async () => {
3275
3280
  try {
3276
3281
  const M = D[l];
3277
- await k.delete(t, M);
3282
+ await $.delete(t, M);
3278
3283
  const I = B.value.findIndex((Q) => Q[l] === M);
3279
- I !== -1 && (B.value.splice(I, 1), d.rows--), Y.success(U.successDelete), g && g(D);
3284
+ I !== -1 && (B.value.splice(I, 1), d.rows--), N.success(U.successDelete), g && g(D);
3280
3285
  } catch (M) {
3281
- Y.error(Ke(M, "Erro ao excluir registro"));
3286
+ N.error(Ke(M, "Erro ao excluir registro"));
3282
3287
  }
3283
3288
  }, U.deleteConfirmMessage);
3284
3289
  }
@@ -3321,13 +3326,13 @@ function ss(e) {
3321
3326
  config: e
3322
3327
  };
3323
3328
  }
3324
- function is(e) {
3329
+ function rs(e) {
3325
3330
  const { endpoint: t, searchDebounce: a = 300, immediate: o = !1 } = e, l = Ie(_e);
3326
3331
  if (!l)
3327
3332
  throw new Error(
3328
3333
  "[wPrimeVueComponents] dataProvider não encontrado. Registre o WPrimeVuePlugin antes de usar useApi."
3329
3334
  );
3330
- const i = l, r = Ie(et), y = e.pageSize ?? (r == null ? void 0 : r.defaultPageSize) ?? 20, c = q([]), w = q(!1), F = q(""), V = q({}), W = ge({}), L = ge({
3335
+ const i = l, r = Ie(et), y = e.pageSize ?? (r == null ? void 0 : r.defaultPageSize) ?? 20, c = q([]), k = q(!1), F = q(""), V = q({}), W = ge({}), L = ge({
3331
3336
  page: 1,
3332
3337
  pageSize: y,
3333
3338
  rows: 0,
@@ -3338,7 +3343,7 @@ function is(e) {
3338
3343
  });
3339
3344
  let Z = null;
3340
3345
  async function g(K = {}) {
3341
- w.value = !0;
3346
+ k.value = !0;
3342
3347
  try {
3343
3348
  const B = {
3344
3349
  page: L.page,
@@ -3351,13 +3356,13 @@ function is(e) {
3351
3356
  const X = await i.list(t, B);
3352
3357
  c.value = X.data, L.rows = X.rows, X.page && (L.page = X.page), X.page_size && (L.pageSize = X.page_size), L.totalPages = Math.ceil(L.rows / L.pageSize) || 0, V.value = X.extras ?? {};
3353
3358
  } finally {
3354
- w.value = !1;
3359
+ k.value = !1;
3355
3360
  }
3356
3361
  }
3357
3362
  async function b() {
3358
3363
  await g();
3359
3364
  }
3360
- function k(K) {
3365
+ function $(K) {
3361
3366
  F.value = K, Z && clearTimeout(Z), Z = setTimeout(() => {
3362
3367
  L.page = 1, g();
3363
3368
  }, a);
@@ -3373,29 +3378,29 @@ function is(e) {
3373
3378
  function U(K) {
3374
3379
  L.page = K.page + 1, L.pageSize = K.rows, g();
3375
3380
  }
3376
- function Y(K) {
3381
+ function N(K) {
3377
3382
  J.field = K.sortField ?? null, J.order = K.sortOrder ?? 0, L.page = 1, g();
3378
3383
  }
3379
3384
  return o && g(), {
3380
3385
  items: c,
3381
- loading: w,
3386
+ loading: k,
3382
3387
  search: F,
3383
3388
  pagination: L,
3384
3389
  sort: J,
3385
3390
  extras: V,
3386
3391
  fetchItems: g,
3387
3392
  refresh: b,
3388
- setSearch: k,
3393
+ setSearch: $,
3389
3394
  setFilter: x,
3390
3395
  clearFilters: j,
3391
3396
  onPage: U,
3392
- onSort: Y
3397
+ onSort: N
3393
3398
  };
3394
3399
  }
3395
- function yl(e) {
3400
+ function bl(e) {
3396
3401
  return e.split("?")[0].replace(/^\/+|\/+$/g, "").replace(/^api\/v\d+\//, "");
3397
3402
  }
3398
- function bl(e) {
3403
+ function wl(e) {
3399
3404
  return typeof e == "string" ? { table: e } : e;
3400
3405
  }
3401
3406
  function Yt(e, t = 400) {
@@ -3429,9 +3434,9 @@ function Be(e) {
3429
3434
  }
3430
3435
  function We(e, t) {
3431
3436
  var l, i;
3432
- const a = yl(e), o = (l = t.resources) == null ? void 0 : l[a];
3437
+ const a = bl(e), o = (l = t.resources) == null ? void 0 : l[a];
3433
3438
  if (o)
3434
- return bl(o);
3439
+ return wl(o);
3435
3440
  if ((i = t.allowedTables) != null && i.includes(a))
3436
3441
  return { table: a };
3437
3442
  throw Yt(
@@ -3439,26 +3444,26 @@ function We(e, t) {
3439
3444
  404
3440
3445
  );
3441
3446
  }
3442
- function wl(e, t, a) {
3447
+ function kl(e, t, a) {
3443
3448
  const o = /* @__PURE__ */ new Set(["page", "page_size", "search", "ordering"]), l = { ...a.defaultFilters, ...t };
3444
3449
  for (const [i, r] of Object.entries(l))
3445
3450
  o.has(i) || r === null || r === void 0 || r === "" || (e = e.eq(i, r));
3446
3451
  return e;
3447
3452
  }
3448
- function kl(e, t, a) {
3453
+ function $l(e, t, a) {
3449
3454
  if (typeof t != "string" || !t.trim() || !(a != null && a.length))
3450
3455
  return e;
3451
3456
  const o = t.trim().replace(/,/g, "\\,"), l = a.map((i) => `${i}.ilike.%${o}%`).join(",");
3452
3457
  return e.or(l);
3453
3458
  }
3454
- function $l(e, t) {
3459
+ function Cl(e, t) {
3455
3460
  const a = typeof e == "string" && e ? e : t;
3456
3461
  return a ? {
3457
3462
  field: a.startsWith("-") ? a.slice(1) : a,
3458
3463
  ascending: !a.startsWith("-")
3459
3464
  } : null;
3460
3465
  }
3461
- function Cl(e, t) {
3466
+ function Dl(e, t) {
3462
3467
  return e ? t.mapListItem ? e.map(
3463
3468
  (a) => {
3464
3469
  var o;
@@ -3466,19 +3471,19 @@ function Cl(e, t) {
3466
3471
  }
3467
3472
  ) : e : [];
3468
3473
  }
3469
- function rs(e) {
3474
+ function us(e) {
3470
3475
  const t = e.defaultSelect ?? "*";
3471
3476
  return {
3472
3477
  async list(a, o = {}) {
3473
3478
  var W;
3474
3479
  const l = We(a, e), i = Math.max(Number(o.page ?? 1), 1), r = Math.max(Number(o.page_size ?? 20), 1), y = (i - 1) * r, c = y + r - 1;
3475
- let w = e.client.from(l.table).select(l.select ?? t, { count: "exact" });
3476
- w = wl(w, o, l), w = kl(w, o.search, l.searchFields);
3477
- const F = $l(o.ordering, l.defaultOrdering);
3478
- F && (w = w.order(F.field, { ascending: F.ascending }));
3479
- const V = await w.range(y, c);
3480
+ let k = e.client.from(l.table).select(l.select ?? t, { count: "exact" });
3481
+ k = kl(k, o, l), k = $l(k, o.search, l.searchFields);
3482
+ const F = Cl(o.ordering, l.defaultOrdering);
3483
+ F && (k = k.order(F.field, { ascending: F.ascending }));
3484
+ const V = await k.range(y, c);
3480
3485
  return V.error && Be(V.error), {
3481
- data: Cl(V.data, l),
3486
+ data: Dl(V.data, l),
3482
3487
  page: i,
3483
3488
  page_size: r,
3484
3489
  rows: V.count ?? ((W = V.data) == null ? void 0 : W.length) ?? 0,
@@ -3494,7 +3499,7 @@ function rs(e) {
3494
3499
  return c.error && Be(c.error), { data: c.data };
3495
3500
  },
3496
3501
  async update(a, o, l, i) {
3497
- const r = We(a, e), y = r.pk ?? "id", c = wt(l), w = r.mapPayload ? r.mapPayload(c, "update") : c, F = await e.client.from(r.table).update(w).eq(y, o).select(r.select ?? t).single();
3502
+ const r = We(a, e), y = r.pk ?? "id", c = wt(l), k = r.mapPayload ? r.mapPayload(c, "update") : c, F = await e.client.from(r.table).update(k).eq(y, o).select(r.select ?? t).single();
3498
3503
  return F.error && Be(F.error), { data: F.data };
3499
3504
  },
3500
3505
  async delete(a, o) {
@@ -3504,31 +3509,31 @@ function rs(e) {
3504
3509
  };
3505
3510
  }
3506
3511
  export {
3507
- gl as DEFAULT_CRUD_LABELS,
3508
- ns as WActionBar,
3512
+ hl as DEFAULT_CRUD_LABELS,
3513
+ os as WActionBar,
3509
3514
  Lt as WAutoCompleteFK,
3510
3515
  Qe as WCrudColumnRenderer,
3511
3516
  ut as WCrudFormDialog,
3512
- mo as WCrudView,
3513
- Ql as WDetailHeader,
3514
- Xl as WEmptyState,
3517
+ po as WCrudView,
3518
+ _l as WDetailHeader,
3519
+ Ql as WEmptyState,
3515
3520
  Mn as WFormRenderer,
3516
- as as WFormSection,
3517
- _l as WInfoCard,
3518
- Ko as WKpiCard,
3519
- es as WKpiGrid,
3521
+ ns as WFormSection,
3522
+ es as WInfoCard,
3523
+ Go as WKpiCard,
3524
+ ts as WKpiGrid,
3520
3525
  zt as WMoneyInput,
3521
- Zl as WPageHeader,
3522
- ls as WPrimeVuePlugin,
3523
- os as WProgressFlow,
3524
- ts as WSectionHeader,
3525
- po as WStatusTag,
3526
+ Xl as WPageHeader,
3527
+ ss as WPrimeVuePlugin,
3528
+ ls as WProgressFlow,
3529
+ as as WSectionHeader,
3530
+ vo as WStatusTag,
3526
3531
  Nt as WTransferList,
3527
3532
  la as W_AXIOS_KEY,
3528
3533
  et as W_CONFIG_KEY,
3529
3534
  _e as W_DATA_PROVIDER_KEY,
3530
- vl as createAxiosDataProvider,
3531
- rs as createSupabaseDataProvider,
3535
+ gl as createAxiosDataProvider,
3536
+ us as createSupabaseDataProvider,
3532
3537
  In as downloadCsv,
3533
3538
  Ke as extractApiError,
3534
3539
  za as mapApiFieldToColumnDef,
@@ -3536,11 +3541,11 @@ export {
3536
3541
  Na as mapApiFieldsToColumnDefs,
3537
3542
  Ta as mapApiFieldsToFieldDefs,
3538
3543
  Rn as toCsv,
3539
- is as useApi,
3540
- Jl as useApiError,
3544
+ rs as useApi,
3545
+ Zl as useApiError,
3541
3546
  Tt as useAppConfirm,
3542
3547
  It as useAppToast,
3543
- ss as useCrudManager,
3548
+ is as useCrudManager,
3544
3549
  rt as useFormatters
3545
3550
  };
3546
3551
  //# sourceMappingURL=index.js.map