v-sistec-features 1.18.0-beta.1 → 1.18.0-beta.3
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/Pagination.d.ts +1 -1
- package/dist/core.d.ts +55 -1
- package/dist/core.js +1 -1
- package/dist/datatableConfig-BMFlKtgh.js +4 -0
- package/dist/index.d.ts +55 -1
- package/dist/index.js +1 -1
- package/dist/{plugin-C0f4EPnK.js → plugin-BwqrOSD_.js} +235 -230
- package/dist/v-sistec-features.css +1 -1
- package/dist/vDataTable.js +623 -591
- package/package.json +1 -1
- package/src/DatatableVue/components/VDataTable.vue +83 -63
- package/src/config/datatableConfig.ts +8 -0
- package/src/core/plugin.ts +18 -4
package/dist/vDataTable.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { defineComponent as J, useSlots as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { defineComponent as J, useSlots as De, inject as ue, onMounted as Ee, computed as z, watch as X, resolveComponent as je, createElementBlock as l, openBlock as t, createCommentVNode as x, createElementVNode as e, withDirectives as ce, withKeys as Ie, vModelText as pe, Fragment as T, renderList as j, createBlock as W, withCtx as H, createTextVNode as I, toDisplayString as k, normalizeClass as f, withModifiers as de, ref as C, nextTick as _e, resolveDynamicComponent as me, provide as Ne, readonly as Ae, renderSlot as P, createVNode as Y, unref as h, createStaticVNode as Pe, TransitionGroup as qe, mergeProps as Le, Transition as Oe, normalizeStyle as He } from "vue";
|
|
2
|
+
import { D as Fe } from "./datatableConfig-BMFlKtgh.js";
|
|
3
|
+
import { _ as ae, P as Ue } from "./Pagination-DtVDFQ07.js";
|
|
4
|
+
import Ke from "vuedraggable";
|
|
5
|
+
const ve = Symbol("v-datatable-key"), ma = /* @__PURE__ */ J({
|
|
5
6
|
__name: "VColumn",
|
|
6
7
|
props: {
|
|
7
8
|
field: { default: null },
|
|
@@ -22,61 +23,61 @@ const me = Symbol("v-datatable-key"), ua = /* @__PURE__ */ J({
|
|
|
22
23
|
increasing_value: { default: "" },
|
|
23
24
|
class_rules: { default: () => ({}) }
|
|
24
25
|
},
|
|
25
|
-
setup(
|
|
26
|
-
const
|
|
27
|
-
if (!
|
|
26
|
+
setup(u) {
|
|
27
|
+
const i = u, g = De(), a = ue(ve);
|
|
28
|
+
if (!a)
|
|
28
29
|
throw new Error("VColumn deve ser usado dentro de um VDataTable.");
|
|
29
|
-
const
|
|
30
|
-
return
|
|
31
|
-
if (
|
|
30
|
+
const m = ["text", "img", "date", "html"];
|
|
31
|
+
return Ee(() => {
|
|
32
|
+
if (i.field !== null && !i.field)
|
|
32
33
|
throw new Error('A propriedade "field" é obrigatória em VColumn.');
|
|
33
|
-
if (!
|
|
34
|
+
if (!i.header)
|
|
34
35
|
throw new Error('A propriedade "header" é obrigatória em VColumn.');
|
|
35
|
-
if (
|
|
36
|
-
throw new Error(`O tipo "${
|
|
37
|
-
if (
|
|
38
|
-
if (
|
|
36
|
+
if (i.field !== null && !m.includes(i.type))
|
|
37
|
+
throw new Error(`O tipo "${i.type}" não é suportado em VColumn. Tipos suportados: text, img, date, html.`);
|
|
38
|
+
if (i.limite_text) {
|
|
39
|
+
if (i.type !== "text")
|
|
39
40
|
throw new Error('A propriedade "limite_text" só pode ser usada quando o tipo for "text".');
|
|
40
|
-
if (typeof
|
|
41
|
+
if (typeof i.limite_text == "string" && isNaN(Number(i.limite_text)))
|
|
41
42
|
throw new Error('A propriedade "limite_text" deve ser um número quando for uma string.');
|
|
42
|
-
if (isNaN(Number(
|
|
43
|
+
if (isNaN(Number(i.limite_text)) || Number(i.limite_text) <= 0)
|
|
43
44
|
throw new Error('A propriedade "limite_text" deve ser um número maior que 0.');
|
|
44
45
|
}
|
|
45
|
-
|
|
46
|
-
field:
|
|
47
|
-
header:
|
|
48
|
-
type:
|
|
49
|
-
class_column:
|
|
50
|
-
class_row:
|
|
51
|
-
class_item:
|
|
52
|
-
click:
|
|
53
|
-
transform_function:
|
|
54
|
-
locked:
|
|
55
|
-
use_ordering:
|
|
56
|
-
param_ordering:
|
|
57
|
-
decreasing_value:
|
|
58
|
-
increasing_value:
|
|
59
|
-
class_rules:
|
|
60
|
-
bodySlot:
|
|
61
|
-
...
|
|
62
|
-
...
|
|
63
|
-
...
|
|
46
|
+
a.addColumn({
|
|
47
|
+
field: i.field,
|
|
48
|
+
header: i.header,
|
|
49
|
+
type: i.type,
|
|
50
|
+
class_column: i.class_column,
|
|
51
|
+
class_row: i.class_row,
|
|
52
|
+
class_item: i.class_item,
|
|
53
|
+
click: i.click,
|
|
54
|
+
transform_function: i.transform_function,
|
|
55
|
+
locked: i.locked,
|
|
56
|
+
use_ordering: i.use_ordering,
|
|
57
|
+
param_ordering: i.param_ordering,
|
|
58
|
+
decreasing_value: i.decreasing_value,
|
|
59
|
+
increasing_value: i.increasing_value,
|
|
60
|
+
class_rules: i.class_rules,
|
|
61
|
+
bodySlot: g.body,
|
|
62
|
+
...i.type === "text" && { limite_text: Number(i.limite_text) },
|
|
63
|
+
...i.type === "img" && { deactivate_img_preview: i.deactivate_img_preview },
|
|
64
|
+
...i.type === "date" && { format: i.format }
|
|
64
65
|
});
|
|
65
|
-
}), (p,
|
|
66
|
+
}), (p, V) => null;
|
|
66
67
|
}
|
|
67
|
-
}),
|
|
68
|
+
}), Ye = { class: "dropdown d-flex" }, Xe = {
|
|
68
69
|
key: 0,
|
|
69
70
|
href: "#",
|
|
70
71
|
class: "btn dropdown-toggle",
|
|
71
72
|
"data-bs-toggle": "dropdown",
|
|
72
73
|
title: "Pesquisas Prédefinidas"
|
|
73
|
-
},
|
|
74
|
+
}, Ge = { class: "input-icon" }, We = ["placeholder"], Je = {
|
|
74
75
|
key: 1,
|
|
75
76
|
class: "input-icon-addon"
|
|
76
|
-
},
|
|
77
|
+
}, Qe = {
|
|
77
78
|
key: 1,
|
|
78
79
|
class: "dropdown-menu"
|
|
79
|
-
},
|
|
80
|
+
}, Re = ["onClick"], Ze = ["onClick"], et = /* @__PURE__ */ J({
|
|
80
81
|
__name: "SearchDatatable",
|
|
81
82
|
props: {
|
|
82
83
|
search: {},
|
|
@@ -88,41 +89,41 @@ const me = Symbol("v-datatable-key"), ua = /* @__PURE__ */ J({
|
|
|
88
89
|
deactivate_search_empty: { type: Boolean, default: !1 }
|
|
89
90
|
},
|
|
90
91
|
emits: ["update:search", "update:filter", "search", "clickedClearSearch"],
|
|
91
|
-
setup(
|
|
92
|
-
const
|
|
93
|
-
get: () =>
|
|
94
|
-
set: (
|
|
95
|
-
}), p =
|
|
96
|
-
get: () =>
|
|
97
|
-
set: (
|
|
92
|
+
setup(u, { emit: i }) {
|
|
93
|
+
const g = u, a = i, m = z({
|
|
94
|
+
get: () => g.search,
|
|
95
|
+
set: (r) => a("update:search", r)
|
|
96
|
+
}), p = z({
|
|
97
|
+
get: () => g.filter,
|
|
98
|
+
set: (r) => a("update:filter", r)
|
|
98
99
|
});
|
|
99
100
|
X(p, () => {
|
|
100
|
-
|
|
101
|
+
a("search");
|
|
101
102
|
}), X(
|
|
102
|
-
() =>
|
|
103
|
-
(
|
|
104
|
-
Array.isArray(
|
|
105
|
-
|
|
106
|
-
}),
|
|
103
|
+
() => g.list_filter,
|
|
104
|
+
(r) => {
|
|
105
|
+
Array.isArray(r) ? (r.forEach((s, w) => {
|
|
106
|
+
s?.type === 1 && !s.to && console.error(`Filtro na posição ${w} é do tipo 'router-link' mas não possui a propriedade 'to'.`);
|
|
107
|
+
}), g.item_use.includes(2) && r.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.");
|
|
107
108
|
},
|
|
108
109
|
{ immediate: !0, deep: !0 }
|
|
109
110
|
);
|
|
110
|
-
function
|
|
111
|
-
p.value ===
|
|
111
|
+
function V(r) {
|
|
112
|
+
p.value === r ? p.value = "" : p.value = r;
|
|
112
113
|
}
|
|
113
|
-
function
|
|
114
|
-
|
|
114
|
+
function E() {
|
|
115
|
+
m.value = "", g.deactivate_search_on_clear || a("search"), a("clickedClearSearch");
|
|
115
116
|
}
|
|
116
|
-
function
|
|
117
|
-
|
|
117
|
+
function B(r) {
|
|
118
|
+
r.click && typeof r.click == "function" ? r.click() : console.error("O filtro selecionado não possui uma função de clique válida.");
|
|
118
119
|
}
|
|
119
|
-
function
|
|
120
|
-
|
|
120
|
+
function v() {
|
|
121
|
+
g.deactivate_search_empty && m.value.trim() === "" || a("search");
|
|
121
122
|
}
|
|
122
|
-
return (
|
|
123
|
-
const
|
|
124
|
-
return t(),
|
|
125
|
-
|
|
123
|
+
return (r, s) => {
|
|
124
|
+
const w = je("router-link");
|
|
125
|
+
return t(), l("div", Ye, [
|
|
126
|
+
u.item_use.includes(2) ? (t(), l("a", Xe, [...s[2] || (s[2] = [
|
|
126
127
|
e("svg", {
|
|
127
128
|
xmlns: "http://www.w3.org/2000/svg",
|
|
128
129
|
class: "icon icon-tabler icon-tabler-filter",
|
|
@@ -143,23 +144,23 @@ const me = Symbol("v-datatable-key"), ua = /* @__PURE__ */ J({
|
|
|
143
144
|
e("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" })
|
|
144
145
|
], -1)
|
|
145
146
|
])])) : x("", !0),
|
|
146
|
-
e("div",
|
|
147
|
-
|
|
147
|
+
e("div", Ge, [
|
|
148
|
+
ce(e("input", {
|
|
148
149
|
type: "text",
|
|
149
150
|
class: "form-control ms-1",
|
|
150
151
|
id: "inputSearchVDataTable",
|
|
151
|
-
"onUpdate:modelValue":
|
|
152
|
-
onKeyup:
|
|
153
|
-
placeholder:
|
|
154
|
-
}, null, 40,
|
|
155
|
-
[
|
|
152
|
+
"onUpdate:modelValue": s[0] || (s[0] = (c) => m.value = c),
|
|
153
|
+
onKeyup: Ie(v, ["enter"]),
|
|
154
|
+
placeholder: u.placeholder_search
|
|
155
|
+
}, null, 40, We), [
|
|
156
|
+
[pe, m.value]
|
|
156
157
|
]),
|
|
157
|
-
|
|
158
|
+
m.value ? (t(), l("span", {
|
|
158
159
|
key: 0,
|
|
159
|
-
onClick:
|
|
160
|
+
onClick: s[1] || (s[1] = (c) => E()),
|
|
160
161
|
class: "inputClose",
|
|
161
162
|
title: "Limpar pesquisa"
|
|
162
|
-
}, [...
|
|
163
|
+
}, [...s[3] || (s[3] = [
|
|
163
164
|
e("svg", {
|
|
164
165
|
xmlns: "http://www.w3.org/2000/svg",
|
|
165
166
|
width: "24",
|
|
@@ -180,7 +181,7 @@ const me = Symbol("v-datatable-key"), ua = /* @__PURE__ */ J({
|
|
|
180
181
|
e("path", { d: "M18 6l-12 12" }),
|
|
181
182
|
e("path", { d: "M6 6l12 12" })
|
|
182
183
|
], -1)
|
|
183
|
-
])])) : (t(),
|
|
184
|
+
])])) : (t(), l("span", Je, [...s[4] || (s[4] = [
|
|
184
185
|
e("svg", {
|
|
185
186
|
xmlns: "http://www.w3.org/2000/svg",
|
|
186
187
|
width: "24",
|
|
@@ -203,213 +204,213 @@ const me = Symbol("v-datatable-key"), ua = /* @__PURE__ */ J({
|
|
|
203
204
|
], -1)
|
|
204
205
|
])]))
|
|
205
206
|
]),
|
|
206
|
-
|
|
207
|
-
(t(!0),
|
|
208
|
-
"type" in
|
|
207
|
+
u.item_use.includes(2) ? (t(), l("div", Qe, [
|
|
208
|
+
(t(!0), l(T, null, j(g.list_filter, (c, $) => (t(), l(T, { key: $ }, [
|
|
209
|
+
"type" in c && c.type === 1 && (!("visible" in c) || c.visible) ? (t(), W(w, {
|
|
209
210
|
key: 0,
|
|
210
|
-
to:
|
|
211
|
+
to: c?.to,
|
|
211
212
|
class: "dropdown-item cursor-pointer"
|
|
212
213
|
}, {
|
|
213
|
-
default:
|
|
214
|
-
|
|
214
|
+
default: H(() => [
|
|
215
|
+
I(k(c.text), 1)
|
|
215
216
|
]),
|
|
216
217
|
_: 2
|
|
217
|
-
}, 1032, ["to"])) : (!("type" in
|
|
218
|
+
}, 1032, ["to"])) : (!("type" in c) || c.type === 2) && (!("visible" in c) || c.visible) ? (t(), l("a", {
|
|
218
219
|
key: 1,
|
|
219
|
-
onClick:
|
|
220
|
-
class:
|
|
221
|
-
},
|
|
220
|
+
onClick: de((M) => V(String(c.value)), ["prevent"]),
|
|
221
|
+
class: f(["dropdown-item cursor-pointer", p.value === c?.value ? "bg-info text-dark selected" : ""])
|
|
222
|
+
}, k(c.text), 11, Re)) : (!("type" in c) || c.type === 3) && (!("visible" in c) || c.visible) ? (t(), l("a", {
|
|
222
223
|
key: 2,
|
|
223
|
-
onClick:
|
|
224
|
-
class:
|
|
225
|
-
},
|
|
224
|
+
onClick: de((M) => B(c), ["prevent"]),
|
|
225
|
+
class: f(["dropdown-item cursor-pointer", c?.active ? "bg-info text-dark selected" : ""])
|
|
226
|
+
}, k(c.text), 11, Ze)) : x("", !0)
|
|
226
227
|
], 64))), 128))
|
|
227
228
|
])) : x("", !0)
|
|
228
229
|
]);
|
|
229
230
|
};
|
|
230
231
|
}
|
|
231
|
-
}),
|
|
232
|
-
function
|
|
233
|
-
const
|
|
232
|
+
}), tt = /* @__PURE__ */ ae(et, [["__scopeId", "data-v-ed591287"]]);
|
|
233
|
+
function at() {
|
|
234
|
+
const u = C(!1), i = C(""), g = C(0), a = C(0), m = z(() => ({
|
|
234
235
|
position: "fixed",
|
|
235
236
|
zIndex: 9999,
|
|
236
237
|
pointerEvents: "none",
|
|
237
|
-
top: `${
|
|
238
|
-
left: `${
|
|
238
|
+
top: `${a.value + 15}px`,
|
|
239
|
+
left: `${g.value + 15}px`
|
|
239
240
|
}));
|
|
240
|
-
function p(
|
|
241
|
-
const
|
|
242
|
-
let
|
|
243
|
-
|
|
241
|
+
function p(v) {
|
|
242
|
+
const r = v.clientX, s = v.clientY, w = window.innerHeight, c = 15, $ = 300;
|
|
243
|
+
let M = s + c;
|
|
244
|
+
M + $ > w && (M = s - $ - c, M < 0 && (M = 0)), g.value = r, a.value = M;
|
|
244
245
|
}
|
|
245
|
-
function
|
|
246
|
-
|
|
246
|
+
function V(v, r) {
|
|
247
|
+
u.value = !0, i.value = r, p(v);
|
|
247
248
|
}
|
|
248
|
-
function
|
|
249
|
-
|
|
249
|
+
function E(v) {
|
|
250
|
+
u.value && p(v);
|
|
250
251
|
}
|
|
251
|
-
function
|
|
252
|
-
|
|
252
|
+
function B() {
|
|
253
|
+
u.value = !1;
|
|
253
254
|
}
|
|
254
255
|
return {
|
|
255
|
-
isHovering:
|
|
256
|
-
previewSrc:
|
|
257
|
-
previewStyle:
|
|
258
|
-
handleMouseOver:
|
|
259
|
-
handleMouseMove:
|
|
260
|
-
handleMouseLeave:
|
|
256
|
+
isHovering: u,
|
|
257
|
+
previewSrc: i,
|
|
258
|
+
previewStyle: m,
|
|
259
|
+
handleMouseOver: V,
|
|
260
|
+
handleMouseMove: E,
|
|
261
|
+
handleMouseLeave: B
|
|
261
262
|
};
|
|
262
263
|
}
|
|
263
|
-
function
|
|
264
|
-
const
|
|
264
|
+
function nt(u, i, g, a) {
|
|
265
|
+
const m = C([]);
|
|
265
266
|
function p() {
|
|
266
|
-
|
|
267
|
+
m.value = [];
|
|
267
268
|
}
|
|
268
|
-
function
|
|
269
|
-
const
|
|
270
|
-
return
|
|
269
|
+
function V(v) {
|
|
270
|
+
const r = v[i];
|
|
271
|
+
return m.value.some((s) => s === r);
|
|
271
272
|
}
|
|
272
|
-
function
|
|
273
|
-
const
|
|
274
|
-
|
|
273
|
+
function E(v) {
|
|
274
|
+
const r = v[i], s = m.value.findIndex((c) => c === r), w = s > -1;
|
|
275
|
+
u ? (p(), w || (m.value.push(r), a && B(r))) : w ? m.value.splice(s, 1) : (m.value.push(r), a && B(r));
|
|
275
276
|
}
|
|
276
|
-
function
|
|
277
|
-
|
|
278
|
-
if (
|
|
279
|
-
const
|
|
280
|
-
|
|
277
|
+
function B(v) {
|
|
278
|
+
_e(() => {
|
|
279
|
+
if (g) {
|
|
280
|
+
const r = document.querySelector("#expand-item-" + v);
|
|
281
|
+
r && r.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
281
282
|
return;
|
|
282
283
|
} else
|
|
283
284
|
setTimeout(() => {
|
|
284
|
-
const
|
|
285
|
-
|
|
285
|
+
const r = document.querySelector("#expand-item-" + v);
|
|
286
|
+
r && r.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
286
287
|
}, 600);
|
|
287
288
|
});
|
|
288
289
|
}
|
|
289
290
|
return {
|
|
290
|
-
expanded_items:
|
|
291
|
-
is_item_expanded:
|
|
292
|
-
expand_item_toggle:
|
|
291
|
+
expanded_items: m,
|
|
292
|
+
is_item_expanded: V,
|
|
293
|
+
expand_item_toggle: E,
|
|
293
294
|
close_all_expanded_items: p
|
|
294
295
|
};
|
|
295
296
|
}
|
|
296
|
-
function
|
|
297
|
-
const
|
|
298
|
-
[
|
|
299
|
-
[
|
|
300
|
-
[
|
|
301
|
-
[
|
|
302
|
-
})),
|
|
303
|
-
const
|
|
304
|
-
for (const
|
|
305
|
-
|
|
306
|
-
return
|
|
307
|
-
}), { data:
|
|
308
|
-
disable_request: () =>
|
|
297
|
+
function lt(u, i, g, a, m, p) {
|
|
298
|
+
const V = C([]), E = z(() => (i.value.current_page = u.page_starts_at, u.endpoint)), B = z(() => ({
|
|
299
|
+
[u.page_param_name]: i.value.current_page + 1,
|
|
300
|
+
[u.page_size_param_name]: i.value.limit_per_page,
|
|
301
|
+
[u.search_param_name]: i.value.search || "",
|
|
302
|
+
[u.filter_param_name]: i.value.filter || ""
|
|
303
|
+
})), v = z(() => {
|
|
304
|
+
const D = {};
|
|
305
|
+
for (const S of g.value)
|
|
306
|
+
S.use_ordering && (a.value[S.header] === "increasing" ? D[S.param_ordering] = S.increasing_value || "increasing" : a.value[S.header] === "decreasing" && (D[S.param_ordering] = S.decreasing_value || "decreasing"));
|
|
307
|
+
return D;
|
|
308
|
+
}), { data: r, pending: s, error: w, execute: c, attempt: $ } = u.fetch(E, {
|
|
309
|
+
disable_request: () => u.disable_request,
|
|
309
310
|
params: () => {
|
|
310
|
-
const
|
|
311
|
-
let
|
|
312
|
-
if (
|
|
313
|
-
const Q =
|
|
314
|
-
|
|
311
|
+
const D = typeof u.add_params == "function";
|
|
312
|
+
let S = {};
|
|
313
|
+
if (D) {
|
|
314
|
+
const Q = u.add_params;
|
|
315
|
+
S = Q();
|
|
315
316
|
} else
|
|
316
|
-
|
|
317
|
-
return
|
|
318
|
-
...
|
|
319
|
-
...
|
|
317
|
+
S = u.add_params || {};
|
|
318
|
+
return u.deactivate_default_params ? {
|
|
319
|
+
...S,
|
|
320
|
+
...v.value
|
|
320
321
|
} : {
|
|
321
|
-
...
|
|
322
|
-
...
|
|
323
|
-
...
|
|
322
|
+
...B.value,
|
|
323
|
+
...u.add_params,
|
|
324
|
+
...v.value
|
|
324
325
|
};
|
|
325
326
|
},
|
|
326
|
-
retry:
|
|
327
|
-
retryDelay:
|
|
327
|
+
retry: u.retry_attempts,
|
|
328
|
+
retryDelay: u.retry_delay,
|
|
328
329
|
paramsReactives: !1,
|
|
329
330
|
immediate: !1
|
|
330
|
-
},
|
|
331
|
-
async function
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
},
|
|
331
|
+
}, u.fetch_name), M = C(!1), q = C(null), y = C(!1), F = z(() => s.value || M.value);
|
|
332
|
+
async function U() {
|
|
333
|
+
y.value || (y.value = !0), q.value && clearTimeout(q.value), M.value = !0, q.value = setTimeout(() => {
|
|
334
|
+
M.value = !1;
|
|
335
|
+
}, u.min_loading_delay), p(), m("beforeFetch"), await c(), m("afterFetch");
|
|
335
336
|
}
|
|
336
337
|
function K() {
|
|
337
|
-
|
|
338
|
+
i.value.current_page = u.page_starts_at, U();
|
|
338
339
|
}
|
|
339
340
|
return {
|
|
340
|
-
items:
|
|
341
|
-
pending:
|
|
342
|
-
error:
|
|
343
|
-
execute:
|
|
344
|
-
response:
|
|
345
|
-
attempt:
|
|
346
|
-
default_params:
|
|
347
|
-
fetchDataWithDelay:
|
|
341
|
+
items: V,
|
|
342
|
+
pending: s,
|
|
343
|
+
error: w,
|
|
344
|
+
execute: c,
|
|
345
|
+
response: r,
|
|
346
|
+
attempt: $,
|
|
347
|
+
default_params: B,
|
|
348
|
+
fetchDataWithDelay: U,
|
|
348
349
|
reSearch: K,
|
|
349
|
-
showLoadingState:
|
|
350
|
-
first_fetch:
|
|
350
|
+
showLoadingState: F,
|
|
351
|
+
first_fetch: y
|
|
351
352
|
};
|
|
352
353
|
}
|
|
353
|
-
function
|
|
354
|
-
const
|
|
355
|
-
const
|
|
356
|
-
return
|
|
357
|
-
}, p =
|
|
358
|
-
if (!
|
|
359
|
-
const
|
|
360
|
-
return
|
|
361
|
-
}),
|
|
362
|
-
X([p,
|
|
363
|
-
|
|
354
|
+
function st(u, i) {
|
|
355
|
+
const g = C(null), a = C([]), m = (v) => {
|
|
356
|
+
const r = u.item_key;
|
|
357
|
+
return a.value.some((s) => s[r] === v[r]);
|
|
358
|
+
}, p = z(() => {
|
|
359
|
+
if (!i.value.length) return !1;
|
|
360
|
+
const v = i.value.filter((r) => m(r)).length;
|
|
361
|
+
return v === 0 ? !1 : v === i.value.length ? !0 : "indeterminate";
|
|
362
|
+
}), V = z(() => a.value.length > 0);
|
|
363
|
+
X([p, g], ([v]) => {
|
|
364
|
+
g.value && (v === "indeterminate" ? (g.value.checked = !1, g.value.indeterminate = !0) : (g.value.checked = v, g.value.indeterminate = !1));
|
|
364
365
|
}, {
|
|
365
366
|
immediate: !0,
|
|
366
367
|
flush: "post"
|
|
367
368
|
});
|
|
368
|
-
function
|
|
369
|
-
const
|
|
370
|
-
if (!
|
|
371
|
-
const
|
|
372
|
-
if (
|
|
373
|
-
const
|
|
374
|
-
|
|
375
|
-
(
|
|
369
|
+
function E() {
|
|
370
|
+
const v = i.value;
|
|
371
|
+
if (!v.length) return;
|
|
372
|
+
const r = p.value;
|
|
373
|
+
if (r === !0 || r === "indeterminate") {
|
|
374
|
+
const s = v.map((w) => w[u.item_key]);
|
|
375
|
+
a.value = a.value.filter(
|
|
376
|
+
(w) => !s.includes(w[u.item_key])
|
|
376
377
|
);
|
|
377
378
|
} else
|
|
378
|
-
|
|
379
|
-
|
|
379
|
+
v.forEach((s) => {
|
|
380
|
+
m(s) || a.value.push(s);
|
|
380
381
|
});
|
|
381
382
|
}
|
|
382
|
-
function
|
|
383
|
-
const
|
|
384
|
-
|
|
383
|
+
function B(v) {
|
|
384
|
+
const r = u.item_key, s = a.value.findIndex((w) => w[r] === v[r]);
|
|
385
|
+
s > -1 ? a.value.splice(s, 1) : a.value.push(v);
|
|
385
386
|
}
|
|
386
387
|
return {
|
|
387
|
-
selectAllCheckbox:
|
|
388
|
-
selected_items:
|
|
389
|
-
isSelected:
|
|
388
|
+
selectAllCheckbox: g,
|
|
389
|
+
selected_items: a,
|
|
390
|
+
isSelected: m,
|
|
390
391
|
selectAllState: p,
|
|
391
|
-
atLeastOneSelected:
|
|
392
|
-
toggleSelectAll:
|
|
393
|
-
toggleItemSelection:
|
|
392
|
+
atLeastOneSelected: V,
|
|
393
|
+
toggleSelectAll: E,
|
|
394
|
+
toggleItemSelection: B
|
|
394
395
|
};
|
|
395
396
|
}
|
|
396
|
-
const
|
|
397
|
+
const rt = { class: "loading-container" }, ot = { key: 0 }, it = { key: 2 }, dt = {
|
|
397
398
|
key: 5,
|
|
398
399
|
class: "text-danger erro-custom-container"
|
|
399
|
-
},
|
|
400
|
+
}, ut = { class: "badge bg-orange text-white erro-custom-text" }, ct = { key: 0 }, pt = { key: 2 }, _t = {
|
|
400
401
|
key: 5,
|
|
401
402
|
class: "text-danger erro-custom-container"
|
|
402
|
-
},
|
|
403
|
+
}, mt = { class: "badge bg-orange text-white erro-custom-text" }, vt = ["colspan"], ht = {
|
|
403
404
|
key: 0,
|
|
404
405
|
class: "d-flex flex-column justify-content-center align-items-center",
|
|
405
406
|
style: { height: "6rem" }
|
|
406
|
-
},
|
|
407
|
+
}, ft = {
|
|
407
408
|
key: 1,
|
|
408
409
|
style: { height: "3rem" }
|
|
409
|
-
},
|
|
410
|
+
}, gt = {
|
|
410
411
|
key: 2,
|
|
411
412
|
class: "p-3 text-center text-secondary"
|
|
412
|
-
},
|
|
413
|
+
}, yt = /* @__PURE__ */ J({
|
|
413
414
|
__name: "VDataTableLoading",
|
|
414
415
|
props: {
|
|
415
416
|
columns: {},
|
|
@@ -420,96 +421,96 @@ const nt = { class: "loading-container" }, lt = { key: 0 }, st = { key: 2 }, ot
|
|
|
420
421
|
attempt: {},
|
|
421
422
|
pagination: {}
|
|
422
423
|
},
|
|
423
|
-
setup(
|
|
424
|
-
const
|
|
425
|
-
return (
|
|
426
|
-
|
|
424
|
+
setup(u) {
|
|
425
|
+
const i = u;
|
|
426
|
+
return (g, a) => (t(), l("div", rt, [
|
|
427
|
+
i.custom_loading ? (t(), W(me(i.custom_loading), { key: 0 })) : (t(), l("table", {
|
|
427
428
|
key: 1,
|
|
428
|
-
class:
|
|
429
|
+
class: f(["table table-vcenter table-selectable", i.class_table])
|
|
429
430
|
}, [
|
|
430
431
|
e("thead", null, [
|
|
431
432
|
e("tr", null, [
|
|
432
|
-
(t(!0),
|
|
433
|
-
key:
|
|
434
|
-
class:
|
|
435
|
-
},
|
|
433
|
+
(t(!0), l(T, null, j(u.columns, (m) => (t(), l("th", {
|
|
434
|
+
key: m.field || m.header,
|
|
435
|
+
class: f(m.class_column)
|
|
436
|
+
}, k(m.header), 3))), 128))
|
|
436
437
|
])
|
|
437
438
|
]),
|
|
438
439
|
e("tbody", null, [
|
|
439
|
-
|
|
440
|
-
key: "placeholder-" +
|
|
440
|
+
i.type_loading === "placeholder" ? (t(!0), l(T, { key: 0 }, j(u.pagination.limit_per_page, (m) => (t(), l("tr", {
|
|
441
|
+
key: "placeholder-" + m,
|
|
441
442
|
class: "placeholder-glow"
|
|
442
443
|
}, [
|
|
443
|
-
(t(!0),
|
|
444
|
+
(t(!0), l(T, null, j(u.columns, (p) => (t(), l("td", {
|
|
444
445
|
key: p.field || p.header,
|
|
445
|
-
class:
|
|
446
|
+
class: f(p.class_row)
|
|
446
447
|
}, [
|
|
447
|
-
p.bodySlot ? (t(),
|
|
448
|
+
p.bodySlot ? (t(), l("span", ot, [...a[0] || (a[0] = [
|
|
448
449
|
e("span", { class: "placeholder col-8" }, null, -1)
|
|
449
|
-
])])) : p.type === "text" ? (t(),
|
|
450
|
+
])])) : p.type === "text" ? (t(), l("span", {
|
|
450
451
|
key: 1,
|
|
451
|
-
class:
|
|
452
|
-
}, [...
|
|
452
|
+
class: f(p.class_item)
|
|
453
|
+
}, [...a[1] || (a[1] = [
|
|
453
454
|
e("span", { class: "placeholder col-8" }, null, -1)
|
|
454
|
-
])], 2)) : p.type === "date" ? (t(),
|
|
455
|
+
])], 2)) : p.type === "date" ? (t(), l("span", it, [...a[2] || (a[2] = [
|
|
455
456
|
e("span", { class: "placeholder col-9" }, null, -1)
|
|
456
|
-
])])) : p.type === "html" ? (t(),
|
|
457
|
+
])])) : p.type === "html" ? (t(), l("div", {
|
|
457
458
|
key: 3,
|
|
458
|
-
class:
|
|
459
|
-
}, [...
|
|
459
|
+
class: f(p.class_item)
|
|
460
|
+
}, [...a[3] || (a[3] = [
|
|
460
461
|
e("div", { class: "placeholder col-12" }, null, -1)
|
|
461
|
-
])], 2)) : p.type === "img" ? (t(),
|
|
462
|
+
])], 2)) : p.type === "img" ? (t(), l("div", {
|
|
462
463
|
key: 4,
|
|
463
|
-
class:
|
|
464
|
-
}, [...
|
|
464
|
+
class: f(p.class_item)
|
|
465
|
+
}, [...a[4] || (a[4] = [
|
|
465
466
|
e("div", { class: "placeholder placeholder-img" }, null, -1)
|
|
466
|
-
])], 2)) : (t(),
|
|
467
|
-
|
|
468
|
-
e("span",
|
|
469
|
-
|
|
467
|
+
])], 2)) : (t(), l("span", dt, [
|
|
468
|
+
a[5] || (a[5] = I("tipo ", -1)),
|
|
469
|
+
e("span", ut, k(p.type), 1),
|
|
470
|
+
a[6] || (a[6] = I(" não suportado ", -1))
|
|
470
471
|
]))
|
|
471
472
|
], 2))), 128))
|
|
472
|
-
]))), 128)) :
|
|
473
|
-
key: "placeholder-" +
|
|
473
|
+
]))), 128)) : i.type_loading === "spiner-table" ? (t(!0), l(T, { key: 1 }, j(u.pagination.limit_per_page, (m) => (t(), l("tr", {
|
|
474
|
+
key: "placeholder-" + m
|
|
474
475
|
}, [
|
|
475
|
-
(t(!0),
|
|
476
|
+
(t(!0), l(T, null, j(u.columns, (p) => (t(), l("td", {
|
|
476
477
|
key: p.field || p.header,
|
|
477
|
-
class:
|
|
478
|
+
class: f(p.class_row)
|
|
478
479
|
}, [
|
|
479
|
-
p.bodySlot ? (t(),
|
|
480
|
+
p.bodySlot ? (t(), l("span", ct, [...a[7] || (a[7] = [
|
|
480
481
|
e("span", {
|
|
481
482
|
class: "spinner-border spinner-border-sm",
|
|
482
483
|
role: "status",
|
|
483
484
|
"aria-hidden": "true"
|
|
484
485
|
}, null, -1)
|
|
485
|
-
])])) : p.type === "text" ? (t(),
|
|
486
|
+
])])) : p.type === "text" ? (t(), l("span", {
|
|
486
487
|
key: 1,
|
|
487
|
-
class:
|
|
488
|
-
}, [...
|
|
488
|
+
class: f(p.class_item)
|
|
489
|
+
}, [...a[8] || (a[8] = [
|
|
489
490
|
e("span", {
|
|
490
491
|
class: "spinner-border spinner-border-sm",
|
|
491
492
|
role: "status",
|
|
492
493
|
"aria-hidden": "true"
|
|
493
494
|
}, null, -1)
|
|
494
|
-
])], 2)) : p.type === "date" ? (t(),
|
|
495
|
+
])], 2)) : p.type === "date" ? (t(), l("span", pt, [...a[9] || (a[9] = [
|
|
495
496
|
e("span", {
|
|
496
497
|
class: "spinner-border spinner-border-sm",
|
|
497
498
|
role: "status",
|
|
498
499
|
"aria-hidden": "true"
|
|
499
500
|
}, null, -1)
|
|
500
|
-
])])) : p.type === "html" ? (t(),
|
|
501
|
+
])])) : p.type === "html" ? (t(), l("div", {
|
|
501
502
|
key: 3,
|
|
502
|
-
class:
|
|
503
|
-
}, [...
|
|
503
|
+
class: f(p.class_item)
|
|
504
|
+
}, [...a[10] || (a[10] = [
|
|
504
505
|
e("span", {
|
|
505
506
|
class: "spinner-border spinner-border-sm",
|
|
506
507
|
role: "status",
|
|
507
508
|
"aria-hidden": "true"
|
|
508
509
|
}, null, -1)
|
|
509
|
-
])], 2)) : p.type === "img" ? (t(),
|
|
510
|
+
])], 2)) : p.type === "img" ? (t(), l("div", {
|
|
510
511
|
key: 4,
|
|
511
|
-
class:
|
|
512
|
-
}, [...
|
|
512
|
+
class: f(["", p.class_item])
|
|
513
|
+
}, [...a[11] || (a[11] = [
|
|
513
514
|
e("span", { class: "placeholder-img d-flex justify-content-center align-items-center" }, [
|
|
514
515
|
e("span", {
|
|
515
516
|
class: "spinner-border spinner-border-sm",
|
|
@@ -517,53 +518,53 @@ const nt = { class: "loading-container" }, lt = { key: 0 }, st = { key: 2 }, ot
|
|
|
517
518
|
"aria-hidden": "true"
|
|
518
519
|
})
|
|
519
520
|
], -1)
|
|
520
|
-
])], 2)) : (t(),
|
|
521
|
-
|
|
522
|
-
e("span",
|
|
523
|
-
|
|
521
|
+
])], 2)) : (t(), l("span", _t, [
|
|
522
|
+
a[12] || (a[12] = I("tipo ", -1)),
|
|
523
|
+
e("span", mt, k(p.type), 1),
|
|
524
|
+
a[13] || (a[13] = I(" não suportado ", -1))
|
|
524
525
|
]))
|
|
525
526
|
], 2))), 128))
|
|
526
|
-
]))), 128)) :
|
|
527
|
+
]))), 128)) : i.type_loading === "spiner" ? (t(!0), l(T, { key: 2 }, j(u.pagination.limit_per_page, (m) => (t(), l("tr", { key: m }, [
|
|
527
528
|
e("td", {
|
|
528
|
-
colspan:
|
|
529
|
+
colspan: u.columns.length,
|
|
529
530
|
class: "text-center p-0",
|
|
530
531
|
style: { "border-bottom": "none" }
|
|
531
532
|
}, [
|
|
532
|
-
|
|
533
|
+
m === Math.floor(u.pagination.limit_per_page / 2) + 1 ? (t(), l("div", ht, [...a[14] || (a[14] = [
|
|
533
534
|
e("div", {
|
|
534
535
|
class: "spinner-border",
|
|
535
536
|
style: { width: "3rem", height: "3rem" },
|
|
536
537
|
role: "status"
|
|
537
538
|
}, null, -1),
|
|
538
539
|
e("span", { class: "mt-2" }, "Carregando...", -1)
|
|
539
|
-
])])) : (t(),
|
|
540
|
-
], 8,
|
|
540
|
+
])])) : (t(), l("div", ft))
|
|
541
|
+
], 8, vt)
|
|
541
542
|
]))), 128)) : x("", !0)
|
|
542
543
|
])
|
|
543
544
|
], 2)),
|
|
544
|
-
|
|
545
|
+
u.attempt && u.attempt.current > 1 ? (t(), l("div", gt, " A conexão falhou. Tentando novamente... (Tentativa " + k(u.attempt.current) + " de " + k(u.attempt.total) + ") ", 1)) : x("", !0)
|
|
545
546
|
]));
|
|
546
547
|
}
|
|
547
|
-
}),
|
|
548
|
+
}), kt = /* @__PURE__ */ ae(yt, [["__scopeId", "data-v-3b019685"]]), wt = { class: "mx-2 d-inline-block" }, xt = {
|
|
548
549
|
key: 0,
|
|
549
550
|
class: "alert alert-cyan d-flex justify-content-center align-items-center py-2",
|
|
550
551
|
role: "alert"
|
|
551
|
-
},
|
|
552
|
+
}, bt = { class: "alert-title m-0" }, Ct = { class: "badge bg-azure text-azure-fg" }, Mt = {
|
|
552
553
|
key: 1,
|
|
553
554
|
class: "feedback-container text-center"
|
|
554
|
-
},
|
|
555
|
+
}, St = {
|
|
555
556
|
key: 0,
|
|
556
557
|
class: "text-secondary"
|
|
557
|
-
},
|
|
558
|
+
}, $t = {
|
|
558
559
|
key: 1,
|
|
559
560
|
class: "text-secondary"
|
|
560
|
-
},
|
|
561
|
+
}, zt = {
|
|
561
562
|
key: 2,
|
|
562
563
|
class: "table-responsive"
|
|
563
|
-
},
|
|
564
|
+
}, Bt = { key: 0 }, Tt = { key: 0 }, Vt = {
|
|
564
565
|
key: 1,
|
|
565
566
|
class: "w-1"
|
|
566
|
-
},
|
|
567
|
+
}, Dt = { class: "header-ordering" }, Et = ["onClick"], jt = {
|
|
567
568
|
key: 0,
|
|
568
569
|
xmlns: "http://www.w3.org/2000/svg",
|
|
569
570
|
width: "16",
|
|
@@ -574,7 +575,7 @@ const nt = { class: "loading-container" }, lt = { key: 0 }, st = { key: 2 }, ot
|
|
|
574
575
|
"stroke-width": "2",
|
|
575
576
|
"stroke-linecap": "round",
|
|
576
577
|
"stroke-linejoin": "round"
|
|
577
|
-
},
|
|
578
|
+
}, It = {
|
|
578
579
|
key: 1,
|
|
579
580
|
xmlns: "http://www.w3.org/2000/svg",
|
|
580
581
|
width: "16",
|
|
@@ -585,7 +586,7 @@ const nt = { class: "loading-container" }, lt = { key: 0 }, st = { key: 2 }, ot
|
|
|
585
586
|
"stroke-width": "2",
|
|
586
587
|
"stroke-linecap": "round",
|
|
587
588
|
"stroke-linejoin": "round"
|
|
588
|
-
},
|
|
589
|
+
}, Nt = {
|
|
589
590
|
key: 2,
|
|
590
591
|
xmlns: "http://www.w3.org/2000/svg",
|
|
591
592
|
width: "16",
|
|
@@ -596,7 +597,7 @@ const nt = { class: "loading-container" }, lt = { key: 0 }, st = { key: 2 }, ot
|
|
|
596
597
|
"stroke-width": "2",
|
|
597
598
|
"stroke-linecap": "round",
|
|
598
599
|
"stroke-linejoin": "round"
|
|
599
|
-
},
|
|
600
|
+
}, At = { class: "header-ordering" }, Pt = ["onClick"], qt = {
|
|
600
601
|
key: 0,
|
|
601
602
|
xmlns: "http://www.w3.org/2000/svg",
|
|
602
603
|
width: "16",
|
|
@@ -607,7 +608,7 @@ const nt = { class: "loading-container" }, lt = { key: 0 }, st = { key: 2 }, ot
|
|
|
607
608
|
"stroke-width": "2",
|
|
608
609
|
"stroke-linecap": "round",
|
|
609
610
|
"stroke-linejoin": "round"
|
|
610
|
-
},
|
|
611
|
+
}, Lt = {
|
|
611
612
|
key: 1,
|
|
612
613
|
xmlns: "http://www.w3.org/2000/svg",
|
|
613
614
|
width: "16",
|
|
@@ -618,7 +619,7 @@ const nt = { class: "loading-container" }, lt = { key: 0 }, st = { key: 2 }, ot
|
|
|
618
619
|
"stroke-width": "2",
|
|
619
620
|
"stroke-linecap": "round",
|
|
620
621
|
"stroke-linejoin": "round"
|
|
621
|
-
},
|
|
622
|
+
}, Ot = {
|
|
622
623
|
key: 2,
|
|
623
624
|
xmlns: "http://www.w3.org/2000/svg",
|
|
624
625
|
width: "16",
|
|
@@ -629,10 +630,10 @@ const nt = { class: "loading-container" }, lt = { key: 0 }, st = { key: 2 }, ot
|
|
|
629
630
|
"stroke-width": "2",
|
|
630
631
|
"stroke-linecap": "round",
|
|
631
632
|
"stroke-linejoin": "round"
|
|
632
|
-
},
|
|
633
|
+
}, Ht = {
|
|
633
634
|
key: 0,
|
|
634
635
|
class: "w-1"
|
|
635
|
-
},
|
|
636
|
+
}, Ft = ["onClick"], Ut = {
|
|
636
637
|
key: 0,
|
|
637
638
|
xmlns: "http://www.w3.org/2000/svg",
|
|
638
639
|
width: "24",
|
|
@@ -644,7 +645,7 @@ const nt = { class: "loading-container" }, lt = { key: 0 }, st = { key: 2 }, ot
|
|
|
644
645
|
"stroke-linecap": "round",
|
|
645
646
|
"stroke-linejoin": "round",
|
|
646
647
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-right icon-transition-arrow"
|
|
647
|
-
},
|
|
648
|
+
}, Kt = {
|
|
648
649
|
key: 1,
|
|
649
650
|
xmlns: "http://www.w3.org/2000/svg",
|
|
650
651
|
width: "20",
|
|
@@ -656,43 +657,43 @@ const nt = { class: "loading-container" }, lt = { key: 0 }, st = { key: 2 }, ot
|
|
|
656
657
|
"stroke-linecap": "round",
|
|
657
658
|
"stroke-linejoin": "round",
|
|
658
659
|
class: "icon icon-transition-plus"
|
|
659
|
-
},
|
|
660
|
+
}, Yt = {
|
|
660
661
|
key: 1,
|
|
661
662
|
class: "w-1"
|
|
662
|
-
},
|
|
663
|
+
}, Xt = ["checked", "onChange"], Gt = ["onClick"], Wt = ["onClick"], Jt = { key: 0 }, Qt = { key: 1 }, Rt = ["onClick", "innerHTML"], Zt = ["onClick"], ea = ["src"], ta = ["src"], aa = {
|
|
663
664
|
key: 5,
|
|
664
665
|
class: "text-danger erro-custom-container"
|
|
665
|
-
},
|
|
666
|
+
}, na = { class: "badge bg-orange text-white erro-custom-text" }, la = ["id"], sa = ["colspan"], ra = { key: 1 }, oa = {
|
|
666
667
|
key: 2,
|
|
667
668
|
class: "text-center p-4 text-secondary"
|
|
668
|
-
},
|
|
669
|
+
}, ia = ["src"], da = /* @__PURE__ */ J({
|
|
669
670
|
__name: "VDataTable",
|
|
670
671
|
props: {
|
|
671
672
|
fetch: {},
|
|
672
673
|
fetch_name: { default: "" },
|
|
673
674
|
endpoint: {},
|
|
674
|
-
type_loading: {
|
|
675
|
+
type_loading: {},
|
|
675
676
|
custom_loading: { default: null },
|
|
676
677
|
deactivate_default_params: { type: Boolean, default: !1 },
|
|
677
|
-
filter_param_name: {
|
|
678
|
-
search_param_name: {
|
|
679
|
-
page_param_name: {
|
|
680
|
-
page_size_param_name: {
|
|
678
|
+
filter_param_name: {},
|
|
679
|
+
search_param_name: {},
|
|
680
|
+
page_param_name: {},
|
|
681
|
+
page_size_param_name: {},
|
|
681
682
|
add_params: { type: [Object, Function], default: () => ({}) },
|
|
682
|
-
data_key: {
|
|
683
|
-
total_key: {
|
|
683
|
+
data_key: {},
|
|
684
|
+
total_key: {},
|
|
684
685
|
list_filter: { default: () => [] },
|
|
685
|
-
first_text_page_size: {
|
|
686
|
-
second_text_page_size: {
|
|
687
|
-
class_table: {
|
|
688
|
-
class_content: {
|
|
689
|
-
class_container: {
|
|
690
|
-
class_pagination: {
|
|
691
|
-
class_filters: {
|
|
692
|
-
class_page_size: {
|
|
693
|
-
min_loading_delay: {
|
|
694
|
-
retry_attempts: {
|
|
695
|
-
retry_delay: {
|
|
686
|
+
first_text_page_size: {},
|
|
687
|
+
second_text_page_size: {},
|
|
688
|
+
class_table: {},
|
|
689
|
+
class_content: {},
|
|
690
|
+
class_container: {},
|
|
691
|
+
class_pagination: {},
|
|
692
|
+
class_filters: {},
|
|
693
|
+
class_page_size: {},
|
|
694
|
+
min_loading_delay: {},
|
|
695
|
+
retry_attempts: {},
|
|
696
|
+
retry_delay: {},
|
|
696
697
|
use_checkbox: { type: Boolean, default: !1 },
|
|
697
698
|
use_expandable_items: { type: Boolean, default: !1 },
|
|
698
699
|
close_expanded_item_on_expand_new: { type: Boolean, default: !1 },
|
|
@@ -701,390 +702,421 @@ const nt = { class: "loading-container" }, lt = { key: 0 }, st = { key: 2 }, ot
|
|
|
701
702
|
deactivate_animation_expand: { type: Boolean, default: !1 },
|
|
702
703
|
type_button_expand: { default: "arrow" },
|
|
703
704
|
deactivate_search_empty: { type: Boolean, default: !1 },
|
|
704
|
-
item_key: {
|
|
705
|
-
limit_per_page: {
|
|
706
|
-
page_starts_at: {
|
|
705
|
+
item_key: {},
|
|
706
|
+
limit_per_page: {},
|
|
707
|
+
page_starts_at: {},
|
|
707
708
|
deactivate_selected_info: { type: Boolean, default: !1 },
|
|
708
709
|
immediate: { type: Boolean, default: !0 },
|
|
709
|
-
placeholder_search: {
|
|
710
|
+
placeholder_search: {},
|
|
710
711
|
deactivate_search_on_clear: { type: Boolean, default: !1 },
|
|
711
712
|
disable_request: { default: !1 }
|
|
712
713
|
},
|
|
713
714
|
emits: ["tradePage", "beforeFetch", "afterFetch", "clickedClearSearch"],
|
|
714
|
-
setup(
|
|
715
|
-
const {
|
|
716
|
-
isHovering:
|
|
717
|
-
previewSrc:
|
|
718
|
-
previewStyle:
|
|
719
|
-
handleMouseOver:
|
|
720
|
-
handleMouseMove:
|
|
721
|
-
handleMouseLeave:
|
|
722
|
-
} =
|
|
723
|
-
|
|
715
|
+
setup(u, { expose: i, emit: g }) {
|
|
716
|
+
const a = ue(Fe, {}), {
|
|
717
|
+
isHovering: m,
|
|
718
|
+
previewSrc: p,
|
|
719
|
+
previewStyle: V,
|
|
720
|
+
handleMouseOver: E,
|
|
721
|
+
handleMouseMove: B,
|
|
722
|
+
handleMouseLeave: v
|
|
723
|
+
} = at(), r = u, s = z(() => ({
|
|
724
|
+
// Primeiro, espelha todas as props originais.
|
|
725
|
+
...r,
|
|
726
|
+
// Agora SOBRESCREVEMOS as propriedades que precisam de lógica Global/Default
|
|
727
|
+
// (Prioridade para Prop, mas aceita Global)
|
|
728
|
+
// === TEXTOS ===
|
|
729
|
+
first_text_page_size: r.first_text_page_size ?? a.first_text_page_size ?? "Mostrar",
|
|
730
|
+
second_text_page_size: r.second_text_page_size ?? a.second_text_page_size ?? "registros",
|
|
731
|
+
placeholder_search: r.placeholder_search ?? a.placeholder_search ?? "Buscar...",
|
|
732
|
+
// === CLASSES ===
|
|
733
|
+
class_table: r.class_table || a.class_table || "",
|
|
734
|
+
class_pagination: r.class_pagination || a.class_pagination || "",
|
|
735
|
+
class_container: r.class_container || a.class_container || "",
|
|
736
|
+
class_content: r.class_content || a.class_content || "",
|
|
737
|
+
class_filters: r.class_filters || a.class_filters || "",
|
|
738
|
+
class_page_size: r.class_page_size || a.class_page_size || "",
|
|
739
|
+
// === CONFIGURAÇÃO DE API ===
|
|
740
|
+
filter_param_name: r.filter_param_name ?? a.filter_param_name ?? "filter",
|
|
741
|
+
search_param_name: r.search_param_name ?? a.search_param_name ?? "search",
|
|
742
|
+
page_param_name: r.page_param_name ?? a.page_param_name ?? "page",
|
|
743
|
+
page_size_param_name: r.page_size_param_name ?? a.page_size_param_name ?? "page_size",
|
|
744
|
+
page_starts_at: r.page_starts_at ?? a.page_starts_at ?? 0,
|
|
745
|
+
item_key: r.item_key ?? a.item_key ?? "id",
|
|
746
|
+
data_key: r.data_key ?? a.data_key ?? "results",
|
|
747
|
+
total_key: r.total_key ?? a.total_key ?? "count",
|
|
748
|
+
// === COMPORTAMENTO ===
|
|
749
|
+
limit_per_page: r.limit_per_page ?? a.limit_per_page ?? 5,
|
|
750
|
+
type_loading: r.type_loading ?? a.type_loading ?? "placeholder",
|
|
751
|
+
min_loading_delay: r.min_loading_delay ?? a.min_loading_delay ?? 600,
|
|
752
|
+
retry_attempts: r.retry_attempts ?? a.retry_attempts ?? 3,
|
|
753
|
+
retry_delay: r.retry_delay ?? a.retry_delay ?? 2e3
|
|
754
|
+
})), w = g, c = C({}), $ = C([]), M = C(0), q = C(!1), y = C({
|
|
755
|
+
current_page: s.value.page_starts_at,
|
|
724
756
|
// pagina atual
|
|
725
757
|
count: 0,
|
|
726
758
|
// total de itens
|
|
727
|
-
limit_per_page:
|
|
759
|
+
limit_per_page: s.value.limit_per_page,
|
|
728
760
|
// limite de itens por página
|
|
729
761
|
search: "",
|
|
730
762
|
// termo de busca
|
|
731
763
|
filter: ""
|
|
732
764
|
// filtro selecionado
|
|
733
765
|
}), {
|
|
734
|
-
expand_item_toggle:
|
|
735
|
-
close_all_expanded_items:
|
|
736
|
-
is_item_expanded:
|
|
737
|
-
} =
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
766
|
+
expand_item_toggle: F,
|
|
767
|
+
close_all_expanded_items: U,
|
|
768
|
+
is_item_expanded: K
|
|
769
|
+
} = nt(
|
|
770
|
+
s.value.close_expanded_item_on_expand_new,
|
|
771
|
+
s.value.item_key,
|
|
772
|
+
s.value.deactivate_animation_expand,
|
|
773
|
+
s.value.scroll_to_expanded_item
|
|
742
774
|
), {
|
|
743
775
|
items: D,
|
|
744
|
-
error:
|
|
745
|
-
response:
|
|
746
|
-
attempt:
|
|
747
|
-
default_params:
|
|
748
|
-
fetchDataWithDelay:
|
|
749
|
-
reSearch:
|
|
750
|
-
showLoadingState:
|
|
751
|
-
first_fetch:
|
|
752
|
-
} =
|
|
753
|
-
selectAllCheckbox:
|
|
754
|
-
selected_items:
|
|
755
|
-
isSelected:
|
|
756
|
-
atLeastOneSelected:
|
|
757
|
-
toggleSelectAll:
|
|
758
|
-
toggleItemSelection:
|
|
759
|
-
} =
|
|
760
|
-
() =>
|
|
761
|
-
),
|
|
776
|
+
error: S,
|
|
777
|
+
response: Q,
|
|
778
|
+
attempt: R,
|
|
779
|
+
default_params: he,
|
|
780
|
+
fetchDataWithDelay: L,
|
|
781
|
+
reSearch: N,
|
|
782
|
+
showLoadingState: fe,
|
|
783
|
+
first_fetch: ge
|
|
784
|
+
} = lt(s.value, y, $, c, w, U), {
|
|
785
|
+
selectAllCheckbox: ne,
|
|
786
|
+
selected_items: O,
|
|
787
|
+
isSelected: le,
|
|
788
|
+
atLeastOneSelected: ye,
|
|
789
|
+
toggleSelectAll: se,
|
|
790
|
+
toggleItemSelection: ke
|
|
791
|
+
} = st(s.value, D), Z = z(
|
|
792
|
+
() => $.value.filter((d) => d.locked)
|
|
793
|
+
), ee = z({
|
|
762
794
|
get() {
|
|
763
|
-
return
|
|
795
|
+
return $.value.filter((d) => !d.locked);
|
|
764
796
|
},
|
|
765
|
-
set(
|
|
766
|
-
const
|
|
767
|
-
|
|
797
|
+
set(d) {
|
|
798
|
+
const o = Z.value;
|
|
799
|
+
$.value = [...d, ...o];
|
|
768
800
|
}
|
|
769
|
-
}),
|
|
770
|
-
let
|
|
771
|
-
return
|
|
801
|
+
}), we = z(() => [...ee.value, ...Z.value]), xe = z(() => {
|
|
802
|
+
let d = [1];
|
|
803
|
+
return s.value.list_filter.length > 0 && d.push(2), d;
|
|
772
804
|
});
|
|
773
|
-
X(
|
|
774
|
-
|
|
805
|
+
X(Q, (d) => {
|
|
806
|
+
d ? (D.value = d[s.value.data_key] || [], M.value = d[s.value.total_key] || 0, y.value.count = M.value) : (D.value = [], M.value = 0);
|
|
775
807
|
}, { immediate: !0 });
|
|
776
|
-
function
|
|
808
|
+
function be() {
|
|
777
809
|
setTimeout(() => {
|
|
778
|
-
|
|
810
|
+
q.value = !1;
|
|
779
811
|
}, 500);
|
|
780
812
|
}
|
|
781
|
-
function
|
|
782
|
-
|
|
813
|
+
function Ce(d) {
|
|
814
|
+
$.value.push(d);
|
|
783
815
|
}
|
|
784
|
-
|
|
785
|
-
const
|
|
786
|
-
const
|
|
787
|
-
|
|
816
|
+
Ne(ve, { addColumn: Ce });
|
|
817
|
+
const re = (d) => {
|
|
818
|
+
const o = d.target, n = parseInt(o.value, 10);
|
|
819
|
+
n > 0 && (y.value.limit_per_page = n, y.value.limit_per_page = n, N());
|
|
788
820
|
};
|
|
789
|
-
function
|
|
790
|
-
if (!
|
|
791
|
-
const
|
|
792
|
-
let b =
|
|
793
|
-
for (const
|
|
794
|
-
b && typeof b == "object" &&
|
|
795
|
-
return
|
|
821
|
+
function A(d, o, n = null) {
|
|
822
|
+
if (!d) return o;
|
|
823
|
+
const _ = d.split(".");
|
|
824
|
+
let b = o;
|
|
825
|
+
for (const te of _)
|
|
826
|
+
b && typeof b == "object" && te in b ? b = b[te] : console.error(`Caminho inválido ou valor nulo em: ${d} na parte ${te}`);
|
|
827
|
+
return n && (b = n(b)), b;
|
|
796
828
|
}
|
|
797
|
-
function
|
|
798
|
-
return
|
|
829
|
+
function Me(d, o) {
|
|
830
|
+
return o && typeof o == "number" && o > 0 && typeof d == "string" && d.length > o ? d.substring(0, o) + "..." : d;
|
|
799
831
|
}
|
|
800
|
-
function oe(
|
|
801
|
-
for (const
|
|
802
|
-
|
|
803
|
-
const
|
|
804
|
-
|
|
832
|
+
function oe(d) {
|
|
833
|
+
for (const n in c.value)
|
|
834
|
+
n !== d && (c.value[n] = "none");
|
|
835
|
+
const o = c.value[d] || "none";
|
|
836
|
+
o === "none" ? c.value[d] = "increasing" : o === "increasing" ? c.value[d] = "decreasing" : c.value[d] = "none", N();
|
|
805
837
|
}
|
|
806
|
-
function
|
|
807
|
-
|
|
838
|
+
function Se(d) {
|
|
839
|
+
d > 0 ? (y.value.limit_per_page = d, N()) : console.warn("O limite deve ser um número maior que zero.");
|
|
808
840
|
}
|
|
809
|
-
function
|
|
810
|
-
|
|
841
|
+
function $e(d) {
|
|
842
|
+
y.value.search = d, N();
|
|
811
843
|
}
|
|
812
|
-
function
|
|
813
|
-
|
|
844
|
+
function ze(d) {
|
|
845
|
+
y.value.filter = d, N();
|
|
814
846
|
}
|
|
815
|
-
function
|
|
816
|
-
|
|
847
|
+
function Be(d) {
|
|
848
|
+
d >= 0 && d <= Math.ceil(y.value.count / y.value.limit_per_page) ? (y.value.current_page = d, L()) : console.warn("Número de página inválido.");
|
|
817
849
|
}
|
|
818
|
-
function
|
|
819
|
-
let
|
|
820
|
-
return
|
|
850
|
+
function Te() {
|
|
851
|
+
let d = $.value.length;
|
|
852
|
+
return s.value.use_checkbox && (d += 1), s.value.use_expandable_items && (d += 1), d;
|
|
821
853
|
}
|
|
822
|
-
function
|
|
823
|
-
|
|
854
|
+
function Ve() {
|
|
855
|
+
w("tradePage"), L();
|
|
824
856
|
}
|
|
825
|
-
const
|
|
826
|
-
const
|
|
827
|
-
if (
|
|
828
|
-
for (const [
|
|
829
|
-
typeof b == "function" && b(
|
|
830
|
-
return
|
|
857
|
+
const G = (d, o) => {
|
|
858
|
+
const n = [d.class_item || ""];
|
|
859
|
+
if (d.click && n.push("cursor-pointer"), d.class_rules)
|
|
860
|
+
for (const [_, b] of Object.entries(d.class_rules))
|
|
861
|
+
typeof b == "function" && b(o) && n.push(_);
|
|
862
|
+
return n.join(" ").trim();
|
|
831
863
|
};
|
|
832
|
-
|
|
833
|
-
execute:
|
|
834
|
-
reSearch:
|
|
835
|
-
pagination:
|
|
836
|
-
set_limit_per_page:
|
|
837
|
-
set_search:
|
|
838
|
-
set_filter:
|
|
839
|
-
set_page:
|
|
840
|
-
default_params:
|
|
841
|
-
selected_items:
|
|
842
|
-
atLeastOneSelected:
|
|
843
|
-
expand_item_toggle:
|
|
844
|
-
close_all_expanded_items:
|
|
845
|
-
selectAllCheckbox:
|
|
864
|
+
i({
|
|
865
|
+
execute: L,
|
|
866
|
+
reSearch: N,
|
|
867
|
+
pagination: Ae(y),
|
|
868
|
+
set_limit_per_page: Se,
|
|
869
|
+
set_search: $e,
|
|
870
|
+
set_filter: ze,
|
|
871
|
+
set_page: Be,
|
|
872
|
+
default_params: he,
|
|
873
|
+
selected_items: O,
|
|
874
|
+
atLeastOneSelected: ye,
|
|
875
|
+
expand_item_toggle: F,
|
|
876
|
+
close_all_expanded_items: U,
|
|
877
|
+
selectAllCheckbox: ne
|
|
846
878
|
});
|
|
847
|
-
const
|
|
879
|
+
const ie = C(!1);
|
|
848
880
|
return X(
|
|
849
|
-
() =>
|
|
881
|
+
() => s.value.add_params,
|
|
850
882
|
() => {
|
|
851
|
-
|
|
852
|
-
|
|
883
|
+
ie.value ? N() : (ie.value = !0, _e(() => {
|
|
884
|
+
N();
|
|
853
885
|
}));
|
|
854
886
|
},
|
|
855
|
-
{ deep: !0, immediate:
|
|
856
|
-
), (
|
|
887
|
+
{ deep: !0, immediate: s.value.immediate }
|
|
888
|
+
), (d, o) => (t(), l("div", null, [
|
|
857
889
|
e("div", {
|
|
858
|
-
class:
|
|
890
|
+
class: f(["", s.value.class_container])
|
|
859
891
|
}, [
|
|
860
|
-
|
|
892
|
+
P(d.$slots, "default", {}, void 0, !0),
|
|
861
893
|
e("div", {
|
|
862
|
-
class:
|
|
894
|
+
class: f(["", s.value.class_content])
|
|
863
895
|
}, [
|
|
864
896
|
e("div", {
|
|
865
|
-
class:
|
|
897
|
+
class: f([s.value.class_filters, "d-flex justify-content-between align-items-start"])
|
|
866
898
|
}, [
|
|
867
|
-
|
|
868
|
-
changePageSize:
|
|
869
|
-
limit_per_page:
|
|
899
|
+
P(d.$slots, "pageSize", {
|
|
900
|
+
changePageSize: re,
|
|
901
|
+
limit_per_page: y.value.limit_per_page
|
|
870
902
|
}, () => [
|
|
871
903
|
e("div", {
|
|
872
|
-
class:
|
|
904
|
+
class: f(["text-secondary", s.value.class_page_size])
|
|
873
905
|
}, [
|
|
874
|
-
|
|
875
|
-
e("div",
|
|
876
|
-
|
|
906
|
+
I(k(s.value.first_text_page_size) + " ", 1),
|
|
907
|
+
e("div", wt, [
|
|
908
|
+
ce(e("input", {
|
|
877
909
|
class: "form-control form-control-sm",
|
|
878
|
-
onChange:
|
|
879
|
-
"onUpdate:modelValue":
|
|
910
|
+
onChange: re,
|
|
911
|
+
"onUpdate:modelValue": o[0] || (o[0] = (n) => y.value.limit_per_page = n),
|
|
880
912
|
min: "1",
|
|
881
913
|
size: "3",
|
|
882
914
|
"aria-label": "Número de registros por página",
|
|
883
915
|
type: "number"
|
|
884
916
|
}, null, 544), [
|
|
885
917
|
[
|
|
886
|
-
|
|
887
|
-
|
|
918
|
+
pe,
|
|
919
|
+
y.value.limit_per_page,
|
|
888
920
|
void 0,
|
|
889
921
|
{ lazy: !0 }
|
|
890
922
|
]
|
|
891
923
|
])
|
|
892
924
|
]),
|
|
893
|
-
|
|
925
|
+
I(" " + k(s.value.second_text_page_size), 1)
|
|
894
926
|
], 2)
|
|
895
927
|
], !0),
|
|
896
|
-
|
|
897
|
-
Y(
|
|
898
|
-
search:
|
|
899
|
-
"onUpdate:search":
|
|
900
|
-
filter:
|
|
901
|
-
"onUpdate:filter":
|
|
902
|
-
list_filter:
|
|
903
|
-
item_use:
|
|
904
|
-
onSearch:
|
|
905
|
-
deactivate_search_on_clear:
|
|
906
|
-
placeholder_search:
|
|
907
|
-
deactivate_search_empty:
|
|
908
|
-
onClickedClearSearch:
|
|
928
|
+
P(d.$slots, "fieldMiddle", {}, void 0, !0),
|
|
929
|
+
Y(tt, {
|
|
930
|
+
search: y.value.search,
|
|
931
|
+
"onUpdate:search": o[1] || (o[1] = (n) => y.value.search = n),
|
|
932
|
+
filter: y.value.filter,
|
|
933
|
+
"onUpdate:filter": o[2] || (o[2] = (n) => y.value.filter = n),
|
|
934
|
+
list_filter: s.value.list_filter,
|
|
935
|
+
item_use: xe.value,
|
|
936
|
+
onSearch: h(N),
|
|
937
|
+
deactivate_search_on_clear: s.value.deactivate_search_on_clear,
|
|
938
|
+
placeholder_search: s.value.placeholder_search,
|
|
939
|
+
deactivate_search_empty: s.value.deactivate_search_empty,
|
|
940
|
+
onClickedClearSearch: o[3] || (o[3] = (n) => d.$emit("clickedClearSearch"))
|
|
909
941
|
}, null, 8, ["search", "filter", "list_filter", "item_use", "onSearch", "deactivate_search_on_clear", "placeholder_search", "deactivate_search_empty"])
|
|
910
942
|
], 2),
|
|
911
|
-
|
|
912
|
-
selected_items:
|
|
913
|
-
clearSelection: () =>
|
|
943
|
+
P(d.$slots, "item-selected-info", {
|
|
944
|
+
selected_items: h(O),
|
|
945
|
+
clearSelection: () => O.value = []
|
|
914
946
|
}, () => [
|
|
915
|
-
|
|
916
|
-
e("h4",
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
e("span",
|
|
947
|
+
s.value.use_checkbox && h(O).length > 0 && !s.value.deactivate_selected_info ? (t(), l("div", xt, [
|
|
948
|
+
e("h4", bt, [
|
|
949
|
+
o[10] || (o[10] = e("strong", null, "oi Itens Selecionados:", -1)),
|
|
950
|
+
o[11] || (o[11] = I()),
|
|
951
|
+
e("span", Ct, k(h(O).length), 1)
|
|
920
952
|
]),
|
|
921
953
|
e("a", {
|
|
922
954
|
class: "cursor-pointer",
|
|
923
|
-
onClick:
|
|
924
|
-
}, [...
|
|
925
|
-
|
|
955
|
+
onClick: o[4] || (o[4] = (n) => O.value = [])
|
|
956
|
+
}, [...o[12] || (o[12] = [
|
|
957
|
+
Pe('<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-2f28fa64><path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-2f28fa64></path><path d="M4 7l16 0" data-v-2f28fa64></path><path d="M10 11l0 6" data-v-2f28fa64></path><path d="M14 11l0 6" data-v-2f28fa64></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12" data-v-2f28fa64></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3" data-v-2f28fa64></path></svg> Limpar Seleção', 2)
|
|
926
958
|
])])
|
|
927
959
|
])) : x("", !0)
|
|
928
960
|
], !0),
|
|
929
|
-
|
|
961
|
+
h(fe) ? (t(), W(kt, {
|
|
930
962
|
key: 0,
|
|
931
|
-
columns:
|
|
932
|
-
limit:
|
|
933
|
-
type_loading:
|
|
934
|
-
custom_loading:
|
|
935
|
-
class_table:
|
|
936
|
-
attempt:
|
|
937
|
-
pagination:
|
|
938
|
-
}, null, 8, ["columns", "limit", "type_loading", "custom_loading", "class_table", "attempt", "pagination"])) :
|
|
939
|
-
|
|
940
|
-
|
|
963
|
+
columns: $.value,
|
|
964
|
+
limit: y.value.limit_per_page,
|
|
965
|
+
type_loading: s.value.type_loading,
|
|
966
|
+
custom_loading: s.value.custom_loading,
|
|
967
|
+
class_table: s.value.class_table,
|
|
968
|
+
attempt: h(R),
|
|
969
|
+
pagination: y.value
|
|
970
|
+
}, null, 8, ["columns", "limit", "type_loading", "custom_loading", "class_table", "attempt", "pagination"])) : h(S) ? (t(), l("div", Mt, [
|
|
971
|
+
o[13] || (o[13] = e("h4", { class: "text-danger" }, "Ocorreu um Erro", -1)),
|
|
972
|
+
h(R) ? (t(), l("p", St, " Não foi possível carregar os dados após " + k(h(R).total) + " tentativa(s). ", 1)) : (t(), l("p", $t, " Não foi possível carregar os dados. Verifique sua conexão. ")),
|
|
941
973
|
e("button", {
|
|
942
974
|
class: "btn btn-primary mt-2",
|
|
943
|
-
onClick:
|
|
944
|
-
(...
|
|
975
|
+
onClick: o[5] || (o[5] = //@ts-ignore
|
|
976
|
+
(...n) => h(L) && h(L)(...n))
|
|
945
977
|
}, " Tentar Novamente ")
|
|
946
|
-
])) :
|
|
947
|
-
|
|
978
|
+
])) : h(D) ? (t(), l("div", zt, [
|
|
979
|
+
h(D).length > 0 ? (t(), l("div", Bt, [
|
|
948
980
|
e("table", {
|
|
949
|
-
class:
|
|
981
|
+
class: f(["table table-vcenter table-selectable", s.value.class_table])
|
|
950
982
|
}, [
|
|
951
983
|
e("thead", null, [
|
|
952
|
-
Y(
|
|
953
|
-
modelValue:
|
|
954
|
-
"onUpdate:modelValue":
|
|
984
|
+
Y(h(Ke), {
|
|
985
|
+
modelValue: ee.value,
|
|
986
|
+
"onUpdate:modelValue": o[7] || (o[7] = (n) => ee.value = n),
|
|
955
987
|
tag: "tr",
|
|
956
988
|
"item-key": "header",
|
|
957
989
|
animation: 400,
|
|
958
990
|
"ghost-class": "ghost-item",
|
|
959
991
|
"drag-class": "dragging-item",
|
|
960
|
-
onStart:
|
|
961
|
-
onEnd:
|
|
992
|
+
onStart: o[8] || (o[8] = (n) => q.value = !0),
|
|
993
|
+
onEnd: o[9] || (o[9] = () => be())
|
|
962
994
|
}, {
|
|
963
|
-
header:
|
|
964
|
-
|
|
965
|
-
|
|
995
|
+
header: H(() => [
|
|
996
|
+
s.value.use_expandable_items ? (t(), l("th", Tt)) : x("", !0),
|
|
997
|
+
s.value.use_checkbox ? (t(), l("th", Vt, [
|
|
966
998
|
e("input", {
|
|
967
999
|
class: "form-check-input m-0",
|
|
968
1000
|
type: "checkbox",
|
|
969
1001
|
ref_key: "selectAllCheckbox",
|
|
970
|
-
ref:
|
|
971
|
-
onChange:
|
|
972
|
-
(...
|
|
1002
|
+
ref: ne,
|
|
1003
|
+
onChange: o[6] || (o[6] = //@ts-ignore
|
|
1004
|
+
(...n) => h(se) && h(se)(...n)),
|
|
973
1005
|
"aria-label": "Selecionar todos os itens na página"
|
|
974
1006
|
}, null, 544)
|
|
975
1007
|
])) : x("", !0)
|
|
976
1008
|
]),
|
|
977
|
-
item:
|
|
978
|
-
|
|
1009
|
+
item: H(({ element: n }) => [
|
|
1010
|
+
n.use_ordering ? (t(), l("th", {
|
|
979
1011
|
key: 0,
|
|
980
|
-
class:
|
|
1012
|
+
class: f(["header-draggable", n.class_column])
|
|
981
1013
|
}, [
|
|
982
|
-
e("div",
|
|
983
|
-
e("span", null,
|
|
1014
|
+
e("div", Dt, [
|
|
1015
|
+
e("span", null, k(n.header), 1),
|
|
984
1016
|
e("span", {
|
|
985
|
-
onClick: () => oe(
|
|
1017
|
+
onClick: () => oe(n.header),
|
|
986
1018
|
class: "ms-2 cursor-pointer"
|
|
987
1019
|
}, [
|
|
988
|
-
!
|
|
1020
|
+
!c.value[n.header] || c.value[n.header] === "none" ? (t(), l("svg", jt, [...o[14] || (o[14] = [
|
|
989
1021
|
e("path", { d: "m3 8 4-4 4 4" }, null, -1),
|
|
990
1022
|
e("path", { d: "m11 16-4 4-4-4" }, null, -1),
|
|
991
1023
|
e("path", { d: "M7 4v16" }, null, -1),
|
|
992
1024
|
e("path", { d: "M15 8h6" }, null, -1),
|
|
993
1025
|
e("path", { d: "M15 16h6" }, null, -1),
|
|
994
1026
|
e("path", { d: "M13 12h8" }, null, -1)
|
|
995
|
-
])])) :
|
|
1027
|
+
])])) : c.value[n.header] === "decreasing" ? (t(), l("svg", It, [...o[15] || (o[15] = [
|
|
996
1028
|
e("path", { d: "m3 16 4 4 4-4" }, null, -1),
|
|
997
1029
|
e("path", { d: "M7 20V4" }, null, -1),
|
|
998
1030
|
e("path", { d: "M11 4h10" }, null, -1),
|
|
999
1031
|
e("path", { d: "M11 8h7" }, null, -1),
|
|
1000
1032
|
e("path", { d: "M11 12h4" }, null, -1)
|
|
1001
|
-
])])) :
|
|
1033
|
+
])])) : c.value[n.header] === "increasing" ? (t(), l("svg", Nt, [...o[16] || (o[16] = [
|
|
1002
1034
|
e("path", { d: "m3 8 4-4 4 4" }, null, -1),
|
|
1003
1035
|
e("path", { d: "M7 4v16" }, null, -1),
|
|
1004
1036
|
e("path", { d: "M11 12h4" }, null, -1),
|
|
1005
1037
|
e("path", { d: "M11 16h7" }, null, -1),
|
|
1006
1038
|
e("path", { d: "M11 20h10" }, null, -1)
|
|
1007
1039
|
])])) : x("", !0)
|
|
1008
|
-
], 8,
|
|
1040
|
+
], 8, Et)
|
|
1009
1041
|
])
|
|
1010
|
-
], 2)) : (t(),
|
|
1042
|
+
], 2)) : (t(), l("th", {
|
|
1011
1043
|
key: 1,
|
|
1012
|
-
class:
|
|
1013
|
-
},
|
|
1044
|
+
class: f(["header-draggable", n.class_column])
|
|
1045
|
+
}, k(n.header), 3))
|
|
1014
1046
|
]),
|
|
1015
|
-
footer:
|
|
1016
|
-
(t(!0),
|
|
1017
|
-
key:
|
|
1047
|
+
footer: H(() => [
|
|
1048
|
+
(t(!0), l(T, null, j(Z.value, (n) => (t(), l(T, {
|
|
1049
|
+
key: n.field || n.header
|
|
1018
1050
|
}, [
|
|
1019
|
-
|
|
1051
|
+
n.use_ordering ? (t(), l("th", {
|
|
1020
1052
|
key: 0,
|
|
1021
|
-
class:
|
|
1053
|
+
class: f(["header-locked header-ordering", n.class_column])
|
|
1022
1054
|
}, [
|
|
1023
|
-
e("div",
|
|
1024
|
-
e("span", null,
|
|
1055
|
+
e("div", At, [
|
|
1056
|
+
e("span", null, k(n.header), 1),
|
|
1025
1057
|
e("span", {
|
|
1026
|
-
onClick: () => oe(
|
|
1058
|
+
onClick: () => oe(n.header),
|
|
1027
1059
|
class: "ms-2 cursor-pointer"
|
|
1028
1060
|
}, [
|
|
1029
|
-
!
|
|
1061
|
+
!c.value[n.header] || c.value[n.header] === "none" ? (t(), l("svg", qt, [...o[17] || (o[17] = [
|
|
1030
1062
|
e("path", { d: "m3 8 4-4 4 4" }, null, -1),
|
|
1031
1063
|
e("path", { d: "m11 16-4 4-4-4" }, null, -1),
|
|
1032
1064
|
e("path", { d: "M7 4v16" }, null, -1),
|
|
1033
1065
|
e("path", { d: "M15 8h6" }, null, -1),
|
|
1034
1066
|
e("path", { d: "M15 16h6" }, null, -1),
|
|
1035
1067
|
e("path", { d: "M13 12h8" }, null, -1)
|
|
1036
|
-
])])) :
|
|
1068
|
+
])])) : c.value[n.header] === "decreasing" ? (t(), l("svg", Lt, [...o[18] || (o[18] = [
|
|
1037
1069
|
e("path", { d: "m3 16 4 4 4-4" }, null, -1),
|
|
1038
1070
|
e("path", { d: "M7 20V4" }, null, -1),
|
|
1039
1071
|
e("path", { d: "M11 4h10" }, null, -1),
|
|
1040
1072
|
e("path", { d: "M11 8h7" }, null, -1),
|
|
1041
1073
|
e("path", { d: "M11 12h4" }, null, -1)
|
|
1042
|
-
])])) :
|
|
1074
|
+
])])) : c.value[n.header] === "increasing" ? (t(), l("svg", Ot, [...o[19] || (o[19] = [
|
|
1043
1075
|
e("path", { d: "m3 8 4-4 4 4" }, null, -1),
|
|
1044
1076
|
e("path", { d: "M7 4v16" }, null, -1),
|
|
1045
1077
|
e("path", { d: "M11 12h4" }, null, -1),
|
|
1046
1078
|
e("path", { d: "M11 16h7" }, null, -1),
|
|
1047
1079
|
e("path", { d: "M11 20h10" }, null, -1)
|
|
1048
1080
|
])])) : x("", !0)
|
|
1049
|
-
], 8,
|
|
1081
|
+
], 8, Pt)
|
|
1050
1082
|
])
|
|
1051
|
-
], 2)) : (t(),
|
|
1083
|
+
], 2)) : (t(), l("th", {
|
|
1052
1084
|
key: 1,
|
|
1053
|
-
class:
|
|
1054
|
-
},
|
|
1085
|
+
class: f(["header-locked", n.class_column])
|
|
1086
|
+
}, k(n.header), 3))
|
|
1055
1087
|
], 64))), 128))
|
|
1056
1088
|
]),
|
|
1057
1089
|
_: 1
|
|
1058
1090
|
}, 8, ["modelValue"])
|
|
1059
1091
|
]),
|
|
1060
1092
|
e("tbody", null, [
|
|
1061
|
-
(t(!0),
|
|
1062
|
-
key:
|
|
1093
|
+
(t(!0), l(T, null, j(h(D), (n) => (t(), l(T, {
|
|
1094
|
+
key: n[s.value.item_key]
|
|
1063
1095
|
}, [
|
|
1064
|
-
Y(
|
|
1096
|
+
Y(qe, {
|
|
1065
1097
|
tag: "tr",
|
|
1066
|
-
name:
|
|
1098
|
+
name: q.value ? "column-move" : ""
|
|
1067
1099
|
}, {
|
|
1068
|
-
default:
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
item:
|
|
1072
|
-
isExpanded:
|
|
1073
|
-
expand_item_toggle:
|
|
1100
|
+
default: H(() => [
|
|
1101
|
+
s.value.use_expandable_items ? (t(), l("td", Ht, [
|
|
1102
|
+
P(d.$slots, "expand-button", {
|
|
1103
|
+
item: n,
|
|
1104
|
+
isExpanded: h(K)(n),
|
|
1105
|
+
expand_item_toggle: h(F)
|
|
1074
1106
|
}, () => [
|
|
1075
1107
|
e("button", {
|
|
1076
1108
|
type: "button",
|
|
1077
|
-
class:
|
|
1078
|
-
onClick: (
|
|
1109
|
+
class: f(["btn-clean btn-icon-anim", { "is-expanded": h(K)(n) }]),
|
|
1110
|
+
onClick: (_) => h(F)(n)
|
|
1079
1111
|
}, [
|
|
1080
|
-
|
|
1112
|
+
s.value.type_button_expand === "arrow" ? (t(), l("svg", Ut, [...o[20] || (o[20] = [
|
|
1081
1113
|
e("path", {
|
|
1082
1114
|
stroke: "none",
|
|
1083
1115
|
d: "M0 0h24v24H0z",
|
|
1084
1116
|
fill: "none"
|
|
1085
1117
|
}, null, -1),
|
|
1086
1118
|
e("path", { d: "M9 6l6 6l-6 6" }, null, -1)
|
|
1087
|
-
])])) : (t(),
|
|
1119
|
+
])])) : (t(), l("svg", Kt, [...o[21] || (o[21] = [
|
|
1088
1120
|
e("path", {
|
|
1089
1121
|
stroke: "none",
|
|
1090
1122
|
d: "M0 0h24v24H0z",
|
|
@@ -1096,142 +1128,142 @@ const nt = { class: "loading-container" }, lt = { key: 0 }, st = { key: 2 }, ot
|
|
|
1096
1128
|
}, null, -1),
|
|
1097
1129
|
e("path", { d: "M5 12l14 0" }, null, -1)
|
|
1098
1130
|
])]))
|
|
1099
|
-
], 10,
|
|
1131
|
+
], 10, Ft)
|
|
1100
1132
|
], !0)
|
|
1101
1133
|
])) : x("", !0),
|
|
1102
|
-
|
|
1134
|
+
s.value.use_checkbox ? (t(), l("td", Yt, [
|
|
1103
1135
|
e("input", {
|
|
1104
1136
|
class: "form-check-input m-0",
|
|
1105
1137
|
type: "checkbox",
|
|
1106
|
-
checked:
|
|
1107
|
-
onChange: (
|
|
1138
|
+
checked: h(le)(n),
|
|
1139
|
+
onChange: (_) => h(ke)(n),
|
|
1108
1140
|
"aria-label": "Selecionar este item"
|
|
1109
|
-
}, null, 40,
|
|
1141
|
+
}, null, 40, Xt)
|
|
1110
1142
|
])) : x("", !0),
|
|
1111
|
-
(t(!0),
|
|
1112
|
-
key:
|
|
1113
|
-
class:
|
|
1143
|
+
(t(!0), l(T, null, j(we.value, (_) => (t(), l("td", {
|
|
1144
|
+
key: _.field || _.header,
|
|
1145
|
+
class: f(_.class_row)
|
|
1114
1146
|
}, [
|
|
1115
|
-
|
|
1147
|
+
_.bodySlot ? (t(), W(me(_.bodySlot), {
|
|
1116
1148
|
key: 0,
|
|
1117
|
-
item:
|
|
1118
|
-
"is-selected":
|
|
1119
|
-
}, null, 8, ["item", "is-selected"])) :
|
|
1149
|
+
item: n,
|
|
1150
|
+
"is-selected": h(le)(n)
|
|
1151
|
+
}, null, 8, ["item", "is-selected"])) : _.type === "text" ? (t(), l("span", {
|
|
1120
1152
|
key: 1,
|
|
1121
|
-
onClick: (b) =>
|
|
1122
|
-
class:
|
|
1123
|
-
},
|
|
1153
|
+
onClick: (b) => _.click ? _.click(n) : null,
|
|
1154
|
+
class: f(G(_, n))
|
|
1155
|
+
}, k(Me(A(_.field, n, _.transform_function), _.limite_text ?? null)), 11, Gt)) : _.type === "date" ? (t(), l("span", {
|
|
1124
1156
|
key: 2,
|
|
1125
|
-
onClick: (b) =>
|
|
1126
|
-
class:
|
|
1157
|
+
onClick: (b) => _.click ? _.click(n) : null,
|
|
1158
|
+
class: f(G(_, n))
|
|
1127
1159
|
}, [
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1160
|
+
_.format === "complete" ? (t(), l("span", Jt, k(new Date(A(_.field, n)).toLocaleString()), 1)) : x("", !0),
|
|
1161
|
+
_.format === "simple" ? (t(), l("span", Qt, k(new Date(A(
|
|
1162
|
+
_.field,
|
|
1163
|
+
n
|
|
1132
1164
|
)).toLocaleDateString()), 1)) : x("", !0)
|
|
1133
|
-
], 10,
|
|
1165
|
+
], 10, Wt)) : _.type === "html" ? (t(), l("div", {
|
|
1134
1166
|
key: 3,
|
|
1135
|
-
onClick: (b) =>
|
|
1136
|
-
class:
|
|
1137
|
-
innerHTML:
|
|
1138
|
-
}, null, 10,
|
|
1167
|
+
onClick: (b) => _.click ? _.click(n) : null,
|
|
1168
|
+
class: f(G(_, n)),
|
|
1169
|
+
innerHTML: A(_.field, n)
|
|
1170
|
+
}, null, 10, Rt)) : _.type === "img" ? (t(), l("div", {
|
|
1139
1171
|
key: 4,
|
|
1140
|
-
onClick: (b) =>
|
|
1141
|
-
class:
|
|
1172
|
+
onClick: (b) => _.click ? _.click(n) : null,
|
|
1173
|
+
class: f(G(_, n))
|
|
1142
1174
|
}, [
|
|
1143
|
-
|
|
1175
|
+
A(_.field, n) ? (t(), l("div", Le({
|
|
1144
1176
|
key: 0,
|
|
1145
1177
|
ref_for: !0
|
|
1146
|
-
},
|
|
1178
|
+
}, _.deactivate_img_preview ? {
|
|
1147
1179
|
class: "container-img"
|
|
1148
1180
|
} : {
|
|
1149
|
-
onMouseover: (b) =>
|
|
1150
|
-
onMousemove:
|
|
1151
|
-
onMouseleave: v
|
|
1181
|
+
onMouseover: (b) => h(E)(b, A(_.field, n)),
|
|
1182
|
+
onMousemove: h(B),
|
|
1183
|
+
onMouseleave: h(v),
|
|
1152
1184
|
class: "container-img container-img-preview"
|
|
1153
1185
|
}), [
|
|
1154
1186
|
e("img", {
|
|
1155
1187
|
class: "img-tamanho",
|
|
1156
|
-
src:
|
|
1157
|
-
}, null, 8,
|
|
1188
|
+
src: A(_.field, n)
|
|
1189
|
+
}, null, 8, ea),
|
|
1158
1190
|
e("img", {
|
|
1159
1191
|
class: "img-tamanho-cover",
|
|
1160
|
-
src:
|
|
1161
|
-
}, null, 8,
|
|
1162
|
-
|
|
1192
|
+
src: A(_.field, n)
|
|
1193
|
+
}, null, 8, ta),
|
|
1194
|
+
o[22] || (o[22] = e("div", { class: "bg-img" }, null, -1))
|
|
1163
1195
|
], 16)) : x("", !0)
|
|
1164
|
-
], 10,
|
|
1165
|
-
|
|
1166
|
-
e("span",
|
|
1167
|
-
|
|
1196
|
+
], 10, Zt)) : (t(), l("span", aa, [
|
|
1197
|
+
o[23] || (o[23] = I("tipo ", -1)),
|
|
1198
|
+
e("span", na, k(_.type), 1),
|
|
1199
|
+
o[24] || (o[24] = I(" não suportado", -1))
|
|
1168
1200
|
]))
|
|
1169
1201
|
], 2))), 128))
|
|
1170
1202
|
]),
|
|
1171
1203
|
_: 2
|
|
1172
1204
|
}, 1032, ["name"]),
|
|
1173
|
-
Y(
|
|
1174
|
-
name: "expand-item-" +
|
|
1175
|
-
css: !
|
|
1205
|
+
Y(Oe, {
|
|
1206
|
+
name: "expand-item-" + s.value.type_animation_expand,
|
|
1207
|
+
css: !s.value.deactivate_animation_expand
|
|
1176
1208
|
}, {
|
|
1177
|
-
default:
|
|
1178
|
-
|
|
1209
|
+
default: H(() => [
|
|
1210
|
+
h(K)(n) ? (t(), l("tr", {
|
|
1179
1211
|
key: 0,
|
|
1180
|
-
id: "expand-item-" +
|
|
1212
|
+
id: "expand-item-" + n[s.value.item_key],
|
|
1181
1213
|
class: "expanded-item-row"
|
|
1182
1214
|
}, [
|
|
1183
1215
|
e("td", {
|
|
1184
|
-
colspan:
|
|
1216
|
+
colspan: Te()
|
|
1185
1217
|
}, [
|
|
1186
|
-
|
|
1187
|
-
], 8,
|
|
1188
|
-
], 8,
|
|
1218
|
+
P(d.$slots, "after-row", { item: n }, void 0, !0)
|
|
1219
|
+
], 8, sa)
|
|
1220
|
+
], 8, la)) : x("", !0)
|
|
1189
1221
|
]),
|
|
1190
1222
|
_: 2
|
|
1191
1223
|
}, 1032, ["name", "css"])
|
|
1192
1224
|
], 64))), 128))
|
|
1193
1225
|
])
|
|
1194
1226
|
], 2)
|
|
1195
|
-
])) :
|
|
1196
|
-
|
|
1197
|
-
])) : (t(),
|
|
1227
|
+
])) : h(ge) === !1 ? (t(), l("div", ra, [
|
|
1228
|
+
P(d.$slots, "idle-state", {}, void 0, !0)
|
|
1229
|
+
])) : (t(), l("div", oa, [...o[25] || (o[25] = [
|
|
1198
1230
|
e("p", { class: "m-0" }, "Nenhum item encontrado.", -1)
|
|
1199
1231
|
])]))
|
|
1200
1232
|
])) : x("", !0)
|
|
1201
1233
|
], 2)
|
|
1202
1234
|
], 2),
|
|
1203
|
-
|
|
1204
|
-
pagination:
|
|
1205
|
-
tradePage:
|
|
1206
|
-
error:
|
|
1235
|
+
P(d.$slots, "pagination", {
|
|
1236
|
+
pagination: y.value,
|
|
1237
|
+
tradePage: h(L),
|
|
1238
|
+
error: h(S)
|
|
1207
1239
|
}, () => [
|
|
1208
|
-
!
|
|
1240
|
+
!h(S) && y.value.count > 0 ? (t(), l("div", {
|
|
1209
1241
|
key: 0,
|
|
1210
|
-
class:
|
|
1242
|
+
class: f(["px-3", s.value.class_pagination])
|
|
1211
1243
|
}, [
|
|
1212
|
-
Y(
|
|
1213
|
-
page_starts_at:
|
|
1244
|
+
Y(Ue, {
|
|
1245
|
+
page_starts_at: s.value.page_starts_at,
|
|
1214
1246
|
filtering: !0,
|
|
1215
|
-
pagination:
|
|
1216
|
-
onTradePage:
|
|
1247
|
+
pagination: y.value,
|
|
1248
|
+
onTradePage: Ve
|
|
1217
1249
|
}, null, 8, ["page_starts_at", "pagination"])
|
|
1218
1250
|
], 2)) : x("", !0)
|
|
1219
1251
|
], !0),
|
|
1220
|
-
|
|
1252
|
+
h(m) ? (t(), l("div", {
|
|
1221
1253
|
key: 0,
|
|
1222
1254
|
class: "image-preview-container",
|
|
1223
|
-
style:
|
|
1255
|
+
style: He(h(V))
|
|
1224
1256
|
}, [
|
|
1225
1257
|
e("img", {
|
|
1226
|
-
src:
|
|
1258
|
+
src: h(p),
|
|
1227
1259
|
alt: "Preview",
|
|
1228
1260
|
class: "image-preview-large"
|
|
1229
|
-
}, null, 8,
|
|
1261
|
+
}, null, 8, ia)
|
|
1230
1262
|
], 4)) : x("", !0)
|
|
1231
1263
|
]));
|
|
1232
1264
|
}
|
|
1233
|
-
}),
|
|
1265
|
+
}), va = /* @__PURE__ */ ae(da, [["__scopeId", "data-v-2f28fa64"]]);
|
|
1234
1266
|
export {
|
|
1235
|
-
|
|
1236
|
-
|
|
1267
|
+
ma as VColumn,
|
|
1268
|
+
va as VDataTable
|
|
1237
1269
|
};
|