@wgalleti/primevue-components 0.8.2 → 0.8.3

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,49 +1,49 @@
1
- import { defineComponent as oe, openBlock as o, createElementBlock as u, createBlock as $, unref as r, toDisplayString as F, inject as rt, ref as L, computed as P, watch as Me, reactive as Pe, resolveDirective as ut, Fragment as X, createElementVNode as m, mergeProps as St, createVNode as V, withDirectives as me, withCtx as Y, createCommentVNode as g, renderList as le, normalizeStyle as ge, createTextVNode as Fe, nextTick as et, onMounted as dt, normalizeClass as ee, onBeforeUnmount as Dt, renderSlot as A, isRef as Et, withModifiers as Pt, createSlots as je, normalizeProps as Ye, guardReactiveProps as Je, useSlots as Ft, createStaticVNode as It } from "vue";
1
+ import { defineComponent as ie, openBlock as o, createElementBlock as d, createBlock as $, unref as r, toDisplayString as F, inject as ut, ref as T, onMounted as _e, nextTick as Ge, computed as P, watch as Me, reactive as Pe, resolveDirective as dt, Fragment as X, createElementVNode as m, mergeProps as Dt, createVNode as V, withDirectives as me, withCtx as J, createCommentVNode as g, renderList as le, normalizeStyle as ge, createTextVNode as Fe, normalizeClass as ee, onBeforeUnmount as Et, renderSlot as A, isRef as Pt, withModifiers as Ft, createSlots as je, normalizeProps as Je, guardReactiveProps as Xe, useSlots as It, createStaticVNode as Rt } from "vue";
2
2
  import ct from "primevue/datatable";
3
- import Ie from "primevue/column";
4
- import O from "primevue/button";
3
+ import Re from "primevue/column";
4
+ import W from "primevue/button";
5
5
  import fe from "primevue/inputtext";
6
6
  import Ke from "primevue/inputnumber";
7
- import Xe from "primevue/select";
7
+ import Ze from "primevue/select";
8
8
  import mt from "primevue/popover";
9
9
  import Mt from "primevue/checkbox";
10
10
  import Be from "primevue/iconfield";
11
11
  import Te from "primevue/inputicon";
12
- import Rt from "primevue/paginator";
13
- import At from "primevue/contextmenu";
12
+ import At from "primevue/paginator";
13
+ import Ut from "primevue/contextmenu";
14
14
  import ft from "primevue/tag";
15
- import { f as Qe, b as Ut, a as Bt, e as tt, c as Tt, d as Nt } from "./useFormKeyboardNav-D4Irq5RE.js";
16
- import _e from "primevue/dialog";
17
- import Lt from "primevue/textarea";
15
+ import { f as et, b as Bt, a as Tt, e as lt, c as Nt, d as Lt } from "./useFormKeyboardNav-D4Irq5RE.js";
16
+ import tt from "primevue/dialog";
17
+ import zt from "primevue/textarea";
18
18
  import vt from "primevue/autocomplete";
19
- import zt from "primevue/toggleswitch";
20
- import Ot from "primevue/colorpicker";
21
- import Wt from "primevue/password";
22
- import { W as jt } from "./plugin-BKa0eSEM.js";
19
+ import Ot from "primevue/toggleswitch";
20
+ import Wt from "primevue/colorpicker";
21
+ import jt from "primevue/password";
22
+ import { W as qt } from "./plugin-BKa0eSEM.js";
23
23
  import pt from "primevue/datepicker";
24
- import qt from "primevue/inputgroup";
25
- import lt from "primevue/inputgroupaddon";
26
- import Kt from "primevue/slider";
24
+ import Kt from "primevue/inputgroup";
25
+ import at from "primevue/inputgroupaddon";
26
+ import Ht from "primevue/slider";
27
27
  import ze from "primevue/skeleton";
28
- const Ht = {
28
+ const Gt = {
29
29
  key: 0,
30
30
  class: "text-muted-color text-xs"
31
- }, Gt = ["src", "alt"], Yt = {
31
+ }, Yt = ["src", "alt"], Jt = {
32
32
  key: 3,
33
33
  class: "text-muted-color tabular-nums text-[0.8125rem]"
34
- }, Jt = {
34
+ }, Xt = {
35
35
  key: 4,
36
36
  class: "text-muted-color tabular-nums text-[0.8125rem]"
37
- }, Xt = {
37
+ }, Zt = {
38
38
  key: 5,
39
39
  class: "font-semibold tabular-nums text-[0.8125rem]"
40
- }, Zt = {
40
+ }, Qt = {
41
41
  key: 6,
42
42
  class: "font-semibold tabular-nums text-[0.8125rem]"
43
- }, Qt = {
43
+ }, _t = {
44
44
  key: 7,
45
45
  class: "text-[0.8125rem]"
46
- }, Ze = /* @__PURE__ */ oe({
46
+ }, Qe = /* @__PURE__ */ ie({
47
47
  __name: "WCrudColumnRenderer",
48
48
  props: {
49
49
  column: {},
@@ -51,51 +51,51 @@ const Ht = {
51
51
  rowData: {}
52
52
  },
53
53
  setup(e) {
54
- const { formatDate: a, formatDateTime: t, formatCurrency: n, formatNumber: i } = Qe();
55
- return (f, w) => e.value == null ? (o(), u("span", Ht, "—")) : e.column.type === "image" ? (o(), u("img", {
54
+ const { formatDate: a, formatDateTime: t, formatCurrency: n, formatNumber: i } = et();
55
+ return (f, w) => e.value == null ? (o(), d("span", Gt, "—")) : e.column.type === "image" ? (o(), d("img", {
56
56
  key: 1,
57
57
  src: String(e.value),
58
58
  alt: e.column.header,
59
59
  class: "size-9 rounded-lg object-cover ring-1 ring-surface-200 dark:ring-surface-700"
60
- }, null, 8, Gt)) : e.column.type === "boolean" ? (o(), $(r(ft), {
60
+ }, null, 8, Yt)) : e.column.type === "boolean" ? (o(), $(r(ft), {
61
61
  key: 2,
62
62
  value: e.column.tagValue ? e.column.tagValue(e.value, e.rowData) : e.value ? "Ativo" : "Inativo",
63
63
  severity: e.column.tagSeverity ? e.column.tagSeverity(e.value, e.rowData) : e.value ? "success" : "danger",
64
64
  class: "text-xs"
65
- }, null, 8, ["value", "severity"])) : e.column.type === "date" ? (o(), u("span", Yt, F(r(a)(e.value)), 1)) : e.column.type === "datetime" ? (o(), u("span", Jt, F(r(t)(e.value)), 1)) : e.column.type === "currency" ? (o(), u("span", Xt, F(r(n)(e.value)), 1)) : e.column.type === "number" ? (o(), u("span", Zt, F(e.column.format ? e.column.format(e.value, e.rowData) : r(i)(e.value, e.column.decimals ?? 0)), 1)) : (o(), u("span", Qt, F(e.column.format ? e.column.format(e.value, e.rowData) : e.value), 1));
65
+ }, null, 8, ["value", "severity"])) : e.column.type === "date" ? (o(), d("span", Jt, F(r(a)(e.value)), 1)) : e.column.type === "datetime" ? (o(), d("span", Xt, F(r(t)(e.value)), 1)) : e.column.type === "currency" ? (o(), d("span", Zt, F(r(n)(e.value)), 1)) : e.column.type === "number" ? (o(), d("span", Qt, F(e.column.format ? e.column.format(e.value, e.rowData) : r(i)(e.value, e.column.decimals ?? 0)), 1)) : (o(), d("span", _t, F(e.column.format ? e.column.format(e.value, e.rowData) : e.value), 1));
66
66
  }
67
67
  });
68
- var _t = Object.defineProperty, el = (e, a, t) => a in e ? _t(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t, Ne = (e, a, t) => el(e, typeof a != "symbol" ? a + "" : a, t);
69
- const at = {
68
+ var el = Object.defineProperty, tl = (e, a, t) => a in e ? el(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t, Ne = (e, a, t) => tl(e, typeof a != "symbol" ? a + "" : a, t);
69
+ const ot = {
70
70
  "#": { pattern: /[0-9]/ },
71
71
  "@": { pattern: /[a-zA-Z]/ },
72
72
  "*": { pattern: /[a-zA-Z0-9]/ }
73
- }, ot = (e, a, t) => e.replaceAll(a, "").replace(t, ".").replace("..", ".").replace(/[^.\d]/g, ""), nt = (e, a, t) => {
73
+ }, nt = (e, a, t) => e.replaceAll(a, "").replace(t, ".").replace("..", ".").replace(/[^.\d]/g, ""), it = (e, a, t) => {
74
74
  var n;
75
75
  return new Intl.NumberFormat(((n = t.number) == null ? void 0 : n.locale) ?? "en", {
76
76
  minimumFractionDigits: e,
77
77
  maximumFractionDigits: a,
78
78
  roundingMode: "trunc"
79
79
  });
80
- }, tl = (e, a = !0, t) => {
80
+ }, ll = (e, a = !0, t) => {
81
81
  var n, i, f, w;
82
82
  const S = ((n = t.number) == null ? void 0 : n.unsigned) !== !0 && e.startsWith("-") ? "-" : "", k = ((i = t.number) == null ? void 0 : i.fraction) ?? 0;
83
- let D = nt(0, k, t);
84
- const T = D.formatToParts(1000.12), b = ((f = T.find((I) => I.type === "group")) == null ? void 0 : f.value) ?? " ", j = ((w = T.find((I) => I.type === "decimal")) == null ? void 0 : w.value) ?? ".", _ = ot(e, b, j);
83
+ let E = it(0, k, t);
84
+ const N = E.formatToParts(1000.12), b = ((f = N.find((I) => I.type === "group")) == null ? void 0 : f.value) ?? " ", q = ((w = N.find((I) => I.type === "decimal")) == null ? void 0 : w.value) ?? ".", _ = nt(e, b, q);
85
85
  if (Number.isNaN(parseFloat(_))) return S;
86
- const J = _.split(".");
87
- if (J[1] != null && J[1].length >= 1) {
88
- const I = J[1].length <= k ? J[1].length : k;
89
- D = nt(I, k, t);
86
+ const Y = _.split(".");
87
+ if (Y[1] != null && Y[1].length >= 1) {
88
+ const I = Y[1].length <= k ? Y[1].length : k;
89
+ E = it(I, k, t);
90
90
  }
91
- let Z = D.format(parseFloat(_));
92
- return a ? k > 0 && _.endsWith(".") && !_.slice(0, -1).includes(".") && (Z += j) : Z = ot(Z, b, j), S + Z;
93
- }, ht = (e) => JSON.parse(e.replaceAll("'", '"')), ll = (e, a = {}) => {
91
+ let Z = E.format(parseFloat(_));
92
+ return a ? k > 0 && _.endsWith(".") && !_.slice(0, -1).includes(".") && (Z += q) : Z = nt(Z, b, q), S + Z;
93
+ }, ht = (e) => JSON.parse(e.replaceAll("'", '"')), al = (e, a = {}) => {
94
94
  const t = { ...a };
95
- e.dataset.maska != null && e.dataset.maska !== "" && (t.mask = al(e.dataset.maska)), e.dataset.maskaEager != null && (t.eager = Oe(e.dataset.maskaEager)), e.dataset.maskaReversed != null && (t.reversed = Oe(e.dataset.maskaReversed)), e.dataset.maskaTokensReplace != null && (t.tokensReplace = Oe(e.dataset.maskaTokensReplace)), e.dataset.maskaTokens != null && (t.tokens = ol(e.dataset.maskaTokens));
95
+ e.dataset.maska != null && e.dataset.maska !== "" && (t.mask = ol(e.dataset.maska)), e.dataset.maskaEager != null && (t.eager = Oe(e.dataset.maskaEager)), e.dataset.maskaReversed != null && (t.reversed = Oe(e.dataset.maskaReversed)), e.dataset.maskaTokensReplace != null && (t.tokensReplace = Oe(e.dataset.maskaTokensReplace)), e.dataset.maskaTokens != null && (t.tokens = nl(e.dataset.maskaTokens));
96
96
  const n = {};
97
97
  return e.dataset.maskaNumberLocale != null && (n.locale = e.dataset.maskaNumberLocale), e.dataset.maskaNumberFraction != null && (n.fraction = parseInt(e.dataset.maskaNumberFraction)), e.dataset.maskaNumberUnsigned != null && (n.unsigned = Oe(e.dataset.maskaNumberUnsigned)), (e.dataset.maskaNumber != null || Object.values(n).length > 0) && (t.number = n), t;
98
- }, Oe = (e) => e !== "" ? !!JSON.parse(e) : !0, al = (e) => e.startsWith("[") && e.endsWith("]") ? ht(e) : e, ol = (e) => {
98
+ }, Oe = (e) => e !== "" ? !!JSON.parse(e) : !0, ol = (e) => e.startsWith("[") && e.endsWith("]") ? ht(e) : e, nl = (e) => {
99
99
  if (e.startsWith("{") && e.endsWith("}"))
100
100
  return ht(e);
101
101
  const a = {};
@@ -115,16 +115,16 @@ const at = {
115
115
  return !1;
116
116
  }
117
117
  };
118
- class nl {
118
+ class il {
119
119
  constructor(a = {}) {
120
120
  Ne(this, "opts", {}), Ne(this, "memo", /* @__PURE__ */ new Map());
121
121
  const t = { ...a };
122
122
  if (t.tokens != null) {
123
- t.tokens = t.tokensReplace ? { ...t.tokens } : { ...at, ...t.tokens };
123
+ t.tokens = t.tokensReplace ? { ...t.tokens } : { ...ot, ...t.tokens };
124
124
  for (const n of Object.values(t.tokens))
125
125
  typeof n.pattern == "string" && (n.pattern = yt() ? new RegExp(n.pattern, "u") : new RegExp(n.pattern));
126
126
  } else
127
- t.tokens = at;
127
+ t.tokens = ot;
128
128
  Array.isArray(t.mask) && (t.mask.length > 1 ? t.mask = [...t.mask].sort((n, i) => n.length - i.length) : t.mask = t.mask[0] ?? ""), t.mask === "" && (t.mask = null), this.opts = t;
129
129
  }
130
130
  masked(a) {
@@ -163,29 +163,29 @@ class nl {
163
163
  }), { mask: t.join(""), escaped: n };
164
164
  }
165
165
  process(a, t, n = !0) {
166
- if (this.opts.number != null) return tl(a, n, this.opts);
166
+ if (this.opts.number != null) return ll(a, n, this.opts);
167
167
  if (t == null) return a;
168
168
  const i = `v=${a},mr=${t},m=${n ? 1 : 0}`;
169
169
  if (this.memo.has(i)) return this.memo.get(i);
170
- const { mask: f, escaped: w } = this.escapeMask(t), S = [], k = this.opts.tokens != null ? this.opts.tokens : {}, D = this.isReversed() ? -1 : 1, T = this.isReversed() ? "unshift" : "push", b = this.isReversed() ? 0 : f.length - 1, j = this.isReversed() ? () => I > -1 && U > -1 : () => I < f.length && U < a.length, _ = (x) => !this.isReversed() && x <= b || this.isReversed() && x >= b;
171
- let J, Z = -1, I = this.isReversed() ? f.length - 1 : 0, U = this.isReversed() ? a.length - 1 : 0, z = !1;
172
- for (; j(); ) {
173
- const x = f.charAt(I), q = k[x], ae = (q == null ? void 0 : q.transform) != null ? q.transform(a.charAt(U)) : a.charAt(U);
174
- if (!w.includes(I) && q != null ? (ae.match(q.pattern) != null ? (S[T](ae), q.repeated ? (Z === -1 ? Z = I : I === b && I !== Z && (I = Z - D), b === Z && (I -= D)) : q.multiple && (z = !0, I -= D), I += D) : q.multiple ? z && (I += D, U -= D, z = !1) : ae === J ? J = void 0 : q.optional && (I += D, U -= D), U += D) : (n && !this.isEager() && S[T](x), ae === x && !this.isEager() ? U += D : J = x, this.isEager() || (I += D)), this.isEager())
170
+ const { mask: f, escaped: w } = this.escapeMask(t), S = [], k = this.opts.tokens != null ? this.opts.tokens : {}, E = this.isReversed() ? -1 : 1, N = this.isReversed() ? "unshift" : "push", b = this.isReversed() ? 0 : f.length - 1, q = this.isReversed() ? () => I > -1 && M > -1 : () => I < f.length && M < a.length, _ = (x) => !this.isReversed() && x <= b || this.isReversed() && x >= b;
171
+ let Y, Z = -1, I = this.isReversed() ? f.length - 1 : 0, M = this.isReversed() ? a.length - 1 : 0, z = !1;
172
+ for (; q(); ) {
173
+ const x = f.charAt(I), j = k[x], ae = (j == null ? void 0 : j.transform) != null ? j.transform(a.charAt(M)) : a.charAt(M);
174
+ if (!w.includes(I) && j != null ? (ae.match(j.pattern) != null ? (S[N](ae), j.repeated ? (Z === -1 ? Z = I : I === b && I !== Z && (I = Z - E), b === Z && (I -= E)) : j.multiple && (z = !0, I -= E), I += E) : j.multiple ? z && (I += E, M -= E, z = !1) : ae === Y ? Y = void 0 : j.optional && (I += E, M -= E), M += E) : (n && !this.isEager() && S[N](x), ae === x && !this.isEager() ? M += E : Y = x, this.isEager() || (I += E)), this.isEager())
175
175
  for (; _(I) && (k[f.charAt(I)] == null || w.includes(I)); ) {
176
176
  if (n) {
177
- if (S[T](f.charAt(I)), a.charAt(U) === f.charAt(I)) {
178
- I += D, U += D;
177
+ if (S[N](f.charAt(I)), a.charAt(M) === f.charAt(I)) {
178
+ I += E, M += E;
179
179
  continue;
180
180
  }
181
- } else f.charAt(I) === a.charAt(U) && (U += D);
182
- I += D;
181
+ } else f.charAt(I) === a.charAt(M) && (M += E);
182
+ I += E;
183
183
  }
184
184
  }
185
185
  return this.memo.set(i, S.join("")), this.memo.get(i);
186
186
  }
187
187
  }
188
- class il {
188
+ class sl {
189
189
  constructor(a, t = {}) {
190
190
  Ne(this, "items", /* @__PURE__ */ new Map()), Ne(this, "eventAbortController"), Ne(this, "onInput", (n) => {
191
191
  if (n instanceof CustomEvent && n.type === "input" && !n.isTrusted && !n.bubbles)
@@ -213,7 +213,7 @@ class il {
213
213
  const { signal: f } = this.eventAbortController;
214
214
  n.addEventListener("input", this.onInput, { capture: !0, signal: f });
215
215
  }
216
- const i = new nl(ll(n, t));
216
+ const i = new il(al(n, t));
217
217
  this.items.set(n, i), queueMicrotask(() => this.updateValue(n)), n.selectionStart === null && i.isEager() && console.warn("Maska: input of `%s` type is not supported", n.type);
218
218
  }
219
219
  }
@@ -228,10 +228,10 @@ class il {
228
228
  var i, f;
229
229
  const w = a.selectionStart, S = a.value;
230
230
  if (n(), w === null || w === S.length && !t) return;
231
- const k = a.value, D = S.slice(0, w), T = k.slice(0, w), b = (i = this.processInput(a, D)) == null ? void 0 : i.unmasked, j = (f = this.processInput(a, T)) == null ? void 0 : f.unmasked;
232
- if (b === void 0 || j === void 0) return;
231
+ const k = a.value, E = S.slice(0, w), N = k.slice(0, w), b = (i = this.processInput(a, E)) == null ? void 0 : i.unmasked, q = (f = this.processInput(a, N)) == null ? void 0 : f.unmasked;
232
+ if (b === void 0 || q === void 0) return;
233
233
  let _ = w;
234
- D !== T && (_ += t ? k.length - S.length : b.length - j.length), a.setSelectionRange(_, _);
234
+ E !== N && (_ += t ? k.length - S.length : b.length - q.length), a.setSelectionRange(_, _);
235
235
  }
236
236
  setValue(a, t) {
237
237
  const n = this.processInput(a, t);
@@ -250,7 +250,7 @@ class il {
250
250
  };
251
251
  }
252
252
  }
253
- const Ge = /* @__PURE__ */ new WeakMap(), sl = (e, a) => {
253
+ const Ye = /* @__PURE__ */ new WeakMap(), rl = (e, a) => {
254
254
  if (e.arg == null || e.instance == null) return;
255
255
  const t = "setup" in e.instance.$.type;
256
256
  e.arg in e.instance ? e.instance[e.arg] = a : t && console.warn("Maska: please expose `%s` using defineExpose", e.arg);
@@ -262,12 +262,12 @@ const Ge = /* @__PURE__ */ new WeakMap(), sl = (e, a) => {
262
262
  if (a.value != null && (i = typeof a.value == "string" ? { mask: a.value } : { ...a.value }), a.arg != null) {
263
263
  const f = (w) => {
264
264
  const S = a.modifiers.unmasked ? w.unmasked : a.modifiers.completed ? w.completed : w.masked;
265
- sl(a, S);
265
+ rl(a, S);
266
266
  };
267
267
  i.onMaska = i.onMaska == null ? f : Array.isArray(i.onMaska) ? [...i.onMaska, f] : [i.onMaska, f];
268
268
  }
269
- Ge.has(n) ? (t = Ge.get(n)) == null || t.update(i) : Ge.set(n, new il(n, i));
270
- }, rl = {
269
+ Ye.has(n) ? (t = Ye.get(n)) == null || t.update(i) : Ye.set(n, new sl(n, i));
270
+ }, ul = {
271
271
  string: "text",
272
272
  integer: "number",
273
273
  decimal: "number",
@@ -282,9 +282,9 @@ const Ge = /* @__PURE__ */ new WeakMap(), sl = (e, a) => {
282
282
  slug: "text",
283
283
  text: "textarea"
284
284
  };
285
- function ul(e) {
285
+ function dl(e) {
286
286
  var n;
287
- const a = rl[e.type] ?? "text", t = {
287
+ const a = ul[e.type] ?? "text", t = {
288
288
  field: e.name,
289
289
  label: e.label,
290
290
  type: a,
@@ -295,10 +295,10 @@ function ul(e) {
295
295
  value: i.value
296
296
  }))), e.type === "fk" && (t.endpoint = e.endpoint, e.option_label && (t.optionLabel = e.option_label), e.option_value && (t.optionValue = e.option_value)), t;
297
297
  }
298
- function dl(e) {
299
- return e.filter((a) => !a.read_only && a.name !== "id").map(ul);
298
+ function cl(e) {
299
+ return e.filter((a) => !a.read_only && a.name !== "id").map(dl);
300
300
  }
301
- const cl = {
301
+ const ml = {
302
302
  boolean: "boolean",
303
303
  date: "date",
304
304
  datetime: "datetime",
@@ -306,18 +306,18 @@ const cl = {
306
306
  float: "number",
307
307
  integer: "number"
308
308
  };
309
- function ml(e) {
309
+ function fl(e) {
310
310
  return {
311
311
  field: e.type === "fk" ? `${e.name}_nome` : e.name,
312
312
  header: e.label,
313
- type: cl[e.type],
313
+ type: ml[e.type],
314
314
  sortable: !0
315
315
  };
316
316
  }
317
- function fl(e, a = 6) {
318
- return e.filter((t) => !t.read_only && t.name !== "id").slice(0, a).map(ml);
317
+ function vl(e, a = 6) {
318
+ return e.filter((t) => !t.read_only && t.name !== "id").slice(0, a).map(fl);
319
319
  }
320
- const vl = ["disabled"], pl = { class: "w-autocompletefk-toolbar" }, hl = { class: "w-autocompletefk-toolbar-actions" }, yl = { class: "flex items-center justify-end gap-1" }, gl = { class: "w-autocompletefk-footer" }, bl = /* @__PURE__ */ oe({
320
+ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { class: "w-autocompletefk-toolbar-actions" }, gl = { class: "flex items-center justify-end gap-1" }, bl = { class: "w-autocompletefk-footer" }, wl = /* @__PURE__ */ ie({
321
321
  inheritAttrs: !1,
322
322
  __name: "WAutoCompleteFK",
323
323
  props: {
@@ -340,439 +340,450 @@ const vl = ["disabled"], pl = { class: "w-autocompletefk-toolbar" }, hl = { clas
340
340
  canDelete: { type: Boolean, default: void 0 },
341
341
  crudFields: {},
342
342
  crudColumns: {},
343
- dialogWidth: { default: "480px" }
343
+ dialogWidth: { default: "480px" },
344
+ autofocus: { type: Boolean, default: !1 }
344
345
  },
345
346
  emits: ["update:modelValue"],
346
347
  setup(e, { emit: a }) {
347
- const t = e, n = a, i = rt(jt);
348
+ const t = e, n = a, i = ut(qt);
348
349
  if (!i)
349
350
  throw new Error("[wPrimeVueComponents] dataProvider não encontrado. Registre o WPrimeVuePlugin.");
350
- const f = i, w = Ut(), { confirmDelete: S } = Bt(), k = L(null), D = L([]), T = L(!1);
351
+ const f = i, w = Bt(), { confirmDelete: S } = Tt(), k = T(null), E = T([]), N = T(!1);
351
352
  let b = null;
352
- function j(c) {
353
- return c == null || c === "";
353
+ const q = T(null);
354
+ _e(() => {
355
+ t.autofocus && Ge(() => {
356
+ var y, O, R, ne;
357
+ const u = (R = (O = (y = q.value) == null ? void 0 : y.$el) == null ? void 0 : O.querySelector) == null ? void 0 : R.call(O, "input");
358
+ u && (u.setAttribute("autofocus", ""), u.focus(), (ne = u.select) == null || ne.call(u));
359
+ });
360
+ });
361
+ function _(u) {
362
+ return u == null || u === "";
354
363
  }
355
- function _(c) {
356
- if (c && typeof c == "object") {
357
- const y = c;
364
+ function Y(u) {
365
+ if (u && typeof u == "object") {
366
+ const y = u;
358
367
  return y.id ?? y.value ?? y;
359
368
  }
360
- return c;
361
- }
362
- const J = P(() => {
363
- const c = t.drilldown;
364
- return c ? Array.isArray(c) ? c : [c] : [];
365
- }), Z = P(
366
- () => J.value.some(
367
- (c) => (c.required ?? !0) && j(_(c.value))
369
+ return u;
370
+ }
371
+ const Z = P(() => {
372
+ const u = t.drilldown;
373
+ return u ? Array.isArray(u) ? u : [u] : [];
374
+ }), I = P(
375
+ () => Z.value.some(
376
+ (u) => (u.required ?? !0) && _(Y(u.value))
368
377
  )
369
378
  );
370
- function I() {
371
- const c = {};
372
- for (const y of J.value) {
373
- const H = _(y.value);
374
- j(H) || (c[y.field] = H);
379
+ function M() {
380
+ const u = {};
381
+ for (const y of Z.value) {
382
+ const O = Y(y.value);
383
+ _(O) || (u[y.field] = O);
375
384
  }
376
- return c;
385
+ return u;
377
386
  }
378
- const U = P(
379
- () => Z.value && t.blockedPlaceholder ? t.blockedPlaceholder : t.placeholder
387
+ const z = P(
388
+ () => I.value && t.blockedPlaceholder ? t.blockedPlaceholder : t.placeholder
380
389
  );
381
- async function z(c) {
390
+ async function x(u) {
382
391
  try {
383
- const y = await f.get(t.endpoint, c);
392
+ const y = await f.get(t.endpoint, u);
384
393
  k.value = y.data;
385
394
  } catch {
386
395
  k.value = null;
387
396
  }
388
397
  }
389
- async function x(c) {
390
- if (Z.value) {
391
- D.value = [];
398
+ async function j(u) {
399
+ if (I.value) {
400
+ E.value = [];
392
401
  return;
393
402
  }
394
- T.value = !0;
403
+ N.value = !0;
395
404
  try {
396
405
  const y = {
397
406
  page_size: 20,
398
407
  ...t.endpointParams,
399
- ...I()
408
+ ...M()
400
409
  };
401
- c && (y.search = c);
402
- const H = await f.list(t.endpoint, y);
403
- D.value = H.data;
410
+ u && (y.search = u);
411
+ const O = await f.list(t.endpoint, y);
412
+ E.value = O.data;
404
413
  } catch {
405
- D.value = [];
414
+ E.value = [];
406
415
  } finally {
407
- T.value = !1;
416
+ N.value = !1;
408
417
  }
409
418
  }
410
- function q(c) {
411
- const y = c.query || "";
419
+ function ae(u) {
420
+ const y = u.query || "";
412
421
  if (y.length < t.minLength) {
413
- D.value = [];
422
+ E.value = [];
414
423
  return;
415
424
  }
416
- b && clearTimeout(b), b = setTimeout(() => x(y), 300);
425
+ b && clearTimeout(b), b = setTimeout(() => j(y), 300);
417
426
  }
418
- function ae(c) {
419
- k.value = c.value, n("update:modelValue", c.value);
427
+ function de(u) {
428
+ k.value = u.value, n("update:modelValue", u.value);
420
429
  }
421
- function ue() {
430
+ function Se() {
422
431
  k.value = null, n("update:modelValue", null);
423
432
  }
424
433
  Me(
425
434
  () => t.modelValue,
426
- async (c) => {
427
- if (c != null) {
428
- if (typeof c == "object" && c !== null && t.optionLabel in c) {
429
- k.value = c;
435
+ async (u) => {
436
+ if (u != null) {
437
+ if (typeof u == "object" && u !== null && t.optionLabel in u) {
438
+ k.value = u;
430
439
  return;
431
440
  }
432
- (!k.value || k.value[t.optionValue] !== c) && await z(c);
441
+ (!k.value || k.value[t.optionValue] !== u) && await x(u);
433
442
  } else
434
443
  k.value = null;
435
444
  },
436
445
  { immediate: !0 }
437
446
  );
438
- const pe = L(!1), ne = L([]), he = L(!1), ie = L(""), ve = L(1), be = L(15), W = L(0), Q = L(null), de = L(null), ye = L(0);
439
- let we = null;
440
- const p = L([]), C = P(() => {
441
- var c;
442
- return (c = t.crudFields) != null && c.length ? !0 : p.value.length > 0;
443
- }), E = P(() => t.canCreate ?? C.value), l = P(() => t.canEdit ?? C.value), v = P(() => t.canDelete ?? C.value), N = P(() => l.value || v.value), se = P(() => {
444
- var c;
445
- return (c = t.crudFields) != null && c.length ? t.crudFields : dl(p.value);
446
- }), ce = P(() => {
447
- var c, y;
448
- return (c = t.crudColumns) != null && c.length ? t.crudColumns : (y = t.columns) != null && y.length ? t.columns.map((H) => ({
449
- field: H.field,
450
- header: H.header,
447
+ const ue = T(!1), se = T([]), he = T(!1), ve = T(""), ce = T(1), K = T(15), oe = T(0), te = T(null), ye = T(null), be = T(0);
448
+ let p = null;
449
+ const C = T([]), D = P(() => {
450
+ var u;
451
+ return (u = t.crudFields) != null && u.length ? !0 : C.value.length > 0;
452
+ }), l = P(() => t.canCreate ?? D.value), v = P(() => t.canEdit ?? D.value), B = P(() => t.canDelete ?? D.value), pe = P(() => v.value || B.value), re = P(() => {
453
+ var u;
454
+ return (u = t.crudFields) != null && u.length ? t.crudFields : cl(C.value);
455
+ }), L = P(() => {
456
+ var u, y;
457
+ return (u = t.crudColumns) != null && u.length ? t.crudColumns : (y = t.columns) != null && y.length ? t.columns.map((O) => ({
458
+ field: O.field,
459
+ header: O.header,
451
460
  sortable: !0
452
- })) : p.value.length ? fl(p.value) : [{ field: t.optionLabel, header: t.optionLabel, sortable: !0 }];
461
+ })) : C.value.length ? vl(C.value) : [{ field: t.optionLabel, header: t.optionLabel, sortable: !0 }];
453
462
  });
454
- async function M() {
455
- var c, y, H;
456
- if (Z.value) {
457
- ne.value = [], W.value = 0;
463
+ async function Q() {
464
+ var u, y, O;
465
+ if (I.value) {
466
+ se.value = [], oe.value = 0;
458
467
  return;
459
468
  }
460
469
  he.value = !0;
461
470
  try {
462
471
  const R = {
463
- page: ve.value,
464
- page_size: be.value,
472
+ page: ce.value,
473
+ page_size: K.value,
465
474
  ...t.endpointParams,
466
- ...I()
475
+ ...M()
467
476
  };
468
- ie.value && (R.search = ie.value), de.value && ye.value !== 0 && (R.ordering = ye.value === -1 ? `-${de.value}` : de.value);
469
- const re = await f.list(t.endpoint, R);
470
- ne.value = re.data, W.value = re.rows, (c = re.extras) != null && c.fields && !((y = t.columns) != null && y.length) && !((H = t.crudFields) != null && H.length) && (p.value = re.extras.fields);
477
+ ve.value && (R.search = ve.value), ye.value && be.value !== 0 && (R.ordering = be.value === -1 ? `-${ye.value}` : ye.value);
478
+ const ne = await f.list(t.endpoint, R);
479
+ se.value = ne.data, oe.value = ne.rows, (u = ne.extras) != null && u.fields && !((y = t.columns) != null && y.length) && !((O = t.crudFields) != null && O.length) && (C.value = ne.extras.fields);
471
480
  } catch {
472
- ne.value = [], W.value = 0;
481
+ se.value = [], oe.value = 0;
473
482
  } finally {
474
483
  he.value = !1;
475
484
  }
476
485
  }
477
- function te(c) {
478
- c.key === "F2" && !t.disabled && (c.preventDefault(), ke());
486
+ function ke(u) {
487
+ u.key === "F2" && !t.disabled && (u.preventDefault(), $e());
479
488
  }
480
- function ke() {
481
- t.disabled || (ie.value = "", ve.value = 1, de.value = null, ye.value = 0, Q.value = null, pe.value = !0, M());
489
+ function $e() {
490
+ t.disabled || (ve.value = "", ce.value = 1, ye.value = null, be.value = 0, te.value = null, ue.value = !0, Q());
482
491
  }
483
- function xe(c) {
484
- ve.value = c.page + 1, be.value = c.rows, M();
492
+ function He(u) {
493
+ ce.value = u.page + 1, K.value = u.rows, Q();
485
494
  }
486
- function He(c) {
487
- de.value = c.sortField ?? null, ye.value = c.sortOrder ?? 0, ve.value = 1, M();
495
+ function De(u) {
496
+ ye.value = u.sortField ?? null, be.value = u.sortOrder ?? 0, ce.value = 1, Q();
488
497
  }
489
- function Se() {
490
- Q.value && (k.value = Q.value, n("update:modelValue", Q.value), pe.value = !1);
491
- }
492
- function Re(c) {
493
- k.value = c.data, n("update:modelValue", c.data), pe.value = !1;
494
- }
495
- const d = L(null), h = L(null);
496
- let K = "";
497
- function s() {
498
- K = "", et(() => {
499
- var y, H, R;
500
- const c = (y = d.value) == null ? void 0 : y.$el;
501
- (H = c == null ? void 0 : c.focus) == null || H.call(c), (R = c == null ? void 0 : c.select) == null || R.call(c);
498
+ function Ie() {
499
+ te.value && (k.value = te.value, n("update:modelValue", te.value), ue.value = !1);
500
+ }
501
+ function c(u) {
502
+ k.value = u.data, n("update:modelValue", u.data), ue.value = !1;
503
+ }
504
+ const h = T(null), H = T(null);
505
+ let s = "";
506
+ function U() {
507
+ s = "", Ge(() => {
508
+ var y, O, R;
509
+ const u = (y = h.value) == null ? void 0 : y.$el;
510
+ (O = u == null ? void 0 : u.focus) == null || O.call(u), (R = u == null ? void 0 : u.select) == null || R.call(u);
502
511
  });
503
512
  }
504
- function B() {
505
- et(() => {
513
+ function G() {
514
+ Ge(() => {
506
515
  var y;
507
- const c = (y = h.value) == null ? void 0 : y.querySelector(".p-datatable-tbody > tr");
508
- c == null || c.focus();
516
+ const u = (y = H.value) == null ? void 0 : y.querySelector(".p-datatable-tbody > tr");
517
+ u == null || u.focus();
509
518
  });
510
519
  }
511
- function G(c) {
512
- if (c.key !== "Enter" || c.isComposing) return;
513
- c.preventDefault();
514
- const y = ie.value.trim();
515
- if (y === "" || y === K) {
516
- B();
520
+ function we(u) {
521
+ if (u.key !== "Enter" || u.isComposing) return;
522
+ u.preventDefault();
523
+ const y = ve.value.trim();
524
+ if (y === "" || y === s) {
525
+ G();
517
526
  return;
518
527
  }
519
- we && clearTimeout(we), K = y, ve.value = 1, M();
528
+ p && clearTimeout(p), s = y, ce.value = 1, Q();
520
529
  }
521
- function $e(c) {
522
- c.key === "Enter" && (c.preventDefault(), c.stopPropagation(), Q.value && Se());
530
+ function Le(u) {
531
+ u.key === "Enter" && (u.preventDefault(), u.stopPropagation(), te.value && Ie());
523
532
  }
524
- Me(ie, () => {
525
- we && clearTimeout(we), we = setTimeout(() => {
526
- ve.value = 1, K = ie.value.trim(), M();
533
+ Me(ve, () => {
534
+ p && clearTimeout(p), p = setTimeout(() => {
535
+ ce.value = 1, s = ve.value.trim(), Q();
527
536
  }, 300);
528
537
  }), Me(
529
- () => J.value.map((c) => _(c.value)),
530
- (c, y) => {
531
- if (pe.value && (ve.value = 1, M()), !y) return;
532
- const H = c.some((re, Vt) => re !== y[Vt]), R = y.some((re) => !j(re));
533
- H && R && k.value && (k.value = null, n("update:modelValue", null));
538
+ () => Z.value.map((u) => Y(u.value)),
539
+ (u, y) => {
540
+ if (ue.value && (ce.value = 1, Q()), !y) return;
541
+ const O = u.some((ne, St) => ne !== y[St]), R = y.some((ne) => !_(ne));
542
+ O && R && k.value && (k.value = null, n("update:modelValue", null));
534
543
  }
535
544
  );
536
- const Ee = L(!1), Ae = L(!1), Ce = L(null), Ve = Pe({}), Ue = P(() => Ce.value !== null), Le = P(() => Ue.value ? "Editar Registro" : "Novo Registro");
537
- function De() {
538
- const c = {};
539
- for (const y of se.value)
540
- c[y.field] = y.defaultValue !== void 0 ? typeof y.defaultValue == "function" ? y.defaultValue() : y.defaultValue : null;
541
- return c;
542
- }
545
+ const Ee = T(!1), Ae = T(!1), xe = T(null), Ce = Pe({}), Ue = P(() => xe.value !== null), Ve = P(() => Ue.value ? "Editar Registro" : "Novo Registro");
543
546
  function bt() {
544
- const c = De();
545
- for (const y of Object.keys(Ve))
546
- delete Ve[y];
547
- for (const [y, H] of Object.entries(c))
548
- Ve[y] = H;
547
+ const u = {};
548
+ for (const y of re.value)
549
+ u[y.field] = y.defaultValue !== void 0 ? typeof y.defaultValue == "function" ? y.defaultValue() : y.defaultValue : null;
550
+ return u;
549
551
  }
550
552
  function wt() {
551
- Ce.value = null, bt(), Ee.value = !0;
552
- }
553
- function kt(c) {
554
- Ce.value = c;
555
- for (const y of se.value)
556
- Ve[y.field] = c[y.field] !== void 0 ? c[y.field] : null;
553
+ const u = bt();
554
+ for (const y of Object.keys(Ce))
555
+ delete Ce[y];
556
+ for (const [y, O] of Object.entries(u))
557
+ Ce[y] = O;
558
+ }
559
+ function kt() {
560
+ xe.value = null, wt(), Ee.value = !0;
561
+ }
562
+ function $t(u) {
563
+ xe.value = u;
564
+ for (const y of re.value)
565
+ Ce[y.field] = u[y.field] !== void 0 ? u[y.field] : null;
557
566
  Ee.value = !0;
558
567
  }
559
- function $t(c, y) {
560
- Ve[c] = y;
568
+ function xt(u, y) {
569
+ Ce[u] = y;
561
570
  }
562
- async function xt() {
571
+ async function Ct() {
563
572
  Ae.value = !0;
564
573
  try {
565
- const c = { ...Ve };
566
- for (const H of se.value) {
567
- const R = c[H.field];
568
- if (H.type === "fk" && R !== null && typeof R == "object") {
569
- const re = H.optionValue || "id";
570
- c[H.field] = R[re] ?? R;
574
+ const u = { ...Ce };
575
+ for (const O of re.value) {
576
+ const R = u[O.field];
577
+ if (O.type === "fk" && R !== null && typeof R == "object") {
578
+ const ne = O.optionValue || "id";
579
+ u[O.field] = R[ne] ?? R;
571
580
  }
572
581
  }
573
582
  let y;
574
- if (Ue.value && Ce.value) {
575
- const H = Ce.value[t.optionValue];
576
- y = await f.update(t.endpoint, H, c);
577
- const R = ne.value.findIndex((re) => re[t.optionValue] === H);
578
- R !== -1 && (ne.value[R] = y.data), w.success("Registro atualizado com sucesso");
583
+ if (Ue.value && xe.value) {
584
+ const O = xe.value[t.optionValue];
585
+ y = await f.update(t.endpoint, O, u);
586
+ const R = se.value.findIndex((ne) => ne[t.optionValue] === O);
587
+ R !== -1 && (se.value[R] = y.data), w.success("Registro atualizado com sucesso");
579
588
  } else
580
- y = await f.create(t.endpoint, c), ne.value.unshift(y.data), W.value++, w.success("Registro criado com sucesso");
581
- Ee.value = !1, Ce.value = null, Q.value = y.data;
582
- } catch (c) {
583
- w.error(tt(c, "Erro ao salvar registro"));
589
+ y = await f.create(t.endpoint, u), se.value.unshift(y.data), oe.value++, w.success("Registro criado com sucesso");
590
+ Ee.value = !1, xe.value = null, te.value = y.data;
591
+ } catch (u) {
592
+ w.error(lt(u, "Erro ao salvar registro"));
584
593
  } finally {
585
594
  Ae.value = !1;
586
595
  }
587
596
  }
588
- function Ct(c) {
597
+ function Vt(u) {
589
598
  S(async () => {
590
599
  try {
591
- const y = c[t.optionValue];
600
+ const y = u[t.optionValue];
592
601
  await f.delete(t.endpoint, y);
593
- const H = ne.value.findIndex((R) => R[t.optionValue] === y);
594
- H !== -1 && (ne.value.splice(H, 1), W.value--), k.value && k.value[t.optionValue] === y && (k.value = null, n("update:modelValue", null)), Q.value && Q.value[t.optionValue] === y && (Q.value = null), w.success("Registro excluído com sucesso");
602
+ const O = se.value.findIndex((R) => R[t.optionValue] === y);
603
+ O !== -1 && (se.value.splice(O, 1), oe.value--), k.value && k.value[t.optionValue] === y && (k.value = null, n("update:modelValue", null)), te.value && te.value[t.optionValue] === y && (te.value = null), w.success("Registro excluído com sucesso");
595
604
  } catch (y) {
596
- w.error(tt(y, "Erro ao excluir registro"));
605
+ w.error(lt(y, "Erro ao excluir registro"));
597
606
  }
598
607
  });
599
608
  }
600
- return (c, y) => {
601
- const H = ut("tooltip");
602
- return o(), u(X, null, [
603
- m("div", St({ class: "w-autocompletefk" }, c.$attrs), [
609
+ return (u, y) => {
610
+ const O = dt("tooltip");
611
+ return o(), d(X, null, [
612
+ m("div", Dt({ class: "w-autocompletefk" }, u.$attrs), [
604
613
  V(r(vt), {
614
+ ref_key: "acRef",
615
+ ref: q,
605
616
  "model-value": k.value,
606
- suggestions: D.value,
617
+ suggestions: E.value,
607
618
  "option-label": e.optionLabel,
608
- placeholder: U.value,
619
+ placeholder: z.value,
609
620
  disabled: e.disabled,
610
621
  "force-selection": e.forceSelection,
611
- loading: T.value,
622
+ loading: N.value,
612
623
  fluid: "",
613
- onComplete: q,
614
- onItemSelect: ae,
615
- onClear: ue,
616
- onKeydown: te
624
+ onComplete: ae,
625
+ onItemSelect: de,
626
+ onClear: Se,
627
+ onKeydown: ke
617
628
  }, null, 8, ["model-value", "suggestions", "option-label", "placeholder", "disabled", "force-selection", "loading"]),
618
- me((o(), u("button", {
629
+ me((o(), d("button", {
619
630
  type: "button",
620
631
  disabled: e.disabled,
621
632
  "data-kbd-skip": "",
622
633
  tabindex: "-1",
623
634
  class: "w-autocompletefk-trigger",
624
- onClick: ke
635
+ onClick: $e
625
636
  }, [...y[6] || (y[6] = [
626
637
  m("i", { class: "pi pi-search" }, null, -1)
627
- ])], 8, vl)), [
638
+ ])], 8, pl)), [
628
639
  [
629
- H,
640
+ O,
630
641
  "Pesquisar (F2)",
631
642
  void 0,
632
643
  { top: !0 }
633
644
  ]
634
645
  ])
635
646
  ], 16),
636
- V(r(_e), {
637
- visible: pe.value,
638
- "onUpdate:visible": y[4] || (y[4] = (R) => pe.value = R),
647
+ V(r(tt), {
648
+ visible: ue.value,
649
+ "onUpdate:visible": y[4] || (y[4] = (R) => ue.value = R),
639
650
  header: e.dialogHeader || "Pesquisar",
640
651
  style: { width: "80vw" },
641
652
  modal: "",
642
653
  draggable: !1,
643
654
  class: "w-autocompletefk-dialog",
644
- onShow: s
655
+ onShow: U
645
656
  }, {
646
- footer: Y(() => [
647
- m("div", gl, [
648
- V(r(O), {
657
+ footer: J(() => [
658
+ m("div", bl, [
659
+ V(r(W), {
649
660
  label: "Cancelar",
650
661
  severity: "secondary",
651
662
  text: "",
652
- onClick: y[3] || (y[3] = (R) => pe.value = !1)
663
+ onClick: y[3] || (y[3] = (R) => ue.value = !1)
653
664
  }),
654
- V(r(O), {
665
+ V(r(W), {
655
666
  label: "Selecionar",
656
667
  icon: "pi pi-check",
657
- disabled: !Q.value,
658
- onClick: Se
668
+ disabled: !te.value,
669
+ onClick: Ie
659
670
  }, null, 8, ["disabled"])
660
671
  ])
661
672
  ]),
662
- default: Y(() => [
663
- m("div", pl, [
673
+ default: J(() => [
674
+ m("div", hl, [
664
675
  V(r(Be), { class: "w-autocompletefk-toolbar-search" }, {
665
- default: Y(() => [
676
+ default: J(() => [
666
677
  V(r(Te), { class: "pi pi-search" }),
667
678
  V(r(fe), {
668
679
  ref_key: "modalSearchInput",
669
- ref: d,
670
- modelValue: ie.value,
671
- "onUpdate:modelValue": y[0] || (y[0] = (R) => ie.value = R),
680
+ ref: h,
681
+ modelValue: ve.value,
682
+ "onUpdate:modelValue": y[0] || (y[0] = (R) => ve.value = R),
672
683
  placeholder: "Pesquisar...",
673
684
  class: "w-full",
674
685
  autofocus: "",
675
- onKeydown: G
686
+ onKeydown: we
676
687
  }, null, 8, ["modelValue"])
677
688
  ]),
678
689
  _: 1
679
690
  }),
680
- m("div", hl, [
681
- E.value ? (o(), $(r(O), {
691
+ m("div", yl, [
692
+ l.value ? (o(), $(r(W), {
682
693
  key: 0,
683
694
  label: "Novo",
684
695
  icon: "pi pi-plus",
685
696
  size: "small",
686
- onClick: wt
697
+ onClick: kt
687
698
  })) : g("", !0)
688
699
  ])
689
700
  ]),
690
701
  m("div", {
691
702
  ref_key: "modalTableWrap",
692
- ref: h,
693
- onKeydownCapture: $e
703
+ ref: H,
704
+ onKeydownCapture: Le
694
705
  }, [
695
706
  V(r(ct), {
696
- selection: Q.value,
697
- "onUpdate:selection": y[1] || (y[1] = (R) => Q.value = R),
707
+ selection: te.value,
708
+ "onUpdate:selection": y[1] || (y[1] = (R) => te.value = R),
698
709
  "meta-key-selection": !1,
699
- value: ne.value,
710
+ value: se.value,
700
711
  loading: he.value,
701
712
  paginator: "",
702
713
  lazy: "",
703
714
  "striped-rows": "",
704
715
  "removable-sort": "",
705
716
  size: "small",
706
- rows: be.value,
707
- "total-records": W.value,
708
- "sort-field": de.value ?? void 0,
709
- "sort-order": ye.value,
717
+ rows: K.value,
718
+ "total-records": oe.value,
719
+ "sort-field": ye.value ?? void 0,
720
+ "sort-order": be.value,
710
721
  "selection-mode": "single",
711
722
  "data-key": e.optionValue,
712
- onPage: xe,
713
- onSort: y[2] || (y[2] = (R) => He({ sortField: R.sortField, sortOrder: R.sortOrder })),
714
- onRowDblclick: Re
723
+ onPage: He,
724
+ onSort: y[2] || (y[2] = (R) => De({ sortField: R.sortField, sortOrder: R.sortOrder })),
725
+ onRowDblclick: c
715
726
  }, {
716
- empty: Y(() => [...y[7] || (y[7] = [
727
+ empty: J(() => [...y[7] || (y[7] = [
717
728
  m("div", { class: "w-autocompletefk-empty" }, "Nenhum registro encontrado", -1)
718
729
  ])]),
719
- default: Y(() => [
720
- V(r(Ie), {
730
+ default: J(() => [
731
+ V(r(Re), {
721
732
  "selection-mode": "single",
722
733
  "header-style": "width: 3rem"
723
734
  }),
724
- (o(!0), u(X, null, le(ce.value, (R) => (o(), $(r(Ie), {
735
+ (o(!0), d(X, null, le(L.value, (R) => (o(), $(r(Re), {
725
736
  key: R.field,
726
737
  field: R.field,
727
738
  header: R.header,
728
739
  sortable: R.sortable ?? !0,
729
740
  style: ge(R.style)
730
741
  }, {
731
- body: Y(({ data: re }) => [
732
- R.type ? (o(), $(Ze, {
742
+ body: J(({ data: ne }) => [
743
+ R.type ? (o(), $(Qe, {
733
744
  key: 0,
734
745
  column: R,
735
- value: re[R.field],
736
- "row-data": re
737
- }, null, 8, ["column", "value", "row-data"])) : (o(), u(X, { key: 1 }, [
738
- Fe(F(re[R.field]), 1)
746
+ value: ne[R.field],
747
+ "row-data": ne
748
+ }, null, 8, ["column", "value", "row-data"])) : (o(), d(X, { key: 1 }, [
749
+ Fe(F(ne[R.field]), 1)
739
750
  ], 64))
740
751
  ]),
741
752
  _: 2
742
753
  }, 1032, ["field", "header", "sortable", "style"]))), 128)),
743
- N.value ? (o(), $(r(Ie), {
754
+ pe.value ? (o(), $(r(Re), {
744
755
  key: 0,
745
756
  header: "",
746
757
  style: { width: "6rem" }
747
758
  }, {
748
- body: Y(({ data: R }) => [
749
- m("div", yl, [
750
- l.value ? me((o(), $(r(O), {
759
+ body: J(({ data: R }) => [
760
+ m("div", gl, [
761
+ v.value ? me((o(), $(r(W), {
751
762
  key: 0,
752
763
  icon: "pi pi-pencil",
753
764
  text: "",
754
765
  rounded: "",
755
766
  size: "small",
756
- onClick: (re) => kt(R)
767
+ onClick: (ne) => $t(R)
757
768
  }, null, 8, ["onClick"])), [
758
769
  [
759
- H,
770
+ O,
760
771
  "Editar",
761
772
  void 0,
762
773
  { top: !0 }
763
774
  ]
764
775
  ]) : g("", !0),
765
- v.value ? me((o(), $(r(O), {
776
+ B.value ? me((o(), $(r(W), {
766
777
  key: 1,
767
778
  icon: "pi pi-trash",
768
779
  text: "",
769
780
  rounded: "",
770
781
  size: "small",
771
782
  severity: "danger",
772
- onClick: (re) => Ct(R)
783
+ onClick: (ne) => Vt(R)
773
784
  }, null, 8, ["onClick"])), [
774
785
  [
775
- H,
786
+ O,
776
787
  "Excluir",
777
788
  void 0,
778
789
  { top: !0 }
@@ -789,25 +800,25 @@ const vl = ["disabled"], pl = { class: "w-autocompletefk-toolbar" }, hl = { clas
789
800
  ]),
790
801
  _: 1
791
802
  }, 8, ["visible", "header"]),
792
- C.value ? (o(), $(gt, {
803
+ D.value ? (o(), $(gt, {
793
804
  key: 0,
794
805
  visible: Ee.value,
795
- title: Le.value,
796
- fields: se.value,
797
- "form-data": Ve,
806
+ title: Ve.value,
807
+ fields: re.value,
808
+ "form-data": Ce,
798
809
  "is-editing": Ue.value,
799
810
  saving: Ae.value,
800
811
  width: e.dialogWidth,
801
812
  "onUpdate:visible": y[5] || (y[5] = (R) => {
802
- Ee.value = R, R || (Ce.value = null);
813
+ Ee.value = R, R || (xe.value = null);
803
814
  }),
804
- "onUpdate:field": $t,
805
- onSave: xt
815
+ "onUpdate:field": xt,
816
+ onSave: Ct
806
817
  }, null, 8, ["visible", "title", "fields", "form-data", "is-editing", "saving", "width"])) : g("", !0)
807
818
  ], 64);
808
819
  };
809
820
  }
810
- }), wl = { class: "w-datepicker" }, kl = { class: "w-datepicker-panel" }, $l = { class: "w-datepicker-actions" }, it = /* @__PURE__ */ oe({
821
+ }), kl = { class: "w-datepicker" }, $l = { class: "w-datepicker-panel" }, xl = { class: "w-datepicker-actions" }, st = /* @__PURE__ */ ie({
811
822
  __name: "WDatePicker",
812
823
  props: {
813
824
  modelValue: { default: null },
@@ -824,22 +835,22 @@ const vl = ["disabled"], pl = { class: "w-autocompletefk-toolbar" }, hl = { clas
824
835
  },
825
836
  emits: ["update:modelValue"],
826
837
  setup(e, { emit: a }) {
827
- const t = e, n = a, i = Tt({
838
+ const t = e, n = a, i = Nt({
828
839
  showTime: () => t.showTime,
829
840
  valueFormat: () => t.valueFormat
830
- }), f = L(""), w = L(null), S = L(null), k = P(() => ({ mask: i.mask() })), D = P(() => i.toDate(t.minDate) ?? void 0), T = P(() => i.toDate(t.maxDate) ?? void 0);
841
+ }), f = T(""), w = T(null), S = T(null), k = P(() => ({ mask: i.mask() })), E = P(() => i.toDate(t.minDate) ?? void 0), N = P(() => i.toDate(t.maxDate) ?? void 0);
831
842
  Me(
832
843
  () => t.modelValue,
833
844
  (x) => {
834
- const q = i.toDate(x);
835
- w.value = q, f.value = i.toDisplay(q);
845
+ const j = i.toDate(x);
846
+ w.value = j, f.value = i.toDisplay(j);
836
847
  },
837
848
  { immediate: !0 }
838
849
  );
839
850
  function b(x) {
840
851
  n("update:modelValue", i.toValue(x));
841
852
  }
842
- function j() {
853
+ function q() {
843
854
  if (f.value === "") {
844
855
  b(null);
845
856
  return;
@@ -850,7 +861,7 @@ const vl = ["disabled"], pl = { class: "w-autocompletefk-toolbar" }, hl = { clas
850
861
  function _() {
851
862
  f.value = i.toDisplay(i.toDate(t.modelValue));
852
863
  }
853
- function J(x) {
864
+ function Y(x) {
854
865
  x.key === "F2" && !t.disabled && (x.preventDefault(), I());
855
866
  }
856
867
  function Z(x) {
@@ -860,32 +871,32 @@ const vl = ["disabled"], pl = { class: "w-autocompletefk-toolbar" }, hl = { clas
860
871
  function I() {
861
872
  b(i.today());
862
873
  }
863
- function U() {
874
+ function M() {
864
875
  var x;
865
876
  b(null), (x = S.value) == null || x.hide();
866
877
  }
867
878
  function z(x) {
868
- var q;
869
- t.disabled || (q = S.value) == null || q.toggle(x);
879
+ var j;
880
+ t.disabled || (j = S.value) == null || j.toggle(x);
870
881
  }
871
- return dt(() => {
882
+ return _e(() => {
872
883
  t.autonow && t.modelValue == null && I();
873
- }), (x, q) => (o(), u("div", wl, [
884
+ }), (x, j) => (o(), d("div", kl, [
874
885
  V(r(Be), null, {
875
- default: Y(() => [
886
+ default: J(() => [
876
887
  me(V(r(fe), {
877
888
  id: e.inputId,
878
889
  modelValue: f.value,
879
- "onUpdate:modelValue": q[0] || (q[0] = (ae) => f.value = ae),
890
+ "onUpdate:modelValue": j[0] || (j[0] = (ae) => f.value = ae),
880
891
  placeholder: e.placeholder ?? r(i).placeholder(),
881
892
  disabled: e.disabled,
882
893
  invalid: e.invalid,
883
894
  fluid: "",
884
895
  autocomplete: "off",
885
896
  inputmode: "numeric",
886
- onInput: j,
897
+ onInput: q,
887
898
  onBlur: _,
888
- onKeydown: J
899
+ onKeydown: Y
889
900
  }, null, 8, ["id", "modelValue", "placeholder", "disabled", "invalid"]), [
890
901
  [r(qe), k.value]
891
902
  ]),
@@ -903,31 +914,31 @@ const vl = ["disabled"], pl = { class: "w-autocompletefk-toolbar" }, hl = { clas
903
914
  ref_key: "op",
904
915
  ref: S
905
916
  }, {
906
- default: Y(() => [
907
- m("div", kl, [
917
+ default: J(() => [
918
+ m("div", $l, [
908
919
  V(r(pt), {
909
920
  "model-value": w.value ?? void 0,
910
921
  inline: "",
911
922
  "show-time": e.showTime,
912
923
  "hour-format": "24",
913
- "min-date": D.value,
914
- "max-date": T.value,
924
+ "min-date": E.value,
925
+ "max-date": N.value,
915
926
  "onUpdate:modelValue": Z
916
927
  }, null, 8, ["model-value", "show-time", "min-date", "max-date"]),
917
- m("div", $l, [
918
- V(r(O), {
928
+ m("div", xl, [
929
+ V(r(W), {
919
930
  label: "Hoje",
920
931
  text: "",
921
932
  size: "small",
922
933
  onClick: I
923
934
  }),
924
- e.showClear ? (o(), $(r(O), {
935
+ e.showClear ? (o(), $(r(W), {
925
936
  key: 0,
926
937
  label: "Limpar",
927
938
  text: "",
928
939
  size: "small",
929
940
  severity: "secondary",
930
- onClick: U
941
+ onClick: M
931
942
  })) : g("", !0)
932
943
  ])
933
944
  ])
@@ -936,7 +947,7 @@ const vl = ["disabled"], pl = { class: "w-autocompletefk-toolbar" }, hl = { clas
936
947
  }, 512)
937
948
  ]));
938
949
  }
939
- }), xl = /* @__PURE__ */ oe({
950
+ }), Cl = /* @__PURE__ */ ie({
940
951
  __name: "WMoneyInput",
941
952
  props: {
942
953
  modelValue: {},
@@ -959,21 +970,21 @@ const vl = ["disabled"], pl = { class: "w-autocompletefk-toolbar" }, hl = { clas
959
970
  }).format(k);
960
971
  });
961
972
  function S(k) {
962
- const D = k.target.value.replace(/\D/g, "");
963
- if (!D) {
973
+ const E = k.target.value.replace(/\D/g, "");
974
+ if (!E) {
964
975
  n("update:modelValue", null);
965
976
  return;
966
977
  }
967
- const T = Number(D) / Math.pow(10, t.decimals);
968
- n("update:modelValue", T);
978
+ const N = Number(E) / Math.pow(10, t.decimals);
979
+ n("update:modelValue", N);
969
980
  }
970
- return (k, D) => f.value ? (o(), $(r(qt), {
981
+ return (k, E) => f.value ? (o(), $(r(Kt), {
971
982
  key: 0,
972
983
  class: "w-money-input"
973
984
  }, {
974
- default: Y(() => [
975
- i.value ? (o(), $(r(lt), { key: 0 }, {
976
- default: Y(() => [
985
+ default: J(() => [
986
+ i.value ? (o(), $(r(at), { key: 0 }, {
987
+ default: J(() => [
977
988
  Fe(F(i.value), 1)
978
989
  ]),
979
990
  _: 1
@@ -987,8 +998,8 @@ const vl = ["disabled"], pl = { class: "w-autocompletefk-toolbar" }, hl = { clas
987
998
  invalid: e.invalid,
988
999
  onInput: S
989
1000
  }, null, 8, ["model-value", "placeholder", "disabled", "invalid"]),
990
- e.suffix ? (o(), $(r(lt), { key: 1 }, {
991
- default: Y(() => [
1001
+ e.suffix ? (o(), $(r(at), { key: 1 }, {
1002
+ default: J(() => [
992
1003
  Fe(F(e.suffix), 1)
993
1004
  ]),
994
1005
  _: 1
@@ -1007,7 +1018,7 @@ const vl = ["disabled"], pl = { class: "w-autocompletefk-toolbar" }, hl = { clas
1007
1018
  onInput: S
1008
1019
  }, null, 8, ["model-value", "placeholder", "disabled", "invalid"]));
1009
1020
  }
1010
- }), Cl = { class: "w-imgcropper" }, Vl = ["src"], Sl = { class: "w-imgcropper-actions" }, Dl = ["accept"], El = { class: "w-imgcropper-stage" }, Pl = ["src"], Fl = { class: "w-imgcropper-zoom" }, We = 300, Il = /* @__PURE__ */ oe({
1021
+ }), Vl = { class: "w-imgcropper" }, Sl = ["src"], Dl = { class: "w-imgcropper-actions" }, El = ["accept"], Pl = { class: "w-imgcropper-stage" }, Fl = ["src"], Il = { class: "w-imgcropper-zoom" }, We = 300, Rl = /* @__PURE__ */ ie({
1011
1022
  __name: "WImageCropper",
1012
1023
  props: {
1013
1024
  modelValue: { default: null },
@@ -1020,124 +1031,124 @@ const vl = ["disabled"], pl = { class: "w-autocompletefk-toolbar" }, hl = { clas
1020
1031
  },
1021
1032
  emits: ["update:modelValue", "error"],
1022
1033
  setup(e, { emit: a }) {
1023
- const t = e, n = a, i = L(null);
1034
+ const t = e, n = a, i = T(null);
1024
1035
  Me(
1025
1036
  () => t.modelValue,
1026
1037
  (l) => {
1027
1038
  i.value && (URL.revokeObjectURL(i.value), i.value = null), l instanceof File && (i.value = URL.createObjectURL(l));
1028
1039
  },
1029
1040
  { immediate: !0 }
1030
- ), Dt(() => {
1041
+ ), Et(() => {
1031
1042
  i.value && URL.revokeObjectURL(i.value);
1032
1043
  });
1033
- const f = P(() => t.modelValue instanceof File ? i.value : typeof t.modelValue == "string" && t.modelValue ? t.modelValue : null), w = L(null);
1044
+ const f = P(() => t.modelValue instanceof File ? i.value : typeof t.modelValue == "string" && t.modelValue ? t.modelValue : null), w = T(null);
1034
1045
  function S() {
1035
1046
  var l;
1036
1047
  (l = w.value) == null || l.click();
1037
1048
  }
1038
1049
  function k(l) {
1039
1050
  const v = (t.accept || "").trim();
1040
- return !v || v === "*" || v.includes("image/*") ? l.type.startsWith("image/") : v.split(",").map((N) => N.trim()).filter(Boolean).some((N) => N.endsWith("/*") ? l.type.startsWith(N.slice(0, -1)) : N.startsWith(".") ? l.name.toLowerCase().endsWith(N.toLowerCase()) : l.type === N);
1041
- }
1042
- let D = "image.png", T = "image/png", b = null;
1043
- function j(l) {
1044
- var ce;
1045
- const v = l.target, N = (ce = v.files) == null ? void 0 : ce[0];
1046
- if (v.value = "", !N) return;
1047
- if (!k(N)) {
1051
+ return !v || v === "*" || v.includes("image/*") ? l.type.startsWith("image/") : v.split(",").map((B) => B.trim()).filter(Boolean).some((B) => B.endsWith("/*") ? l.type.startsWith(B.slice(0, -1)) : B.startsWith(".") ? l.name.toLowerCase().endsWith(B.toLowerCase()) : l.type === B);
1052
+ }
1053
+ let E = "image.png", N = "image/png", b = null;
1054
+ function q(l) {
1055
+ var re;
1056
+ const v = l.target, B = (re = v.files) == null ? void 0 : re[0];
1057
+ if (v.value = "", !B) return;
1058
+ if (!k(B)) {
1048
1059
  n("error", "Tipo de arquivo não suportado.");
1049
1060
  return;
1050
1061
  }
1051
- if (N.size > t.maxSize) {
1062
+ if (B.size > t.maxSize) {
1052
1063
  n("error", `Imagem acima do limite de ${(t.maxSize / 1048576).toFixed(1)}MB.`);
1053
1064
  return;
1054
1065
  }
1055
- D = N.name, T = N.type || "image/png";
1056
- const se = new FileReader();
1057
- se.onload = () => {
1058
- const M = new Image();
1059
- M.onload = () => {
1060
- b = M, I.value = M.naturalWidth, U.value = M.naturalHeight, z.value = 1, Z.value = M.src, x.x = (ae.value - he.value) / 2, x.y = (ue.value - ie.value) / 2, J.value = !0;
1061
- }, M.onerror = () => n("error", "Não foi possível carregar a imagem."), M.src = String(se.result);
1062
- }, se.onerror = () => n("error", "Falha ao ler o arquivo."), se.readAsDataURL(N);
1066
+ E = B.name, N = B.type || "image/png";
1067
+ const pe = new FileReader();
1068
+ pe.onload = () => {
1069
+ const L = new Image();
1070
+ L.onload = () => {
1071
+ b = L, I.value = L.naturalWidth, M.value = L.naturalHeight, z.value = 1, Z.value = L.src, x.x = (ae.value - se.value) / 2, x.y = (de.value - he.value) / 2, Y.value = !0;
1072
+ }, L.onerror = () => n("error", "Não foi possível carregar a imagem."), L.src = String(pe.result);
1073
+ }, pe.onerror = () => n("error", "Falha ao ler o arquivo."), pe.readAsDataURL(B);
1063
1074
  }
1064
1075
  function _() {
1065
1076
  n("update:modelValue", null);
1066
1077
  }
1067
- const J = L(!1), Z = L(""), I = L(0), U = L(0), z = L(1), x = Pe({ x: 0, y: 0 }), q = P(() => t.circular ? 1 : t.aspectRatio || 1), ae = P(() => q.value >= 1 ? We : Math.round(We * q.value)), ue = P(() => q.value >= 1 ? Math.round(We / q.value) : We), pe = P(
1068
- () => I.value && U.value ? Math.max(ae.value / I.value, ue.value / U.value) : 1
1069
- ), ne = P(() => pe.value * z.value), he = P(() => I.value * ne.value), ie = P(() => U.value * ne.value);
1078
+ const Y = T(!1), Z = T(""), I = T(0), M = T(0), z = T(1), x = Pe({ x: 0, y: 0 }), j = P(() => t.circular ? 1 : t.aspectRatio || 1), ae = P(() => j.value >= 1 ? We : Math.round(We * j.value)), de = P(() => j.value >= 1 ? Math.round(We / j.value) : We), Se = P(
1079
+ () => I.value && M.value ? Math.max(ae.value / I.value, de.value / M.value) : 1
1080
+ ), ue = P(() => Se.value * z.value), se = P(() => I.value * ue.value), he = P(() => M.value * ue.value);
1070
1081
  function ve() {
1071
- x.x = Math.min(0, Math.max(ae.value - he.value, x.x)), x.y = Math.min(0, Math.max(ue.value - ie.value, x.y));
1082
+ x.x = Math.min(0, Math.max(ae.value - se.value, x.x)), x.y = Math.min(0, Math.max(de.value - he.value, x.y));
1072
1083
  }
1073
1084
  Me(z, ve);
1074
- const be = P(() => ({
1075
- width: `${he.value}px`,
1076
- height: `${ie.value}px`,
1085
+ const ce = P(() => ({
1086
+ width: `${se.value}px`,
1087
+ height: `${he.value}px`,
1077
1088
  transform: `translate(${x.x}px, ${x.y}px)`
1078
- })), W = L(!1);
1079
- let Q = { x: 0, y: 0, ox: 0, oy: 0 };
1080
- function de(l) {
1081
- var v, N;
1082
- W.value = !0, (N = (v = l.currentTarget).setPointerCapture) == null || N.call(v, l.pointerId), Q = { x: l.clientX, y: l.clientY, ox: x.x, oy: x.y };
1089
+ })), K = T(!1);
1090
+ let oe = { x: 0, y: 0, ox: 0, oy: 0 };
1091
+ function te(l) {
1092
+ var v, B;
1093
+ K.value = !0, (B = (v = l.currentTarget).setPointerCapture) == null || B.call(v, l.pointerId), oe = { x: l.clientX, y: l.clientY, ox: x.x, oy: x.y };
1083
1094
  }
1084
1095
  function ye(l) {
1085
- W.value && (x.x = Q.ox + (l.clientX - Q.x), x.y = Q.oy + (l.clientY - Q.y), ve());
1096
+ K.value && (x.x = oe.ox + (l.clientX - oe.x), x.y = oe.oy + (l.clientY - oe.y), ve());
1086
1097
  }
1087
- function we() {
1088
- W.value = !1;
1098
+ function be() {
1099
+ K.value = !1;
1089
1100
  }
1090
1101
  function p() {
1091
- return t.circular ? "image/png" : T === "image/jpeg" || T === "image/png" || T === "image/webp" ? T : "image/png";
1102
+ return t.circular ? "image/png" : N === "image/jpeg" || N === "image/png" || N === "image/webp" ? N : "image/png";
1092
1103
  }
1093
1104
  function C(l) {
1094
1105
  const v = l === "image/png" ? "png" : l === "image/webp" ? "webp" : "jpg";
1095
- return `${D.replace(/\.[^.]+$/, "") || "image"}.${v}`;
1106
+ return `${E.replace(/\.[^.]+$/, "") || "image"}.${v}`;
1096
1107
  }
1097
- function E() {
1108
+ function D() {
1098
1109
  if (!b) return;
1099
- const l = ne.value, v = -x.x / l, N = -x.y / l, se = ae.value / l, ce = ue.value / l, M = document.createElement("canvas");
1100
- M.width = Math.max(1, Math.round(se)), M.height = Math.max(1, Math.round(ce));
1101
- const te = M.getContext("2d");
1102
- if (!te) {
1110
+ const l = ue.value, v = -x.x / l, B = -x.y / l, pe = ae.value / l, re = de.value / l, L = document.createElement("canvas");
1111
+ L.width = Math.max(1, Math.round(pe)), L.height = Math.max(1, Math.round(re));
1112
+ const Q = L.getContext("2d");
1113
+ if (!Q) {
1103
1114
  n("error", "Canvas indisponível neste ambiente.");
1104
1115
  return;
1105
1116
  }
1106
- t.circular && (te.beginPath(), te.ellipse(
1107
- M.width / 2,
1108
- M.height / 2,
1109
- M.width / 2,
1110
- M.height / 2,
1117
+ t.circular && (Q.beginPath(), Q.ellipse(
1118
+ L.width / 2,
1119
+ L.height / 2,
1120
+ L.width / 2,
1121
+ L.height / 2,
1111
1122
  0,
1112
1123
  0,
1113
1124
  Math.PI * 2
1114
- ), te.clip()), te.drawImage(b, v, N, se, ce, 0, 0, M.width, M.height);
1125
+ ), Q.clip()), Q.drawImage(b, v, B, pe, re, 0, 0, L.width, L.height);
1115
1126
  const ke = p();
1116
- M.toBlob(
1117
- (xe) => {
1118
- if (!xe) {
1127
+ L.toBlob(
1128
+ ($e) => {
1129
+ if (!$e) {
1119
1130
  n("error", "Falha ao processar a imagem.");
1120
1131
  return;
1121
1132
  }
1122
- n("update:modelValue", new File([xe], C(ke), { type: ke })), J.value = !1;
1133
+ n("update:modelValue", new File([$e], C(ke), { type: ke })), Y.value = !1;
1123
1134
  },
1124
1135
  ke,
1125
1136
  0.92
1126
1137
  );
1127
1138
  }
1128
- return (l, v) => (o(), u("div", Cl, [
1139
+ return (l, v) => (o(), d("div", Vl, [
1129
1140
  m("div", {
1130
1141
  class: ee(["w-imgcropper-preview", { "is-circular": e.circular, "is-empty": !f.value }]),
1131
1142
  style: ge({ width: `${e.width}px`, height: `${e.height}px` })
1132
1143
  }, [
1133
- f.value ? (o(), u(X, { key: 0 }, [
1144
+ f.value ? (o(), d(X, { key: 0 }, [
1134
1145
  m("img", {
1135
1146
  src: f.value,
1136
1147
  alt: "",
1137
1148
  class: "w-imgcropper-img"
1138
- }, null, 8, Vl),
1139
- m("div", Sl, [
1140
- V(r(O), {
1149
+ }, null, 8, Sl),
1150
+ m("div", Dl, [
1151
+ V(r(W), {
1141
1152
  type: "button",
1142
1153
  icon: "pi pi-pencil",
1143
1154
  rounded: "",
@@ -1145,7 +1156,7 @@ const vl = ["disabled"], pl = { class: "w-autocompletefk-toolbar" }, hl = { clas
1145
1156
  "aria-label": "Trocar imagem",
1146
1157
  onClick: S
1147
1158
  }),
1148
- V(r(O), {
1159
+ V(r(W), {
1149
1160
  type: "button",
1150
1161
  icon: "pi pi-trash",
1151
1162
  rounded: "",
@@ -1172,56 +1183,56 @@ const vl = ["disabled"], pl = { class: "w-autocompletefk-toolbar" }, hl = { clas
1172
1183
  type: "file",
1173
1184
  accept: e.accept,
1174
1185
  class: "w-imgcropper-file",
1175
- onChange: j
1176
- }, null, 40, Dl),
1177
- V(r(_e), {
1178
- visible: J.value,
1179
- "onUpdate:visible": v[2] || (v[2] = (N) => J.value = N),
1186
+ onChange: q
1187
+ }, null, 40, El),
1188
+ V(r(tt), {
1189
+ visible: Y.value,
1190
+ "onUpdate:visible": v[2] || (v[2] = (B) => Y.value = B),
1180
1191
  modal: "",
1181
1192
  header: "Ajustar imagem",
1182
1193
  "dismissable-mask": !1,
1183
1194
  style: { width: "auto" }
1184
1195
  }, {
1185
- footer: Y(() => [
1186
- V(r(O), {
1196
+ footer: J(() => [
1197
+ V(r(W), {
1187
1198
  type: "button",
1188
1199
  label: "Cancelar",
1189
1200
  text: "",
1190
- onClick: v[1] || (v[1] = (N) => J.value = !1)
1201
+ onClick: v[1] || (v[1] = (B) => Y.value = !1)
1191
1202
  }),
1192
- V(r(O), {
1203
+ V(r(W), {
1193
1204
  type: "button",
1194
1205
  label: "Confirmar",
1195
- onClick: E
1206
+ onClick: D
1196
1207
  })
1197
1208
  ]),
1198
- default: Y(() => [
1199
- m("div", El, [
1209
+ default: J(() => [
1210
+ m("div", Pl, [
1200
1211
  m("div", {
1201
1212
  class: ee(["w-imgcropper-viewport", { "is-circular": e.circular }]),
1202
- style: ge({ width: `${ae.value}px`, height: `${ue.value}px` }),
1203
- onPointerdown: de,
1213
+ style: ge({ width: `${ae.value}px`, height: `${de.value}px` }),
1214
+ onPointerdown: te,
1204
1215
  onPointermove: ye,
1205
- onPointerup: we,
1206
- onPointerleave: we
1216
+ onPointerup: be,
1217
+ onPointerleave: be
1207
1218
  }, [
1208
- Z.value ? (o(), u("img", {
1219
+ Z.value ? (o(), d("img", {
1209
1220
  key: 0,
1210
1221
  src: Z.value,
1211
1222
  alt: "",
1212
1223
  class: "w-imgcropper-cropimg",
1213
- style: ge(be.value),
1224
+ style: ge(ce.value),
1214
1225
  draggable: "false"
1215
- }, null, 12, Pl)) : g("", !0),
1226
+ }, null, 12, Fl)) : g("", !0),
1216
1227
  m("div", {
1217
1228
  class: ee(["w-imgcropper-stencil", { "is-circular": e.circular }])
1218
1229
  }, null, 2)
1219
1230
  ], 38),
1220
- m("div", Fl, [
1231
+ m("div", Il, [
1221
1232
  v[4] || (v[4] = m("i", { class: "pi pi-search-minus" }, null, -1)),
1222
- V(r(Kt), {
1233
+ V(r(Ht), {
1223
1234
  modelValue: z.value,
1224
- "onUpdate:modelValue": v[0] || (v[0] = (N) => z.value = N),
1235
+ "onUpdate:modelValue": v[0] || (v[0] = (B) => z.value = B),
1225
1236
  min: 1,
1226
1237
  max: 4,
1227
1238
  step: 0.01,
@@ -1240,13 +1251,13 @@ const vl = ["disabled"], pl = { class: "w-autocompletefk-toolbar" }, hl = { clas
1240
1251
  for (const [n, i] of a)
1241
1252
  t[n] = i;
1242
1253
  return t;
1243
- }, Rl = /* @__PURE__ */ Ml(Il, [["__scopeId", "data-v-95684d2d"]]), Al = { class: "w-transfer__pane" }, Ul = { class: "w-transfer__head" }, Bl = { class: "w-transfer__count" }, Tl = { class: "w-transfer__list" }, Nl = ["onClick"], Ll = {
1254
+ }, Al = /* @__PURE__ */ Ml(Rl, [["__scopeId", "data-v-95684d2d"]]), Ul = { class: "w-transfer__pane" }, Bl = { class: "w-transfer__head" }, Tl = { class: "w-transfer__count" }, Nl = { class: "w-transfer__list" }, Ll = ["onClick"], zl = {
1244
1255
  key: 0,
1245
1256
  class: "w-transfer__empty"
1246
- }, zl = { class: "w-transfer__controls" }, Ol = { class: "w-transfer__pane" }, Wl = { class: "w-transfer__head" }, jl = { class: "w-transfer__count" }, ql = { class: "w-transfer__list" }, Kl = ["onClick"], Hl = {
1257
+ }, Ol = { class: "w-transfer__controls" }, Wl = { class: "w-transfer__pane" }, jl = { class: "w-transfer__head" }, ql = { class: "w-transfer__count" }, Kl = { class: "w-transfer__list" }, Hl = ["onClick"], Gl = {
1247
1258
  key: 0,
1248
1259
  class: "w-transfer__empty"
1249
- }, Gl = /* @__PURE__ */ oe({
1260
+ }, Yl = /* @__PURE__ */ ie({
1250
1261
  __name: "WTransferList",
1251
1262
  props: {
1252
1263
  source: {},
@@ -1258,31 +1269,31 @@ const vl = ["disabled"], pl = { class: "w-autocompletefk-toolbar" }, hl = { clas
1258
1269
  },
1259
1270
  emits: ["update:selected"],
1260
1271
  setup(e, { emit: a }) {
1261
- const t = e, n = a, i = L(""), f = L(""), w = P(() => new Set(t.selected)), S = P(() => t.searchFields ?? [t.optionLabel]);
1262
- function k(U) {
1263
- return U[t.trackBy];
1272
+ const t = e, n = a, i = T(""), f = T(""), w = P(() => new Set(t.selected)), S = P(() => t.searchFields ?? [t.optionLabel]);
1273
+ function k(M) {
1274
+ return M[t.trackBy];
1264
1275
  }
1265
- function D(U) {
1266
- return String(U[t.optionLabel] ?? "");
1276
+ function E(M) {
1277
+ return String(M[t.optionLabel] ?? "");
1267
1278
  }
1268
- function T(U, z) {
1279
+ function N(M, z) {
1269
1280
  if (!z) return !0;
1270
1281
  const x = z.toLowerCase();
1271
1282
  return S.value.some(
1272
- (q) => String(U[q] ?? "").toLowerCase().includes(x)
1283
+ (j) => String(M[j] ?? "").toLowerCase().includes(x)
1273
1284
  );
1274
1285
  }
1275
1286
  const b = P(
1276
- () => t.source.filter((U) => !w.value.has(k(U)) && T(U, i.value))
1277
- ), j = P(
1278
- () => t.source.filter((U) => w.value.has(k(U)) && T(U, f.value))
1287
+ () => t.source.filter((M) => !w.value.has(k(M)) && N(M, i.value))
1288
+ ), q = P(
1289
+ () => t.source.filter((M) => w.value.has(k(M)) && N(M, f.value))
1279
1290
  );
1280
- function _(U) {
1281
- t.disabled || n("update:selected", [...t.selected, k(U)]);
1291
+ function _(M) {
1292
+ t.disabled || n("update:selected", [...t.selected, k(M)]);
1282
1293
  }
1283
- function J(U) {
1294
+ function Y(M) {
1284
1295
  if (t.disabled) return;
1285
- const z = k(U);
1296
+ const z = k(M);
1286
1297
  n(
1287
1298
  "update:selected",
1288
1299
  t.selected.filter((x) => x !== z)
@@ -1294,16 +1305,16 @@ const vl = ["disabled"], pl = { class: "w-autocompletefk-toolbar" }, hl = { clas
1294
1305
  function I() {
1295
1306
  t.disabled || n("update:selected", []);
1296
1307
  }
1297
- return (U, z) => (o(), u("div", {
1308
+ return (M, z) => (o(), d("div", {
1298
1309
  class: ee(["w-transfer", { "w-transfer--disabled": e.disabled }])
1299
1310
  }, [
1300
- m("div", Al, [
1301
- m("div", Ul, [
1311
+ m("div", Ul, [
1312
+ m("div", Bl, [
1302
1313
  z[2] || (z[2] = m("span", { class: "w-transfer__title" }, "Disponíveis", -1)),
1303
- m("span", Bl, F(b.value.length), 1)
1314
+ m("span", Tl, F(b.value.length), 1)
1304
1315
  ]),
1305
1316
  V(r(Be), { class: "w-transfer__search" }, {
1306
- default: Y(() => [
1317
+ default: J(() => [
1307
1318
  V(r(Te), { class: "pi pi-search" }),
1308
1319
  V(r(fe), {
1309
1320
  modelValue: i.value,
@@ -1314,20 +1325,20 @@ const vl = ["disabled"], pl = { class: "w-autocompletefk-toolbar" }, hl = { clas
1314
1325
  ]),
1315
1326
  _: 1
1316
1327
  }),
1317
- m("ul", Tl, [
1318
- (o(!0), u(X, null, le(b.value, (x) => (o(), u("li", {
1328
+ m("ul", Nl, [
1329
+ (o(!0), d(X, null, le(b.value, (x) => (o(), d("li", {
1319
1330
  key: `a-${k(x)}`,
1320
1331
  class: "w-transfer__item",
1321
- onClick: (q) => _(x)
1332
+ onClick: (j) => _(x)
1322
1333
  }, [
1323
- m("span", null, F(D(x)), 1),
1334
+ m("span", null, F(E(x)), 1),
1324
1335
  z[3] || (z[3] = m("i", { class: "pi pi-angle-right" }, null, -1))
1325
- ], 8, Nl))), 128)),
1326
- b.value.length ? g("", !0) : (o(), u("li", Ll, "Nenhum item"))
1336
+ ], 8, Ll))), 128)),
1337
+ b.value.length ? g("", !0) : (o(), d("li", zl, "Nenhum item"))
1327
1338
  ])
1328
1339
  ]),
1329
- m("div", zl, [
1330
- V(r(O), {
1340
+ m("div", Ol, [
1341
+ V(r(W), {
1331
1342
  type: "button",
1332
1343
  icon: "pi pi-angle-double-right",
1333
1344
  text: "",
@@ -1335,7 +1346,7 @@ const vl = ["disabled"], pl = { class: "w-autocompletefk-toolbar" }, hl = { clas
1335
1346
  disabled: e.disabled || !b.value.length,
1336
1347
  onClick: Z
1337
1348
  }, null, 8, ["disabled"]),
1338
- V(r(O), {
1349
+ V(r(W), {
1339
1350
  type: "button",
1340
1351
  icon: "pi pi-angle-double-left",
1341
1352
  text: "",
@@ -1344,13 +1355,13 @@ const vl = ["disabled"], pl = { class: "w-autocompletefk-toolbar" }, hl = { clas
1344
1355
  onClick: I
1345
1356
  }, null, 8, ["disabled"])
1346
1357
  ]),
1347
- m("div", Ol, [
1348
- m("div", Wl, [
1358
+ m("div", Wl, [
1359
+ m("div", jl, [
1349
1360
  z[4] || (z[4] = m("span", { class: "w-transfer__title" }, "Selecionados", -1)),
1350
- m("span", jl, F(j.value.length), 1)
1361
+ m("span", ql, F(q.value.length), 1)
1351
1362
  ]),
1352
1363
  V(r(Be), { class: "w-transfer__search" }, {
1353
- default: Y(() => [
1364
+ default: J(() => [
1354
1365
  V(r(Te), { class: "pi pi-search" }),
1355
1366
  V(r(fe), {
1356
1367
  modelValue: f.value,
@@ -1361,22 +1372,22 @@ const vl = ["disabled"], pl = { class: "w-autocompletefk-toolbar" }, hl = { clas
1361
1372
  ]),
1362
1373
  _: 1
1363
1374
  }),
1364
- m("ul", ql, [
1365
- (o(!0), u(X, null, le(j.value, (x) => (o(), u("li", {
1375
+ m("ul", Kl, [
1376
+ (o(!0), d(X, null, le(q.value, (x) => (o(), d("li", {
1366
1377
  key: `s-${k(x)}`,
1367
1378
  class: "w-transfer__item",
1368
- onClick: (q) => J(x)
1379
+ onClick: (j) => Y(x)
1369
1380
  }, [
1370
1381
  z[5] || (z[5] = m("i", { class: "pi pi-angle-left" }, null, -1)),
1371
- m("span", null, F(D(x)), 1)
1372
- ], 8, Kl))), 128)),
1373
- j.value.length ? g("", !0) : (o(), u("li", Hl, "Nenhum item"))
1382
+ m("span", null, F(E(x)), 1)
1383
+ ], 8, Hl))), 128)),
1384
+ q.value.length ? g("", !0) : (o(), d("li", Gl, "Nenhum item"))
1374
1385
  ])
1375
1386
  ])
1376
1387
  ], 2));
1377
1388
  }
1378
1389
  });
1379
- async function Yl(e) {
1390
+ async function Jl(e) {
1380
1391
  const a = e.replace(/\D/g, "");
1381
1392
  if (a.length !== 8) return null;
1382
1393
  try {
@@ -1388,34 +1399,34 @@ async function Yl(e) {
1388
1399
  return null;
1389
1400
  }
1390
1401
  }
1391
- const Jl = { class: "w-crud-form" }, Xl = {
1402
+ const Xl = { class: "w-crud-form" }, Zl = {
1392
1403
  key: 0,
1393
1404
  class: "w-crud-form-group-header"
1394
- }, Zl = { class: "w-crud-form-group-title" }, Ql = {
1405
+ }, Ql = { class: "w-crud-form-group-title" }, _l = {
1395
1406
  key: 0,
1396
1407
  class: "w-crud-form-group-desc"
1397
- }, _l = { class: "w-crud-form-switch-label" }, ea = { class: "w-crud-form-label" }, ta = {
1408
+ }, ea = { class: "w-crud-form-switch-label" }, ta = { class: "w-crud-form-label" }, la = {
1398
1409
  key: 0,
1399
1410
  class: "w-crud-form-required"
1400
- }, la = { class: "w-crud-form-color-row" }, aa = { class: "w-crud-form-label" }, oa = {
1411
+ }, aa = { class: "w-crud-form-color-row" }, oa = { class: "w-crud-form-label" }, na = {
1401
1412
  key: 0,
1402
1413
  class: "w-crud-form-error"
1403
- }, na = { class: "w-crud-form-label" }, ia = {
1414
+ }, ia = { class: "w-crud-form-label" }, sa = {
1404
1415
  key: 0,
1405
1416
  class: "w-crud-form-required"
1406
- }, sa = { class: "w-crud-form-label" }, ra = {
1417
+ }, ra = { class: "w-crud-form-label" }, ua = {
1407
1418
  key: 0,
1408
1419
  class: "w-crud-form-required"
1409
- }, ua = {
1420
+ }, da = {
1410
1421
  key: 1,
1411
1422
  class: "pi pi-spin pi-spinner w-crud-form-cep-spinner"
1412
- }, da = {
1423
+ }, ca = {
1413
1424
  key: 16,
1414
1425
  class: "w-crud-form-cep-error"
1415
- }, ca = {
1426
+ }, ma = {
1416
1427
  key: 17,
1417
1428
  class: "w-crud-form-error"
1418
- }, ma = /* @__PURE__ */ oe({
1429
+ }, fa = /* @__PURE__ */ ie({
1419
1430
  __name: "WFormRenderer",
1420
1431
  props: {
1421
1432
  fields: {},
@@ -1427,21 +1438,21 @@ const Jl = { class: "w-crud-form" }, Xl = {
1427
1438
  emits: ["update:field"],
1428
1439
  setup(e, { expose: a, emit: t }) {
1429
1440
  const n = e, i = t, f = Pe({}), w = Pe({}), S = Pe({}), k = Pe({});
1430
- function D(p, C) {
1431
- const E = C.target.value, l = E.replace(/\D/g, "");
1432
- i("update:field", p.field, E), S[p.field] = null, k[p.field] && (clearTimeout(k[p.field]), k[p.field] = null), l.length === 8 && (k[p.field] = setTimeout(async () => {
1441
+ function E(p, C) {
1442
+ const D = C.target.value, l = D.replace(/\D/g, "");
1443
+ i("update:field", p.field, D), S[p.field] = null, k[p.field] && (clearTimeout(k[p.field]), k[p.field] = null), l.length === 8 && (k[p.field] = setTimeout(async () => {
1433
1444
  w[p.field] = !0, S[p.field] = null;
1434
1445
  try {
1435
- const v = await Yl(l);
1446
+ const v = await Jl(l);
1436
1447
  if (!v)
1437
1448
  S[p.field] = "CEP não encontrado. Preencha os campos manualmente.";
1438
1449
  else {
1439
- const N = p.cepFields || {}, se = Object.keys(N);
1440
- for (const ce of se) {
1441
- const M = N[ce];
1442
- if (!M) continue;
1443
- const te = n.formData[M];
1444
- (te == null || te === "") && i("update:field", M, v[ce] ?? "");
1450
+ const B = p.cepFields || {}, pe = Object.keys(B);
1451
+ for (const re of pe) {
1452
+ const L = B[re];
1453
+ if (!L) continue;
1454
+ const Q = n.formData[L];
1455
+ (Q == null || Q === "") && i("update:field", L, v[re] ?? "");
1445
1456
  }
1446
1457
  }
1447
1458
  } finally {
@@ -1449,22 +1460,22 @@ const Jl = { class: "w-crud-form" }, Xl = {
1449
1460
  }
1450
1461
  }, 400));
1451
1462
  }
1452
- const T = P(
1463
+ const N = P(
1453
1464
  () => n.fields.filter((p) => p.visible === void 0 || p.visible === !0 ? !0 : typeof p.visible == "function" ? p.visible(n.formData, n.isEditing) : p.visible)
1454
1465
  );
1455
1466
  function b(p) {
1456
1467
  return n.disabled || p.disabledOnEdit && n.isEditing ? !0 : typeof p.disabled == "function" ? p.disabled(n.formData, n.isEditing) : !!p.disabled;
1457
1468
  }
1458
- function j(p) {
1459
- return Et(p) ? p.value : p;
1469
+ function q(p) {
1470
+ return Pt(p) ? p.value : p;
1460
1471
  }
1461
1472
  const _ = P(() => {
1462
1473
  const p = n.isEditing ? "edit" : "create", C = n.fields.find((l) => l.autofocus === !0 || l.autofocus === p);
1463
1474
  if (C) return C.field;
1464
- const E = T.value.find((l) => !(l.type === "switch" || l.type === "fk" || l.type === "select" || l.type === "image" || l.disabled === !0 || l.disabledOnEdit && n.isEditing));
1465
- return (E == null ? void 0 : E.field) ?? null;
1475
+ const D = N.value.find((l) => !(l.type === "switch" || l.type === "fk" || l.type === "select" || l.type === "image" || l.disabled === !0 || l.disabledOnEdit && n.isEditing));
1476
+ return (D == null ? void 0 : D.field) ?? null;
1466
1477
  });
1467
- function J(p) {
1478
+ function Y(p) {
1468
1479
  return p.field === _.value;
1469
1480
  }
1470
1481
  function Z(p) {
@@ -1476,38 +1487,38 @@ const Jl = { class: "w-crud-form" }, Xl = {
1476
1487
  const C = String(p).replace(/\D/g, "").slice(0, 14);
1477
1488
  return C.length <= 11 ? C.replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d{1,2})$/, "$1-$2") : C.replace(/(\d{2})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1/$2").replace(/(\d{4})(\d{1,2})$/, "$1-$2");
1478
1489
  }
1479
- function U(p, C) {
1480
- const E = C.target.value.replace(/\D/g, "").slice(0, 14);
1481
- i("update:field", p, E);
1490
+ function M(p, C) {
1491
+ const D = C.target.value.replace(/\D/g, "").slice(0, 14);
1492
+ i("update:field", p, D);
1482
1493
  }
1483
1494
  const z = Pe({});
1484
1495
  function x(p) {
1485
1496
  const C = n.formData[p.field];
1486
1497
  if (C == null) return null;
1487
- const E = p.optionValue || "value";
1488
- return (j(p.options) || []).find((v) => v[E] === C) ?? null;
1498
+ const D = p.optionValue || "value";
1499
+ return (q(p.options) || []).find((v) => v[D] === C) ?? null;
1489
1500
  }
1490
- function q(p) {
1501
+ function j(p) {
1491
1502
  return z[p.field] || [];
1492
1503
  }
1493
1504
  function ae(p, C) {
1494
- const E = (C.query || "").toLowerCase(), l = j(p.options) || [], v = p.optionLabel || "label";
1505
+ const D = (C.query || "").toLowerCase(), l = q(p.options) || [], v = p.optionLabel || "label";
1495
1506
  z[p.field] = l.filter(
1496
- (N) => String(N[v] || "").toLowerCase().includes(E)
1507
+ (B) => String(B[v] || "").toLowerCase().includes(D)
1497
1508
  );
1498
1509
  }
1499
- function ue(p, C) {
1500
- const E = p.optionValue || "value";
1501
- i("update:field", p.field, C.value[E]);
1510
+ function de(p, C) {
1511
+ const D = p.optionValue || "value";
1512
+ i("update:field", p.field, C.value[D]);
1502
1513
  }
1503
- function pe(p) {
1514
+ function Se(p) {
1504
1515
  const C = n.formData[p.field];
1505
1516
  return C ? String(C).replace("#", "") : "FFFFFF";
1506
1517
  }
1507
- function ne(p, C) {
1518
+ function ue(p, C) {
1508
1519
  i("update:field", p.field, `#${C}`);
1509
1520
  }
1510
- function he(p) {
1521
+ function se(p) {
1511
1522
  const C = p.dependsOn;
1512
1523
  return C ? (Array.isArray(C) ? C : [C]).map((l) => ({
1513
1524
  field: l.param || l.field,
@@ -1515,7 +1526,7 @@ const Jl = { class: "w-crud-form" }, Xl = {
1515
1526
  required: l.required
1516
1527
  })) : void 0;
1517
1528
  }
1518
- function ie(p) {
1529
+ function he(p) {
1519
1530
  if (typeof p.validate == "function") {
1520
1531
  const C = p.validate(n.formData[p.field]);
1521
1532
  f[p.field] = C || null;
@@ -1525,89 +1536,89 @@ const Jl = { class: "w-crud-form" }, Xl = {
1525
1536
  const p = [];
1526
1537
  for (const C of n.fields)
1527
1538
  if (typeof C.validate == "function") {
1528
- const E = C.validate(n.formData[C.field]);
1529
- f[C.field] = E || null, E && p.push(E);
1539
+ const D = C.validate(n.formData[C.field]);
1540
+ f[C.field] = D || null, D && p.push(D);
1530
1541
  }
1531
1542
  return p;
1532
1543
  }
1533
- function be() {
1544
+ function ce() {
1534
1545
  Object.keys(f).forEach((p) => delete f[p]);
1535
1546
  }
1536
- function W(p) {
1547
+ function K(p) {
1537
1548
  return Math.max(1, Math.floor(p.columns ?? n.columns));
1538
1549
  }
1539
- function Q(p, C) {
1540
- const E = p.colSpan;
1541
- return E == null || E === "full" ? C : E === 0.5 ? Math.max(1, Math.round(C / 2)) : Math.min(Math.max(1, Math.floor(E)), C);
1550
+ function oe(p, C) {
1551
+ const D = p.colSpan;
1552
+ return D == null || D === "full" ? C : D === 0.5 ? Math.max(1, Math.round(C / 2)) : Math.min(Math.max(1, Math.floor(D)), C);
1542
1553
  }
1543
- function de(p, C) {
1544
- return { "--w-col-span": Q(p, W(C)) };
1554
+ function te(p, C) {
1555
+ return { "--w-col-span": oe(p, K(C)) };
1545
1556
  }
1546
1557
  function ye(p, C) {
1547
- return Q(p, W(C)) === W(C) ? "w-crud-form-col-full" : "w-crud-form-col-half";
1548
- }
1549
- const we = P(() => {
1550
- var l, v, N, se, ce;
1551
- const p = /* @__PURE__ */ new Map(), C = [], E = /* @__PURE__ */ new Map();
1552
- for (const M of T.value) {
1553
- const te = ((l = M.fieldGroup) == null ? void 0 : l.id) ?? "__default__";
1554
- p.has(te) || (p.set(te, {
1555
- id: te,
1556
- title: (v = M.fieldGroup) == null ? void 0 : v.title,
1557
- description: (N = M.fieldGroup) == null ? void 0 : N.description,
1558
- columns: (se = M.fieldGroup) == null ? void 0 : se.columns,
1558
+ return oe(p, K(C)) === K(C) ? "w-crud-form-col-full" : "w-crud-form-col-half";
1559
+ }
1560
+ const be = P(() => {
1561
+ var l, v, B, pe, re;
1562
+ const p = /* @__PURE__ */ new Map(), C = [], D = /* @__PURE__ */ new Map();
1563
+ for (const L of N.value) {
1564
+ const Q = ((l = L.fieldGroup) == null ? void 0 : l.id) ?? "__default__";
1565
+ p.has(Q) || (p.set(Q, {
1566
+ id: Q,
1567
+ title: (v = L.fieldGroup) == null ? void 0 : v.title,
1568
+ description: (B = L.fieldGroup) == null ? void 0 : B.description,
1569
+ columns: (pe = L.fieldGroup) == null ? void 0 : pe.columns,
1559
1570
  fields: []
1560
- }), C.push(te), ((ce = M.fieldGroup) == null ? void 0 : ce.order) != null && E.set(te, M.fieldGroup.order)), p.get(te).fields.push(M);
1571
+ }), C.push(Q), ((re = L.fieldGroup) == null ? void 0 : re.order) != null && D.set(Q, L.fieldGroup.order)), p.get(Q).fields.push(L);
1561
1572
  }
1562
- return C.slice().sort((M, te) => {
1563
- const ke = E.get(M), xe = E.get(te);
1564
- return ke != null && xe != null ? ke - xe : ke != null ? -1 : xe != null ? 1 : C.indexOf(M) - C.indexOf(te);
1565
- }).map((M) => p.get(M));
1573
+ return C.slice().sort((L, Q) => {
1574
+ const ke = D.get(L), $e = D.get(Q);
1575
+ return ke != null && $e != null ? ke - $e : ke != null ? -1 : $e != null ? 1 : C.indexOf(L) - C.indexOf(Q);
1576
+ }).map((L) => p.get(L));
1566
1577
  });
1567
- return a({ validateAll: ve, clearErrors: be }), (p, C) => (o(), u("div", Jl, [
1568
- (o(!0), u(X, null, le(we.value, (E) => (o(), u("div", {
1569
- key: E.id,
1578
+ return a({ validateAll: ve, clearErrors: ce }), (p, C) => (o(), d("div", Xl, [
1579
+ (o(!0), d(X, null, le(be.value, (D) => (o(), d("div", {
1580
+ key: D.id,
1570
1581
  class: "w-crud-form-group"
1571
1582
  }, [
1572
- E.title ? (o(), u("div", Xl, [
1573
- m("h3", Zl, F(E.title), 1),
1574
- E.description ? (o(), u("p", Ql, F(E.description), 1)) : g("", !0)
1583
+ D.title ? (o(), d("div", Zl, [
1584
+ m("h3", Ql, F(D.title), 1),
1585
+ D.description ? (o(), d("p", _l, F(D.description), 1)) : g("", !0)
1575
1586
  ])) : g("", !0),
1576
1587
  m("div", {
1577
1588
  class: "w-crud-form-fields",
1578
- style: ge({ "--w-form-cols": W(E) })
1589
+ style: ge({ "--w-form-cols": K(D) })
1579
1590
  }, [
1580
- (o(!0), u(X, null, le(E.fields, (l) => A(p.$slots, `field-${l.field}`, {
1591
+ (o(!0), d(X, null, le(D.fields, (l) => A(p.$slots, `field-${l.field}`, {
1581
1592
  field: l,
1582
1593
  formData: e.formData,
1583
1594
  isEditing: e.isEditing,
1584
- setFormField: (v, N) => i("update:field", v, N)
1595
+ setFormField: (v, B) => i("update:field", v, B)
1585
1596
  }, () => [
1586
- l.type === "switch" ? (o(), u("div", {
1597
+ l.type === "switch" ? (o(), d("div", {
1587
1598
  key: 0,
1588
1599
  class: "w-crud-form-switch",
1589
- style: ge(de(l, E))
1600
+ style: ge(te(l, D))
1590
1601
  }, [
1591
- V(r(zt), {
1602
+ V(r(Ot), {
1592
1603
  "model-value": e.formData[l.field],
1593
1604
  disabled: b(l),
1594
1605
  "onUpdate:modelValue": (v) => i("update:field", l.field, v)
1595
1606
  }, null, 8, ["model-value", "disabled", "onUpdate:modelValue"]),
1596
- m("label", _l, F(l.switchLabel || l.label), 1)
1597
- ], 4)) : l.type === "color" ? (o(), u("div", {
1607
+ m("label", ea, F(l.switchLabel || l.label), 1)
1608
+ ], 4)) : l.type === "color" ? (o(), d("div", {
1598
1609
  key: 1,
1599
- class: ee(ye(l, E)),
1600
- style: ge(de(l, E))
1610
+ class: ee(ye(l, D)),
1611
+ style: ge(te(l, D))
1601
1612
  }, [
1602
- m("label", ea, [
1613
+ m("label", ta, [
1603
1614
  Fe(F(l.label) + " ", 1),
1604
- l.required ? (o(), u("span", ta, "*")) : g("", !0)
1615
+ l.required ? (o(), d("span", la, "*")) : g("", !0)
1605
1616
  ]),
1606
- m("div", la, [
1607
- V(r(Ot), {
1608
- "model-value": pe(l),
1617
+ m("div", aa, [
1618
+ V(r(Wt), {
1619
+ "model-value": Se(l),
1609
1620
  disabled: b(l),
1610
- "onUpdate:modelValue": (v) => ne(l, v)
1621
+ "onUpdate:modelValue": (v) => ue(l, v)
1611
1622
  }, null, 8, ["model-value", "disabled", "onUpdate:modelValue"]),
1612
1623
  V(r(fe), {
1613
1624
  "model-value": e.formData[l.field],
@@ -1618,17 +1629,17 @@ const Jl = { class: "w-crud-form" }, Xl = {
1618
1629
  "onUpdate:modelValue": (v) => i("update:field", l.field, v)
1619
1630
  }, null, 8, ["model-value", "disabled", "onUpdate:modelValue"])
1620
1631
  ])
1621
- ], 6)) : l.type === "image" ? (o(), u("div", {
1632
+ ], 6)) : l.type === "image" ? (o(), d("div", {
1622
1633
  key: 2,
1623
- class: ee(ye(l, E)),
1624
- style: ge(de(l, E))
1634
+ class: ee(ye(l, D)),
1635
+ style: ge(te(l, D))
1625
1636
  }, [
1626
- m("label", aa, F(l.label), 1),
1637
+ m("label", oa, F(l.label), 1),
1627
1638
  A(p.$slots, `image-${l.field}`, {
1628
1639
  field: l,
1629
1640
  formData: e.formData
1630
1641
  }, () => [
1631
- V(Rl, {
1642
+ V(Al, {
1632
1643
  "model-value": e.formData[l.field],
1633
1644
  accept: l.accept || "image/*",
1634
1645
  "onUpdate:modelValue": (v) => i("update:field", l.field, v),
@@ -1637,18 +1648,18 @@ const Jl = { class: "w-crud-form" }, Xl = {
1637
1648
  }
1638
1649
  }, null, 8, ["model-value", "accept", "onUpdate:modelValue", "onError"])
1639
1650
  ]),
1640
- f[l.field] ? (o(), u("small", oa, F(f[l.field]), 1)) : g("", !0)
1641
- ], 6)) : l.type === "transfer" ? (o(), u("div", {
1651
+ f[l.field] ? (o(), d("small", na, F(f[l.field]), 1)) : g("", !0)
1652
+ ], 6)) : l.type === "transfer" ? (o(), d("div", {
1642
1653
  key: 3,
1643
- class: ee(ye(l, E)),
1644
- style: ge(de(l, E))
1654
+ class: ee(ye(l, D)),
1655
+ style: ge(te(l, D))
1645
1656
  }, [
1646
- m("label", na, [
1657
+ m("label", ia, [
1647
1658
  Fe(F(l.label) + " ", 1),
1648
- l.required ? (o(), u("span", ia, "*")) : g("", !0)
1659
+ l.required ? (o(), d("span", sa, "*")) : g("", !0)
1649
1660
  ]),
1650
- V(Gl, {
1651
- source: j(l.options) || [],
1661
+ V(Yl, {
1662
+ source: q(l.options) || [],
1652
1663
  selected: e.formData[l.field] || [],
1653
1664
  "track-by": l.optionValue || "id",
1654
1665
  "option-label": l.optionLabel || "nome",
@@ -1656,21 +1667,21 @@ const Jl = { class: "w-crud-form" }, Xl = {
1656
1667
  disabled: b(l),
1657
1668
  "onUpdate:selected": (v) => i("update:field", l.field, v)
1658
1669
  }, null, 8, ["source", "selected", "track-by", "option-label", "search-fields", "disabled", "onUpdate:selected"])
1659
- ], 6)) : (o(), u("div", {
1670
+ ], 6)) : (o(), d("div", {
1660
1671
  key: 4,
1661
- class: ee(ye(l, E)),
1662
- style: ge(de(l, E))
1672
+ class: ee(ye(l, D)),
1673
+ style: ge(te(l, D))
1663
1674
  }, [
1664
- m("label", sa, [
1675
+ m("label", ra, [
1665
1676
  Fe(F(l.label) + " ", 1),
1666
- l.required ? (o(), u("span", ra, "*")) : g("", !0),
1667
- w[l.field] ? (o(), u("i", ua)) : g("", !0)
1677
+ l.required ? (o(), d("span", ua, "*")) : g("", !0),
1678
+ w[l.field] ? (o(), d("i", da)) : g("", !0)
1668
1679
  ]),
1669
1680
  (!l.type || l.type === "text") && l.mask ? me((o(), $(r(fe), {
1670
1681
  key: 0,
1671
1682
  "model-value": e.formData[l.field],
1672
1683
  fluid: "",
1673
- autofocus: J(l) || void 0,
1684
+ autofocus: Y(l) || void 0,
1674
1685
  placeholder: l.placeholder,
1675
1686
  disabled: b(l),
1676
1687
  "onUpdate:modelValue": (v) => i("update:field", l.field, v)
@@ -1680,7 +1691,7 @@ const Jl = { class: "w-crud-form" }, Xl = {
1680
1691
  key: 1,
1681
1692
  "model-value": e.formData[l.field],
1682
1693
  fluid: "",
1683
- autofocus: J(l) || void 0,
1694
+ autofocus: Y(l) || void 0,
1684
1695
  placeholder: l.placeholder,
1685
1696
  disabled: b(l),
1686
1697
  "onUpdate:modelValue": (v) => i("update:field", l.field, v)
@@ -1689,11 +1700,11 @@ const Jl = { class: "w-crud-form" }, Xl = {
1689
1700
  "model-value": e.formData[l.field],
1690
1701
  type: "email",
1691
1702
  fluid: "",
1692
- autofocus: J(l) || void 0,
1703
+ autofocus: Y(l) || void 0,
1693
1704
  placeholder: l.placeholder,
1694
1705
  disabled: b(l),
1695
1706
  "onUpdate:modelValue": (v) => i("update:field", l.field, v)
1696
- }, null, 8, ["model-value", "autofocus", "placeholder", "disabled", "onUpdate:modelValue"])) : l.type === "password" ? (o(), $(r(Wt), {
1707
+ }, null, 8, ["model-value", "autofocus", "placeholder", "disabled", "onUpdate:modelValue"])) : l.type === "password" ? (o(), $(r(jt), {
1697
1708
  key: 3,
1698
1709
  "model-value": e.formData[l.field],
1699
1710
  fluid: "",
@@ -1716,7 +1727,7 @@ const Jl = { class: "w-crud-form" }, Xl = {
1716
1727
  placeholder: l.placeholder,
1717
1728
  disabled: b(l),
1718
1729
  "onUpdate:modelValue": (v) => i("update:field", l.field, v)
1719
- }, null, 8, ["model-value", "min", "max", "min-fraction-digits", "max-fraction-digits", "suffix", "prefix", "placeholder", "disabled", "onUpdate:modelValue"])) : l.type === "currency" && l.fillFromRight ? (o(), $(xl, {
1730
+ }, null, 8, ["model-value", "min", "max", "min-fraction-digits", "max-fraction-digits", "suffix", "prefix", "placeholder", "disabled", "onUpdate:modelValue"])) : l.type === "currency" && l.fillFromRight ? (o(), $(Cl, {
1720
1731
  key: 5,
1721
1732
  "model-value": e.formData[l.field],
1722
1733
  decimals: l.decimals ?? 2,
@@ -1738,11 +1749,11 @@ const Jl = { class: "w-crud-form" }, Xl = {
1738
1749
  placeholder: l.placeholder,
1739
1750
  disabled: b(l),
1740
1751
  "onUpdate:modelValue": (v) => i("update:field", l.field, v)
1741
- }, null, 8, ["model-value", "min", "max", "placeholder", "disabled", "onUpdate:modelValue"])) : l.type === "select" ? (o(), $(r(Xe), {
1752
+ }, null, 8, ["model-value", "min", "max", "placeholder", "disabled", "onUpdate:modelValue"])) : l.type === "select" ? (o(), $(r(Ze), {
1742
1753
  key: 7,
1743
1754
  "model-value": e.formData[l.field],
1744
1755
  fluid: "",
1745
- options: j(l.options),
1756
+ options: q(l.options),
1746
1757
  "option-label": l.optionLabel || "label",
1747
1758
  "option-value": l.optionValue || "value",
1748
1759
  "show-clear": l.showClear !== !1,
@@ -1753,19 +1764,20 @@ const Jl = { class: "w-crud-form" }, Xl = {
1753
1764
  key: 8,
1754
1765
  "model-value": x(l),
1755
1766
  fluid: "",
1756
- suggestions: q(l),
1767
+ suggestions: j(l),
1757
1768
  "option-label": l.optionLabel || "label",
1758
1769
  placeholder: l.placeholder,
1759
1770
  disabled: b(l),
1760
1771
  onComplete: (v) => ae(l, v),
1761
- onItemSelect: (v) => ue(l, v),
1772
+ onItemSelect: (v) => de(l, v),
1762
1773
  onClear: (v) => i("update:field", l.field, null)
1763
- }, null, 8, ["model-value", "suggestions", "option-label", "placeholder", "disabled", "onComplete", "onItemSelect", "onClear"])) : l.type === "fk" ? (o(), $(bl, {
1774
+ }, null, 8, ["model-value", "suggestions", "option-label", "placeholder", "disabled", "onComplete", "onItemSelect", "onClear"])) : l.type === "fk" ? (o(), $(wl, {
1764
1775
  key: 9,
1765
1776
  "model-value": e.formData[l.field],
1777
+ autofocus: Y(l) || void 0,
1766
1778
  endpoint: l.endpoint,
1767
1779
  "endpoint-params": l.endpointParams,
1768
- drilldown: he(l),
1780
+ drilldown: se(l),
1769
1781
  "blocked-placeholder": l.blockedPlaceholder,
1770
1782
  "option-label": l.optionLabel || "nome",
1771
1783
  placeholder: l.placeholder,
@@ -1775,7 +1787,7 @@ const Jl = { class: "w-crud-form" }, Xl = {
1775
1787
  "crud-fields": l.crudFields,
1776
1788
  "crud-columns": l.crudColumns,
1777
1789
  "onUpdate:modelValue": (v) => i("update:field", l.field, v)
1778
- }, null, 8, ["model-value", "endpoint", "endpoint-params", "drilldown", "blocked-placeholder", "option-label", "placeholder", "disabled", "show-clear", "dialog-header", "crud-fields", "crud-columns", "onUpdate:modelValue"])) : l.type === "date" ? (o(), $(it, {
1790
+ }, null, 8, ["model-value", "autofocus", "endpoint", "endpoint-params", "drilldown", "blocked-placeholder", "option-label", "placeholder", "disabled", "show-clear", "dialog-header", "crud-fields", "crud-columns", "onUpdate:modelValue"])) : l.type === "date" ? (o(), $(st, {
1779
1791
  key: 10,
1780
1792
  "model-value": e.formData[l.field],
1781
1793
  "value-format": "date",
@@ -1785,7 +1797,7 @@ const Jl = { class: "w-crud-form" }, Xl = {
1785
1797
  placeholder: l.placeholder,
1786
1798
  disabled: b(l),
1787
1799
  "onUpdate:modelValue": (v) => i("update:field", l.field, v)
1788
- }, null, 8, ["model-value", "autonow", "min-date", "max-date", "placeholder", "disabled", "onUpdate:modelValue"])) : l.type === "datetime" ? (o(), $(it, {
1800
+ }, null, 8, ["model-value", "autonow", "min-date", "max-date", "placeholder", "disabled", "onUpdate:modelValue"])) : l.type === "datetime" ? (o(), $(st, {
1789
1801
  key: 11,
1790
1802
  "model-value": e.formData[l.field],
1791
1803
  "value-format": "date",
@@ -1804,8 +1816,8 @@ const Jl = { class: "w-crud-form" }, Xl = {
1804
1816
  placeholder: l.placeholder || "000.000.000-00",
1805
1817
  disabled: b(l),
1806
1818
  invalid: !!f[l.field],
1807
- onInput: (v) => U(l.field, v),
1808
- onBlur: (v) => ie(l)
1819
+ onInput: (v) => M(l.field, v),
1820
+ onBlur: (v) => he(l)
1809
1821
  }, null, 8, ["model-value", "placeholder", "disabled", "invalid", "onInput", "onBlur"])) : l.type === "mask" ? me((o(), $(r(fe), {
1810
1822
  key: 13,
1811
1823
  "model-value": e.formData[l.field],
@@ -1814,7 +1826,7 @@ const Jl = { class: "w-crud-form" }, Xl = {
1814
1826
  disabled: b(l),
1815
1827
  invalid: !!f[l.field],
1816
1828
  "onUpdate:modelValue": (v) => i("update:field", l.field, v),
1817
- onBlur: (v) => ie(l)
1829
+ onBlur: (v) => he(l)
1818
1830
  }, null, 8, ["model-value", "placeholder", "disabled", "invalid", "onUpdate:modelValue", "onBlur"])), [
1819
1831
  [r(qe), { mask: Z(l.mask) }]
1820
1832
  ]) : l.type === "cep" ? me((o(), $(r(fe), {
@@ -1824,27 +1836,27 @@ const Jl = { class: "w-crud-form" }, Xl = {
1824
1836
  placeholder: l.placeholder || "00000-000",
1825
1837
  disabled: b(l),
1826
1838
  invalid: !!S[l.field],
1827
- onInput: (v) => D(l, v)
1839
+ onInput: (v) => E(l, v)
1828
1840
  }, null, 8, ["model-value", "placeholder", "disabled", "invalid", "onInput"])), [
1829
1841
  [r(qe), { mask: "#####-###" }]
1830
- ]) : l.type === "textarea" ? (o(), $(r(Lt), {
1842
+ ]) : l.type === "textarea" ? (o(), $(r(zt), {
1831
1843
  key: 15,
1832
1844
  "model-value": e.formData[l.field],
1833
1845
  fluid: "",
1834
- autofocus: J(l) || void 0,
1846
+ autofocus: Y(l) || void 0,
1835
1847
  rows: l.rows || 3,
1836
1848
  placeholder: l.placeholder,
1837
1849
  disabled: b(l),
1838
1850
  "onUpdate:modelValue": (v) => i("update:field", l.field, v)
1839
1851
  }, null, 8, ["model-value", "autofocus", "rows", "placeholder", "disabled", "onUpdate:modelValue"])) : g("", !0),
1840
- S[l.field] ? (o(), u("small", da, F(S[l.field]), 1)) : f[l.field] ? (o(), u("small", ca, F(f[l.field]), 1)) : g("", !0)
1852
+ S[l.field] ? (o(), d("small", ca, F(S[l.field]), 1)) : f[l.field] ? (o(), d("small", ma, F(f[l.field]), 1)) : g("", !0)
1841
1853
  ], 6))
1842
1854
  ], void 0, l.field)), 128))
1843
1855
  ], 4)
1844
1856
  ]))), 128))
1845
1857
  ]));
1846
1858
  }
1847
- }), fa = { class: "w-crud-form-footer" }, gt = /* @__PURE__ */ oe({
1859
+ }), va = { class: "w-crud-form-footer" }, gt = /* @__PURE__ */ ie({
1848
1860
  __name: "WCrudFormDialog",
1849
1861
  props: {
1850
1862
  visible: { type: Boolean },
@@ -1860,39 +1872,39 @@ const Jl = { class: "w-crud-form" }, Xl = {
1860
1872
  },
1861
1873
  emits: ["update:visible", "update:field", "save"],
1862
1874
  setup(e, { emit: a }) {
1863
- const t = e, n = a, i = L(null), f = L(null);
1875
+ const t = e, n = a, i = T(null), f = T(null);
1864
1876
  function w() {
1865
1877
  i.value ? i.value.validateAll().length === 0 && n("save") : n("save");
1866
1878
  }
1867
- const { focusFirst: S, handleKeydown: k } = Nt(f, {
1879
+ const { focusFirst: S, handleKeydown: k } = Lt(f, {
1868
1880
  enabled: () => t.keyboardNav === !0,
1869
1881
  onSubmit: w
1870
1882
  });
1871
1883
  return Me(
1872
1884
  () => t.visible,
1873
- (D) => {
1874
- D && i.value && i.value.clearErrors();
1885
+ (E) => {
1886
+ E && i.value && i.value.clearErrors();
1875
1887
  }
1876
- ), (D, T) => (o(), $(r(_e), {
1888
+ ), (E, N) => (o(), $(r(tt), {
1877
1889
  visible: e.visible,
1878
1890
  header: e.title,
1879
1891
  style: ge({ width: e.width }),
1880
1892
  modal: "",
1881
1893
  draggable: !1,
1882
1894
  class: "w-crud-form-dialog",
1883
- "onUpdate:visible": T[3] || (T[3] = (b) => n("update:visible", b)),
1895
+ "onUpdate:visible": N[3] || (N[3] = (b) => n("update:visible", b)),
1884
1896
  onShow: r(S)
1885
1897
  }, {
1886
- default: Y(() => [
1898
+ default: J(() => [
1887
1899
  m("form", {
1888
1900
  ref_key: "formRef",
1889
1901
  ref: f,
1890
1902
  class: "w-crud-form",
1891
- onSubmit: Pt(w, ["prevent"]),
1892
- onKeydown: T[2] || (T[2] = //@ts-ignore
1903
+ onSubmit: Ft(w, ["prevent"]),
1904
+ onKeydown: N[2] || (N[2] = //@ts-ignore
1893
1905
  (...b) => r(k) && r(k)(...b))
1894
1906
  }, [
1895
- V(ma, {
1907
+ V(fa, {
1896
1908
  ref_key: "rendererRef",
1897
1909
  ref: i,
1898
1910
  fields: e.fields,
@@ -1900,36 +1912,36 @@ const Jl = { class: "w-crud-form" }, Xl = {
1900
1912
  "is-editing": e.isEditing,
1901
1913
  disabled: e.disabled,
1902
1914
  columns: e.formColumns,
1903
- "onUpdate:field": T[0] || (T[0] = (b, j) => n("update:field", b, j))
1915
+ "onUpdate:field": N[0] || (N[0] = (b, q) => n("update:field", b, q))
1904
1916
  }, je({ _: 2 }, [
1905
1917
  le(e.fields, (b) => ({
1906
1918
  name: `field-${b.field}`,
1907
- fn: Y((j) => [
1908
- A(D.$slots, `field-${b.field}`, Ye(Je(j)))
1919
+ fn: J((q) => [
1920
+ A(E.$slots, `field-${b.field}`, Je(Xe(q)))
1909
1921
  ])
1910
1922
  })),
1911
1923
  le(e.fields.filter((b) => b.type === "image"), (b) => ({
1912
1924
  name: `image-${b.field}`,
1913
- fn: Y((j) => [
1914
- A(D.$slots, `image-${b.field}`, Ye(Je(j)))
1925
+ fn: J((q) => [
1926
+ A(E.$slots, `image-${b.field}`, Je(Xe(q)))
1915
1927
  ])
1916
1928
  }))
1917
1929
  ]), 1032, ["fields", "form-data", "is-editing", "disabled", "columns"]),
1918
- m("div", fa, [
1919
- A(D.$slots, "footer", {
1930
+ m("div", va, [
1931
+ A(E.$slots, "footer", {
1920
1932
  saving: e.saving,
1921
1933
  disabled: e.disabled
1922
1934
  }, () => [
1923
- V(r(O), {
1935
+ V(r(W), {
1924
1936
  type: "button",
1925
1937
  label: e.disabled ? "Fechar" : "Cancelar",
1926
1938
  severity: "secondary",
1927
1939
  text: "",
1928
1940
  disabled: e.saving,
1929
1941
  "data-kbd-skip": "",
1930
- onClick: T[1] || (T[1] = (b) => n("update:visible", !1))
1942
+ onClick: N[1] || (N[1] = (b) => n("update:visible", !1))
1931
1943
  }, null, 8, ["label", "disabled"]),
1932
- e.disabled ? g("", !0) : (o(), $(r(O), {
1944
+ e.disabled ? g("", !0) : (o(), $(r(W), {
1933
1945
  key: 0,
1934
1946
  type: "submit",
1935
1947
  label: e.isEditing ? "Atualizar" : "Salvar",
@@ -1944,74 +1956,74 @@ const Jl = { class: "w-crud-form" }, Xl = {
1944
1956
  }, 8, ["visible", "header", "style", "onShow"]));
1945
1957
  }
1946
1958
  });
1947
- function va(e, a) {
1959
+ function pa(e, a) {
1948
1960
  const t = a[e.field];
1949
1961
  return e.format ? e.format(t, a) : t == null ? "" : typeof t == "boolean" ? t ? "Sim" : "Não" : String(t);
1950
1962
  }
1951
- function st(e, a) {
1963
+ function rt(e, a) {
1952
1964
  return e.includes('"') || e.includes(a) || e.includes(`
1953
1965
  `) || e.includes("\r") ? `"${e.replace(/"/g, '""')}"` : e;
1954
1966
  }
1955
- function pa(e, a, t = {}) {
1956
- const n = t.separator ?? ";", i = a.map((w) => st(w.header, n)).join(n), f = e.map((w) => a.map((S) => st(va(S, w), n)).join(n));
1967
+ function ha(e, a, t = {}) {
1968
+ const n = t.separator ?? ";", i = a.map((w) => rt(w.header, n)).join(n), f = e.map((w) => a.map((S) => rt(pa(S, w), n)).join(n));
1957
1969
  return "\uFEFF" + [i, ...f].join(`\r
1958
1970
  `);
1959
1971
  }
1960
- function ha(e, a = "export.csv") {
1972
+ function ya(e, a = "export.csv") {
1961
1973
  const t = new Blob([e], { type: "text/csv;charset=utf-8;" }), n = URL.createObjectURL(t), i = document.createElement("a");
1962
1974
  i.href = n, i.download = a, document.body.appendChild(i), i.click(), document.body.removeChild(i), URL.revokeObjectURL(n);
1963
1975
  }
1964
- const ya = { class: "w-crud" }, ga = {
1976
+ const ga = { class: "w-crud" }, ba = {
1965
1977
  key: 0,
1966
1978
  class: "w-crud-header"
1967
- }, ba = { class: "w-crud-header-content" }, wa = { class: "w-crud-title" }, ka = {
1979
+ }, wa = { class: "w-crud-header-content" }, ka = { class: "w-crud-title" }, $a = {
1968
1980
  key: 0,
1969
1981
  class: "w-crud-subtitle"
1970
- }, $a = { class: "w-crud-header-actions" }, xa = {
1982
+ }, xa = { class: "w-crud-header-actions" }, Ca = {
1971
1983
  key: 0,
1972
1984
  class: "w-crud-kpis"
1973
- }, Ca = { class: "w-crud-kpi-content" }, Va = { class: "w-crud-kpi-label" }, Sa = { class: "w-crud-kpi-value" }, Da = { class: "w-crud-content-main" }, Ea = {
1985
+ }, Va = { class: "w-crud-kpi-content" }, Sa = { class: "w-crud-kpi-label" }, Da = { class: "w-crud-kpi-value" }, Ea = { class: "w-crud-content-main" }, Pa = {
1974
1986
  key: 0,
1975
1987
  class: "w-crud-filters",
1976
1988
  style: { display: "flex", "flex-wrap": "wrap", gap: "0.5rem", "align-items": "center", "margin-bottom": "0.75rem" }
1977
- }, Pa = {
1989
+ }, Fa = {
1978
1990
  key: 1,
1979
1991
  class: "w-crud-table"
1980
- }, Fa = {
1992
+ }, Ia = {
1981
1993
  key: 0,
1982
1994
  class: "w-crud-bulkbar",
1983
1995
  style: { display: "flex", "align-items": "center", gap: "0.5rem", "margin-bottom": "0.5rem", padding: "0.5rem 0.75rem", "border-radius": "8px", background: "var(--p-primary-50, #eef2ff)", color: "var(--p-primary-700, #3730a3)" }
1984
- }, Ia = { style: { "font-weight": "600", "font-size": "0.85rem", "margin-right": "auto" } }, Ma = { class: "w-crud-toolbar" }, Ra = { class: "w-crud-toolbar-start" }, Aa = { class: "w-crud-toolbar-end" }, Ua = { style: { display: "flex", "flex-direction": "column", gap: "0.35rem", "min-width": "180px" } }, Ba = ["for"], Ta = {
1996
+ }, Ra = { style: { "font-weight": "600", "font-size": "0.85rem", "margin-right": "auto" } }, Ma = { class: "w-crud-toolbar" }, Aa = { class: "w-crud-toolbar-start" }, Ua = { class: "w-crud-toolbar-end" }, Ba = { style: { display: "flex", "flex-direction": "column", gap: "0.35rem", "min-width": "180px" } }, Ta = ["for"], Na = {
1985
1997
  key: 2,
1986
1998
  class: "w-crud-view-toggle"
1987
- }, Na = { class: "w-crud-actions" }, La = {
1999
+ }, La = { class: "w-crud-actions" }, za = {
1988
2000
  key: 2,
1989
2001
  class: "w-crud-cards-wrap"
1990
- }, za = { class: "w-crud-toolbar w-crud-toolbar--standalone" }, Oa = { class: "w-crud-toolbar-start" }, Wa = { class: "w-crud-toolbar-end" }, ja = {
2002
+ }, Oa = { class: "w-crud-toolbar w-crud-toolbar--standalone" }, Wa = { class: "w-crud-toolbar-start" }, ja = { class: "w-crud-toolbar-end" }, qa = {
1991
2003
  key: 1,
1992
2004
  class: "w-crud-view-toggle"
1993
- }, qa = {
2005
+ }, Ka = {
1994
2006
  key: 0,
1995
2007
  class: "w-crud-cards-loading"
1996
- }, Ka = {
2008
+ }, Ha = {
1997
2009
  key: 2,
1998
2010
  class: "w-crud-cards"
1999
- }, Ha = ["onClick", "onDblclick", "onContextmenu"], Ga = { class: "w-crud-card-body" }, Ya = {
2011
+ }, Ga = ["onClick", "onDblclick", "onContextmenu"], Ya = { class: "w-crud-card-body" }, Ja = {
2000
2012
  key: 0,
2001
2013
  class: "w-crud-card-label"
2002
- }, Ja = { class: "w-crud-card-value" }, Xa = {
2014
+ }, Xa = { class: "w-crud-card-value" }, Za = {
2003
2015
  key: 0,
2004
2016
  class: "w-crud-card-actions"
2005
- }, Za = {
2017
+ }, Qa = {
2006
2018
  key: 0,
2007
2019
  class: "w-crud-rail"
2008
- }, Qa = {
2020
+ }, _a = {
2009
2021
  key: 1,
2010
2022
  class: "w-crud-rail-sep"
2011
- }, _a = {
2023
+ }, eo = {
2012
2024
  key: 2,
2013
2025
  class: "w-crud-rail-sep"
2014
- }, Pn = /* @__PURE__ */ oe({
2026
+ }, Fn = /* @__PURE__ */ ie({
2015
2027
  __name: "WCrudView",
2016
2028
  props: {
2017
2029
  crud: {},
@@ -2041,172 +2053,172 @@ const ya = { class: "w-crud" }, ga = {
2041
2053
  },
2042
2054
  emits: ["row-expand", "row-collapse", "print"],
2043
2055
  setup(e, { emit: a }) {
2044
- const t = e, n = a, i = Ft(), { formatNumber: f } = Qe(), w = L({}), S = L(t.defaultView);
2045
- function k(d) {
2046
- return S.value === d;
2056
+ const t = e, n = a, i = It(), { formatNumber: f } = et(), w = T({}), S = T(t.defaultView);
2057
+ function k(c) {
2058
+ return S.value === c;
2047
2059
  }
2048
- function D(d) {
2049
- S.value = d;
2060
+ function E(c) {
2061
+ S.value = c;
2050
2062
  }
2051
- const T = P(
2063
+ const N = P(
2052
2064
  () => (t.crud.pagination.page - 1) * t.crud.pagination.pageSize
2053
- ), b = Pe({ hidden: [] }), j = L(null);
2065
+ ), b = Pe({ hidden: [] }), q = T(null);
2054
2066
  function _() {
2055
2067
  return t.persistState ? `wcrud:cols:${t.persistState}` : null;
2056
2068
  }
2057
- function J() {
2058
- const d = _();
2059
- if (d)
2069
+ function Y() {
2070
+ const c = _();
2071
+ if (c)
2060
2072
  try {
2061
- const h = JSON.parse(localStorage.getItem(d) || "{}");
2073
+ const h = JSON.parse(localStorage.getItem(c) || "{}");
2062
2074
  Array.isArray(h.hidden) && (b.hidden = h.hidden);
2063
2075
  } catch {
2064
2076
  }
2065
2077
  }
2066
2078
  function Z() {
2067
- const d = _();
2068
- d && localStorage.setItem(d, JSON.stringify({ hidden: b.hidden }));
2079
+ const c = _();
2080
+ c && localStorage.setItem(c, JSON.stringify({ hidden: b.hidden }));
2069
2081
  }
2070
- const I = P(() => t.crud.config.columns.filter((d) => d.visible !== !1));
2071
- function U(d, h) {
2072
- b.hidden = h ? b.hidden.filter((K) => K !== d) : [.../* @__PURE__ */ new Set([...b.hidden, d])], Z();
2082
+ const I = P(() => t.crud.config.columns.filter((c) => c.visible !== !1));
2083
+ function M(c, h) {
2084
+ b.hidden = h ? b.hidden.filter((H) => H !== c) : [.../* @__PURE__ */ new Set([...b.hidden, c])], Z();
2073
2085
  }
2074
2086
  const z = P(
2075
- () => t.crud.config.columns.filter((d) => d.visible !== !1 && !b.hidden.includes(d.field)).map((d) => d.type === "number" && !d.align ? { ...d, align: "right" } : d.type === "currency" && !d.align ? { ...d, align: "right" } : d)
2087
+ () => t.crud.config.columns.filter((c) => c.visible !== !1 && !b.hidden.includes(c.field)).map((c) => c.type === "number" && !c.align ? { ...c, align: "right" } : c.type === "currency" && !c.align ? { ...c, align: "right" } : c)
2076
2088
  );
2077
- function x(d) {
2078
- if (d.align === "right") return "text-right";
2079
- if (d.align === "center") return "text-center";
2089
+ function x(c) {
2090
+ if (c.align === "right") return "text-right";
2091
+ if (c.align === "center") return "text-center";
2080
2092
  }
2081
- const q = P(() => z.value.slice(0, t.cardFields)), ae = P(() => {
2082
- const d = [];
2083
- return t.crud.config.canEdit !== !1 && d.push({ action: "edit", icon: "pi pi-pencil", tooltip: "Editar" }), t.crud.config.canCreate !== !1 && d.push({
2093
+ const j = P(() => z.value.slice(0, t.cardFields)), ae = P(() => {
2094
+ const c = [];
2095
+ return t.crud.config.canEdit !== !1 && c.push({ action: "edit", icon: "pi pi-pencil", tooltip: "Editar" }), t.crud.config.canCreate !== !1 && c.push({
2084
2096
  action: "duplicate",
2085
2097
  icon: "pi pi-copy",
2086
2098
  tooltip: "Duplicar",
2087
2099
  severity: "info"
2088
- }), t.crud.config.canDelete !== !1 && d.push({
2100
+ }), t.crud.config.canDelete !== !1 && c.push({
2089
2101
  action: "delete",
2090
2102
  icon: "pi pi-trash",
2091
2103
  tooltip: "Excluir",
2092
2104
  severity: "danger"
2093
- }), d;
2094
- }), ue = P(
2105
+ }), c;
2106
+ }), de = P(
2095
2107
  () => t.crud.config.rowActions ?? ae.value
2096
- ), pe = P(
2097
- () => ue.value.length > 0 || !!i["row-actions"]
2108
+ ), Se = P(
2109
+ () => de.value.length > 0 || !!i["row-actions"]
2098
2110
  );
2099
- function ne(d, h) {
2100
- if (d.handler) {
2101
- d.handler(h);
2111
+ function ue(c, h) {
2112
+ if (c.handler) {
2113
+ c.handler(h);
2102
2114
  return;
2103
2115
  }
2104
- d.action === "edit" ? t.crud.openEditDialog(h) : d.action === "view" ? t.crud.openViewDialog(h) : d.action === "duplicate" ? t.crud.openDuplicateDialog(h) : d.action === "delete" && t.crud.confirmDelete(h);
2116
+ c.action === "edit" ? t.crud.openEditDialog(h) : c.action === "view" ? t.crud.openViewDialog(h) : c.action === "duplicate" ? t.crud.openDuplicateDialog(h) : c.action === "delete" && t.crud.confirmDelete(h);
2105
2117
  }
2106
- function he(d, h) {
2107
- return d.visible ? d.visible(h) : !0;
2118
+ function se(c, h) {
2119
+ return c.visible ? c.visible(h) : !0;
2108
2120
  }
2109
- function ie(d, h) {
2110
- return d.disabled ? d.disabled(h) : !1;
2121
+ function he(c, h) {
2122
+ return c.disabled ? c.disabled(h) : !1;
2111
2123
  }
2112
2124
  const ve = P(() => {
2113
- const d = [];
2114
- return t.showKpi && d.push({
2125
+ const c = [];
2126
+ return t.showKpi && c.push({
2115
2127
  icon: t.kpiIcon,
2116
2128
  label: t.kpiLabel,
2117
2129
  value: f(t.crud.pagination.rows, 0)
2118
- }), d.push(...t.extraKpis), d;
2119
- }), be = P(() => t.crud.config.canCreate !== !1), W = L(null), Q = P(() => t.crud.config.selectionMode === "multiple"), de = P(() => t.crud.config.editMode === "cell"), ye = P(() => new Map(t.crud.config.form.map((d) => [d.field, d]))), we = ["text", "email", "number", "currency"];
2120
- function p(d) {
2121
- const h = ye.value.get(d);
2122
- return h && we.includes(h.type || "text") ? h : void 0;
2130
+ }), c.push(...t.extraKpis), c;
2131
+ }), ce = P(() => t.crud.config.canCreate !== !1), K = T(null), oe = P(() => t.crud.config.selectionMode === "multiple"), te = P(() => t.crud.config.editMode === "cell"), ye = P(() => new Map(t.crud.config.form.map((c) => [c.field, c]))), be = ["text", "email", "number", "currency"];
2132
+ function p(c) {
2133
+ const h = ye.value.get(c);
2134
+ return h && be.includes(h.type || "text") ? h : void 0;
2123
2135
  }
2124
- function C(d) {
2125
- d.newValue !== (d.value ?? d.data[d.field]) && t.crud.updateField(d.data, d.field, d.newValue);
2136
+ function C(c) {
2137
+ c.newValue !== (c.value ?? c.data[c.field]) && t.crud.updateField(c.data, c.field, c.newValue);
2126
2138
  }
2127
- const E = P(
2128
- () => t.crud.config.columns.filter((d) => d.filter)
2139
+ const D = P(
2140
+ () => t.crud.config.columns.filter((c) => c.filter)
2129
2141
  ), l = [
2130
2142
  { label: "Sim", value: !0 },
2131
2143
  { label: "Não", value: !1 }
2132
2144
  ];
2133
- function v(d) {
2145
+ function v(c) {
2134
2146
  var h;
2135
- return ((h = d.filter) == null ? void 0 : h.param) || d.field;
2147
+ return ((h = c.filter) == null ? void 0 : h.param) || c.field;
2136
2148
  }
2137
- const N = {};
2138
- function se(d, h) {
2139
- const K = v(d);
2140
- N[K] && clearTimeout(N[K]), N[K] = setTimeout(() => t.crud.setColumnFilter(K, h || null), 300);
2149
+ const B = {};
2150
+ function pe(c, h) {
2151
+ const H = v(c);
2152
+ B[H] && clearTimeout(B[H]), B[H] = setTimeout(() => t.crud.setColumnFilter(H, h || null), 300);
2141
2153
  }
2142
- const ce = L(null);
2143
- function M(d) {
2144
- W.value = d;
2154
+ const re = T(null);
2155
+ function L(c) {
2156
+ K.value = c;
2145
2157
  }
2146
- function te(d) {
2158
+ function Q(c) {
2147
2159
  var h;
2148
- t.contextMenu && (W.value = d.data, (h = ce.value) == null || h.show(d.originalEvent));
2160
+ t.contextMenu && (K.value = c.data, (h = re.value) == null || h.show(c.originalEvent));
2149
2161
  }
2150
- function ke(d, h) {
2151
- var K;
2152
- t.contextMenu && (d.preventDefault(), W.value = h, (K = ce.value) == null || K.show(d));
2162
+ function ke(c, h) {
2163
+ var H;
2164
+ t.contextMenu && (c.preventDefault(), K.value = h, (H = re.value) == null || H.show(c));
2153
2165
  }
2154
- const xe = P(() => {
2155
- const d = W.value;
2156
- if (!d) return [];
2166
+ const $e = P(() => {
2167
+ const c = K.value;
2168
+ if (!c) return [];
2157
2169
  const h = [
2158
2170
  {
2159
2171
  label: "Ver detalhes",
2160
2172
  icon: "pi pi-eye",
2161
- command: () => t.crud.openViewDialog(d)
2173
+ command: () => t.crud.openViewDialog(c)
2162
2174
  }
2163
2175
  ];
2164
- for (const K of ue.value)
2165
- he(K, d) && h.push({
2166
- label: K.tooltip ?? K.action,
2167
- icon: K.icon,
2168
- class: K.severity === "danger" ? "w-crud-ctx-danger" : void 0,
2169
- disabled: ie(K, d),
2170
- command: () => ne(K, d)
2176
+ for (const H of de.value)
2177
+ se(H, c) && h.push({
2178
+ label: H.tooltip ?? H.action,
2179
+ icon: H.icon,
2180
+ class: H.severity === "danger" ? "w-crud-ctx-danger" : void 0,
2181
+ disabled: he(H, c),
2182
+ command: () => ue(H, c)
2171
2183
  });
2172
2184
  return t.showPrint && h.push({
2173
2185
  label: "Imprimir",
2174
2186
  icon: "pi pi-print",
2175
- command: () => n("print", d)
2187
+ command: () => n("print", c)
2176
2188
  }), t.exportCsv && (h.push({ separator: !0 }), h.push({
2177
2189
  label: t.csvScope === "all" ? "Exportar tudo (CSV)" : "Exportar página (CSV)",
2178
2190
  icon: "pi pi-download",
2179
- command: () => Re()
2191
+ command: () => Ie()
2180
2192
  })), h;
2181
2193
  });
2182
2194
  function He() {
2183
- W.value && n("print", W.value);
2195
+ K.value && n("print", K.value);
2184
2196
  }
2185
- const Se = L(!1);
2186
- async function Re() {
2187
- if (!Se.value) {
2188
- Se.value = !0;
2197
+ const De = T(!1);
2198
+ async function Ie() {
2199
+ if (!De.value) {
2200
+ De.value = !0;
2189
2201
  try {
2190
- const d = t.csvScope === "page" ? t.crud.items.value : await t.crud.fetchAll(t.csvPageSize), h = pa(d, z.value);
2191
- ha(h, t.csvFilename);
2202
+ const c = t.csvScope === "page" ? t.crud.items.value : await t.crud.fetchAll(t.csvPageSize), h = ha(c, z.value);
2203
+ ya(h, t.csvFilename);
2192
2204
  } finally {
2193
- Se.value = !1;
2205
+ De.value = !1;
2194
2206
  }
2195
2207
  }
2196
2208
  }
2197
- return dt(() => {
2198
- J(), t.autoInit && t.crud.init();
2199
- }), (d, h) => {
2200
- const K = ut("tooltip");
2201
- return o(), u("div", ya, [
2202
- e.showHeader ? (o(), u("div", ga, [
2203
- m("div", ba, [
2204
- m("h1", wa, F(e.title), 1),
2205
- e.subtitle ? (o(), u("p", ka, F(e.subtitle), 1)) : g("", !0)
2209
+ return _e(() => {
2210
+ Y(), t.autoInit && t.crud.init();
2211
+ }), (c, h) => {
2212
+ const H = dt("tooltip");
2213
+ return o(), d("div", ga, [
2214
+ e.showHeader ? (o(), d("div", ba, [
2215
+ m("div", wa, [
2216
+ m("h1", ka, F(e.title), 1),
2217
+ e.subtitle ? (o(), d("p", $a, F(e.subtitle), 1)) : g("", !0)
2206
2218
  ]),
2207
- m("div", $a, [
2208
- A(d.$slots, "header-actions"),
2209
- be.value && !e.actionRail ? (o(), $(r(O), {
2219
+ m("div", xa, [
2220
+ A(c.$slots, "header-actions"),
2221
+ ce.value && !e.actionRail ? (o(), $(r(W), {
2210
2222
  key: 0,
2211
2223
  label: "Novo",
2212
2224
  icon: "pi pi-plus",
@@ -2214,10 +2226,10 @@ const ya = { class: "w-crud" }, ga = {
2214
2226
  })) : g("", !0)
2215
2227
  ])
2216
2228
  ])) : g("", !0),
2217
- A(d.$slots, "before-table", {}, () => [
2218
- ve.value.length ? (o(), u("div", xa, [
2219
- (o(!0), u(X, null, le(ve.value, (s, B) => (o(), u("div", {
2220
- key: B,
2229
+ A(c.$slots, "before-table", {}, () => [
2230
+ ve.value.length ? (o(), d("div", Ca, [
2231
+ (o(!0), d(X, null, le(ve.value, (s, U) => (o(), d("div", {
2232
+ key: U,
2221
2233
  class: "w-crud-kpi"
2222
2234
  }, [
2223
2235
  m("div", {
@@ -2228,9 +2240,9 @@ const ya = { class: "w-crud" }, ga = {
2228
2240
  style: ge(s.color ? `color: ${s.color}` : "")
2229
2241
  }, null, 6)
2230
2242
  ], 2),
2231
- m("div", Ca, [
2232
- m("div", Va, F(s.label), 1),
2233
- m("div", Sa, F(s.value), 1)
2243
+ m("div", Va, [
2244
+ m("div", Sa, F(s.label), 1),
2245
+ m("div", Da, F(s.value), 1)
2234
2246
  ])
2235
2247
  ]))), 128))
2236
2248
  ])) : g("", !0)
@@ -2238,49 +2250,49 @@ const ya = { class: "w-crud" }, ga = {
2238
2250
  m("div", {
2239
2251
  class: ee(["w-crud-content", { "w-crud-content--rail": e.actionRail }])
2240
2252
  }, [
2241
- m("div", Da, [
2242
- E.value.length ? (o(), u("div", Ea, [
2243
- (o(!0), u(X, null, le(E.value, (s) => {
2244
- var B, G, $e, Ee, Ae, Ce, Ve, Ue, Le;
2245
- return o(), u(X, {
2253
+ m("div", Ea, [
2254
+ D.value.length ? (o(), d("div", Pa, [
2255
+ (o(!0), d(X, null, le(D.value, (s) => {
2256
+ var U, G, we, Le, Ee, Ae, xe, Ce, Ue;
2257
+ return o(), d(X, {
2246
2258
  key: s.field
2247
2259
  }, [
2248
- (((B = s.filter) == null ? void 0 : B.type) || "text") === "text" ? (o(), $(r(fe), {
2260
+ (((U = s.filter) == null ? void 0 : U.type) || "text") === "text" ? (o(), $(r(fe), {
2249
2261
  key: 0,
2250
2262
  "model-value": e.crud.columnFilters[v(s)] ?? "",
2251
2263
  placeholder: ((G = s.filter) == null ? void 0 : G.placeholder) || s.header,
2252
2264
  size: "small",
2253
- onInput: (De) => se(s, De.target.value)
2254
- }, null, 8, ["model-value", "placeholder", "onInput"])) : (($e = s.filter) == null ? void 0 : $e.type) === "select" ? (o(), $(r(Xe), {
2265
+ onInput: (Ve) => pe(s, Ve.target.value)
2266
+ }, null, 8, ["model-value", "placeholder", "onInput"])) : ((we = s.filter) == null ? void 0 : we.type) === "select" ? (o(), $(r(Ze), {
2255
2267
  key: 1,
2256
2268
  "model-value": e.crud.columnFilters[v(s)],
2257
- options: (Ee = s.filter) == null ? void 0 : Ee.options,
2269
+ options: (Le = s.filter) == null ? void 0 : Le.options,
2258
2270
  "option-label": "label",
2259
2271
  "option-value": "value",
2260
- placeholder: ((Ae = s.filter) == null ? void 0 : Ae.placeholder) || s.header,
2272
+ placeholder: ((Ee = s.filter) == null ? void 0 : Ee.placeholder) || s.header,
2261
2273
  "show-clear": "",
2262
2274
  size: "small",
2263
- "onUpdate:modelValue": (De) => e.crud.setColumnFilter(v(s), De)
2264
- }, null, 8, ["model-value", "options", "placeholder", "onUpdate:modelValue"])) : ((Ce = s.filter) == null ? void 0 : Ce.type) === "boolean" ? (o(), $(r(Xe), {
2275
+ "onUpdate:modelValue": (Ve) => e.crud.setColumnFilter(v(s), Ve)
2276
+ }, null, 8, ["model-value", "options", "placeholder", "onUpdate:modelValue"])) : ((Ae = s.filter) == null ? void 0 : Ae.type) === "boolean" ? (o(), $(r(Ze), {
2265
2277
  key: 2,
2266
2278
  "model-value": e.crud.columnFilters[v(s)],
2267
2279
  options: l,
2268
2280
  "option-label": "label",
2269
2281
  "option-value": "value",
2270
- placeholder: ((Ve = s.filter) == null ? void 0 : Ve.placeholder) || s.header,
2282
+ placeholder: ((xe = s.filter) == null ? void 0 : xe.placeholder) || s.header,
2271
2283
  "show-clear": "",
2272
2284
  size: "small",
2273
- "onUpdate:modelValue": (De) => e.crud.setColumnFilter(v(s), De)
2274
- }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])) : ((Ue = s.filter) == null ? void 0 : Ue.type) === "numeric" ? (o(), $(r(Ke), {
2285
+ "onUpdate:modelValue": (Ve) => e.crud.setColumnFilter(v(s), Ve)
2286
+ }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])) : ((Ce = s.filter) == null ? void 0 : Ce.type) === "numeric" ? (o(), $(r(Ke), {
2275
2287
  key: 3,
2276
2288
  "model-value": e.crud.columnFilters[v(s)] ?? null,
2277
- placeholder: ((Le = s.filter) == null ? void 0 : Le.placeholder) || s.header,
2289
+ placeholder: ((Ue = s.filter) == null ? void 0 : Ue.placeholder) || s.header,
2278
2290
  size: "small",
2279
- "onUpdate:modelValue": (De) => e.crud.setColumnFilter(v(s), De)
2291
+ "onUpdate:modelValue": (Ve) => e.crud.setColumnFilter(v(s), Ve)
2280
2292
  }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])) : g("", !0)
2281
2293
  ], 64);
2282
2294
  }), 128)),
2283
- Object.keys(e.crud.columnFilters).length ? (o(), $(r(O), {
2295
+ Object.keys(e.crud.columnFilters).length ? (o(), $(r(W), {
2284
2296
  key: 0,
2285
2297
  label: "Limpar filtros",
2286
2298
  icon: "pi pi-filter-slash",
@@ -2289,24 +2301,24 @@ const ya = { class: "w-crud" }, ga = {
2289
2301
  onClick: h[1] || (h[1] = (s) => e.crud.clearColumnFilters())
2290
2302
  })) : g("", !0)
2291
2303
  ])) : g("", !0),
2292
- S.value === "table" ? (o(), u("div", Pa, [
2293
- Q.value && e.crud.selectedItems.value.length ? (o(), u("div", Fa, [
2294
- m("span", Ia, F(e.crud.selectedItems.value.length) + " selecionado(s) ", 1),
2295
- A(d.$slots, "bulk-actions", {
2304
+ S.value === "table" ? (o(), d("div", Fa, [
2305
+ oe.value && e.crud.selectedItems.value.length ? (o(), d("div", Ia, [
2306
+ m("span", Ra, F(e.crud.selectedItems.value.length) + " selecionado(s) ", 1),
2307
+ A(c.$slots, "bulk-actions", {
2296
2308
  selected: e.crud.selectedItems.value,
2297
2309
  crud: e.crud
2298
2310
  }, () => [
2299
- (o(!0), u(X, null, le(e.crud.config.bulkActions || [], (s) => (o(), $(r(O), {
2311
+ (o(!0), d(X, null, le(e.crud.config.bulkActions || [], (s) => (o(), $(r(W), {
2300
2312
  key: s.action,
2301
2313
  label: s.label,
2302
2314
  icon: s.icon,
2303
2315
  severity: s.severity,
2304
2316
  size: "small",
2305
2317
  disabled: s.disabled ? s.disabled(e.crud.selectedItems.value) : !1,
2306
- onClick: (B) => s.handler(e.crud.selectedItems.value)
2318
+ onClick: (U) => s.handler(e.crud.selectedItems.value)
2307
2319
  }, null, 8, ["label", "icon", "severity", "disabled", "onClick"]))), 128))
2308
2320
  ]),
2309
- me(V(r(O), {
2321
+ me(V(r(W), {
2310
2322
  icon: "pi pi-times",
2311
2323
  text: "",
2312
2324
  rounded: "",
@@ -2314,7 +2326,7 @@ const ya = { class: "w-crud" }, ga = {
2314
2326
  onClick: h[2] || (h[2] = (s) => e.crud.clearSelection())
2315
2327
  }, null, 512), [
2316
2328
  [
2317
- K,
2329
+ H,
2318
2330
  "Limpar seleção",
2319
2331
  void 0,
2320
2332
  { top: !0 }
@@ -2340,25 +2352,25 @@ const ya = { class: "w-crud" }, ga = {
2340
2352
  "sort-field": e.crud.sort.field ?? void 0,
2341
2353
  "sort-order": e.crud.sort.order,
2342
2354
  "data-key": e.crud.config.pk || "id",
2343
- "edit-mode": de.value ? "cell" : void 0,
2344
- selection: Q.value ? e.crud.selectedItems.value : e.actionRail || e.contextMenu ? W.value : void 0,
2345
- "selection-mode": Q.value ? void 0 : e.actionRail || e.contextMenu ? "single" : void 0,
2355
+ "edit-mode": te.value ? "cell" : void 0,
2356
+ selection: oe.value ? e.crud.selectedItems.value : e.actionRail || e.contextMenu ? K.value : void 0,
2357
+ "selection-mode": oe.value ? void 0 : e.actionRail || e.contextMenu ? "single" : void 0,
2346
2358
  "context-menu": e.contextMenu,
2347
- "context-menu-selection": e.contextMenu ? W.value : void 0,
2348
- "onUpdate:selection": h[8] || (h[8] = (s) => Q.value ? e.crud.selectedItems.value = s : W.value = s),
2349
- "onUpdate:contextMenuSelection": h[9] || (h[9] = (s) => W.value = s),
2350
- onRowContextmenu: te,
2359
+ "context-menu-selection": e.contextMenu ? K.value : void 0,
2360
+ "onUpdate:selection": h[8] || (h[8] = (s) => oe.value ? e.crud.selectedItems.value = s : K.value = s),
2361
+ "onUpdate:contextMenuSelection": h[9] || (h[9] = (s) => K.value = s),
2362
+ onRowContextmenu: Q,
2351
2363
  onPage: e.crud.onPage,
2352
2364
  onSort: h[10] || (h[10] = (s) => e.crud.onSort({ sortField: s.sortField, sortOrder: s.sortOrder })),
2353
2365
  onRowExpand: h[11] || (h[11] = (s) => n("row-expand", s.data)),
2354
2366
  onRowCollapse: h[12] || (h[12] = (s) => n("row-collapse", s.data)),
2355
2367
  onCellEditComplete: C
2356
2368
  }, je({
2357
- header: Y(() => [
2369
+ header: J(() => [
2358
2370
  m("div", Ma, [
2359
- m("div", Ra, [
2371
+ m("div", Aa, [
2360
2372
  e.showSearch ? (o(), $(r(Be), { key: 0 }, {
2361
- default: Y(() => [
2373
+ default: J(() => [
2362
2374
  V(r(Te), { class: "pi pi-search" }),
2363
2375
  V(r(fe), {
2364
2376
  "model-value": e.crud.search.value,
@@ -2369,23 +2381,23 @@ const ya = { class: "w-crud" }, ga = {
2369
2381
  ]),
2370
2382
  _: 1
2371
2383
  })) : g("", !0),
2372
- A(d.$slots, "toolbar-start"),
2373
- A(d.$slots, "toolbar-filters")
2384
+ A(c.$slots, "toolbar-start"),
2385
+ A(c.$slots, "toolbar-filters")
2374
2386
  ]),
2375
- m("div", Aa, [
2376
- A(d.$slots, "toolbar-actions"),
2377
- e.persistState ? (o(), u(X, { key: 0 }, [
2378
- me(V(r(O), {
2387
+ m("div", Ua, [
2388
+ A(c.$slots, "toolbar-actions"),
2389
+ e.persistState ? (o(), d(X, { key: 0 }, [
2390
+ me(V(r(W), {
2379
2391
  icon: "pi pi-sliders-h",
2380
2392
  text: "",
2381
2393
  size: "small",
2382
2394
  onClick: h[3] || (h[3] = (s) => {
2383
- var B;
2384
- return (B = j.value) == null ? void 0 : B.toggle(s);
2395
+ var U;
2396
+ return (U = q.value) == null ? void 0 : U.toggle(s);
2385
2397
  })
2386
2398
  }, null, 512), [
2387
2399
  [
2388
- K,
2400
+ H,
2389
2401
  "Colunas",
2390
2402
  void 0,
2391
2403
  { top: !0 }
@@ -2393,11 +2405,11 @@ const ya = { class: "w-crud" }, ga = {
2393
2405
  ]),
2394
2406
  V(r(mt), {
2395
2407
  ref_key: "chooser",
2396
- ref: j
2408
+ ref: q
2397
2409
  }, {
2398
- default: Y(() => [
2399
- m("div", Ua, [
2400
- (o(!0), u(X, null, le(I.value, (s) => (o(), u("div", {
2410
+ default: J(() => [
2411
+ m("div", Ba, [
2412
+ (o(!0), d(X, null, le(I.value, (s) => (o(), d("div", {
2401
2413
  key: s.field,
2402
2414
  style: { display: "flex", "align-items": "center", gap: "0.5rem" }
2403
2415
  }, [
@@ -2405,50 +2417,50 @@ const ya = { class: "w-crud" }, ga = {
2405
2417
  "model-value": !b.hidden.includes(s.field),
2406
2418
  "input-id": `wcrud-col-${s.field}`,
2407
2419
  binary: "",
2408
- "onUpdate:modelValue": (B) => U(s.field, !!B)
2420
+ "onUpdate:modelValue": (U) => M(s.field, !!U)
2409
2421
  }, null, 8, ["model-value", "input-id", "onUpdate:modelValue"]),
2410
2422
  m("label", {
2411
2423
  for: `wcrud-col-${s.field}`,
2412
2424
  style: { "font-size": "0.85rem", cursor: "pointer" }
2413
- }, F(s.header), 9, Ba)
2425
+ }, F(s.header), 9, Ta)
2414
2426
  ]))), 128))
2415
2427
  ])
2416
2428
  ]),
2417
2429
  _: 1
2418
2430
  }, 512)
2419
2431
  ], 64)) : g("", !0),
2420
- e.exportCsv ? me((o(), $(r(O), {
2432
+ e.exportCsv ? me((o(), $(r(W), {
2421
2433
  key: 1,
2422
2434
  icon: "pi pi-download",
2423
2435
  text: "",
2424
2436
  size: "small",
2425
- loading: Se.value,
2426
- onClick: Re
2437
+ loading: De.value,
2438
+ onClick: Ie
2427
2439
  }, null, 8, ["loading"])), [
2428
2440
  [
2429
- K,
2441
+ H,
2430
2442
  e.csvScope === "all" ? "Exportar tudo (CSV)" : "Exportar página (CSV)",
2431
2443
  void 0,
2432
2444
  { top: !0 }
2433
2445
  ]
2434
2446
  ]) : g("", !0),
2435
- e.viewToggle ? (o(), u("div", Ta, [
2436
- V(r(O), {
2447
+ e.viewToggle ? (o(), d("div", Na, [
2448
+ V(r(W), {
2437
2449
  icon: "pi pi-table",
2438
2450
  size: "small",
2439
2451
  text: !k("table"),
2440
2452
  outlined: k("table"),
2441
- onClick: h[4] || (h[4] = (s) => D("table"))
2453
+ onClick: h[4] || (h[4] = (s) => E("table"))
2442
2454
  }, null, 8, ["text", "outlined"]),
2443
- V(r(O), {
2455
+ V(r(W), {
2444
2456
  icon: "pi pi-th-large",
2445
2457
  size: "small",
2446
2458
  text: !k("cards"),
2447
2459
  outlined: k("cards"),
2448
- onClick: h[5] || (h[5] = (s) => D("cards"))
2460
+ onClick: h[5] || (h[5] = (s) => E("cards"))
2449
2461
  }, null, 8, ["text", "outlined"])
2450
2462
  ])) : g("", !0),
2451
- !e.showHeader && be.value && !e.actionRail ? (o(), $(r(O), {
2463
+ !e.showHeader && ce.value && !e.actionRail ? (o(), $(r(W), {
2452
2464
  key: 3,
2453
2465
  label: "Novo",
2454
2466
  icon: "pi pi-plus",
@@ -2457,8 +2469,8 @@ const ya = { class: "w-crud" }, ga = {
2457
2469
  ])
2458
2470
  ])
2459
2471
  ]),
2460
- empty: Y(() => [
2461
- A(d.$slots, "empty", {}, () => [
2472
+ empty: J(() => [
2473
+ A(c.$slots, "empty", {}, () => [
2462
2474
  h[20] || (h[20] = m("div", { class: "w-crud-empty" }, [
2463
2475
  m("div", { class: "w-crud-empty-icon" }, [
2464
2476
  m("i", { class: "pi pi-inbox" })
@@ -2468,18 +2480,18 @@ const ya = { class: "w-crud" }, ga = {
2468
2480
  ], -1))
2469
2481
  ])
2470
2482
  ]),
2471
- default: Y(() => [
2472
- Q.value ? (o(), $(r(Ie), {
2483
+ default: J(() => [
2484
+ oe.value ? (o(), $(r(Re), {
2473
2485
  key: 0,
2474
2486
  "selection-mode": "multiple",
2475
2487
  style: { width: "3rem" }
2476
2488
  })) : g("", !0),
2477
- e.expandable ? (o(), $(r(Ie), {
2489
+ e.expandable ? (o(), $(r(Re), {
2478
2490
  key: 1,
2479
2491
  expander: "",
2480
2492
  style: { width: "3rem" }
2481
2493
  })) : g("", !0),
2482
- (o(!0), u(X, null, le(z.value, (s) => (o(), $(r(Ie), {
2494
+ (o(!0), d(X, null, le(z.value, (s) => (o(), $(r(Re), {
2483
2495
  key: s.field,
2484
2496
  field: s.field,
2485
2497
  header: s.header,
@@ -2488,38 +2500,38 @@ const ya = { class: "w-crud" }, ga = {
2488
2500
  "header-class": x(s),
2489
2501
  "body-class": x(s)
2490
2502
  }, je({
2491
- body: Y(({ data: B }) => [
2492
- A(d.$slots, `column-${s.field}`, {
2493
- data: B,
2494
- value: B[s.field]
2503
+ body: J(({ data: U }) => [
2504
+ A(c.$slots, `column-${s.field}`, {
2505
+ data: U,
2506
+ value: U[s.field]
2495
2507
  }, () => [
2496
- V(Ze, {
2508
+ V(Qe, {
2497
2509
  column: s,
2498
- value: B[s.field],
2499
- "row-data": B
2510
+ value: U[s.field],
2511
+ "row-data": U
2500
2512
  }, null, 8, ["column", "value", "row-data"])
2501
2513
  ])
2502
2514
  ]),
2503
2515
  _: 2
2504
2516
  }, [
2505
- de.value && p(s.field) ? {
2517
+ te.value && p(s.field) ? {
2506
2518
  name: "editor",
2507
- fn: Y(({ data: B }) => {
2519
+ fn: J(({ data: U }) => {
2508
2520
  var G;
2509
2521
  return [
2510
2522
  ["number", "currency"].includes(((G = p(s.field)) == null ? void 0 : G.type) || "") ? (o(), $(r(Ke), {
2511
2523
  key: 0,
2512
- "model-value": B[s.field] ?? null,
2524
+ "model-value": U[s.field] ?? null,
2513
2525
  fluid: "",
2514
- "onUpdate:modelValue": ($e) => {
2515
- B[s.field] = $e;
2526
+ "onUpdate:modelValue": (we) => {
2527
+ U[s.field] = we;
2516
2528
  }
2517
2529
  }, null, 8, ["model-value", "onUpdate:modelValue"])) : (o(), $(r(fe), {
2518
2530
  key: 1,
2519
- "model-value": B[s.field] ?? "",
2531
+ "model-value": U[s.field] ?? "",
2520
2532
  fluid: "",
2521
- "onUpdate:modelValue": ($e) => {
2522
- B[s.field] = $e;
2533
+ "onUpdate:modelValue": (we) => {
2534
+ U[s.field] = we;
2523
2535
  }
2524
2536
  }, null, 8, ["model-value", "onUpdate:modelValue"]))
2525
2537
  ];
@@ -2527,37 +2539,37 @@ const ya = { class: "w-crud" }, ga = {
2527
2539
  key: "0"
2528
2540
  } : void 0
2529
2541
  ]), 1032, ["field", "header", "sortable", "style", "header-class", "body-class"]))), 128)),
2530
- pe.value && !e.actionRail ? (o(), $(r(Ie), {
2542
+ Se.value && !e.actionRail ? (o(), $(r(Re), {
2531
2543
  key: 2,
2532
2544
  "header-class": "w-crud-actions-header",
2533
2545
  style: ge({
2534
- width: `${(ue.value.length + (r(i)["row-actions"] ? 1 : 0)) * 2.5 + 1}rem`
2546
+ width: `${(de.value.length + (r(i)["row-actions"] ? 1 : 0)) * 2.5 + 1}rem`
2535
2547
  })
2536
2548
  }, {
2537
- body: Y(({ data: s }) => [
2538
- m("div", Na, [
2539
- (o(!0), u(X, null, le(ue.value, (B) => (o(), u(X, {
2540
- key: B.action
2549
+ body: J(({ data: s }) => [
2550
+ m("div", La, [
2551
+ (o(!0), d(X, null, le(de.value, (U) => (o(), d(X, {
2552
+ key: U.action
2541
2553
  }, [
2542
- he(B, s) ? me((o(), $(r(O), {
2554
+ se(U, s) ? me((o(), $(r(W), {
2543
2555
  key: 0,
2544
- icon: B.icon,
2556
+ icon: U.icon,
2545
2557
  text: "",
2546
2558
  rounded: "",
2547
2559
  size: "small",
2548
- severity: B.severity,
2549
- disabled: ie(B, s),
2550
- onClick: (G) => ne(B, s)
2560
+ severity: U.severity,
2561
+ disabled: he(U, s),
2562
+ onClick: (G) => ue(U, s)
2551
2563
  }, null, 8, ["icon", "severity", "disabled", "onClick"])), [
2552
2564
  [
2553
- K,
2554
- B.tooltip,
2565
+ H,
2566
+ U.tooltip,
2555
2567
  void 0,
2556
2568
  { top: !0 }
2557
2569
  ]
2558
2570
  ]) : g("", !0)
2559
2571
  ], 64))), 128)),
2560
- A(d.$slots, "row-actions", {
2572
+ A(c.$slots, "row-actions", {
2561
2573
  data: s,
2562
2574
  crud: e.crud
2563
2575
  })
@@ -2570,19 +2582,19 @@ const ya = { class: "w-crud" }, ga = {
2570
2582
  }, [
2571
2583
  e.expandable ? {
2572
2584
  name: "expansion",
2573
- fn: Y((s) => [
2574
- A(d.$slots, "expansion", {
2585
+ fn: J((s) => [
2586
+ A(c.$slots, "expansion", {
2575
2587
  data: s.data
2576
2588
  })
2577
2589
  ]),
2578
2590
  key: "0"
2579
2591
  } : void 0
2580
2592
  ]), 1032, ["expanded-rows", "value", "loading", "rows", "total-records", "sort-field", "sort-order", "data-key", "edit-mode", "selection", "selection-mode", "context-menu", "context-menu-selection", "onPage"])
2581
- ])) : (o(), u("div", La, [
2582
- m("div", za, [
2583
- m("div", Oa, [
2593
+ ])) : (o(), d("div", za, [
2594
+ m("div", Oa, [
2595
+ m("div", Wa, [
2584
2596
  e.showSearch ? (o(), $(r(Be), { key: 0 }, {
2585
- default: Y(() => [
2597
+ default: J(() => [
2586
2598
  V(r(Te), { class: "pi pi-search" }),
2587
2599
  V(r(fe), {
2588
2600
  "model-value": e.crud.search.value,
@@ -2593,43 +2605,43 @@ const ya = { class: "w-crud" }, ga = {
2593
2605
  ]),
2594
2606
  _: 1
2595
2607
  })) : g("", !0),
2596
- A(d.$slots, "toolbar-start"),
2597
- A(d.$slots, "toolbar-filters")
2608
+ A(c.$slots, "toolbar-start"),
2609
+ A(c.$slots, "toolbar-filters")
2598
2610
  ]),
2599
- m("div", Wa, [
2600
- A(d.$slots, "toolbar-actions"),
2601
- e.exportCsv ? me((o(), $(r(O), {
2611
+ m("div", ja, [
2612
+ A(c.$slots, "toolbar-actions"),
2613
+ e.exportCsv ? me((o(), $(r(W), {
2602
2614
  key: 0,
2603
2615
  icon: "pi pi-download",
2604
2616
  text: "",
2605
2617
  size: "small",
2606
- loading: Se.value,
2607
- onClick: Re
2618
+ loading: De.value,
2619
+ onClick: Ie
2608
2620
  }, null, 8, ["loading"])), [
2609
2621
  [
2610
- K,
2622
+ H,
2611
2623
  e.csvScope === "all" ? "Exportar tudo (CSV)" : "Exportar página (CSV)",
2612
2624
  void 0,
2613
2625
  { top: !0 }
2614
2626
  ]
2615
2627
  ]) : g("", !0),
2616
- e.viewToggle ? (o(), u("div", ja, [
2617
- V(r(O), {
2628
+ e.viewToggle ? (o(), d("div", qa, [
2629
+ V(r(W), {
2618
2630
  icon: "pi pi-table",
2619
2631
  size: "small",
2620
2632
  text: !k("table"),
2621
2633
  outlined: k("table"),
2622
- onClick: h[13] || (h[13] = (s) => D("table"))
2634
+ onClick: h[13] || (h[13] = (s) => E("table"))
2623
2635
  }, null, 8, ["text", "outlined"]),
2624
- V(r(O), {
2636
+ V(r(W), {
2625
2637
  icon: "pi pi-th-large",
2626
2638
  size: "small",
2627
2639
  text: !k("cards"),
2628
2640
  outlined: k("cards"),
2629
- onClick: h[14] || (h[14] = (s) => D("cards"))
2641
+ onClick: h[14] || (h[14] = (s) => E("cards"))
2630
2642
  }, null, 8, ["text", "outlined"])
2631
2643
  ])) : g("", !0),
2632
- !e.showHeader && be.value && !e.actionRail ? (o(), $(r(O), {
2644
+ !e.showHeader && ce.value && !e.actionRail ? (o(), $(r(W), {
2633
2645
  key: 2,
2634
2646
  label: "Novo",
2635
2647
  icon: "pi pi-plus",
@@ -2637,28 +2649,28 @@ const ya = { class: "w-crud" }, ga = {
2637
2649
  })) : g("", !0)
2638
2650
  ])
2639
2651
  ]),
2640
- e.crud.loading.value ? (o(), u("div", qa, [...h[21] || (h[21] = [
2652
+ e.crud.loading.value ? (o(), d("div", Ka, [...h[21] || (h[21] = [
2641
2653
  m("i", { class: "pi pi-spin pi-spinner" }, null, -1)
2642
- ])])) : e.crud.items.value.length ? (o(), u("div", Ka, [
2643
- (o(!0), u(X, null, le(e.crud.items.value, (s, B) => (o(), u("div", {
2644
- key: s[e.crud.config.pk || "id"] ?? B,
2645
- class: ee(["w-crud-card", { "w-crud-card--selected": W.value === s }]),
2646
- onClick: (G) => M(s),
2654
+ ])])) : e.crud.items.value.length ? (o(), d("div", Ha, [
2655
+ (o(!0), d(X, null, le(e.crud.items.value, (s, U) => (o(), d("div", {
2656
+ key: s[e.crud.config.pk || "id"] ?? U,
2657
+ class: ee(["w-crud-card", { "w-crud-card--selected": K.value === s }]),
2658
+ onClick: (G) => L(s),
2647
2659
  onDblclick: (G) => e.crud.config.canEdit !== !1 && e.crud.openEditDialog(s),
2648
2660
  onContextmenu: (G) => ke(G, s)
2649
2661
  }, [
2650
- m("div", Ga, [
2651
- (o(!0), u(X, null, le(q.value, (G, $e) => (o(), u("div", {
2662
+ m("div", Ya, [
2663
+ (o(!0), d(X, null, le(j.value, (G, we) => (o(), d("div", {
2652
2664
  key: G.field,
2653
- class: ee(["w-crud-card-row", { "w-crud-card-row--title": $e === 0 }])
2665
+ class: ee(["w-crud-card-row", { "w-crud-card-row--title": we === 0 }])
2654
2666
  }, [
2655
- $e !== 0 ? (o(), u("span", Ya, F(G.header), 1)) : g("", !0),
2656
- m("span", Ja, [
2657
- A(d.$slots, `column-${G.field}`, {
2667
+ we !== 0 ? (o(), d("span", Ja, F(G.header), 1)) : g("", !0),
2668
+ m("span", Xa, [
2669
+ A(c.$slots, `column-${G.field}`, {
2658
2670
  data: s,
2659
2671
  value: s[G.field]
2660
2672
  }, () => [
2661
- V(Ze, {
2673
+ V(Qe, {
2662
2674
  column: G,
2663
2675
  value: s[G.field],
2664
2676
  "row-data": s
@@ -2667,42 +2679,42 @@ const ya = { class: "w-crud" }, ga = {
2667
2679
  ])
2668
2680
  ], 2))), 128))
2669
2681
  ]),
2670
- pe.value && !e.actionRail ? (o(), u("div", Xa, [
2671
- (o(!0), u(X, null, le(ue.value, (G) => (o(), u(X, {
2682
+ Se.value && !e.actionRail ? (o(), d("div", Za, [
2683
+ (o(!0), d(X, null, le(de.value, (G) => (o(), d(X, {
2672
2684
  key: G.action
2673
2685
  }, [
2674
- he(G, s) ? me((o(), $(r(O), {
2686
+ se(G, s) ? me((o(), $(r(W), {
2675
2687
  key: 0,
2676
2688
  icon: G.icon,
2677
2689
  text: "",
2678
2690
  rounded: "",
2679
2691
  size: "small",
2680
2692
  severity: G.severity,
2681
- disabled: ie(G, s),
2682
- onClick: ($e) => ne(G, s)
2693
+ disabled: he(G, s),
2694
+ onClick: (we) => ue(G, s)
2683
2695
  }, null, 8, ["icon", "severity", "disabled", "onClick"])), [
2684
2696
  [
2685
- K,
2697
+ H,
2686
2698
  G.tooltip,
2687
2699
  void 0,
2688
2700
  { top: !0 }
2689
2701
  ]
2690
2702
  ]) : g("", !0)
2691
2703
  ], 64))), 128)),
2692
- A(d.$slots, "row-actions", {
2704
+ A(c.$slots, "row-actions", {
2693
2705
  data: s,
2694
2706
  crud: e.crud
2695
2707
  })
2696
2708
  ])) : g("", !0)
2697
- ], 42, Ha))), 128))
2698
- ])) : A(d.$slots, "empty", {}, () => [
2699
- h[22] || (h[22] = It('<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))
2709
+ ], 42, Ga))), 128))
2710
+ ])) : A(c.$slots, "empty", {}, () => [
2711
+ h[22] || (h[22] = Rt('<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))
2700
2712
  ], void 0, 1),
2701
- e.crud.items.value.length ? (o(), $(r(Rt), {
2713
+ e.crud.items.value.length ? (o(), $(r(At), {
2702
2714
  key: 3,
2703
2715
  rows: e.crud.pagination.pageSize,
2704
2716
  "total-records": e.crud.pagination.rows,
2705
- first: T.value,
2717
+ first: N.value,
2706
2718
  "rows-per-page-options": [10, 20, 50],
2707
2719
  template: "CurrentPageReport PrevPageLink NextPageLink",
2708
2720
  "current-page-report-template": "Página {currentPage} de {totalPages}",
@@ -2711,71 +2723,71 @@ const ya = { class: "w-crud" }, ga = {
2711
2723
  }, null, 8, ["rows", "total-records", "first", "onPage"])) : g("", !0)
2712
2724
  ]))
2713
2725
  ]),
2714
- e.actionRail ? (o(), u("aside", Za, [
2715
- be.value ? me((o(), $(r(O), {
2726
+ e.actionRail ? (o(), d("aside", Qa, [
2727
+ ce.value ? me((o(), $(r(W), {
2716
2728
  key: 0,
2717
2729
  icon: "pi pi-plus",
2718
2730
  rounded: "",
2719
2731
  onClick: h[16] || (h[16] = (s) => e.crud.openCreateDialog())
2720
2732
  }, null, 512)), [
2721
2733
  [
2722
- K,
2734
+ H,
2723
2735
  "Novo",
2724
2736
  void 0,
2725
2737
  { left: !0 }
2726
2738
  ]
2727
2739
  ]) : g("", !0),
2728
- be.value && ue.value.length ? (o(), u("div", Qa)) : g("", !0),
2729
- (o(!0), u(X, null, le(ue.value, (s) => (o(), u(X, {
2740
+ ce.value && de.value.length ? (o(), d("div", _a)) : g("", !0),
2741
+ (o(!0), d(X, null, le(de.value, (s) => (o(), d(X, {
2730
2742
  key: s.action
2731
2743
  }, [
2732
- !W.value || he(s, W.value) ? me((o(), $(r(O), {
2744
+ !K.value || se(s, K.value) ? me((o(), $(r(W), {
2733
2745
  key: 0,
2734
2746
  icon: s.icon,
2735
2747
  text: "",
2736
2748
  rounded: "",
2737
2749
  severity: s.severity,
2738
- disabled: !W.value || ie(s, W.value),
2739
- onClick: (B) => W.value && ne(s, W.value)
2750
+ disabled: !K.value || he(s, K.value),
2751
+ onClick: (U) => K.value && ue(s, K.value)
2740
2752
  }, null, 8, ["icon", "severity", "disabled", "onClick"])), [
2741
2753
  [
2742
- K,
2754
+ H,
2743
2755
  s.tooltip,
2744
2756
  void 0,
2745
2757
  { left: !0 }
2746
2758
  ]
2747
2759
  ]) : g("", !0)
2748
2760
  ], 64))), 128)),
2749
- A(d.$slots, "rail-actions", {
2750
- selected: W.value,
2761
+ A(c.$slots, "rail-actions", {
2762
+ selected: K.value,
2751
2763
  crud: e.crud
2752
2764
  }),
2753
- e.showPrint || e.exportCsv ? (o(), u("div", _a)) : g("", !0),
2754
- e.showPrint ? me((o(), $(r(O), {
2765
+ e.showPrint || e.exportCsv ? (o(), d("div", eo)) : g("", !0),
2766
+ e.showPrint ? me((o(), $(r(W), {
2755
2767
  key: 3,
2756
2768
  icon: "pi pi-print",
2757
2769
  text: "",
2758
2770
  rounded: "",
2759
- disabled: !W.value,
2771
+ disabled: !K.value,
2760
2772
  onClick: He
2761
2773
  }, null, 8, ["disabled"])), [
2762
2774
  [
2763
- K,
2775
+ H,
2764
2776
  "Imprimir",
2765
2777
  void 0,
2766
2778
  { left: !0 }
2767
2779
  ]
2768
2780
  ]) : g("", !0),
2769
- e.exportCsv ? me((o(), $(r(O), {
2781
+ e.exportCsv ? me((o(), $(r(W), {
2770
2782
  key: 4,
2771
2783
  icon: "pi pi-download",
2772
2784
  text: "",
2773
2785
  rounded: "",
2774
- loading: Se.value,
2775
- onClick: Re
2786
+ loading: De.value,
2787
+ onClick: Ie
2776
2788
  }, null, 8, ["loading"])), [
2777
2789
  [
2778
- K,
2790
+ H,
2779
2791
  e.csvScope === "all" ? "Exportar tudo (CSV)" : "Exportar página (CSV)",
2780
2792
  void 0,
2781
2793
  { left: !0 }
@@ -2783,13 +2795,13 @@ const ya = { class: "w-crud" }, ga = {
2783
2795
  ]) : g("", !0)
2784
2796
  ])) : g("", !0)
2785
2797
  ], 2),
2786
- e.contextMenu ? (o(), $(r(At), {
2798
+ e.contextMenu ? (o(), $(r(Ut), {
2787
2799
  key: 1,
2788
2800
  ref_key: "cm",
2789
- ref: ce,
2790
- model: xe.value
2801
+ ref: re,
2802
+ model: $e.value
2791
2803
  }, null, 8, ["model"])) : g("", !0),
2792
- A(d.$slots, "form-dialog", {
2804
+ A(c.$slots, "form-dialog", {
2793
2805
  crud: e.crud,
2794
2806
  dialogWidth: e.dialogWidth
2795
2807
  }, () => {
@@ -2806,16 +2818,16 @@ const ya = { class: "w-crud" }, ga = {
2806
2818
  width: e.dialogWidth,
2807
2819
  "form-columns": e.formColumns ?? e.crud.config.formColumns,
2808
2820
  "keyboard-nav": e.crud.config.keyboardNav,
2809
- "onUpdate:visible": h[17] || (h[17] = (B) => {
2810
- e.crud.dialogVisible.value = B, B || (e.crud.editingItem.value = null);
2821
+ "onUpdate:visible": h[17] || (h[17] = (U) => {
2822
+ e.crud.dialogVisible.value = U, U || (e.crud.editingItem.value = null);
2811
2823
  }),
2812
- "onUpdate:field": h[18] || (h[18] = (B, G) => e.crud.setFormField(B, G)),
2813
- onSave: h[19] || (h[19] = (B) => e.crud.save())
2824
+ "onUpdate:field": h[18] || (h[18] = (U, G) => e.crud.setFormField(U, G)),
2825
+ onSave: h[19] || (h[19] = (U) => e.crud.save())
2814
2826
  }, je({ _: 2 }, [
2815
- le(e.crud.config.form, (B) => ({
2816
- name: `field-${B.field}`,
2817
- fn: Y((G) => [
2818
- A(d.$slots, `field-${B.field}`, Ye(Je(G)))
2827
+ le(e.crud.config.form, (U) => ({
2828
+ name: `field-${U.field}`,
2829
+ fn: J((G) => [
2830
+ A(c.$slots, `field-${U.field}`, Je(Xe(G)))
2819
2831
  ])
2820
2832
  }))
2821
2833
  ]), 1032, ["visible", "title", "fields", "form-data", "is-editing", "saving", "disabled", "width", "form-columns", "keyboard-nav"])
@@ -2824,7 +2836,7 @@ const ya = { class: "w-crud" }, ga = {
2824
2836
  ]);
2825
2837
  };
2826
2838
  }
2827
- }), Fn = /* @__PURE__ */ oe({
2839
+ }), In = /* @__PURE__ */ ie({
2828
2840
  __name: "WDateRange",
2829
2841
  props: {
2830
2842
  modelValue: { default: null },
@@ -2853,7 +2865,7 @@ const ya = { class: "w-crud" }, ga = {
2853
2865
  "onUpdate:modelValue": n
2854
2866
  }, null, 8, ["model-value", "placeholder", "min-date", "max-date", "show-button-bar", "disabled"]));
2855
2867
  }
2856
- }), eo = /* @__PURE__ */ oe({
2868
+ }), to = /* @__PURE__ */ ie({
2857
2869
  __name: "WStatusTag",
2858
2870
  props: {
2859
2871
  value: {},
@@ -2893,10 +2905,10 @@ const ya = { class: "w-crud" }, ga = {
2893
2905
  severity: n.value.severity
2894
2906
  }, null, 8, ["value", "severity"]));
2895
2907
  }
2896
- }), to = { class: "w-page-header" }, lo = { class: "w-page-header-content" }, ao = { class: "w-page-header-title" }, oo = {
2908
+ }), lo = { class: "w-page-header" }, ao = { class: "w-page-header-content" }, oo = { class: "w-page-header-title" }, no = {
2897
2909
  key: 0,
2898
2910
  class: "w-page-header-subtitle"
2899
- }, no = { class: "w-page-header-actions" }, In = /* @__PURE__ */ oe({
2911
+ }, io = { class: "w-page-header-actions" }, Rn = /* @__PURE__ */ ie({
2900
2912
  __name: "WPageHeader",
2901
2913
  props: {
2902
2914
  title: {},
@@ -2907,14 +2919,14 @@ const ya = { class: "w-crud" }, ga = {
2907
2919
  emits: ["action"],
2908
2920
  setup(e, { emit: a }) {
2909
2921
  const t = a;
2910
- return (n, i) => (o(), u("div", to, [
2911
- m("div", lo, [
2912
- m("h2", ao, F(e.title), 1),
2913
- e.subtitle ? (o(), u("p", oo, F(e.subtitle), 1)) : g("", !0)
2922
+ return (n, i) => (o(), d("div", lo, [
2923
+ m("div", ao, [
2924
+ m("h2", oo, F(e.title), 1),
2925
+ e.subtitle ? (o(), d("p", no, F(e.subtitle), 1)) : g("", !0)
2914
2926
  ]),
2915
- m("div", no, [
2927
+ m("div", io, [
2916
2928
  A(n.$slots, "actions"),
2917
- e.actionLabel ? (o(), $(r(O), {
2929
+ e.actionLabel ? (o(), $(r(W), {
2918
2930
  key: 0,
2919
2931
  label: e.actionLabel,
2920
2932
  icon: e.actionIcon,
@@ -2923,10 +2935,10 @@ const ya = { class: "w-crud" }, ga = {
2923
2935
  ])
2924
2936
  ]));
2925
2937
  }
2926
- }), io = { class: "w-empty-state" }, so = { class: "w-empty-state-icon" }, ro = { class: "w-empty-state-title" }, uo = {
2938
+ }), so = { class: "w-empty-state" }, ro = { class: "w-empty-state-icon" }, uo = { class: "w-empty-state-title" }, co = {
2927
2939
  key: 0,
2928
2940
  class: "w-empty-state-description"
2929
- }, Mn = /* @__PURE__ */ oe({
2941
+ }, Mn = /* @__PURE__ */ ie({
2930
2942
  __name: "WEmptyState",
2931
2943
  props: {
2932
2944
  icon: {},
@@ -2938,15 +2950,15 @@ const ya = { class: "w-crud" }, ga = {
2938
2950
  emits: ["action"],
2939
2951
  setup(e, { emit: a }) {
2940
2952
  const t = a;
2941
- return (n, i) => (o(), u("div", io, [
2942
- m("div", so, [
2953
+ return (n, i) => (o(), d("div", so, [
2954
+ m("div", ro, [
2943
2955
  m("i", {
2944
2956
  class: ee(e.icon)
2945
2957
  }, null, 2)
2946
2958
  ]),
2947
- m("p", ro, F(e.title), 1),
2948
- e.description ? (o(), u("p", uo, F(e.description), 1)) : g("", !0),
2949
- e.actionLabel ? (o(), $(r(O), {
2959
+ m("p", uo, F(e.title), 1),
2960
+ e.description ? (o(), d("p", co, F(e.description), 1)) : g("", !0),
2961
+ e.actionLabel ? (o(), $(r(W), {
2950
2962
  key: 1,
2951
2963
  label: e.actionLabel,
2952
2964
  icon: e.actionIcon,
@@ -2965,7 +2977,7 @@ const ya = { class: "w-crud" }, ga = {
2965
2977
  Symbol(process.env.NODE_ENV !== "production" ? "navigation failure" : "");
2966
2978
  Symbol(process.env.NODE_ENV !== "production" ? "router view location matched" : "");
2967
2979
  Symbol(process.env.NODE_ENV !== "production" ? "router view depth" : "");
2968
- const co = Symbol(process.env.NODE_ENV !== "production" ? "router" : "");
2980
+ const mo = Symbol(process.env.NODE_ENV !== "production" ? "router" : "");
2969
2981
  Symbol(process.env.NODE_ENV !== "production" ? "route location" : "");
2970
2982
  Symbol(process.env.NODE_ENV !== "production" ? "router view location" : "");
2971
2983
  /*!
@@ -2973,13 +2985,13 @@ Symbol(process.env.NODE_ENV !== "production" ? "router view location" : "");
2973
2985
  * (c) 2025 Eduardo San Martin Morote
2974
2986
  * @license MIT
2975
2987
  */
2976
- function mo() {
2977
- return rt(co);
2988
+ function fo() {
2989
+ return ut(mo);
2978
2990
  }
2979
- const fo = { class: "w-detail-header" }, vo = { class: "w-detail-header-left" }, po = { class: "w-detail-header-content" }, ho = { class: "w-detail-header-title" }, yo = {
2991
+ const vo = { class: "w-detail-header" }, po = { class: "w-detail-header-left" }, ho = { class: "w-detail-header-content" }, yo = { class: "w-detail-header-title" }, go = {
2980
2992
  key: 0,
2981
2993
  class: "w-detail-header-subtitle"
2982
- }, go = { class: "w-detail-header-actions" }, Rn = /* @__PURE__ */ oe({
2994
+ }, bo = { class: "w-detail-header-actions" }, An = /* @__PURE__ */ ie({
2983
2995
  __name: "WDetailHeader",
2984
2996
  props: {
2985
2997
  title: {},
@@ -2991,81 +3003,81 @@ const fo = { class: "w-detail-header" }, vo = { class: "w-detail-header-left" },
2991
3003
  statusMap: {}
2992
3004
  },
2993
3005
  setup(e) {
2994
- const a = e, t = mo();
3006
+ const a = e, t = fo();
2995
3007
  function n() {
2996
3008
  a.backTo ? t.push(typeof a.backTo == "string" ? { name: a.backTo } : a.backTo) : a.backRoute ? t.push({ name: a.backRoute }) : t.back();
2997
3009
  }
2998
- return (i, f) => (o(), u("div", fo, [
2999
- m("div", vo, [
3000
- V(r(O), {
3010
+ return (i, f) => (o(), d("div", vo, [
3011
+ m("div", po, [
3012
+ V(r(W), {
3001
3013
  icon: "pi pi-arrow-left",
3002
3014
  text: "",
3003
3015
  rounded: "",
3004
3016
  onClick: n
3005
3017
  }),
3006
- e.icon ? (o(), u("i", {
3018
+ e.icon ? (o(), d("i", {
3007
3019
  key: 0,
3008
3020
  class: ee([e.icon, "w-detail-header-icon"])
3009
3021
  }, null, 2)) : g("", !0),
3010
- m("div", po, [
3011
- m("h2", ho, F(e.title), 1),
3012
- e.subtitle ? (o(), u("p", yo, F(e.subtitle), 1)) : g("", !0)
3022
+ m("div", ho, [
3023
+ m("h2", yo, F(e.title), 1),
3024
+ e.subtitle ? (o(), d("p", go, F(e.subtitle), 1)) : g("", !0)
3013
3025
  ]),
3014
- e.status ? (o(), $(eo, {
3026
+ e.status ? (o(), $(to, {
3015
3027
  key: 1,
3016
3028
  value: e.status,
3017
3029
  map: e.statusMap
3018
3030
  }, null, 8, ["value", "map"])) : g("", !0)
3019
3031
  ]),
3020
- m("div", go, [
3032
+ m("div", bo, [
3021
3033
  A(i.$slots, "actions")
3022
3034
  ])
3023
3035
  ]));
3024
3036
  }
3025
- }), bo = { class: "w-info-card" }, wo = {
3037
+ }), wo = { class: "w-info-card" }, ko = {
3026
3038
  key: 0,
3027
3039
  class: "w-info-card-title"
3028
- }, ko = { class: "w-info-card-grid" }, $o = { class: "w-info-card-label" }, xo = { class: "w-info-card-value" }, An = /* @__PURE__ */ oe({
3040
+ }, $o = { class: "w-info-card-grid" }, xo = { class: "w-info-card-label" }, Co = { class: "w-info-card-value" }, Un = /* @__PURE__ */ ie({
3029
3041
  __name: "WInfoCard",
3030
3042
  props: {
3031
3043
  title: {},
3032
3044
  fields: {}
3033
3045
  },
3034
3046
  setup(e) {
3035
- const { formatCurrency: a, formatDate: t, formatNumber: n } = Qe();
3047
+ const { formatCurrency: a, formatDate: t, formatNumber: n } = et();
3036
3048
  function i(f) {
3037
3049
  const w = f.value;
3038
3050
  return w == null || w === "" ? "-" : f.format === "currency" ? a(Number(w)) : f.format === "date" ? t(String(w)) : f.format === "datetime" ? t(String(w), "DD/MM/YYYY HH:mm") : f.format === "number" ? n(Number(w)) : String(w);
3039
3051
  }
3040
- return (f, w) => (o(), u("div", bo, [
3041
- e.title ? (o(), u("h3", wo, F(e.title), 1)) : g("", !0),
3042
- m("div", ko, [
3043
- (o(!0), u(X, null, le(e.fields, (S) => (o(), u("div", {
3052
+ return (f, w) => (o(), d("div", wo, [
3053
+ e.title ? (o(), d("h3", ko, F(e.title), 1)) : g("", !0),
3054
+ m("div", $o, [
3055
+ (o(!0), d(X, null, le(e.fields, (S) => (o(), d("div", {
3044
3056
  key: S.label,
3045
3057
  class: "w-info-card-field"
3046
3058
  }, [
3047
- m("span", $o, F(S.label), 1),
3048
- m("span", xo, F(i(S)), 1)
3059
+ m("span", xo, F(S.label), 1),
3060
+ m("span", Co, F(i(S)), 1)
3049
3061
  ]))), 128))
3050
3062
  ])
3051
3063
  ]));
3052
3064
  }
3053
- }), Co = {
3065
+ }), Vo = {
3054
3066
  key: 0,
3055
3067
  class: "w-kpi-card__loading"
3056
- }, Vo = { class: "w-kpi-card__loading-content" }, So = { class: "w-kpi-card__header" }, Do = {
3068
+ }, So = { class: "w-kpi-card__loading-content" }, Do = { class: "w-kpi-card__header" }, Eo = {
3057
3069
  key: 0,
3058
3070
  class: "w-kpi-card__icon"
3059
- }, Eo = {
3071
+ }, Po = {
3060
3072
  key: 1,
3061
3073
  class: "w-kpi-card__trend"
3062
- }, Po = { class: "w-kpi-card__content" }, Fo = { class: "w-kpi-card__label" }, Io = { class: "w-kpi-card__value" }, Mo = {
3074
+ }, Fo = { class: "w-kpi-card__content" }, Io = { class: "w-kpi-card__label" }, Ro = { class: "w-kpi-card__value" }, Mo = {
3063
3075
  key: 0,
3064
3076
  class: "w-kpi-card__hint"
3065
- }, Ro = {
3077
+ }, Ao = {
3066
3078
  key: 0,
3067
3079
  class: "w-kpi-card__footer"
3068
- }, Ao = /* @__PURE__ */ oe({
3080
+ }, Uo = /* @__PURE__ */ ie({
3069
3081
  __name: "WKpiCard",
3070
3082
  props: {
3071
3083
  label: {},
@@ -3077,15 +3089,15 @@ const fo = { class: "w-detail-header" }, vo = { class: "w-detail-header-left" },
3077
3089
  loading: { type: Boolean }
3078
3090
  },
3079
3091
  setup(e) {
3080
- return (a, t) => (o(), u("article", {
3092
+ return (a, t) => (o(), d("article", {
3081
3093
  class: ee(["w-kpi-card", e.severity ? `w-kpi-card--${e.severity}` : ""])
3082
3094
  }, [
3083
- e.loading ? (o(), u("div", Co, [
3095
+ e.loading ? (o(), d("div", Vo, [
3084
3096
  V(r(ze), {
3085
3097
  shape: "circle",
3086
3098
  size: "2.75rem"
3087
3099
  }),
3088
- m("div", Vo, [
3100
+ m("div", So, [
3089
3101
  V(r(ze), {
3090
3102
  width: "6rem",
3091
3103
  height: "0.75rem"
@@ -3099,45 +3111,45 @@ const fo = { class: "w-detail-header" }, vo = { class: "w-detail-header-left" },
3099
3111
  height: "0.75rem"
3100
3112
  })
3101
3113
  ])
3102
- ])) : (o(), u(X, { key: 1 }, [
3103
- m("div", So, [
3104
- e.icon || a.$slots.icon ? (o(), u("div", Do, [
3114
+ ])) : (o(), d(X, { key: 1 }, [
3115
+ m("div", Do, [
3116
+ e.icon || a.$slots.icon ? (o(), d("div", Eo, [
3105
3117
  A(a.$slots, "icon", {}, () => [
3106
- e.icon ? (o(), u("i", {
3118
+ e.icon ? (o(), d("i", {
3107
3119
  key: 0,
3108
3120
  class: ee(e.icon)
3109
3121
  }, null, 2)) : g("", !0)
3110
3122
  ])
3111
3123
  ])) : g("", !0),
3112
- e.trend || a.$slots.trend ? (o(), u("div", Eo, [
3124
+ e.trend || a.$slots.trend ? (o(), d("div", Po, [
3113
3125
  A(a.$slots, "trend", {}, () => [
3114
- e.trend ? (o(), u("span", {
3126
+ e.trend ? (o(), d("span", {
3115
3127
  key: 0,
3116
3128
  class: ee(["w-kpi-card__trend-badge", e.trend.direction ? `w-kpi-card__trend-badge--${e.trend.direction}` : ""])
3117
3129
  }, F(e.trend.value), 3)) : g("", !0)
3118
3130
  ])
3119
3131
  ])) : g("", !0)
3120
3132
  ]),
3121
- m("div", Po, [
3122
- m("p", Fo, F(e.label), 1),
3123
- m("div", Io, [
3133
+ m("div", Fo, [
3134
+ m("p", Io, F(e.label), 1),
3135
+ m("div", Ro, [
3124
3136
  A(a.$slots, "value", {}, () => [
3125
3137
  Fe(F(e.value), 1)
3126
3138
  ])
3127
3139
  ]),
3128
- e.hint || a.$slots.hint ? (o(), u("p", Mo, [
3140
+ e.hint || a.$slots.hint ? (o(), d("p", Mo, [
3129
3141
  A(a.$slots, "hint", {}, () => [
3130
3142
  Fe(F(e.hint), 1)
3131
3143
  ])
3132
3144
  ])) : g("", !0)
3133
3145
  ]),
3134
- a.$slots.footer ? (o(), u("footer", Ro, [
3146
+ a.$slots.footer ? (o(), d("footer", Ao, [
3135
3147
  A(a.$slots, "footer")
3136
3148
  ])) : g("", !0)
3137
3149
  ], 64))
3138
3150
  ], 2));
3139
3151
  }
3140
- }), Un = /* @__PURE__ */ oe({
3152
+ }), Bn = /* @__PURE__ */ ie({
3141
3153
  __name: "WKpiGrid",
3142
3154
  props: {
3143
3155
  items: { default: () => [] },
@@ -3149,14 +3161,14 @@ const fo = { class: "w-detail-header" }, vo = { class: "w-detail-header-left" },
3149
3161
  a.columns === "auto" ? "w-kpi-grid--auto" : `w-kpi-grid--cols-${a.columns}`,
3150
3162
  { "w-kpi-grid--dense": a.dense }
3151
3163
  ]);
3152
- return (n, i) => (o(), u("div", {
3164
+ return (n, i) => (o(), d("div", {
3153
3165
  class: ee(["w-kpi-grid", t.value])
3154
3166
  }, [
3155
- n.$slots.item ? (o(!0), u(X, { key: 0 }, le(e.items, (f, w) => A(n.$slots, "item", {
3167
+ n.$slots.item ? (o(!0), d(X, { key: 0 }, le(e.items, (f, w) => A(n.$slots, "item", {
3156
3168
  key: w,
3157
3169
  item: f,
3158
3170
  index: w
3159
- })), 128)) : (o(!0), u(X, { key: 1 }, le(e.items, (f, w) => (o(), $(Ao, {
3171
+ })), 128)) : (o(!0), d(X, { key: 1 }, le(e.items, (f, w) => (o(), $(Uo, {
3160
3172
  key: w,
3161
3173
  label: f.label,
3162
3174
  value: f.value,
@@ -3168,16 +3180,16 @@ const fo = { class: "w-detail-header" }, vo = { class: "w-detail-header-left" },
3168
3180
  }, null, 8, ["label", "value", "icon", "severity", "hint", "trend", "loading"]))), 128))
3169
3181
  ], 2));
3170
3182
  }
3171
- }), Uo = { class: "w-section-header__main" }, Bo = {
3183
+ }), Bo = { class: "w-section-header__main" }, To = {
3172
3184
  key: 0,
3173
3185
  class: "w-section-header__icon"
3174
- }, To = { class: "w-section-header__content" }, No = { class: "w-section-header__title-row" }, Lo = { class: "w-section-header__title" }, zo = {
3186
+ }, No = { class: "w-section-header__content" }, Lo = { class: "w-section-header__title-row" }, zo = { class: "w-section-header__title" }, Oo = {
3175
3187
  key: 0,
3176
3188
  class: "w-section-header__subtitle"
3177
- }, Oo = {
3189
+ }, Wo = {
3178
3190
  key: 0,
3179
3191
  class: "w-section-header__actions"
3180
- }, Bn = /* @__PURE__ */ oe({
3192
+ }, Tn = /* @__PURE__ */ ie({
3181
3193
  __name: "WSectionHeader",
3182
3194
  props: {
3183
3195
  title: {},
@@ -3186,41 +3198,41 @@ const fo = { class: "w-detail-header" }, vo = { class: "w-detail-header-left" },
3186
3198
  compact: { type: Boolean }
3187
3199
  },
3188
3200
  setup(e) {
3189
- return (a, t) => (o(), u("div", {
3201
+ return (a, t) => (o(), d("div", {
3190
3202
  class: ee(["w-section-header", { "w-section-header--compact": e.compact }])
3191
3203
  }, [
3192
- m("div", Uo, [
3193
- e.icon || a.$slots.icon ? (o(), u("div", Bo, [
3204
+ m("div", Bo, [
3205
+ e.icon || a.$slots.icon ? (o(), d("div", To, [
3194
3206
  A(a.$slots, "icon", {}, () => [
3195
- e.icon ? (o(), u("i", {
3207
+ e.icon ? (o(), d("i", {
3196
3208
  key: 0,
3197
3209
  class: ee(e.icon)
3198
3210
  }, null, 2)) : g("", !0)
3199
3211
  ])
3200
3212
  ])) : g("", !0),
3201
- m("div", To, [
3202
- m("div", No, [
3203
- m("h3", Lo, F(e.title), 1),
3213
+ m("div", No, [
3214
+ m("div", Lo, [
3215
+ m("h3", zo, F(e.title), 1),
3204
3216
  A(a.$slots, "meta")
3205
3217
  ]),
3206
- e.subtitle ? (o(), u("p", zo, F(e.subtitle), 1)) : g("", !0)
3218
+ e.subtitle ? (o(), d("p", Oo, F(e.subtitle), 1)) : g("", !0)
3207
3219
  ])
3208
3220
  ]),
3209
- a.$slots.actions ? (o(), u("div", Oo, [
3221
+ a.$slots.actions ? (o(), d("div", Wo, [
3210
3222
  A(a.$slots, "actions")
3211
3223
  ])) : g("", !0)
3212
3224
  ], 2));
3213
3225
  }
3214
- }), Wo = {
3226
+ }), jo = {
3215
3227
  key: 0,
3216
3228
  class: "w-form-section__header"
3217
- }, jo = { class: "w-form-section__content" }, qo = { class: "w-form-section__title" }, Ko = {
3229
+ }, qo = { class: "w-form-section__content" }, Ko = { class: "w-form-section__title" }, Ho = {
3218
3230
  key: 0,
3219
3231
  class: "w-form-section__description"
3220
- }, Ho = {
3232
+ }, Go = {
3221
3233
  key: 0,
3222
3234
  class: "w-form-section__actions"
3223
- }, Go = { class: "w-form-section__body" }, Tn = /* @__PURE__ */ oe({
3235
+ }, Yo = { class: "w-form-section__body" }, Nn = /* @__PURE__ */ ie({
3224
3236
  __name: "WFormSection",
3225
3237
  props: {
3226
3238
  title: {},
@@ -3228,59 +3240,59 @@ const fo = { class: "w-detail-header" }, vo = { class: "w-detail-header-left" },
3228
3240
  variant: {}
3229
3241
  },
3230
3242
  setup(e) {
3231
- return (a, t) => (o(), u("section", {
3243
+ return (a, t) => (o(), d("section", {
3232
3244
  class: ee(["w-form-section", e.variant ? `w-form-section--${e.variant}` : ""])
3233
3245
  }, [
3234
- e.title || e.description || a.$slots.actions ? (o(), u("div", Wo, [
3235
- m("div", jo, [
3236
- m("h3", qo, F(e.title), 1),
3237
- e.description ? (o(), u("p", Ko, F(e.description), 1)) : g("", !0)
3246
+ e.title || e.description || a.$slots.actions ? (o(), d("div", jo, [
3247
+ m("div", qo, [
3248
+ m("h3", Ko, F(e.title), 1),
3249
+ e.description ? (o(), d("p", Ho, F(e.description), 1)) : g("", !0)
3238
3250
  ]),
3239
- a.$slots.actions ? (o(), u("div", Ho, [
3251
+ a.$slots.actions ? (o(), d("div", Go, [
3240
3252
  A(a.$slots, "actions")
3241
3253
  ])) : g("", !0)
3242
3254
  ])) : g("", !0),
3243
- m("div", Go, [
3255
+ m("div", Yo, [
3244
3256
  A(a.$slots, "default")
3245
3257
  ])
3246
3258
  ], 2));
3247
3259
  }
3248
- }), Yo = {
3260
+ }), Jo = {
3249
3261
  key: 0,
3250
3262
  class: "w-action-bar__primary"
3251
- }, Jo = {
3263
+ }, Xo = {
3252
3264
  key: 1,
3253
3265
  class: "w-action-bar__filters"
3254
- }, Xo = {
3266
+ }, Zo = {
3255
3267
  key: 2,
3256
3268
  class: "w-action-bar__secondary"
3257
- }, Nn = /* @__PURE__ */ oe({
3269
+ }, Ln = /* @__PURE__ */ ie({
3258
3270
  __name: "WActionBar",
3259
3271
  props: {
3260
3272
  align: { default: "between" },
3261
3273
  stackOnMobile: { type: Boolean, default: !0 }
3262
3274
  },
3263
3275
  setup(e) {
3264
- return (a, t) => (o(), u("div", {
3276
+ return (a, t) => (o(), d("div", {
3265
3277
  class: ee(["w-action-bar", [`w-action-bar--${e.align}`, { "w-action-bar--stack": e.stackOnMobile }]])
3266
3278
  }, [
3267
- a.$slots.primary || a.$slots.default ? (o(), u("div", Yo, [
3279
+ a.$slots.primary || a.$slots.default ? (o(), d("div", Jo, [
3268
3280
  A(a.$slots, "primary", {}, () => [
3269
3281
  A(a.$slots, "default")
3270
3282
  ])
3271
3283
  ])) : g("", !0),
3272
- a.$slots.filters ? (o(), u("div", Jo, [
3284
+ a.$slots.filters ? (o(), d("div", Xo, [
3273
3285
  A(a.$slots, "filters")
3274
3286
  ])) : g("", !0),
3275
- a.$slots.secondary ? (o(), u("div", Xo, [
3287
+ a.$slots.secondary ? (o(), d("div", Zo, [
3276
3288
  A(a.$slots, "secondary")
3277
3289
  ])) : g("", !0)
3278
3290
  ], 2));
3279
3291
  }
3280
- }), Zo = { class: "w-progress-flow__marker" }, Qo = { class: "w-progress-flow__content" }, _o = { class: "w-progress-flow__label" }, en = {
3292
+ }), Qo = { class: "w-progress-flow__marker" }, _o = { class: "w-progress-flow__content" }, en = { class: "w-progress-flow__label" }, tn = {
3281
3293
  key: 0,
3282
3294
  class: "w-progress-flow__description"
3283
- }, Ln = /* @__PURE__ */ oe({
3295
+ }, zn = /* @__PURE__ */ ie({
3284
3296
  __name: "WProgressFlow",
3285
3297
  props: {
3286
3298
  steps: {},
@@ -3292,10 +3304,10 @@ const fo = { class: "w-detail-header" }, vo = { class: "w-detail-header-left" },
3292
3304
  function n(i) {
3293
3305
  return i < t.value ? "done" : i === t.value ? "current" : "pending";
3294
3306
  }
3295
- return (i, f) => (o(), u("div", {
3307
+ return (i, f) => (o(), d("div", {
3296
3308
  class: ee(["w-progress-flow", `w-progress-flow--${e.orientation}`])
3297
3309
  }, [
3298
- (o(!0), u(X, null, le(e.steps, (w, S) => (o(), u("div", {
3310
+ (o(!0), d(X, null, le(e.steps, (w, S) => (o(), d("div", {
3299
3311
  key: w.key,
3300
3312
  class: ee(["w-progress-flow__step", `w-progress-flow__step--${n(S)}`])
3301
3313
  }, [
@@ -3304,12 +3316,12 @@ const fo = { class: "w-detail-header" }, vo = { class: "w-detail-header-left" },
3304
3316
  index: S,
3305
3317
  state: n(S)
3306
3318
  }, () => [
3307
- m("div", Zo, [
3319
+ m("div", Qo, [
3308
3320
  m("span", null, F(S + 1), 1)
3309
3321
  ]),
3310
- m("div", Qo, [
3311
- m("p", _o, F(w.label), 1),
3312
- w.description ? (o(), u("p", en, F(w.description), 1)) : g("", !0)
3322
+ m("div", _o, [
3323
+ m("p", en, F(w.label), 1),
3324
+ w.description ? (o(), d("p", tn, F(w.description), 1)) : g("", !0)
3313
3325
  ])
3314
3326
  ])
3315
3327
  ], 2))), 128))
@@ -3317,32 +3329,32 @@ const fo = { class: "w-detail-header" }, vo = { class: "w-detail-header-left" },
3317
3329
  }
3318
3330
  });
3319
3331
  export {
3320
- Rl as W,
3321
- Nn as _,
3322
- bl as a,
3323
- Ze as b,
3332
+ Al as W,
3333
+ Ln as _,
3334
+ wl as a,
3335
+ Qe as b,
3324
3336
  gt as c,
3325
- Pn as d,
3326
- it as e,
3327
- Fn as f,
3328
- Rn as g,
3337
+ Fn as d,
3338
+ st as e,
3339
+ In as f,
3340
+ An as g,
3329
3341
  Mn as h,
3330
- ma as i,
3331
- Tn as j,
3332
- An as k,
3333
- Ao as l,
3334
- Un as m,
3335
- xl as n,
3336
- In as o,
3337
- Ln as p,
3338
- Bn as q,
3339
- eo as r,
3340
- Gl as s,
3341
- ha as t,
3342
- ml as u,
3343
- ul as v,
3344
- fl as w,
3345
- dl as x,
3346
- pa as y
3342
+ fa as i,
3343
+ Nn as j,
3344
+ Un as k,
3345
+ Uo as l,
3346
+ Bn as m,
3347
+ Cl as n,
3348
+ Rn as o,
3349
+ zn as p,
3350
+ Tn as q,
3351
+ to as r,
3352
+ Yl as s,
3353
+ ya as t,
3354
+ fl as u,
3355
+ dl as v,
3356
+ vl as w,
3357
+ cl as x,
3358
+ ha as y
3347
3359
  };
3348
- //# sourceMappingURL=WProgressFlow.vue_vue_type_script_setup_true_lang-CoGaRckJ.js.map
3360
+ //# sourceMappingURL=WProgressFlow.vue_vue_type_script_setup_true_lang-DYfbGNS6.js.map