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