v-sistec-features 1.1.0 → 1.1.1

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