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