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.
package/dist/vDataTable.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
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(
|
|
17
|
-
const
|
|
18
|
-
if (!
|
|
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
|
|
21
|
-
return
|
|
22
|
-
if (
|
|
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 (!
|
|
24
|
+
if (!u.header)
|
|
25
25
|
throw new Error('A propriedade "header" é obrigatória em VColumn.');
|
|
26
|
-
if (
|
|
27
|
-
throw new Error(`O tipo "${
|
|
28
|
-
if (
|
|
29
|
-
if (
|
|
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
|
|
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(
|
|
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
|
-
|
|
37
|
-
field:
|
|
38
|
-
header:
|
|
39
|
-
type:
|
|
40
|
-
class_column:
|
|
41
|
-
class_row:
|
|
42
|
-
class_item:
|
|
43
|
-
transform_function:
|
|
44
|
-
bodySlot:
|
|
45
|
-
...
|
|
46
|
-
...
|
|
47
|
-
...
|
|
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
|
-
}), (
|
|
49
|
+
}), (C, A) => null;
|
|
50
50
|
}
|
|
51
|
-
}),
|
|
51
|
+
}), Ce = {
|
|
52
52
|
key: 0,
|
|
53
53
|
class: "d-flex align-items-center justify-content-between w-100"
|
|
54
|
-
},
|
|
54
|
+
}, Se = {
|
|
55
55
|
key: 0,
|
|
56
56
|
class: "d-flex align-items-center p-2 gap-2"
|
|
57
|
-
},
|
|
58
|
-
key:
|
|
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
|
-
},
|
|
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(
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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:
|
|
98
|
-
disabled:
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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:
|
|
124
|
-
disabled:
|
|
125
|
-
|
|
126
|
-
|
|
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
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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
|
-
|
|
211
|
-
|
|
212
|
-
onClick:
|
|
213
|
-
class: "btn btn-estilo",
|
|
214
|
-
disabled: !
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
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
|
-
])) :
|
|
264
|
-
])) :
|
|
154
|
+
])) : b("", !0)
|
|
155
|
+
])) : b("", !0);
|
|
265
156
|
}
|
|
266
|
-
}),
|
|
267
|
-
const
|
|
268
|
-
for (const [
|
|
269
|
-
|
|
270
|
-
return
|
|
271
|
-
},
|
|
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
|
-
},
|
|
168
|
+
}, Be = { class: "input-icon" }, Ie = {
|
|
278
169
|
key: 1,
|
|
279
170
|
class: "input-icon-addon"
|
|
280
|
-
},
|
|
171
|
+
}, Oe = {
|
|
281
172
|
key: 1,
|
|
282
173
|
class: "dropdown-menu"
|
|
283
|
-
},
|
|
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(
|
|
293
|
-
const
|
|
294
|
-
get: () =>
|
|
295
|
-
set: (
|
|
296
|
-
}),
|
|
297
|
-
get: () =>
|
|
298
|
-
set: (
|
|
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
|
-
|
|
301
|
-
|
|
302
|
-
}),
|
|
303
|
-
() =>
|
|
304
|
-
(
|
|
305
|
-
Array.isArray(
|
|
306
|
-
|
|
307
|
-
}),
|
|
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
|
|
312
|
-
|
|
202
|
+
function A(l) {
|
|
203
|
+
C.value === l ? C.value = "" : C.value = l;
|
|
313
204
|
}
|
|
314
|
-
function
|
|
315
|
-
|
|
205
|
+
function E() {
|
|
206
|
+
v.value = "", f("search");
|
|
316
207
|
}
|
|
317
|
-
return (
|
|
318
|
-
const
|
|
319
|
-
return
|
|
320
|
-
|
|
321
|
-
|
|
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
|
-
|
|
224
|
+
n("path", {
|
|
334
225
|
stroke: "none",
|
|
335
226
|
d: "M0 0h24v24H0z",
|
|
336
227
|
fill: "none"
|
|
337
228
|
}),
|
|
338
|
-
|
|
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
|
-
])])) :
|
|
341
|
-
|
|
342
|
-
|
|
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":
|
|
347
|
-
onKeyup:
|
|
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
|
-
[
|
|
241
|
+
[ne, v.value]
|
|
351
242
|
]),
|
|
352
|
-
|
|
243
|
+
v.value ? (t(), a("span", {
|
|
353
244
|
key: 0,
|
|
354
|
-
onClick:
|
|
245
|
+
onClick: d[2] || (d[2] = (c) => E()),
|
|
355
246
|
class: "inputClose",
|
|
356
247
|
title: "Limpar pesquisa"
|
|
357
|
-
}, [...
|
|
358
|
-
|
|
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
|
-
|
|
261
|
+
n("path", {
|
|
371
262
|
stroke: "none",
|
|
372
263
|
d: "M0 0h24v24H0z",
|
|
373
264
|
fill: "none"
|
|
374
265
|
}),
|
|
375
|
-
|
|
376
|
-
|
|
266
|
+
n("path", { d: "M18 6l-12 12" }),
|
|
267
|
+
n("path", { d: "M6 6l12 12" })
|
|
377
268
|
], -1)
|
|
378
|
-
])])) : (
|
|
379
|
-
|
|
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
|
-
|
|
282
|
+
n("path", {
|
|
392
283
|
stroke: "none",
|
|
393
284
|
d: "M0 0h24v24H0z",
|
|
394
285
|
fill: "none"
|
|
395
286
|
}),
|
|
396
|
-
|
|
397
|
-
|
|
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
|
-
|
|
402
|
-
(
|
|
403
|
-
"type" in
|
|
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:
|
|
296
|
+
to: c?.to,
|
|
406
297
|
class: "dropdown-item cursor-pointer"
|
|
407
298
|
}, {
|
|
408
|
-
default:
|
|
409
|
-
|
|
299
|
+
default: ye(() => [
|
|
300
|
+
N(g(c.text), 1)
|
|
410
301
|
]),
|
|
411
302
|
_: 2
|
|
412
|
-
}, 1032, ["to"])) : !("type" in
|
|
303
|
+
}, 1032, ["to"])) : !("type" in c) || c.type === 2 ? (t(), a("a", {
|
|
413
304
|
key: 1,
|
|
414
|
-
onClick:
|
|
415
|
-
class:
|
|
416
|
-
},
|
|
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
|
-
])) :
|
|
309
|
+
])) : b("", !0)
|
|
419
310
|
]);
|
|
420
311
|
};
|
|
421
312
|
}
|
|
422
|
-
}),
|
|
423
|
-
function
|
|
424
|
-
const
|
|
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: `${
|
|
429
|
-
left: `${
|
|
319
|
+
top: `${f.value + 15}px`,
|
|
320
|
+
left: `${o.value + 15}px`
|
|
430
321
|
}));
|
|
431
|
-
function
|
|
432
|
-
const
|
|
433
|
-
let
|
|
434
|
-
|
|
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
|
|
437
|
-
|
|
327
|
+
function A(d, k) {
|
|
328
|
+
y.value = !0, u.value = k, C(d);
|
|
438
329
|
}
|
|
439
|
-
function
|
|
440
|
-
|
|
330
|
+
function E(d) {
|
|
331
|
+
y.value && C(d);
|
|
441
332
|
}
|
|
442
|
-
function
|
|
443
|
-
|
|
333
|
+
function l() {
|
|
334
|
+
y.value = !1;
|
|
444
335
|
}
|
|
445
336
|
return {
|
|
446
|
-
isHovering:
|
|
447
|
-
previewSrc:
|
|
448
|
-
previewStyle:
|
|
449
|
-
handleMouseOver:
|
|
450
|
-
handleMouseMove:
|
|
451
|
-
handleMouseLeave:
|
|
337
|
+
isHovering: y,
|
|
338
|
+
previewSrc: u,
|
|
339
|
+
previewStyle: v,
|
|
340
|
+
handleMouseOver: A,
|
|
341
|
+
handleMouseMove: E,
|
|
342
|
+
handleMouseLeave: l
|
|
452
343
|
};
|
|
453
344
|
}
|
|
454
|
-
const
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
359
|
+
}, ot = {
|
|
469
360
|
key: 1,
|
|
470
361
|
style: { height: "3rem" }
|
|
471
|
-
},
|
|
362
|
+
}, it = {
|
|
472
363
|
key: 2,
|
|
473
364
|
class: "p-3 text-center text-secondary"
|
|
474
|
-
},
|
|
365
|
+
}, ut = {
|
|
475
366
|
key: 2,
|
|
476
367
|
class: "feedback-container text-center"
|
|
477
|
-
},
|
|
368
|
+
}, dt = {
|
|
478
369
|
key: 0,
|
|
479
370
|
class: "text-secondary"
|
|
480
|
-
},
|
|
371
|
+
}, ct = {
|
|
481
372
|
key: 1,
|
|
482
373
|
class: "text-secondary"
|
|
483
|
-
},
|
|
374
|
+
}, pt = {
|
|
484
375
|
key: 3,
|
|
485
376
|
class: "table-responsive"
|
|
486
|
-
},
|
|
377
|
+
}, mt = { key: 0 }, _t = {
|
|
487
378
|
key: 0,
|
|
488
379
|
class: "w-1"
|
|
489
|
-
},
|
|
380
|
+
}, ft = {
|
|
490
381
|
key: 0,
|
|
491
382
|
class: "w-1"
|
|
492
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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(
|
|
418
|
+
setup(y, { expose: u }) {
|
|
526
419
|
const {
|
|
527
|
-
isHovering:
|
|
528
|
-
previewSrc:
|
|
529
|
-
previewStyle:
|
|
530
|
-
handleMouseOver:
|
|
531
|
-
handleMouseMove:
|
|
532
|
-
handleMouseLeave:
|
|
533
|
-
} =
|
|
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:
|
|
545
|
-
params: () =>
|
|
546
|
-
...
|
|
547
|
-
} :
|
|
548
|
-
...
|
|
549
|
-
...
|
|
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
|
-
...
|
|
552
|
-
...
|
|
444
|
+
...Y.value,
|
|
445
|
+
...l.add_params
|
|
553
446
|
},
|
|
554
|
-
retry:
|
|
555
|
-
retryDelay:
|
|
447
|
+
retry: l.retry_attempts,
|
|
448
|
+
retryDelay: l.retry_delay,
|
|
556
449
|
paramsReactives: !1,
|
|
557
450
|
immediate: !1
|
|
558
|
-
},
|
|
559
|
-
let
|
|
560
|
-
return
|
|
561
|
-
}),
|
|
562
|
-
[
|
|
563
|
-
[
|
|
564
|
-
[
|
|
565
|
-
[
|
|
566
|
-
})),
|
|
567
|
-
const
|
|
568
|
-
return
|
|
569
|
-
},
|
|
570
|
-
if (!
|
|
571
|
-
const
|
|
572
|
-
return
|
|
573
|
-
}),
|
|
574
|
-
|
|
575
|
-
|
|
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
|
-
}),
|
|
580
|
-
|
|
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
|
|
583
|
-
const
|
|
584
|
-
if (!
|
|
585
|
-
const
|
|
586
|
-
if (
|
|
587
|
-
const
|
|
588
|
-
|
|
589
|
-
(s) => !
|
|
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
|
-
|
|
593
|
-
I(
|
|
485
|
+
i.forEach((r) => {
|
|
486
|
+
I(r) || m.value.push(r);
|
|
594
487
|
});
|
|
595
488
|
}
|
|
596
|
-
function
|
|
597
|
-
const
|
|
598
|
-
|
|
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
|
|
601
|
-
|
|
493
|
+
function pe(i) {
|
|
494
|
+
k.value.push(i);
|
|
602
495
|
}
|
|
603
|
-
|
|
604
|
-
function
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
},
|
|
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
|
|
610
|
-
|
|
502
|
+
function me() {
|
|
503
|
+
p.value.current_page = 0, L();
|
|
611
504
|
}
|
|
612
|
-
const
|
|
613
|
-
const
|
|
614
|
-
|
|
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
|
|
617
|
-
if (!
|
|
618
|
-
const s =
|
|
619
|
-
let
|
|
620
|
-
for (const
|
|
621
|
-
|
|
622
|
-
|
|
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
|
|
628
|
-
return
|
|
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
|
|
631
|
-
execute:
|
|
632
|
-
pagination:
|
|
633
|
-
default_params:
|
|
634
|
-
selected_items:
|
|
635
|
-
atLeastOneSelected:
|
|
636
|
-
}),
|
|
637
|
-
|
|
638
|
-
|
|
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
|
-
}), (
|
|
641
|
-
|
|
642
|
-
class:
|
|
530
|
+
}), (i, e) => (t(), a("div", null, [
|
|
531
|
+
n("div", {
|
|
532
|
+
class: _(["", l.class_container])
|
|
643
533
|
}, [
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
class:
|
|
534
|
+
O(i.$slots, "default", {}, void 0, !0),
|
|
535
|
+
n("div", {
|
|
536
|
+
class: _(["", l.class_content])
|
|
647
537
|
}, [
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
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
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
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
|
-
|
|
576
|
+
n("button", {
|
|
682
577
|
class: "btn btn-outline-danger ms-3 bold",
|
|
683
|
-
onClick:
|
|
578
|
+
onClick: e[3] || (e[3] = (r) => m.value = [])
|
|
684
579
|
}, "Limpar Seleção")
|
|
685
|
-
])) :
|
|
686
|
-
|
|
687
|
-
|
|
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:
|
|
584
|
+
class: _(["table table-vcenter table-selectable", l.class_table])
|
|
690
585
|
}, [
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
(
|
|
694
|
-
key:
|
|
695
|
-
class:
|
|
696
|
-
},
|
|
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
|
-
|
|
700
|
-
|
|
701
|
-
key: "placeholder-" +
|
|
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
|
-
(
|
|
599
|
+
(t(!0), a(M, null, P(k.value, (s) => (t(), a("td", {
|
|
705
600
|
key: s.field || s.header,
|
|
706
|
-
class:
|
|
601
|
+
class: _(s.class_row)
|
|
707
602
|
}, [
|
|
708
|
-
s.bodySlot ? (
|
|
709
|
-
|
|
710
|
-
])])) : s.type === "text" ? (
|
|
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:
|
|
713
|
-
}, [...
|
|
714
|
-
|
|
715
|
-
])], 2)) : s.type === "date" ? (
|
|
716
|
-
|
|
717
|
-
])])) : s.type === "html" ? (
|
|
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:
|
|
720
|
-
}, [...
|
|
721
|
-
|
|
722
|
-
])], 2)) : s.type === "img" ? (
|
|
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:
|
|
725
|
-
}, [...
|
|
726
|
-
|
|
727
|
-
])], 2)) : (
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
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)) :
|
|
734
|
-
key: "placeholder-" +
|
|
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
|
-
(
|
|
631
|
+
(t(!0), a(M, null, P(k.value, (s) => (t(), a("td", {
|
|
737
632
|
key: s.field || s.header,
|
|
738
|
-
class:
|
|
633
|
+
class: _(s.class_row)
|
|
739
634
|
}, [
|
|
740
|
-
s.bodySlot ? (
|
|
741
|
-
|
|
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" ? (
|
|
641
|
+
])])) : s.type === "text" ? (t(), a("span", {
|
|
747
642
|
key: 1,
|
|
748
|
-
class:
|
|
749
|
-
}, [...
|
|
750
|
-
|
|
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" ? (
|
|
756
|
-
|
|
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" ? (
|
|
656
|
+
])])) : s.type === "html" ? (t(), a("div", {
|
|
762
657
|
key: 3,
|
|
763
|
-
class:
|
|
764
|
-
}, [...
|
|
765
|
-
|
|
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" ? (
|
|
665
|
+
])], 2)) : s.type === "img" ? (t(), a("div", {
|
|
771
666
|
key: 4,
|
|
772
|
-
class:
|
|
773
|
-
}, [...
|
|
774
|
-
|
|
775
|
-
|
|
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)) : (
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
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)) :
|
|
788
|
-
|
|
789
|
-
colspan:
|
|
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
|
-
|
|
794
|
-
|
|
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
|
-
|
|
800
|
-
])])) : (
|
|
801
|
-
], 8,
|
|
802
|
-
]))), 128)) :
|
|
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
|
-
|
|
806
|
-
], 64)) :
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
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:
|
|
706
|
+
onClick: L
|
|
812
707
|
}, " Tentar Novamente ")
|
|
813
|
-
])) :
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
class:
|
|
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
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
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:
|
|
826
|
-
onChange:
|
|
720
|
+
ref: h,
|
|
721
|
+
onChange: de,
|
|
827
722
|
"aria-label": "Selecionar todos os itens na página"
|
|
828
723
|
}, null, 544)
|
|
829
|
-
])) :
|
|
830
|
-
(
|
|
831
|
-
key:
|
|
832
|
-
class:
|
|
833
|
-
},
|
|
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
|
-
|
|
837
|
-
(
|
|
838
|
-
key: l
|
|
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
|
-
|
|
841
|
-
|
|
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(
|
|
845
|
-
onChange: (s) =>
|
|
739
|
+
checked: I(r),
|
|
740
|
+
onChange: (s) => ce(r),
|
|
846
741
|
"aria-label": "Selecionar este item"
|
|
847
|
-
}, null, 40,
|
|
848
|
-
])) :
|
|
849
|
-
(
|
|
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:
|
|
746
|
+
class: _(s.class_row)
|
|
852
747
|
}, [
|
|
853
|
-
s.bodySlot ? (
|
|
748
|
+
s.bodySlot ? (t(), X(Z(s.bodySlot), {
|
|
854
749
|
key: 0,
|
|
855
|
-
item:
|
|
856
|
-
"is-selected": I(
|
|
857
|
-
}, null, 8, ["item", "is-selected"])) : s.type === "text" ? (
|
|
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:
|
|
860
|
-
},
|
|
861
|
-
s.format === "complete" ? (
|
|
862
|
-
s.format === "simple" ? (
|
|
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
|
-
|
|
865
|
-
)).toLocaleDateString()), 1)) :
|
|
866
|
-
])) : s.type === "html" ? (
|
|
759
|
+
r
|
|
760
|
+
)).toLocaleDateString()), 1)) : b("", !0)
|
|
761
|
+
])) : s.type === "html" ? (t(), a("div", {
|
|
867
762
|
key: 3,
|
|
868
|
-
class:
|
|
869
|
-
innerHTML:
|
|
870
|
-
}, null, 10,
|
|
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:
|
|
767
|
+
class: _(s.class_item)
|
|
873
768
|
}, [
|
|
874
|
-
|
|
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: (
|
|
881
|
-
onMousemove:
|
|
882
|
-
onMouseleave:
|
|
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
|
-
|
|
780
|
+
n("img", {
|
|
886
781
|
class: "img-tamanho",
|
|
887
|
-
src:
|
|
888
|
-
}, null, 8,
|
|
889
|
-
|
|
782
|
+
src: D(s.field, r)
|
|
783
|
+
}, null, 8, bt),
|
|
784
|
+
n("img", {
|
|
890
785
|
class: "img-tamanho-cover",
|
|
891
|
-
src:
|
|
892
|
-
}, null, 8,
|
|
893
|
-
|
|
894
|
-
], 16)) :
|
|
895
|
-
], 2)) : (
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
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
|
-
])) : (
|
|
905
|
-
|
|
799
|
+
])) : (t(), a("div", St, [...e[24] || (e[24] = [
|
|
800
|
+
n("p", { class: "m-0" }, "Nenhum item encontrado.", -1)
|
|
906
801
|
])]))
|
|
907
|
-
])) :
|
|
802
|
+
])) : b("", !0)
|
|
908
803
|
], 2)
|
|
909
804
|
], 2),
|
|
910
|
-
|
|
911
|
-
pagination:
|
|
912
|
-
tradePage:
|
|
913
|
-
error:
|
|
805
|
+
O(i.$slots, "pagination", {
|
|
806
|
+
pagination: p.value,
|
|
807
|
+
tradePage: L,
|
|
808
|
+
error: w(U)
|
|
914
809
|
}, () => [
|
|
915
|
-
|
|
810
|
+
!w(U) && p.value.count > 0 ? (t(), a("div", {
|
|
916
811
|
key: 0,
|
|
917
|
-
class:
|
|
812
|
+
class: _(["mt-3 px-3", l.class_pagination])
|
|
918
813
|
}, [
|
|
919
|
-
|
|
814
|
+
Q(Le, {
|
|
920
815
|
filtering: !0,
|
|
921
|
-
pagination:
|
|
922
|
-
onTradePage:
|
|
816
|
+
pagination: p.value,
|
|
817
|
+
onTradePage: L
|
|
923
818
|
}, null, 8, ["pagination"])
|
|
924
|
-
], 2)) :
|
|
819
|
+
], 2)) : b("", !0)
|
|
925
820
|
], !0),
|
|
926
|
-
|
|
821
|
+
w(o) ? (t(), a("div", {
|
|
927
822
|
key: 0,
|
|
928
823
|
class: "image-preview-container",
|
|
929
|
-
style:
|
|
824
|
+
style: we(w(v))
|
|
930
825
|
}, [
|
|
931
|
-
|
|
932
|
-
src:
|
|
826
|
+
n("img", {
|
|
827
|
+
src: w(f),
|
|
933
828
|
alt: "Preview",
|
|
934
829
|
class: "image-preview-large"
|
|
935
|
-
}, null, 8,
|
|
936
|
-
], 4)) :
|
|
830
|
+
}, null, 8, Mt)
|
|
831
|
+
], 4)) : b("", !0)
|
|
937
832
|
]));
|
|
938
833
|
}
|
|
939
|
-
}),
|
|
834
|
+
}), Tt = /* @__PURE__ */ W($t, [["__scopeId", "data-v-fa062ce8"]]);
|
|
940
835
|
export {
|
|
941
|
-
|
|
942
|
-
|
|
836
|
+
zt as VColumn,
|
|
837
|
+
Tt as VDataTable
|
|
943
838
|
};
|