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