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