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