v-sistec-features 1.9.0 → 1.9.2

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,7 +1,7 @@
1
- import { defineComponent as Q, useSlots as Me, inject as Ce, onMounted as Se, computed as b, watch as L, resolveComponent as $e, createElementBlock as l, openBlock as n, createCommentVNode as g, createElementVNode as t, withDirectives as se, withKeys as ze, vModelText as le, Fragment as w, renderList as V, createBlock as U, withCtx as H, createTextVNode as B, toDisplayString as v, normalizeClass as m, withModifiers as ae, ref as y, provide as Ve, readonly as Be, nextTick as Ne, renderSlot as O, createVNode as J, createStaticVNode as Te, resolveDynamicComponent as ne, unref as f, TransitionGroup as je, mergeProps as Ae, normalizeStyle as De } from "vue";
2
- import { _ as re, P as Ee } from "./Pagination-DtVDFQ07.js";
3
- import Ie from "vuedraggable";
4
- const oe = Symbol("v-datatable-key"), Kt = /* @__PURE__ */ Q({
1
+ import { defineComponent as R, useSlots as Ce, inject as Se, onMounted as $e, computed as M, watch as P, resolveComponent as ze, createElementBlock as l, openBlock as s, createCommentVNode as g, createElementVNode as t, withDirectives as le, withKeys as Ve, vModelText as re, Fragment as x, renderList as V, createBlock as U, withCtx as H, createTextVNode as B, toDisplayString as v, normalizeClass as m, withModifiers as se, ref as k, provide as Be, readonly as Ne, nextTick as Te, renderSlot as O, createVNode as Q, createStaticVNode as je, resolveDynamicComponent as ne, unref as f, TransitionGroup as De, mergeProps as Ae, normalizeStyle as Ee } from "vue";
2
+ import { _ as oe, P as Ie } from "./Pagination-DtVDFQ07.js";
3
+ import Oe from "vuedraggable";
4
+ const ie = Symbol("v-datatable-key"), Gt = /* @__PURE__ */ R({
5
5
  __name: "VColumn",
6
6
  props: {
7
7
  field: { default: null },
@@ -21,100 +21,101 @@ const oe = Symbol("v-datatable-key"), Kt = /* @__PURE__ */ Q({
21
21
  decreasing_value: { default: "" },
22
22
  increasing_value: { default: "" }
23
23
  },
24
- setup(x) {
25
- const d = x, M = Me(), C = Ce(oe);
26
- if (!C)
24
+ setup(w) {
25
+ const i = w, C = Ce(), S = Se(ie);
26
+ if (!S)
27
27
  throw new Error("VColumn deve ser usado dentro de um VDataTable.");
28
28
  const z = ["text", "img", "date", "html"];
29
- return Se(() => {
30
- if (d.field !== null && !d.field)
29
+ return $e(() => {
30
+ if (i.field !== null && !i.field)
31
31
  throw new Error('A propriedade "field" é obrigatória em VColumn.');
32
- if (!d.header)
32
+ if (!i.header)
33
33
  throw new Error('A propriedade "header" é obrigatória em VColumn.');
34
- if (d.field !== null && !z.includes(d.type))
35
- throw new Error(`O tipo "${d.type}" não é suportado em VColumn. Tipos suportados: text, img, date, html.`);
36
- if (d.limite_text) {
37
- if (d.type !== "text")
34
+ if (i.field !== null && !z.includes(i.type))
35
+ throw new Error(`O tipo "${i.type}" não é suportado em VColumn. Tipos suportados: text, img, date, html.`);
36
+ if (i.limite_text) {
37
+ if (i.type !== "text")
38
38
  throw new Error('A propriedade "limite_text" só pode ser usada quando o tipo for "text".');
39
- if (typeof d.limite_text == "string" && isNaN(Number(d.limite_text)))
39
+ if (typeof i.limite_text == "string" && isNaN(Number(i.limite_text)))
40
40
  throw new Error('A propriedade "limite_text" deve ser um número quando for uma string.');
41
- if (isNaN(Number(d.limite_text)) || Number(d.limite_text) <= 0)
41
+ if (isNaN(Number(i.limite_text)) || Number(i.limite_text) <= 0)
42
42
  throw new Error('A propriedade "limite_text" deve ser um número maior que 0.');
43
43
  }
44
- C.addColumn({
45
- field: d.field,
46
- header: d.header,
47
- type: d.type,
48
- class_column: d.class_column,
49
- class_row: d.class_row,
50
- class_item: d.class_item,
51
- click: d.click,
52
- transform_function: d.transform_function,
53
- locked: d.locked,
54
- use_ordering: d.use_ordering,
55
- param_ordering: d.param_ordering,
56
- decreasing_value: d.decreasing_value,
57
- increasing_value: d.increasing_value,
58
- bodySlot: M.body,
59
- ...d.type === "text" && { limite_text: Number(d.limite_text) },
60
- ...d.type === "img" && { deactivate_img_preview: d.deactivate_img_preview },
61
- ...d.type === "date" && { format: d.format }
44
+ S.addColumn({
45
+ field: i.field,
46
+ header: i.header,
47
+ type: i.type,
48
+ class_column: i.class_column,
49
+ class_row: i.class_row,
50
+ class_item: i.class_item,
51
+ click: i.click,
52
+ transform_function: i.transform_function,
53
+ locked: i.locked,
54
+ use_ordering: i.use_ordering,
55
+ param_ordering: i.param_ordering,
56
+ decreasing_value: i.decreasing_value,
57
+ increasing_value: i.increasing_value,
58
+ bodySlot: C.body,
59
+ ...i.type === "text" && { limite_text: Number(i.limite_text) },
60
+ ...i.type === "img" && { deactivate_img_preview: i.deactivate_img_preview },
61
+ ...i.type === "date" && { format: i.format }
62
62
  });
63
- }), ($, A) => null;
63
+ }), ($, D) => null;
64
64
  }
65
- }), Oe = { class: "dropdown d-flex" }, He = {
65
+ }), He = { class: "dropdown d-flex" }, Pe = {
66
66
  key: 0,
67
67
  href: "#",
68
68
  class: "btn dropdown-toggle",
69
69
  "data-bs-toggle": "dropdown",
70
70
  title: "Pesquisas Prédefinidas"
71
- }, Le = { class: "input-icon" }, Pe = {
71
+ }, qe = { class: "input-icon" }, Le = ["placeholder"], Ue = {
72
72
  key: 1,
73
73
  class: "input-icon-addon"
74
- }, qe = {
74
+ }, Fe = {
75
75
  key: 1,
76
76
  class: "dropdown-menu"
77
- }, Ue = ["onClick"], Fe = ["onClick"], Ke = /* @__PURE__ */ Q({
77
+ }, Ke = ["onClick"], Ye = ["onClick"], Xe = /* @__PURE__ */ R({
78
78
  __name: "SearchDatatable",
79
79
  props: {
80
80
  search: {},
81
81
  filter: { default: "" },
82
82
  list_filter: { default: () => [] },
83
- item_use: { default: () => [1, 2] }
83
+ item_use: { default: () => [1, 2] },
84
+ placeholder_search: { default: "Buscar..." }
84
85
  },
85
86
  emits: ["update:search", "update:filter", "search"],
86
- setup(x, { emit: d }) {
87
- const M = x, C = d, z = b({
88
- get: () => M.search,
89
- set: (i) => C("update:search", i)
90
- }), $ = b({
91
- get: () => M.filter,
92
- set: (i) => C("update:filter", i)
87
+ setup(w, { emit: i }) {
88
+ const C = w, S = i, z = M({
89
+ get: () => C.search,
90
+ set: (c) => S("update:search", c)
91
+ }), $ = M({
92
+ get: () => C.filter,
93
+ set: (c) => S("update:filter", c)
93
94
  });
94
- L($, () => {
95
- C("search");
96
- }), L(
97
- () => M.list_filter,
98
- (i) => {
99
- Array.isArray(i) ? (i.forEach((c, h) => {
100
- c?.type === 1 && !c.to && console.error(`Filtro na posição ${h} é do tipo 'router-link' mas não possui a propriedade 'to'.`);
101
- }), M.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.");
95
+ P($, () => {
96
+ S("search");
97
+ }), P(
98
+ () => C.list_filter,
99
+ (c) => {
100
+ Array.isArray(c) ? (c.forEach((d, h) => {
101
+ d?.type === 1 && !d.to && console.error(`Filtro na posição ${h} é do tipo 'router-link' mas não possui a propriedade 'to'.`);
102
+ }), C.item_use.includes(2) && c.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.");
102
103
  },
103
104
  { immediate: !0, deep: !0 }
104
105
  );
105
- function A(i) {
106
- $.value === i ? $.value = "" : $.value = i;
106
+ function D(c) {
107
+ $.value === c ? $.value = "" : $.value = c;
107
108
  }
108
109
  function I() {
109
- z.value = "", C("search");
110
+ z.value = "", S("search");
110
111
  }
111
- function o(i) {
112
- i.click && typeof i.click == "function" ? i.click() : console.error("O filtro selecionado não possui uma função de clique válida.");
112
+ function o(c) {
113
+ c.click && typeof c.click == "function" ? c.click() : console.error("O filtro selecionado não possui uma função de clique válida.");
113
114
  }
114
- return (i, c) => {
115
- const h = $e("router-link");
116
- return n(), l("div", Oe, [
117
- x.item_use.includes(2) ? (n(), l("a", He, [...c[3] || (c[3] = [
115
+ return (c, d) => {
116
+ const h = ze("router-link");
117
+ return s(), l("div", He, [
118
+ w.item_use.includes(2) ? (s(), l("a", Pe, [...d[3] || (d[3] = [
118
119
  t("svg", {
119
120
  xmlns: "http://www.w3.org/2000/svg",
120
121
  class: "icon icon-tabler icon-tabler-filter",
@@ -135,23 +136,23 @@ const oe = Symbol("v-datatable-key"), Kt = /* @__PURE__ */ Q({
135
136
  t("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" })
136
137
  ], -1)
137
138
  ])])) : g("", !0),
138
- t("div", Le, [
139
- se(t("input", {
139
+ t("div", qe, [
140
+ le(t("input", {
140
141
  type: "text",
141
142
  class: "form-control ms-1",
142
- id: "inputSearchLaudos",
143
- "onUpdate:modelValue": c[0] || (c[0] = (u) => z.value = u),
144
- onKeyup: c[1] || (c[1] = ze((u) => i.$emit("search"), ["enter"])),
145
- placeholder: "Buscar..."
146
- }, null, 544), [
147
- [le, z.value]
143
+ id: "inputSearchVDataTable",
144
+ "onUpdate:modelValue": d[0] || (d[0] = (u) => z.value = u),
145
+ onKeyup: d[1] || (d[1] = Ve((u) => c.$emit("search"), ["enter"])),
146
+ placeholder: w.placeholder_search
147
+ }, null, 40, Le), [
148
+ [re, z.value]
148
149
  ]),
149
- z.value ? (n(), l("span", {
150
+ z.value ? (s(), l("span", {
150
151
  key: 0,
151
- onClick: c[2] || (c[2] = (u) => I()),
152
+ onClick: d[2] || (d[2] = (u) => I()),
152
153
  class: "inputClose",
153
154
  title: "Limpar pesquisa"
154
- }, [...c[4] || (c[4] = [
155
+ }, [...d[4] || (d[4] = [
155
156
  t("svg", {
156
157
  xmlns: "http://www.w3.org/2000/svg",
157
158
  width: "24",
@@ -172,7 +173,7 @@ const oe = Symbol("v-datatable-key"), Kt = /* @__PURE__ */ Q({
172
173
  t("path", { d: "M18 6l-12 12" }),
173
174
  t("path", { d: "M6 6l12 12" })
174
175
  ], -1)
175
- ])])) : (n(), l("span", Pe, [...c[5] || (c[5] = [
176
+ ])])) : (s(), l("span", Ue, [...d[5] || (d[5] = [
176
177
  t("svg", {
177
178
  xmlns: "http://www.w3.org/2000/svg",
178
179
  width: "24",
@@ -195,9 +196,9 @@ const oe = Symbol("v-datatable-key"), Kt = /* @__PURE__ */ Q({
195
196
  ], -1)
196
197
  ])]))
197
198
  ]),
198
- x.item_use.includes(2) ? (n(), l("div", qe, [
199
- (n(!0), l(w, null, V(M.list_filter, (u, _) => (n(), l(w, { key: _ }, [
200
- "type" in u && u.type === 1 && (!("visible" in u) || u.visible) ? (n(), U(h, {
199
+ w.item_use.includes(2) ? (s(), l("div", Fe, [
200
+ (s(!0), l(x, null, V(C.list_filter, (u, T) => (s(), l(x, { key: T }, [
201
+ "type" in u && u.type === 1 && (!("visible" in u) || u.visible) ? (s(), U(h, {
201
202
  key: 0,
202
203
  to: u?.to,
203
204
  class: "dropdown-item cursor-pointer"
@@ -206,88 +207,88 @@ const oe = Symbol("v-datatable-key"), Kt = /* @__PURE__ */ Q({
206
207
  B(v(u.text), 1)
207
208
  ]),
208
209
  _: 2
209
- }, 1032, ["to"])) : (!("type" in u) || u.type === 2) && (!("visible" in u) || u.visible) ? (n(), l("a", {
210
+ }, 1032, ["to"])) : (!("type" in u) || u.type === 2) && (!("visible" in u) || u.visible) ? (s(), l("a", {
210
211
  key: 1,
211
- onClick: ae((S) => A(String(u.value)), ["prevent"]),
212
+ onClick: se((_) => D(String(u.value)), ["prevent"]),
212
213
  class: m(["dropdown-item cursor-pointer", $.value === u?.value ? "bg-info text-dark selected" : ""])
213
- }, v(u.text), 11, Ue)) : (!("type" in u) || u.type === 3) && (!("visible" in u) || u.visible) ? (n(), l("a", {
214
+ }, v(u.text), 11, Ke)) : (!("type" in u) || u.type === 3) && (!("visible" in u) || u.visible) ? (s(), l("a", {
214
215
  key: 2,
215
- onClick: ae((S) => o(u), ["prevent"]),
216
+ onClick: se((_) => o(u), ["prevent"]),
216
217
  class: m(["dropdown-item cursor-pointer", u?.active ? "bg-info text-dark selected" : ""])
217
- }, v(u.text), 11, Fe)) : g("", !0)
218
+ }, v(u.text), 11, Ye)) : g("", !0)
218
219
  ], 64))), 128))
219
220
  ])) : g("", !0)
220
221
  ]);
221
222
  };
222
223
  }
223
- }), Ye = /* @__PURE__ */ re(Ke, [["__scopeId", "data-v-dc655be7"]]);
224
- function Xe() {
225
- const x = y(!1), d = y(""), M = y(0), C = y(0), z = b(() => ({
224
+ }), Ge = /* @__PURE__ */ oe(Xe, [["__scopeId", "data-v-c7098e42"]]);
225
+ function We() {
226
+ const w = k(!1), i = k(""), C = k(0), S = k(0), z = M(() => ({
226
227
  position: "fixed",
227
228
  zIndex: 9999,
228
229
  pointerEvents: "none",
229
- top: `${C.value + 15}px`,
230
- left: `${M.value + 15}px`
230
+ top: `${S.value + 15}px`,
231
+ left: `${C.value + 15}px`
231
232
  }));
232
- function $(i) {
233
- const c = i.clientX, h = i.clientY, u = window.innerHeight, _ = 15, S = 300;
234
- let N = h + _;
235
- N + S > u && (N = h - S - _, N < 0 && (N = 0)), M.value = c, C.value = N;
233
+ function $(c) {
234
+ const d = c.clientX, h = c.clientY, u = window.innerHeight, T = 15, _ = 300;
235
+ let b = h + T;
236
+ b + _ > u && (b = h - _ - T, b < 0 && (b = 0)), C.value = d, S.value = b;
236
237
  }
237
- function A(i, c) {
238
- x.value = !0, d.value = c, $(i);
238
+ function D(c, d) {
239
+ w.value = !0, i.value = d, $(c);
239
240
  }
240
- function I(i) {
241
- x.value && $(i);
241
+ function I(c) {
242
+ w.value && $(c);
242
243
  }
243
244
  function o() {
244
- x.value = !1;
245
+ w.value = !1;
245
246
  }
246
247
  return {
247
- isHovering: x,
248
- previewSrc: d,
248
+ isHovering: w,
249
+ previewSrc: i,
249
250
  previewStyle: z,
250
- handleMouseOver: A,
251
+ handleMouseOver: D,
251
252
  handleMouseMove: I,
252
253
  handleMouseLeave: o
253
254
  };
254
255
  }
255
- const Ge = { class: "text-secondary" }, We = { class: "mx-2 d-inline-block" }, Je = {
256
+ const Je = { class: "text-secondary" }, Qe = { class: "mx-2 d-inline-block" }, Re = {
256
257
  key: 0,
257
258
  class: "alert alert-cyan d-flex justify-content-center align-items-center py-2",
258
259
  role: "alert"
259
- }, Qe = { class: "alert-title m-0" }, Re = { class: "badge bg-azure text-azure-fg" }, Ze = { key: 0 }, et = { key: 2 }, tt = {
260
+ }, Ze = { class: "alert-title m-0" }, et = { class: "badge bg-azure text-azure-fg" }, tt = { key: 0 }, at = { key: 2 }, st = {
260
261
  key: 5,
261
262
  class: "text-danger erro-custom-container"
262
- }, at = { class: "badge bg-orange text-white erro-custom-text" }, nt = { key: 0 }, st = { key: 2 }, lt = {
263
+ }, nt = { class: "badge bg-orange text-white erro-custom-text" }, lt = { key: 0 }, rt = { key: 2 }, ot = {
263
264
  key: 5,
264
265
  class: "text-danger erro-custom-container"
265
- }, rt = { class: "badge bg-orange text-white erro-custom-text" }, ot = ["colspan"], it = {
266
+ }, it = { class: "badge bg-orange text-white erro-custom-text" }, dt = ["colspan"], ut = {
266
267
  key: 0,
267
268
  class: "d-flex flex-column justify-content-center align-items-center",
268
269
  style: { height: "6rem" }
269
- }, dt = {
270
+ }, pt = {
270
271
  key: 1,
271
272
  style: { height: "3rem" }
272
- }, ut = {
273
+ }, ct = {
273
274
  key: 2,
274
275
  class: "p-3 text-center text-secondary"
275
- }, pt = {
276
+ }, mt = {
276
277
  key: 1,
277
278
  class: "feedback-container text-center"
278
- }, ct = {
279
+ }, vt = {
279
280
  key: 0,
280
281
  class: "text-secondary"
281
- }, mt = {
282
+ }, _t = {
282
283
  key: 1,
283
284
  class: "text-secondary"
284
- }, vt = {
285
+ }, ht = {
285
286
  key: 2,
286
287
  class: "table-responsive"
287
- }, _t = { key: 0 }, ht = {
288
+ }, ft = { key: 0 }, gt = {
288
289
  key: 0,
289
290
  class: "w-1"
290
- }, ft = { class: "header-ordering" }, gt = ["onClick"], kt = {
291
+ }, kt = { class: "header-ordering" }, yt = ["onClick"], wt = {
291
292
  key: 0,
292
293
  xmlns: "http://www.w3.org/2000/svg",
293
294
  width: "16",
@@ -298,7 +299,7 @@ const Ge = { class: "text-secondary" }, We = { class: "mx-2 d-inline-block" }, J
298
299
  "stroke-width": "2",
299
300
  "stroke-linecap": "round",
300
301
  "stroke-linejoin": "round"
301
- }, yt = {
302
+ }, bt = {
302
303
  key: 1,
303
304
  xmlns: "http://www.w3.org/2000/svg",
304
305
  width: "16",
@@ -309,7 +310,7 @@ const Ge = { class: "text-secondary" }, We = { class: "mx-2 d-inline-block" }, J
309
310
  "stroke-width": "2",
310
311
  "stroke-linecap": "round",
311
312
  "stroke-linejoin": "round"
312
- }, wt = {
313
+ }, xt = {
313
314
  key: 2,
314
315
  xmlns: "http://www.w3.org/2000/svg",
315
316
  width: "16",
@@ -320,7 +321,7 @@ const Ge = { class: "text-secondary" }, We = { class: "mx-2 d-inline-block" }, J
320
321
  "stroke-width": "2",
321
322
  "stroke-linecap": "round",
322
323
  "stroke-linejoin": "round"
323
- }, bt = { class: "header-ordering" }, xt = ["onClick"], Mt = {
324
+ }, Mt = { class: "header-ordering" }, Ct = ["onClick"], St = {
324
325
  key: 0,
325
326
  xmlns: "http://www.w3.org/2000/svg",
326
327
  width: "16",
@@ -331,7 +332,7 @@ const Ge = { class: "text-secondary" }, We = { class: "mx-2 d-inline-block" }, J
331
332
  "stroke-width": "2",
332
333
  "stroke-linecap": "round",
333
334
  "stroke-linejoin": "round"
334
- }, Ct = {
335
+ }, $t = {
335
336
  key: 1,
336
337
  xmlns: "http://www.w3.org/2000/svg",
337
338
  width: "16",
@@ -342,7 +343,7 @@ const Ge = { class: "text-secondary" }, We = { class: "mx-2 d-inline-block" }, J
342
343
  "stroke-width": "2",
343
344
  "stroke-linecap": "round",
344
345
  "stroke-linejoin": "round"
345
- }, St = {
346
+ }, zt = {
346
347
  key: 2,
347
348
  xmlns: "http://www.w3.org/2000/svg",
348
349
  width: "16",
@@ -353,16 +354,16 @@ const Ge = { class: "text-secondary" }, We = { class: "mx-2 d-inline-block" }, J
353
354
  "stroke-width": "2",
354
355
  "stroke-linecap": "round",
355
356
  "stroke-linejoin": "round"
356
- }, $t = {
357
+ }, Vt = {
357
358
  key: 0,
358
359
  class: "w-1"
359
- }, zt = ["checked", "onChange"], Vt = ["onClick"], Bt = ["onClick"], Nt = { key: 0 }, Tt = { key: 1 }, jt = ["onClick", "innerHTML"], At = ["onClick"], Dt = ["src"], Et = ["src"], It = {
360
+ }, Bt = ["checked", "onChange"], Nt = ["onClick"], Tt = ["onClick"], jt = { key: 0 }, Dt = { key: 1 }, At = ["onClick", "innerHTML"], Et = ["onClick"], It = ["src"], Ot = ["src"], Ht = {
360
361
  key: 5,
361
362
  class: "text-danger erro-custom-container"
362
- }, Ot = { class: "badge bg-orange text-white erro-custom-text" }, Ht = {
363
- key: 1,
363
+ }, Pt = { class: "badge bg-orange text-white erro-custom-text" }, qt = { key: 1 }, Lt = {
364
+ key: 2,
364
365
  class: "text-center p-4 text-secondary"
365
- }, Lt = ["src"], Pt = /* @__PURE__ */ Q({
366
+ }, Ut = ["src"], Ft = /* @__PURE__ */ R({
366
367
  __name: "VDataTable",
367
368
  props: {
368
369
  fetch: {},
@@ -394,17 +395,18 @@ const Ge = { class: "text-secondary" }, We = { class: "mx-2 d-inline-block" }, J
394
395
  limit_per_page: { default: 5 },
395
396
  page_starts_at: { default: 0 },
396
397
  deactivate_selected_info: { type: Boolean, default: !1 },
397
- immediate: { type: Boolean, default: !0 }
398
+ immediate: { type: Boolean, default: !0 },
399
+ placeholder_search: { default: "Buscar..." }
398
400
  },
399
- setup(x, { expose: d }) {
401
+ setup(w, { expose: i }) {
400
402
  const {
401
- isHovering: M,
402
- previewSrc: C,
403
+ isHovering: C,
404
+ previewSrc: S,
403
405
  previewStyle: z,
404
406
  handleMouseOver: $,
405
- handleMouseMove: A,
407
+ handleMouseMove: D,
406
408
  handleMouseLeave: I
407
- } = Xe(), o = x, i = y({}), c = y([]), h = y([]), u = y(0), _ = y([]), S = y(null), N = y(!1), F = y(null), p = y({
409
+ } = We(), o = w, c = k(!1), d = k({}), h = k([]), u = k([]), T = k(0), _ = k([]), b = k(null), F = k(!1), K = k(null), p = k({
408
410
  current_page: o.page_starts_at,
409
411
  // pagina atual
410
412
  count: 0,
@@ -415,158 +417,158 @@ const Ge = { class: "text-secondary" }, We = { class: "mx-2 d-inline-block" }, J
415
417
  // termo de busca
416
418
  filter: ""
417
419
  // filtro selecionado
418
- }), ie = b(() => (p.value.current_page = o.page_starts_at, o.endpoint)), { data: de, pending: ue, error: K, execute: pe, attempt: D } = o.fetch(ie, {
420
+ }), de = M(() => (p.value.current_page = o.page_starts_at, o.endpoint)), { data: ue, pending: pe, error: Y, execute: ce, attempt: A } = o.fetch(de, {
419
421
  params: () => o.deactivate_default_params ? o.add_params && typeof o.add_params == "function" ? {
420
422
  ...o.add_params(),
421
- ...P.value
423
+ ...q.value
422
424
  } : {
423
425
  ...o.add_params,
424
- ...P.value
426
+ ...q.value
425
427
  } : o.add_params && typeof o.add_params == "function" ? {
426
- ...G.value,
428
+ ...W.value,
427
429
  ...o.add_params(),
428
- ...P.value
430
+ ...q.value
429
431
  } : {
430
- ...G.value,
432
+ ...W.value,
431
433
  ...o.add_params,
432
- ...P.value
434
+ ...q.value
433
435
  },
434
436
  retry: o.retry_attempts,
435
437
  retryDelay: o.retry_delay,
436
438
  paramsReactives: !1,
437
439
  immediate: !1
438
- }, o.fetch_name), Y = b(
439
- () => c.value.filter((r) => r.locked)
440
- ), X = b({
440
+ }, o.fetch_name), X = M(
441
+ () => h.value.filter((r) => r.locked)
442
+ ), G = M({
441
443
  get() {
442
- return c.value.filter((r) => !r.locked);
444
+ return h.value.filter((r) => !r.locked);
443
445
  },
444
446
  set(r) {
445
- const e = Y.value;
446
- c.value = [...r, ...e];
447
+ const e = X.value;
448
+ h.value = [...r, ...e];
447
449
  }
448
- }), ce = b(() => [...X.value, ...Y.value]), me = b(() => {
450
+ }), me = M(() => [...G.value, ...X.value]), ve = M(() => {
449
451
  let r = [1];
450
452
  return o.list_filter.length > 0 && r.push(2), r;
451
- }), P = b(() => {
453
+ }), q = M(() => {
452
454
  const r = {};
453
- for (const e of c.value)
455
+ for (const e of h.value)
454
456
  if (e.use_ordering)
455
- if (i.value[e.header] === "increasing")
457
+ if (d.value[e.header] === "increasing")
456
458
  r[e.param_ordering] = e.increasing_value || "increasing";
457
- else if (i.value[e.header] === "decreasing")
459
+ else if (d.value[e.header] === "decreasing")
458
460
  r[e.param_ordering] = e.decreasing_value || "decreasing";
459
461
  else
460
462
  continue;
461
463
  else
462
464
  continue;
463
465
  return r;
464
- }), G = b(() => ({
466
+ }), W = M(() => ({
465
467
  [o.page_param_name]: p.value.current_page + 1,
466
468
  [o.page_size_param_name]: p.value.limit_per_page,
467
469
  [o.search_param_name]: p.value.search || "",
468
470
  [o.filter_param_name]: p.value.filter || ""
469
- })), ve = b(() => ue.value || N.value), q = (r) => {
471
+ })), _e = M(() => pe.value || F.value), L = (r) => {
470
472
  const e = o.item_key;
471
473
  return _.value.some((a) => a[e] === r[e]);
472
- }, R = b(() => {
473
- if (!h.value.length) return !1;
474
- const r = h.value.filter((e) => q(e)).length;
475
- return r === 0 ? !1 : r === h.value.length ? !0 : "indeterminate";
476
- }), _e = b(() => _.value.length > 0);
477
- L([R, S], ([r]) => {
478
- S.value && (r === "indeterminate" ? (S.value.checked = !1, S.value.indeterminate = !0) : (S.value.checked = r, S.value.indeterminate = !1));
474
+ }, Z = M(() => {
475
+ if (!u.value.length) return !1;
476
+ const r = u.value.filter((e) => L(e)).length;
477
+ return r === 0 ? !1 : r === u.value.length ? !0 : "indeterminate";
478
+ }), he = M(() => _.value.length > 0);
479
+ P([Z, b], ([r]) => {
480
+ b.value && (r === "indeterminate" ? (b.value.checked = !1, b.value.indeterminate = !0) : (b.value.checked = r, b.value.indeterminate = !1));
479
481
  }, {
480
482
  immediate: !0,
481
483
  flush: "post"
482
- }), L(de, (r) => {
483
- r ? (h.value = r[o.data_key] || [], u.value = r[o.total_key] || 0, p.value.count = u.value) : (h.value = [], u.value = 0);
484
+ }), P(ue, (r) => {
485
+ r ? (u.value = r[o.data_key] || [], T.value = r[o.total_key] || 0, p.value.count = T.value) : (u.value = [], T.value = 0);
484
486
  }, { immediate: !0 });
485
- function he() {
486
- const r = h.value;
487
+ function fe() {
488
+ const r = u.value;
487
489
  if (!r.length) return;
488
- const e = R.value;
490
+ const e = Z.value;
489
491
  if (e === !0 || e === "indeterminate") {
490
- const a = r.map((s) => s[o.item_key]);
492
+ const a = r.map((n) => n[o.item_key]);
491
493
  _.value = _.value.filter(
492
- (s) => !a.includes(s[o.item_key])
494
+ (n) => !a.includes(n[o.item_key])
493
495
  );
494
496
  } else
495
497
  r.forEach((a) => {
496
- q(a) || _.value.push(a);
498
+ L(a) || _.value.push(a);
497
499
  });
498
500
  }
499
- function fe(r) {
500
- const e = o.item_key, a = _.value.findIndex((s) => s[e] === r[e]);
501
+ function ge(r) {
502
+ const e = o.item_key, a = _.value.findIndex((n) => n[e] === r[e]);
501
503
  a > -1 ? _.value.splice(a, 1) : _.value.push(r);
502
504
  }
503
- function ge(r) {
504
- c.value.push(r);
505
+ function ke(r) {
506
+ h.value.push(r);
505
507
  }
506
- Ve(oe, { addColumn: ge });
508
+ Be(ie, { addColumn: ke });
507
509
  function E() {
508
- F.value && clearTimeout(F.value), N.value = !0, F.value = setTimeout(() => {
509
- N.value = !1;
510
- }, o.min_loading_delay), pe();
510
+ c.value || (c.value = !0), K.value && clearTimeout(K.value), F.value = !0, K.value = setTimeout(() => {
511
+ F.value = !1;
512
+ }, o.min_loading_delay), ce();
511
513
  }
512
- function T() {
514
+ function N() {
513
515
  p.value.current_page = o.page_starts_at, E();
514
516
  }
515
- const Z = (r) => {
517
+ const ee = (r) => {
516
518
  const e = r.target, a = parseInt(e.value, 10);
517
- a > 0 && (p.value.limit_per_page = a, p.value.limit_per_page = a, T());
519
+ a > 0 && (p.value.limit_per_page = a, p.value.limit_per_page = a, N());
518
520
  };
519
521
  function j(r, e, a = null) {
520
522
  if (!r) return e;
521
- const s = r.split(".");
522
- let k = e;
523
- for (const W of s)
524
- k && typeof k == "object" && W in k ? k = k[W] : console.error(`Caminho inválido ou valor nulo em: ${r} na parte ${W}`);
525
- return a && (k = a(k)), k;
523
+ const n = r.split(".");
524
+ let y = e;
525
+ for (const J of n)
526
+ y && typeof y == "object" && J in y ? y = y[J] : console.error(`Caminho inválido ou valor nulo em: ${r} na parte ${J}`);
527
+ return a && (y = a(y)), y;
526
528
  }
527
- function ke(r, e) {
529
+ function ye(r, e) {
528
530
  return e && typeof e == "number" && e > 0 && typeof r == "string" && r.length > e ? r.substring(0, e) + "..." : r;
529
531
  }
530
- function ee(r) {
531
- for (const a in i.value)
532
- a !== r && (i.value[a] = "none");
533
- const e = i.value[r] || "none";
534
- e === "none" ? i.value[r] = "increasing" : e === "increasing" ? i.value[r] = "decreasing" : i.value[r] = "none", T();
535
- }
536
- function ye(r) {
537
- r > 0 ? (p.value.limit_per_page = r, T()) : console.warn("O limite deve ser um número maior que zero.");
532
+ function te(r) {
533
+ for (const a in d.value)
534
+ a !== r && (d.value[a] = "none");
535
+ const e = d.value[r] || "none";
536
+ e === "none" ? d.value[r] = "increasing" : e === "increasing" ? d.value[r] = "decreasing" : d.value[r] = "none", N();
538
537
  }
539
538
  function we(r) {
540
- p.value.search = r, T();
539
+ r > 0 ? (p.value.limit_per_page = r, N()) : console.warn("O limite deve ser um número maior que zero.");
541
540
  }
542
541
  function be(r) {
543
- p.value.filter = r, T();
542
+ p.value.search = r, N();
544
543
  }
545
544
  function xe(r) {
545
+ p.value.filter = r, N();
546
+ }
547
+ function Me(r) {
546
548
  r >= 0 && r <= Math.ceil(p.value.count / p.value.limit_per_page) ? (p.value.current_page = r, E()) : console.warn("Número de página inválido.");
547
549
  }
548
- d({
550
+ i({
549
551
  execute: E,
550
- reSearch: T,
551
- pagination: Be(p),
552
- set_limit_per_page: ye,
553
- set_search: we,
554
- set_filter: be,
555
- set_page: xe,
556
- default_params: G,
552
+ reSearch: N,
553
+ pagination: Ne(p),
554
+ set_limit_per_page: we,
555
+ set_search: be,
556
+ set_filter: xe,
557
+ set_page: Me,
558
+ default_params: W,
557
559
  selected_items: _,
558
- atLeastOneSelected: _e
560
+ atLeastOneSelected: he
559
561
  });
560
- const te = y(!1);
561
- return L(
562
+ const ae = k(!1);
563
+ return P(
562
564
  () => o.add_params,
563
565
  () => {
564
- te.value ? T() : (te.value = !0, Ne(() => {
565
- T();
566
+ ae.value ? N() : (ae.value = !0, Te(() => {
567
+ N();
566
568
  }));
567
569
  },
568
570
  { deep: !0, immediate: o.immediate }
569
- ), (r, e) => (n(), l("div", null, [
571
+ ), (r, e) => (s(), l("div", null, [
570
572
  t("div", {
571
573
  class: m(["", o.class_container])
572
574
  }, [
@@ -578,15 +580,15 @@ const Ge = { class: "text-secondary" }, We = { class: "mx-2 d-inline-block" }, J
578
580
  class: m([o.class_filters, "d-flex justify-content-between align-items-start"])
579
581
  }, [
580
582
  O(r.$slots, "pageSize", {
581
- changePageSize: Z,
583
+ changePageSize: ee,
582
584
  limit_per_page: p.value.limit_per_page
583
585
  }, () => [
584
- t("div", Ge, [
586
+ t("div", Je, [
585
587
  B(v(o.first_text_page_size) + " ", 1),
586
- t("div", We, [
587
- se(t("input", {
588
+ t("div", Qe, [
589
+ le(t("input", {
588
590
  class: "form-control form-control-sm",
589
- onChange: Z,
591
+ onChange: ee,
590
592
  "onUpdate:modelValue": e[0] || (e[0] = (a) => p.value.limit_per_page = a),
591
593
  min: "1",
592
594
  size: "3",
@@ -594,7 +596,7 @@ const Ge = { class: "text-secondary" }, We = { class: "mx-2 d-inline-block" }, J
594
596
  type: "number"
595
597
  }, null, 544), [
596
598
  [
597
- le,
599
+ re,
598
600
  p.value.limit_per_page,
599
601
  void 0,
600
602
  { lazy: !0 }
@@ -605,121 +607,122 @@ const Ge = { class: "text-secondary" }, We = { class: "mx-2 d-inline-block" }, J
605
607
  ])
606
608
  ], !0),
607
609
  O(r.$slots, "fieldMiddle", {}, void 0, !0),
608
- J(Ye, {
610
+ Q(Ge, {
609
611
  search: p.value.search,
610
612
  "onUpdate:search": e[1] || (e[1] = (a) => p.value.search = a),
611
613
  filter: p.value.filter,
612
614
  "onUpdate:filter": e[2] || (e[2] = (a) => p.value.filter = a),
613
615
  list_filter: o.list_filter,
614
- item_use: me.value,
615
- onSearch: T
616
- }, null, 8, ["search", "filter", "list_filter", "item_use"])
616
+ item_use: ve.value,
617
+ onSearch: N,
618
+ placeholder_search: o.placeholder_search
619
+ }, null, 8, ["search", "filter", "list_filter", "item_use", "placeholder_search"])
617
620
  ], 2),
618
621
  O(r.$slots, "item-selected-info", {
619
622
  selected_items: _.value,
620
623
  clearSelection: () => _.value = []
621
624
  }, () => [
622
- o.use_checkbox && _.value.length > 0 && !o.deactivate_selected_info ? (n(), l("div", Je, [
623
- t("h4", Qe, [
625
+ o.use_checkbox && _.value.length > 0 && !o.deactivate_selected_info ? (s(), l("div", Re, [
626
+ t("h4", Ze, [
624
627
  e[5] || (e[5] = t("strong", null, "Itens Selecionados:", -1)),
625
628
  e[6] || (e[6] = B()),
626
- t("span", Re, v(_.value.length), 1)
629
+ t("span", et, v(_.value.length), 1)
627
630
  ]),
628
631
  t("a", {
629
632
  class: "cursor-pointer",
630
633
  onClick: e[3] || (e[3] = (a) => _.value = [])
631
634
  }, [...e[7] || (e[7] = [
632
- Te('<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-4d91e291><path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-4d91e291></path><path d="M4 7l16 0" data-v-4d91e291></path><path d="M10 11l0 6" data-v-4d91e291></path><path d="M14 11l0 6" data-v-4d91e291></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12" data-v-4d91e291></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3" data-v-4d91e291></path></svg> Limpar Seleção', 2)
635
+ je('<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-e5706981><path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-e5706981></path><path d="M4 7l16 0" data-v-e5706981></path><path d="M10 11l0 6" data-v-e5706981></path><path d="M14 11l0 6" data-v-e5706981></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12" data-v-e5706981></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3" data-v-e5706981></path></svg> Limpar Seleção', 2)
633
636
  ])])
634
637
  ])) : g("", !0)
635
638
  ], !0),
636
- ve.value ? (n(), l(w, { key: 0 }, [
637
- o.custom_loading ? (n(), U(ne(o.custom_loading), { key: 0 })) : (n(), l("table", {
639
+ _e.value ? (s(), l(x, { key: 0 }, [
640
+ o.custom_loading ? (s(), U(ne(o.custom_loading), { key: 0 })) : (s(), l("table", {
638
641
  key: 1,
639
642
  class: m(["table table-vcenter table-selectable", o.class_table])
640
643
  }, [
641
644
  t("thead", null, [
642
645
  t("tr", null, [
643
- (n(!0), l(w, null, V(c.value, (a) => (n(), l("th", {
646
+ (s(!0), l(x, null, V(h.value, (a) => (s(), l("th", {
644
647
  key: a.field || a.header,
645
648
  class: m(a.class_column)
646
649
  }, v(a.header), 3))), 128))
647
650
  ])
648
651
  ]),
649
652
  t("tbody", null, [
650
- o.type_loading === "placeholder" ? (n(!0), l(w, { key: 0 }, V(p.value.limit_per_page, (a) => (n(), l("tr", {
653
+ o.type_loading === "placeholder" ? (s(!0), l(x, { key: 0 }, V(p.value.limit_per_page, (a) => (s(), l("tr", {
651
654
  key: "placeholder-" + a,
652
655
  class: "placeholder-glow"
653
656
  }, [
654
- (n(!0), l(w, null, V(c.value, (s) => (n(), l("td", {
655
- key: s.field || s.header,
656
- class: m(s.class_row)
657
+ (s(!0), l(x, null, V(h.value, (n) => (s(), l("td", {
658
+ key: n.field || n.header,
659
+ class: m(n.class_row)
657
660
  }, [
658
- s.bodySlot ? (n(), l("span", Ze, [...e[8] || (e[8] = [
661
+ n.bodySlot ? (s(), l("span", tt, [...e[8] || (e[8] = [
659
662
  t("span", { class: "placeholder col-8" }, null, -1)
660
- ])])) : s.type === "text" ? (n(), l("span", {
663
+ ])])) : n.type === "text" ? (s(), l("span", {
661
664
  key: 1,
662
- class: m(s.class_item)
665
+ class: m(n.class_item)
663
666
  }, [...e[9] || (e[9] = [
664
667
  t("span", { class: "placeholder col-8" }, null, -1)
665
- ])], 2)) : s.type === "date" ? (n(), l("span", et, [...e[10] || (e[10] = [
668
+ ])], 2)) : n.type === "date" ? (s(), l("span", at, [...e[10] || (e[10] = [
666
669
  t("span", { class: "placeholder col-9" }, null, -1)
667
- ])])) : s.type === "html" ? (n(), l("div", {
670
+ ])])) : n.type === "html" ? (s(), l("div", {
668
671
  key: 3,
669
- class: m(s.class_item)
672
+ class: m(n.class_item)
670
673
  }, [...e[11] || (e[11] = [
671
674
  t("div", { class: "placeholder col-12" }, null, -1)
672
- ])], 2)) : s.type === "img" ? (n(), l("div", {
675
+ ])], 2)) : n.type === "img" ? (s(), l("div", {
673
676
  key: 4,
674
- class: m(s.class_item)
677
+ class: m(n.class_item)
675
678
  }, [...e[12] || (e[12] = [
676
679
  t("div", { class: "placeholder placeholder-img" }, null, -1)
677
- ])], 2)) : (n(), l("span", tt, [
680
+ ])], 2)) : (s(), l("span", st, [
678
681
  e[13] || (e[13] = B("tipo ", -1)),
679
- t("span", at, v(s.type), 1),
682
+ t("span", nt, v(n.type), 1),
680
683
  e[14] || (e[14] = B(" não suportado ", -1))
681
684
  ]))
682
685
  ], 2))), 128))
683
- ]))), 128)) : o.type_loading === "spiner-table" ? (n(!0), l(w, { key: 1 }, V(p.value.limit_per_page, (a) => (n(), l("tr", {
686
+ ]))), 128)) : o.type_loading === "spiner-table" ? (s(!0), l(x, { key: 1 }, V(p.value.limit_per_page, (a) => (s(), l("tr", {
684
687
  key: "placeholder-" + a
685
688
  }, [
686
- (n(!0), l(w, null, V(c.value, (s) => (n(), l("td", {
687
- key: s.field || s.header,
688
- class: m(s.class_row)
689
+ (s(!0), l(x, null, V(h.value, (n) => (s(), l("td", {
690
+ key: n.field || n.header,
691
+ class: m(n.class_row)
689
692
  }, [
690
- s.bodySlot ? (n(), l("span", nt, [...e[15] || (e[15] = [
693
+ n.bodySlot ? (s(), l("span", lt, [...e[15] || (e[15] = [
691
694
  t("span", {
692
695
  class: "spinner-border spinner-border-sm",
693
696
  role: "status",
694
697
  "aria-hidden": "true"
695
698
  }, null, -1)
696
- ])])) : s.type === "text" ? (n(), l("span", {
699
+ ])])) : n.type === "text" ? (s(), l("span", {
697
700
  key: 1,
698
- class: m(s.class_item)
701
+ class: m(n.class_item)
699
702
  }, [...e[16] || (e[16] = [
700
703
  t("span", {
701
704
  class: "spinner-border spinner-border-sm",
702
705
  role: "status",
703
706
  "aria-hidden": "true"
704
707
  }, null, -1)
705
- ])], 2)) : s.type === "date" ? (n(), l("span", st, [...e[17] || (e[17] = [
708
+ ])], 2)) : n.type === "date" ? (s(), l("span", rt, [...e[17] || (e[17] = [
706
709
  t("span", {
707
710
  class: "spinner-border spinner-border-sm",
708
711
  role: "status",
709
712
  "aria-hidden": "true"
710
713
  }, null, -1)
711
- ])])) : s.type === "html" ? (n(), l("div", {
714
+ ])])) : n.type === "html" ? (s(), l("div", {
712
715
  key: 3,
713
- class: m(s.class_item)
716
+ class: m(n.class_item)
714
717
  }, [...e[18] || (e[18] = [
715
718
  t("span", {
716
719
  class: "spinner-border spinner-border-sm",
717
720
  role: "status",
718
721
  "aria-hidden": "true"
719
722
  }, null, -1)
720
- ])], 2)) : s.type === "img" ? (n(), l("div", {
723
+ ])], 2)) : n.type === "img" ? (s(), l("div", {
721
724
  key: 4,
722
- class: m(["", s.class_item])
725
+ class: m(["", n.class_item])
723
726
  }, [...e[19] || (e[19] = [
724
727
  t("span", { class: "placeholder-img d-flex justify-content-center align-items-center" }, [
725
728
  t("span", {
@@ -728,47 +731,47 @@ const Ge = { class: "text-secondary" }, We = { class: "mx-2 d-inline-block" }, J
728
731
  "aria-hidden": "true"
729
732
  })
730
733
  ], -1)
731
- ])], 2)) : (n(), l("span", lt, [
734
+ ])], 2)) : (s(), l("span", ot, [
732
735
  e[20] || (e[20] = B("tipo ", -1)),
733
- t("span", rt, v(s.type), 1),
736
+ t("span", it, v(n.type), 1),
734
737
  e[21] || (e[21] = B(" não suportado ", -1))
735
738
  ]))
736
739
  ], 2))), 128))
737
- ]))), 128)) : o.type_loading === "spiner" ? (n(!0), l(w, { key: 2 }, V(p.value.limit_per_page, (a) => (n(), l("tr", { key: a }, [
740
+ ]))), 128)) : o.type_loading === "spiner" ? (s(!0), l(x, { key: 2 }, V(p.value.limit_per_page, (a) => (s(), l("tr", { key: a }, [
738
741
  t("td", {
739
- colspan: c.value.length,
742
+ colspan: h.value.length,
740
743
  class: "text-center p-0",
741
744
  style: { "border-bottom": "none" }
742
745
  }, [
743
- a === Math.floor(p.value.limit_per_page / 2) + 1 ? (n(), l("div", it, [...e[22] || (e[22] = [
746
+ a === Math.floor(p.value.limit_per_page / 2) + 1 ? (s(), l("div", ut, [...e[22] || (e[22] = [
744
747
  t("div", {
745
748
  class: "spinner-border",
746
749
  style: { width: "3rem", height: "3rem" },
747
750
  role: "status"
748
751
  }, null, -1),
749
752
  t("span", { class: "mt-2" }, "Carregando...", -1)
750
- ])])) : (n(), l("div", dt))
751
- ], 8, ot)
753
+ ])])) : (s(), l("div", pt))
754
+ ], 8, dt)
752
755
  ]))), 128)) : g("", !0)
753
756
  ])
754
757
  ], 2)),
755
- f(D) && f(D).current > 1 ? (n(), l("div", ut, " A conexão falhou. Tentando novamente... (Tentativa " + v(f(D).current) + " de " + v(f(D).total) + ") ", 1)) : g("", !0)
756
- ], 64)) : f(K) ? (n(), l("div", pt, [
758
+ f(A) && f(A).current > 1 ? (s(), l("div", ct, " A conexão falhou. Tentando novamente... (Tentativa " + v(f(A).current) + " de " + v(f(A).total) + ") ", 1)) : g("", !0)
759
+ ], 64)) : f(Y) ? (s(), l("div", mt, [
757
760
  e[23] || (e[23] = t("h4", { class: "text-danger" }, "Ocorreu um Erro", -1)),
758
- f(D) ? (n(), l("p", ct, " Não foi possível carregar os dados após " + v(f(D).total) + " tentativa(s). ", 1)) : (n(), l("p", mt, " Não foi possível carregar os dados. Verifique sua conexão. ")),
761
+ f(A) ? (s(), l("p", vt, " Não foi possível carregar os dados após " + v(f(A).total) + " tentativa(s). ", 1)) : (s(), l("p", _t, " Não foi possível carregar os dados. Verifique sua conexão. ")),
759
762
  t("button", {
760
763
  class: "btn btn-primary mt-2",
761
764
  onClick: E
762
765
  }, " Tentar Novamente ")
763
- ])) : h.value ? (n(), l("div", vt, [
764
- h.value.length > 0 ? (n(), l("div", _t, [
766
+ ])) : u.value ? (s(), l("div", ht, [
767
+ u.value.length > 0 ? (s(), l("div", ft, [
765
768
  t("table", {
766
769
  class: m(["table table-vcenter table-selectable", o.class_table])
767
770
  }, [
768
771
  t("thead", null, [
769
- J(f(Ie), {
770
- modelValue: X.value,
771
- "onUpdate:modelValue": e[4] || (e[4] = (a) => X.value = a),
772
+ Q(f(Oe), {
773
+ modelValue: G.value,
774
+ "onUpdate:modelValue": e[4] || (e[4] = (a) => G.value = a),
772
775
  tag: "tr",
773
776
  "item-key": "header",
774
777
  animation: 400,
@@ -776,92 +779,92 @@ const Ge = { class: "text-secondary" }, We = { class: "mx-2 d-inline-block" }, J
776
779
  "drag-class": "dragging-item"
777
780
  }, {
778
781
  header: H(() => [
779
- o.use_checkbox ? (n(), l("th", ht, [
782
+ o.use_checkbox ? (s(), l("th", gt, [
780
783
  t("input", {
781
784
  class: "form-check-input m-0",
782
785
  type: "checkbox",
783
786
  ref_key: "selectAllCheckbox",
784
- ref: S,
785
- onChange: he,
787
+ ref: b,
788
+ onChange: fe,
786
789
  "aria-label": "Selecionar todos os itens na página"
787
790
  }, null, 544)
788
791
  ])) : g("", !0)
789
792
  ]),
790
793
  item: H(({ element: a }) => [
791
- a.use_ordering ? (n(), l("th", {
794
+ a.use_ordering ? (s(), l("th", {
792
795
  key: 0,
793
796
  class: m(["header-draggable", a.class_column])
794
797
  }, [
795
- t("div", ft, [
798
+ t("div", kt, [
796
799
  t("span", null, v(a.header), 1),
797
800
  t("span", {
798
- onClick: () => ee(a.header),
801
+ onClick: () => te(a.header),
799
802
  class: "ms-2 cursor-pointer"
800
803
  }, [
801
- !i.value[a.header] || i.value[a.header] === "none" ? (n(), l("svg", kt, [...e[24] || (e[24] = [
804
+ !d.value[a.header] || d.value[a.header] === "none" ? (s(), l("svg", wt, [...e[24] || (e[24] = [
802
805
  t("path", { d: "m3 8 4-4 4 4" }, null, -1),
803
806
  t("path", { d: "m11 16-4 4-4-4" }, null, -1),
804
807
  t("path", { d: "M7 4v16" }, null, -1),
805
808
  t("path", { d: "M15 8h6" }, null, -1),
806
809
  t("path", { d: "M15 16h6" }, null, -1),
807
810
  t("path", { d: "M13 12h8" }, null, -1)
808
- ])])) : i.value[a.header] === "decreasing" ? (n(), l("svg", yt, [...e[25] || (e[25] = [
811
+ ])])) : d.value[a.header] === "decreasing" ? (s(), l("svg", bt, [...e[25] || (e[25] = [
809
812
  t("path", { d: "m3 16 4 4 4-4" }, null, -1),
810
813
  t("path", { d: "M7 20V4" }, null, -1),
811
814
  t("path", { d: "M11 4h10" }, null, -1),
812
815
  t("path", { d: "M11 8h7" }, null, -1),
813
816
  t("path", { d: "M11 12h4" }, null, -1)
814
- ])])) : i.value[a.header] === "increasing" ? (n(), l("svg", wt, [...e[26] || (e[26] = [
817
+ ])])) : d.value[a.header] === "increasing" ? (s(), l("svg", xt, [...e[26] || (e[26] = [
815
818
  t("path", { d: "m3 8 4-4 4 4" }, null, -1),
816
819
  t("path", { d: "M7 4v16" }, null, -1),
817
820
  t("path", { d: "M11 12h4" }, null, -1),
818
821
  t("path", { d: "M11 16h7" }, null, -1),
819
822
  t("path", { d: "M11 20h10" }, null, -1)
820
823
  ])])) : g("", !0)
821
- ], 8, gt)
824
+ ], 8, yt)
822
825
  ])
823
- ], 2)) : (n(), l("th", {
826
+ ], 2)) : (s(), l("th", {
824
827
  key: 1,
825
828
  class: m(["header-draggable", a.class_column])
826
829
  }, v(a.header), 3))
827
830
  ]),
828
831
  footer: H(() => [
829
- (n(!0), l(w, null, V(Y.value, (a) => (n(), l(w, {
832
+ (s(!0), l(x, null, V(X.value, (a) => (s(), l(x, {
830
833
  key: a.field || a.header
831
834
  }, [
832
- a.use_ordering ? (n(), l("th", {
835
+ a.use_ordering ? (s(), l("th", {
833
836
  key: 0,
834
837
  class: m(["header-locked header-ordering", a.class_column])
835
838
  }, [
836
- t("div", bt, [
839
+ t("div", Mt, [
837
840
  t("span", null, v(a.header), 1),
838
841
  t("span", {
839
- onClick: () => ee(a.header),
842
+ onClick: () => te(a.header),
840
843
  class: "ms-2 cursor-pointer"
841
844
  }, [
842
- !i.value[a.header] || i.value[a.header] === "none" ? (n(), l("svg", Mt, [...e[27] || (e[27] = [
845
+ !d.value[a.header] || d.value[a.header] === "none" ? (s(), l("svg", St, [...e[27] || (e[27] = [
843
846
  t("path", { d: "m3 8 4-4 4 4" }, null, -1),
844
847
  t("path", { d: "m11 16-4 4-4-4" }, null, -1),
845
848
  t("path", { d: "M7 4v16" }, null, -1),
846
849
  t("path", { d: "M15 8h6" }, null, -1),
847
850
  t("path", { d: "M15 16h6" }, null, -1),
848
851
  t("path", { d: "M13 12h8" }, null, -1)
849
- ])])) : i.value[a.header] === "decreasing" ? (n(), l("svg", Ct, [...e[28] || (e[28] = [
852
+ ])])) : d.value[a.header] === "decreasing" ? (s(), l("svg", $t, [...e[28] || (e[28] = [
850
853
  t("path", { d: "m3 16 4 4 4-4" }, null, -1),
851
854
  t("path", { d: "M7 20V4" }, null, -1),
852
855
  t("path", { d: "M11 4h10" }, null, -1),
853
856
  t("path", { d: "M11 8h7" }, null, -1),
854
857
  t("path", { d: "M11 12h4" }, null, -1)
855
- ])])) : i.value[a.header] === "increasing" ? (n(), l("svg", St, [...e[29] || (e[29] = [
858
+ ])])) : d.value[a.header] === "increasing" ? (s(), l("svg", zt, [...e[29] || (e[29] = [
856
859
  t("path", { d: "m3 8 4-4 4 4" }, null, -1),
857
860
  t("path", { d: "M7 4v16" }, null, -1),
858
861
  t("path", { d: "M11 12h4" }, null, -1),
859
862
  t("path", { d: "M11 16h7" }, null, -1),
860
863
  t("path", { d: "M11 20h10" }, null, -1)
861
864
  ])])) : g("", !0)
862
- ], 8, xt)
865
+ ], 8, Ct)
863
866
  ])
864
- ], 2)) : (n(), l("th", {
867
+ ], 2)) : (s(), l("th", {
865
868
  key: 1,
866
869
  class: m(["header-locked", a.class_column])
867
870
  }, v(a.header), 3))
@@ -871,77 +874,77 @@ const Ge = { class: "text-secondary" }, We = { class: "mx-2 d-inline-block" }, J
871
874
  }, 8, ["modelValue"])
872
875
  ]),
873
876
  t("tbody", null, [
874
- (n(!0), l(w, null, V(h.value, (a) => (n(), U(je, {
877
+ (s(!0), l(x, null, V(u.value, (a) => (s(), U(De, {
875
878
  tag: "tr",
876
879
  key: a[o.item_key],
877
880
  name: "column-move"
878
881
  }, {
879
882
  default: H(() => [
880
- o.use_checkbox ? (n(), l("td", $t, [
883
+ o.use_checkbox ? (s(), l("td", Vt, [
881
884
  t("input", {
882
885
  class: "form-check-input m-0",
883
886
  type: "checkbox",
884
- checked: q(a),
885
- onChange: (s) => fe(a),
887
+ checked: L(a),
888
+ onChange: (n) => ge(a),
886
889
  "aria-label": "Selecionar este item"
887
- }, null, 40, zt)
890
+ }, null, 40, Bt)
888
891
  ])) : g("", !0),
889
- (n(!0), l(w, null, V(ce.value, (s) => (n(), l("td", {
890
- key: s.field || s.header,
891
- class: m(s.class_row)
892
+ (s(!0), l(x, null, V(me.value, (n) => (s(), l("td", {
893
+ key: n.field || n.header,
894
+ class: m(n.class_row)
892
895
  }, [
893
- s.bodySlot ? (n(), U(ne(s.bodySlot), {
896
+ n.bodySlot ? (s(), U(ne(n.bodySlot), {
894
897
  key: 0,
895
898
  item: a,
896
- "is-selected": q(a)
897
- }, null, 8, ["item", "is-selected"])) : s.type === "text" ? (n(), l("span", {
899
+ "is-selected": L(a)
900
+ }, null, 8, ["item", "is-selected"])) : n.type === "text" ? (s(), l("span", {
898
901
  key: 1,
899
- onClick: (k) => s.click ? s.click(a) : null,
900
- class: m(s.class_item + (s.click ? " cursor-pointer" : ""))
901
- }, v(ke(j(s.field, a, s.transform_function), s.limite_text ?? null)), 11, Vt)) : s.type === "date" ? (n(), l("span", {
902
+ onClick: (y) => n.click ? n.click(a) : null,
903
+ class: m(n.class_item + (n.click ? " cursor-pointer" : ""))
904
+ }, v(ye(j(n.field, a, n.transform_function), n.limite_text ?? null)), 11, Nt)) : n.type === "date" ? (s(), l("span", {
902
905
  key: 2,
903
- onClick: (k) => s.click ? s.click(a) : null,
904
- class: m(s.class_item + (s.click ? " cursor-pointer" : ""))
906
+ onClick: (y) => n.click ? n.click(a) : null,
907
+ class: m(n.class_item + (n.click ? " cursor-pointer" : ""))
905
908
  }, [
906
- s.format === "complete" ? (n(), l("span", Nt, v(new Date(j(s.field, a)).toLocaleString()), 1)) : g("", !0),
907
- s.format === "simple" ? (n(), l("span", Tt, v(new Date(j(
908
- s.field,
909
+ n.format === "complete" ? (s(), l("span", jt, v(new Date(j(n.field, a)).toLocaleString()), 1)) : g("", !0),
910
+ n.format === "simple" ? (s(), l("span", Dt, v(new Date(j(
911
+ n.field,
909
912
  a
910
913
  )).toLocaleDateString()), 1)) : g("", !0)
911
- ], 10, Bt)) : s.type === "html" ? (n(), l("div", {
914
+ ], 10, Tt)) : n.type === "html" ? (s(), l("div", {
912
915
  key: 3,
913
- onClick: (k) => s.click ? s.click(a) : null,
914
- class: m(s.class_item + (s.click ? " cursor-pointer" : "")),
915
- innerHTML: j(s.field, a)
916
- }, null, 10, jt)) : s.type === "img" ? (n(), l("div", {
916
+ onClick: (y) => n.click ? n.click(a) : null,
917
+ class: m(n.class_item + (n.click ? " cursor-pointer" : "")),
918
+ innerHTML: j(n.field, a)
919
+ }, null, 10, At)) : n.type === "img" ? (s(), l("div", {
917
920
  key: 4,
918
- onClick: (k) => s.click ? s.click(a) : null,
919
- class: m(s.class_item + (s.click ? " cursor-pointer" : ""))
921
+ onClick: (y) => n.click ? n.click(a) : null,
922
+ class: m(n.class_item + (n.click ? " cursor-pointer" : ""))
920
923
  }, [
921
- j(s.field, a) ? (n(), l("div", Ae({
924
+ j(n.field, a) ? (s(), l("div", Ae({
922
925
  key: 0,
923
926
  ref_for: !0
924
- }, s.deactivate_img_preview ? {
927
+ }, n.deactivate_img_preview ? {
925
928
  class: "container-img"
926
929
  } : {
927
- onMouseover: (k) => f($)(k, j(s.field, a)),
928
- onMousemove: f(A),
930
+ onMouseover: (y) => f($)(y, j(n.field, a)),
931
+ onMousemove: f(D),
929
932
  onMouseleave: f(I),
930
933
  class: "container-img container-img-preview"
931
934
  }), [
932
935
  t("img", {
933
936
  class: "img-tamanho",
934
- src: j(s.field, a)
935
- }, null, 8, Dt),
937
+ src: j(n.field, a)
938
+ }, null, 8, It),
936
939
  t("img", {
937
940
  class: "img-tamanho-cover",
938
- src: j(s.field, a)
939
- }, null, 8, Et),
941
+ src: j(n.field, a)
942
+ }, null, 8, Ot),
940
943
  e[30] || (e[30] = t("div", { class: "bg-img" }, null, -1))
941
944
  ], 16)) : g("", !0)
942
- ], 10, At)) : (n(), l("span", It, [
945
+ ], 10, Et)) : (s(), l("span", Ht, [
943
946
  e[31] || (e[31] = B("tipo ", -1)),
944
- t("span", Ot, v(s.type), 1),
947
+ t("span", Pt, v(n.type), 1),
945
948
  e[32] || (e[32] = B(" não suportado", -1))
946
949
  ]))
947
950
  ], 2))), 128))
@@ -950,7 +953,7 @@ const Ge = { class: "text-secondary" }, We = { class: "mx-2 d-inline-block" }, J
950
953
  }, 1024))), 128))
951
954
  ])
952
955
  ], 2)
953
- ])) : (n(), l("div", Ht, [...e[33] || (e[33] = [
956
+ ])) : c.value === !1 ? (s(), l("div", qt)) : (s(), l("div", Lt, [...e[33] || (e[33] = [
954
957
  t("p", { class: "m-0" }, "Nenhum item encontrado.", -1)
955
958
  ])]))
956
959
  ])) : g("", !0)
@@ -959,13 +962,13 @@ const Ge = { class: "text-secondary" }, We = { class: "mx-2 d-inline-block" }, J
959
962
  O(r.$slots, "pagination", {
960
963
  pagination: p.value,
961
964
  tradePage: E,
962
- error: f(K)
965
+ error: f(Y)
963
966
  }, () => [
964
- !f(K) && p.value.count > 0 ? (n(), l("div", {
967
+ !f(Y) && p.value.count > 0 ? (s(), l("div", {
965
968
  key: 0,
966
969
  class: m(["px-3", o.class_pagination])
967
970
  }, [
968
- J(Ee, {
971
+ Q(Ie, {
969
972
  page_starts_at: o.page_starts_at,
970
973
  filtering: !0,
971
974
  pagination: p.value,
@@ -973,21 +976,21 @@ const Ge = { class: "text-secondary" }, We = { class: "mx-2 d-inline-block" }, J
973
976
  }, null, 8, ["page_starts_at", "pagination"])
974
977
  ], 2)) : g("", !0)
975
978
  ], !0),
976
- f(M) ? (n(), l("div", {
979
+ f(C) ? (s(), l("div", {
977
980
  key: 0,
978
981
  class: "image-preview-container",
979
- style: De(f(z))
982
+ style: Ee(f(z))
980
983
  }, [
981
984
  t("img", {
982
- src: f(C),
985
+ src: f(S),
983
986
  alt: "Preview",
984
987
  class: "image-preview-large"
985
- }, null, 8, Lt)
988
+ }, null, 8, Ut)
986
989
  ], 4)) : g("", !0)
987
990
  ]));
988
991
  }
989
- }), Yt = /* @__PURE__ */ re(Pt, [["__scopeId", "data-v-4d91e291"]]);
992
+ }), Wt = /* @__PURE__ */ oe(Ft, [["__scopeId", "data-v-e5706981"]]);
990
993
  export {
991
- Kt as VColumn,
992
- Yt as VDataTable
994
+ Gt as VColumn,
995
+ Wt as VDataTable
993
996
  };