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