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