@wgalleti/primevue-components 0.9.0 → 0.9.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.
@@ -81,15 +81,15 @@ const ot = {
81
81
  var n, i, v, $;
82
82
  const D = ((n = t.number) == null ? void 0 : n.unsigned) !== !0 && e.startsWith("-") ? "-" : "", x = ((i = t.number) == null ? void 0 : i.fraction) ?? 0;
83
83
  let E = it(0, x, t);
84
- const T = E.formatToParts(1000.12), w = ((v = T.find((F) => F.type === "group")) == null ? void 0 : v.value) ?? " ", q = (($ = T.find((F) => F.type === "decimal")) == null ? void 0 : $.value) ?? ".", X = nt(e, w, q);
85
- if (Number.isNaN(parseFloat(X))) return D;
86
- const H = X.split(".");
84
+ const T = E.formatToParts(1000.12), w = ((v = T.find((F) => F.type === "group")) == null ? void 0 : v.value) ?? " ", q = (($ = T.find((F) => F.type === "decimal")) == null ? void 0 : $.value) ?? ".", J = nt(e, w, q);
85
+ if (Number.isNaN(parseFloat(J))) return D;
86
+ const H = J.split(".");
87
87
  if (H[1] != null && H[1].length >= 1) {
88
88
  const F = H[1].length <= x ? H[1].length : x;
89
89
  E = it(F, x, t);
90
90
  }
91
- let Z = E.format(parseFloat(X));
92
- return a ? x > 0 && X.endsWith(".") && !X.slice(0, -1).includes(".") && (Z += q) : Z = nt(Z, w, q), D + Z;
91
+ let Z = E.format(parseFloat(J));
92
+ return a ? x > 0 && J.endsWith(".") && !J.slice(0, -1).includes(".") && (Z += q) : Z = nt(Z, w, q), D + Z;
93
93
  }, ht = (e) => JSON.parse(e.replaceAll("'", '"')), al = (e, a = {}) => {
94
94
  const t = { ...a };
95
95
  e.dataset.maska != null && e.dataset.maska !== "" && (t.mask = ol(e.dataset.maska)), e.dataset.maskaEager != null && (t.eager = We(e.dataset.maskaEager)), e.dataset.maskaReversed != null && (t.reversed = We(e.dataset.maskaReversed)), e.dataset.maskaTokensReplace != null && (t.tokensReplace = We(e.dataset.maskaTokensReplace)), e.dataset.maskaTokens != null && (t.tokens = nl(e.dataset.maskaTokens));
@@ -167,12 +167,12 @@ class il {
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: v, escaped: $ } = this.escapeMask(t), D = [], x = this.opts.tokens != null ? this.opts.tokens : {}, E = this.isReversed() ? -1 : 1, T = this.isReversed() ? "unshift" : "push", w = this.isReversed() ? 0 : v.length - 1, q = this.isReversed() ? () => F > -1 && M > -1 : () => F < v.length && M < a.length, X = (V) => !this.isReversed() && V <= w || this.isReversed() && V >= w;
170
+ const { mask: v, escaped: $ } = this.escapeMask(t), D = [], x = this.opts.tokens != null ? this.opts.tokens : {}, E = this.isReversed() ? -1 : 1, T = this.isReversed() ? "unshift" : "push", w = this.isReversed() ? 0 : v.length - 1, q = this.isReversed() ? () => F > -1 && M > -1 : () => F < v.length && M < a.length, J = (V) => !this.isReversed() && V <= w || this.isReversed() && V >= w;
171
171
  let H, Z = -1, F = this.isReversed() ? v.length - 1 : 0, M = this.isReversed() ? a.length - 1 : 0, N = !1;
172
172
  for (; q(); ) {
173
173
  const V = v.charAt(F), O = x[V], ae = (O == null ? void 0 : O.transform) != null ? O.transform(a.charAt(M)) : a.charAt(M);
174
174
  if (!$.includes(F) && O != null ? (ae.match(O.pattern) != null ? (D[T](ae), O.repeated ? (Z === -1 ? Z = F : F === w && F !== Z && (F = Z - E), w === Z && (F -= E)) : O.multiple && (N = !0, F -= E), F += E) : O.multiple ? N && (F += E, M -= E, N = !1) : ae === H ? H = void 0 : O.optional && (F += E, M -= E), M += E) : (n && !this.isEager() && D[T](V), ae === V && !this.isEager() ? M += E : H = V, this.isEager() || (F += E)), this.isEager())
175
- for (; X(F) && (x[v.charAt(F)] == null || $.includes(F)); ) {
175
+ for (; J(F) && (x[v.charAt(F)] == null || $.includes(F)); ) {
176
176
  if (n) {
177
177
  if (D[T](v.charAt(F)), a.charAt(M) === v.charAt(F)) {
178
178
  F += E, M += E;
@@ -230,8 +230,8 @@ class sl {
230
230
  if (n(), $ === null || $ === D.length && !t) return;
231
231
  const x = a.value, E = D.slice(0, $), T = x.slice(0, $), w = (i = this.processInput(a, E)) == null ? void 0 : i.unmasked, q = (v = this.processInput(a, T)) == null ? void 0 : v.unmasked;
232
232
  if (w === void 0 || q === void 0) return;
233
- let X = $;
234
- E !== T && (X += t ? x.length - D.length : w.length - q.length), a.setSelectionRange(X, X);
233
+ let J = $;
234
+ E !== T && (J += t ? x.length - D.length : w.length - q.length), a.setSelectionRange(J, J);
235
235
  }
236
236
  setValue(a, t) {
237
237
  const n = this.processInput(a, t);
@@ -358,7 +358,7 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
358
358
  u && (u.setAttribute("autofocus", ""), u.focus(), (oe = u.select) == null || oe.call(u));
359
359
  });
360
360
  });
361
- function X(u) {
361
+ function J(u) {
362
362
  return u == null || u === "";
363
363
  }
364
364
  function H(u) {
@@ -373,14 +373,14 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
373
373
  return u ? Array.isArray(u) ? u : [u] : [];
374
374
  }), F = P(
375
375
  () => Z.value.some(
376
- (u) => (u.required ?? !0) && X(H(u.value))
376
+ (u) => (u.required ?? !0) && J(H(u.value))
377
377
  )
378
378
  );
379
379
  function M() {
380
380
  const u = {};
381
381
  for (const g of Z.value) {
382
382
  const L = H(g.value);
383
- X(L) || (u[g.field] = L);
383
+ J(L) || (u[g.field] = L);
384
384
  }
385
385
  return u;
386
386
  }
@@ -449,10 +449,10 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
449
449
  const xe = B([]), f = P(() => {
450
450
  var u;
451
451
  return (u = t.crudFields) != null && u.length ? !0 : xe.value.length > 0;
452
- }), p = P(() => t.canCreate ?? f.value), y = P(() => t.canEdit ?? f.value), l = P(() => t.canDelete ?? f.value), k = P(() => y.value || l.value), _ = P(() => {
452
+ }), p = P(() => t.canCreate ?? f.value), h = P(() => t.canEdit ?? f.value), l = P(() => t.canDelete ?? f.value), k = P(() => h.value || l.value), _ = P(() => {
453
453
  var u;
454
454
  return (u = t.crudFields) != null && u.length ? t.crudFields : cl(xe.value);
455
- }), J = P(() => {
455
+ }), X = P(() => {
456
456
  var u, g;
457
457
  return (u = t.crudColumns) != null && u.length ? t.crudColumns : (g = t.columns) != null && g.length ? t.columns.map((L) => ({
458
458
  field: L.field,
@@ -501,12 +501,12 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
501
501
  function c(u) {
502
502
  x.value = u.data, n("update:modelValue", u.data), de.value = !1;
503
503
  }
504
- const h = B(null), W = B(null);
504
+ const y = B(null), W = B(null);
505
505
  let s = "";
506
506
  function U() {
507
507
  s = "", Ge(() => {
508
508
  var g, L, R;
509
- const u = (g = h.value) == null ? void 0 : g.$el;
509
+ const u = (g = y.value) == null ? void 0 : g.$el;
510
510
  (L = u == null ? void 0 : u.focus) == null || L.call(u), (R = u == null ? void 0 : u.select) == null || R.call(u);
511
511
  });
512
512
  }
@@ -538,7 +538,7 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
538
538
  () => Z.value.map((u) => H(u.value)),
539
539
  (u, g) => {
540
540
  if (de.value && (ce.value = 1, re()), !g) return;
541
- const L = u.some((oe, St) => oe !== g[St]), R = g.some((oe) => !X(oe));
541
+ const L = u.some((oe, St) => oe !== g[St]), R = g.some((oe) => !J(oe));
542
542
  L && R && x.value && (x.value = null, n("update:modelValue", null));
543
543
  }
544
544
  );
@@ -677,7 +677,7 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
677
677
  S(r(Ne), { class: "pi pi-search" }),
678
678
  S(r(ve), {
679
679
  ref_key: "modalSearchInput",
680
- ref: h,
680
+ ref: y,
681
681
  modelValue: pe.value,
682
682
  "onUpdate:modelValue": g[0] || (g[0] = (R) => pe.value = R),
683
683
  placeholder: "Pesquisar...",
@@ -732,7 +732,7 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
732
732
  "selection-mode": "single",
733
733
  "header-style": "width: 3rem"
734
734
  }),
735
- (o(!0), d(Y, null, le(J.value, (R) => (o(), C(r(Ae), {
735
+ (o(!0), d(Y, null, le(X.value, (R) => (o(), C(r(Ae), {
736
736
  key: R.field,
737
737
  field: R.field,
738
738
  header: R.header,
@@ -758,7 +758,7 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
758
758
  }, {
759
759
  body: K(({ data: R }) => [
760
760
  m("div", gl, [
761
- y.value ? fe((o(), C(r(z), {
761
+ h.value ? fe((o(), C(r(z), {
762
762
  key: 0,
763
763
  icon: "pi pi-pencil",
764
764
  text: "",
@@ -858,7 +858,7 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
858
858
  const V = i.fromDisplay(v.value);
859
859
  V && w(V);
860
860
  }
861
- function X() {
861
+ function J() {
862
862
  v.value = i.toDisplay(i.toDate(t.modelValue));
863
863
  }
864
864
  function H(V) {
@@ -895,7 +895,7 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
895
895
  autocomplete: "off",
896
896
  inputmode: "numeric",
897
897
  onInput: q,
898
- onBlur: X,
898
+ onBlur: J,
899
899
  onKeydown: H
900
900
  }, null, 8, ["id", "modelValue", "placeholder", "disabled", "invalid"]), [
901
901
  [r(Ke), x.value]
@@ -1047,14 +1047,14 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
1047
1047
  (p = $.value) == null || p.click();
1048
1048
  }
1049
1049
  function x(p) {
1050
- const y = (t.accept || "").trim();
1051
- return !y || y === "*" || y.includes("image/*") ? p.type.startsWith("image/") : y.split(",").map((l) => l.trim()).filter(Boolean).some((l) => l.endsWith("/*") ? p.type.startsWith(l.slice(0, -1)) : l.startsWith(".") ? p.name.toLowerCase().endsWith(l.toLowerCase()) : p.type === l);
1050
+ const h = (t.accept || "").trim();
1051
+ return !h || h === "*" || h.includes("image/*") ? p.type.startsWith("image/") : h.split(",").map((l) => l.trim()).filter(Boolean).some((l) => l.endsWith("/*") ? p.type.startsWith(l.slice(0, -1)) : l.startsWith(".") ? p.name.toLowerCase().endsWith(l.toLowerCase()) : p.type === l);
1052
1052
  }
1053
1053
  let E = "image.png", T = "image/png", w = null;
1054
1054
  function q(p) {
1055
1055
  var _;
1056
- const y = p.target, l = (_ = y.files) == null ? void 0 : _[0];
1057
- if (y.value = "", !l) return;
1056
+ const h = p.target, l = (_ = h.files) == null ? void 0 : _[0];
1057
+ if (h.value = "", !l) return;
1058
1058
  if (!x(l)) {
1059
1059
  n("error", "Tipo de arquivo não suportado.");
1060
1060
  return;
@@ -1066,13 +1066,13 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
1066
1066
  E = l.name, T = l.type || "image/png";
1067
1067
  const k = new FileReader();
1068
1068
  k.onload = () => {
1069
- const J = new Image();
1070
- J.onload = () => {
1071
- w = J, F.value = J.naturalWidth, M.value = J.naturalHeight, N.value = 1, Z.value = J.src, V.x = (ae.value - ie.value) / 2, V.y = (me.value - ge.value) / 2, H.value = !0;
1072
- }, J.onerror = () => n("error", "Não foi possível carregar a imagem."), J.src = String(k.result);
1069
+ const X = new Image();
1070
+ X.onload = () => {
1071
+ w = X, F.value = X.naturalWidth, M.value = X.naturalHeight, N.value = 1, Z.value = X.src, V.x = (ae.value - ie.value) / 2, V.y = (me.value - ge.value) / 2, H.value = !0;
1072
+ }, X.onerror = () => n("error", "Não foi possível carregar a imagem."), X.src = String(k.result);
1073
1073
  }, k.onerror = () => n("error", "Falha ao ler o arquivo."), k.readAsDataURL(l);
1074
1074
  }
1075
- function X() {
1075
+ function J() {
1076
1076
  n("update:modelValue", null);
1077
1077
  }
1078
1078
  const H = B(!1), Z = B(""), F = B(0), M = B(0), N = B(1), V = Pe({ x: 0, y: 0 }), O = P(() => t.circular ? 1 : t.aspectRatio || 1), ae = P(() => O.value >= 1 ? je : Math.round(je * O.value)), me = P(() => O.value >= 1 ? Math.round(je / O.value) : je), De = P(
@@ -1089,8 +1089,8 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
1089
1089
  })), G = B(!1);
1090
1090
  let se = { x: 0, y: 0, ox: 0, oy: 0 };
1091
1091
  function te(p) {
1092
- var y, l;
1093
- G.value = !0, (l = (y = p.currentTarget).setPointerCapture) == null || l.call(y, p.pointerId), se = { x: p.clientX, y: p.clientY, ox: V.x, oy: V.y };
1092
+ var h, l;
1093
+ G.value = !0, (l = (h = p.currentTarget).setPointerCapture) == null || l.call(h, p.pointerId), se = { x: p.clientX, y: p.clientY, ox: V.x, oy: V.y };
1094
1094
  }
1095
1095
  function we(p) {
1096
1096
  G.value && (V.x = se.ox + (p.clientX - se.x), V.y = se.oy + (p.clientY - se.y), pe());
@@ -1102,29 +1102,29 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
1102
1102
  return t.circular ? "image/png" : T === "image/jpeg" || T === "image/png" || T === "image/webp" ? T : "image/png";
1103
1103
  }
1104
1104
  function xe(p) {
1105
- const y = p === "image/png" ? "png" : p === "image/webp" ? "webp" : "jpg";
1106
- return `${E.replace(/\.[^.]+$/, "") || "image"}.${y}`;
1105
+ const h = p === "image/png" ? "png" : p === "image/webp" ? "webp" : "jpg";
1106
+ return `${E.replace(/\.[^.]+$/, "") || "image"}.${h}`;
1107
1107
  }
1108
1108
  function f() {
1109
1109
  if (!w) return;
1110
- const p = de.value, y = -V.x / p, l = -V.y / p, k = ae.value / p, _ = me.value / p, J = document.createElement("canvas");
1111
- J.width = Math.max(1, Math.round(k)), J.height = Math.max(1, Math.round(_));
1112
- const re = J.getContext("2d");
1110
+ const p = de.value, h = -V.x / p, l = -V.y / p, k = ae.value / p, _ = me.value / p, X = document.createElement("canvas");
1111
+ X.width = Math.max(1, Math.round(k)), X.height = Math.max(1, Math.round(_));
1112
+ const re = X.getContext("2d");
1113
1113
  if (!re) {
1114
1114
  n("error", "Canvas indisponível neste ambiente.");
1115
1115
  return;
1116
1116
  }
1117
1117
  t.circular && (re.beginPath(), re.ellipse(
1118
- J.width / 2,
1119
- J.height / 2,
1120
- J.width / 2,
1121
- J.height / 2,
1118
+ X.width / 2,
1119
+ X.height / 2,
1120
+ X.width / 2,
1121
+ X.height / 2,
1122
1122
  0,
1123
1123
  0,
1124
1124
  Math.PI * 2
1125
- ), re.clip()), re.drawImage(w, y, l, k, _, 0, 0, J.width, J.height);
1125
+ ), re.clip()), re.drawImage(w, h, l, k, _, 0, 0, X.width, X.height);
1126
1126
  const ee = ye();
1127
- J.toBlob(
1127
+ X.toBlob(
1128
1128
  (ue) => {
1129
1129
  if (!ue) {
1130
1130
  n("error", "Falha ao processar a imagem.");
@@ -1136,7 +1136,7 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
1136
1136
  0.92
1137
1137
  );
1138
1138
  }
1139
- return (p, y) => (o(), d("div", Vl, [
1139
+ return (p, h) => (o(), d("div", Vl, [
1140
1140
  m("div", {
1141
1141
  class: Q(["w-imgcropper-preview", { "is-circular": e.circular, "is-empty": !v.value }]),
1142
1142
  style: be({ width: `${e.width}px`, height: `${e.height}px` })
@@ -1163,7 +1163,7 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
1163
1163
  text: "",
1164
1164
  severity: "danger",
1165
1165
  "aria-label": "Remover imagem",
1166
- onClick: X
1166
+ onClick: J
1167
1167
  })
1168
1168
  ])
1169
1169
  ], 64)) : A(p.$slots, "placeholder", { open: D }, () => [
@@ -1171,7 +1171,7 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
1171
1171
  type: "button",
1172
1172
  class: "w-imgcropper-empty",
1173
1173
  onClick: D
1174
- }, [...y[3] || (y[3] = [
1174
+ }, [...h[3] || (h[3] = [
1175
1175
  m("i", { class: "pi pi-image" }, null, -1),
1176
1176
  m("span", null, "Selecionar imagem", -1)
1177
1177
  ])])
@@ -1187,7 +1187,7 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
1187
1187
  }, null, 40, El),
1188
1188
  S(r(tt), {
1189
1189
  visible: H.value,
1190
- "onUpdate:visible": y[2] || (y[2] = (l) => H.value = l),
1190
+ "onUpdate:visible": h[2] || (h[2] = (l) => H.value = l),
1191
1191
  modal: "",
1192
1192
  header: "Ajustar imagem",
1193
1193
  "dismissable-mask": !1,
@@ -1198,7 +1198,7 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
1198
1198
  type: "button",
1199
1199
  label: "Cancelar",
1200
1200
  text: "",
1201
- onClick: y[1] || (y[1] = (l) => H.value = !1)
1201
+ onClick: h[1] || (h[1] = (l) => H.value = !1)
1202
1202
  }),
1203
1203
  S(r(z), {
1204
1204
  type: "button",
@@ -1229,16 +1229,16 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
1229
1229
  }, null, 2)
1230
1230
  ], 38),
1231
1231
  m("div", Il, [
1232
- y[4] || (y[4] = m("i", { class: "pi pi-search-minus" }, null, -1)),
1232
+ h[4] || (h[4] = m("i", { class: "pi pi-search-minus" }, null, -1)),
1233
1233
  S(r(Ht), {
1234
1234
  modelValue: N.value,
1235
- "onUpdate:modelValue": y[0] || (y[0] = (l) => N.value = l),
1235
+ "onUpdate:modelValue": h[0] || (h[0] = (l) => N.value = l),
1236
1236
  min: 1,
1237
1237
  max: 4,
1238
1238
  step: 0.01,
1239
1239
  class: "w-imgcropper-slider"
1240
1240
  }, null, 8, ["modelValue"]),
1241
- y[5] || (y[5] = m("i", { class: "pi pi-search-plus" }, null, -1))
1241
+ h[5] || (h[5] = m("i", { class: "pi pi-search-plus" }, null, -1))
1242
1242
  ])
1243
1243
  ])
1244
1244
  ]),
@@ -1288,7 +1288,7 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
1288
1288
  ), q = P(
1289
1289
  () => t.source.filter((M) => $.value.has(x(M)) && T(M, v.value))
1290
1290
  );
1291
- function X(M) {
1291
+ function J(M) {
1292
1292
  t.disabled || n("update:selected", [...t.selected, x(M)]);
1293
1293
  }
1294
1294
  function H(M) {
@@ -1329,7 +1329,7 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
1329
1329
  (o(!0), d(Y, null, le(w.value, (V) => (o(), d("li", {
1330
1330
  key: `a-${x(V)}`,
1331
1331
  class: "w-transfer__item",
1332
- onClick: (O) => X(V)
1332
+ onClick: (O) => J(V)
1333
1333
  }, [
1334
1334
  m("span", null, I(E(V)), 1),
1335
1335
  N[3] || (N[3] = m("i", { class: "pi pi-angle-right" }, null, -1))
@@ -1439,16 +1439,16 @@ const Xl = { class: "w-crud-form" }, Zl = {
1439
1439
  setup(e, { expose: a, emit: t }) {
1440
1440
  const n = e, i = t, v = Pe({}), $ = Pe({}), D = Pe({}), x = Pe({});
1441
1441
  function E(f, p) {
1442
- const y = p.target.value, l = y.replace(/\D/g, "");
1443
- i("update:field", f.field, y), D[f.field] = null, x[f.field] && (clearTimeout(x[f.field]), x[f.field] = null), l.length === 8 && (x[f.field] = setTimeout(async () => {
1442
+ const h = p.target.value, l = h.replace(/\D/g, "");
1443
+ i("update:field", f.field, h), D[f.field] = null, x[f.field] && (clearTimeout(x[f.field]), x[f.field] = null), l.length === 8 && (x[f.field] = setTimeout(async () => {
1444
1444
  $[f.field] = !0, D[f.field] = null;
1445
1445
  try {
1446
1446
  const k = await Jl(l);
1447
1447
  if (!k)
1448
1448
  D[f.field] = "CEP não encontrado. Preencha os campos manualmente.";
1449
1449
  else {
1450
- const _ = f.cepFields || {}, J = Object.keys(_);
1451
- for (const re of J) {
1450
+ const _ = f.cepFields || {}, X = Object.keys(_);
1451
+ for (const re of X) {
1452
1452
  const ee = _[re];
1453
1453
  if (!ee) continue;
1454
1454
  const ue = n.formData[ee];
@@ -1470,16 +1470,15 @@ const Xl = { class: "w-crud-form" }, Zl = {
1470
1470
  const p = f.endpointParams;
1471
1471
  return typeof p == "function" ? p() : p;
1472
1472
  }
1473
- const X = P(() => n.fields.filter((f) => typeof f.calculate == "function"));
1473
+ const J = P(() => n.fields.filter((f) => typeof f.calculate == "function"));
1474
1474
  Fe(
1475
- () => n.formData,
1476
- () => {
1477
- for (const f of X.value) {
1478
- const p = f.calculate(n.formData, n.isEditing);
1479
- n.formData[f.field] !== p && i("update:field", f.field, p);
1480
- }
1475
+ () => J.value.map((f) => f.calculate(n.formData, n.isEditing)),
1476
+ (f) => {
1477
+ J.value.forEach((p, h) => {
1478
+ n.formData[p.field] !== f[h] && i("update:field", p.field, f[h]);
1479
+ });
1481
1480
  },
1482
- { deep: !0, immediate: !0 }
1481
+ { immediate: !0 }
1483
1482
  );
1484
1483
  function H(f) {
1485
1484
  return Pt(f) ? f.value : f;
@@ -1487,8 +1486,8 @@ const Xl = { class: "w-crud-form" }, Zl = {
1487
1486
  const Z = P(() => {
1488
1487
  const f = n.isEditing ? "edit" : "create", p = n.fields.find((l) => l.autofocus === !0 || l.autofocus === f);
1489
1488
  if (p) return p.field;
1490
- const y = T.value.find((l) => !(l.type === "switch" || l.type === "fk" || l.type === "select" || l.type === "image" || l.disabled === !0 || l.disabledOnEdit && n.isEditing));
1491
- return (y == null ? void 0 : y.field) ?? null;
1489
+ const h = T.value.find((l) => !(l.type === "switch" || l.type === "fk" || l.type === "select" || l.type === "image" || l.disabled === !0 || l.disabledOnEdit && n.isEditing));
1490
+ return (h == null ? void 0 : h.field) ?? null;
1492
1491
  });
1493
1492
  function F(f) {
1494
1493
  return f.field === Z.value;
@@ -1503,28 +1502,28 @@ const Xl = { class: "w-crud-form" }, Zl = {
1503
1502
  return p.length <= 11 ? p.replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d{1,2})$/, "$1-$2") : p.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");
1504
1503
  }
1505
1504
  function V(f, p) {
1506
- const y = p.target.value.replace(/\D/g, "").slice(0, 14);
1507
- i("update:field", f, y);
1505
+ const h = p.target.value.replace(/\D/g, "").slice(0, 14);
1506
+ i("update:field", f, h);
1508
1507
  }
1509
1508
  const O = Pe({});
1510
1509
  function ae(f) {
1511
1510
  const p = n.formData[f.field];
1512
1511
  if (p == null) return null;
1513
- const y = f.optionValue || "value";
1514
- return (H(f.options) || []).find((k) => k[y] === p) ?? null;
1512
+ const h = f.optionValue || "value";
1513
+ return (H(f.options) || []).find((k) => k[h] === p) ?? null;
1515
1514
  }
1516
1515
  function me(f) {
1517
1516
  return O[f.field] || [];
1518
1517
  }
1519
1518
  function De(f, p) {
1520
- const y = (p.query || "").toLowerCase(), l = H(f.options) || [], k = f.optionLabel || "label";
1519
+ const h = (p.query || "").toLowerCase(), l = H(f.options) || [], k = f.optionLabel || "label";
1521
1520
  O[f.field] = l.filter(
1522
- (_) => String(_[k] || "").toLowerCase().includes(y)
1521
+ (_) => String(_[k] || "").toLowerCase().includes(h)
1523
1522
  );
1524
1523
  }
1525
1524
  function de(f, p) {
1526
- const y = f.optionValue || "value";
1527
- i("update:field", f.field, p.value[y]);
1525
+ const h = f.optionValue || "value";
1526
+ i("update:field", f.field, p.value[h]);
1528
1527
  }
1529
1528
  function ie(f) {
1530
1529
  const p = n.formData[f.field];
@@ -1551,8 +1550,8 @@ const Xl = { class: "w-crud-form" }, Zl = {
1551
1550
  const f = [];
1552
1551
  for (const p of n.fields)
1553
1552
  if (typeof p.validate == "function") {
1554
- const y = p.validate(n.formData[p.field]);
1555
- v[p.field] = y || null, y && f.push(y);
1553
+ const h = p.validate(n.formData[p.field]);
1554
+ v[p.field] = h || null, h && f.push(h);
1556
1555
  }
1557
1556
  return f;
1558
1557
  }
@@ -1563,8 +1562,8 @@ const Xl = { class: "w-crud-form" }, Zl = {
1563
1562
  return Math.max(1, Math.floor(f.columns ?? n.columns));
1564
1563
  }
1565
1564
  function we(f, p) {
1566
- const y = f.colSpan;
1567
- return y == null || y === "full" ? p : y === 0.5 ? Math.max(1, Math.round(p / 2)) : Math.min(Math.max(1, Math.floor(y)), p);
1565
+ const h = f.colSpan;
1566
+ return h == null || h === "full" ? p : h === 0.5 ? Math.max(1, Math.round(p / 2)) : Math.min(Math.max(1, Math.floor(h)), p);
1568
1567
  }
1569
1568
  function he(f, p) {
1570
1569
  return { "--w-col-span": we(f, te(p)) };
@@ -1573,37 +1572,37 @@ const Xl = { class: "w-crud-form" }, Zl = {
1573
1572
  return we(f, te(p)) === te(p) ? "w-crud-form-col-full" : "w-crud-form-col-half";
1574
1573
  }
1575
1574
  const xe = P(() => {
1576
- var l, k, _, J, re;
1577
- const f = /* @__PURE__ */ new Map(), p = [], y = /* @__PURE__ */ new Map();
1575
+ var l, k, _, X, re;
1576
+ const f = /* @__PURE__ */ new Map(), p = [], h = /* @__PURE__ */ new Map();
1578
1577
  for (const ee of T.value) {
1579
1578
  const ue = ((l = ee.fieldGroup) == null ? void 0 : l.id) ?? "__default__";
1580
1579
  f.has(ue) || (f.set(ue, {
1581
1580
  id: ue,
1582
1581
  title: (k = ee.fieldGroup) == null ? void 0 : k.title,
1583
1582
  description: (_ = ee.fieldGroup) == null ? void 0 : _.description,
1584
- columns: (J = ee.fieldGroup) == null ? void 0 : J.columns,
1583
+ columns: (X = ee.fieldGroup) == null ? void 0 : X.columns,
1585
1584
  fields: []
1586
- }), p.push(ue), ((re = ee.fieldGroup) == null ? void 0 : re.order) != null && y.set(ue, ee.fieldGroup.order)), f.get(ue).fields.push(ee);
1585
+ }), p.push(ue), ((re = ee.fieldGroup) == null ? void 0 : re.order) != null && h.set(ue, ee.fieldGroup.order)), f.get(ue).fields.push(ee);
1587
1586
  }
1588
1587
  return p.slice().sort((ee, ue) => {
1589
- const Re = y.get(ee), ke = y.get(ue);
1588
+ const Re = h.get(ee), ke = h.get(ue);
1590
1589
  return Re != null && ke != null ? Re - ke : Re != null ? -1 : ke != null ? 1 : p.indexOf(ee) - p.indexOf(ue);
1591
1590
  }).map((ee) => f.get(ee));
1592
1591
  });
1593
1592
  return a({ validateAll: G, clearErrors: se }), (f, p) => (o(), d("div", Xl, [
1594
- (o(!0), d(Y, null, le(xe.value, (y) => (o(), d("div", {
1595
- key: y.id,
1593
+ (o(!0), d(Y, null, le(xe.value, (h) => (o(), d("div", {
1594
+ key: h.id,
1596
1595
  class: "w-crud-form-group"
1597
1596
  }, [
1598
- y.title ? (o(), d("div", Zl, [
1599
- m("h3", Ql, I(y.title), 1),
1600
- y.description ? (o(), d("p", _l, I(y.description), 1)) : b("", !0)
1597
+ h.title ? (o(), d("div", Zl, [
1598
+ m("h3", Ql, I(h.title), 1),
1599
+ h.description ? (o(), d("p", _l, I(h.description), 1)) : b("", !0)
1601
1600
  ])) : b("", !0),
1602
1601
  m("div", {
1603
1602
  class: "w-crud-form-fields",
1604
- style: be({ "--w-form-cols": te(y) })
1603
+ style: be({ "--w-form-cols": te(h) })
1605
1604
  }, [
1606
- (o(!0), d(Y, null, le(y.fields, (l) => A(f.$slots, `field-${l.field}`, {
1605
+ (o(!0), d(Y, null, le(h.fields, (l) => A(f.$slots, `field-${l.field}`, {
1607
1606
  field: l,
1608
1607
  formData: e.formData,
1609
1608
  isEditing: e.isEditing,
@@ -1612,7 +1611,7 @@ const Xl = { class: "w-crud-form" }, Zl = {
1612
1611
  l.type === "switch" ? (o(), d("div", {
1613
1612
  key: 0,
1614
1613
  class: "w-crud-form-switch",
1615
- style: be(he(l, y))
1614
+ style: be(he(l, h))
1616
1615
  }, [
1617
1616
  S(r(Ot), {
1618
1617
  "model-value": e.formData[l.field],
@@ -1622,8 +1621,8 @@ const Xl = { class: "w-crud-form" }, Zl = {
1622
1621
  m("label", ea, I(l.switchLabel || l.label), 1)
1623
1622
  ], 4)) : l.type === "color" ? (o(), d("div", {
1624
1623
  key: 1,
1625
- class: Q(ye(l, y)),
1626
- style: be(he(l, y))
1624
+ class: Q(ye(l, h)),
1625
+ style: be(he(l, h))
1627
1626
  }, [
1628
1627
  m("label", ta, [
1629
1628
  Ie(I(l.label) + " ", 1),
@@ -1646,8 +1645,8 @@ const Xl = { class: "w-crud-form" }, Zl = {
1646
1645
  ])
1647
1646
  ], 6)) : l.type === "image" ? (o(), d("div", {
1648
1647
  key: 2,
1649
- class: Q(ye(l, y)),
1650
- style: be(he(l, y))
1648
+ class: Q(ye(l, h)),
1649
+ style: be(he(l, h))
1651
1650
  }, [
1652
1651
  m("label", oa, I(l.label), 1),
1653
1652
  A(f.$slots, `image-${l.field}`, {
@@ -1666,8 +1665,8 @@ const Xl = { class: "w-crud-form" }, Zl = {
1666
1665
  v[l.field] ? (o(), d("small", na, I(v[l.field]), 1)) : b("", !0)
1667
1666
  ], 6)) : l.type === "transfer" ? (o(), d("div", {
1668
1667
  key: 3,
1669
- class: Q(ye(l, y)),
1670
- style: be(he(l, y))
1668
+ class: Q(ye(l, h)),
1669
+ style: be(he(l, h))
1671
1670
  }, [
1672
1671
  m("label", ia, [
1673
1672
  Ie(I(l.label) + " ", 1),
@@ -1684,8 +1683,8 @@ const Xl = { class: "w-crud-form" }, Zl = {
1684
1683
  }, null, 8, ["source", "selected", "track-by", "option-label", "search-fields", "disabled", "onUpdate:selected"])
1685
1684
  ], 6)) : (o(), d("div", {
1686
1685
  key: 4,
1687
- class: Q(ye(l, y)),
1688
- style: be(he(l, y))
1686
+ class: Q(ye(l, h)),
1687
+ style: be(he(l, h))
1689
1688
  }, [
1690
1689
  m("label", ra, [
1691
1690
  Ie(I(l.label) + " ", 1),
@@ -2081,25 +2080,25 @@ const ga = { class: "w-crud" }, ba = {
2081
2080
  const T = P(
2082
2081
  () => (t.crud.pagination.page - 1) * t.crud.pagination.pageSize
2083
2082
  ), w = Pe({ hidden: [] }), q = B(null);
2084
- function X() {
2083
+ function J() {
2085
2084
  return t.persistState ? `wcrud:cols:${t.persistState}` : null;
2086
2085
  }
2087
2086
  function H() {
2088
- const c = X();
2087
+ const c = J();
2089
2088
  if (c)
2090
2089
  try {
2091
- const h = JSON.parse(localStorage.getItem(c) || "{}");
2092
- Array.isArray(h.hidden) && (w.hidden = h.hidden);
2090
+ const y = JSON.parse(localStorage.getItem(c) || "{}");
2091
+ Array.isArray(y.hidden) && (w.hidden = y.hidden);
2093
2092
  } catch {
2094
2093
  }
2095
2094
  }
2096
2095
  function Z() {
2097
- const c = X();
2096
+ const c = J();
2098
2097
  c && localStorage.setItem(c, JSON.stringify({ hidden: w.hidden }));
2099
2098
  }
2100
2099
  const F = P(() => t.crud.config.columns.filter((c) => c.visible !== !1));
2101
- function M(c, h) {
2102
- w.hidden = h ? w.hidden.filter((W) => W !== c) : [.../* @__PURE__ */ new Set([...w.hidden, c])], Z();
2100
+ function M(c, y) {
2101
+ w.hidden = y ? w.hidden.filter((W) => W !== c) : [.../* @__PURE__ */ new Set([...w.hidden, c])], Z();
2103
2102
  }
2104
2103
  const N = P(
2105
2104
  () => t.crud.config.columns.filter((c) => c.visible !== !1 && !w.hidden.includes(c.field)).map((c) => c.type === "number" && !c.align ? { ...c, align: "right" } : c.type === "currency" && !c.align ? { ...c, align: "right" } : c)
@@ -2126,18 +2125,18 @@ const ga = { class: "w-crud" }, ba = {
2126
2125
  ), De = P(
2127
2126
  () => me.value.length > 0 || !!i["row-actions"]
2128
2127
  );
2129
- function de(c, h) {
2128
+ function de(c, y) {
2130
2129
  if (c.handler) {
2131
- c.handler(h);
2130
+ c.handler(y);
2132
2131
  return;
2133
2132
  }
2134
- 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);
2133
+ c.action === "edit" ? t.crud.openEditDialog(y) : c.action === "view" ? t.crud.openViewDialog(y) : c.action === "duplicate" ? t.crud.openDuplicateDialog(y) : c.action === "delete" && t.crud.confirmDelete(y);
2135
2134
  }
2136
- function ie(c, h) {
2137
- return c.visible ? c.visible(h) : !0;
2135
+ function ie(c, y) {
2136
+ return c.visible ? c.visible(y) : !0;
2138
2137
  }
2139
- function ge(c, h) {
2140
- return c.disabled ? c.disabled(h) : !1;
2138
+ function ge(c, y) {
2139
+ return c.disabled ? c.disabled(y) : !1;
2141
2140
  }
2142
2141
  const pe = P(() => {
2143
2142
  const c = [];
@@ -2148,8 +2147,8 @@ const ga = { class: "w-crud" }, ba = {
2148
2147
  }), c.push(...t.extraKpis), c;
2149
2148
  }), ce = P(() => t.crud.config.canCreate !== !1), G = B(null), se = P(() => t.crud.config.selectionMode === "multiple"), te = P(() => t.crud.config.editMode === "cell"), we = P(() => new Map(t.crud.config.form.map((c) => [c.field, c]))), he = ["text", "email", "number", "currency"];
2150
2149
  function ye(c) {
2151
- const h = we.value.get(c);
2152
- return h && he.includes(h.type || "text") ? h : void 0;
2150
+ const y = we.value.get(c);
2151
+ return y && he.includes(y.type || "text") ? y : void 0;
2153
2152
  }
2154
2153
  function xe(c) {
2155
2154
  c.newValue !== (c.value ?? c.data[c.field]) && t.crud.updateField(c.data, c.field, c.newValue);
@@ -2160,31 +2159,31 @@ const ga = { class: "w-crud" }, ba = {
2160
2159
  { label: "Sim", value: !0 },
2161
2160
  { label: "Não", value: !1 }
2162
2161
  ];
2163
- function y(c) {
2164
- var h;
2165
- return ((h = c.filter) == null ? void 0 : h.param) || c.field;
2162
+ function h(c) {
2163
+ var y;
2164
+ return ((y = c.filter) == null ? void 0 : y.param) || c.field;
2166
2165
  }
2167
2166
  const l = {};
2168
- function k(c, h) {
2169
- const W = y(c);
2170
- l[W] && clearTimeout(l[W]), l[W] = setTimeout(() => t.crud.setColumnFilter(W, h || null), 300);
2167
+ function k(c, y) {
2168
+ const W = h(c);
2169
+ l[W] && clearTimeout(l[W]), l[W] = setTimeout(() => t.crud.setColumnFilter(W, y || null), 300);
2171
2170
  }
2172
2171
  const _ = B(null);
2173
- function J(c) {
2172
+ function X(c) {
2174
2173
  G.value = c;
2175
2174
  }
2176
2175
  function re(c) {
2177
- var h;
2178
- t.contextMenu && (G.value = c.data, (h = _.value) == null || h.show(c.originalEvent));
2176
+ var y;
2177
+ t.contextMenu && (G.value = c.data, (y = _.value) == null || y.show(c.originalEvent));
2179
2178
  }
2180
- function ee(c, h) {
2179
+ function ee(c, y) {
2181
2180
  var W;
2182
- t.contextMenu && (c.preventDefault(), G.value = h, (W = _.value) == null || W.show(c));
2181
+ t.contextMenu && (c.preventDefault(), G.value = y, (W = _.value) == null || W.show(c));
2183
2182
  }
2184
2183
  const ue = P(() => {
2185
2184
  const c = G.value;
2186
2185
  if (!c) return [];
2187
- const h = [
2186
+ const y = [
2188
2187
  {
2189
2188
  label: "Ver detalhes",
2190
2189
  icon: "pi pi-eye",
@@ -2192,22 +2191,22 @@ const ga = { class: "w-crud" }, ba = {
2192
2191
  }
2193
2192
  ];
2194
2193
  for (const W of me.value)
2195
- ie(W, c) && h.push({
2194
+ ie(W, c) && y.push({
2196
2195
  label: W.tooltip ?? W.action,
2197
2196
  icon: W.icon,
2198
2197
  class: W.severity === "danger" ? "w-crud-ctx-danger" : void 0,
2199
2198
  disabled: ge(W, c),
2200
2199
  command: () => de(W, c)
2201
2200
  });
2202
- return t.showPrint && h.push({
2201
+ return t.showPrint && y.push({
2203
2202
  label: "Imprimir",
2204
2203
  icon: "pi pi-print",
2205
2204
  command: () => n("print", c)
2206
- }), t.exportCsv && (h.push({ separator: !0 }), h.push({
2205
+ }), t.exportCsv && (y.push({ separator: !0 }), y.push({
2207
2206
  label: t.csvScope === "all" ? "Exportar tudo (CSV)" : "Exportar página (CSV)",
2208
2207
  icon: "pi pi-download",
2209
2208
  command: () => Me()
2210
- })), h;
2209
+ })), y;
2211
2210
  });
2212
2211
  function Re() {
2213
2212
  G.value && n("print", G.value);
@@ -2217,8 +2216,8 @@ const ga = { class: "w-crud" }, ba = {
2217
2216
  if (!ke.value) {
2218
2217
  ke.value = !0;
2219
2218
  try {
2220
- const c = t.csvScope === "page" ? t.crud.items.value : await t.crud.fetchAll(t.csvPageSize), h = ha(c, N.value);
2221
- ya(h, t.csvFilename);
2219
+ const c = t.csvScope === "page" ? t.crud.items.value : await t.crud.fetchAll(t.csvPageSize), y = ha(c, N.value);
2220
+ ya(y, t.csvFilename);
2222
2221
  } finally {
2223
2222
  ke.value = !1;
2224
2223
  }
@@ -2226,7 +2225,7 @@ const ga = { class: "w-crud" }, ba = {
2226
2225
  }
2227
2226
  return _e(() => {
2228
2227
  H(), t.autoInit && t.crud.init();
2229
- }), (c, h) => {
2228
+ }), (c, y) => {
2230
2229
  const W = dt("tooltip");
2231
2230
  return o(), d("div", ga, [
2232
2231
  e.showHeader ? (o(), d("div", ba, [
@@ -2240,7 +2239,7 @@ const ga = { class: "w-crud" }, ba = {
2240
2239
  key: 0,
2241
2240
  label: "Novo",
2242
2241
  icon: "pi pi-plus",
2243
- onClick: h[0] || (h[0] = (s) => e.crud.openCreateDialog())
2242
+ onClick: y[0] || (y[0] = (s) => e.crud.openCreateDialog())
2244
2243
  })) : b("", !0)
2245
2244
  ])
2246
2245
  ])) : b("", !0),
@@ -2277,36 +2276,36 @@ const ga = { class: "w-crud" }, ba = {
2277
2276
  }, [
2278
2277
  (((U = s.filter) == null ? void 0 : U.type) || "text") === "text" ? (o(), C(r(ve), {
2279
2278
  key: 0,
2280
- "model-value": e.crud.columnFilters[y(s)] ?? "",
2279
+ "model-value": e.crud.columnFilters[h(s)] ?? "",
2281
2280
  placeholder: ((j = s.filter) == null ? void 0 : j.placeholder) || s.header,
2282
2281
  size: "small",
2283
2282
  onInput: (Se) => k(s, Se.target.value)
2284
2283
  }, null, 8, ["model-value", "placeholder", "onInput"])) : (($e = s.filter) == null ? void 0 : $e.type) === "select" ? (o(), C(r(Ze), {
2285
2284
  key: 1,
2286
- "model-value": e.crud.columnFilters[y(s)],
2285
+ "model-value": e.crud.columnFilters[h(s)],
2287
2286
  options: (ze = s.filter) == null ? void 0 : ze.options,
2288
2287
  "option-label": "label",
2289
2288
  "option-value": "value",
2290
2289
  placeholder: ((Ee = s.filter) == null ? void 0 : Ee.placeholder) || s.header,
2291
2290
  "show-clear": "",
2292
2291
  size: "small",
2293
- "onUpdate:modelValue": (Se) => e.crud.setColumnFilter(y(s), Se)
2292
+ "onUpdate:modelValue": (Se) => e.crud.setColumnFilter(h(s), Se)
2294
2293
  }, null, 8, ["model-value", "options", "placeholder", "onUpdate:modelValue"])) : ((Ue = s.filter) == null ? void 0 : Ue.type) === "boolean" ? (o(), C(r(Ze), {
2295
2294
  key: 2,
2296
- "model-value": e.crud.columnFilters[y(s)],
2295
+ "model-value": e.crud.columnFilters[h(s)],
2297
2296
  options: p,
2298
2297
  "option-label": "label",
2299
2298
  "option-value": "value",
2300
2299
  placeholder: ((Ce = s.filter) == null ? void 0 : Ce.placeholder) || s.header,
2301
2300
  "show-clear": "",
2302
2301
  size: "small",
2303
- "onUpdate:modelValue": (Se) => e.crud.setColumnFilter(y(s), Se)
2302
+ "onUpdate:modelValue": (Se) => e.crud.setColumnFilter(h(s), Se)
2304
2303
  }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])) : ((Ve = s.filter) == null ? void 0 : Ve.type) === "numeric" ? (o(), C(r(He), {
2305
2304
  key: 3,
2306
- "model-value": e.crud.columnFilters[y(s)] ?? null,
2305
+ "model-value": e.crud.columnFilters[h(s)] ?? null,
2307
2306
  placeholder: ((Be = s.filter) == null ? void 0 : Be.placeholder) || s.header,
2308
2307
  size: "small",
2309
- "onUpdate:modelValue": (Se) => e.crud.setColumnFilter(y(s), Se)
2308
+ "onUpdate:modelValue": (Se) => e.crud.setColumnFilter(h(s), Se)
2310
2309
  }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])) : b("", !0)
2311
2310
  ], 64);
2312
2311
  }), 128)),
@@ -2316,7 +2315,7 @@ const ga = { class: "w-crud" }, ba = {
2316
2315
  icon: "pi pi-filter-slash",
2317
2316
  text: "",
2318
2317
  size: "small",
2319
- onClick: h[1] || (h[1] = (s) => e.crud.clearColumnFilters())
2318
+ onClick: y[1] || (y[1] = (s) => e.crud.clearColumnFilters())
2320
2319
  })) : b("", !0)
2321
2320
  ])) : b("", !0),
2322
2321
  D.value === "table" ? (o(), d("div", Fa, [
@@ -2341,7 +2340,7 @@ const ga = { class: "w-crud" }, ba = {
2341
2340
  text: "",
2342
2341
  rounded: "",
2343
2342
  size: "small",
2344
- onClick: h[2] || (h[2] = (s) => e.crud.clearSelection())
2343
+ onClick: y[2] || (y[2] = (s) => e.crud.clearSelection())
2345
2344
  }, null, 512), [
2346
2345
  [
2347
2346
  W,
@@ -2353,7 +2352,7 @@ const ga = { class: "w-crud" }, ba = {
2353
2352
  ])) : b("", !0),
2354
2353
  S(r(ct), {
2355
2354
  "expanded-rows": $.value,
2356
- "onUpdate:expandedRows": h[7] || (h[7] = (s) => $.value = s),
2355
+ "onUpdate:expandedRows": y[7] || (y[7] = (s) => $.value = s),
2357
2356
  value: e.crud.items.value,
2358
2357
  loading: e.crud.loading.value,
2359
2358
  paginator: "",
@@ -2375,13 +2374,13 @@ const ga = { class: "w-crud" }, ba = {
2375
2374
  "selection-mode": se.value ? void 0 : e.actionRail || e.contextMenu ? "single" : void 0,
2376
2375
  "context-menu": e.contextMenu,
2377
2376
  "context-menu-selection": e.contextMenu ? G.value : void 0,
2378
- "onUpdate:selection": h[8] || (h[8] = (s) => se.value ? e.crud.selectedItems.value = s : G.value = s),
2379
- "onUpdate:contextMenuSelection": h[9] || (h[9] = (s) => G.value = s),
2377
+ "onUpdate:selection": y[8] || (y[8] = (s) => se.value ? e.crud.selectedItems.value = s : G.value = s),
2378
+ "onUpdate:contextMenuSelection": y[9] || (y[9] = (s) => G.value = s),
2380
2379
  onRowContextmenu: re,
2381
2380
  onPage: e.crud.onPage,
2382
- onSort: h[10] || (h[10] = (s) => e.crud.onSort({ sortField: s.sortField, sortOrder: s.sortOrder })),
2383
- onRowExpand: h[11] || (h[11] = (s) => n("row-expand", s.data)),
2384
- onRowCollapse: h[12] || (h[12] = (s) => n("row-collapse", s.data)),
2381
+ onSort: y[10] || (y[10] = (s) => e.crud.onSort({ sortField: s.sortField, sortOrder: s.sortOrder })),
2382
+ onRowExpand: y[11] || (y[11] = (s) => n("row-expand", s.data)),
2383
+ onRowCollapse: y[12] || (y[12] = (s) => n("row-collapse", s.data)),
2385
2384
  onCellEditComplete: xe
2386
2385
  }, qe({
2387
2386
  header: K(() => [
@@ -2409,7 +2408,7 @@ const ga = { class: "w-crud" }, ba = {
2409
2408
  icon: "pi pi-sliders-h",
2410
2409
  text: "",
2411
2410
  size: "small",
2412
- onClick: h[3] || (h[3] = (s) => {
2411
+ onClick: y[3] || (y[3] = (s) => {
2413
2412
  var U;
2414
2413
  return (U = q.value) == null ? void 0 : U.toggle(s);
2415
2414
  })
@@ -2468,28 +2467,28 @@ const ga = { class: "w-crud" }, ba = {
2468
2467
  size: "small",
2469
2468
  text: !x("table"),
2470
2469
  outlined: x("table"),
2471
- onClick: h[4] || (h[4] = (s) => E("table"))
2470
+ onClick: y[4] || (y[4] = (s) => E("table"))
2472
2471
  }, null, 8, ["text", "outlined"]),
2473
2472
  S(r(z), {
2474
2473
  icon: "pi pi-th-large",
2475
2474
  size: "small",
2476
2475
  text: !x("cards"),
2477
2476
  outlined: x("cards"),
2478
- onClick: h[5] || (h[5] = (s) => E("cards"))
2477
+ onClick: y[5] || (y[5] = (s) => E("cards"))
2479
2478
  }, null, 8, ["text", "outlined"])
2480
2479
  ])) : b("", !0),
2481
2480
  !e.showHeader && ce.value && !e.actionRail ? (o(), C(r(z), {
2482
2481
  key: 3,
2483
2482
  label: "Novo",
2484
2483
  icon: "pi pi-plus",
2485
- onClick: h[6] || (h[6] = (s) => e.crud.openCreateDialog())
2484
+ onClick: y[6] || (y[6] = (s) => e.crud.openCreateDialog())
2486
2485
  })) : b("", !0)
2487
2486
  ])
2488
2487
  ])
2489
2488
  ]),
2490
2489
  empty: K(() => [
2491
2490
  A(c.$slots, "empty", {}, () => [
2492
- h[20] || (h[20] = m("div", { class: "w-crud-empty" }, [
2491
+ y[20] || (y[20] = m("div", { class: "w-crud-empty" }, [
2493
2492
  m("div", { class: "w-crud-empty-icon" }, [
2494
2493
  m("i", { class: "pi pi-inbox" })
2495
2494
  ]),
@@ -2649,31 +2648,31 @@ const ga = { class: "w-crud" }, ba = {
2649
2648
  size: "small",
2650
2649
  text: !x("table"),
2651
2650
  outlined: x("table"),
2652
- onClick: h[13] || (h[13] = (s) => E("table"))
2651
+ onClick: y[13] || (y[13] = (s) => E("table"))
2653
2652
  }, null, 8, ["text", "outlined"]),
2654
2653
  S(r(z), {
2655
2654
  icon: "pi pi-th-large",
2656
2655
  size: "small",
2657
2656
  text: !x("cards"),
2658
2657
  outlined: x("cards"),
2659
- onClick: h[14] || (h[14] = (s) => E("cards"))
2658
+ onClick: y[14] || (y[14] = (s) => E("cards"))
2660
2659
  }, null, 8, ["text", "outlined"])
2661
2660
  ])) : b("", !0),
2662
2661
  !e.showHeader && ce.value && !e.actionRail ? (o(), C(r(z), {
2663
2662
  key: 2,
2664
2663
  label: "Novo",
2665
2664
  icon: "pi pi-plus",
2666
- onClick: h[15] || (h[15] = (s) => e.crud.openCreateDialog())
2665
+ onClick: y[15] || (y[15] = (s) => e.crud.openCreateDialog())
2667
2666
  })) : b("", !0)
2668
2667
  ])
2669
2668
  ]),
2670
- e.crud.loading.value ? (o(), d("div", Ka, [...h[21] || (h[21] = [
2669
+ e.crud.loading.value ? (o(), d("div", Ka, [...y[21] || (y[21] = [
2671
2670
  m("i", { class: "pi pi-spin pi-spinner" }, null, -1)
2672
2671
  ])])) : e.crud.items.value.length ? (o(), d("div", Ha, [
2673
2672
  (o(!0), d(Y, null, le(e.crud.items.value, (s, U) => (o(), d("div", {
2674
2673
  key: s[e.crud.config.pk || "id"] ?? U,
2675
2674
  class: Q(["w-crud-card", { "w-crud-card--selected": G.value === s }]),
2676
- onClick: (j) => J(s),
2675
+ onClick: (j) => X(s),
2677
2676
  onDblclick: (j) => e.crud.config.canEdit !== !1 && e.crud.openEditDialog(s),
2678
2677
  onContextmenu: (j) => ee(j, s)
2679
2678
  }, [
@@ -2726,7 +2725,7 @@ const ga = { class: "w-crud" }, ba = {
2726
2725
  ])) : b("", !0)
2727
2726
  ], 42, Ga))), 128))
2728
2727
  ])) : A(c.$slots, "empty", {}, () => [
2729
- 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))
2728
+ y[22] || (y[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))
2730
2729
  ], void 0, 1),
2731
2730
  e.crud.items.value.length ? (o(), C(r(At), {
2732
2731
  key: 3,
@@ -2746,7 +2745,7 @@ const ga = { class: "w-crud" }, ba = {
2746
2745
  key: 0,
2747
2746
  icon: "pi pi-plus",
2748
2747
  rounded: "",
2749
- onClick: h[16] || (h[16] = (s) => e.crud.openCreateDialog())
2748
+ onClick: y[16] || (y[16] = (s) => e.crud.openCreateDialog())
2750
2749
  }, null, 512)), [
2751
2750
  [
2752
2751
  W,
@@ -2836,11 +2835,11 @@ const ga = { class: "w-crud" }, ba = {
2836
2835
  width: e.dialogWidth,
2837
2836
  "form-columns": e.formColumns ?? e.crud.config.formColumns,
2838
2837
  "keyboard-nav": e.crud.config.keyboardNav,
2839
- "onUpdate:visible": h[17] || (h[17] = (U) => {
2838
+ "onUpdate:visible": y[17] || (y[17] = (U) => {
2840
2839
  e.crud.dialogVisible.value = U, U || (e.crud.editingItem.value = null);
2841
2840
  }),
2842
- "onUpdate:field": h[18] || (h[18] = (U, j) => e.crud.setFormField(U, j)),
2843
- onSave: h[19] || (h[19] = (U) => e.crud.save())
2841
+ "onUpdate:field": y[18] || (y[18] = (U, j) => e.crud.setFormField(U, j)),
2842
+ onSave: y[19] || (y[19] = (U) => e.crud.save())
2844
2843
  }, qe({ _: 2 }, [
2845
2844
  le(e.crud.config.form, (U) => ({
2846
2845
  name: `field-${U.field}`,
@@ -3375,4 +3374,4 @@ export {
3375
3374
  cl as x,
3376
3375
  ha as y
3377
3376
  };
3378
- //# sourceMappingURL=WProgressFlow.vue_vue_type_script_setup_true_lang-Cxudafdt.js.map
3377
+ //# sourceMappingURL=WProgressFlow.vue_vue_type_script_setup_true_lang-CURYPiY8.js.map