v-sistec-features 1.27.2 → 1.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.d.ts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/v-sistec-features.css +1 -1
- package/dist/vDataTable.d.ts +4 -0
- package/dist/vDataTable.js +841 -776
- package/package.json +1 -1
- package/src/DatatableVue/components/SearchDatatable.vue +0 -1
- package/src/DatatableVue/components/VDataTable.vue +7 -41
- package/src/DatatableVue/composables/useDataTableFetch.ts +184 -30
- package/src/DatatableVue/config/datatableDefaults.ts +6 -1
- package/src/DatatableVue/types/v-data-table.ts +20 -0
package/dist/vDataTable.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { _ as
|
|
3
|
-
import
|
|
4
|
-
import { D as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as R, useSlots as Ye, inject as Me, onMounted as $e, h as ge, computed as B, watch as J, resolveComponent as Ge, createElementBlock as r, openBlock as e, Fragment as E, createCommentVNode as C, createElementVNode as m, withModifiers as me, createBlock as $, resolveDynamicComponent as V, unref as t, withDirectives as Be, withKeys as Xe, vModelText as Te, renderList as A, withCtx as Z, createTextVNode as H, toDisplayString as O, normalizeClass as S, ref as I, nextTick as fe, normalizeProps as Ce, mergeProps as ve, Comment as We, Text as Qe, provide as Ze, readonly as Re, renderSlot as F, Teleport as ie, createVNode as se, TransitionGroup as et, Transition as tt, normalizeStyle as at } from "vue";
|
|
2
|
+
import { _ as he, P as nt } from "./Pagination-DtVDFQ07.js";
|
|
3
|
+
import st from "vuedraggable";
|
|
4
|
+
import { D as lt } from "./datatableConfig-BMFlKtgh.js";
|
|
5
|
+
const Oe = Symbol("v-datatable-key"), Sa = /* @__PURE__ */ R({
|
|
6
6
|
__name: "VColumn",
|
|
7
7
|
props: {
|
|
8
8
|
field: { default: null },
|
|
@@ -24,61 +24,61 @@ const Be = Symbol("v-datatable-key"), $a = /* @__PURE__ */ J({
|
|
|
24
24
|
class_rules: { default: () => ({}) },
|
|
25
25
|
start_hidden: { type: Boolean, default: !1 }
|
|
26
26
|
},
|
|
27
|
-
setup(
|
|
28
|
-
const
|
|
29
|
-
if (!
|
|
27
|
+
setup(d) {
|
|
28
|
+
const _ = crypto.randomUUID(), n = d, a = Ye(), c = Me(Oe);
|
|
29
|
+
if (!c)
|
|
30
30
|
throw new Error("VColumn deve ser usado dentro de um VDataTable.");
|
|
31
|
-
const
|
|
32
|
-
return
|
|
33
|
-
if (
|
|
31
|
+
const u = ["text", "img", "date", "html"];
|
|
32
|
+
return $e(() => {
|
|
33
|
+
if (n.field !== null && !n.field)
|
|
34
34
|
throw new Error('A propriedade "field" é obrigatória em VColumn.');
|
|
35
|
-
if (!
|
|
35
|
+
if (!n.header)
|
|
36
36
|
throw new Error('A propriedade "header" é obrigatória em VColumn.');
|
|
37
|
-
if (
|
|
38
|
-
throw new Error(`O tipo "${
|
|
39
|
-
if (
|
|
40
|
-
if (
|
|
37
|
+
if (n.field !== null && !u.includes(n.type))
|
|
38
|
+
throw new Error(`O tipo "${n.type}" não é suportado em VColumn. Tipos suportados: text, img, date, html.`);
|
|
39
|
+
if (n.limite_text) {
|
|
40
|
+
if (n.type !== "text")
|
|
41
41
|
throw new Error('A propriedade "limite_text" só pode ser usada quando o tipo for "text".');
|
|
42
|
-
if (typeof
|
|
42
|
+
if (typeof n.limite_text == "string" && isNaN(Number(n.limite_text)))
|
|
43
43
|
throw new Error('A propriedade "limite_text" deve ser um número quando for uma string.');
|
|
44
|
-
if (isNaN(Number(
|
|
44
|
+
if (isNaN(Number(n.limite_text)) || Number(n.limite_text) <= 0)
|
|
45
45
|
throw new Error('A propriedade "limite_text" deve ser um número maior que 0.');
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
id:
|
|
49
|
-
field:
|
|
50
|
-
header:
|
|
51
|
-
type:
|
|
52
|
-
class_column:
|
|
53
|
-
class_row:
|
|
54
|
-
class_item:
|
|
55
|
-
click:
|
|
56
|
-
transform_function:
|
|
57
|
-
locked:
|
|
58
|
-
use_ordering:
|
|
59
|
-
param_ordering:
|
|
60
|
-
decreasing_value:
|
|
61
|
-
increasing_value:
|
|
62
|
-
class_rules:
|
|
63
|
-
bodySlot:
|
|
47
|
+
c.addColumn({
|
|
48
|
+
id: _,
|
|
49
|
+
field: n.field,
|
|
50
|
+
header: n.header,
|
|
51
|
+
type: n.type,
|
|
52
|
+
class_column: n.class_column,
|
|
53
|
+
class_row: n.class_row,
|
|
54
|
+
class_item: n.class_item,
|
|
55
|
+
click: n.click,
|
|
56
|
+
transform_function: n.transform_function,
|
|
57
|
+
locked: n.locked,
|
|
58
|
+
use_ordering: n.use_ordering,
|
|
59
|
+
param_ordering: n.param_ordering,
|
|
60
|
+
decreasing_value: n.decreasing_value,
|
|
61
|
+
increasing_value: n.increasing_value,
|
|
62
|
+
class_rules: n.class_rules,
|
|
63
|
+
bodySlot: a.body,
|
|
64
64
|
// colHeaderSlot é para o slot do header da coluna, que pode ser usado para colocar ícone de ordenação ou qualquer outra coisa que o usuário queira colocar no header da coluna
|
|
65
|
-
colHeaderSlot:
|
|
65
|
+
colHeaderSlot: a.col_header,
|
|
66
66
|
// colHeaderMidleSlot é para o slot do header da coluna, mas ele fica entre o texto do header e o ícone de ordenação, para o usuário colocar coisas entre eles
|
|
67
|
-
colHeaderMidleSlot:
|
|
68
|
-
...
|
|
69
|
-
...
|
|
70
|
-
...
|
|
71
|
-
start_hidden:
|
|
67
|
+
colHeaderMidleSlot: a.col_header_midle,
|
|
68
|
+
...n.type === "text" && { limite_text: Number(n.limite_text) },
|
|
69
|
+
...n.type === "img" && { deactivate_img_preview: n.deactivate_img_preview },
|
|
70
|
+
...n.type === "date" && { format: n.format },
|
|
71
|
+
start_hidden: n.start_hidden,
|
|
72
72
|
// se a coluna é opcional por padrão ela não é visível, mas o usuário pode escolher mostrar ela
|
|
73
|
-
visible: !
|
|
73
|
+
visible: !n.start_hidden
|
|
74
74
|
// Se start_hidden for true, ela não estará visível inicialmente
|
|
75
75
|
});
|
|
76
|
-
}), (
|
|
76
|
+
}), (w, p) => null;
|
|
77
77
|
}
|
|
78
|
-
}),
|
|
79
|
-
const
|
|
80
|
-
if (
|
|
81
|
-
return () =>
|
|
78
|
+
}), ot = new DOMParser(), rt = (d) => {
|
|
79
|
+
const n = ot.parseFromString(d, "image/svg+xml").documentElement;
|
|
80
|
+
if (n.tagName.toLowerCase() !== "svg")
|
|
81
|
+
return () => ge("span", {
|
|
82
82
|
style: {
|
|
83
83
|
backgroundColor: "red",
|
|
84
84
|
color: "white",
|
|
@@ -86,28 +86,28 @@ const Be = Symbol("v-datatable-key"), $a = /* @__PURE__ */ J({
|
|
|
86
86
|
textAlign: "center"
|
|
87
87
|
}
|
|
88
88
|
}, "Icon Error");
|
|
89
|
-
const
|
|
90
|
-
for (const
|
|
91
|
-
|
|
92
|
-
const
|
|
93
|
-
return (
|
|
94
|
-
const
|
|
95
|
-
return
|
|
96
|
-
...
|
|
97
|
-
...
|
|
98
|
-
...
|
|
99
|
-
class:
|
|
100
|
-
innerHTML:
|
|
89
|
+
const a = {};
|
|
90
|
+
for (const u of n.attributes)
|
|
91
|
+
a[u.name] = u.value;
|
|
92
|
+
const c = n.innerHTML;
|
|
93
|
+
return (u, { attrs: w }) => {
|
|
94
|
+
const p = a.class || "", T = w.class || "", f = [p, T].filter(Boolean).join(" "), { class: k, ...h } = a, { class: s, ...P } = w;
|
|
95
|
+
return ge("svg", {
|
|
96
|
+
...h,
|
|
97
|
+
...u,
|
|
98
|
+
...P,
|
|
99
|
+
class: f,
|
|
100
|
+
innerHTML: c
|
|
101
101
|
});
|
|
102
102
|
};
|
|
103
|
-
},
|
|
104
|
-
const
|
|
105
|
-
for (const
|
|
106
|
-
const
|
|
107
|
-
typeof
|
|
103
|
+
}, le = (d) => {
|
|
104
|
+
const _ = {};
|
|
105
|
+
for (const n in d) {
|
|
106
|
+
const a = d[n];
|
|
107
|
+
typeof a == "string" ? _[n] = rt(a) : typeof a == "object" && a !== null && (_[n] = le(a));
|
|
108
108
|
}
|
|
109
|
-
return
|
|
110
|
-
},
|
|
109
|
+
return _;
|
|
110
|
+
}, de = {
|
|
111
111
|
search: {
|
|
112
112
|
filter: '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-filter" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <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"> </path> </svg>',
|
|
113
113
|
clear: '<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-x"> <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M18 6l-12 12" /> <path d="M6 6l12 12" /> </svg>',
|
|
@@ -126,13 +126,13 @@ const Be = Symbol("v-datatable-key"), $a = /* @__PURE__ */ J({
|
|
|
126
126
|
increasing: ' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="m3 8 4-4 4 4"></path> <path d="M7 4v16"></path> <path d="M11 12h4"></path> <path d="M11 16h7"></path> <path d="M11 20h10"></path> </svg> '
|
|
127
127
|
},
|
|
128
128
|
column_manager: ' <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-columns" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M4 6l5.5 0" /> <path d="M4 10l5.5 0" /> <path d="M4 14l5.5 0" /> <path d="M4 18l5.5 0" /> <path d="M14.5 6l5.5 0" /> <path d="M14.5 10l5.5 0" /> <path d="M14.5 14l5.5 0" /> <path d="M14.5 18l5.5 0" /> </svg> '
|
|
129
|
-
},
|
|
129
|
+
}, it = { class: "input-icon" }, dt = ["placeholder"], ut = {
|
|
130
130
|
key: 1,
|
|
131
131
|
class: "input-icon-addon"
|
|
132
|
-
},
|
|
132
|
+
}, ct = {
|
|
133
133
|
key: 1,
|
|
134
134
|
class: "dropdown-menu"
|
|
135
|
-
},
|
|
135
|
+
}, _t = ["onClick"], pt = ["onClick"], mt = /* @__PURE__ */ R({
|
|
136
136
|
__name: "SearchDatatable",
|
|
137
137
|
props: {
|
|
138
138
|
search: {},
|
|
@@ -144,99 +144,99 @@ const Be = Symbol("v-datatable-key"), $a = /* @__PURE__ */ J({
|
|
|
144
144
|
deactivate_search_empty: { type: Boolean, default: !1 }
|
|
145
145
|
},
|
|
146
146
|
emits: ["update:search", "update:filter", "search", "clickedClearSearch"],
|
|
147
|
-
setup(
|
|
148
|
-
const
|
|
149
|
-
get: () =>
|
|
150
|
-
set: (
|
|
151
|
-
}),
|
|
152
|
-
get: () =>
|
|
153
|
-
set: (
|
|
147
|
+
setup(d, { emit: _ }) {
|
|
148
|
+
const n = le(de), a = d, c = _, u = B({
|
|
149
|
+
get: () => a.search,
|
|
150
|
+
set: (h) => c("update:search", h)
|
|
151
|
+
}), w = B({
|
|
152
|
+
get: () => a.filter,
|
|
153
|
+
set: (h) => c("update:filter", h)
|
|
154
154
|
});
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}),
|
|
158
|
-
() =>
|
|
159
|
-
(
|
|
160
|
-
Array.isArray(
|
|
161
|
-
|
|
162
|
-
}),
|
|
155
|
+
J(w, () => {
|
|
156
|
+
c("search");
|
|
157
|
+
}), J(
|
|
158
|
+
() => a.list_filter,
|
|
159
|
+
(h) => {
|
|
160
|
+
Array.isArray(h) ? (h.forEach((s, P) => {
|
|
161
|
+
s?.type === 1 && !s.to && console.error(`Filtro na posição ${P} é do tipo 'router-link' mas não possui a propriedade 'to'.`);
|
|
162
|
+
}), a.item_use.includes(2) && h.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.");
|
|
163
163
|
},
|
|
164
164
|
{ immediate: !0, deep: !0 }
|
|
165
165
|
);
|
|
166
|
-
function
|
|
167
|
-
|
|
166
|
+
function p(h) {
|
|
167
|
+
w.value === h ? w.value = "" : w.value = h;
|
|
168
168
|
}
|
|
169
|
-
function
|
|
170
|
-
|
|
169
|
+
function T() {
|
|
170
|
+
u.value = "", a.deactivate_search_on_clear || c("search"), c("clickedClearSearch");
|
|
171
171
|
}
|
|
172
|
-
function
|
|
173
|
-
|
|
172
|
+
function f(h) {
|
|
173
|
+
h.click && typeof h.click == "function" ? h.click() : console.error("O filtro selecionado não possui uma função de clique válida.");
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
|
|
175
|
+
function k() {
|
|
176
|
+
a.deactivate_search_empty && u.value.trim() === "" || c("search");
|
|
177
177
|
}
|
|
178
|
-
return (
|
|
179
|
-
const
|
|
180
|
-
return e(),
|
|
181
|
-
|
|
178
|
+
return (h, s) => {
|
|
179
|
+
const P = Ge("router-link");
|
|
180
|
+
return e(), r(E, null, [
|
|
181
|
+
d.item_use.includes(2) ? (e(), r("a", {
|
|
182
182
|
key: 0,
|
|
183
|
-
onClick:
|
|
183
|
+
onClick: s[0] || (s[0] = me(() => {
|
|
184
184
|
}, ["prevent"])),
|
|
185
185
|
href: "#",
|
|
186
186
|
class: "btn dropdown-toggle",
|
|
187
187
|
"data-bs-toggle": "dropdown",
|
|
188
188
|
title: "Pesquisas Prédefinidas"
|
|
189
189
|
}, [
|
|
190
|
-
(e(),
|
|
191
|
-
])) :
|
|
192
|
-
|
|
193
|
-
|
|
190
|
+
(e(), $(V(t(n).search.filter)))
|
|
191
|
+
])) : C("", !0),
|
|
192
|
+
m("div", it, [
|
|
193
|
+
Be(m("input", {
|
|
194
194
|
type: "text",
|
|
195
195
|
class: "form-control ms-1",
|
|
196
196
|
id: "inputSearchVDataTable",
|
|
197
|
-
"onUpdate:modelValue":
|
|
198
|
-
onKeyup:
|
|
199
|
-
placeholder:
|
|
200
|
-
}, null, 40,
|
|
201
|
-
[
|
|
197
|
+
"onUpdate:modelValue": s[1] || (s[1] = (y) => u.value = y),
|
|
198
|
+
onKeyup: Xe(k, ["enter"]),
|
|
199
|
+
placeholder: d.placeholder_search
|
|
200
|
+
}, null, 40, dt), [
|
|
201
|
+
[Te, u.value]
|
|
202
202
|
]),
|
|
203
|
-
|
|
203
|
+
u.value ? (e(), r("span", {
|
|
204
204
|
key: 0,
|
|
205
|
-
onClick:
|
|
205
|
+
onClick: s[2] || (s[2] = (y) => T()),
|
|
206
206
|
class: "inputClose",
|
|
207
207
|
title: "Limpar pesquisa"
|
|
208
208
|
}, [
|
|
209
|
-
(e(),
|
|
210
|
-
])) : (e(),
|
|
211
|
-
(e(),
|
|
209
|
+
(e(), $(V(t(n).search.clear)))
|
|
210
|
+
])) : (e(), r("span", ut, [
|
|
211
|
+
(e(), $(V(t(n).search.loupe)))
|
|
212
212
|
]))
|
|
213
213
|
]),
|
|
214
|
-
|
|
215
|
-
(e(!0),
|
|
216
|
-
"type" in
|
|
214
|
+
d.item_use.includes(2) ? (e(), r("div", ct, [
|
|
215
|
+
(e(!0), r(E, null, A(a.list_filter, (y, x) => (e(), r(E, { key: x }, [
|
|
216
|
+
"type" in y && y.type === 1 && (!("visible" in y) || y.visible) ? (e(), $(P, {
|
|
217
217
|
key: 0,
|
|
218
|
-
to:
|
|
218
|
+
to: y?.to,
|
|
219
219
|
class: "dropdown-item cursor-pointer"
|
|
220
220
|
}, {
|
|
221
|
-
default:
|
|
222
|
-
H(
|
|
221
|
+
default: Z(() => [
|
|
222
|
+
H(O(y.text), 1)
|
|
223
223
|
]),
|
|
224
224
|
_: 2
|
|
225
|
-
}, 1032, ["to"])) : (!("type" in
|
|
225
|
+
}, 1032, ["to"])) : (!("type" in y) || y.type === 2) && (!("visible" in y) || y.visible) ? (e(), r("a", {
|
|
226
226
|
key: 1,
|
|
227
|
-
onClick:
|
|
228
|
-
class:
|
|
229
|
-
},
|
|
227
|
+
onClick: me((q) => p(String(y.value)), ["prevent"]),
|
|
228
|
+
class: S(["dropdown-item cursor-pointer", w.value === y?.value ? "bg-info text-dark selected" : ""])
|
|
229
|
+
}, O(y.text), 11, _t)) : (!("type" in y) || y.type === 3) && (!("visible" in y) || y.visible) ? (e(), r("a", {
|
|
230
230
|
key: 2,
|
|
231
|
-
onClick:
|
|
232
|
-
class:
|
|
233
|
-
},
|
|
231
|
+
onClick: me((q) => f(y), ["prevent"]),
|
|
232
|
+
class: S(["dropdown-item cursor-pointer", y?.active ? "bg-info text-dark selected" : ""])
|
|
233
|
+
}, O(y.text), 11, pt)) : C("", !0)
|
|
234
234
|
], 64))), 128))
|
|
235
|
-
])) :
|
|
235
|
+
])) : C("", !0)
|
|
236
236
|
], 64);
|
|
237
237
|
};
|
|
238
238
|
}
|
|
239
|
-
}),
|
|
239
|
+
}), gt = /* @__PURE__ */ he(mt, [["__scopeId", "data-v-6a2b24b1"]]), ft = { class: "d-flex flex-column gap-2" }, vt = ["checked", "disabled", "onChange"], ht = { class: "form-check-label user-select-none" }, yt = /* @__PURE__ */ R({
|
|
240
240
|
__name: "VColumnManager",
|
|
241
241
|
props: {
|
|
242
242
|
columns_list: { default: () => [] },
|
|
@@ -248,224 +248,301 @@ const Be = Symbol("v-datatable-key"), $a = /* @__PURE__ */ J({
|
|
|
248
248
|
class_column_manager_button: { default: "" },
|
|
249
249
|
disable_class_column_manager_default: { type: Boolean, default: !1 }
|
|
250
250
|
},
|
|
251
|
-
setup(
|
|
252
|
-
const
|
|
253
|
-
return (
|
|
251
|
+
setup(d) {
|
|
252
|
+
const _ = le(de);
|
|
253
|
+
return (n, a) => d.use_column_manager ? (e(), r("div", {
|
|
254
254
|
key: 0,
|
|
255
|
-
class:
|
|
256
|
-
{ "dropdown d-inline-block ms-2": !
|
|
257
|
-
|
|
255
|
+
class: S([
|
|
256
|
+
{ "dropdown d-inline-block ms-2": !d.disable_class_column_manager_default },
|
|
257
|
+
d.class_column_manager_dropdown
|
|
258
258
|
])
|
|
259
259
|
}, [
|
|
260
|
-
|
|
261
|
-
class:
|
|
262
|
-
{ "btn dropdown-toggle": !
|
|
263
|
-
|
|
260
|
+
m("button", {
|
|
261
|
+
class: S([
|
|
262
|
+
{ "btn dropdown-toggle": !d.disable_class_column_manager_default },
|
|
263
|
+
d.class_column_manager_button
|
|
264
264
|
]),
|
|
265
265
|
type: "button",
|
|
266
266
|
"data-bs-toggle": "dropdown",
|
|
267
267
|
"aria-expanded": "false",
|
|
268
268
|
title: "Gerenciar Colunas visíveis"
|
|
269
269
|
}, [
|
|
270
|
-
(e(),
|
|
270
|
+
(e(), $(V(t(_).column_manager)))
|
|
271
271
|
], 2),
|
|
272
|
-
|
|
273
|
-
class:
|
|
274
|
-
{ "dropdown-menu dropdown-menu-end p-3 shadow-sm": !
|
|
275
|
-
|
|
272
|
+
m("div", {
|
|
273
|
+
class: S(["dropdown-menu dropdown-menu-end p-3 shadow-sm", [
|
|
274
|
+
{ "dropdown-menu dropdown-menu-end p-3 shadow-sm": !d.disable_class_column_manager_default },
|
|
275
|
+
d.class_column_manager_dropdown_menu
|
|
276
276
|
]]),
|
|
277
277
|
style: { "min-width": "220px", "z-index": "1050" }
|
|
278
278
|
}, [
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
(e(!0),
|
|
282
|
-
key:
|
|
279
|
+
a[0] || (a[0] = m("h6", { class: "dropdown-header text-uppercase fw-bold mb-2" }, "Exibir Colunas", -1)),
|
|
280
|
+
m("div", ft, [
|
|
281
|
+
(e(!0), r(E, null, A(d.columns_list, (c) => (e(), r("label", {
|
|
282
|
+
key: c.id,
|
|
283
283
|
class: "form-check cursor-pointer m-0"
|
|
284
284
|
}, [
|
|
285
|
-
|
|
285
|
+
m("input", {
|
|
286
286
|
class: "form-check-input",
|
|
287
287
|
type: "checkbox",
|
|
288
|
-
checked:
|
|
289
|
-
disabled:
|
|
290
|
-
onChange: (
|
|
291
|
-
}, null, 40,
|
|
292
|
-
|
|
288
|
+
checked: c.visible,
|
|
289
|
+
disabled: c.locked,
|
|
290
|
+
onChange: (u) => d.toggleColumnVisibility(c.id)
|
|
291
|
+
}, null, 40, vt),
|
|
292
|
+
m("span", ht, O(c.header), 1)
|
|
293
293
|
]))), 128))
|
|
294
294
|
])
|
|
295
295
|
], 2)
|
|
296
|
-
], 2)) :
|
|
296
|
+
], 2)) : C("", !0);
|
|
297
297
|
}
|
|
298
298
|
});
|
|
299
|
-
function
|
|
300
|
-
const
|
|
299
|
+
function kt() {
|
|
300
|
+
const d = I(!1), _ = I(""), n = I(0), a = I(0), c = B(() => ({
|
|
301
301
|
position: "fixed",
|
|
302
302
|
zIndex: 9999,
|
|
303
303
|
pointerEvents: "none",
|
|
304
|
-
top: `${
|
|
305
|
-
left: `${
|
|
304
|
+
top: `${a.value + 15}px`,
|
|
305
|
+
left: `${n.value + 15}px`
|
|
306
306
|
}));
|
|
307
|
-
function
|
|
308
|
-
const
|
|
309
|
-
let
|
|
310
|
-
|
|
307
|
+
function u(f) {
|
|
308
|
+
const k = f.clientX, h = f.clientY, s = window.innerHeight, P = 15, y = 300;
|
|
309
|
+
let x = h + P;
|
|
310
|
+
x + y > s && (x = h - y - P, x < 0 && (x = 0)), n.value = k, a.value = x;
|
|
311
311
|
}
|
|
312
|
-
function
|
|
313
|
-
|
|
312
|
+
function w(f, k) {
|
|
313
|
+
d.value = !0, _.value = k, u(f);
|
|
314
314
|
}
|
|
315
|
-
function
|
|
316
|
-
|
|
315
|
+
function p(f) {
|
|
316
|
+
d.value && u(f);
|
|
317
317
|
}
|
|
318
|
-
function
|
|
319
|
-
|
|
318
|
+
function T() {
|
|
319
|
+
d.value = !1;
|
|
320
320
|
}
|
|
321
321
|
return {
|
|
322
|
-
isHovering:
|
|
323
|
-
previewSrc:
|
|
324
|
-
previewStyle:
|
|
325
|
-
handleMouseOver:
|
|
326
|
-
handleMouseMove:
|
|
327
|
-
handleMouseLeave:
|
|
322
|
+
isHovering: d,
|
|
323
|
+
previewSrc: _,
|
|
324
|
+
previewStyle: c,
|
|
325
|
+
handleMouseOver: w,
|
|
326
|
+
handleMouseMove: p,
|
|
327
|
+
handleMouseLeave: T
|
|
328
328
|
};
|
|
329
329
|
}
|
|
330
|
-
function
|
|
331
|
-
const
|
|
332
|
-
function
|
|
333
|
-
|
|
330
|
+
function bt(d, _, n, a) {
|
|
331
|
+
const c = I([]);
|
|
332
|
+
function u() {
|
|
333
|
+
c.value = [];
|
|
334
334
|
}
|
|
335
|
-
function
|
|
336
|
-
const
|
|
337
|
-
return
|
|
335
|
+
function w(f) {
|
|
336
|
+
const k = f[_];
|
|
337
|
+
return c.value.some((h) => h === k);
|
|
338
338
|
}
|
|
339
|
-
function
|
|
340
|
-
const
|
|
341
|
-
|
|
339
|
+
function p(f) {
|
|
340
|
+
const k = f[_], h = c.value.findIndex((P) => P === k), s = h > -1;
|
|
341
|
+
d ? (u(), s || (c.value.push(k), a && T(k))) : s ? c.value.splice(h, 1) : (c.value.push(k), a && T(k));
|
|
342
342
|
}
|
|
343
|
-
function
|
|
344
|
-
|
|
345
|
-
if (
|
|
346
|
-
const
|
|
347
|
-
|
|
343
|
+
function T(f) {
|
|
344
|
+
fe(() => {
|
|
345
|
+
if (n) {
|
|
346
|
+
const k = document.querySelector("#expand-item-" + f);
|
|
347
|
+
k && k.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
348
348
|
return;
|
|
349
349
|
} else
|
|
350
350
|
setTimeout(() => {
|
|
351
|
-
const
|
|
352
|
-
|
|
351
|
+
const k = document.querySelector("#expand-item-" + f);
|
|
352
|
+
k && k.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
353
353
|
}, 600);
|
|
354
354
|
});
|
|
355
355
|
}
|
|
356
356
|
return {
|
|
357
|
-
expanded_items:
|
|
358
|
-
is_item_expanded:
|
|
359
|
-
expand_item_toggle:
|
|
360
|
-
close_all_expanded_items:
|
|
357
|
+
expanded_items: c,
|
|
358
|
+
is_item_expanded: w,
|
|
359
|
+
expand_item_toggle: p,
|
|
360
|
+
close_all_expanded_items: u
|
|
361
361
|
};
|
|
362
362
|
}
|
|
363
|
-
function
|
|
364
|
-
const
|
|
365
|
-
[
|
|
366
|
-
[
|
|
367
|
-
[
|
|
368
|
-
[
|
|
369
|
-
})),
|
|
370
|
-
const
|
|
371
|
-
for (const
|
|
372
|
-
|
|
373
|
-
return
|
|
374
|
-
}), { data:
|
|
375
|
-
disable_request: () =>
|
|
363
|
+
function wt(d, _, n, a, c, u) {
|
|
364
|
+
const w = I([]), p = B(() => t(d)), T = B(() => p.value.endpoint), f = B(() => ({
|
|
365
|
+
[p.value.page_param_name]: _.value.current_page + 1,
|
|
366
|
+
[p.value.page_size_param_name]: _.value.limit_per_page,
|
|
367
|
+
[p.value.search_param_name]: _.value.search || "",
|
|
368
|
+
[p.value.filter_param_name]: _.value.filter || ""
|
|
369
|
+
})), k = B(() => {
|
|
370
|
+
const b = {};
|
|
371
|
+
for (const v of n.value)
|
|
372
|
+
v.use_ordering && (a.value[v.id] === "increasing" ? b[v.param_ordering] = v.increasing_value || "increasing" : a.value[v.id] === "decreasing" && (b[v.param_ordering] = v.decreasing_value || "decreasing"));
|
|
373
|
+
return b;
|
|
374
|
+
}), { data: h, pending: s, error: P, execute: y, attempt: x } = p.value.fetch(T, {
|
|
375
|
+
disable_request: () => p.value.disable_request,
|
|
376
376
|
params: () => {
|
|
377
|
-
const
|
|
378
|
-
let
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
377
|
+
const b = typeof p.value.add_params == "function";
|
|
378
|
+
let v = {};
|
|
379
|
+
const D = typeof p.value.silent_params == "function";
|
|
380
|
+
let K = {};
|
|
381
|
+
const W = typeof p.value.add_params_keep_page == "function";
|
|
382
|
+
let Q = {};
|
|
383
|
+
if (b) {
|
|
384
|
+
const N = p.value.add_params;
|
|
385
|
+
v = N();
|
|
386
|
+
} else
|
|
387
|
+
v = p.value.add_params || {};
|
|
388
|
+
if (D) {
|
|
389
|
+
const N = p.value.silent_params;
|
|
390
|
+
K = N();
|
|
382
391
|
} else
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
392
|
+
K = p.value.silent_params || {};
|
|
393
|
+
if (W) {
|
|
394
|
+
const N = p.value.add_params_keep_page;
|
|
395
|
+
Q = N();
|
|
396
|
+
} else
|
|
397
|
+
Q = p.value.add_params_keep_page || {};
|
|
398
|
+
return p.value.deactivate_default_params ? {
|
|
399
|
+
...v,
|
|
400
|
+
...K,
|
|
401
|
+
...Q,
|
|
402
|
+
...k.value
|
|
387
403
|
} : {
|
|
388
|
-
...
|
|
389
|
-
...
|
|
390
|
-
...
|
|
404
|
+
...f.value,
|
|
405
|
+
...v,
|
|
406
|
+
...K,
|
|
407
|
+
...Q,
|
|
408
|
+
...k.value
|
|
391
409
|
};
|
|
392
410
|
},
|
|
393
|
-
retry:
|
|
394
|
-
retryDelay:
|
|
411
|
+
retry: p.value.retry_attempts,
|
|
412
|
+
retryDelay: p.value.retry_delay,
|
|
395
413
|
paramsReactives: !1,
|
|
396
414
|
immediate: !1
|
|
397
|
-
},
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
415
|
+
}, p.value.fetch_name), q = B(() => {
|
|
416
|
+
if (!p.value.frontend_pagination)
|
|
417
|
+
return w.value;
|
|
418
|
+
let b = w.value;
|
|
419
|
+
const v = p.value.custom_frontend_filter;
|
|
420
|
+
if (v && typeof v == "function")
|
|
421
|
+
b = b.filter(
|
|
422
|
+
(D) => v(D, _.value.search, _.value.filter)
|
|
423
|
+
);
|
|
424
|
+
else if (_.value.search) {
|
|
425
|
+
const D = _.value.search.toLowerCase();
|
|
426
|
+
b = b.filter((K) => Object.values(K).some(
|
|
427
|
+
(W) => W != null && String(W).toLowerCase().includes(D)
|
|
428
|
+
));
|
|
429
|
+
}
|
|
430
|
+
return b;
|
|
431
|
+
});
|
|
432
|
+
J(q, (b) => {
|
|
433
|
+
if (p.value.frontend_pagination) {
|
|
434
|
+
_.value.count = b.length;
|
|
435
|
+
const v = Math.ceil(b.length / _.value.limit_per_page) - 1;
|
|
436
|
+
_.value.current_page > v && v >= 0 && (_.value.current_page = v);
|
|
437
|
+
}
|
|
438
|
+
}, { immediate: !0 });
|
|
439
|
+
const M = B(() => {
|
|
440
|
+
if (!p.value.frontend_pagination)
|
|
441
|
+
return w.value;
|
|
442
|
+
const b = _.value.current_page * _.value.limit_per_page, v = b + _.value.limit_per_page;
|
|
443
|
+
return q.value.slice(b, v);
|
|
444
|
+
}), Y = I(!1), ee = I(null), G = I(!1), te = B(() => s.value || Y.value);
|
|
445
|
+
async function X() {
|
|
446
|
+
G.value || (G.value = !0), ee.value && clearTimeout(ee.value), Y.value = !0, ee.value = setTimeout(() => {
|
|
447
|
+
Y.value = !1;
|
|
448
|
+
}, p.value.min_loading_delay), u(), c("beforeFetch"), (!p.value.frontend_pagination || w.value.length === 0) && await y(), c("afterFetch");
|
|
402
449
|
}
|
|
403
|
-
function
|
|
404
|
-
|
|
450
|
+
function ae() {
|
|
451
|
+
_.value.current_page = p.value.page_starts_at, X();
|
|
405
452
|
}
|
|
406
|
-
return {
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
453
|
+
return J(h, (b) => {
|
|
454
|
+
if (b) {
|
|
455
|
+
let v = [];
|
|
456
|
+
p.value.data_key ? v = b[p.value.data_key] || [] : v = Array.isArray(b) ? b : [b], w.value = v, p.value.frontend_pagination || (_.value.count = b[p.value.total_key] || 0);
|
|
457
|
+
} else
|
|
458
|
+
w.value = [], _.value.count = 0;
|
|
459
|
+
}, { immediate: !0 }), J(
|
|
460
|
+
() => {
|
|
461
|
+
const b = typeof p.value.add_params == "function" ? p.value.add_params() : p.value.add_params;
|
|
462
|
+
return JSON.stringify(b);
|
|
463
|
+
},
|
|
464
|
+
(b, v) => {
|
|
465
|
+
b !== v && v !== void 0 && ae();
|
|
466
|
+
}
|
|
467
|
+
), J(
|
|
468
|
+
() => {
|
|
469
|
+
const b = typeof p.value.add_params_keep_page == "function" ? p.value.add_params_keep_page() : p.value.add_params_keep_page;
|
|
470
|
+
return JSON.stringify(b);
|
|
471
|
+
},
|
|
472
|
+
(b, v) => {
|
|
473
|
+
b !== v && v !== void 0 && X();
|
|
474
|
+
}
|
|
475
|
+
), J(
|
|
476
|
+
() => p.value.endpoint,
|
|
477
|
+
(b, v) => {
|
|
478
|
+
b !== v && v !== void 0 && (_.value.current_page = p.value.page_starts_at);
|
|
479
|
+
}
|
|
480
|
+
), {
|
|
481
|
+
items: M,
|
|
482
|
+
pending: s,
|
|
483
|
+
error: P,
|
|
484
|
+
execute: y,
|
|
485
|
+
response: h,
|
|
486
|
+
attempt: x,
|
|
487
|
+
default_params: f,
|
|
488
|
+
fetchDataWithDelay: X,
|
|
489
|
+
reSearch: ae,
|
|
490
|
+
showLoadingState: te,
|
|
491
|
+
first_fetch: G
|
|
418
492
|
};
|
|
419
493
|
}
|
|
420
|
-
function
|
|
421
|
-
const
|
|
422
|
-
const
|
|
423
|
-
return
|
|
424
|
-
},
|
|
425
|
-
if (!
|
|
426
|
-
const
|
|
427
|
-
return
|
|
428
|
-
}),
|
|
429
|
-
|
|
430
|
-
|
|
494
|
+
function xt(d, _) {
|
|
495
|
+
const n = I(null), a = I([]), c = (f) => {
|
|
496
|
+
const k = d.item_key;
|
|
497
|
+
return a.value.some((h) => h[k] === f[k]);
|
|
498
|
+
}, u = B(() => {
|
|
499
|
+
if (!_.value.length) return !1;
|
|
500
|
+
const f = _.value.filter((k) => c(k)).length;
|
|
501
|
+
return f === 0 ? !1 : f === _.value.length ? !0 : "indeterminate";
|
|
502
|
+
}), w = B(() => a.value.length > 0);
|
|
503
|
+
J([u, n], ([f]) => {
|
|
504
|
+
n.value && (f === "indeterminate" ? (n.value.checked = !1, n.value.indeterminate = !0) : (n.value.checked = f, n.value.indeterminate = !1));
|
|
431
505
|
}, {
|
|
432
506
|
immediate: !0,
|
|
433
507
|
flush: "post"
|
|
434
508
|
});
|
|
435
|
-
function
|
|
436
|
-
const
|
|
437
|
-
if (!
|
|
438
|
-
const
|
|
439
|
-
if (
|
|
440
|
-
const
|
|
441
|
-
|
|
442
|
-
(
|
|
509
|
+
function p() {
|
|
510
|
+
const f = _.value;
|
|
511
|
+
if (!f.length) return;
|
|
512
|
+
const k = u.value;
|
|
513
|
+
if (k === !0 || k === "indeterminate") {
|
|
514
|
+
const h = f.map((s) => s[d.item_key]);
|
|
515
|
+
a.value = a.value.filter(
|
|
516
|
+
(s) => !h.includes(s[d.item_key])
|
|
443
517
|
);
|
|
444
518
|
} else
|
|
445
|
-
|
|
446
|
-
|
|
519
|
+
f.forEach((h) => {
|
|
520
|
+
c(h) || a.value.push(h);
|
|
447
521
|
});
|
|
448
522
|
}
|
|
449
|
-
function
|
|
450
|
-
const
|
|
451
|
-
|
|
523
|
+
function T(f) {
|
|
524
|
+
const k = d.item_key, h = a.value.findIndex((s) => s[k] === f[k]);
|
|
525
|
+
h > -1 ? a.value.splice(h, 1) : a.value.push(f);
|
|
452
526
|
}
|
|
453
527
|
return {
|
|
454
|
-
selectAllCheckbox:
|
|
455
|
-
selected_items:
|
|
456
|
-
isSelected:
|
|
457
|
-
selectAllState:
|
|
458
|
-
atLeastOneSelected:
|
|
459
|
-
toggleSelectAll:
|
|
460
|
-
toggleItemSelection:
|
|
528
|
+
selectAllCheckbox: n,
|
|
529
|
+
selected_items: a,
|
|
530
|
+
isSelected: c,
|
|
531
|
+
selectAllState: u,
|
|
532
|
+
atLeastOneSelected: w,
|
|
533
|
+
toggleSelectAll: p,
|
|
534
|
+
toggleItemSelection: T
|
|
461
535
|
};
|
|
462
536
|
}
|
|
463
|
-
const
|
|
537
|
+
const Ct = {
|
|
464
538
|
// Configurações de API
|
|
465
539
|
fetch_name: "",
|
|
466
540
|
custom_loading: null,
|
|
467
541
|
deactivate_default_params: !1,
|
|
542
|
+
frontend_pagination: !1,
|
|
468
543
|
add_params: {},
|
|
544
|
+
add_params_keep_page: {},
|
|
545
|
+
silent_params: {},
|
|
469
546
|
list_filter: [],
|
|
470
547
|
use_checkbox: !1,
|
|
471
548
|
deactivate_selected_info: !1,
|
|
@@ -517,41 +594,42 @@ const Mt = {
|
|
|
517
594
|
retry_delay: 2e3,
|
|
518
595
|
show_header_when_empty: !1,
|
|
519
596
|
storage_id: "",
|
|
520
|
-
use_column_manager: !1
|
|
597
|
+
use_column_manager: !1,
|
|
598
|
+
custom_frontend_filter: null
|
|
521
599
|
};
|
|
522
|
-
function
|
|
523
|
-
const
|
|
524
|
-
return { options:
|
|
525
|
-
const
|
|
526
|
-
Object.entries(
|
|
600
|
+
function St(d) {
|
|
601
|
+
const _ = Me(lt, {});
|
|
602
|
+
return { options: B(() => {
|
|
603
|
+
const a = Object.fromEntries(
|
|
604
|
+
Object.entries(d).filter(([c, u]) => u !== void 0)
|
|
527
605
|
);
|
|
528
606
|
return {
|
|
529
|
-
...
|
|
607
|
+
...Ct,
|
|
530
608
|
// 1º Camada: Prioridade Mínima (Valores Padrão)
|
|
531
|
-
...
|
|
609
|
+
..._,
|
|
532
610
|
// 2º Camada: Prioridade Média (Valores Globais definidos por quem usa o plugin)
|
|
533
|
-
...
|
|
611
|
+
...a
|
|
534
612
|
// 3º Camada: Prioridade Máxima (O que o dev digitou na tela)
|
|
535
613
|
};
|
|
536
614
|
}) };
|
|
537
615
|
}
|
|
538
|
-
const
|
|
616
|
+
const Mt = { class: "loading-container" }, $t = { key: 0 }, Bt = { key: 2 }, Tt = {
|
|
539
617
|
key: 5,
|
|
540
618
|
class: "text-danger erro-custom-container"
|
|
541
|
-
}, Ot = { class: "badge bg-orange text-white erro-custom-text" },
|
|
619
|
+
}, Ot = { class: "badge bg-orange text-white erro-custom-text" }, zt = { key: 0 }, It = { key: 2 }, Pt = {
|
|
542
620
|
key: 5,
|
|
543
621
|
class: "text-danger erro-custom-container"
|
|
544
|
-
},
|
|
622
|
+
}, Dt = { class: "badge bg-orange text-white erro-custom-text" }, Et = ["colspan"], Vt = {
|
|
545
623
|
key: 0,
|
|
546
624
|
class: "d-flex flex-column justify-content-center align-items-center",
|
|
547
625
|
style: { height: "6rem" }
|
|
548
|
-
},
|
|
626
|
+
}, Nt = {
|
|
549
627
|
key: 1,
|
|
550
628
|
style: { height: "3rem" }
|
|
551
|
-
},
|
|
629
|
+
}, jt = {
|
|
552
630
|
key: 2,
|
|
553
631
|
class: "p-3 text-center text-secondary"
|
|
554
|
-
},
|
|
632
|
+
}, At = /* @__PURE__ */ R({
|
|
555
633
|
__name: "VDataTableLoading",
|
|
556
634
|
props: {
|
|
557
635
|
columns: {},
|
|
@@ -562,151 +640,151 @@ const Bt = { class: "loading-container" }, Tt = { key: 0 }, zt = { key: 2 }, It
|
|
|
562
640
|
attempt: {},
|
|
563
641
|
pagination: {}
|
|
564
642
|
},
|
|
565
|
-
setup(
|
|
566
|
-
const
|
|
567
|
-
return (
|
|
568
|
-
|
|
643
|
+
setup(d) {
|
|
644
|
+
const _ = d;
|
|
645
|
+
return (n, a) => (e(), r("div", Mt, [
|
|
646
|
+
_.custom_loading ? (e(), $(V(_.custom_loading), { key: 0 })) : (e(), r("table", {
|
|
569
647
|
key: 1,
|
|
570
|
-
class:
|
|
648
|
+
class: S(["table table-vcenter table-selectable", _.class_table])
|
|
571
649
|
}, [
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
(e(!0),
|
|
575
|
-
key:
|
|
576
|
-
class:
|
|
577
|
-
},
|
|
650
|
+
m("thead", null, [
|
|
651
|
+
m("tr", null, [
|
|
652
|
+
(e(!0), r(E, null, A(d.columns, (c) => (e(), r("th", {
|
|
653
|
+
key: c.field || c.header,
|
|
654
|
+
class: S(c.class_column)
|
|
655
|
+
}, O(c.header), 3))), 128))
|
|
578
656
|
])
|
|
579
657
|
]),
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
key: "placeholder-" +
|
|
658
|
+
m("tbody", null, [
|
|
659
|
+
_.type_loading === "placeholder" ? (e(!0), r(E, { key: 0 }, A(d.pagination.limit_per_page, (c) => (e(), r("tr", {
|
|
660
|
+
key: "placeholder-" + c,
|
|
583
661
|
class: "placeholder-glow"
|
|
584
662
|
}, [
|
|
585
|
-
(e(!0),
|
|
586
|
-
key:
|
|
587
|
-
class:
|
|
663
|
+
(e(!0), r(E, null, A(d.columns, (u) => (e(), r("td", {
|
|
664
|
+
key: u.field || u.header,
|
|
665
|
+
class: S(u.class_row)
|
|
588
666
|
}, [
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
])])) :
|
|
667
|
+
u.bodySlot ? (e(), r("span", $t, [...a[0] || (a[0] = [
|
|
668
|
+
m("span", { class: "placeholder col-8" }, null, -1)
|
|
669
|
+
])])) : u.type === "text" ? (e(), r("span", {
|
|
592
670
|
key: 1,
|
|
593
|
-
class:
|
|
594
|
-
}, [...
|
|
595
|
-
|
|
596
|
-
])], 2)) :
|
|
597
|
-
|
|
598
|
-
])])) :
|
|
671
|
+
class: S(u.class_item)
|
|
672
|
+
}, [...a[1] || (a[1] = [
|
|
673
|
+
m("span", { class: "placeholder col-8" }, null, -1)
|
|
674
|
+
])], 2)) : u.type === "date" ? (e(), r("span", Bt, [...a[2] || (a[2] = [
|
|
675
|
+
m("span", { class: "placeholder col-9" }, null, -1)
|
|
676
|
+
])])) : u.type === "html" ? (e(), r("div", {
|
|
599
677
|
key: 3,
|
|
600
|
-
class:
|
|
601
|
-
}, [...
|
|
602
|
-
|
|
603
|
-
])], 2)) :
|
|
678
|
+
class: S(u.class_item)
|
|
679
|
+
}, [...a[3] || (a[3] = [
|
|
680
|
+
m("div", { class: "placeholder col-12" }, null, -1)
|
|
681
|
+
])], 2)) : u.type === "img" ? (e(), r("div", {
|
|
604
682
|
key: 4,
|
|
605
|
-
class:
|
|
606
|
-
}, [...
|
|
607
|
-
|
|
608
|
-
])], 2)) : (e(),
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
683
|
+
class: S(u.class_item)
|
|
684
|
+
}, [...a[4] || (a[4] = [
|
|
685
|
+
m("div", { class: "placeholder placeholder-img" }, null, -1)
|
|
686
|
+
])], 2)) : (e(), r("span", Tt, [
|
|
687
|
+
a[5] || (a[5] = H("tipo ", -1)),
|
|
688
|
+
m("span", Ot, O(u.type), 1),
|
|
689
|
+
a[6] || (a[6] = H(" não suportado ", -1))
|
|
612
690
|
]))
|
|
613
691
|
], 2))), 128))
|
|
614
|
-
]))), 128)) :
|
|
615
|
-
key: "placeholder-" +
|
|
692
|
+
]))), 128)) : _.type_loading === "spiner-table" ? (e(!0), r(E, { key: 1 }, A(d.pagination.limit_per_page, (c) => (e(), r("tr", {
|
|
693
|
+
key: "placeholder-" + c
|
|
616
694
|
}, [
|
|
617
|
-
(e(!0),
|
|
618
|
-
key:
|
|
619
|
-
class:
|
|
695
|
+
(e(!0), r(E, null, A(d.columns, (u) => (e(), r("td", {
|
|
696
|
+
key: u.field || u.header,
|
|
697
|
+
class: S(u.class_row)
|
|
620
698
|
}, [
|
|
621
|
-
|
|
622
|
-
|
|
699
|
+
u.bodySlot ? (e(), r("span", zt, [...a[7] || (a[7] = [
|
|
700
|
+
m("span", {
|
|
623
701
|
class: "spinner-border spinner-border-sm",
|
|
624
702
|
role: "status",
|
|
625
703
|
"aria-hidden": "true"
|
|
626
704
|
}, null, -1)
|
|
627
|
-
])])) :
|
|
705
|
+
])])) : u.type === "text" ? (e(), r("span", {
|
|
628
706
|
key: 1,
|
|
629
|
-
class:
|
|
630
|
-
}, [...
|
|
631
|
-
|
|
707
|
+
class: S(u.class_item)
|
|
708
|
+
}, [...a[8] || (a[8] = [
|
|
709
|
+
m("span", {
|
|
632
710
|
class: "spinner-border spinner-border-sm",
|
|
633
711
|
role: "status",
|
|
634
712
|
"aria-hidden": "true"
|
|
635
713
|
}, null, -1)
|
|
636
|
-
])], 2)) :
|
|
637
|
-
|
|
714
|
+
])], 2)) : u.type === "date" ? (e(), r("span", It, [...a[9] || (a[9] = [
|
|
715
|
+
m("span", {
|
|
638
716
|
class: "spinner-border spinner-border-sm",
|
|
639
717
|
role: "status",
|
|
640
718
|
"aria-hidden": "true"
|
|
641
719
|
}, null, -1)
|
|
642
|
-
])])) :
|
|
720
|
+
])])) : u.type === "html" ? (e(), r("div", {
|
|
643
721
|
key: 3,
|
|
644
|
-
class:
|
|
645
|
-
}, [...
|
|
646
|
-
|
|
722
|
+
class: S(u.class_item)
|
|
723
|
+
}, [...a[10] || (a[10] = [
|
|
724
|
+
m("span", {
|
|
647
725
|
class: "spinner-border spinner-border-sm",
|
|
648
726
|
role: "status",
|
|
649
727
|
"aria-hidden": "true"
|
|
650
728
|
}, null, -1)
|
|
651
|
-
])], 2)) :
|
|
729
|
+
])], 2)) : u.type === "img" ? (e(), r("div", {
|
|
652
730
|
key: 4,
|
|
653
|
-
class:
|
|
654
|
-
}, [...
|
|
655
|
-
|
|
656
|
-
|
|
731
|
+
class: S(["", u.class_item])
|
|
732
|
+
}, [...a[11] || (a[11] = [
|
|
733
|
+
m("span", { class: "placeholder-img d-flex justify-content-center align-items-center" }, [
|
|
734
|
+
m("span", {
|
|
657
735
|
class: "spinner-border spinner-border-sm",
|
|
658
736
|
role: "status",
|
|
659
737
|
"aria-hidden": "true"
|
|
660
738
|
})
|
|
661
739
|
], -1)
|
|
662
|
-
])], 2)) : (e(),
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
740
|
+
])], 2)) : (e(), r("span", Pt, [
|
|
741
|
+
a[12] || (a[12] = H("tipo ", -1)),
|
|
742
|
+
m("span", Dt, O(u.type), 1),
|
|
743
|
+
a[13] || (a[13] = H(" não suportado ", -1))
|
|
666
744
|
]))
|
|
667
745
|
], 2))), 128))
|
|
668
|
-
]))), 128)) :
|
|
669
|
-
|
|
670
|
-
colspan:
|
|
746
|
+
]))), 128)) : _.type_loading === "spiner" ? (e(!0), r(E, { key: 2 }, A(d.pagination.limit_per_page, (c) => (e(), r("tr", { key: c }, [
|
|
747
|
+
m("td", {
|
|
748
|
+
colspan: d.columns.length,
|
|
671
749
|
class: "text-center p-0",
|
|
672
750
|
style: { "border-bottom": "none" }
|
|
673
751
|
}, [
|
|
674
|
-
|
|
675
|
-
|
|
752
|
+
c === Math.floor(d.pagination.limit_per_page / 2) + 1 ? (e(), r("div", Vt, [...a[14] || (a[14] = [
|
|
753
|
+
m("div", {
|
|
676
754
|
class: "spinner-border",
|
|
677
755
|
style: { width: "3rem", height: "3rem" },
|
|
678
756
|
role: "status"
|
|
679
757
|
}, null, -1),
|
|
680
|
-
|
|
681
|
-
])])) : (e(),
|
|
682
|
-
], 8,
|
|
683
|
-
]))), 128)) :
|
|
758
|
+
m("span", { class: "mt-2" }, "Carregando...", -1)
|
|
759
|
+
])])) : (e(), r("div", Nt))
|
|
760
|
+
], 8, Et)
|
|
761
|
+
]))), 128)) : C("", !0)
|
|
684
762
|
])
|
|
685
763
|
], 2)),
|
|
686
|
-
|
|
764
|
+
d.attempt && d.attempt.current > 1 ? (e(), r("div", jt, " A conexão falhou. Tentando novamente... (Tentativa " + O(d.attempt.current) + " de " + O(d.attempt.total) + ") ", 1)) : C("", !0)
|
|
687
765
|
]));
|
|
688
766
|
}
|
|
689
|
-
}),
|
|
767
|
+
}), Ht = /* @__PURE__ */ he(At, [["__scopeId", "data-v-3b019685"]]), Ft = /* @__PURE__ */ R({
|
|
690
768
|
__name: "VOrderingIcon",
|
|
691
769
|
props: {
|
|
692
770
|
orderings_state: {},
|
|
693
771
|
use_ordering: { type: Boolean }
|
|
694
772
|
},
|
|
695
773
|
emits: ["toggle"],
|
|
696
|
-
setup(
|
|
697
|
-
const
|
|
698
|
-
return (
|
|
774
|
+
setup(d, { emit: _ }) {
|
|
775
|
+
const n = le(de), a = d, c = _;
|
|
776
|
+
return (u, w) => d.use_ordering ? (e(), r("span", {
|
|
699
777
|
key: 0,
|
|
700
|
-
onClick:
|
|
778
|
+
onClick: w[0] || (w[0] = (p) => c("toggle")),
|
|
701
779
|
class: "cursor-pointer"
|
|
702
780
|
}, [
|
|
703
|
-
!
|
|
704
|
-
])) :
|
|
781
|
+
!a.orderings_state || a.orderings_state === "none" ? (e(), $(V(t(n).ordering.default), { key: 0 })) : a.orderings_state === "decreasing" ? (e(), $(V(t(n).ordering.decreasing), { key: 1 })) : a.orderings_state === "increasing" ? (e(), $(V(t(n).ordering.increasing), { key: 2 })) : C("", !0)
|
|
782
|
+
])) : C("", !0);
|
|
705
783
|
}
|
|
706
|
-
}),
|
|
784
|
+
}), Lt = {
|
|
707
785
|
key: 1,
|
|
708
786
|
class: "d-flex justify-content-between align-items-center"
|
|
709
|
-
},
|
|
787
|
+
}, Se = /* @__PURE__ */ R({
|
|
710
788
|
__name: "VThDataTable",
|
|
711
789
|
props: {
|
|
712
790
|
header: {},
|
|
@@ -717,66 +795,66 @@ const Bt = { class: "loading-container" }, Tt = { key: 0 }, zt = { key: 2 }, It
|
|
|
717
795
|
col: {}
|
|
718
796
|
},
|
|
719
797
|
emits: ["toggleOrderingState"],
|
|
720
|
-
setup(
|
|
721
|
-
const
|
|
722
|
-
orderings_state:
|
|
723
|
-
use_ordering:
|
|
724
|
-
onToggle: () =>
|
|
725
|
-
}),
|
|
726
|
-
"header-draggable": !
|
|
727
|
-
"header-locked":
|
|
728
|
-
[
|
|
729
|
-
})),
|
|
730
|
-
if (!
|
|
731
|
-
const
|
|
732
|
-
return !
|
|
798
|
+
setup(d, { emit: _ }) {
|
|
799
|
+
const n = d, a = () => ge(Ft, {
|
|
800
|
+
orderings_state: n.orderings_state,
|
|
801
|
+
use_ordering: n.use_ordering,
|
|
802
|
+
onToggle: () => u("toggleOrderingState")
|
|
803
|
+
}), c = B(() => ({
|
|
804
|
+
"header-draggable": !n.locked,
|
|
805
|
+
"header-locked": n.locked,
|
|
806
|
+
[n.class_column]: !0
|
|
807
|
+
})), u = _, w = (T) => !T || T.length === 0 ? !0 : T.every((f) => f.type === We || f.type === Qe && typeof f.children == "string" && !f.children.trim() ? !0 : f.type === E || f.type === Symbol.for("v-fgt") || String(f.type) === "Symbol(Fragment)" ? w(f.children) : !1), p = B(() => {
|
|
808
|
+
if (!n.col || !n.col.colHeaderSlot) return !1;
|
|
809
|
+
const T = n.col.colHeaderSlot({ col: n.col, locked: n.locked });
|
|
810
|
+
return !w(T);
|
|
733
811
|
});
|
|
734
|
-
return (
|
|
735
|
-
class:
|
|
812
|
+
return (T, f) => (e(), r("th", {
|
|
813
|
+
class: S(c.value)
|
|
736
814
|
}, [
|
|
737
|
-
|
|
738
|
-
class:
|
|
815
|
+
m("div", {
|
|
816
|
+
class: S({ "header-ordering": d.use_ordering })
|
|
739
817
|
}, [
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
(e(),
|
|
818
|
+
p.value ? (e(), $(V(d.col.colHeaderSlot), Ce(ve({ key: 0 }, { col: n.col, locked: n.locked, OrderingComponent: a })), null, 16)) : (e(), r("div", Lt, [
|
|
819
|
+
m("span", null, O(n.header), 1),
|
|
820
|
+
d.col.colHeaderMidleSlot ? (e(), $(V(d.col.colHeaderMidleSlot), Ce(ve({ key: 0 }, { col: n.col, locked: n.locked })), null, 16)) : C("", !0),
|
|
821
|
+
(e(), $(V(a)))
|
|
744
822
|
]))
|
|
745
823
|
], 2)
|
|
746
824
|
], 2));
|
|
747
825
|
}
|
|
748
|
-
}),
|
|
826
|
+
}), qt = { class: "mx-2 d-inline-block" }, Kt = { class: "dropdown d-flex" }, Ut = {
|
|
749
827
|
key: 0,
|
|
750
828
|
class: "alert alert-cyan d-flex justify-content-center align-items-center py-2",
|
|
751
829
|
role: "alert"
|
|
752
|
-
},
|
|
830
|
+
}, Jt = { class: "alert-title m-0" }, Yt = { class: "badge bg-azure text-azure-fg" }, Gt = {
|
|
753
831
|
key: 1,
|
|
754
832
|
class: "feedback-container text-center"
|
|
755
|
-
},
|
|
833
|
+
}, Xt = {
|
|
756
834
|
key: 0,
|
|
757
835
|
class: "text-secondary"
|
|
758
|
-
},
|
|
836
|
+
}, Wt = {
|
|
759
837
|
key: 1,
|
|
760
838
|
class: "text-secondary"
|
|
761
|
-
},
|
|
839
|
+
}, Qt = {
|
|
762
840
|
key: 2,
|
|
763
841
|
class: "table-responsive"
|
|
764
|
-
},
|
|
842
|
+
}, Zt = { key: 0 }, Rt = { key: 0 }, ea = {
|
|
765
843
|
key: 1,
|
|
766
844
|
class: "w-1"
|
|
767
|
-
},
|
|
845
|
+
}, ta = {
|
|
768
846
|
key: 0,
|
|
769
847
|
class: "w-1"
|
|
770
|
-
},
|
|
848
|
+
}, aa = ["onClick"], na = {
|
|
771
849
|
key: 1,
|
|
772
850
|
class: "w-1"
|
|
773
|
-
},
|
|
851
|
+
}, sa = ["checked", "onChange"], la = ["onClick"], oa = ["onClick"], ra = { key: 0 }, ia = { key: 1 }, da = ["onClick", "innerHTML"], ua = ["onClick"], ca = ["src"], _a = ["src"], pa = {
|
|
774
852
|
key: 5,
|
|
775
853
|
class: "text-danger erro-custom-container"
|
|
776
|
-
},
|
|
854
|
+
}, ma = { class: "badge bg-orange text-white erro-custom-text" }, ga = ["id"], fa = ["colspan"], va = { key: 1 }, ha = {
|
|
777
855
|
key: 2,
|
|
778
856
|
class: "text-center p-4 text-secondary"
|
|
779
|
-
},
|
|
857
|
+
}, ya = ["src"], ka = /* @__PURE__ */ R({
|
|
780
858
|
__name: "VDataTable",
|
|
781
859
|
props: {
|
|
782
860
|
fetch: { type: Function },
|
|
@@ -789,6 +867,8 @@ const Bt = { class: "loading-container" }, Tt = { key: 0 }, zt = { key: 2 }, It
|
|
|
789
867
|
page_param_name: {},
|
|
790
868
|
page_size_param_name: {},
|
|
791
869
|
add_params: { type: [Object, Function] },
|
|
870
|
+
add_params_keep_page: { type: [Object, Function] },
|
|
871
|
+
silent_params: { type: [Object, Function] },
|
|
792
872
|
deactivate_default_params: { type: Boolean },
|
|
793
873
|
disable_request: {},
|
|
794
874
|
class_column_manager_dropdown: {},
|
|
@@ -801,6 +881,7 @@ const Bt = { class: "loading-container" }, Tt = { key: 0 }, zt = { key: 2 }, It
|
|
|
801
881
|
class_table: {},
|
|
802
882
|
class_filters: {},
|
|
803
883
|
class_page_size: {},
|
|
884
|
+
frontend_pagination: { type: Boolean },
|
|
804
885
|
limit_per_page: {},
|
|
805
886
|
page_starts_at: {},
|
|
806
887
|
min_loading_delay: {},
|
|
@@ -818,6 +899,7 @@ const Bt = { class: "loading-container" }, Tt = { key: 0 }, zt = { key: 2 }, It
|
|
|
818
899
|
disable_search: { type: Boolean },
|
|
819
900
|
deactivate_search_empty: { type: Boolean },
|
|
820
901
|
deactivate_search_on_clear: { type: Boolean },
|
|
902
|
+
custom_frontend_filter: { type: [Function, null] },
|
|
821
903
|
first_text_page_size: {},
|
|
822
904
|
second_text_page_size: {},
|
|
823
905
|
use_checkbox: { type: Boolean },
|
|
@@ -834,20 +916,20 @@ const Bt = { class: "loading-container" }, Tt = { key: 0 }, zt = { key: 2 }, It
|
|
|
834
916
|
column_manager_teleport: {}
|
|
835
917
|
},
|
|
836
918
|
emits: ["tradePage", "beforeFetch", "afterFetch", "clickedClearSearch"],
|
|
837
|
-
setup(
|
|
838
|
-
const
|
|
839
|
-
isHovering:
|
|
840
|
-
previewSrc:
|
|
841
|
-
previewStyle:
|
|
842
|
-
handleMouseOver:
|
|
843
|
-
handleMouseMove:
|
|
844
|
-
handleMouseLeave:
|
|
845
|
-
} =
|
|
846
|
-
current_page:
|
|
919
|
+
setup(d, { expose: _, emit: n }) {
|
|
920
|
+
const a = le(de), c = I(!1), {
|
|
921
|
+
isHovering: u,
|
|
922
|
+
previewSrc: w,
|
|
923
|
+
previewStyle: p,
|
|
924
|
+
handleMouseOver: T,
|
|
925
|
+
handleMouseMove: f,
|
|
926
|
+
handleMouseLeave: k
|
|
927
|
+
} = kt(), h = d, { options: s } = St(h), P = n, y = I({}), x = I([]), q = I(!1), M = I({
|
|
928
|
+
current_page: s.value.page_starts_at,
|
|
847
929
|
// pagina atual
|
|
848
930
|
count: 0,
|
|
849
931
|
// total de itens
|
|
850
|
-
limit_per_page:
|
|
932
|
+
limit_per_page: s.value.limit_per_page,
|
|
851
933
|
// limite de itens por página
|
|
852
934
|
search: "",
|
|
853
935
|
// termo de busca
|
|
@@ -855,380 +937,363 @@ const Bt = { class: "loading-container" }, Tt = { key: 0 }, zt = { key: 2 }, It
|
|
|
855
937
|
// filtro selecionado
|
|
856
938
|
}), {
|
|
857
939
|
expand_item_toggle: Y,
|
|
858
|
-
close_all_expanded_items:
|
|
859
|
-
is_item_expanded:
|
|
860
|
-
} =
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
940
|
+
close_all_expanded_items: ee,
|
|
941
|
+
is_item_expanded: G
|
|
942
|
+
} = bt(
|
|
943
|
+
s.value.close_expanded_item_on_expand_new,
|
|
944
|
+
s.value.item_key,
|
|
945
|
+
s.value.deactivate_animation_expand,
|
|
946
|
+
s.value.scroll_to_expanded_item
|
|
865
947
|
), {
|
|
866
|
-
items:
|
|
867
|
-
error:
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
for (const t of y.value) {
|
|
948
|
+
items: te,
|
|
949
|
+
error: X,
|
|
950
|
+
attempt: ae,
|
|
951
|
+
default_params: b,
|
|
952
|
+
fetchDataWithDelay: v,
|
|
953
|
+
reSearch: D,
|
|
954
|
+
showLoadingState: K,
|
|
955
|
+
first_fetch: W
|
|
956
|
+
} = wt(s, M, x, y, P, ee), {
|
|
957
|
+
selectAllCheckbox: Q,
|
|
958
|
+
selected_items: N,
|
|
959
|
+
isSelected: ye,
|
|
960
|
+
atLeastOneSelected: ze,
|
|
961
|
+
toggleSelectAll: ke,
|
|
962
|
+
toggleItemSelection: Ie
|
|
963
|
+
} = xt(s.value, te), ne = B(() => s.value.storage_id ? `vdatatable_${s.value.storage_id}_${s.value.endpoint}` : null);
|
|
964
|
+
function Pe() {
|
|
965
|
+
for (const l of x.value) {
|
|
885
966
|
let i = "";
|
|
886
|
-
const o =
|
|
887
|
-
if (
|
|
888
|
-
i =
|
|
967
|
+
const o = x.value.filter((z) => z.field === l.field).length;
|
|
968
|
+
if (l.field && o === 1)
|
|
969
|
+
i = l.field;
|
|
889
970
|
else {
|
|
890
|
-
const
|
|
891
|
-
if (
|
|
892
|
-
i =
|
|
971
|
+
const z = x.value.filter((g) => g.header === l.header).length;
|
|
972
|
+
if (l.header && z === 1)
|
|
973
|
+
i = l.header;
|
|
893
974
|
else
|
|
894
|
-
throw new Error(`[VDataTable] Falha de integridade: Impossível designar um ID único de armazenamento. O 'field' e 'header' estão duplicados ou ausentes. Header ofensor: ${
|
|
975
|
+
throw new Error(`[VDataTable] Falha de integridade: Impossível designar um ID único de armazenamento. O 'field' e 'header' estão duplicados ou ausentes. Header ofensor: ${l.header}`);
|
|
895
976
|
}
|
|
896
|
-
|
|
977
|
+
l.storage_key = i;
|
|
897
978
|
}
|
|
898
979
|
}
|
|
899
|
-
function
|
|
900
|
-
if (!
|
|
901
|
-
const
|
|
980
|
+
function ue() {
|
|
981
|
+
if (!ne.value) return;
|
|
982
|
+
const l = x.value.map((i) => ({
|
|
902
983
|
storage_key: i.storage_key,
|
|
903
984
|
visible: i.visible
|
|
904
985
|
}));
|
|
905
|
-
localStorage.setItem(
|
|
986
|
+
localStorage.setItem(ne.value, JSON.stringify(l));
|
|
906
987
|
}
|
|
907
|
-
function
|
|
908
|
-
if (!
|
|
909
|
-
const
|
|
910
|
-
if (
|
|
988
|
+
function De() {
|
|
989
|
+
if (!ne.value) return;
|
|
990
|
+
const l = localStorage.getItem(ne.value);
|
|
991
|
+
if (l)
|
|
911
992
|
try {
|
|
912
|
-
const i = JSON.parse(
|
|
913
|
-
if (JSON.stringify(o) !== JSON.stringify(
|
|
914
|
-
localStorage.removeItem(
|
|
993
|
+
const i = JSON.parse(l), o = x.value.map((j) => j.storage_key).sort(), z = i.map((j) => j.storage_key).sort();
|
|
994
|
+
if (JSON.stringify(o) !== JSON.stringify(z)) {
|
|
995
|
+
localStorage.removeItem(ne.value), ue();
|
|
915
996
|
return;
|
|
916
997
|
}
|
|
917
|
-
const
|
|
918
|
-
for (const
|
|
919
|
-
const
|
|
920
|
-
|
|
998
|
+
const g = [];
|
|
999
|
+
for (const j of i) {
|
|
1000
|
+
const L = x.value.find((Je) => Je.storage_key === j.storage_key);
|
|
1001
|
+
L && (L.visible = j.visible, g.push(L));
|
|
921
1002
|
}
|
|
922
|
-
|
|
1003
|
+
x.value.splice(0, x.value.length, ...g);
|
|
923
1004
|
} catch {
|
|
924
|
-
localStorage.removeItem(
|
|
1005
|
+
localStorage.removeItem(ne.value);
|
|
925
1006
|
}
|
|
926
1007
|
}
|
|
927
|
-
const
|
|
928
|
-
() =>
|
|
929
|
-
),
|
|
1008
|
+
const be = B(
|
|
1009
|
+
() => x.value.filter((l) => l.locked && l.visible !== !1)
|
|
1010
|
+
), ce = B({
|
|
930
1011
|
get() {
|
|
931
|
-
return
|
|
1012
|
+
return x.value.filter((l) => !l.locked && l.visible !== !1);
|
|
932
1013
|
},
|
|
933
|
-
set(
|
|
934
|
-
const i =
|
|
935
|
-
|
|
1014
|
+
set(l) {
|
|
1015
|
+
const i = x.value.filter((z) => z.locked), o = x.value.filter((z) => !z.locked && z.visible === !1);
|
|
1016
|
+
x.value.splice(0, x.value.length, ...l, ...o, ...i), ue();
|
|
936
1017
|
}
|
|
937
|
-
}),
|
|
938
|
-
id:
|
|
939
|
-
header:
|
|
940
|
-
field:
|
|
941
|
-
start_hidden: !!
|
|
1018
|
+
}), Ee = B(() => [...ce.value, ...be.value]), _e = B(() => x.value.map((l) => ({
|
|
1019
|
+
id: l.id,
|
|
1020
|
+
header: l.header,
|
|
1021
|
+
field: l.field,
|
|
1022
|
+
start_hidden: !!l.start_hidden,
|
|
942
1023
|
// Converte para booleano, caso seja undefined
|
|
943
|
-
visible:
|
|
944
|
-
locked:
|
|
1024
|
+
visible: l.visible !== !1,
|
|
1025
|
+
locked: l.locked
|
|
945
1026
|
})));
|
|
946
|
-
function
|
|
947
|
-
const i =
|
|
948
|
-
i && (i.visible = !i.visible,
|
|
1027
|
+
function pe(l) {
|
|
1028
|
+
const i = x.value.find((o) => o.id === l);
|
|
1029
|
+
i && (i.visible = !i.visible, ue());
|
|
949
1030
|
}
|
|
950
|
-
const
|
|
951
|
-
let
|
|
952
|
-
return
|
|
953
|
-
}),
|
|
954
|
-
|
|
955
|
-
t ? ($.value = t[a.value.data_key] || [], P.value = t[a.value.total_key] || 0, w.value.count = P.value) : ($.value = [], P.value = 0);
|
|
956
|
-
}, { immediate: !0 });
|
|
957
|
-
function Ae() {
|
|
1031
|
+
const Ve = B(() => {
|
|
1032
|
+
let l = [1];
|
|
1033
|
+
return s.value.list_filter.length > 0 && l.push(2), l;
|
|
1034
|
+
}), oe = B(() => te.value.length > 0);
|
|
1035
|
+
function Ne() {
|
|
958
1036
|
setTimeout(() => {
|
|
959
|
-
|
|
1037
|
+
q.value = !1;
|
|
960
1038
|
}, 500);
|
|
961
1039
|
}
|
|
962
|
-
function
|
|
963
|
-
|
|
1040
|
+
function je(l) {
|
|
1041
|
+
x.value.push(l);
|
|
964
1042
|
}
|
|
965
|
-
|
|
966
|
-
const
|
|
967
|
-
const i =
|
|
968
|
-
o > 0 && (
|
|
1043
|
+
Ze(Oe, { addColumn: je });
|
|
1044
|
+
const we = (l) => {
|
|
1045
|
+
const i = l.target, o = parseInt(i.value, 10);
|
|
1046
|
+
o > 0 && (M.value.limit_per_page = o, M.value.limit_per_page = o, D());
|
|
969
1047
|
};
|
|
970
|
-
function
|
|
971
|
-
if (!
|
|
972
|
-
const
|
|
973
|
-
let
|
|
974
|
-
for (const
|
|
975
|
-
|
|
976
|
-
return o && (
|
|
1048
|
+
function U(l, i, o = null) {
|
|
1049
|
+
if (!l) return i;
|
|
1050
|
+
const z = l.split(".");
|
|
1051
|
+
let g = i;
|
|
1052
|
+
for (const j of z)
|
|
1053
|
+
g && typeof g == "object" && j in g ? g = g[j] : console.error(`Caminho inválido ou valor nulo em: ${l} na parte ${j}`);
|
|
1054
|
+
return o && (g = o(g)), g;
|
|
977
1055
|
}
|
|
978
|
-
function
|
|
979
|
-
return i && typeof i == "number" && i > 0 && typeof
|
|
1056
|
+
function Ae(l, i) {
|
|
1057
|
+
return i && typeof i == "number" && i > 0 && typeof l == "string" && l.length > i ? l.substring(0, i) + "..." : l;
|
|
980
1058
|
}
|
|
981
|
-
function
|
|
982
|
-
for (const o in
|
|
983
|
-
o !==
|
|
984
|
-
const i =
|
|
985
|
-
i === "none" ?
|
|
1059
|
+
function xe(l) {
|
|
1060
|
+
for (const o in y.value)
|
|
1061
|
+
o !== l && (y.value[o] = "none");
|
|
1062
|
+
const i = y.value[l] || "none";
|
|
1063
|
+
i === "none" ? y.value[l] = "increasing" : i === "increasing" ? y.value[l] = "decreasing" : y.value[l] = "none", D();
|
|
986
1064
|
}
|
|
987
|
-
function
|
|
988
|
-
|
|
1065
|
+
function He(l) {
|
|
1066
|
+
l > 0 ? (M.value.limit_per_page = l, D()) : console.warn("O limite deve ser um número maior que zero.");
|
|
989
1067
|
}
|
|
990
|
-
function Fe(
|
|
991
|
-
|
|
1068
|
+
function Fe(l) {
|
|
1069
|
+
M.value.search = l, D();
|
|
992
1070
|
}
|
|
993
|
-
function
|
|
994
|
-
|
|
1071
|
+
function Le(l) {
|
|
1072
|
+
M.value.filter = l, D();
|
|
995
1073
|
}
|
|
996
|
-
function
|
|
997
|
-
|
|
1074
|
+
function qe(l) {
|
|
1075
|
+
l >= 0 && l <= Math.ceil(M.value.count / M.value.limit_per_page) ? (M.value.current_page = l, v()) : console.warn("Número de página inválido.");
|
|
998
1076
|
}
|
|
999
|
-
function
|
|
1000
|
-
let
|
|
1001
|
-
return
|
|
1077
|
+
function Ke() {
|
|
1078
|
+
let l = x.value.length;
|
|
1079
|
+
return s.value.use_checkbox && (l += 1), s.value.use_expandable_items && (l += 1), l;
|
|
1002
1080
|
}
|
|
1003
|
-
function
|
|
1004
|
-
|
|
1081
|
+
function Ue() {
|
|
1082
|
+
P("tradePage"), v();
|
|
1005
1083
|
}
|
|
1006
|
-
const
|
|
1007
|
-
const o = [
|
|
1008
|
-
if (
|
|
1009
|
-
for (const [
|
|
1010
|
-
typeof
|
|
1084
|
+
const re = (l, i) => {
|
|
1085
|
+
const o = [l.class_item || ""];
|
|
1086
|
+
if (l.click && o.push("cursor-pointer"), l.class_rules)
|
|
1087
|
+
for (const [z, g] of Object.entries(l.class_rules))
|
|
1088
|
+
typeof g == "function" && g(i) && o.push(z);
|
|
1011
1089
|
return o.join(" ").trim();
|
|
1012
1090
|
};
|
|
1013
|
-
return
|
|
1014
|
-
execute:
|
|
1015
|
-
reSearch:
|
|
1016
|
-
pagination:
|
|
1017
|
-
set_limit_per_page:
|
|
1091
|
+
return _({
|
|
1092
|
+
execute: v,
|
|
1093
|
+
reSearch: D,
|
|
1094
|
+
pagination: Re(M),
|
|
1095
|
+
set_limit_per_page: He,
|
|
1018
1096
|
set_search: Fe,
|
|
1019
|
-
set_filter:
|
|
1020
|
-
set_page:
|
|
1021
|
-
default_params:
|
|
1022
|
-
selected_items:
|
|
1023
|
-
atLeastOneSelected:
|
|
1097
|
+
set_filter: Le,
|
|
1098
|
+
set_page: qe,
|
|
1099
|
+
default_params: b,
|
|
1100
|
+
selected_items: N,
|
|
1101
|
+
atLeastOneSelected: ze,
|
|
1024
1102
|
expand_item_toggle: Y,
|
|
1025
|
-
close_all_expanded_items:
|
|
1026
|
-
selectAllCheckbox:
|
|
1027
|
-
toggleColumnVisibility:
|
|
1028
|
-
columns_list:
|
|
1029
|
-
}),
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
}),
|
|
1033
|
-
|
|
1103
|
+
close_all_expanded_items: ee,
|
|
1104
|
+
selectAllCheckbox: Q,
|
|
1105
|
+
toggleColumnVisibility: pe,
|
|
1106
|
+
columns_list: _e
|
|
1107
|
+
}), $e(() => {
|
|
1108
|
+
c.value = !0, s.value.immediate && fe(() => {
|
|
1109
|
+
D();
|
|
1110
|
+
}), fe(() => {
|
|
1111
|
+
s.value.storage_id && (Pe(), De());
|
|
1034
1112
|
});
|
|
1035
|
-
}),
|
|
1036
|
-
(
|
|
1037
|
-
|
|
1038
|
-
return JSON.stringify(t);
|
|
1039
|
-
},
|
|
1040
|
-
(t, i) => {
|
|
1041
|
-
t !== i && i !== void 0 && j();
|
|
1042
|
-
}
|
|
1043
|
-
), Q(
|
|
1044
|
-
() => a.value.endpoint,
|
|
1045
|
-
(t, i) => {
|
|
1046
|
-
t !== i && i !== void 0 && (w.value.current_page = a.value.page_starts_at);
|
|
1047
|
-
}
|
|
1048
|
-
), (t, i) => (e(), d("div", null, [
|
|
1049
|
-
_("div", {
|
|
1050
|
-
class: b(["", s(a).class_container])
|
|
1113
|
+
}), (l, i) => (e(), r("div", null, [
|
|
1114
|
+
m("div", {
|
|
1115
|
+
class: S(["", t(s).class_container])
|
|
1051
1116
|
}, [
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
class:
|
|
1117
|
+
F(l.$slots, "default", {}, void 0, !0),
|
|
1118
|
+
m("div", {
|
|
1119
|
+
class: S(["", t(s).class_content])
|
|
1055
1120
|
}, [
|
|
1056
|
-
|
|
1057
|
-
class:
|
|
1121
|
+
m("div", {
|
|
1122
|
+
class: S([t(s).class_filters, "d-flex justify-content-between align-items-start"])
|
|
1058
1123
|
}, [
|
|
1059
|
-
|
|
1060
|
-
changePageSize:
|
|
1061
|
-
limit_per_page:
|
|
1124
|
+
F(l.$slots, "pageSize", {
|
|
1125
|
+
changePageSize: we,
|
|
1126
|
+
limit_per_page: M.value.limit_per_page
|
|
1062
1127
|
}, () => [
|
|
1063
|
-
|
|
1064
|
-
class:
|
|
1128
|
+
m("div", {
|
|
1129
|
+
class: S(["text-secondary", t(s).class_page_size])
|
|
1065
1130
|
}, [
|
|
1066
|
-
H(
|
|
1067
|
-
|
|
1068
|
-
|
|
1131
|
+
H(O(t(s).first_text_page_size) + " ", 1),
|
|
1132
|
+
m("div", qt, [
|
|
1133
|
+
Be(m("input", {
|
|
1069
1134
|
class: "form-control form-control-sm",
|
|
1070
|
-
onChange:
|
|
1071
|
-
"onUpdate:modelValue": i[0] || (i[0] = (o) =>
|
|
1135
|
+
onChange: we,
|
|
1136
|
+
"onUpdate:modelValue": i[0] || (i[0] = (o) => M.value.limit_per_page = o),
|
|
1072
1137
|
min: "1",
|
|
1073
1138
|
size: "3",
|
|
1074
1139
|
"aria-label": "Número de registros por página",
|
|
1075
1140
|
type: "number"
|
|
1076
1141
|
}, null, 544), [
|
|
1077
1142
|
[
|
|
1078
|
-
|
|
1079
|
-
|
|
1143
|
+
Te,
|
|
1144
|
+
M.value.limit_per_page,
|
|
1080
1145
|
void 0,
|
|
1081
1146
|
{ lazy: !0 }
|
|
1082
1147
|
]
|
|
1083
1148
|
])
|
|
1084
1149
|
]),
|
|
1085
|
-
H(" " +
|
|
1150
|
+
H(" " + O(t(s).second_text_page_size), 1)
|
|
1086
1151
|
], 2)
|
|
1087
1152
|
], !0),
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1153
|
+
F(l.$slots, "fieldMiddle", {}, void 0, !0),
|
|
1154
|
+
m("div", Kt, [
|
|
1155
|
+
c.value ? (e(), $(ie, {
|
|
1091
1156
|
key: 0,
|
|
1092
|
-
to: s
|
|
1093
|
-
disabled: !s
|
|
1157
|
+
to: t(s).search_teleport || "body",
|
|
1158
|
+
disabled: !t(s).search_teleport
|
|
1094
1159
|
}, [
|
|
1095
|
-
s
|
|
1160
|
+
t(s).disable_search ? C("", !0) : (e(), $(gt, {
|
|
1096
1161
|
key: 0,
|
|
1097
|
-
search:
|
|
1098
|
-
"onUpdate:search": i[1] || (i[1] = (o) =>
|
|
1099
|
-
filter:
|
|
1100
|
-
"onUpdate:filter": i[2] || (i[2] = (o) =>
|
|
1101
|
-
list_filter: s
|
|
1102
|
-
item_use:
|
|
1103
|
-
onSearch:
|
|
1104
|
-
deactivate_search_on_clear: s
|
|
1105
|
-
placeholder_search: s
|
|
1106
|
-
deactivate_search_empty: s
|
|
1107
|
-
use_column_manager: s
|
|
1108
|
-
toggleColumnVisibility:
|
|
1109
|
-
columns_list:
|
|
1110
|
-
onClickedClearSearch: i[3] || (i[3] = (o) =>
|
|
1162
|
+
search: M.value.search,
|
|
1163
|
+
"onUpdate:search": i[1] || (i[1] = (o) => M.value.search = o),
|
|
1164
|
+
filter: M.value.filter,
|
|
1165
|
+
"onUpdate:filter": i[2] || (i[2] = (o) => M.value.filter = o),
|
|
1166
|
+
list_filter: t(s).list_filter,
|
|
1167
|
+
item_use: Ve.value,
|
|
1168
|
+
onSearch: t(D),
|
|
1169
|
+
deactivate_search_on_clear: t(s).deactivate_search_on_clear,
|
|
1170
|
+
placeholder_search: t(s).placeholder_search,
|
|
1171
|
+
deactivate_search_empty: t(s).deactivate_search_empty,
|
|
1172
|
+
use_column_manager: t(s).use_column_manager,
|
|
1173
|
+
toggleColumnVisibility: pe,
|
|
1174
|
+
columns_list: _e.value,
|
|
1175
|
+
onClickedClearSearch: i[3] || (i[3] = (o) => l.$emit("clickedClearSearch"))
|
|
1111
1176
|
}, {
|
|
1112
|
-
"search-field":
|
|
1113
|
-
|
|
1114
|
-
search:
|
|
1115
|
-
filter:
|
|
1116
|
-
reSearch:
|
|
1177
|
+
"search-field": Z(() => [
|
|
1178
|
+
F(l.$slots, "search-field", {
|
|
1179
|
+
search: M.value.search,
|
|
1180
|
+
filter: M.value.filter,
|
|
1181
|
+
reSearch: t(D)
|
|
1117
1182
|
}, void 0, !0)
|
|
1118
1183
|
]),
|
|
1119
1184
|
_: 3
|
|
1120
1185
|
}, 8, ["search", "filter", "list_filter", "item_use", "onSearch", "deactivate_search_on_clear", "placeholder_search", "deactivate_search_empty", "use_column_manager", "columns_list"]))
|
|
1121
|
-
], 8, ["to", "disabled"])) :
|
|
1122
|
-
|
|
1186
|
+
], 8, ["to", "disabled"])) : C("", !0),
|
|
1187
|
+
c.value ? (e(), $(ie, {
|
|
1123
1188
|
key: 1,
|
|
1124
|
-
to: s
|
|
1125
|
-
disabled: !s
|
|
1189
|
+
to: t(s).column_manager_teleport || "body",
|
|
1190
|
+
disabled: !t(s).column_manager_teleport
|
|
1126
1191
|
}, [
|
|
1127
|
-
|
|
1128
|
-
use_column_manager: s
|
|
1129
|
-
columns_list:
|
|
1130
|
-
toggleColumnVisibility:
|
|
1131
|
-
disable_class_column_manager_default: s
|
|
1132
|
-
class_column_manager_button: s
|
|
1133
|
-
class_column_manager_dropdown_menu: s
|
|
1134
|
-
class_column_manager_dropdown: s
|
|
1192
|
+
se(yt, {
|
|
1193
|
+
use_column_manager: t(s).use_column_manager,
|
|
1194
|
+
columns_list: _e.value,
|
|
1195
|
+
toggleColumnVisibility: pe,
|
|
1196
|
+
disable_class_column_manager_default: t(s).disable_class_column_manager_default,
|
|
1197
|
+
class_column_manager_button: t(s).class_column_manager_button,
|
|
1198
|
+
class_column_manager_dropdown_menu: t(s).class_column_manager_dropdown_menu,
|
|
1199
|
+
class_column_manager_dropdown: t(s).class_column_manager_dropdown
|
|
1135
1200
|
}, null, 8, ["use_column_manager", "columns_list", "disable_class_column_manager_default", "class_column_manager_button", "class_column_manager_dropdown_menu", "class_column_manager_dropdown"])
|
|
1136
|
-
], 8, ["to", "disabled"])) :
|
|
1137
|
-
|
|
1201
|
+
], 8, ["to", "disabled"])) : C("", !0),
|
|
1202
|
+
c.value ? (e(), $(ie, {
|
|
1138
1203
|
key: 2,
|
|
1139
|
-
to: s
|
|
1140
|
-
disabled: !s
|
|
1204
|
+
to: t(s).extra_actions_teleport || "body",
|
|
1205
|
+
disabled: !t(s).extra_actions_teleport
|
|
1141
1206
|
}, [
|
|
1142
|
-
|
|
1143
|
-
], 8, ["to", "disabled"])) :
|
|
1207
|
+
F(l.$slots, "extra-actions", {}, void 0, !0)
|
|
1208
|
+
], 8, ["to", "disabled"])) : C("", !0)
|
|
1144
1209
|
])
|
|
1145
1210
|
], 2),
|
|
1146
|
-
|
|
1147
|
-
selected_items:
|
|
1148
|
-
clearSelection: () =>
|
|
1211
|
+
F(l.$slots, "item-selected-info", {
|
|
1212
|
+
selected_items: t(N),
|
|
1213
|
+
clearSelection: () => N.value = []
|
|
1149
1214
|
}, () => [
|
|
1150
|
-
s
|
|
1151
|
-
|
|
1152
|
-
i[10] || (i[10] =
|
|
1215
|
+
t(s).use_checkbox && t(N).length > 0 && !t(s).deactivate_selected_info ? (e(), r("div", Ut, [
|
|
1216
|
+
m("h4", Jt, [
|
|
1217
|
+
i[10] || (i[10] = m("strong", null, "oi Itens Selecionados:", -1)),
|
|
1153
1218
|
i[11] || (i[11] = H()),
|
|
1154
|
-
|
|
1219
|
+
m("span", Yt, O(t(N).length), 1)
|
|
1155
1220
|
]),
|
|
1156
|
-
|
|
1221
|
+
m("a", {
|
|
1157
1222
|
class: "cursor-pointer",
|
|
1158
|
-
onClick: i[4] || (i[4] = (o) =>
|
|
1223
|
+
onClick: i[4] || (i[4] = (o) => N.value = [])
|
|
1159
1224
|
}, [
|
|
1160
|
-
(e(),
|
|
1225
|
+
(e(), $(V(t(a).checkbox.clear))),
|
|
1161
1226
|
i[12] || (i[12] = H(" Limpar Seleção ", -1))
|
|
1162
1227
|
])
|
|
1163
|
-
])) :
|
|
1228
|
+
])) : C("", !0)
|
|
1164
1229
|
], !0),
|
|
1165
|
-
|
|
1230
|
+
t(K) ? (e(), $(Ht, {
|
|
1166
1231
|
key: 0,
|
|
1167
|
-
columns:
|
|
1168
|
-
limit:
|
|
1169
|
-
type_loading: s
|
|
1170
|
-
custom_loading: s
|
|
1171
|
-
class_table: s
|
|
1172
|
-
attempt:
|
|
1173
|
-
pagination:
|
|
1174
|
-
}, null, 8, ["columns", "limit", "type_loading", "custom_loading", "class_table", "attempt", "pagination"])) :
|
|
1175
|
-
i[13] || (i[13] =
|
|
1176
|
-
|
|
1177
|
-
|
|
1232
|
+
columns: x.value,
|
|
1233
|
+
limit: M.value.limit_per_page,
|
|
1234
|
+
type_loading: t(s).type_loading,
|
|
1235
|
+
custom_loading: t(s).custom_loading,
|
|
1236
|
+
class_table: t(s).class_table,
|
|
1237
|
+
attempt: t(ae),
|
|
1238
|
+
pagination: M.value
|
|
1239
|
+
}, null, 8, ["columns", "limit", "type_loading", "custom_loading", "class_table", "attempt", "pagination"])) : t(X) ? (e(), r("div", Gt, [
|
|
1240
|
+
i[13] || (i[13] = m("h4", { class: "text-danger" }, "Ocorreu um Erro", -1)),
|
|
1241
|
+
t(ae) ? (e(), r("p", Xt, " Não foi possível carregar os dados após " + O(t(ae).total) + " tentativa(s). ", 1)) : (e(), r("p", Wt, " Não foi possível carregar os dados. Verifique sua conexão. ")),
|
|
1242
|
+
m("button", {
|
|
1178
1243
|
class: "btn btn-primary mt-2",
|
|
1179
1244
|
onClick: i[5] || (i[5] = //@ts-ignore
|
|
1180
|
-
(...o) =>
|
|
1245
|
+
(...o) => t(v) && t(v)(...o))
|
|
1181
1246
|
}, " Tentar Novamente ")
|
|
1182
|
-
])) :
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
class:
|
|
1247
|
+
])) : t(te) ? (e(), r("div", Qt, [
|
|
1248
|
+
oe.value || t(s).show_header_when_empty ? (e(), r("div", Zt, [
|
|
1249
|
+
m("table", {
|
|
1250
|
+
class: S(["table table-vcenter table-selectable", t(s).class_table])
|
|
1186
1251
|
}, [
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
modelValue:
|
|
1190
|
-
"onUpdate:modelValue": i[7] || (i[7] = (o) =>
|
|
1252
|
+
m("thead", null, [
|
|
1253
|
+
se(t(st), {
|
|
1254
|
+
modelValue: ce.value,
|
|
1255
|
+
"onUpdate:modelValue": i[7] || (i[7] = (o) => ce.value = o),
|
|
1191
1256
|
tag: "tr",
|
|
1192
1257
|
"item-key": "id",
|
|
1193
1258
|
animation: 400,
|
|
1194
1259
|
"ghost-class": "ghost-item",
|
|
1195
1260
|
"drag-class": "dragging-item",
|
|
1196
|
-
onStart: i[8] || (i[8] = (o) =>
|
|
1197
|
-
onEnd: i[9] || (i[9] = () =>
|
|
1261
|
+
onStart: i[8] || (i[8] = (o) => q.value = !0),
|
|
1262
|
+
onEnd: i[9] || (i[9] = () => Ne())
|
|
1198
1263
|
}, {
|
|
1199
|
-
header:
|
|
1200
|
-
s
|
|
1201
|
-
s
|
|
1202
|
-
|
|
1264
|
+
header: Z(() => [
|
|
1265
|
+
t(s).use_expandable_items ? (e(), r("th", Rt)) : C("", !0),
|
|
1266
|
+
t(s).use_checkbox ? (e(), r("th", ea, [
|
|
1267
|
+
m("input", {
|
|
1203
1268
|
class: "form-check-input m-0",
|
|
1204
1269
|
type: "checkbox",
|
|
1205
1270
|
ref_key: "selectAllCheckbox",
|
|
1206
|
-
ref:
|
|
1271
|
+
ref: Q,
|
|
1207
1272
|
onChange: i[6] || (i[6] = //@ts-ignore
|
|
1208
|
-
(...o) =>
|
|
1273
|
+
(...o) => t(ke) && t(ke)(...o)),
|
|
1209
1274
|
"aria-label": "Selecionar todos os itens na página"
|
|
1210
1275
|
}, null, 544)
|
|
1211
|
-
])) :
|
|
1276
|
+
])) : C("", !0)
|
|
1212
1277
|
]),
|
|
1213
|
-
item:
|
|
1214
|
-
|
|
1278
|
+
item: Z(({ element: o }) => [
|
|
1279
|
+
se(Se, {
|
|
1215
1280
|
header: o.header,
|
|
1216
1281
|
class_column: o.class_column,
|
|
1217
1282
|
use_ordering: o.use_ordering,
|
|
1218
|
-
orderings_state:
|
|
1219
|
-
onToggleOrderingState: () =>
|
|
1283
|
+
orderings_state: y.value[o.id] || "none",
|
|
1284
|
+
onToggleOrderingState: () => xe(o.id),
|
|
1220
1285
|
locked: !1,
|
|
1221
1286
|
col: o
|
|
1222
1287
|
}, null, 8, ["header", "class_column", "use_ordering", "orderings_state", "onToggleOrderingState", "col"])
|
|
1223
1288
|
]),
|
|
1224
|
-
footer:
|
|
1225
|
-
(e(!0),
|
|
1289
|
+
footer: Z(() => [
|
|
1290
|
+
(e(!0), r(E, null, A(be.value, (o) => (e(), $(Se, {
|
|
1226
1291
|
key: o.field || o.header,
|
|
1227
1292
|
header: o.header,
|
|
1228
1293
|
class_column: o.class_column,
|
|
1229
1294
|
use_ordering: o.use_ordering,
|
|
1230
|
-
orderings_state:
|
|
1231
|
-
onToggleOrderingState: () =>
|
|
1295
|
+
orderings_state: y.value[o.id] || "none",
|
|
1296
|
+
onToggleOrderingState: () => xe(o.id),
|
|
1232
1297
|
col: o,
|
|
1233
1298
|
locked: ""
|
|
1234
1299
|
}, null, 8, ["header", "class_column", "use_ordering", "orderings_state", "onToggleOrderingState", "col"]))), 128))
|
|
@@ -1236,175 +1301,175 @@ const Bt = { class: "loading-container" }, Tt = { key: 0 }, zt = { key: 2 }, It
|
|
|
1236
1301
|
_: 1
|
|
1237
1302
|
}, 8, ["modelValue"])
|
|
1238
1303
|
]),
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
key: o[s
|
|
1304
|
+
m("tbody", null, [
|
|
1305
|
+
oe.value ? (e(!0), r(E, { key: 0 }, A(t(te), (o, z) => (e(), r(E, {
|
|
1306
|
+
key: o[t(s).item_key]
|
|
1242
1307
|
}, [
|
|
1243
|
-
|
|
1308
|
+
se(et, {
|
|
1244
1309
|
tag: "tr",
|
|
1245
|
-
name:
|
|
1310
|
+
name: q.value ? "column-move" : ""
|
|
1246
1311
|
}, {
|
|
1247
|
-
default:
|
|
1248
|
-
s
|
|
1249
|
-
|
|
1312
|
+
default: Z(() => [
|
|
1313
|
+
t(s).use_expandable_items ? (e(), r("td", ta, [
|
|
1314
|
+
F(l.$slots, "expand-button", {
|
|
1250
1315
|
item: o,
|
|
1251
|
-
index:
|
|
1252
|
-
isExpanded:
|
|
1253
|
-
expand_item_toggle:
|
|
1316
|
+
index: z,
|
|
1317
|
+
isExpanded: t(G)(o),
|
|
1318
|
+
expand_item_toggle: t(Y)
|
|
1254
1319
|
}, () => [
|
|
1255
|
-
|
|
1320
|
+
m("button", {
|
|
1256
1321
|
type: "button",
|
|
1257
|
-
class:
|
|
1258
|
-
onClick: (
|
|
1322
|
+
class: S(["btn-clean btn-icon-anim", { "is-expanded": t(G)(o) }]),
|
|
1323
|
+
onClick: (g) => t(Y)(o)
|
|
1259
1324
|
}, [
|
|
1260
|
-
s
|
|
1261
|
-
], 10,
|
|
1325
|
+
t(s).type_button_expand === "arrow" ? (e(), $(V(t(a).expand.arrow), { key: 0 })) : (e(), $(V(t(a).expand.plus), { key: 1 }))
|
|
1326
|
+
], 10, aa)
|
|
1262
1327
|
], !0)
|
|
1263
|
-
])) :
|
|
1264
|
-
s
|
|
1265
|
-
|
|
1328
|
+
])) : C("", !0),
|
|
1329
|
+
t(s).use_checkbox ? (e(), r("td", na, [
|
|
1330
|
+
m("input", {
|
|
1266
1331
|
class: "form-check-input m-0",
|
|
1267
1332
|
type: "checkbox",
|
|
1268
|
-
checked:
|
|
1269
|
-
onChange: (
|
|
1333
|
+
checked: t(ye)(o),
|
|
1334
|
+
onChange: (g) => t(Ie)(o),
|
|
1270
1335
|
"aria-label": "Selecionar este item"
|
|
1271
|
-
}, null, 40,
|
|
1272
|
-
])) :
|
|
1273
|
-
(e(!0),
|
|
1274
|
-
key:
|
|
1275
|
-
class:
|
|
1336
|
+
}, null, 40, sa)
|
|
1337
|
+
])) : C("", !0),
|
|
1338
|
+
(e(!0), r(E, null, A(Ee.value, (g, j) => (e(), r("td", {
|
|
1339
|
+
key: g.field || g.header,
|
|
1340
|
+
class: S(g.class_row)
|
|
1276
1341
|
}, [
|
|
1277
|
-
|
|
1342
|
+
g.bodySlot ? (e(), $(V(g.bodySlot), {
|
|
1278
1343
|
key: 0,
|
|
1279
1344
|
item: o,
|
|
1280
|
-
index:
|
|
1281
|
-
"is-selected":
|
|
1282
|
-
}, null, 8, ["item", "index", "is-selected"])) :
|
|
1345
|
+
index: j,
|
|
1346
|
+
"is-selected": t(ye)(o)
|
|
1347
|
+
}, null, 8, ["item", "index", "is-selected"])) : g.type === "text" ? (e(), r("span", {
|
|
1283
1348
|
key: 1,
|
|
1284
|
-
onClick: (
|
|
1285
|
-
class:
|
|
1286
|
-
},
|
|
1349
|
+
onClick: (L) => g.click ? g.click(o) : null,
|
|
1350
|
+
class: S(re(g, o))
|
|
1351
|
+
}, O(Ae(U(g.field, o, g.transform_function), g.limite_text ?? null)), 11, la)) : g.type === "date" ? (e(), r("span", {
|
|
1287
1352
|
key: 2,
|
|
1288
|
-
onClick: (
|
|
1289
|
-
class:
|
|
1353
|
+
onClick: (L) => g.click ? g.click(o) : null,
|
|
1354
|
+
class: S(re(g, o))
|
|
1290
1355
|
}, [
|
|
1291
|
-
|
|
1292
|
-
|
|
1356
|
+
g.format === "complete" ? (e(), r("span", ra, O(new Date(U(
|
|
1357
|
+
g.field,
|
|
1293
1358
|
o
|
|
1294
|
-
)).toLocaleString()), 1)) :
|
|
1295
|
-
|
|
1296
|
-
|
|
1359
|
+
)).toLocaleString()), 1)) : C("", !0),
|
|
1360
|
+
g.format === "simple" ? (e(), r("span", ia, O(new Date(U(
|
|
1361
|
+
g.field,
|
|
1297
1362
|
o
|
|
1298
|
-
)).toLocaleDateString()), 1)) :
|
|
1299
|
-
], 10,
|
|
1363
|
+
)).toLocaleDateString()), 1)) : C("", !0)
|
|
1364
|
+
], 10, oa)) : g.type === "html" ? (e(), r("div", {
|
|
1300
1365
|
key: 3,
|
|
1301
|
-
onClick: (
|
|
1302
|
-
class:
|
|
1303
|
-
innerHTML:
|
|
1304
|
-
}, null, 10,
|
|
1366
|
+
onClick: (L) => g.click ? g.click(o) : null,
|
|
1367
|
+
class: S(re(g, o)),
|
|
1368
|
+
innerHTML: U(g.field, o)
|
|
1369
|
+
}, null, 10, da)) : g.type === "img" ? (e(), r("div", {
|
|
1305
1370
|
key: 4,
|
|
1306
|
-
onClick: (
|
|
1307
|
-
class:
|
|
1371
|
+
onClick: (L) => g.click ? g.click(o) : null,
|
|
1372
|
+
class: S(re(g, o))
|
|
1308
1373
|
}, [
|
|
1309
|
-
|
|
1374
|
+
U(g.field, o) ? (e(), r("div", ve({
|
|
1310
1375
|
key: 0,
|
|
1311
1376
|
ref_for: !0
|
|
1312
|
-
},
|
|
1377
|
+
}, g.deactivate_img_preview ? {
|
|
1313
1378
|
class: "container-img"
|
|
1314
1379
|
} : {
|
|
1315
|
-
onMouseover: (
|
|
1316
|
-
onMousemove:
|
|
1317
|
-
onMouseleave:
|
|
1380
|
+
onMouseover: (L) => t(T)(L, U(g.field, o)),
|
|
1381
|
+
onMousemove: t(f),
|
|
1382
|
+
onMouseleave: t(k),
|
|
1318
1383
|
class: "container-img container-img-preview"
|
|
1319
1384
|
}), [
|
|
1320
|
-
|
|
1385
|
+
m("img", {
|
|
1321
1386
|
class: "img-tamanho",
|
|
1322
|
-
src:
|
|
1323
|
-
}, null, 8,
|
|
1324
|
-
|
|
1387
|
+
src: U(g.field, o)
|
|
1388
|
+
}, null, 8, ca),
|
|
1389
|
+
m("img", {
|
|
1325
1390
|
class: "img-tamanho-cover",
|
|
1326
|
-
src:
|
|
1327
|
-
}, null, 8,
|
|
1328
|
-
i[14] || (i[14] =
|
|
1329
|
-
], 16)) :
|
|
1330
|
-
], 10,
|
|
1391
|
+
src: U(g.field, o)
|
|
1392
|
+
}, null, 8, _a),
|
|
1393
|
+
i[14] || (i[14] = m("div", { class: "bg-img" }, null, -1))
|
|
1394
|
+
], 16)) : C("", !0)
|
|
1395
|
+
], 10, ua)) : (e(), r("span", pa, [
|
|
1331
1396
|
i[15] || (i[15] = H("tipo ", -1)),
|
|
1332
|
-
|
|
1397
|
+
m("span", ma, O(g.type), 1),
|
|
1333
1398
|
i[16] || (i[16] = H(" não suportado", -1))
|
|
1334
1399
|
]))
|
|
1335
1400
|
], 2))), 128))
|
|
1336
1401
|
]),
|
|
1337
1402
|
_: 2
|
|
1338
1403
|
}, 1032, ["name"]),
|
|
1339
|
-
|
|
1340
|
-
name: "expand-item-" + s
|
|
1341
|
-
css: !s
|
|
1404
|
+
se(tt, {
|
|
1405
|
+
name: "expand-item-" + t(s).type_animation_expand,
|
|
1406
|
+
css: !t(s).deactivate_animation_expand
|
|
1342
1407
|
}, {
|
|
1343
|
-
default:
|
|
1344
|
-
|
|
1408
|
+
default: Z(() => [
|
|
1409
|
+
t(G)(o) ? (e(), r("tr", {
|
|
1345
1410
|
key: 0,
|
|
1346
|
-
id: "expand-item-" + o[s
|
|
1411
|
+
id: "expand-item-" + o[t(s).item_key],
|
|
1347
1412
|
class: "expanded-item-row"
|
|
1348
1413
|
}, [
|
|
1349
|
-
|
|
1350
|
-
colspan:
|
|
1414
|
+
m("td", {
|
|
1415
|
+
colspan: Ke()
|
|
1351
1416
|
}, [
|
|
1352
|
-
|
|
1353
|
-
], 8,
|
|
1354
|
-
], 8,
|
|
1417
|
+
F(l.$slots, "after-row", { item: o }, void 0, !0)
|
|
1418
|
+
], 8, fa)
|
|
1419
|
+
], 8, ga)) : C("", !0)
|
|
1355
1420
|
]),
|
|
1356
1421
|
_: 2
|
|
1357
1422
|
}, 1032, ["name", "css"])
|
|
1358
|
-
], 64))), 128)) :
|
|
1423
|
+
], 64))), 128)) : C("", !0)
|
|
1359
1424
|
])
|
|
1360
1425
|
], 2)
|
|
1361
|
-
])) :
|
|
1362
|
-
!
|
|
1363
|
-
|
|
1364
|
-
])) :
|
|
1365
|
-
|
|
1426
|
+
])) : C("", !0),
|
|
1427
|
+
!oe.value && t(W) === !1 ? (e(), r("div", va, [
|
|
1428
|
+
F(l.$slots, "idle-state", {}, void 0, !0)
|
|
1429
|
+
])) : oe.value ? C("", !0) : (e(), r("div", ha, [...i[17] || (i[17] = [
|
|
1430
|
+
m("p", { class: "m-0" }, "Nenhum item encontrado.", -1)
|
|
1366
1431
|
])]))
|
|
1367
|
-
])) :
|
|
1432
|
+
])) : C("", !0)
|
|
1368
1433
|
], 2)
|
|
1369
1434
|
], 2),
|
|
1370
|
-
|
|
1435
|
+
c.value ? (e(), $(ie, {
|
|
1371
1436
|
key: 0,
|
|
1372
|
-
to: s
|
|
1373
|
-
disabled: !s
|
|
1437
|
+
to: t(s).pagination_teleport || "body",
|
|
1438
|
+
disabled: !t(s).pagination_teleport
|
|
1374
1439
|
}, [
|
|
1375
|
-
|
|
1376
|
-
pagination:
|
|
1377
|
-
tradePage:
|
|
1378
|
-
error:
|
|
1440
|
+
F(l.$slots, "pagination", {
|
|
1441
|
+
pagination: M.value,
|
|
1442
|
+
tradePage: t(v),
|
|
1443
|
+
error: t(X)
|
|
1379
1444
|
}, () => [
|
|
1380
|
-
!
|
|
1445
|
+
!t(X) && M.value.count > 0 ? (e(), r("div", {
|
|
1381
1446
|
key: 0,
|
|
1382
|
-
class:
|
|
1447
|
+
class: S(["px-3", t(s).class_pagination])
|
|
1383
1448
|
}, [
|
|
1384
|
-
|
|
1385
|
-
page_starts_at: s
|
|
1449
|
+
se(nt, {
|
|
1450
|
+
page_starts_at: t(s).page_starts_at,
|
|
1386
1451
|
filtering: !0,
|
|
1387
|
-
pagination:
|
|
1388
|
-
onTradePage:
|
|
1452
|
+
pagination: M.value,
|
|
1453
|
+
onTradePage: Ue
|
|
1389
1454
|
}, null, 8, ["page_starts_at", "pagination"])
|
|
1390
|
-
], 2)) :
|
|
1455
|
+
], 2)) : C("", !0)
|
|
1391
1456
|
], !0)
|
|
1392
|
-
], 8, ["to", "disabled"])) :
|
|
1393
|
-
|
|
1457
|
+
], 8, ["to", "disabled"])) : C("", !0),
|
|
1458
|
+
t(u) ? (e(), r("div", {
|
|
1394
1459
|
key: 1,
|
|
1395
1460
|
class: "image-preview-container",
|
|
1396
|
-
style:
|
|
1461
|
+
style: at(t(p))
|
|
1397
1462
|
}, [
|
|
1398
|
-
|
|
1399
|
-
src:
|
|
1463
|
+
m("img", {
|
|
1464
|
+
src: t(w),
|
|
1400
1465
|
alt: "Preview",
|
|
1401
1466
|
class: "image-preview-large"
|
|
1402
|
-
}, null, 8,
|
|
1403
|
-
], 4)) :
|
|
1467
|
+
}, null, 8, ya)
|
|
1468
|
+
], 4)) : C("", !0)
|
|
1404
1469
|
]));
|
|
1405
1470
|
}
|
|
1406
|
-
}),
|
|
1471
|
+
}), Ma = /* @__PURE__ */ he(ka, [["__scopeId", "data-v-3198e7cc"]]);
|
|
1407
1472
|
export {
|
|
1408
|
-
|
|
1409
|
-
|
|
1473
|
+
Sa as VColumn,
|
|
1474
|
+
Ma as VDataTable
|
|
1410
1475
|
};
|