@wgalleti/primevue-components 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,38 +1,38 @@
1
- import { inject as Le, defineComponent as fe, openBlock as i, createElementBlock as m, createBlock as A, unref as g, toDisplayString as T, ref as K, computed as O, watch as Qe, reactive as we, resolveDirective as xt, Fragment as ie, createElementVNode as h, createVNode as Y, withDirectives as he, withCtx as se, createCommentVNode as S, renderList as ce, normalizeStyle as Ce, createTextVNode as Fe, normalizeClass as re, renderSlot as N, isRef as Ut, withModifiers as qt, createSlots as ut, normalizeProps as dt, guardReactiveProps as ct, useSlots as Ht, onMounted as Kt, createStaticVNode as Gt } from "vue";
1
+ import { inject as Le, defineComponent as fe, openBlock as i, createElementBlock as m, createBlock as A, unref as g, toDisplayString as T, ref as K, computed as O, watch as Qe, reactive as we, resolveDirective as xt, Fragment as ie, createElementVNode as h, mergeProps as Ut, createVNode as Y, withDirectives as he, withCtx as se, createCommentVNode as S, renderList as ce, normalizeStyle as Ce, createTextVNode as Fe, normalizeClass as re, renderSlot as N, isRef as qt, withModifiers as Ht, createSlots as ut, normalizeProps as dt, guardReactiveProps as ct, useSlots as Kt, onMounted as Gt, createStaticVNode as Jt } from "vue";
2
2
  import St from "primevue/datatable";
3
3
  import Oe from "primevue/column";
4
4
  import ae from "primevue/button";
5
5
  import ye from "primevue/inputtext";
6
6
  import qe from "primevue/iconfield";
7
7
  import He from "primevue/inputicon";
8
- import Jt from "primevue/paginator";
9
- import Zt from "primevue/contextmenu";
8
+ import Zt from "primevue/paginator";
9
+ import Xt from "primevue/contextmenu";
10
10
  import Pt from "primevue/tag";
11
11
  import ze from "dayjs";
12
12
  import Vt from "primevue/dialog";
13
13
  import vt from "primevue/inputnumber";
14
- import Xt from "primevue/textarea";
15
- import Qt from "primevue/select";
14
+ import Qt from "primevue/textarea";
15
+ import _t from "primevue/select";
16
16
  import Mt from "primevue/autocomplete";
17
17
  import gt from "primevue/datepicker";
18
- import _t from "primevue/toggleswitch";
19
- import ea from "primevue/colorpicker";
20
- import ta from "primevue/password";
21
- import { useToast as aa } from "primevue/usetoast";
22
- import { useConfirm as na } from "primevue/useconfirm";
23
- import oa from "primevue/inputgroup";
18
+ import ea from "primevue/toggleswitch";
19
+ import ta from "primevue/colorpicker";
20
+ import aa from "primevue/password";
21
+ import { useToast as na } from "primevue/usetoast";
22
+ import { useConfirm as oa } from "primevue/useconfirm";
23
+ import la from "primevue/inputgroup";
24
24
  import ht from "primevue/inputgroupaddon";
25
25
  import Ze from "primevue/skeleton";
26
- const la = Symbol("w-axios"), at = Symbol("w-data-provider"), nt = Symbol("w-config");
27
- function sa(e) {
26
+ const sa = Symbol("w-axios"), at = Symbol("w-data-provider"), nt = Symbol("w-config");
27
+ function ia(e) {
28
28
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
29
29
  }
30
- var _e = { exports: {} }, ia = _e.exports, yt;
31
- function ra() {
30
+ var _e = { exports: {} }, ra = _e.exports, yt;
31
+ function ua() {
32
32
  return yt || (yt = 1, (function(e, a) {
33
33
  (function(t, n) {
34
34
  e.exports = n();
35
- })(ia, (function() {
35
+ })(ra, (function() {
36
36
  var t = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, n = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, s = /\d/, r = /\d\d/, u = /\d\d?/, b = /\d*[^-_:/,()\s\d]+/, d = {}, x = function(v) {
37
37
  return (v = +v) + (v > 68 ? 1900 : 2e3);
38
38
  }, F = function(v) {
@@ -150,9 +150,9 @@ function ra() {
150
150
  }));
151
151
  })(_e)), _e.exports;
152
152
  }
153
- var ua = ra();
154
- const da = /* @__PURE__ */ sa(ua);
155
- ze.extend(da);
153
+ var da = ua();
154
+ const ca = /* @__PURE__ */ ia(da);
155
+ ze.extend(ca);
156
156
  function ft(e) {
157
157
  if (!e) return null;
158
158
  if (e instanceof Date) return e;
@@ -165,10 +165,10 @@ function Et(e) {
165
165
  function Ft(e) {
166
166
  return e ? typeof e == "string" ? e : ze(e).toISOString() : null;
167
167
  }
168
- function ca(e, a = "DD/MM/YYYY") {
168
+ function fa(e, a = "DD/MM/YYYY") {
169
169
  return e ? ze(e).format(a) : "—";
170
170
  }
171
- function fa(e) {
171
+ function ma(e) {
172
172
  return e ? ze(e).format("DD/MM/YYYY HH:mm") : "—";
173
173
  }
174
174
  function Ae(e) {
@@ -187,12 +187,12 @@ function Rt(e) {
187
187
  "$1.$2.$3/$4-$5"
188
188
  );
189
189
  }
190
- function ma(e) {
190
+ function pa(e) {
191
191
  if (!e) return "—";
192
192
  const a = Ae(e);
193
193
  return a.length === 11 ? At(e) : a.length === 14 ? Rt(e) : e;
194
194
  }
195
- function pa(e) {
195
+ function va(e) {
196
196
  if (!e) return "—";
197
197
  const a = Ae(e);
198
198
  return a.length === 11 ? a.replace(/^(\d{2})(\d{5})(\d{4})$/, "($1) $2-$3") : a.length === 10 ? a.replace(/^(\d{2})(\d{4})(\d{4})$/, "($1) $2-$3") : e;
@@ -231,7 +231,7 @@ function Tt(e) {
231
231
  const b = s < 2 ? 0 : 11 - s;
232
232
  return parseInt(a[13]) !== b ? "CNPJ inválido." : null;
233
233
  }
234
- function va(e) {
234
+ function ga(e) {
235
235
  if (!e) return null;
236
236
  const a = Ae(e);
237
237
  return a.length === 11 ? It(e) : a.length === 14 ? Tt(e) : "CPF deve ter 11 dígitos ou CNPJ deve ter 14 dígitos.";
@@ -245,7 +245,7 @@ function bt(e, a) {
245
245
  maximumFractionDigits: a
246
246
  }), et.set(t, n)), n;
247
247
  }
248
- function ga(e, a) {
248
+ function ha(e, a) {
249
249
  const t = `${e}-${a}`;
250
250
  let n = et.get(t);
251
251
  return n || (n = new Intl.NumberFormat(e, {
@@ -262,16 +262,16 @@ function mt() {
262
262
  currency: "BRL"
263
263
  }), a = (e == null ? void 0 : e.locale) ?? "pt-BR", t = (e == null ? void 0 : e.currency) ?? "BRL";
264
264
  function n(d) {
265
- return d == null ? "—" : ga(a, t).format(d);
265
+ return d == null ? "—" : ha(a, t).format(d);
266
266
  }
267
267
  function s(d, x = 2) {
268
268
  return d == null ? "—" : bt(a, x).format(d);
269
269
  }
270
270
  function r(d, x) {
271
- return ca(d, x ?? (e == null ? void 0 : e.dateFormat) ?? "DD/MM/YYYY");
271
+ return fa(d, x ?? (e == null ? void 0 : e.dateFormat) ?? "DD/MM/YYYY");
272
272
  }
273
273
  function u(d) {
274
- return fa(d);
274
+ return ma(d);
275
275
  }
276
276
  function b(d) {
277
277
  return d == null ? "—" : `${bt(a, 2).format(d)}%`;
@@ -284,32 +284,32 @@ function mt() {
284
284
  formatPercent: b,
285
285
  formatCpf: At,
286
286
  formatCnpj: Rt,
287
- formatCpfCnpj: ma,
288
- formatTelefone: pa,
287
+ formatCpfCnpj: pa,
288
+ formatTelefone: va,
289
289
  validateCpf: It,
290
290
  validateCnpj: Tt,
291
- validateCpfCnpj: va,
291
+ validateCpfCnpj: ga,
292
292
  parseDate: ft,
293
293
  toDateString: Et,
294
294
  toDateTimeString: Ft
295
295
  };
296
296
  }
297
- const ha = {
297
+ const ya = {
298
298
  key: 0,
299
299
  class: "text-muted-color text-xs"
300
- }, ya = ["src", "alt"], ba = {
300
+ }, ba = ["src", "alt"], wa = {
301
301
  key: 3,
302
302
  class: "text-muted-color tabular-nums text-[0.8125rem]"
303
- }, wa = {
303
+ }, ka = {
304
304
  key: 4,
305
305
  class: "text-muted-color tabular-nums text-[0.8125rem]"
306
- }, ka = {
306
+ }, $a = {
307
307
  key: 5,
308
308
  class: "font-semibold tabular-nums text-[0.8125rem]"
309
- }, $a = {
309
+ }, Ca = {
310
310
  key: 6,
311
311
  class: "font-semibold tabular-nums text-[0.8125rem]"
312
- }, Ca = {
312
+ }, Da = {
313
313
  key: 7,
314
314
  class: "text-[0.8125rem]"
315
315
  }, tt = /* @__PURE__ */ fe({
@@ -321,20 +321,20 @@ const ha = {
321
321
  },
322
322
  setup(e) {
323
323
  const { formatDate: a, formatDateTime: t, formatCurrency: n, formatNumber: s } = mt();
324
- return (r, u) => e.value == null ? (i(), m("span", ha, "—")) : e.column.type === "image" ? (i(), m("img", {
324
+ return (r, u) => e.value == null ? (i(), m("span", ya, "—")) : e.column.type === "image" ? (i(), m("img", {
325
325
  key: 1,
326
326
  src: String(e.value),
327
327
  alt: e.column.header,
328
328
  class: "size-9 rounded-lg object-cover ring-1 ring-surface-200 dark:ring-surface-700"
329
- }, null, 8, ya)) : e.column.type === "boolean" ? (i(), A(g(Pt), {
329
+ }, null, 8, ba)) : e.column.type === "boolean" ? (i(), A(g(Pt), {
330
330
  key: 2,
331
331
  value: e.column.tagValue ? e.column.tagValue(e.value, e.rowData) : e.value ? "Ativo" : "Inativo",
332
332
  severity: e.column.tagSeverity ? e.column.tagSeverity(e.value, e.rowData) : e.value ? "success" : "danger",
333
333
  class: "text-xs"
334
- }, null, 8, ["value", "severity"])) : e.column.type === "date" ? (i(), m("span", ba, T(g(a)(e.value)), 1)) : e.column.type === "datetime" ? (i(), m("span", wa, T(g(t)(e.value)), 1)) : e.column.type === "currency" ? (i(), m("span", ka, T(g(n)(e.value)), 1)) : e.column.type === "number" ? (i(), m("span", $a, T(e.column.format ? e.column.format(e.value, e.rowData) : g(s)(e.value, e.column.decimals ?? 0)), 1)) : (i(), m("span", Ca, T(e.column.format ? e.column.format(e.value, e.rowData) : e.value), 1));
334
+ }, null, 8, ["value", "severity"])) : e.column.type === "date" ? (i(), m("span", wa, T(g(a)(e.value)), 1)) : e.column.type === "datetime" ? (i(), m("span", ka, T(g(t)(e.value)), 1)) : e.column.type === "currency" ? (i(), m("span", $a, T(g(n)(e.value)), 1)) : e.column.type === "number" ? (i(), m("span", Ca, T(e.column.format ? e.column.format(e.value, e.rowData) : g(s)(e.value, e.column.decimals ?? 0)), 1)) : (i(), m("span", Da, T(e.column.format ? e.column.format(e.value, e.rowData) : e.value), 1));
335
335
  }
336
336
  });
337
- var Da = Object.defineProperty, xa = (e, a, t) => a in e ? Da(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t, Ue = (e, a, t) => xa(e, typeof a != "symbol" ? a + "" : a, t);
337
+ var xa = Object.defineProperty, Sa = (e, a, t) => a in e ? xa(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t, Ue = (e, a, t) => Sa(e, typeof a != "symbol" ? a + "" : a, t);
338
338
  const wt = {
339
339
  "#": { pattern: /[0-9]/ },
340
340
  "@": { pattern: /[a-zA-Z]/ },
@@ -346,7 +346,7 @@ const wt = {
346
346
  maximumFractionDigits: a,
347
347
  roundingMode: "trunc"
348
348
  });
349
- }, Sa = (e, a = !0, t) => {
349
+ }, Pa = (e, a = !0, t) => {
350
350
  var n, s, r, u;
351
351
  const b = ((n = t.number) == null ? void 0 : n.unsigned) !== !0 && e.startsWith("-") ? "-" : "", d = ((s = t.number) == null ? void 0 : s.fraction) ?? 0;
352
352
  let x = $t(0, d, t);
@@ -359,12 +359,12 @@ const wt = {
359
359
  }
360
360
  let J = x.format(parseFloat(I));
361
361
  return a ? d > 0 && I.endsWith(".") && !I.slice(0, -1).includes(".") && (J += z) : J = kt(J, E, z), b + J;
362
- }, Lt = (e) => JSON.parse(e.replaceAll("'", '"')), Pa = (e, a = {}) => {
362
+ }, Lt = (e) => JSON.parse(e.replaceAll("'", '"')), Va = (e, a = {}) => {
363
363
  const t = { ...a };
364
- e.dataset.maska != null && e.dataset.maska !== "" && (t.mask = Va(e.dataset.maska)), e.dataset.maskaEager != null && (t.eager = Xe(e.dataset.maskaEager)), e.dataset.maskaReversed != null && (t.reversed = Xe(e.dataset.maskaReversed)), e.dataset.maskaTokensReplace != null && (t.tokensReplace = Xe(e.dataset.maskaTokensReplace)), e.dataset.maskaTokens != null && (t.tokens = Ma(e.dataset.maskaTokens));
364
+ e.dataset.maska != null && e.dataset.maska !== "" && (t.mask = Ma(e.dataset.maska)), e.dataset.maskaEager != null && (t.eager = Xe(e.dataset.maskaEager)), e.dataset.maskaReversed != null && (t.reversed = Xe(e.dataset.maskaReversed)), e.dataset.maskaTokensReplace != null && (t.tokensReplace = Xe(e.dataset.maskaTokensReplace)), e.dataset.maskaTokens != null && (t.tokens = Ea(e.dataset.maskaTokens));
365
365
  const n = {};
366
366
  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 = Xe(e.dataset.maskaNumberUnsigned)), (e.dataset.maskaNumber != null || Object.values(n).length > 0) && (t.number = n), t;
367
- }, Xe = (e) => e !== "" ? !!JSON.parse(e) : !0, Va = (e) => e.startsWith("[") && e.endsWith("]") ? Lt(e) : e, Ma = (e) => {
367
+ }, Xe = (e) => e !== "" ? !!JSON.parse(e) : !0, Ma = (e) => e.startsWith("[") && e.endsWith("]") ? Lt(e) : e, Ea = (e) => {
368
368
  if (e.startsWith("{") && e.endsWith("}"))
369
369
  return Lt(e);
370
370
  const a = {};
@@ -384,7 +384,7 @@ const wt = {
384
384
  return !1;
385
385
  }
386
386
  };
387
- class Ea {
387
+ class Fa {
388
388
  constructor(a = {}) {
389
389
  Ue(this, "opts", {}), Ue(this, "memo", /* @__PURE__ */ new Map());
390
390
  const t = { ...a };
@@ -432,7 +432,7 @@ class Ea {
432
432
  }), { mask: t.join(""), escaped: n };
433
433
  }
434
434
  process(a, t, n = !0) {
435
- if (this.opts.number != null) return Sa(a, n, this.opts);
435
+ if (this.opts.number != null) return Pa(a, n, this.opts);
436
436
  if (t == null) return a;
437
437
  const s = `v=${a},mr=${t},m=${n ? 1 : 0}`;
438
438
  if (this.memo.has(s)) return this.memo.get(s);
@@ -454,7 +454,7 @@ class Ea {
454
454
  return this.memo.set(s, b.join("")), this.memo.get(s);
455
455
  }
456
456
  }
457
- class Fa {
457
+ class Aa {
458
458
  constructor(a, t = {}) {
459
459
  Ue(this, "items", /* @__PURE__ */ new Map()), Ue(this, "eventAbortController"), Ue(this, "onInput", (n) => {
460
460
  if (n instanceof CustomEvent && n.type === "input" && !n.isTrusted && !n.bubbles)
@@ -482,7 +482,7 @@ class Fa {
482
482
  const { signal: r } = this.eventAbortController;
483
483
  n.addEventListener("input", this.onInput, { capture: !0, signal: r });
484
484
  }
485
- const s = new Ea(Pa(n, t));
485
+ const s = new Fa(Va(n, t));
486
486
  this.items.set(n, s), queueMicrotask(() => this.updateValue(n)), n.selectionStart === null && s.isEager() && console.warn("Maska: input of `%s` type is not supported", n.type);
487
487
  }
488
488
  }
@@ -519,7 +519,7 @@ class Fa {
519
519
  };
520
520
  }
521
521
  }
522
- const it = /* @__PURE__ */ new WeakMap(), Aa = (e, a) => {
522
+ const it = /* @__PURE__ */ new WeakMap(), Ra = (e, a) => {
523
523
  if (e.arg == null || e.instance == null) return;
524
524
  const t = "setup" in e.instance.$.type;
525
525
  e.arg in e.instance ? e.instance[e.arg] = a : t && console.warn("Maska: please expose `%s` using defineExpose", e.arg);
@@ -531,12 +531,12 @@ const it = /* @__PURE__ */ new WeakMap(), Aa = (e, a) => {
531
531
  if (a.value != null && (s = typeof a.value == "string" ? { mask: a.value } : { ...a.value }), a.arg != null) {
532
532
  const r = (u) => {
533
533
  const b = a.modifiers.unmasked ? u.unmasked : a.modifiers.completed ? u.completed : u.masked;
534
- Aa(a, b);
534
+ Ra(a, b);
535
535
  };
536
536
  s.onMaska = s.onMaska == null ? r : Array.isArray(s.onMaska) ? [...s.onMaska, r] : [s.onMaska, r];
537
537
  }
538
- it.has(n) ? (t = it.get(n)) == null || t.update(s) : it.set(n, new Fa(n, s));
539
- }, Ra = {
538
+ it.has(n) ? (t = it.get(n)) == null || t.update(s) : it.set(n, new Aa(n, s));
539
+ }, Ia = {
540
540
  string: "text",
541
541
  integer: "number",
542
542
  decimal: "number",
@@ -551,9 +551,9 @@ const it = /* @__PURE__ */ new WeakMap(), Aa = (e, a) => {
551
551
  slug: "text",
552
552
  text: "textarea"
553
553
  };
554
- function Ia(e) {
554
+ function Ta(e) {
555
555
  var n;
556
- const a = Ra[e.type] ?? "text", t = {
556
+ const a = Ia[e.type] ?? "text", t = {
557
557
  field: e.name,
558
558
  label: e.label,
559
559
  type: a,
@@ -564,10 +564,10 @@ function Ia(e) {
564
564
  value: s.value
565
565
  }))), e.type === "fk" && (t.endpoint = e.endpoint, e.option_label && (t.optionLabel = e.option_label), e.option_value && (t.optionValue = e.option_value)), t;
566
566
  }
567
- function Ta(e) {
568
- return e.filter((a) => !a.read_only && a.name !== "id").map(Ia);
567
+ function La(e) {
568
+ return e.filter((a) => !a.read_only && a.name !== "id").map(Ta);
569
569
  }
570
- const La = {
570
+ const za = {
571
571
  boolean: "boolean",
572
572
  date: "date",
573
573
  datetime: "datetime",
@@ -575,19 +575,19 @@ const La = {
575
575
  float: "number",
576
576
  integer: "number"
577
577
  };
578
- function za(e) {
578
+ function Na(e) {
579
579
  return {
580
580
  field: e.type === "fk" ? `${e.name}_nome` : e.name,
581
581
  header: e.label,
582
- type: La[e.type],
582
+ type: za[e.type],
583
583
  sortable: !0
584
584
  };
585
585
  }
586
- function Na(e, a = 6) {
587
- return e.filter((t) => !t.read_only && t.name !== "id").slice(0, a).map(za);
586
+ function Ya(e, a = 6) {
587
+ return e.filter((t) => !t.read_only && t.name !== "id").slice(0, a).map(Na);
588
588
  }
589
589
  function Nt() {
590
- const e = aa();
590
+ const e = na();
591
591
  function a(r, u = "Sucesso") {
592
592
  e.add({ severity: "success", summary: u, detail: r, life: 3e3 });
593
593
  }
@@ -603,7 +603,7 @@ function Nt() {
603
603
  return { success: a, error: t, warn: n, info: s };
604
604
  }
605
605
  function Yt() {
606
- const e = na();
606
+ const e = oa();
607
607
  function a(n, s = "Deseja realmente excluir este registro?") {
608
608
  e.require({
609
609
  message: s,
@@ -637,10 +637,10 @@ function Yt() {
637
637
  }
638
638
  return { confirmDelete: a, confirmAction: t };
639
639
  }
640
- function Ya(e) {
640
+ function Oa(e) {
641
641
  return e.replace(/_/g, " ").replace(/^\w/, (a) => a.toUpperCase());
642
642
  }
643
- function Oa(e) {
643
+ function Ba(e) {
644
644
  if (typeof e == "string")
645
645
  return e;
646
646
  if (Array.isArray(e)) {
@@ -654,7 +654,7 @@ function Oa(e) {
654
654
  const t = [];
655
655
  for (const [n, s] of Object.entries(a)) {
656
656
  if (n === "non_field_errors") continue;
657
- const r = Ya(n);
657
+ const r = Oa(n);
658
658
  if (Array.isArray(s)) {
659
659
  const u = s.filter((b) => typeof b == "string");
660
660
  u.length > 0 && t.push(`${r}: ${u.join(" ")}`);
@@ -672,12 +672,13 @@ function Ke(e, a = "Erro inesperado") {
672
672
  if (!n || typeof n != "object")
673
673
  return t.message || a;
674
674
  const s = n.detail ?? n;
675
- return Oa(s) || a;
675
+ return Ba(s) || a;
676
676
  }
677
677
  function ql() {
678
678
  return { extractApiError: Ke };
679
679
  }
680
- const Ba = { class: "w-autocompletefk" }, ja = ["disabled"], Wa = { class: "w-autocompletefk-toolbar" }, Ua = { class: "w-autocompletefk-toolbar-actions" }, qa = { class: "flex items-center justify-end gap-1" }, Ha = { class: "w-autocompletefk-footer" }, Ot = /* @__PURE__ */ fe({
680
+ const ja = ["disabled"], Wa = { class: "w-autocompletefk-toolbar" }, Ua = { class: "w-autocompletefk-toolbar-actions" }, qa = { class: "flex items-center justify-end gap-1" }, Ha = { class: "w-autocompletefk-footer" }, Ot = /* @__PURE__ */ fe({
681
+ inheritAttrs: !1,
681
682
  __name: "WAutoCompleteFK",
682
683
  props: {
683
684
  modelValue: {},
@@ -803,14 +804,14 @@ const Ba = { class: "w-autocompletefk" }, ja = ["disabled"], Wa = { class: "w-au
803
804
  return (y = t.crudFields) != null && y.length ? !0 : l.value.length > 0;
804
805
  }), k = O(() => t.canCreate ?? f.value), o = O(() => t.canEdit ?? f.value), $ = O(() => t.canDelete ?? f.value), ue = O(() => o.value || $.value), me = O(() => {
805
806
  var y;
806
- return (y = t.crudFields) != null && y.length ? t.crudFields : Ta(l.value);
807
+ return (y = t.crudFields) != null && y.length ? t.crudFields : La(l.value);
807
808
  }), ke = O(() => {
808
809
  var y, C;
809
810
  return (y = t.crudColumns) != null && y.length ? t.crudColumns : (C = t.columns) != null && C.length ? t.columns.map((Q) => ({
810
811
  field: Q.field,
811
812
  header: Q.header,
812
813
  sortable: !0
813
- })) : l.value.length ? Na(l.value) : [
814
+ })) : l.value.length ? Ya(l.value) : [
814
815
  { field: t.optionLabel, header: t.optionLabel, sortable: !0 }
815
816
  ];
816
817
  });
@@ -937,7 +938,7 @@ const Ba = { class: "w-autocompletefk" }, ja = ["disabled"], Wa = { class: "w-au
937
938
  return (y, C) => {
938
939
  const Q = xt("tooltip");
939
940
  return i(), m(ie, null, [
940
- h("div", Ba, [
941
+ h("div", Ut({ class: "w-autocompletefk" }, y.$attrs), [
941
942
  Y(g(Mt), {
942
943
  "model-value": d.value,
943
944
  suggestions: x.value,
@@ -966,7 +967,7 @@ const Ba = { class: "w-autocompletefk" }, ja = ["disabled"], Wa = { class: "w-au
966
967
  { top: !0 }
967
968
  ]
968
969
  ])
969
- ]),
970
+ ], 16),
970
971
  Y(g(Vt), {
971
972
  visible: q.value,
972
973
  "onUpdate:visible": C[4] || (C[4] = (L) => q.value = L),
@@ -1162,7 +1163,7 @@ const Ba = { class: "w-autocompletefk" }, ja = ["disabled"], Wa = { class: "w-au
1162
1163
  const F = Number(x) / Math.pow(10, t.decimals);
1163
1164
  n("update:modelValue", F);
1164
1165
  }
1165
- return (d, x) => r.value ? (i(), A(g(oa), {
1166
+ return (d, x) => r.value ? (i(), A(g(la), {
1166
1167
  key: 0,
1167
1168
  class: "w-money-input"
1168
1169
  }, {
@@ -1416,7 +1417,7 @@ const rn = { class: "w-crud-form" }, un = {
1416
1417
  return n.disabled || l.disabledOnEdit && n.isEditing ? !0 : typeof l.disabled == "function" ? l.disabled(n.formData, n.isEditing) : !!l.disabled;
1417
1418
  }
1418
1419
  function z(l) {
1419
- return Ut(l) ? l.value : l;
1420
+ return qt(l) ? l.value : l;
1420
1421
  }
1421
1422
  const I = O(() => {
1422
1423
  const l = n.isEditing ? "edit" : "create", f = n.fields.find(
@@ -1553,7 +1554,7 @@ const rn = { class: "w-crud-form" }, un = {
1553
1554
  class: "w-crud-form-switch",
1554
1555
  style: Ce(c(o, k))
1555
1556
  }, [
1556
- Y(g(_t), {
1557
+ Y(g(ea), {
1557
1558
  "model-value": e.formData[o.field],
1558
1559
  disabled: E(o),
1559
1560
  "onUpdate:modelValue": ($) => s("update:field", o.field, $)
@@ -1569,7 +1570,7 @@ const rn = { class: "w-crud-form" }, un = {
1569
1570
  o.required ? (i(), m("span", pn, "*")) : S("", !0)
1570
1571
  ]),
1571
1572
  h("div", vn, [
1572
- Y(g(ea), {
1573
+ Y(g(ta), {
1573
1574
  "model-value": q(o),
1574
1575
  disabled: E(o),
1575
1576
  "onUpdate:modelValue": ($) => j(o, $)
@@ -1659,7 +1660,7 @@ const rn = { class: "w-crud-form" }, un = {
1659
1660
  placeholder: o.placeholder,
1660
1661
  disabled: E(o),
1661
1662
  "onUpdate:modelValue": ($) => s("update:field", o.field, $)
1662
- }, null, 8, ["model-value", "autofocus", "placeholder", "disabled", "onUpdate:modelValue"])) : o.type === "password" ? (i(), A(g(ta), {
1663
+ }, null, 8, ["model-value", "autofocus", "placeholder", "disabled", "onUpdate:modelValue"])) : o.type === "password" ? (i(), A(g(aa), {
1663
1664
  key: 3,
1664
1665
  "model-value": e.formData[o.field],
1665
1666
  fluid: "",
@@ -1704,7 +1705,7 @@ const rn = { class: "w-crud-form" }, un = {
1704
1705
  placeholder: o.placeholder,
1705
1706
  disabled: E(o),
1706
1707
  "onUpdate:modelValue": ($) => s("update:field", o.field, $)
1707
- }, null, 8, ["model-value", "min", "max", "placeholder", "disabled", "onUpdate:modelValue"])) : o.type === "select" ? (i(), A(g(Qt), {
1708
+ }, null, 8, ["model-value", "min", "max", "placeholder", "disabled", "onUpdate:modelValue"])) : o.type === "select" ? (i(), A(g(_t), {
1708
1709
  key: 7,
1709
1710
  "model-value": e.formData[o.field],
1710
1711
  fluid: "",
@@ -1790,7 +1791,7 @@ const rn = { class: "w-crud-form" }, un = {
1790
1791
  onInput: ($) => x(o, $)
1791
1792
  }, null, 8, ["model-value", "placeholder", "disabled", "invalid", "onInput"])), [
1792
1793
  [g(rt), { mask: "#####-###" }]
1793
- ]) : o.type === "textarea" ? (i(), A(g(Xt), {
1794
+ ]) : o.type === "textarea" ? (i(), A(g(Qt), {
1794
1795
  key: 15,
1795
1796
  "model-value": e.formData[o.field],
1796
1797
  fluid: "",
@@ -1843,7 +1844,7 @@ const rn = { class: "w-crud-form" }, un = {
1843
1844
  default: se(() => [
1844
1845
  h("form", {
1845
1846
  class: "w-crud-form",
1846
- onSubmit: qt(r, ["prevent"])
1847
+ onSubmit: Ht(r, ["prevent"])
1847
1848
  }, [
1848
1849
  Y(xn, {
1849
1850
  ref_key: "rendererRef",
@@ -1986,7 +1987,7 @@ const En = { class: "w-crud" }, Fn = {
1986
1987
  },
1987
1988
  emits: ["row-expand", "row-collapse", "print"],
1988
1989
  setup(e, { emit: a }) {
1989
- const t = e, n = a, s = Ht(), { formatNumber: r } = mt(), u = K({}), b = K(t.defaultView);
1990
+ const t = e, n = a, s = Kt(), { formatNumber: r } = mt(), u = K({}), b = K(t.defaultView);
1990
1991
  function d(c) {
1991
1992
  return b.value === c;
1992
1993
  }
@@ -2095,7 +2096,7 @@ const En = { class: "w-crud" }, Fn = {
2095
2096
  }
2096
2097
  }
2097
2098
  }
2098
- return Kt(() => {
2099
+ return Gt(() => {
2099
2100
  t.autoInit && t.crud.init();
2100
2101
  }), (c, p) => {
2101
2102
  const U = xt("tooltip");
@@ -2439,9 +2440,9 @@ const En = { class: "w-crud" }, Fn = {
2439
2440
  ])) : S("", !0)
2440
2441
  ], 42, eo))), 128))
2441
2442
  ])) : N(c.$slots, "empty", { key: 1 }, () => [
2442
- p[19] || (p[19] = Gt('<div class="w-crud-empty"><div class="w-crud-empty-icon"><i class="pi pi-inbox"></i></div><p class="w-crud-empty-title">Nenhum registro encontrado</p><p class="w-crud-empty-text">Tente ajustar sua busca ou crie um novo registro</p></div>', 1))
2443
+ p[19] || (p[19] = Jt('<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))
2443
2444
  ]),
2444
- e.crud.items.value.length ? (i(), A(g(Jt), {
2445
+ e.crud.items.value.length ? (i(), A(g(Zt), {
2445
2446
  key: 3,
2446
2447
  rows: e.crud.pagination.pageSize,
2447
2448
  "total-records": e.crud.pagination.rows,
@@ -2526,7 +2527,7 @@ const En = { class: "w-crud" }, Fn = {
2526
2527
  ]) : S("", !0)
2527
2528
  ])) : S("", !0)
2528
2529
  ], 2),
2529
- e.contextMenu ? (i(), A(g(Zt), {
2530
+ e.contextMenu ? (i(), A(g(Xt), {
2530
2531
  key: 1,
2531
2532
  ref_key: "cm",
2532
2533
  ref: q,
@@ -3099,7 +3100,7 @@ const ts = {
3099
3100
  locale: a.locale ?? "pt-BR",
3100
3101
  currency: a.currency ?? "BRL"
3101
3102
  };
3102
- a.axios && e.provide(la, a.axios), e.provide(at, t), e.provide(nt, n), a.registerComponents !== !1 && (e.component("WCrudView", ro), e.component("WCrudFormDialog", pt), e.component("WCrudColumnRenderer", tt), e.component("WAutoCompleteFK", Ot), e.component("WMoneyInput", Bt), e.component("WTransferList", jt));
3103
+ a.axios && e.provide(sa, a.axios), e.provide(at, t), e.provide(nt, n), a.registerComponents !== !1 && (e.component("WCrudView", ro), e.component("WCrudFormDialog", pt), e.component("WCrudColumnRenderer", tt), e.component("WAutoCompleteFK", Ot), e.component("WMoneyInput", Bt), e.component("WTransferList", jt));
3103
3104
  }
3104
3105
  }, fl = {
3105
3106
  createTitle: "Novo Registro",
@@ -3614,17 +3615,17 @@ export {
3614
3615
  Xl as WSectionHeader,
3615
3616
  uo as WStatusTag,
3616
3617
  jt as WTransferList,
3617
- la as W_AXIOS_KEY,
3618
+ sa as W_AXIOS_KEY,
3618
3619
  nt as W_CONFIG_KEY,
3619
3620
  at as W_DATA_PROVIDER_KEY,
3620
3621
  cl as createAxiosDataProvider,
3621
3622
  os as createSupabaseDataProvider,
3622
3623
  Mn as downloadCsv,
3623
3624
  Ke as extractApiError,
3624
- za as mapApiFieldToColumnDef,
3625
- Ia as mapApiFieldToFieldDef,
3626
- Na as mapApiFieldsToColumnDefs,
3627
- Ta as mapApiFieldsToFieldDefs,
3625
+ Na as mapApiFieldToColumnDef,
3626
+ Ta as mapApiFieldToFieldDef,
3627
+ Ya as mapApiFieldsToColumnDefs,
3628
+ La as mapApiFieldsToFieldDefs,
3628
3629
  Vn as toCsv,
3629
3630
  ns as useApi,
3630
3631
  ql as useApiError,