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