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