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