v-sistec-features 1.28.0 → 1.29.0

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,8 +1,8 @@
1
- import { defineComponent as R, useSlots as Ye, inject as Me, onMounted as $e, h as me, computed as T, watch as W, resolveComponent as Ge, createElementBlock as r, openBlock as e, Fragment as D, createCommentVNode as b, createElementVNode as _, withModifiers as pe, createBlock as $, resolveDynamicComponent as V, unref as t, withDirectives as Be, withKeys as Xe, vModelText as Te, renderList as A, withCtx as X, createTextVNode as H, toDisplayString as z, normalizeClass as w, ref as O, nextTick as ge, normalizeProps as Ce, mergeProps as ve, Comment as We, Text as Re, provide as Qe, readonly as Ze, renderSlot as F, Teleport as oe, createVNode as te, TransitionGroup as et, Transition as tt, normalizeStyle as at } from "vue";
2
- import { _ as fe, P as nt } from "./Pagination-DtVDFQ07.js";
1
+ import { defineComponent as R, useSlots as Ye, inject as Me, onMounted as $e, h as ge, computed as B, watch as J, resolveComponent as Ge, createElementBlock as r, openBlock as e, Fragment as E, createCommentVNode as C, createElementVNode as m, withModifiers as me, createBlock as $, resolveDynamicComponent as V, unref as t, withDirectives as Be, withKeys as Xe, vModelText as Te, renderList as A, withCtx as Z, createTextVNode as H, toDisplayString as O, normalizeClass as S, ref as I, nextTick as fe, normalizeProps as Ce, mergeProps as ve, Comment as We, Text as Qe, provide as Ze, readonly as Re, renderSlot as F, Teleport as ie, createVNode as se, TransitionGroup as et, Transition as tt, normalizeStyle as at } from "vue";
2
+ import { _ as he, P as nt } from "./Pagination-DtVDFQ07.js";
3
3
  import st from "vuedraggable";
4
4
  import { D as lt } from "./datatableConfig-BMFlKtgh.js";
5
- const ze = Symbol("v-datatable-key"), Sa = /* @__PURE__ */ R({
5
+ const Oe = Symbol("v-datatable-key"), Sa = /* @__PURE__ */ R({
6
6
  __name: "VColumn",
7
7
  props: {
8
8
  field: { default: null },
@@ -25,16 +25,16 @@ const ze = Symbol("v-datatable-key"), Sa = /* @__PURE__ */ R({
25
25
  start_hidden: { type: Boolean, default: !1 }
26
26
  },
27
27
  setup(d) {
28
- const v = crypto.randomUUID(), n = d, a = Ye(), u = Me(ze);
29
- if (!u)
28
+ const _ = crypto.randomUUID(), n = d, a = Ye(), c = Me(Oe);
29
+ if (!c)
30
30
  throw new Error("VColumn deve ser usado dentro de um VDataTable.");
31
- const c = ["text", "img", "date", "html"];
31
+ const u = ["text", "img", "date", "html"];
32
32
  return $e(() => {
33
33
  if (n.field !== null && !n.field)
34
34
  throw new Error('A propriedade "field" é obrigatória em VColumn.');
35
35
  if (!n.header)
36
36
  throw new Error('A propriedade "header" é obrigatória em VColumn.');
37
- if (n.field !== null && !c.includes(n.type))
37
+ if (n.field !== null && !u.includes(n.type))
38
38
  throw new Error(`O tipo "${n.type}" não é suportado em VColumn. Tipos suportados: text, img, date, html.`);
39
39
  if (n.limite_text) {
40
40
  if (n.type !== "text")
@@ -44,8 +44,8 @@ const ze = Symbol("v-datatable-key"), Sa = /* @__PURE__ */ R({
44
44
  if (isNaN(Number(n.limite_text)) || Number(n.limite_text) <= 0)
45
45
  throw new Error('A propriedade "limite_text" deve ser um número maior que 0.');
46
46
  }
47
- u.addColumn({
48
- id: v,
47
+ c.addColumn({
48
+ id: _,
49
49
  field: n.field,
50
50
  header: n.header,
51
51
  type: n.type,
@@ -73,12 +73,12 @@ const ze = Symbol("v-datatable-key"), Sa = /* @__PURE__ */ R({
73
73
  visible: !n.start_hidden
74
74
  // Se start_hidden for true, ela não estará visível inicialmente
75
75
  });
76
- }), (C, m) => null;
76
+ }), (w, p) => null;
77
77
  }
78
78
  }), ot = new DOMParser(), rt = (d) => {
79
79
  const n = ot.parseFromString(d, "image/svg+xml").documentElement;
80
80
  if (n.tagName.toLowerCase() !== "svg")
81
- return () => me("span", {
81
+ return () => ge("span", {
82
82
  style: {
83
83
  backgroundColor: "red",
84
84
  color: "white",
@@ -87,27 +87,27 @@ const ze = Symbol("v-datatable-key"), Sa = /* @__PURE__ */ R({
87
87
  }
88
88
  }, "Icon Error");
89
89
  const a = {};
90
- for (const c of n.attributes)
91
- a[c.name] = c.value;
92
- const u = n.innerHTML;
93
- return (c, { attrs: C }) => {
94
- const m = a.class || "", B = C.class || "", g = [m, B].filter(Boolean).join(" "), { class: y, ...f } = a, { class: s, ...P } = C;
95
- return me("svg", {
96
- ...f,
97
- ...c,
90
+ for (const u of n.attributes)
91
+ a[u.name] = u.value;
92
+ const c = n.innerHTML;
93
+ return (u, { attrs: w }) => {
94
+ const p = a.class || "", T = w.class || "", f = [p, T].filter(Boolean).join(" "), { class: k, ...h } = a, { class: s, ...P } = w;
95
+ return ge("svg", {
96
+ ...h,
97
+ ...u,
98
98
  ...P,
99
- class: g,
100
- innerHTML: u
99
+ class: f,
100
+ innerHTML: c
101
101
  });
102
102
  };
103
- }, ae = (d) => {
104
- const v = {};
103
+ }, le = (d) => {
104
+ const _ = {};
105
105
  for (const n in d) {
106
106
  const a = d[n];
107
- typeof a == "string" ? v[n] = rt(a) : typeof a == "object" && a !== null && (v[n] = ae(a));
107
+ typeof a == "string" ? _[n] = rt(a) : typeof a == "object" && a !== null && (_[n] = le(a));
108
108
  }
109
- return v;
110
- }, re = {
109
+ return _;
110
+ }, de = {
111
111
  search: {
112
112
  filter: '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-filter" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"> </path> </svg>',
113
113
  clear: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-x"> <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M18 6l-12 12" /> <path d="M6 6l12 12" /> </svg>',
@@ -126,10 +126,10 @@ const ze = Symbol("v-datatable-key"), Sa = /* @__PURE__ */ R({
126
126
  increasing: ' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="m3 8 4-4 4 4"></path> <path d="M7 4v16"></path> <path d="M11 12h4"></path> <path d="M11 16h7"></path> <path d="M11 20h10"></path> </svg> '
127
127
  },
128
128
  column_manager: ' <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-columns" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M4 6l5.5 0" /> <path d="M4 10l5.5 0" /> <path d="M4 14l5.5 0" /> <path d="M4 18l5.5 0" /> <path d="M14.5 6l5.5 0" /> <path d="M14.5 10l5.5 0" /> <path d="M14.5 14l5.5 0" /> <path d="M14.5 18l5.5 0" /> </svg> '
129
- }, it = { class: "input-icon" }, dt = ["placeholder"], ct = {
129
+ }, it = { class: "input-icon" }, dt = ["placeholder"], ut = {
130
130
  key: 1,
131
131
  class: "input-icon-addon"
132
- }, ut = {
132
+ }, ct = {
133
133
  key: 1,
134
134
  class: "dropdown-menu"
135
135
  }, _t = ["onClick"], pt = ["onClick"], mt = /* @__PURE__ */ R({
@@ -144,43 +144,43 @@ const ze = Symbol("v-datatable-key"), Sa = /* @__PURE__ */ R({
144
144
  deactivate_search_empty: { type: Boolean, default: !1 }
145
145
  },
146
146
  emits: ["update:search", "update:filter", "search", "clickedClearSearch"],
147
- setup(d, { emit: v }) {
148
- const n = ae(re), a = d, u = v, c = T({
147
+ setup(d, { emit: _ }) {
148
+ const n = le(de), a = d, c = _, u = B({
149
149
  get: () => a.search,
150
- set: (f) => u("update:search", f)
151
- }), C = T({
150
+ set: (h) => c("update:search", h)
151
+ }), w = B({
152
152
  get: () => a.filter,
153
- set: (f) => u("update:filter", f)
153
+ set: (h) => c("update:filter", h)
154
154
  });
155
- W(C, () => {
156
- u("search");
157
- }), W(
155
+ J(w, () => {
156
+ c("search");
157
+ }), J(
158
158
  () => a.list_filter,
159
- (f) => {
160
- Array.isArray(f) ? (f.forEach((s, P) => {
159
+ (h) => {
160
+ Array.isArray(h) ? (h.forEach((s, P) => {
161
161
  s?.type === 1 && !s.to && console.error(`Filtro na posição ${P} é do tipo 'router-link' mas não possui a propriedade 'to'.`);
162
- }), a.item_use.includes(2) && f.length === 0 && console.error("Nenhum filtro foi passado. Certifique-se de que o array de filtros não está vazio.")) : console.error("list_filter deve ser um array.");
162
+ }), a.item_use.includes(2) && h.length === 0 && console.error("Nenhum filtro foi passado. Certifique-se de que o array de filtros não está vazio.")) : console.error("list_filter deve ser um array.");
163
163
  },
164
164
  { immediate: !0, deep: !0 }
165
165
  );
166
- function m(f) {
167
- C.value === f ? C.value = "" : C.value = f;
166
+ function p(h) {
167
+ w.value === h ? w.value = "" : w.value = h;
168
168
  }
169
- function B() {
170
- c.value = "", a.deactivate_search_on_clear || u("search"), u("clickedClearSearch");
169
+ function T() {
170
+ u.value = "", a.deactivate_search_on_clear || c("search"), c("clickedClearSearch");
171
171
  }
172
- function g(f) {
173
- f.click && typeof f.click == "function" ? f.click() : console.error("O filtro selecionado não possui uma função de clique válida.");
172
+ function f(h) {
173
+ h.click && typeof h.click == "function" ? h.click() : console.error("O filtro selecionado não possui uma função de clique válida.");
174
174
  }
175
- function y() {
176
- a.deactivate_search_empty && c.value.trim() === "" || u("search");
175
+ function k() {
176
+ a.deactivate_search_empty && u.value.trim() === "" || c("search");
177
177
  }
178
- return (f, s) => {
178
+ return (h, s) => {
179
179
  const P = Ge("router-link");
180
- return e(), r(D, null, [
180
+ return e(), r(E, null, [
181
181
  d.item_use.includes(2) ? (e(), r("a", {
182
182
  key: 0,
183
- onClick: s[0] || (s[0] = pe(() => {
183
+ onClick: s[0] || (s[0] = me(() => {
184
184
  }, ["prevent"])),
185
185
  href: "#",
186
186
  class: "btn dropdown-toggle",
@@ -188,55 +188,55 @@ const ze = Symbol("v-datatable-key"), Sa = /* @__PURE__ */ R({
188
188
  title: "Pesquisas Prédefinidas"
189
189
  }, [
190
190
  (e(), $(V(t(n).search.filter)))
191
- ])) : b("", !0),
192
- _("div", it, [
193
- Be(_("input", {
191
+ ])) : C("", !0),
192
+ m("div", it, [
193
+ Be(m("input", {
194
194
  type: "text",
195
195
  class: "form-control ms-1",
196
196
  id: "inputSearchVDataTable",
197
- "onUpdate:modelValue": s[1] || (s[1] = (h) => c.value = h),
198
- onKeyup: Xe(y, ["enter"]),
197
+ "onUpdate:modelValue": s[1] || (s[1] = (y) => u.value = y),
198
+ onKeyup: Xe(k, ["enter"]),
199
199
  placeholder: d.placeholder_search
200
200
  }, null, 40, dt), [
201
- [Te, c.value]
201
+ [Te, u.value]
202
202
  ]),
203
- c.value ? (e(), r("span", {
203
+ u.value ? (e(), r("span", {
204
204
  key: 0,
205
- onClick: s[2] || (s[2] = (h) => B()),
205
+ onClick: s[2] || (s[2] = (y) => T()),
206
206
  class: "inputClose",
207
207
  title: "Limpar pesquisa"
208
208
  }, [
209
209
  (e(), $(V(t(n).search.clear)))
210
- ])) : (e(), r("span", ct, [
210
+ ])) : (e(), r("span", ut, [
211
211
  (e(), $(V(t(n).search.loupe)))
212
212
  ]))
213
213
  ]),
214
- d.item_use.includes(2) ? (e(), r("div", ut, [
215
- (e(!0), r(D, null, A(a.list_filter, (h, k) => (e(), r(D, { key: k }, [
216
- "type" in h && h.type === 1 && (!("visible" in h) || h.visible) ? (e(), $(P, {
214
+ d.item_use.includes(2) ? (e(), r("div", ct, [
215
+ (e(!0), r(E, null, A(a.list_filter, (y, x) => (e(), r(E, { key: x }, [
216
+ "type" in y && y.type === 1 && (!("visible" in y) || y.visible) ? (e(), $(P, {
217
217
  key: 0,
218
- to: h?.to,
218
+ to: y?.to,
219
219
  class: "dropdown-item cursor-pointer"
220
220
  }, {
221
- default: X(() => [
222
- H(z(h.text), 1)
221
+ default: Z(() => [
222
+ H(O(y.text), 1)
223
223
  ]),
224
224
  _: 2
225
- }, 1032, ["to"])) : (!("type" in h) || h.type === 2) && (!("visible" in h) || h.visible) ? (e(), r("a", {
225
+ }, 1032, ["to"])) : (!("type" in y) || y.type === 2) && (!("visible" in y) || y.visible) ? (e(), r("a", {
226
226
  key: 1,
227
- onClick: pe((L) => m(String(h.value)), ["prevent"]),
228
- class: w(["dropdown-item cursor-pointer", C.value === h?.value ? "bg-info text-dark selected" : ""])
229
- }, z(h.text), 11, _t)) : (!("type" in h) || h.type === 3) && (!("visible" in h) || h.visible) ? (e(), r("a", {
227
+ onClick: me((q) => p(String(y.value)), ["prevent"]),
228
+ class: S(["dropdown-item cursor-pointer", w.value === y?.value ? "bg-info text-dark selected" : ""])
229
+ }, O(y.text), 11, _t)) : (!("type" in y) || y.type === 3) && (!("visible" in y) || y.visible) ? (e(), r("a", {
230
230
  key: 2,
231
- onClick: pe((L) => g(h), ["prevent"]),
232
- class: w(["dropdown-item cursor-pointer", h?.active ? "bg-info text-dark selected" : ""])
233
- }, z(h.text), 11, pt)) : b("", !0)
231
+ onClick: me((q) => f(y), ["prevent"]),
232
+ class: S(["dropdown-item cursor-pointer", y?.active ? "bg-info text-dark selected" : ""])
233
+ }, O(y.text), 11, pt)) : C("", !0)
234
234
  ], 64))), 128))
235
- ])) : b("", !0)
235
+ ])) : C("", !0)
236
236
  ], 64);
237
237
  };
238
238
  }
239
- }), gt = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-4c04950a"]]), vt = { class: "d-flex flex-column gap-2" }, ft = ["checked", "disabled", "onChange"], ht = { class: "form-check-label user-select-none" }, yt = /* @__PURE__ */ R({
239
+ }), gt = /* @__PURE__ */ he(mt, [["__scopeId", "data-v-6a2b24b1"]]), ft = { class: "d-flex flex-column gap-2" }, vt = ["checked", "disabled", "onChange"], ht = { class: "form-check-label user-select-none" }, yt = /* @__PURE__ */ R({
240
240
  __name: "VColumnManager",
241
241
  props: {
242
242
  columns_list: { default: () => [] },
@@ -249,16 +249,16 @@ const ze = Symbol("v-datatable-key"), Sa = /* @__PURE__ */ R({
249
249
  disable_class_column_manager_default: { type: Boolean, default: !1 }
250
250
  },
251
251
  setup(d) {
252
- const v = ae(re);
252
+ const _ = le(de);
253
253
  return (n, a) => d.use_column_manager ? (e(), r("div", {
254
254
  key: 0,
255
- class: w([
255
+ class: S([
256
256
  { "dropdown d-inline-block ms-2": !d.disable_class_column_manager_default },
257
257
  d.class_column_manager_dropdown
258
258
  ])
259
259
  }, [
260
- _("button", {
261
- class: w([
260
+ m("button", {
261
+ class: S([
262
262
  { "btn dropdown-toggle": !d.disable_class_column_manager_default },
263
263
  d.class_column_manager_button
264
264
  ]),
@@ -267,238 +267,271 @@ const ze = Symbol("v-datatable-key"), Sa = /* @__PURE__ */ R({
267
267
  "aria-expanded": "false",
268
268
  title: "Gerenciar Colunas visíveis"
269
269
  }, [
270
- (e(), $(V(t(v).column_manager)))
270
+ (e(), $(V(t(_).column_manager)))
271
271
  ], 2),
272
- _("div", {
273
- class: w(["dropdown-menu dropdown-menu-end p-3 shadow-sm", [
272
+ m("div", {
273
+ class: S(["dropdown-menu dropdown-menu-end p-3 shadow-sm", [
274
274
  { "dropdown-menu dropdown-menu-end p-3 shadow-sm": !d.disable_class_column_manager_default },
275
275
  d.class_column_manager_dropdown_menu
276
276
  ]]),
277
277
  style: { "min-width": "220px", "z-index": "1050" }
278
278
  }, [
279
- a[0] || (a[0] = _("h6", { class: "dropdown-header text-uppercase fw-bold mb-2" }, "Exibir Colunas", -1)),
280
- _("div", vt, [
281
- (e(!0), r(D, null, A(d.columns_list, (u) => (e(), r("label", {
282
- key: u.id,
279
+ a[0] || (a[0] = m("h6", { class: "dropdown-header text-uppercase fw-bold mb-2" }, "Exibir Colunas", -1)),
280
+ m("div", ft, [
281
+ (e(!0), r(E, null, A(d.columns_list, (c) => (e(), r("label", {
282
+ key: c.id,
283
283
  class: "form-check cursor-pointer m-0"
284
284
  }, [
285
- _("input", {
285
+ m("input", {
286
286
  class: "form-check-input",
287
287
  type: "checkbox",
288
- checked: u.visible,
289
- disabled: u.locked,
290
- onChange: (c) => d.toggleColumnVisibility(u.id)
291
- }, null, 40, ft),
292
- _("span", ht, z(u.header), 1)
288
+ checked: c.visible,
289
+ disabled: c.locked,
290
+ onChange: (u) => d.toggleColumnVisibility(c.id)
291
+ }, null, 40, vt),
292
+ m("span", ht, O(c.header), 1)
293
293
  ]))), 128))
294
294
  ])
295
295
  ], 2)
296
- ], 2)) : b("", !0);
296
+ ], 2)) : C("", !0);
297
297
  }
298
298
  });
299
299
  function kt() {
300
- const d = O(!1), v = O(""), n = O(0), a = O(0), u = T(() => ({
300
+ const d = I(!1), _ = I(""), n = I(0), a = I(0), c = B(() => ({
301
301
  position: "fixed",
302
302
  zIndex: 9999,
303
303
  pointerEvents: "none",
304
304
  top: `${a.value + 15}px`,
305
305
  left: `${n.value + 15}px`
306
306
  }));
307
- function c(g) {
308
- const y = g.clientX, f = g.clientY, s = window.innerHeight, P = 15, h = 300;
309
- let k = f + P;
310
- k + h > s && (k = f - h - P, k < 0 && (k = 0)), n.value = y, a.value = k;
307
+ function u(f) {
308
+ const k = f.clientX, h = f.clientY, s = window.innerHeight, P = 15, y = 300;
309
+ let x = h + P;
310
+ x + y > s && (x = h - y - P, x < 0 && (x = 0)), n.value = k, a.value = x;
311
311
  }
312
- function C(g, y) {
313
- d.value = !0, v.value = y, c(g);
312
+ function w(f, k) {
313
+ d.value = !0, _.value = k, u(f);
314
314
  }
315
- function m(g) {
316
- d.value && c(g);
315
+ function p(f) {
316
+ d.value && u(f);
317
317
  }
318
- function B() {
318
+ function T() {
319
319
  d.value = !1;
320
320
  }
321
321
  return {
322
322
  isHovering: d,
323
- previewSrc: v,
324
- previewStyle: u,
325
- handleMouseOver: C,
326
- handleMouseMove: m,
327
- handleMouseLeave: B
323
+ previewSrc: _,
324
+ previewStyle: c,
325
+ handleMouseOver: w,
326
+ handleMouseMove: p,
327
+ handleMouseLeave: T
328
328
  };
329
329
  }
330
- function bt(d, v, n, a) {
331
- const u = O([]);
332
- function c() {
333
- u.value = [];
330
+ function bt(d, _, n, a) {
331
+ const c = I([]);
332
+ function u() {
333
+ c.value = [];
334
334
  }
335
- function C(g) {
336
- const y = g[v];
337
- return u.value.some((f) => f === y);
335
+ function w(f) {
336
+ const k = f[_];
337
+ return c.value.some((h) => h === k);
338
338
  }
339
- function m(g) {
340
- const y = g[v], f = u.value.findIndex((P) => P === y), s = f > -1;
341
- d ? (c(), s || (u.value.push(y), a && B(y))) : s ? u.value.splice(f, 1) : (u.value.push(y), a && B(y));
339
+ function p(f) {
340
+ const k = f[_], h = c.value.findIndex((P) => P === k), s = h > -1;
341
+ d ? (u(), s || (c.value.push(k), a && T(k))) : s ? c.value.splice(h, 1) : (c.value.push(k), a && T(k));
342
342
  }
343
- function B(g) {
344
- ge(() => {
343
+ function T(f) {
344
+ fe(() => {
345
345
  if (n) {
346
- const y = document.querySelector("#expand-item-" + g);
347
- y && y.scrollIntoView({ behavior: "smooth", block: "center" });
346
+ const k = document.querySelector("#expand-item-" + f);
347
+ k && k.scrollIntoView({ behavior: "smooth", block: "center" });
348
348
  return;
349
349
  } else
350
350
  setTimeout(() => {
351
- const y = document.querySelector("#expand-item-" + g);
352
- y && y.scrollIntoView({ behavior: "smooth", block: "center" });
351
+ const k = document.querySelector("#expand-item-" + f);
352
+ k && k.scrollIntoView({ behavior: "smooth", block: "center" });
353
353
  }, 600);
354
354
  });
355
355
  }
356
356
  return {
357
- expanded_items: u,
358
- is_item_expanded: C,
359
- expand_item_toggle: m,
360
- close_all_expanded_items: c
357
+ expanded_items: c,
358
+ is_item_expanded: w,
359
+ expand_item_toggle: p,
360
+ close_all_expanded_items: u
361
361
  };
362
362
  }
363
- function wt(d, v, n, a, u, c) {
364
- const C = O([]), m = T(() => t(d)), B = T(() => m.value.endpoint), g = T(() => ({
365
- [m.value.page_param_name]: v.value.current_page + 1,
366
- [m.value.page_size_param_name]: v.value.limit_per_page,
367
- [m.value.search_param_name]: v.value.search || "",
368
- [m.value.filter_param_name]: v.value.filter || ""
369
- })), y = T(() => {
370
- const M = {};
371
- for (const S of n.value)
372
- S.use_ordering && (a.value[S.id] === "increasing" ? M[S.param_ordering] = S.increasing_value || "increasing" : a.value[S.id] === "decreasing" && (M[S.param_ordering] = S.decreasing_value || "decreasing"));
373
- return M;
374
- }), { data: f, pending: s, error: P, execute: h, attempt: k } = m.value.fetch(B, {
375
- disable_request: () => m.value.disable_request,
363
+ function wt(d, _, n, a, c, u) {
364
+ const w = I([]), p = B(() => t(d)), T = B(() => p.value.endpoint), f = B(() => ({
365
+ [p.value.page_param_name]: _.value.current_page + 1,
366
+ [p.value.page_size_param_name]: _.value.limit_per_page,
367
+ [p.value.search_param_name]: _.value.search || "",
368
+ [p.value.filter_param_name]: _.value.filter || ""
369
+ })), k = B(() => {
370
+ const b = {};
371
+ for (const v of n.value)
372
+ v.use_ordering && (a.value[v.id] === "increasing" ? b[v.param_ordering] = v.increasing_value || "increasing" : a.value[v.id] === "decreasing" && (b[v.param_ordering] = v.decreasing_value || "decreasing"));
373
+ return b;
374
+ }), { data: h, pending: s, error: P, execute: y, attempt: x } = p.value.fetch(T, {
375
+ disable_request: () => p.value.disable_request,
376
376
  params: () => {
377
- const M = typeof m.value.add_params == "function";
378
- let S = {};
379
- const ie = typeof m.value.silent_params == "function";
380
- let N = {};
381
- const j = typeof m.value.add_params_keep_page == "function";
377
+ const b = typeof p.value.add_params == "function";
378
+ let v = {};
379
+ const D = typeof p.value.silent_params == "function";
380
+ let K = {};
381
+ const W = typeof p.value.add_params_keep_page == "function";
382
382
  let Q = {};
383
- if (M) {
384
- const G = m.value.add_params;
385
- S = G();
383
+ if (b) {
384
+ const N = p.value.add_params;
385
+ v = N();
386
386
  } else
387
- S = m.value.add_params || {};
388
- if (ie) {
389
- const G = m.value.silent_params;
390
- N = G();
387
+ v = p.value.add_params || {};
388
+ if (D) {
389
+ const N = p.value.silent_params;
390
+ K = N();
391
391
  } else
392
- N = m.value.silent_params || {};
393
- if (j) {
394
- const G = m.value.add_params_keep_page;
395
- Q = G();
392
+ K = p.value.silent_params || {};
393
+ if (W) {
394
+ const N = p.value.add_params_keep_page;
395
+ Q = N();
396
396
  } else
397
- Q = m.value.add_params_keep_page || {};
398
- return m.value.deactivate_default_params ? {
399
- ...S,
400
- ...N,
397
+ Q = p.value.add_params_keep_page || {};
398
+ return p.value.deactivate_default_params ? {
399
+ ...v,
400
+ ...K,
401
401
  ...Q,
402
- ...y.value
402
+ ...k.value
403
403
  } : {
404
- ...g.value,
405
- ...S,
406
- ...N,
404
+ ...f.value,
405
+ ...v,
406
+ ...K,
407
407
  ...Q,
408
- ...y.value
408
+ ...k.value
409
409
  };
410
410
  },
411
- retry: m.value.retry_attempts,
412
- retryDelay: m.value.retry_delay,
411
+ retry: p.value.retry_attempts,
412
+ retryDelay: p.value.retry_delay,
413
413
  paramsReactives: !1,
414
414
  immediate: !1
415
- }, m.value.fetch_name), L = O(!1), x = O(null), U = O(!1), ne = T(() => s.value || L.value);
416
- async function J() {
417
- U.value || (U.value = !0), x.value && clearTimeout(x.value), L.value = !0, x.value = setTimeout(() => {
418
- L.value = !1;
419
- }, m.value.min_loading_delay), c(), u("beforeFetch"), await h(), u("afterFetch");
415
+ }, p.value.fetch_name), q = B(() => {
416
+ if (!p.value.frontend_pagination)
417
+ return w.value;
418
+ let b = w.value;
419
+ const v = p.value.custom_frontend_filter;
420
+ if (v && typeof v == "function")
421
+ b = b.filter(
422
+ (D) => v(D, _.value.search, _.value.filter)
423
+ );
424
+ else if (_.value.search) {
425
+ const D = _.value.search.toLowerCase();
426
+ b = b.filter((K) => Object.values(K).some(
427
+ (W) => W != null && String(W).toLowerCase().includes(D)
428
+ ));
429
+ }
430
+ return b;
431
+ });
432
+ J(q, (b) => {
433
+ if (p.value.frontend_pagination) {
434
+ _.value.count = b.length;
435
+ const v = Math.ceil(b.length / _.value.limit_per_page) - 1;
436
+ _.value.current_page > v && v >= 0 && (_.value.current_page = v);
437
+ }
438
+ }, { immediate: !0 });
439
+ const M = B(() => {
440
+ if (!p.value.frontend_pagination)
441
+ return w.value;
442
+ const b = _.value.current_page * _.value.limit_per_page, v = b + _.value.limit_per_page;
443
+ return q.value.slice(b, v);
444
+ }), Y = I(!1), ee = I(null), G = I(!1), te = B(() => s.value || Y.value);
445
+ async function X() {
446
+ G.value || (G.value = !0), ee.value && clearTimeout(ee.value), Y.value = !0, ee.value = setTimeout(() => {
447
+ Y.value = !1;
448
+ }, p.value.min_loading_delay), u(), c("beforeFetch"), (!p.value.frontend_pagination || w.value.length === 0) && await y(), c("afterFetch");
420
449
  }
421
- function Y() {
422
- v.value.current_page = m.value.page_starts_at, J();
450
+ function ae() {
451
+ _.value.current_page = p.value.page_starts_at, X();
423
452
  }
424
- return W(f, (M) => {
425
- M ? (C.value = M[m.value.data_key] || [], v.value.count = M[m.value.total_key] || 0) : (C.value = [], v.value.count = 0);
426
- }, { immediate: !0 }), W(
453
+ return J(h, (b) => {
454
+ if (b) {
455
+ let v = [];
456
+ p.value.data_key ? v = b[p.value.data_key] || [] : v = Array.isArray(b) ? b : [b], w.value = v, p.value.frontend_pagination || (_.value.count = b[p.value.total_key] || 0);
457
+ } else
458
+ w.value = [], _.value.count = 0;
459
+ }, { immediate: !0 }), J(
427
460
  () => {
428
- const M = typeof m.value.add_params == "function" ? m.value.add_params() : m.value.add_params;
429
- return JSON.stringify(M);
461
+ const b = typeof p.value.add_params == "function" ? p.value.add_params() : p.value.add_params;
462
+ return JSON.stringify(b);
430
463
  },
431
- (M, S) => {
432
- M !== S && S !== void 0 && Y();
464
+ (b, v) => {
465
+ b !== v && v !== void 0 && ae();
433
466
  }
434
- ), W(
467
+ ), J(
435
468
  () => {
436
- const M = typeof m.value.add_params_keep_page == "function" ? m.value.add_params_keep_page() : m.value.add_params_keep_page;
437
- return JSON.stringify(M);
469
+ const b = typeof p.value.add_params_keep_page == "function" ? p.value.add_params_keep_page() : p.value.add_params_keep_page;
470
+ return JSON.stringify(b);
438
471
  },
439
- (M, S) => {
440
- M !== S && S !== void 0 && J();
472
+ (b, v) => {
473
+ b !== v && v !== void 0 && X();
441
474
  }
442
- ), W(
443
- () => m.value.endpoint,
444
- (M, S) => {
445
- M !== S && S !== void 0 && (v.value.current_page = m.value.page_starts_at);
475
+ ), J(
476
+ () => p.value.endpoint,
477
+ (b, v) => {
478
+ b !== v && v !== void 0 && (_.value.current_page = p.value.page_starts_at);
446
479
  }
447
480
  ), {
448
- items: C,
481
+ items: M,
449
482
  pending: s,
450
483
  error: P,
451
- execute: h,
452
- response: f,
453
- attempt: k,
454
- default_params: g,
455
- fetchDataWithDelay: J,
456
- reSearch: Y,
457
- showLoadingState: ne,
458
- first_fetch: U
484
+ execute: y,
485
+ response: h,
486
+ attempt: x,
487
+ default_params: f,
488
+ fetchDataWithDelay: X,
489
+ reSearch: ae,
490
+ showLoadingState: te,
491
+ first_fetch: G
459
492
  };
460
493
  }
461
- function xt(d, v) {
462
- const n = O(null), a = O([]), u = (g) => {
463
- const y = d.item_key;
464
- return a.value.some((f) => f[y] === g[y]);
465
- }, c = T(() => {
466
- if (!v.value.length) return !1;
467
- const g = v.value.filter((y) => u(y)).length;
468
- return g === 0 ? !1 : g === v.value.length ? !0 : "indeterminate";
469
- }), C = T(() => a.value.length > 0);
470
- W([c, n], ([g]) => {
471
- n.value && (g === "indeterminate" ? (n.value.checked = !1, n.value.indeterminate = !0) : (n.value.checked = g, n.value.indeterminate = !1));
494
+ function xt(d, _) {
495
+ const n = I(null), a = I([]), c = (f) => {
496
+ const k = d.item_key;
497
+ return a.value.some((h) => h[k] === f[k]);
498
+ }, u = B(() => {
499
+ if (!_.value.length) return !1;
500
+ const f = _.value.filter((k) => c(k)).length;
501
+ return f === 0 ? !1 : f === _.value.length ? !0 : "indeterminate";
502
+ }), w = B(() => a.value.length > 0);
503
+ J([u, n], ([f]) => {
504
+ n.value && (f === "indeterminate" ? (n.value.checked = !1, n.value.indeterminate = !0) : (n.value.checked = f, n.value.indeterminate = !1));
472
505
  }, {
473
506
  immediate: !0,
474
507
  flush: "post"
475
508
  });
476
- function m() {
477
- const g = v.value;
478
- if (!g.length) return;
479
- const y = c.value;
480
- if (y === !0 || y === "indeterminate") {
481
- const f = g.map((s) => s[d.item_key]);
509
+ function p() {
510
+ const f = _.value;
511
+ if (!f.length) return;
512
+ const k = u.value;
513
+ if (k === !0 || k === "indeterminate") {
514
+ const h = f.map((s) => s[d.item_key]);
482
515
  a.value = a.value.filter(
483
- (s) => !f.includes(s[d.item_key])
516
+ (s) => !h.includes(s[d.item_key])
484
517
  );
485
518
  } else
486
- g.forEach((f) => {
487
- u(f) || a.value.push(f);
519
+ f.forEach((h) => {
520
+ c(h) || a.value.push(h);
488
521
  });
489
522
  }
490
- function B(g) {
491
- const y = d.item_key, f = a.value.findIndex((s) => s[y] === g[y]);
492
- f > -1 ? a.value.splice(f, 1) : a.value.push(g);
523
+ function T(f) {
524
+ const k = d.item_key, h = a.value.findIndex((s) => s[k] === f[k]);
525
+ h > -1 ? a.value.splice(h, 1) : a.value.push(f);
493
526
  }
494
527
  return {
495
528
  selectAllCheckbox: n,
496
529
  selected_items: a,
497
- isSelected: u,
498
- selectAllState: c,
499
- atLeastOneSelected: C,
500
- toggleSelectAll: m,
501
- toggleItemSelection: B
530
+ isSelected: c,
531
+ selectAllState: u,
532
+ atLeastOneSelected: w,
533
+ toggleSelectAll: p,
534
+ toggleItemSelection: T
502
535
  };
503
536
  }
504
537
  const Ct = {
@@ -506,6 +539,7 @@ const Ct = {
506
539
  fetch_name: "",
507
540
  custom_loading: null,
508
541
  deactivate_default_params: !1,
542
+ frontend_pagination: !1,
509
543
  add_params: {},
510
544
  add_params_keep_page: {},
511
545
  silent_params: {},
@@ -560,18 +594,19 @@ const Ct = {
560
594
  retry_delay: 2e3,
561
595
  show_header_when_empty: !1,
562
596
  storage_id: "",
563
- use_column_manager: !1
597
+ use_column_manager: !1,
598
+ custom_frontend_filter: null
564
599
  };
565
600
  function St(d) {
566
- const v = Me(lt, {});
567
- return { options: T(() => {
601
+ const _ = Me(lt, {});
602
+ return { options: B(() => {
568
603
  const a = Object.fromEntries(
569
- Object.entries(d).filter(([u, c]) => c !== void 0)
604
+ Object.entries(d).filter(([c, u]) => u !== void 0)
570
605
  );
571
606
  return {
572
607
  ...Ct,
573
608
  // 1º Camada: Prioridade Mínima (Valores Padrão)
574
- ...v,
609
+ ..._,
575
610
  // 2º Camada: Prioridade Média (Valores Globais definidos por quem usa o plugin)
576
611
  ...a
577
612
  // 3º Camada: Prioridade Máxima (O que o dev digitou na tela)
@@ -581,10 +616,10 @@ function St(d) {
581
616
  const Mt = { class: "loading-container" }, $t = { key: 0 }, Bt = { key: 2 }, Tt = {
582
617
  key: 5,
583
618
  class: "text-danger erro-custom-container"
584
- }, zt = { class: "badge bg-orange text-white erro-custom-text" }, It = { key: 0 }, Ot = { key: 2 }, Pt = {
619
+ }, Ot = { class: "badge bg-orange text-white erro-custom-text" }, zt = { key: 0 }, It = { key: 2 }, Pt = {
585
620
  key: 5,
586
621
  class: "text-danger erro-custom-container"
587
- }, Dt = { class: "badge bg-orange text-white erro-custom-text" }, Vt = ["colspan"], Et = {
622
+ }, Dt = { class: "badge bg-orange text-white erro-custom-text" }, Et = ["colspan"], Vt = {
588
623
  key: 0,
589
624
  class: "d-flex flex-column justify-content-center align-items-center",
590
625
  style: { height: "6rem" }
@@ -606,97 +641,97 @@ const Mt = { class: "loading-container" }, $t = { key: 0 }, Bt = { key: 2 }, Tt
606
641
  pagination: {}
607
642
  },
608
643
  setup(d) {
609
- const v = d;
644
+ const _ = d;
610
645
  return (n, a) => (e(), r("div", Mt, [
611
- v.custom_loading ? (e(), $(V(v.custom_loading), { key: 0 })) : (e(), r("table", {
646
+ _.custom_loading ? (e(), $(V(_.custom_loading), { key: 0 })) : (e(), r("table", {
612
647
  key: 1,
613
- class: w(["table table-vcenter table-selectable", v.class_table])
648
+ class: S(["table table-vcenter table-selectable", _.class_table])
614
649
  }, [
615
- _("thead", null, [
616
- _("tr", null, [
617
- (e(!0), r(D, null, A(d.columns, (u) => (e(), r("th", {
618
- key: u.field || u.header,
619
- class: w(u.class_column)
620
- }, z(u.header), 3))), 128))
650
+ m("thead", null, [
651
+ m("tr", null, [
652
+ (e(!0), r(E, null, A(d.columns, (c) => (e(), r("th", {
653
+ key: c.field || c.header,
654
+ class: S(c.class_column)
655
+ }, O(c.header), 3))), 128))
621
656
  ])
622
657
  ]),
623
- _("tbody", null, [
624
- v.type_loading === "placeholder" ? (e(!0), r(D, { key: 0 }, A(d.pagination.limit_per_page, (u) => (e(), r("tr", {
625
- key: "placeholder-" + u,
658
+ m("tbody", null, [
659
+ _.type_loading === "placeholder" ? (e(!0), r(E, { key: 0 }, A(d.pagination.limit_per_page, (c) => (e(), r("tr", {
660
+ key: "placeholder-" + c,
626
661
  class: "placeholder-glow"
627
662
  }, [
628
- (e(!0), r(D, null, A(d.columns, (c) => (e(), r("td", {
629
- key: c.field || c.header,
630
- class: w(c.class_row)
663
+ (e(!0), r(E, null, A(d.columns, (u) => (e(), r("td", {
664
+ key: u.field || u.header,
665
+ class: S(u.class_row)
631
666
  }, [
632
- c.bodySlot ? (e(), r("span", $t, [...a[0] || (a[0] = [
633
- _("span", { class: "placeholder col-8" }, null, -1)
634
- ])])) : c.type === "text" ? (e(), r("span", {
667
+ u.bodySlot ? (e(), r("span", $t, [...a[0] || (a[0] = [
668
+ m("span", { class: "placeholder col-8" }, null, -1)
669
+ ])])) : u.type === "text" ? (e(), r("span", {
635
670
  key: 1,
636
- class: w(c.class_item)
671
+ class: S(u.class_item)
637
672
  }, [...a[1] || (a[1] = [
638
- _("span", { class: "placeholder col-8" }, null, -1)
639
- ])], 2)) : c.type === "date" ? (e(), r("span", Bt, [...a[2] || (a[2] = [
640
- _("span", { class: "placeholder col-9" }, null, -1)
641
- ])])) : c.type === "html" ? (e(), r("div", {
673
+ m("span", { class: "placeholder col-8" }, null, -1)
674
+ ])], 2)) : u.type === "date" ? (e(), r("span", Bt, [...a[2] || (a[2] = [
675
+ m("span", { class: "placeholder col-9" }, null, -1)
676
+ ])])) : u.type === "html" ? (e(), r("div", {
642
677
  key: 3,
643
- class: w(c.class_item)
678
+ class: S(u.class_item)
644
679
  }, [...a[3] || (a[3] = [
645
- _("div", { class: "placeholder col-12" }, null, -1)
646
- ])], 2)) : c.type === "img" ? (e(), r("div", {
680
+ m("div", { class: "placeholder col-12" }, null, -1)
681
+ ])], 2)) : u.type === "img" ? (e(), r("div", {
647
682
  key: 4,
648
- class: w(c.class_item)
683
+ class: S(u.class_item)
649
684
  }, [...a[4] || (a[4] = [
650
- _("div", { class: "placeholder placeholder-img" }, null, -1)
685
+ m("div", { class: "placeholder placeholder-img" }, null, -1)
651
686
  ])], 2)) : (e(), r("span", Tt, [
652
687
  a[5] || (a[5] = H("tipo ", -1)),
653
- _("span", zt, z(c.type), 1),
688
+ m("span", Ot, O(u.type), 1),
654
689
  a[6] || (a[6] = H(" não suportado ", -1))
655
690
  ]))
656
691
  ], 2))), 128))
657
- ]))), 128)) : v.type_loading === "spiner-table" ? (e(!0), r(D, { key: 1 }, A(d.pagination.limit_per_page, (u) => (e(), r("tr", {
658
- key: "placeholder-" + u
692
+ ]))), 128)) : _.type_loading === "spiner-table" ? (e(!0), r(E, { key: 1 }, A(d.pagination.limit_per_page, (c) => (e(), r("tr", {
693
+ key: "placeholder-" + c
659
694
  }, [
660
- (e(!0), r(D, null, A(d.columns, (c) => (e(), r("td", {
661
- key: c.field || c.header,
662
- class: w(c.class_row)
695
+ (e(!0), r(E, null, A(d.columns, (u) => (e(), r("td", {
696
+ key: u.field || u.header,
697
+ class: S(u.class_row)
663
698
  }, [
664
- c.bodySlot ? (e(), r("span", It, [...a[7] || (a[7] = [
665
- _("span", {
699
+ u.bodySlot ? (e(), r("span", zt, [...a[7] || (a[7] = [
700
+ m("span", {
666
701
  class: "spinner-border spinner-border-sm",
667
702
  role: "status",
668
703
  "aria-hidden": "true"
669
704
  }, null, -1)
670
- ])])) : c.type === "text" ? (e(), r("span", {
705
+ ])])) : u.type === "text" ? (e(), r("span", {
671
706
  key: 1,
672
- class: w(c.class_item)
707
+ class: S(u.class_item)
673
708
  }, [...a[8] || (a[8] = [
674
- _("span", {
709
+ m("span", {
675
710
  class: "spinner-border spinner-border-sm",
676
711
  role: "status",
677
712
  "aria-hidden": "true"
678
713
  }, null, -1)
679
- ])], 2)) : c.type === "date" ? (e(), r("span", Ot, [...a[9] || (a[9] = [
680
- _("span", {
714
+ ])], 2)) : u.type === "date" ? (e(), r("span", It, [...a[9] || (a[9] = [
715
+ m("span", {
681
716
  class: "spinner-border spinner-border-sm",
682
717
  role: "status",
683
718
  "aria-hidden": "true"
684
719
  }, null, -1)
685
- ])])) : c.type === "html" ? (e(), r("div", {
720
+ ])])) : u.type === "html" ? (e(), r("div", {
686
721
  key: 3,
687
- class: w(c.class_item)
722
+ class: S(u.class_item)
688
723
  }, [...a[10] || (a[10] = [
689
- _("span", {
724
+ m("span", {
690
725
  class: "spinner-border spinner-border-sm",
691
726
  role: "status",
692
727
  "aria-hidden": "true"
693
728
  }, null, -1)
694
- ])], 2)) : c.type === "img" ? (e(), r("div", {
729
+ ])], 2)) : u.type === "img" ? (e(), r("div", {
695
730
  key: 4,
696
- class: w(["", c.class_item])
731
+ class: S(["", u.class_item])
697
732
  }, [...a[11] || (a[11] = [
698
- _("span", { class: "placeholder-img d-flex justify-content-center align-items-center" }, [
699
- _("span", {
733
+ m("span", { class: "placeholder-img d-flex justify-content-center align-items-center" }, [
734
+ m("span", {
700
735
  class: "spinner-border spinner-border-sm",
701
736
  role: "status",
702
737
  "aria-hidden": "true"
@@ -704,47 +739,47 @@ const Mt = { class: "loading-container" }, $t = { key: 0 }, Bt = { key: 2 }, Tt
704
739
  ], -1)
705
740
  ])], 2)) : (e(), r("span", Pt, [
706
741
  a[12] || (a[12] = H("tipo ", -1)),
707
- _("span", Dt, z(c.type), 1),
742
+ m("span", Dt, O(u.type), 1),
708
743
  a[13] || (a[13] = H(" não suportado ", -1))
709
744
  ]))
710
745
  ], 2))), 128))
711
- ]))), 128)) : v.type_loading === "spiner" ? (e(!0), r(D, { key: 2 }, A(d.pagination.limit_per_page, (u) => (e(), r("tr", { key: u }, [
712
- _("td", {
746
+ ]))), 128)) : _.type_loading === "spiner" ? (e(!0), r(E, { key: 2 }, A(d.pagination.limit_per_page, (c) => (e(), r("tr", { key: c }, [
747
+ m("td", {
713
748
  colspan: d.columns.length,
714
749
  class: "text-center p-0",
715
750
  style: { "border-bottom": "none" }
716
751
  }, [
717
- u === Math.floor(d.pagination.limit_per_page / 2) + 1 ? (e(), r("div", Et, [...a[14] || (a[14] = [
718
- _("div", {
752
+ c === Math.floor(d.pagination.limit_per_page / 2) + 1 ? (e(), r("div", Vt, [...a[14] || (a[14] = [
753
+ m("div", {
719
754
  class: "spinner-border",
720
755
  style: { width: "3rem", height: "3rem" },
721
756
  role: "status"
722
757
  }, null, -1),
723
- _("span", { class: "mt-2" }, "Carregando...", -1)
758
+ m("span", { class: "mt-2" }, "Carregando...", -1)
724
759
  ])])) : (e(), r("div", Nt))
725
- ], 8, Vt)
726
- ]))), 128)) : b("", !0)
760
+ ], 8, Et)
761
+ ]))), 128)) : C("", !0)
727
762
  ])
728
763
  ], 2)),
729
- d.attempt && d.attempt.current > 1 ? (e(), r("div", jt, " A conexão falhou. Tentando novamente... (Tentativa " + z(d.attempt.current) + " de " + z(d.attempt.total) + ") ", 1)) : b("", !0)
764
+ d.attempt && d.attempt.current > 1 ? (e(), r("div", jt, " A conexão falhou. Tentando novamente... (Tentativa " + O(d.attempt.current) + " de " + O(d.attempt.total) + ") ", 1)) : C("", !0)
730
765
  ]));
731
766
  }
732
- }), Ht = /* @__PURE__ */ fe(At, [["__scopeId", "data-v-3b019685"]]), Ft = /* @__PURE__ */ R({
767
+ }), Ht = /* @__PURE__ */ he(At, [["__scopeId", "data-v-3b019685"]]), Ft = /* @__PURE__ */ R({
733
768
  __name: "VOrderingIcon",
734
769
  props: {
735
770
  orderings_state: {},
736
771
  use_ordering: { type: Boolean }
737
772
  },
738
773
  emits: ["toggle"],
739
- setup(d, { emit: v }) {
740
- const n = ae(re), a = d, u = v;
741
- return (c, C) => d.use_ordering ? (e(), r("span", {
774
+ setup(d, { emit: _ }) {
775
+ const n = le(de), a = d, c = _;
776
+ return (u, w) => d.use_ordering ? (e(), r("span", {
742
777
  key: 0,
743
- onClick: C[0] || (C[0] = (m) => u("toggle")),
778
+ onClick: w[0] || (w[0] = (p) => c("toggle")),
744
779
  class: "cursor-pointer"
745
780
  }, [
746
- !a.orderings_state || a.orderings_state === "none" ? (e(), $(V(t(n).ordering.default), { key: 0 })) : a.orderings_state === "decreasing" ? (e(), $(V(t(n).ordering.decreasing), { key: 1 })) : a.orderings_state === "increasing" ? (e(), $(V(t(n).ordering.increasing), { key: 2 })) : b("", !0)
747
- ])) : b("", !0);
781
+ !a.orderings_state || a.orderings_state === "none" ? (e(), $(V(t(n).ordering.default), { key: 0 })) : a.orderings_state === "decreasing" ? (e(), $(V(t(n).ordering.decreasing), { key: 1 })) : a.orderings_state === "increasing" ? (e(), $(V(t(n).ordering.increasing), { key: 2 })) : C("", !0)
782
+ ])) : C("", !0);
748
783
  }
749
784
  }), Lt = {
750
785
  key: 1,
@@ -760,29 +795,29 @@ const Mt = { class: "loading-container" }, $t = { key: 0 }, Bt = { key: 2 }, Tt
760
795
  col: {}
761
796
  },
762
797
  emits: ["toggleOrderingState"],
763
- setup(d, { emit: v }) {
764
- const n = d, a = () => me(Ft, {
798
+ setup(d, { emit: _ }) {
799
+ const n = d, a = () => ge(Ft, {
765
800
  orderings_state: n.orderings_state,
766
801
  use_ordering: n.use_ordering,
767
- onToggle: () => c("toggleOrderingState")
768
- }), u = T(() => ({
802
+ onToggle: () => u("toggleOrderingState")
803
+ }), c = B(() => ({
769
804
  "header-draggable": !n.locked,
770
805
  "header-locked": n.locked,
771
806
  [n.class_column]: !0
772
- })), c = v, C = (B) => !B || B.length === 0 ? !0 : B.every((g) => g.type === We || g.type === Re && typeof g.children == "string" && !g.children.trim() ? !0 : g.type === D || g.type === Symbol.for("v-fgt") || String(g.type) === "Symbol(Fragment)" ? C(g.children) : !1), m = T(() => {
807
+ })), u = _, w = (T) => !T || T.length === 0 ? !0 : T.every((f) => f.type === We || f.type === Qe && typeof f.children == "string" && !f.children.trim() ? !0 : f.type === E || f.type === Symbol.for("v-fgt") || String(f.type) === "Symbol(Fragment)" ? w(f.children) : !1), p = B(() => {
773
808
  if (!n.col || !n.col.colHeaderSlot) return !1;
774
- const B = n.col.colHeaderSlot({ col: n.col, locked: n.locked });
775
- return !C(B);
809
+ const T = n.col.colHeaderSlot({ col: n.col, locked: n.locked });
810
+ return !w(T);
776
811
  });
777
- return (B, g) => (e(), r("th", {
778
- class: w(u.value)
812
+ return (T, f) => (e(), r("th", {
813
+ class: S(c.value)
779
814
  }, [
780
- _("div", {
781
- class: w({ "header-ordering": d.use_ordering })
815
+ m("div", {
816
+ class: S({ "header-ordering": d.use_ordering })
782
817
  }, [
783
- m.value ? (e(), $(V(d.col.colHeaderSlot), Ce(ve({ key: 0 }, { col: n.col, locked: n.locked, OrderingComponent: a })), null, 16)) : (e(), r("div", Lt, [
784
- _("span", null, z(n.header), 1),
785
- d.col.colHeaderMidleSlot ? (e(), $(V(d.col.colHeaderMidleSlot), Ce(ve({ key: 0 }, { col: n.col, locked: n.locked })), null, 16)) : b("", !0),
818
+ p.value ? (e(), $(V(d.col.colHeaderSlot), Ce(ve({ key: 0 }, { col: n.col, locked: n.locked, OrderingComponent: a })), null, 16)) : (e(), r("div", Lt, [
819
+ m("span", null, O(n.header), 1),
820
+ d.col.colHeaderMidleSlot ? (e(), $(V(d.col.colHeaderMidleSlot), Ce(ve({ key: 0 }, { col: n.col, locked: n.locked })), null, 16)) : C("", !0),
786
821
  (e(), $(V(a)))
787
822
  ]))
788
823
  ], 2)
@@ -801,10 +836,10 @@ const Mt = { class: "loading-container" }, $t = { key: 0 }, Bt = { key: 2 }, Tt
801
836
  }, Wt = {
802
837
  key: 1,
803
838
  class: "text-secondary"
804
- }, Rt = {
839
+ }, Qt = {
805
840
  key: 2,
806
841
  class: "table-responsive"
807
- }, Qt = { key: 0 }, Zt = { key: 0 }, ea = {
842
+ }, Zt = { key: 0 }, Rt = { key: 0 }, ea = {
808
843
  key: 1,
809
844
  class: "w-1"
810
845
  }, ta = {
@@ -813,10 +848,10 @@ const Mt = { class: "loading-container" }, $t = { key: 0 }, Bt = { key: 2 }, Tt
813
848
  }, aa = ["onClick"], na = {
814
849
  key: 1,
815
850
  class: "w-1"
816
- }, sa = ["checked", "onChange"], la = ["onClick"], oa = ["onClick"], ra = { key: 0 }, ia = { key: 1 }, da = ["onClick", "innerHTML"], ca = ["onClick"], ua = ["src"], _a = ["src"], pa = {
851
+ }, sa = ["checked", "onChange"], la = ["onClick"], oa = ["onClick"], ra = { key: 0 }, ia = { key: 1 }, da = ["onClick", "innerHTML"], ua = ["onClick"], ca = ["src"], _a = ["src"], pa = {
817
852
  key: 5,
818
853
  class: "text-danger erro-custom-container"
819
- }, ma = { class: "badge bg-orange text-white erro-custom-text" }, ga = ["id"], va = ["colspan"], fa = { key: 1 }, ha = {
854
+ }, ma = { class: "badge bg-orange text-white erro-custom-text" }, ga = ["id"], fa = ["colspan"], va = { key: 1 }, ha = {
820
855
  key: 2,
821
856
  class: "text-center p-4 text-secondary"
822
857
  }, ya = ["src"], ka = /* @__PURE__ */ R({
@@ -846,6 +881,7 @@ const Mt = { class: "loading-container" }, $t = { key: 0 }, Bt = { key: 2 }, Tt
846
881
  class_table: {},
847
882
  class_filters: {},
848
883
  class_page_size: {},
884
+ frontend_pagination: { type: Boolean },
849
885
  limit_per_page: {},
850
886
  page_starts_at: {},
851
887
  min_loading_delay: {},
@@ -863,6 +899,7 @@ const Mt = { class: "loading-container" }, $t = { key: 0 }, Bt = { key: 2 }, Tt
863
899
  disable_search: { type: Boolean },
864
900
  deactivate_search_empty: { type: Boolean },
865
901
  deactivate_search_on_clear: { type: Boolean },
902
+ custom_frontend_filter: { type: [Function, null] },
866
903
  first_text_page_size: {},
867
904
  second_text_page_size: {},
868
905
  use_checkbox: { type: Boolean },
@@ -879,15 +916,15 @@ const Mt = { class: "loading-container" }, $t = { key: 0 }, Bt = { key: 2 }, Tt
879
916
  column_manager_teleport: {}
880
917
  },
881
918
  emits: ["tradePage", "beforeFetch", "afterFetch", "clickedClearSearch"],
882
- setup(d, { expose: v, emit: n }) {
883
- const a = ae(re), u = O(!1), {
884
- isHovering: c,
885
- previewSrc: C,
886
- previewStyle: m,
887
- handleMouseOver: B,
888
- handleMouseMove: g,
889
- handleMouseLeave: y
890
- } = kt(), f = d, { options: s } = St(f), P = n, h = O({}), k = O([]), L = O(!1), x = O({
919
+ setup(d, { expose: _, emit: n }) {
920
+ const a = le(de), c = I(!1), {
921
+ isHovering: u,
922
+ previewSrc: w,
923
+ previewStyle: p,
924
+ handleMouseOver: T,
925
+ handleMouseMove: f,
926
+ handleMouseLeave: k
927
+ } = kt(), h = d, { options: s } = St(h), P = n, y = I({}), x = I([]), q = I(!1), M = I({
891
928
  current_page: s.value.page_starts_at,
892
929
  // pagina atual
893
930
  count: 0,
@@ -899,40 +936,40 @@ const Mt = { class: "loading-container" }, $t = { key: 0 }, Bt = { key: 2 }, Tt
899
936
  filter: ""
900
937
  // filtro selecionado
901
938
  }), {
902
- expand_item_toggle: U,
903
- close_all_expanded_items: ne,
904
- is_item_expanded: J
939
+ expand_item_toggle: Y,
940
+ close_all_expanded_items: ee,
941
+ is_item_expanded: G
905
942
  } = bt(
906
943
  s.value.close_expanded_item_on_expand_new,
907
944
  s.value.item_key,
908
945
  s.value.deactivate_animation_expand,
909
946
  s.value.scroll_to_expanded_item
910
947
  ), {
911
- items: Y,
912
- error: M,
913
- attempt: S,
914
- default_params: ie,
915
- fetchDataWithDelay: N,
916
- reSearch: j,
917
- showLoadingState: Q,
918
- first_fetch: G
919
- } = wt(s, x, k, h, P, ne), {
920
- selectAllCheckbox: he,
921
- selected_items: Z,
948
+ items: te,
949
+ error: X,
950
+ attempt: ae,
951
+ default_params: b,
952
+ fetchDataWithDelay: v,
953
+ reSearch: D,
954
+ showLoadingState: K,
955
+ first_fetch: W
956
+ } = wt(s, M, x, y, P, ee), {
957
+ selectAllCheckbox: Q,
958
+ selected_items: N,
922
959
  isSelected: ye,
923
- atLeastOneSelected: Ie,
960
+ atLeastOneSelected: ze,
924
961
  toggleSelectAll: ke,
925
- toggleItemSelection: Oe
926
- } = xt(s.value, Y), ee = T(() => s.value.storage_id ? `vdatatable_${s.value.storage_id}_${s.value.endpoint}` : null);
962
+ toggleItemSelection: Ie
963
+ } = xt(s.value, te), ne = B(() => s.value.storage_id ? `vdatatable_${s.value.storage_id}_${s.value.endpoint}` : null);
927
964
  function Pe() {
928
- for (const l of k.value) {
965
+ for (const l of x.value) {
929
966
  let i = "";
930
- const o = k.value.filter((I) => I.field === l.field).length;
967
+ const o = x.value.filter((z) => z.field === l.field).length;
931
968
  if (l.field && o === 1)
932
969
  i = l.field;
933
970
  else {
934
- const I = k.value.filter((p) => p.header === l.header).length;
935
- if (l.header && I === 1)
971
+ const z = x.value.filter((g) => g.header === l.header).length;
972
+ if (l.header && z === 1)
936
973
  i = l.header;
937
974
  else
938
975
  throw new Error(`[VDataTable] Falha de integridade: Impossível designar um ID único de armazenamento. O 'field' e 'header' estão duplicados ou ausentes. Header ofensor: ${l.header}`);
@@ -940,45 +977,45 @@ const Mt = { class: "loading-container" }, $t = { key: 0 }, Bt = { key: 2 }, Tt
940
977
  l.storage_key = i;
941
978
  }
942
979
  }
943
- function de() {
944
- if (!ee.value) return;
945
- const l = k.value.map((i) => ({
980
+ function ue() {
981
+ if (!ne.value) return;
982
+ const l = x.value.map((i) => ({
946
983
  storage_key: i.storage_key,
947
984
  visible: i.visible
948
985
  }));
949
- localStorage.setItem(ee.value, JSON.stringify(l));
986
+ localStorage.setItem(ne.value, JSON.stringify(l));
950
987
  }
951
988
  function De() {
952
- if (!ee.value) return;
953
- const l = localStorage.getItem(ee.value);
989
+ if (!ne.value) return;
990
+ const l = localStorage.getItem(ne.value);
954
991
  if (l)
955
992
  try {
956
- const i = JSON.parse(l), o = k.value.map((E) => E.storage_key).sort(), I = i.map((E) => E.storage_key).sort();
957
- if (JSON.stringify(o) !== JSON.stringify(I)) {
958
- localStorage.removeItem(ee.value), de();
993
+ const i = JSON.parse(l), o = x.value.map((j) => j.storage_key).sort(), z = i.map((j) => j.storage_key).sort();
994
+ if (JSON.stringify(o) !== JSON.stringify(z)) {
995
+ localStorage.removeItem(ne.value), ue();
959
996
  return;
960
997
  }
961
- const p = [];
962
- for (const E of i) {
963
- const q = k.value.find((Je) => Je.storage_key === E.storage_key);
964
- q && (q.visible = E.visible, p.push(q));
998
+ const g = [];
999
+ for (const j of i) {
1000
+ const L = x.value.find((Je) => Je.storage_key === j.storage_key);
1001
+ L && (L.visible = j.visible, g.push(L));
965
1002
  }
966
- k.value.splice(0, k.value.length, ...p);
1003
+ x.value.splice(0, x.value.length, ...g);
967
1004
  } catch {
968
- localStorage.removeItem(ee.value);
1005
+ localStorage.removeItem(ne.value);
969
1006
  }
970
1007
  }
971
- const be = T(
972
- () => k.value.filter((l) => l.locked && l.visible !== !1)
973
- ), ce = T({
1008
+ const be = B(
1009
+ () => x.value.filter((l) => l.locked && l.visible !== !1)
1010
+ ), ce = B({
974
1011
  get() {
975
- return k.value.filter((l) => !l.locked && l.visible !== !1);
1012
+ return x.value.filter((l) => !l.locked && l.visible !== !1);
976
1013
  },
977
1014
  set(l) {
978
- const i = k.value.filter((I) => I.locked), o = k.value.filter((I) => !I.locked && I.visible === !1);
979
- k.value.splice(0, k.value.length, ...l, ...o, ...i), de();
1015
+ const i = x.value.filter((z) => z.locked), o = x.value.filter((z) => !z.locked && z.visible === !1);
1016
+ x.value.splice(0, x.value.length, ...l, ...o, ...i), ue();
980
1017
  }
981
- }), Ve = T(() => [...ce.value, ...be.value]), ue = T(() => k.value.map((l) => ({
1018
+ }), Ee = B(() => [...ce.value, ...be.value]), _e = B(() => x.value.map((l) => ({
982
1019
  id: l.id,
983
1020
  header: l.header,
984
1021
  field: l.field,
@@ -987,116 +1024,116 @@ const Mt = { class: "loading-container" }, $t = { key: 0 }, Bt = { key: 2 }, Tt
987
1024
  visible: l.visible !== !1,
988
1025
  locked: l.locked
989
1026
  })));
990
- function _e(l) {
991
- const i = k.value.find((o) => o.id === l);
992
- i && (i.visible = !i.visible, de());
1027
+ function pe(l) {
1028
+ const i = x.value.find((o) => o.id === l);
1029
+ i && (i.visible = !i.visible, ue());
993
1030
  }
994
- const Ee = T(() => {
1031
+ const Ve = B(() => {
995
1032
  let l = [1];
996
1033
  return s.value.list_filter.length > 0 && l.push(2), l;
997
- }), se = T(() => Y.value.length > 0);
1034
+ }), oe = B(() => te.value.length > 0);
998
1035
  function Ne() {
999
1036
  setTimeout(() => {
1000
- L.value = !1;
1037
+ q.value = !1;
1001
1038
  }, 500);
1002
1039
  }
1003
1040
  function je(l) {
1004
- k.value.push(l);
1041
+ x.value.push(l);
1005
1042
  }
1006
- Qe(ze, { addColumn: je });
1043
+ Ze(Oe, { addColumn: je });
1007
1044
  const we = (l) => {
1008
1045
  const i = l.target, o = parseInt(i.value, 10);
1009
- o > 0 && (x.value.limit_per_page = o, x.value.limit_per_page = o, j());
1046
+ o > 0 && (M.value.limit_per_page = o, M.value.limit_per_page = o, D());
1010
1047
  };
1011
- function K(l, i, o = null) {
1048
+ function U(l, i, o = null) {
1012
1049
  if (!l) return i;
1013
- const I = l.split(".");
1014
- let p = i;
1015
- for (const E of I)
1016
- p && typeof p == "object" && E in p ? p = p[E] : console.error(`Caminho inválido ou valor nulo em: ${l} na parte ${E}`);
1017
- return o && (p = o(p)), p;
1050
+ const z = l.split(".");
1051
+ let g = i;
1052
+ for (const j of z)
1053
+ g && typeof g == "object" && j in g ? g = g[j] : console.error(`Caminho inválido ou valor nulo em: ${l} na parte ${j}`);
1054
+ return o && (g = o(g)), g;
1018
1055
  }
1019
1056
  function Ae(l, i) {
1020
1057
  return i && typeof i == "number" && i > 0 && typeof l == "string" && l.length > i ? l.substring(0, i) + "..." : l;
1021
1058
  }
1022
1059
  function xe(l) {
1023
- for (const o in h.value)
1024
- o !== l && (h.value[o] = "none");
1025
- const i = h.value[l] || "none";
1026
- i === "none" ? h.value[l] = "increasing" : i === "increasing" ? h.value[l] = "decreasing" : h.value[l] = "none", j();
1060
+ for (const o in y.value)
1061
+ o !== l && (y.value[o] = "none");
1062
+ const i = y.value[l] || "none";
1063
+ i === "none" ? y.value[l] = "increasing" : i === "increasing" ? y.value[l] = "decreasing" : y.value[l] = "none", D();
1027
1064
  }
1028
1065
  function He(l) {
1029
- l > 0 ? (x.value.limit_per_page = l, j()) : console.warn("O limite deve ser um número maior que zero.");
1066
+ l > 0 ? (M.value.limit_per_page = l, D()) : console.warn("O limite deve ser um número maior que zero.");
1030
1067
  }
1031
1068
  function Fe(l) {
1032
- x.value.search = l, j();
1069
+ M.value.search = l, D();
1033
1070
  }
1034
1071
  function Le(l) {
1035
- x.value.filter = l, j();
1072
+ M.value.filter = l, D();
1036
1073
  }
1037
1074
  function qe(l) {
1038
- l >= 0 && l <= Math.ceil(x.value.count / x.value.limit_per_page) ? (x.value.current_page = l, N()) : console.warn("Número de página inválido.");
1075
+ l >= 0 && l <= Math.ceil(M.value.count / M.value.limit_per_page) ? (M.value.current_page = l, v()) : console.warn("Número de página inválido.");
1039
1076
  }
1040
1077
  function Ke() {
1041
- let l = k.value.length;
1078
+ let l = x.value.length;
1042
1079
  return s.value.use_checkbox && (l += 1), s.value.use_expandable_items && (l += 1), l;
1043
1080
  }
1044
1081
  function Ue() {
1045
- P("tradePage"), N();
1082
+ P("tradePage"), v();
1046
1083
  }
1047
- const le = (l, i) => {
1084
+ const re = (l, i) => {
1048
1085
  const o = [l.class_item || ""];
1049
1086
  if (l.click && o.push("cursor-pointer"), l.class_rules)
1050
- for (const [I, p] of Object.entries(l.class_rules))
1051
- typeof p == "function" && p(i) && o.push(I);
1087
+ for (const [z, g] of Object.entries(l.class_rules))
1088
+ typeof g == "function" && g(i) && o.push(z);
1052
1089
  return o.join(" ").trim();
1053
1090
  };
1054
- return v({
1055
- execute: N,
1056
- reSearch: j,
1057
- pagination: Ze(x),
1091
+ return _({
1092
+ execute: v,
1093
+ reSearch: D,
1094
+ pagination: Re(M),
1058
1095
  set_limit_per_page: He,
1059
1096
  set_search: Fe,
1060
1097
  set_filter: Le,
1061
1098
  set_page: qe,
1062
- default_params: ie,
1063
- selected_items: Z,
1064
- atLeastOneSelected: Ie,
1065
- expand_item_toggle: U,
1066
- close_all_expanded_items: ne,
1067
- selectAllCheckbox: he,
1068
- toggleColumnVisibility: _e,
1069
- columns_list: ue
1099
+ default_params: b,
1100
+ selected_items: N,
1101
+ atLeastOneSelected: ze,
1102
+ expand_item_toggle: Y,
1103
+ close_all_expanded_items: ee,
1104
+ selectAllCheckbox: Q,
1105
+ toggleColumnVisibility: pe,
1106
+ columns_list: _e
1070
1107
  }), $e(() => {
1071
- u.value = !0, s.value.immediate && ge(() => {
1072
- j();
1073
- }), ge(() => {
1108
+ c.value = !0, s.value.immediate && fe(() => {
1109
+ D();
1110
+ }), fe(() => {
1074
1111
  s.value.storage_id && (Pe(), De());
1075
1112
  });
1076
1113
  }), (l, i) => (e(), r("div", null, [
1077
- _("div", {
1078
- class: w(["", t(s).class_container])
1114
+ m("div", {
1115
+ class: S(["", t(s).class_container])
1079
1116
  }, [
1080
1117
  F(l.$slots, "default", {}, void 0, !0),
1081
- _("div", {
1082
- class: w(["", t(s).class_content])
1118
+ m("div", {
1119
+ class: S(["", t(s).class_content])
1083
1120
  }, [
1084
- _("div", {
1085
- class: w([t(s).class_filters, "d-flex justify-content-between align-items-start"])
1121
+ m("div", {
1122
+ class: S([t(s).class_filters, "d-flex justify-content-between align-items-start"])
1086
1123
  }, [
1087
1124
  F(l.$slots, "pageSize", {
1088
1125
  changePageSize: we,
1089
- limit_per_page: x.value.limit_per_page
1126
+ limit_per_page: M.value.limit_per_page
1090
1127
  }, () => [
1091
- _("div", {
1092
- class: w(["text-secondary", t(s).class_page_size])
1128
+ m("div", {
1129
+ class: S(["text-secondary", t(s).class_page_size])
1093
1130
  }, [
1094
- H(z(t(s).first_text_page_size) + " ", 1),
1095
- _("div", qt, [
1096
- Be(_("input", {
1131
+ H(O(t(s).first_text_page_size) + " ", 1),
1132
+ m("div", qt, [
1133
+ Be(m("input", {
1097
1134
  class: "form-control form-control-sm",
1098
1135
  onChange: we,
1099
- "onUpdate:modelValue": i[0] || (i[0] = (o) => x.value.limit_per_page = o),
1136
+ "onUpdate:modelValue": i[0] || (i[0] = (o) => M.value.limit_per_page = o),
1100
1137
  min: "1",
1101
1138
  size: "3",
1102
1139
  "aria-label": "Número de registros por página",
@@ -1104,116 +1141,116 @@ const Mt = { class: "loading-container" }, $t = { key: 0 }, Bt = { key: 2 }, Tt
1104
1141
  }, null, 544), [
1105
1142
  [
1106
1143
  Te,
1107
- x.value.limit_per_page,
1144
+ M.value.limit_per_page,
1108
1145
  void 0,
1109
1146
  { lazy: !0 }
1110
1147
  ]
1111
1148
  ])
1112
1149
  ]),
1113
- H(" " + z(t(s).second_text_page_size), 1)
1150
+ H(" " + O(t(s).second_text_page_size), 1)
1114
1151
  ], 2)
1115
1152
  ], !0),
1116
1153
  F(l.$slots, "fieldMiddle", {}, void 0, !0),
1117
- _("div", Kt, [
1118
- u.value ? (e(), $(oe, {
1154
+ m("div", Kt, [
1155
+ c.value ? (e(), $(ie, {
1119
1156
  key: 0,
1120
1157
  to: t(s).search_teleport || "body",
1121
1158
  disabled: !t(s).search_teleport
1122
1159
  }, [
1123
- t(s).disable_search ? b("", !0) : (e(), $(gt, {
1160
+ t(s).disable_search ? C("", !0) : (e(), $(gt, {
1124
1161
  key: 0,
1125
- search: x.value.search,
1126
- "onUpdate:search": i[1] || (i[1] = (o) => x.value.search = o),
1127
- filter: x.value.filter,
1128
- "onUpdate:filter": i[2] || (i[2] = (o) => x.value.filter = o),
1162
+ search: M.value.search,
1163
+ "onUpdate:search": i[1] || (i[1] = (o) => M.value.search = o),
1164
+ filter: M.value.filter,
1165
+ "onUpdate:filter": i[2] || (i[2] = (o) => M.value.filter = o),
1129
1166
  list_filter: t(s).list_filter,
1130
- item_use: Ee.value,
1131
- onSearch: t(j),
1167
+ item_use: Ve.value,
1168
+ onSearch: t(D),
1132
1169
  deactivate_search_on_clear: t(s).deactivate_search_on_clear,
1133
1170
  placeholder_search: t(s).placeholder_search,
1134
1171
  deactivate_search_empty: t(s).deactivate_search_empty,
1135
1172
  use_column_manager: t(s).use_column_manager,
1136
- toggleColumnVisibility: _e,
1137
- columns_list: ue.value,
1173
+ toggleColumnVisibility: pe,
1174
+ columns_list: _e.value,
1138
1175
  onClickedClearSearch: i[3] || (i[3] = (o) => l.$emit("clickedClearSearch"))
1139
1176
  }, {
1140
- "search-field": X(() => [
1177
+ "search-field": Z(() => [
1141
1178
  F(l.$slots, "search-field", {
1142
- search: x.value.search,
1143
- filter: x.value.filter,
1144
- reSearch: t(j)
1179
+ search: M.value.search,
1180
+ filter: M.value.filter,
1181
+ reSearch: t(D)
1145
1182
  }, void 0, !0)
1146
1183
  ]),
1147
1184
  _: 3
1148
1185
  }, 8, ["search", "filter", "list_filter", "item_use", "onSearch", "deactivate_search_on_clear", "placeholder_search", "deactivate_search_empty", "use_column_manager", "columns_list"]))
1149
- ], 8, ["to", "disabled"])) : b("", !0),
1150
- u.value ? (e(), $(oe, {
1186
+ ], 8, ["to", "disabled"])) : C("", !0),
1187
+ c.value ? (e(), $(ie, {
1151
1188
  key: 1,
1152
1189
  to: t(s).column_manager_teleport || "body",
1153
1190
  disabled: !t(s).column_manager_teleport
1154
1191
  }, [
1155
- te(yt, {
1192
+ se(yt, {
1156
1193
  use_column_manager: t(s).use_column_manager,
1157
- columns_list: ue.value,
1158
- toggleColumnVisibility: _e,
1194
+ columns_list: _e.value,
1195
+ toggleColumnVisibility: pe,
1159
1196
  disable_class_column_manager_default: t(s).disable_class_column_manager_default,
1160
1197
  class_column_manager_button: t(s).class_column_manager_button,
1161
1198
  class_column_manager_dropdown_menu: t(s).class_column_manager_dropdown_menu,
1162
1199
  class_column_manager_dropdown: t(s).class_column_manager_dropdown
1163
1200
  }, null, 8, ["use_column_manager", "columns_list", "disable_class_column_manager_default", "class_column_manager_button", "class_column_manager_dropdown_menu", "class_column_manager_dropdown"])
1164
- ], 8, ["to", "disabled"])) : b("", !0),
1165
- u.value ? (e(), $(oe, {
1201
+ ], 8, ["to", "disabled"])) : C("", !0),
1202
+ c.value ? (e(), $(ie, {
1166
1203
  key: 2,
1167
1204
  to: t(s).extra_actions_teleport || "body",
1168
1205
  disabled: !t(s).extra_actions_teleport
1169
1206
  }, [
1170
1207
  F(l.$slots, "extra-actions", {}, void 0, !0)
1171
- ], 8, ["to", "disabled"])) : b("", !0)
1208
+ ], 8, ["to", "disabled"])) : C("", !0)
1172
1209
  ])
1173
1210
  ], 2),
1174
1211
  F(l.$slots, "item-selected-info", {
1175
- selected_items: t(Z),
1176
- clearSelection: () => Z.value = []
1212
+ selected_items: t(N),
1213
+ clearSelection: () => N.value = []
1177
1214
  }, () => [
1178
- t(s).use_checkbox && t(Z).length > 0 && !t(s).deactivate_selected_info ? (e(), r("div", Ut, [
1179
- _("h4", Jt, [
1180
- i[10] || (i[10] = _("strong", null, "oi Itens Selecionados:", -1)),
1215
+ t(s).use_checkbox && t(N).length > 0 && !t(s).deactivate_selected_info ? (e(), r("div", Ut, [
1216
+ m("h4", Jt, [
1217
+ i[10] || (i[10] = m("strong", null, "oi Itens Selecionados:", -1)),
1181
1218
  i[11] || (i[11] = H()),
1182
- _("span", Yt, z(t(Z).length), 1)
1219
+ m("span", Yt, O(t(N).length), 1)
1183
1220
  ]),
1184
- _("a", {
1221
+ m("a", {
1185
1222
  class: "cursor-pointer",
1186
- onClick: i[4] || (i[4] = (o) => Z.value = [])
1223
+ onClick: i[4] || (i[4] = (o) => N.value = [])
1187
1224
  }, [
1188
1225
  (e(), $(V(t(a).checkbox.clear))),
1189
1226
  i[12] || (i[12] = H(" Limpar Seleção ", -1))
1190
1227
  ])
1191
- ])) : b("", !0)
1228
+ ])) : C("", !0)
1192
1229
  ], !0),
1193
- t(Q) ? (e(), $(Ht, {
1230
+ t(K) ? (e(), $(Ht, {
1194
1231
  key: 0,
1195
- columns: k.value,
1196
- limit: x.value.limit_per_page,
1232
+ columns: x.value,
1233
+ limit: M.value.limit_per_page,
1197
1234
  type_loading: t(s).type_loading,
1198
1235
  custom_loading: t(s).custom_loading,
1199
1236
  class_table: t(s).class_table,
1200
- attempt: t(S),
1201
- pagination: x.value
1202
- }, null, 8, ["columns", "limit", "type_loading", "custom_loading", "class_table", "attempt", "pagination"])) : t(M) ? (e(), r("div", Gt, [
1203
- i[13] || (i[13] = _("h4", { class: "text-danger" }, "Ocorreu um Erro", -1)),
1204
- t(S) ? (e(), r("p", Xt, " Não foi possível carregar os dados após " + z(t(S).total) + " tentativa(s). ", 1)) : (e(), r("p", Wt, " Não foi possível carregar os dados. Verifique sua conexão. ")),
1205
- _("button", {
1237
+ attempt: t(ae),
1238
+ pagination: M.value
1239
+ }, null, 8, ["columns", "limit", "type_loading", "custom_loading", "class_table", "attempt", "pagination"])) : t(X) ? (e(), r("div", Gt, [
1240
+ i[13] || (i[13] = m("h4", { class: "text-danger" }, "Ocorreu um Erro", -1)),
1241
+ t(ae) ? (e(), r("p", Xt, " Não foi possível carregar os dados após " + O(t(ae).total) + " tentativa(s). ", 1)) : (e(), r("p", Wt, " Não foi possível carregar os dados. Verifique sua conexão. ")),
1242
+ m("button", {
1206
1243
  class: "btn btn-primary mt-2",
1207
1244
  onClick: i[5] || (i[5] = //@ts-ignore
1208
- (...o) => t(N) && t(N)(...o))
1245
+ (...o) => t(v) && t(v)(...o))
1209
1246
  }, " Tentar Novamente ")
1210
- ])) : t(Y) ? (e(), r("div", Rt, [
1211
- se.value || t(s).show_header_when_empty ? (e(), r("div", Qt, [
1212
- _("table", {
1213
- class: w(["table table-vcenter table-selectable", t(s).class_table])
1247
+ ])) : t(te) ? (e(), r("div", Qt, [
1248
+ oe.value || t(s).show_header_when_empty ? (e(), r("div", Zt, [
1249
+ m("table", {
1250
+ class: S(["table table-vcenter table-selectable", t(s).class_table])
1214
1251
  }, [
1215
- _("thead", null, [
1216
- te(t(st), {
1252
+ m("thead", null, [
1253
+ se(t(st), {
1217
1254
  modelValue: ce.value,
1218
1255
  "onUpdate:modelValue": i[7] || (i[7] = (o) => ce.value = o),
1219
1256
  tag: "tr",
@@ -1221,41 +1258,41 @@ const Mt = { class: "loading-container" }, $t = { key: 0 }, Bt = { key: 2 }, Tt
1221
1258
  animation: 400,
1222
1259
  "ghost-class": "ghost-item",
1223
1260
  "drag-class": "dragging-item",
1224
- onStart: i[8] || (i[8] = (o) => L.value = !0),
1261
+ onStart: i[8] || (i[8] = (o) => q.value = !0),
1225
1262
  onEnd: i[9] || (i[9] = () => Ne())
1226
1263
  }, {
1227
- header: X(() => [
1228
- t(s).use_expandable_items ? (e(), r("th", Zt)) : b("", !0),
1264
+ header: Z(() => [
1265
+ t(s).use_expandable_items ? (e(), r("th", Rt)) : C("", !0),
1229
1266
  t(s).use_checkbox ? (e(), r("th", ea, [
1230
- _("input", {
1267
+ m("input", {
1231
1268
  class: "form-check-input m-0",
1232
1269
  type: "checkbox",
1233
1270
  ref_key: "selectAllCheckbox",
1234
- ref: he,
1271
+ ref: Q,
1235
1272
  onChange: i[6] || (i[6] = //@ts-ignore
1236
1273
  (...o) => t(ke) && t(ke)(...o)),
1237
1274
  "aria-label": "Selecionar todos os itens na página"
1238
1275
  }, null, 544)
1239
- ])) : b("", !0)
1276
+ ])) : C("", !0)
1240
1277
  ]),
1241
- item: X(({ element: o }) => [
1242
- te(Se, {
1278
+ item: Z(({ element: o }) => [
1279
+ se(Se, {
1243
1280
  header: o.header,
1244
1281
  class_column: o.class_column,
1245
1282
  use_ordering: o.use_ordering,
1246
- orderings_state: h.value[o.id] || "none",
1283
+ orderings_state: y.value[o.id] || "none",
1247
1284
  onToggleOrderingState: () => xe(o.id),
1248
1285
  locked: !1,
1249
1286
  col: o
1250
1287
  }, null, 8, ["header", "class_column", "use_ordering", "orderings_state", "onToggleOrderingState", "col"])
1251
1288
  ]),
1252
- footer: X(() => [
1253
- (e(!0), r(D, null, A(be.value, (o) => (e(), $(Se, {
1289
+ footer: Z(() => [
1290
+ (e(!0), r(E, null, A(be.value, (o) => (e(), $(Se, {
1254
1291
  key: o.field || o.header,
1255
1292
  header: o.header,
1256
1293
  class_column: o.class_column,
1257
1294
  use_ordering: o.use_ordering,
1258
- orderings_state: h.value[o.id] || "none",
1295
+ orderings_state: y.value[o.id] || "none",
1259
1296
  onToggleOrderingState: () => xe(o.id),
1260
1297
  col: o,
1261
1298
  locked: ""
@@ -1264,174 +1301,174 @@ const Mt = { class: "loading-container" }, $t = { key: 0 }, Bt = { key: 2 }, Tt
1264
1301
  _: 1
1265
1302
  }, 8, ["modelValue"])
1266
1303
  ]),
1267
- _("tbody", null, [
1268
- se.value ? (e(!0), r(D, { key: 0 }, A(t(Y), (o, I) => (e(), r(D, {
1304
+ m("tbody", null, [
1305
+ oe.value ? (e(!0), r(E, { key: 0 }, A(t(te), (o, z) => (e(), r(E, {
1269
1306
  key: o[t(s).item_key]
1270
1307
  }, [
1271
- te(et, {
1308
+ se(et, {
1272
1309
  tag: "tr",
1273
- name: L.value ? "column-move" : ""
1310
+ name: q.value ? "column-move" : ""
1274
1311
  }, {
1275
- default: X(() => [
1312
+ default: Z(() => [
1276
1313
  t(s).use_expandable_items ? (e(), r("td", ta, [
1277
1314
  F(l.$slots, "expand-button", {
1278
1315
  item: o,
1279
- index: I,
1280
- isExpanded: t(J)(o),
1281
- expand_item_toggle: t(U)
1316
+ index: z,
1317
+ isExpanded: t(G)(o),
1318
+ expand_item_toggle: t(Y)
1282
1319
  }, () => [
1283
- _("button", {
1320
+ m("button", {
1284
1321
  type: "button",
1285
- class: w(["btn-clean btn-icon-anim", { "is-expanded": t(J)(o) }]),
1286
- onClick: (p) => t(U)(o)
1322
+ class: S(["btn-clean btn-icon-anim", { "is-expanded": t(G)(o) }]),
1323
+ onClick: (g) => t(Y)(o)
1287
1324
  }, [
1288
1325
  t(s).type_button_expand === "arrow" ? (e(), $(V(t(a).expand.arrow), { key: 0 })) : (e(), $(V(t(a).expand.plus), { key: 1 }))
1289
1326
  ], 10, aa)
1290
1327
  ], !0)
1291
- ])) : b("", !0),
1328
+ ])) : C("", !0),
1292
1329
  t(s).use_checkbox ? (e(), r("td", na, [
1293
- _("input", {
1330
+ m("input", {
1294
1331
  class: "form-check-input m-0",
1295
1332
  type: "checkbox",
1296
1333
  checked: t(ye)(o),
1297
- onChange: (p) => t(Oe)(o),
1334
+ onChange: (g) => t(Ie)(o),
1298
1335
  "aria-label": "Selecionar este item"
1299
1336
  }, null, 40, sa)
1300
- ])) : b("", !0),
1301
- (e(!0), r(D, null, A(Ve.value, (p, E) => (e(), r("td", {
1302
- key: p.field || p.header,
1303
- class: w(p.class_row)
1337
+ ])) : C("", !0),
1338
+ (e(!0), r(E, null, A(Ee.value, (g, j) => (e(), r("td", {
1339
+ key: g.field || g.header,
1340
+ class: S(g.class_row)
1304
1341
  }, [
1305
- p.bodySlot ? (e(), $(V(p.bodySlot), {
1342
+ g.bodySlot ? (e(), $(V(g.bodySlot), {
1306
1343
  key: 0,
1307
1344
  item: o,
1308
- index: E,
1345
+ index: j,
1309
1346
  "is-selected": t(ye)(o)
1310
- }, null, 8, ["item", "index", "is-selected"])) : p.type === "text" ? (e(), r("span", {
1347
+ }, null, 8, ["item", "index", "is-selected"])) : g.type === "text" ? (e(), r("span", {
1311
1348
  key: 1,
1312
- onClick: (q) => p.click ? p.click(o) : null,
1313
- class: w(le(p, o))
1314
- }, z(Ae(K(p.field, o, p.transform_function), p.limite_text ?? null)), 11, la)) : p.type === "date" ? (e(), r("span", {
1349
+ onClick: (L) => g.click ? g.click(o) : null,
1350
+ class: S(re(g, o))
1351
+ }, O(Ae(U(g.field, o, g.transform_function), g.limite_text ?? null)), 11, la)) : g.type === "date" ? (e(), r("span", {
1315
1352
  key: 2,
1316
- onClick: (q) => p.click ? p.click(o) : null,
1317
- class: w(le(p, o))
1353
+ onClick: (L) => g.click ? g.click(o) : null,
1354
+ class: S(re(g, o))
1318
1355
  }, [
1319
- p.format === "complete" ? (e(), r("span", ra, z(new Date(K(
1320
- p.field,
1356
+ g.format === "complete" ? (e(), r("span", ra, O(new Date(U(
1357
+ g.field,
1321
1358
  o
1322
- )).toLocaleString()), 1)) : b("", !0),
1323
- p.format === "simple" ? (e(), r("span", ia, z(new Date(K(
1324
- p.field,
1359
+ )).toLocaleString()), 1)) : C("", !0),
1360
+ g.format === "simple" ? (e(), r("span", ia, O(new Date(U(
1361
+ g.field,
1325
1362
  o
1326
- )).toLocaleDateString()), 1)) : b("", !0)
1327
- ], 10, oa)) : p.type === "html" ? (e(), r("div", {
1363
+ )).toLocaleDateString()), 1)) : C("", !0)
1364
+ ], 10, oa)) : g.type === "html" ? (e(), r("div", {
1328
1365
  key: 3,
1329
- onClick: (q) => p.click ? p.click(o) : null,
1330
- class: w(le(p, o)),
1331
- innerHTML: K(p.field, o)
1332
- }, null, 10, da)) : p.type === "img" ? (e(), r("div", {
1366
+ onClick: (L) => g.click ? g.click(o) : null,
1367
+ class: S(re(g, o)),
1368
+ innerHTML: U(g.field, o)
1369
+ }, null, 10, da)) : g.type === "img" ? (e(), r("div", {
1333
1370
  key: 4,
1334
- onClick: (q) => p.click ? p.click(o) : null,
1335
- class: w(le(p, o))
1371
+ onClick: (L) => g.click ? g.click(o) : null,
1372
+ class: S(re(g, o))
1336
1373
  }, [
1337
- K(p.field, o) ? (e(), r("div", ve({
1374
+ U(g.field, o) ? (e(), r("div", ve({
1338
1375
  key: 0,
1339
1376
  ref_for: !0
1340
- }, p.deactivate_img_preview ? {
1377
+ }, g.deactivate_img_preview ? {
1341
1378
  class: "container-img"
1342
1379
  } : {
1343
- onMouseover: (q) => t(B)(q, K(p.field, o)),
1344
- onMousemove: t(g),
1345
- onMouseleave: t(y),
1380
+ onMouseover: (L) => t(T)(L, U(g.field, o)),
1381
+ onMousemove: t(f),
1382
+ onMouseleave: t(k),
1346
1383
  class: "container-img container-img-preview"
1347
1384
  }), [
1348
- _("img", {
1385
+ m("img", {
1349
1386
  class: "img-tamanho",
1350
- src: K(p.field, o)
1351
- }, null, 8, ua),
1352
- _("img", {
1387
+ src: U(g.field, o)
1388
+ }, null, 8, ca),
1389
+ m("img", {
1353
1390
  class: "img-tamanho-cover",
1354
- src: K(p.field, o)
1391
+ src: U(g.field, o)
1355
1392
  }, null, 8, _a),
1356
- i[14] || (i[14] = _("div", { class: "bg-img" }, null, -1))
1357
- ], 16)) : b("", !0)
1358
- ], 10, ca)) : (e(), r("span", pa, [
1393
+ i[14] || (i[14] = m("div", { class: "bg-img" }, null, -1))
1394
+ ], 16)) : C("", !0)
1395
+ ], 10, ua)) : (e(), r("span", pa, [
1359
1396
  i[15] || (i[15] = H("tipo ", -1)),
1360
- _("span", ma, z(p.type), 1),
1397
+ m("span", ma, O(g.type), 1),
1361
1398
  i[16] || (i[16] = H(" não suportado", -1))
1362
1399
  ]))
1363
1400
  ], 2))), 128))
1364
1401
  ]),
1365
1402
  _: 2
1366
1403
  }, 1032, ["name"]),
1367
- te(tt, {
1404
+ se(tt, {
1368
1405
  name: "expand-item-" + t(s).type_animation_expand,
1369
1406
  css: !t(s).deactivate_animation_expand
1370
1407
  }, {
1371
- default: X(() => [
1372
- t(J)(o) ? (e(), r("tr", {
1408
+ default: Z(() => [
1409
+ t(G)(o) ? (e(), r("tr", {
1373
1410
  key: 0,
1374
1411
  id: "expand-item-" + o[t(s).item_key],
1375
1412
  class: "expanded-item-row"
1376
1413
  }, [
1377
- _("td", {
1414
+ m("td", {
1378
1415
  colspan: Ke()
1379
1416
  }, [
1380
1417
  F(l.$slots, "after-row", { item: o }, void 0, !0)
1381
- ], 8, va)
1382
- ], 8, ga)) : b("", !0)
1418
+ ], 8, fa)
1419
+ ], 8, ga)) : C("", !0)
1383
1420
  ]),
1384
1421
  _: 2
1385
1422
  }, 1032, ["name", "css"])
1386
- ], 64))), 128)) : b("", !0)
1423
+ ], 64))), 128)) : C("", !0)
1387
1424
  ])
1388
1425
  ], 2)
1389
- ])) : b("", !0),
1390
- !se.value && t(G) === !1 ? (e(), r("div", fa, [
1426
+ ])) : C("", !0),
1427
+ !oe.value && t(W) === !1 ? (e(), r("div", va, [
1391
1428
  F(l.$slots, "idle-state", {}, void 0, !0)
1392
- ])) : se.value ? b("", !0) : (e(), r("div", ha, [...i[17] || (i[17] = [
1393
- _("p", { class: "m-0" }, "Nenhum item encontrado.", -1)
1429
+ ])) : oe.value ? C("", !0) : (e(), r("div", ha, [...i[17] || (i[17] = [
1430
+ m("p", { class: "m-0" }, "Nenhum item encontrado.", -1)
1394
1431
  ])]))
1395
- ])) : b("", !0)
1432
+ ])) : C("", !0)
1396
1433
  ], 2)
1397
1434
  ], 2),
1398
- u.value ? (e(), $(oe, {
1435
+ c.value ? (e(), $(ie, {
1399
1436
  key: 0,
1400
1437
  to: t(s).pagination_teleport || "body",
1401
1438
  disabled: !t(s).pagination_teleport
1402
1439
  }, [
1403
1440
  F(l.$slots, "pagination", {
1404
- pagination: x.value,
1405
- tradePage: t(N),
1406
- error: t(M)
1441
+ pagination: M.value,
1442
+ tradePage: t(v),
1443
+ error: t(X)
1407
1444
  }, () => [
1408
- !t(M) && x.value.count > 0 ? (e(), r("div", {
1445
+ !t(X) && M.value.count > 0 ? (e(), r("div", {
1409
1446
  key: 0,
1410
- class: w(["px-3", t(s).class_pagination])
1447
+ class: S(["px-3", t(s).class_pagination])
1411
1448
  }, [
1412
- te(nt, {
1449
+ se(nt, {
1413
1450
  page_starts_at: t(s).page_starts_at,
1414
1451
  filtering: !0,
1415
- pagination: x.value,
1452
+ pagination: M.value,
1416
1453
  onTradePage: Ue
1417
1454
  }, null, 8, ["page_starts_at", "pagination"])
1418
- ], 2)) : b("", !0)
1455
+ ], 2)) : C("", !0)
1419
1456
  ], !0)
1420
- ], 8, ["to", "disabled"])) : b("", !0),
1421
- t(c) ? (e(), r("div", {
1457
+ ], 8, ["to", "disabled"])) : C("", !0),
1458
+ t(u) ? (e(), r("div", {
1422
1459
  key: 1,
1423
1460
  class: "image-preview-container",
1424
- style: at(t(m))
1461
+ style: at(t(p))
1425
1462
  }, [
1426
- _("img", {
1427
- src: t(C),
1463
+ m("img", {
1464
+ src: t(w),
1428
1465
  alt: "Preview",
1429
1466
  class: "image-preview-large"
1430
1467
  }, null, 8, ya)
1431
- ], 4)) : b("", !0)
1468
+ ], 4)) : C("", !0)
1432
1469
  ]));
1433
1470
  }
1434
- }), Ma = /* @__PURE__ */ fe(ka, [["__scopeId", "data-v-3198e7cc"]]);
1471
+ }), Ma = /* @__PURE__ */ he(ka, [["__scopeId", "data-v-3198e7cc"]]);
1435
1472
  export {
1436
1473
  Sa as VColumn,
1437
1474
  Ma as VDataTable