v-sistec-features 1.26.2 → 1.26.4

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