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