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