v-sistec-features 1.26.2 → 1.26.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/vDataTable.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as K, useSlots as Je, inject as we, onMounted as xe, computed as S, watch as X, resolveComponent as Ye, createElementBlock as r, openBlock as
|
|
2
|
-
import { D as
|
|
3
|
-
import { _ as ce, P as
|
|
1
|
+
import { defineComponent as K, useSlots as Je, inject as we, onMounted as xe, computed as S, watch as X, resolveComponent as Ye, createElementBlock as r, openBlock as s, Fragment as z, createCommentVNode as b, createElementVNode as d, withDirectives as Se, withKeys as Ge, vModelText as Ce, renderList as N, createBlock as H, withCtx as L, createTextVNode as j, toDisplayString as C, normalizeClass as k, withModifiers as he, renderSlot as E, createStaticVNode as Z, ref as B, nextTick as de, resolveDynamicComponent as ee, normalizeProps as ye, mergeProps as ue, h as Xe, Comment as We, Text as Qe, provide as Re, readonly as Ze, Teleport as ke, createVNode as G, unref as f, TransitionGroup as et, Transition as tt, normalizeStyle as at } from "vue";
|
|
2
|
+
import { D as st } from "./datatableConfig-BMFlKtgh.js";
|
|
3
|
+
import { _ as ce, P as nt } from "./Pagination-DtVDFQ07.js";
|
|
4
4
|
import lt from "vuedraggable";
|
|
5
5
|
const $e = Symbol("v-datatable-key"), Ba = /* @__PURE__ */ K({
|
|
6
6
|
__name: "VColumn",
|
|
@@ -25,52 +25,52 @@ const $e = Symbol("v-datatable-key"), Ba = /* @__PURE__ */ K({
|
|
|
25
25
|
start_hidden: { type: Boolean, default: !1 }
|
|
26
26
|
},
|
|
27
27
|
setup(u) {
|
|
28
|
-
const
|
|
28
|
+
const v = crypto.randomUUID(), n = u, e = Je(), m = we($e);
|
|
29
29
|
if (!m)
|
|
30
30
|
throw new Error("VColumn deve ser usado dentro de um VDataTable.");
|
|
31
31
|
const c = ["text", "img", "date", "html"];
|
|
32
32
|
return xe(() => {
|
|
33
|
-
if (
|
|
33
|
+
if (n.field !== null && !n.field)
|
|
34
34
|
throw new Error('A propriedade "field" é obrigatória em VColumn.');
|
|
35
|
-
if (!
|
|
35
|
+
if (!n.header)
|
|
36
36
|
throw new Error('A propriedade "header" é obrigatória em VColumn.');
|
|
37
|
-
if (
|
|
38
|
-
throw new Error(`O tipo "${
|
|
39
|
-
if (
|
|
40
|
-
if (
|
|
37
|
+
if (n.field !== null && !c.includes(n.type))
|
|
38
|
+
throw new Error(`O tipo "${n.type}" não é suportado em VColumn. Tipos suportados: text, img, date, html.`);
|
|
39
|
+
if (n.limite_text) {
|
|
40
|
+
if (n.type !== "text")
|
|
41
41
|
throw new Error('A propriedade "limite_text" só pode ser usada quando o tipo for "text".');
|
|
42
|
-
if (typeof
|
|
42
|
+
if (typeof n.limite_text == "string" && isNaN(Number(n.limite_text)))
|
|
43
43
|
throw new Error('A propriedade "limite_text" deve ser um número quando for uma string.');
|
|
44
|
-
if (isNaN(Number(
|
|
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
47
|
m.addColumn({
|
|
48
|
-
id:
|
|
49
|
-
field:
|
|
50
|
-
header:
|
|
51
|
-
type:
|
|
52
|
-
class_column:
|
|
53
|
-
class_row:
|
|
54
|
-
class_item:
|
|
55
|
-
click:
|
|
56
|
-
transform_function:
|
|
57
|
-
locked:
|
|
58
|
-
use_ordering:
|
|
59
|
-
param_ordering:
|
|
60
|
-
decreasing_value:
|
|
61
|
-
increasing_value:
|
|
62
|
-
class_rules:
|
|
48
|
+
id: v,
|
|
49
|
+
field: n.field,
|
|
50
|
+
header: n.header,
|
|
51
|
+
type: n.type,
|
|
52
|
+
class_column: n.class_column,
|
|
53
|
+
class_row: n.class_row,
|
|
54
|
+
class_item: n.class_item,
|
|
55
|
+
click: n.click,
|
|
56
|
+
transform_function: n.transform_function,
|
|
57
|
+
locked: n.locked,
|
|
58
|
+
use_ordering: n.use_ordering,
|
|
59
|
+
param_ordering: n.param_ordering,
|
|
60
|
+
decreasing_value: n.decreasing_value,
|
|
61
|
+
increasing_value: n.increasing_value,
|
|
62
|
+
class_rules: n.class_rules,
|
|
63
63
|
bodySlot: e.body,
|
|
64
64
|
// colHeaderSlot é para o slot do header da coluna, que pode ser usado para colocar ícone de ordenação ou qualquer outra coisa que o usuário queira colocar no header da coluna
|
|
65
65
|
colHeaderSlot: e.col_header,
|
|
66
66
|
// colHeaderMidleSlot é para o slot do header da coluna, mas ele fica entre o texto do header e o ícone de ordenação, para o usuário colocar coisas entre eles
|
|
67
67
|
colHeaderMidleSlot: e.col_header_midle,
|
|
68
|
-
...
|
|
69
|
-
...
|
|
70
|
-
...
|
|
71
|
-
start_hidden:
|
|
68
|
+
...n.type === "text" && { limite_text: Number(n.limite_text) },
|
|
69
|
+
...n.type === "img" && { deactivate_img_preview: n.deactivate_img_preview },
|
|
70
|
+
...n.type === "date" && { format: n.format },
|
|
71
|
+
start_hidden: n.start_hidden,
|
|
72
72
|
// se a coluna é opcional por padrão ela não é visível, mas o usuário pode escolher mostrar ela
|
|
73
|
-
visible: !
|
|
73
|
+
visible: !n.start_hidden
|
|
74
74
|
// Se start_hidden for true, ela não estará visível inicialmente
|
|
75
75
|
});
|
|
76
76
|
}), ($, I) => null;
|
|
@@ -99,22 +99,22 @@ const $e = Symbol("v-datatable-key"), Ba = /* @__PURE__ */ K({
|
|
|
99
99
|
deactivate_search_empty: { type: Boolean, default: !1 }
|
|
100
100
|
},
|
|
101
101
|
emits: ["update:search", "update:filter", "search", "clickedClearSearch"],
|
|
102
|
-
setup(u, { emit:
|
|
103
|
-
const
|
|
104
|
-
get: () =>
|
|
102
|
+
setup(u, { emit: v }) {
|
|
103
|
+
const n = u, e = v, m = S({
|
|
104
|
+
get: () => n.search,
|
|
105
105
|
set: (i) => e("update:search", i)
|
|
106
106
|
}), c = S({
|
|
107
|
-
get: () =>
|
|
107
|
+
get: () => n.filter,
|
|
108
108
|
set: (i) => e("update:filter", i)
|
|
109
109
|
});
|
|
110
110
|
X(c, () => {
|
|
111
111
|
e("search");
|
|
112
112
|
}), X(
|
|
113
|
-
() =>
|
|
113
|
+
() => n.list_filter,
|
|
114
114
|
(i) => {
|
|
115
115
|
Array.isArray(i) ? (i.forEach((a, x) => {
|
|
116
116
|
a?.type === 1 && !a.to && console.error(`Filtro na posição ${x} é do tipo 'router-link' mas não possui a propriedade 'to'.`);
|
|
117
|
-
}),
|
|
117
|
+
}), n.item_use.includes(2) && i.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.");
|
|
118
118
|
},
|
|
119
119
|
{ immediate: !0, deep: !0 }
|
|
120
120
|
);
|
|
@@ -122,18 +122,18 @@ const $e = Symbol("v-datatable-key"), Ba = /* @__PURE__ */ K({
|
|
|
122
122
|
c.value === i ? c.value = "" : c.value = i;
|
|
123
123
|
}
|
|
124
124
|
function I() {
|
|
125
|
-
m.value = "",
|
|
125
|
+
m.value = "", n.deactivate_search_on_clear || e("search"), e("clickedClearSearch");
|
|
126
126
|
}
|
|
127
127
|
function w(i) {
|
|
128
128
|
i.click && typeof i.click == "function" ? i.click() : console.error("O filtro selecionado não possui uma função de clique válida.");
|
|
129
129
|
}
|
|
130
130
|
function _() {
|
|
131
|
-
|
|
131
|
+
n.deactivate_search_empty && m.value.trim() === "" || e("search");
|
|
132
132
|
}
|
|
133
133
|
return (i, a) => {
|
|
134
134
|
const x = Ye("router-link");
|
|
135
|
-
return
|
|
136
|
-
u.item_use.includes(2) ? (
|
|
135
|
+
return s(), r(z, null, [
|
|
136
|
+
u.item_use.includes(2) ? (s(), r("a", ot, [...a[2] || (a[2] = [
|
|
137
137
|
d("svg", {
|
|
138
138
|
xmlns: "http://www.w3.org/2000/svg",
|
|
139
139
|
class: "icon icon-tabler icon-tabler-filter",
|
|
@@ -165,7 +165,7 @@ const $e = Symbol("v-datatable-key"), Ba = /* @__PURE__ */ K({
|
|
|
165
165
|
}, null, 40, it), [
|
|
166
166
|
[Ce, m.value]
|
|
167
167
|
]),
|
|
168
|
-
m.value ? (
|
|
168
|
+
m.value ? (s(), r("span", {
|
|
169
169
|
key: 0,
|
|
170
170
|
onClick: a[1] || (a[1] = (g) => I()),
|
|
171
171
|
class: "inputClose",
|
|
@@ -191,7 +191,7 @@ const $e = Symbol("v-datatable-key"), Ba = /* @__PURE__ */ K({
|
|
|
191
191
|
d("path", { d: "M18 6l-12 12" }),
|
|
192
192
|
d("path", { d: "M6 6l12 12" })
|
|
193
193
|
], -1)
|
|
194
|
-
])])) : (
|
|
194
|
+
])])) : (s(), r("span", dt, [...a[4] || (a[4] = [
|
|
195
195
|
d("svg", {
|
|
196
196
|
xmlns: "http://www.w3.org/2000/svg",
|
|
197
197
|
width: "24",
|
|
@@ -214,9 +214,9 @@ const $e = Symbol("v-datatable-key"), Ba = /* @__PURE__ */ K({
|
|
|
214
214
|
], -1)
|
|
215
215
|
])]))
|
|
216
216
|
]),
|
|
217
|
-
u.item_use.includes(2) ? (
|
|
218
|
-
(
|
|
219
|
-
"type" in g && g.type === 1 && (!("visible" in g) || g.visible) ? (
|
|
217
|
+
u.item_use.includes(2) ? (s(), r("div", ut, [
|
|
218
|
+
(s(!0), r(z, null, N(n.list_filter, (g, y) => (s(), r(z, { key: y }, [
|
|
219
|
+
"type" in g && g.type === 1 && (!("visible" in g) || g.visible) ? (s(), H(x, {
|
|
220
220
|
key: 0,
|
|
221
221
|
to: g?.to,
|
|
222
222
|
class: "dropdown-item cursor-pointer"
|
|
@@ -225,13 +225,13 @@ const $e = Symbol("v-datatable-key"), Ba = /* @__PURE__ */ K({
|
|
|
225
225
|
j(C(g.text), 1)
|
|
226
226
|
]),
|
|
227
227
|
_: 2
|
|
228
|
-
}, 1032, ["to"])) : (!("type" in g) || g.type === 2) && (!("visible" in g) || g.visible) ? (
|
|
228
|
+
}, 1032, ["to"])) : (!("type" in g) || g.type === 2) && (!("visible" in g) || g.visible) ? (s(), r("a", {
|
|
229
229
|
key: 1,
|
|
230
|
-
onClick: he((
|
|
230
|
+
onClick: he((T) => $(String(g.value)), ["prevent"]),
|
|
231
231
|
class: k(["dropdown-item cursor-pointer", c.value === g?.value ? "bg-info text-dark selected" : ""])
|
|
232
|
-
}, C(g.text), 11, ct)) : (!("type" in g) || g.type === 3) && (!("visible" in g) || g.visible) ? (
|
|
232
|
+
}, C(g.text), 11, ct)) : (!("type" in g) || g.type === 3) && (!("visible" in g) || g.visible) ? (s(), r("a", {
|
|
233
233
|
key: 2,
|
|
234
|
-
onClick: he((
|
|
234
|
+
onClick: he((T) => w(g), ["prevent"]),
|
|
235
235
|
class: k(["dropdown-item cursor-pointer", g?.active ? "bg-info text-dark selected" : ""])
|
|
236
236
|
}, C(g.text), 11, pt)) : b("", !0)
|
|
237
237
|
], 64))), 128))
|
|
@@ -254,44 +254,47 @@ const $e = Symbol("v-datatable-key"), Ba = /* @__PURE__ */ K({
|
|
|
254
254
|
} }
|
|
255
255
|
},
|
|
256
256
|
setup(u) {
|
|
257
|
-
return (
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
(
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
257
|
+
return (v, n) => (s(), r(z, null, [
|
|
258
|
+
u.use_column_manager ? (s(), r("div", gt, [
|
|
259
|
+
n[1] || (n[1] = Z('<button class="btn dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false" title="Gerenciar Colunas visíveis"><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><path d="M4 6l5.5 0"></path><path d="M4 10l5.5 0"></path><path d="M4 14l5.5 0"></path><path d="M4 18l5.5 0"></path><path d="M14.5 6l5.5 0"></path><path d="M14.5 10l5.5 0"></path><path d="M14.5 14l5.5 0"></path><path d="M14.5 18l5.5 0"></path></svg></button>', 1)),
|
|
260
|
+
d("div", vt, [
|
|
261
|
+
n[0] || (n[0] = d("h6", { class: "dropdown-header text-uppercase fw-bold mb-2" }, "Exibir Colunas", -1)),
|
|
262
|
+
d("div", ft, [
|
|
263
|
+
(s(!0), r(z, null, N(u.columns_list, (e) => (s(), r("label", {
|
|
264
|
+
key: e.id,
|
|
265
|
+
class: "form-check cursor-pointer m-0"
|
|
266
|
+
}, [
|
|
267
|
+
d("input", {
|
|
268
|
+
class: "form-check-input",
|
|
269
|
+
type: "checkbox",
|
|
270
|
+
checked: e.visible,
|
|
271
|
+
disabled: e.locked,
|
|
272
|
+
onChange: (m) => u.toggleColumnVisibility(e.id)
|
|
273
|
+
}, null, 40, ht),
|
|
274
|
+
d("span", yt, C(e.header), 1)
|
|
275
|
+
]))), 128))
|
|
276
|
+
])
|
|
275
277
|
])
|
|
276
|
-
])
|
|
277
|
-
|
|
278
|
+
])) : b("", !0),
|
|
279
|
+
E(v.$slots, "extra-actions")
|
|
280
|
+
], 64));
|
|
278
281
|
}
|
|
279
282
|
});
|
|
280
283
|
function bt() {
|
|
281
|
-
const u =
|
|
284
|
+
const u = B(!1), v = B(""), n = B(0), e = B(0), m = S(() => ({
|
|
282
285
|
position: "fixed",
|
|
283
286
|
zIndex: 9999,
|
|
284
287
|
pointerEvents: "none",
|
|
285
288
|
top: `${e.value + 15}px`,
|
|
286
|
-
left: `${
|
|
289
|
+
left: `${n.value + 15}px`
|
|
287
290
|
}));
|
|
288
291
|
function c(_) {
|
|
289
292
|
const i = _.clientX, a = _.clientY, x = window.innerHeight, g = 15, y = 300;
|
|
290
|
-
let
|
|
291
|
-
|
|
293
|
+
let T = a + g;
|
|
294
|
+
T + y > x && (T = a - y - g, T < 0 && (T = 0)), n.value = i, e.value = T;
|
|
292
295
|
}
|
|
293
296
|
function $(_, i) {
|
|
294
|
-
u.value = !0,
|
|
297
|
+
u.value = !0, v.value = i, c(_);
|
|
295
298
|
}
|
|
296
299
|
function I(_) {
|
|
297
300
|
u.value && c(_);
|
|
@@ -301,29 +304,29 @@ function bt() {
|
|
|
301
304
|
}
|
|
302
305
|
return {
|
|
303
306
|
isHovering: u,
|
|
304
|
-
previewSrc:
|
|
307
|
+
previewSrc: v,
|
|
305
308
|
previewStyle: m,
|
|
306
309
|
handleMouseOver: $,
|
|
307
310
|
handleMouseMove: I,
|
|
308
311
|
handleMouseLeave: w
|
|
309
312
|
};
|
|
310
313
|
}
|
|
311
|
-
function wt(u,
|
|
312
|
-
const m =
|
|
314
|
+
function wt(u, v, n, e) {
|
|
315
|
+
const m = B([]);
|
|
313
316
|
function c() {
|
|
314
317
|
m.value = [];
|
|
315
318
|
}
|
|
316
319
|
function $(_) {
|
|
317
|
-
const i = _[
|
|
320
|
+
const i = _[v];
|
|
318
321
|
return m.value.some((a) => a === i);
|
|
319
322
|
}
|
|
320
323
|
function I(_) {
|
|
321
|
-
const i = _[
|
|
324
|
+
const i = _[v], a = m.value.findIndex((g) => g === i), x = a > -1;
|
|
322
325
|
u ? (c(), x || (m.value.push(i), e && w(i))) : x ? m.value.splice(a, 1) : (m.value.push(i), e && w(i));
|
|
323
326
|
}
|
|
324
327
|
function w(_) {
|
|
325
328
|
de(() => {
|
|
326
|
-
if (
|
|
329
|
+
if (n) {
|
|
327
330
|
const i = document.querySelector("#expand-item-" + _);
|
|
328
331
|
i && i.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
329
332
|
return;
|
|
@@ -341,29 +344,29 @@ function wt(u, f, s, e) {
|
|
|
341
344
|
close_all_expanded_items: c
|
|
342
345
|
};
|
|
343
346
|
}
|
|
344
|
-
function xt(u,
|
|
345
|
-
const $ =
|
|
346
|
-
[u.page_param_name]:
|
|
347
|
-
[u.page_size_param_name]:
|
|
348
|
-
[u.search_param_name]:
|
|
349
|
-
[u.filter_param_name]:
|
|
347
|
+
function xt(u, v, n, e, m, c) {
|
|
348
|
+
const $ = B([]), I = S(() => u.endpoint), w = S(() => ({
|
|
349
|
+
[u.page_param_name]: v.value.current_page + 1,
|
|
350
|
+
[u.page_size_param_name]: v.value.limit_per_page,
|
|
351
|
+
[u.search_param_name]: v.value.search || "",
|
|
352
|
+
[u.filter_param_name]: v.value.filter || ""
|
|
350
353
|
})), _ = S(() => {
|
|
351
354
|
const O = {};
|
|
352
|
-
for (const
|
|
353
|
-
|
|
355
|
+
for (const V of n.value)
|
|
356
|
+
V.use_ordering && (e.value[V.id] === "increasing" ? O[V.param_ordering] = V.increasing_value || "increasing" : e.value[V.id] === "decreasing" && (O[V.param_ordering] = V.decreasing_value || "decreasing"));
|
|
354
357
|
return O;
|
|
355
358
|
}), { data: i, pending: a, error: x, execute: g, attempt: y } = u.fetch(I, {
|
|
356
359
|
disable_request: () => u.disable_request,
|
|
357
360
|
params: () => {
|
|
358
361
|
const O = typeof u.add_params == "function";
|
|
359
|
-
let
|
|
362
|
+
let V = {};
|
|
360
363
|
if (O) {
|
|
361
|
-
const
|
|
362
|
-
|
|
364
|
+
const se = u.add_params;
|
|
365
|
+
V = se();
|
|
363
366
|
} else
|
|
364
|
-
|
|
367
|
+
V = u.add_params || {};
|
|
365
368
|
return u.deactivate_default_params ? {
|
|
366
|
-
...
|
|
369
|
+
...V,
|
|
367
370
|
..._.value
|
|
368
371
|
} : {
|
|
369
372
|
...w.value,
|
|
@@ -375,14 +378,14 @@ function xt(u, f, s, e, m, c) {
|
|
|
375
378
|
retryDelay: u.retry_delay,
|
|
376
379
|
paramsReactives: !1,
|
|
377
380
|
immediate: !1
|
|
378
|
-
}, u.fetch_name),
|
|
381
|
+
}, u.fetch_name), T = B(!1), F = B(null), h = B(!1), W = S(() => a.value || T.value);
|
|
379
382
|
async function Q() {
|
|
380
|
-
h.value || (h.value = !0), F.value && clearTimeout(F.value),
|
|
381
|
-
|
|
383
|
+
h.value || (h.value = !0), F.value && clearTimeout(F.value), T.value = !0, F.value = setTimeout(() => {
|
|
384
|
+
T.value = !1;
|
|
382
385
|
}, u.min_loading_delay), c(), m("beforeFetch"), await g(), m("afterFetch");
|
|
383
386
|
}
|
|
384
387
|
function R() {
|
|
385
|
-
|
|
388
|
+
v.value.current_page = u.page_starts_at, Q();
|
|
386
389
|
}
|
|
387
390
|
return {
|
|
388
391
|
items: $,
|
|
@@ -398,23 +401,23 @@ function xt(u, f, s, e, m, c) {
|
|
|
398
401
|
first_fetch: h
|
|
399
402
|
};
|
|
400
403
|
}
|
|
401
|
-
function St(u,
|
|
402
|
-
const
|
|
404
|
+
function St(u, v) {
|
|
405
|
+
const n = B(null), e = B([]), m = (_) => {
|
|
403
406
|
const i = u.item_key;
|
|
404
407
|
return e.value.some((a) => a[i] === _[i]);
|
|
405
408
|
}, c = S(() => {
|
|
406
|
-
if (!
|
|
407
|
-
const _ =
|
|
408
|
-
return _ === 0 ? !1 : _ ===
|
|
409
|
+
if (!v.value.length) return !1;
|
|
410
|
+
const _ = v.value.filter((i) => m(i)).length;
|
|
411
|
+
return _ === 0 ? !1 : _ === v.value.length ? !0 : "indeterminate";
|
|
409
412
|
}), $ = S(() => e.value.length > 0);
|
|
410
|
-
X([c,
|
|
411
|
-
|
|
413
|
+
X([c, n], ([_]) => {
|
|
414
|
+
n.value && (_ === "indeterminate" ? (n.value.checked = !1, n.value.indeterminate = !0) : (n.value.checked = _, n.value.indeterminate = !1));
|
|
412
415
|
}, {
|
|
413
416
|
immediate: !0,
|
|
414
417
|
flush: "post"
|
|
415
418
|
});
|
|
416
419
|
function I() {
|
|
417
|
-
const _ =
|
|
420
|
+
const _ = v.value;
|
|
418
421
|
if (!_.length) return;
|
|
419
422
|
const i = c.value;
|
|
420
423
|
if (i === !0 || i === "indeterminate") {
|
|
@@ -432,7 +435,7 @@ function St(u, f) {
|
|
|
432
435
|
a > -1 ? e.value.splice(a, 1) : e.value.push(_);
|
|
433
436
|
}
|
|
434
437
|
return {
|
|
435
|
-
selectAllCheckbox:
|
|
438
|
+
selectAllCheckbox: n,
|
|
436
439
|
selected_items: e,
|
|
437
440
|
isSelected: m,
|
|
438
441
|
selectAllState: c,
|
|
@@ -469,68 +472,68 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
469
472
|
pagination: {}
|
|
470
473
|
},
|
|
471
474
|
setup(u) {
|
|
472
|
-
const
|
|
473
|
-
return (
|
|
474
|
-
|
|
475
|
+
const v = u;
|
|
476
|
+
return (n, e) => (s(), r("div", Ct, [
|
|
477
|
+
v.custom_loading ? (s(), H(ee(v.custom_loading), { key: 0 })) : (s(), r("table", {
|
|
475
478
|
key: 1,
|
|
476
|
-
class: k(["table table-vcenter table-selectable",
|
|
479
|
+
class: k(["table table-vcenter table-selectable", v.class_table])
|
|
477
480
|
}, [
|
|
478
481
|
d("thead", null, [
|
|
479
482
|
d("tr", null, [
|
|
480
|
-
(
|
|
483
|
+
(s(!0), r(z, null, N(u.columns, (m) => (s(), r("th", {
|
|
481
484
|
key: m.field || m.header,
|
|
482
485
|
class: k(m.class_column)
|
|
483
486
|
}, C(m.header), 3))), 128))
|
|
484
487
|
])
|
|
485
488
|
]),
|
|
486
489
|
d("tbody", null, [
|
|
487
|
-
|
|
490
|
+
v.type_loading === "placeholder" ? (s(!0), r(z, { key: 0 }, N(u.pagination.limit_per_page, (m) => (s(), r("tr", {
|
|
488
491
|
key: "placeholder-" + m,
|
|
489
492
|
class: "placeholder-glow"
|
|
490
493
|
}, [
|
|
491
|
-
(
|
|
494
|
+
(s(!0), r(z, null, N(u.columns, (c) => (s(), r("td", {
|
|
492
495
|
key: c.field || c.header,
|
|
493
496
|
class: k(c.class_row)
|
|
494
497
|
}, [
|
|
495
|
-
c.bodySlot ? (
|
|
498
|
+
c.bodySlot ? (s(), r("span", $t, [...e[0] || (e[0] = [
|
|
496
499
|
d("span", { class: "placeholder col-8" }, null, -1)
|
|
497
|
-
])])) : c.type === "text" ? (
|
|
500
|
+
])])) : c.type === "text" ? (s(), r("span", {
|
|
498
501
|
key: 1,
|
|
499
502
|
class: k(c.class_item)
|
|
500
503
|
}, [...e[1] || (e[1] = [
|
|
501
504
|
d("span", { class: "placeholder col-8" }, null, -1)
|
|
502
|
-
])], 2)) : c.type === "date" ? (
|
|
505
|
+
])], 2)) : c.type === "date" ? (s(), r("span", Mt, [...e[2] || (e[2] = [
|
|
503
506
|
d("span", { class: "placeholder col-9" }, null, -1)
|
|
504
|
-
])])) : c.type === "html" ? (
|
|
507
|
+
])])) : c.type === "html" ? (s(), r("div", {
|
|
505
508
|
key: 3,
|
|
506
509
|
class: k(c.class_item)
|
|
507
510
|
}, [...e[3] || (e[3] = [
|
|
508
511
|
d("div", { class: "placeholder col-12" }, null, -1)
|
|
509
|
-
])], 2)) : c.type === "img" ? (
|
|
512
|
+
])], 2)) : c.type === "img" ? (s(), r("div", {
|
|
510
513
|
key: 4,
|
|
511
514
|
class: k(c.class_item)
|
|
512
515
|
}, [...e[4] || (e[4] = [
|
|
513
516
|
d("div", { class: "placeholder placeholder-img" }, null, -1)
|
|
514
|
-
])], 2)) : (
|
|
517
|
+
])], 2)) : (s(), r("span", zt, [
|
|
515
518
|
e[5] || (e[5] = j("tipo ", -1)),
|
|
516
519
|
d("span", Bt, C(c.type), 1),
|
|
517
520
|
e[6] || (e[6] = j(" não suportado ", -1))
|
|
518
521
|
]))
|
|
519
522
|
], 2))), 128))
|
|
520
|
-
]))), 128)) :
|
|
523
|
+
]))), 128)) : v.type_loading === "spiner-table" ? (s(!0), r(z, { key: 1 }, N(u.pagination.limit_per_page, (m) => (s(), r("tr", {
|
|
521
524
|
key: "placeholder-" + m
|
|
522
525
|
}, [
|
|
523
|
-
(
|
|
526
|
+
(s(!0), r(z, null, N(u.columns, (c) => (s(), r("td", {
|
|
524
527
|
key: c.field || c.header,
|
|
525
528
|
class: k(c.class_row)
|
|
526
529
|
}, [
|
|
527
|
-
c.bodySlot ? (
|
|
530
|
+
c.bodySlot ? (s(), r("span", Tt, [...e[7] || (e[7] = [
|
|
528
531
|
d("span", {
|
|
529
532
|
class: "spinner-border spinner-border-sm",
|
|
530
533
|
role: "status",
|
|
531
534
|
"aria-hidden": "true"
|
|
532
535
|
}, null, -1)
|
|
533
|
-
])])) : c.type === "text" ? (
|
|
536
|
+
])])) : c.type === "text" ? (s(), r("span", {
|
|
534
537
|
key: 1,
|
|
535
538
|
class: k(c.class_item)
|
|
536
539
|
}, [...e[8] || (e[8] = [
|
|
@@ -539,13 +542,13 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
539
542
|
role: "status",
|
|
540
543
|
"aria-hidden": "true"
|
|
541
544
|
}, null, -1)
|
|
542
|
-
])], 2)) : c.type === "date" ? (
|
|
545
|
+
])], 2)) : c.type === "date" ? (s(), r("span", Vt, [...e[9] || (e[9] = [
|
|
543
546
|
d("span", {
|
|
544
547
|
class: "spinner-border spinner-border-sm",
|
|
545
548
|
role: "status",
|
|
546
549
|
"aria-hidden": "true"
|
|
547
550
|
}, null, -1)
|
|
548
|
-
])])) : c.type === "html" ? (
|
|
551
|
+
])])) : c.type === "html" ? (s(), r("div", {
|
|
549
552
|
key: 3,
|
|
550
553
|
class: k(c.class_item)
|
|
551
554
|
}, [...e[10] || (e[10] = [
|
|
@@ -554,7 +557,7 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
554
557
|
role: "status",
|
|
555
558
|
"aria-hidden": "true"
|
|
556
559
|
}, null, -1)
|
|
557
|
-
])], 2)) : c.type === "img" ? (
|
|
560
|
+
])], 2)) : c.type === "img" ? (s(), r("div", {
|
|
558
561
|
key: 4,
|
|
559
562
|
class: k(["", c.class_item])
|
|
560
563
|
}, [...e[11] || (e[11] = [
|
|
@@ -565,31 +568,31 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
565
568
|
"aria-hidden": "true"
|
|
566
569
|
})
|
|
567
570
|
], -1)
|
|
568
|
-
])], 2)) : (
|
|
571
|
+
])], 2)) : (s(), r("span", It, [
|
|
569
572
|
e[12] || (e[12] = j("tipo ", -1)),
|
|
570
573
|
d("span", Ot, C(c.type), 1),
|
|
571
574
|
e[13] || (e[13] = j(" não suportado ", -1))
|
|
572
575
|
]))
|
|
573
576
|
], 2))), 128))
|
|
574
|
-
]))), 128)) :
|
|
577
|
+
]))), 128)) : v.type_loading === "spiner" ? (s(!0), r(z, { key: 2 }, N(u.pagination.limit_per_page, (m) => (s(), r("tr", { key: m }, [
|
|
575
578
|
d("td", {
|
|
576
579
|
colspan: u.columns.length,
|
|
577
580
|
class: "text-center p-0",
|
|
578
581
|
style: { "border-bottom": "none" }
|
|
579
582
|
}, [
|
|
580
|
-
m === Math.floor(u.pagination.limit_per_page / 2) + 1 ? (
|
|
583
|
+
m === Math.floor(u.pagination.limit_per_page / 2) + 1 ? (s(), r("div", Et, [...e[14] || (e[14] = [
|
|
581
584
|
d("div", {
|
|
582
585
|
class: "spinner-border",
|
|
583
586
|
style: { width: "3rem", height: "3rem" },
|
|
584
587
|
role: "status"
|
|
585
588
|
}, null, -1),
|
|
586
589
|
d("span", { class: "mt-2" }, "Carregando...", -1)
|
|
587
|
-
])])) : (
|
|
590
|
+
])])) : (s(), r("div", Nt))
|
|
588
591
|
], 8, Dt)
|
|
589
592
|
]))), 128)) : b("", !0)
|
|
590
593
|
])
|
|
591
594
|
], 2)),
|
|
592
|
-
u.attempt && u.attempt.current > 1 ? (
|
|
595
|
+
u.attempt && u.attempt.current > 1 ? (s(), r("div", Ht, " A conexão falhou. Tentando novamente... (Tentativa " + C(u.attempt.current) + " de " + C(u.attempt.total) + ") ", 1)) : b("", !0)
|
|
593
596
|
]));
|
|
594
597
|
}
|
|
595
598
|
}), jt = /* @__PURE__ */ ce(At, [["__scopeId", "data-v-3b019685"]]), Pt = {
|
|
@@ -632,18 +635,18 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
632
635
|
use_ordering: { type: Boolean }
|
|
633
636
|
},
|
|
634
637
|
emits: ["toggle"],
|
|
635
|
-
setup(u, { emit:
|
|
636
|
-
const
|
|
637
|
-
return (m, c) => u.use_ordering ? (
|
|
638
|
+
setup(u, { emit: v }) {
|
|
639
|
+
const n = u, e = v;
|
|
640
|
+
return (m, c) => u.use_ordering ? (s(), r("span", {
|
|
638
641
|
key: 0,
|
|
639
642
|
onClick: c[0] || (c[0] = ($) => e("toggle")),
|
|
640
643
|
class: "cursor-pointer"
|
|
641
644
|
}, [
|
|
642
|
-
!
|
|
645
|
+
!n.orderings_state || n.orderings_state === "none" ? (s(), r("svg", Pt, [...c[1] || (c[1] = [
|
|
643
646
|
Z('<path d="m3 8 4-4 4 4"></path><path d="m11 16-4 4-4-4"></path><path d="M7 4v16"></path><path d="M15 8h6"></path><path d="M15 16h6"></path><path d="M13 12h8"></path>', 6)
|
|
644
|
-
])])) :
|
|
647
|
+
])])) : n.orderings_state === "decreasing" ? (s(), r("svg", qt, [...c[2] || (c[2] = [
|
|
645
648
|
Z('<path d="m3 16 4 4 4-4"></path><path d="M7 20V4"></path><path d="M11 4h10"></path><path d="M11 8h7"></path><path d="M11 12h4"></path>', 5)
|
|
646
|
-
])])) :
|
|
649
|
+
])])) : n.orderings_state === "increasing" ? (s(), r("svg", Lt, [...c[3] || (c[3] = [
|
|
647
650
|
Z('<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>', 5)
|
|
648
651
|
])])) : b("", !0)
|
|
649
652
|
])) : b("", !0);
|
|
@@ -662,30 +665,30 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
662
665
|
col: {}
|
|
663
666
|
},
|
|
664
667
|
emits: ["toggleOrderingState"],
|
|
665
|
-
setup(u, { emit:
|
|
666
|
-
const
|
|
667
|
-
orderings_state:
|
|
668
|
-
use_ordering:
|
|
668
|
+
setup(u, { emit: v }) {
|
|
669
|
+
const n = u, e = () => Xe(Ft, {
|
|
670
|
+
orderings_state: n.orderings_state,
|
|
671
|
+
use_ordering: n.use_ordering,
|
|
669
672
|
onToggle: () => c("toggleOrderingState")
|
|
670
673
|
}), m = S(() => ({
|
|
671
|
-
"header-draggable": !
|
|
672
|
-
"header-locked":
|
|
673
|
-
[
|
|
674
|
-
})), c =
|
|
675
|
-
if (!
|
|
676
|
-
const w =
|
|
674
|
+
"header-draggable": !n.locked,
|
|
675
|
+
"header-locked": n.locked,
|
|
676
|
+
[n.class_column]: !0
|
|
677
|
+
})), c = v, $ = (w) => !w || w.length === 0 ? !0 : w.every((_) => _.type === We || _.type === Qe && typeof _.children == "string" && !_.children.trim() ? !0 : _.type === z || _.type === Symbol.for("v-fgt") || String(_.type) === "Symbol(Fragment)" ? $(_.children) : !1), I = S(() => {
|
|
678
|
+
if (!n.col || !n.col.colHeaderSlot) return !1;
|
|
679
|
+
const w = n.col.colHeaderSlot({ col: n.col, locked: n.locked });
|
|
677
680
|
return !$(w);
|
|
678
681
|
});
|
|
679
|
-
return (w, _) => (
|
|
682
|
+
return (w, _) => (s(), r("th", {
|
|
680
683
|
class: k(m.value)
|
|
681
684
|
}, [
|
|
682
685
|
d("div", {
|
|
683
686
|
class: k({ "header-ordering": u.use_ordering })
|
|
684
687
|
}, [
|
|
685
|
-
I.value ? (
|
|
686
|
-
d("span", null, C(
|
|
687
|
-
u.col.colHeaderMidleSlot ? (
|
|
688
|
-
(
|
|
688
|
+
I.value ? (s(), H(ee(u.col.colHeaderSlot), ye(ue({ key: 0 }, { col: n.col, locked: n.locked, OrderingComponent: e })), null, 16)) : (s(), r("div", Kt, [
|
|
689
|
+
d("span", null, C(n.header), 1),
|
|
690
|
+
u.col.colHeaderMidleSlot ? (s(), H(ee(u.col.colHeaderMidleSlot), ye(ue({ key: 0 }, { col: n.col, locked: n.locked })), null, 16)) : b("", !0),
|
|
691
|
+
(s(), H(ee(e)))
|
|
689
692
|
]))
|
|
690
693
|
], 2)
|
|
691
694
|
], 2));
|
|
@@ -709,10 +712,10 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
709
712
|
}, ea = { key: 0 }, ta = { key: 0 }, aa = {
|
|
710
713
|
key: 1,
|
|
711
714
|
class: "w-1"
|
|
712
|
-
},
|
|
715
|
+
}, sa = {
|
|
713
716
|
key: 0,
|
|
714
717
|
class: "w-1"
|
|
715
|
-
},
|
|
718
|
+
}, na = ["onClick"], la = {
|
|
716
719
|
key: 0,
|
|
717
720
|
xmlns: "http://www.w3.org/2000/svg",
|
|
718
721
|
width: "24",
|
|
@@ -797,8 +800,8 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
797
800
|
use_column_manager: { type: Boolean, default: !1 }
|
|
798
801
|
},
|
|
799
802
|
emits: ["tradePage", "beforeFetch", "afterFetch", "clickedClearSearch"],
|
|
800
|
-
setup(u, { expose:
|
|
801
|
-
const e = we(
|
|
803
|
+
setup(u, { expose: v, emit: n }) {
|
|
804
|
+
const e = we(st, {}), {
|
|
802
805
|
isHovering: m,
|
|
803
806
|
previewSrc: c,
|
|
804
807
|
previewStyle: $,
|
|
@@ -839,7 +842,7 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
839
842
|
show_header_when_empty: i.show_header_when_empty ?? e.show_header_when_empty ?? !1,
|
|
840
843
|
storage_id: i.storage_id ?? e.storage_id ?? "",
|
|
841
844
|
use_column_manager: i.use_column_manager ?? e.use_column_manager ?? !1
|
|
842
|
-
})), x =
|
|
845
|
+
})), x = n, g = B({}), y = B([]), T = B(0), F = B(!1), h = B({
|
|
843
846
|
current_page: a.value.page_starts_at,
|
|
844
847
|
// pagina atual
|
|
845
848
|
count: 0,
|
|
@@ -861,12 +864,12 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
861
864
|
a.value.scroll_to_expanded_item
|
|
862
865
|
), {
|
|
863
866
|
items: O,
|
|
864
|
-
error:
|
|
865
|
-
response:
|
|
866
|
-
attempt:
|
|
867
|
+
error: V,
|
|
868
|
+
response: se,
|
|
869
|
+
attempt: ne,
|
|
867
870
|
default_params: Me,
|
|
868
871
|
fetchDataWithDelay: U,
|
|
869
|
-
reSearch:
|
|
872
|
+
reSearch: A,
|
|
870
873
|
showLoadingState: ze,
|
|
871
874
|
first_fetch: Be
|
|
872
875
|
} = xt(a.value, h, y, g, x, Q), {
|
|
@@ -948,8 +951,8 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
948
951
|
let t = [1];
|
|
949
952
|
return a.value.list_filter.length > 0 && t.push(2), t;
|
|
950
953
|
}), te = S(() => O.value.length > 0);
|
|
951
|
-
X(
|
|
952
|
-
t ? (O.value = t[a.value.data_key] || [],
|
|
954
|
+
X(se, (t) => {
|
|
955
|
+
t ? (O.value = t[a.value.data_key] || [], T.value = t[a.value.total_key] || 0, h.value.count = T.value) : (O.value = [], T.value = 0);
|
|
953
956
|
}, { immediate: !0 });
|
|
954
957
|
function Ne() {
|
|
955
958
|
setTimeout(() => {
|
|
@@ -962,7 +965,7 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
962
965
|
Re($e, { addColumn: He });
|
|
963
966
|
const ve = (t) => {
|
|
964
967
|
const o = t.target, l = parseInt(o.value, 10);
|
|
965
|
-
l > 0 && (h.value.limit_per_page = l, h.value.limit_per_page = l,
|
|
968
|
+
l > 0 && (h.value.limit_per_page = l, h.value.limit_per_page = l, A());
|
|
966
969
|
};
|
|
967
970
|
function q(t, o, l = null) {
|
|
968
971
|
if (!t) return o;
|
|
@@ -979,16 +982,16 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
979
982
|
for (const l in g.value)
|
|
980
983
|
l !== t && (g.value[l] = "none");
|
|
981
984
|
const o = g.value[t] || "none";
|
|
982
|
-
o === "none" ? g.value[t] = "increasing" : o === "increasing" ? g.value[t] = "decreasing" : g.value[t] = "none",
|
|
985
|
+
o === "none" ? g.value[t] = "increasing" : o === "increasing" ? g.value[t] = "decreasing" : g.value[t] = "none", A();
|
|
983
986
|
}
|
|
984
987
|
function je(t) {
|
|
985
|
-
t > 0 ? (h.value.limit_per_page = t,
|
|
988
|
+
t > 0 ? (h.value.limit_per_page = t, A()) : console.warn("O limite deve ser um número maior que zero.");
|
|
986
989
|
}
|
|
987
990
|
function Pe(t) {
|
|
988
|
-
h.value.search = t,
|
|
991
|
+
h.value.search = t, A();
|
|
989
992
|
}
|
|
990
993
|
function qe(t) {
|
|
991
|
-
h.value.filter = t,
|
|
994
|
+
h.value.filter = t, A();
|
|
992
995
|
}
|
|
993
996
|
function Le(t) {
|
|
994
997
|
t >= 0 && t <= Math.ceil(h.value.count / h.value.limit_per_page) ? (h.value.current_page = t, U()) : console.warn("Número de página inválido.");
|
|
@@ -1007,9 +1010,9 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
1007
1010
|
typeof p == "function" && p(o) && l.push(M);
|
|
1008
1011
|
return l.join(" ").trim();
|
|
1009
1012
|
};
|
|
1010
|
-
return
|
|
1013
|
+
return v({
|
|
1011
1014
|
execute: U,
|
|
1012
|
-
reSearch:
|
|
1015
|
+
reSearch: A,
|
|
1013
1016
|
pagination: Ze(h),
|
|
1014
1017
|
set_limit_per_page: je,
|
|
1015
1018
|
set_search: Pe,
|
|
@@ -1025,7 +1028,7 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
1025
1028
|
columns_list: re
|
|
1026
1029
|
}), xe(() => {
|
|
1027
1030
|
a.value.immediate && de(() => {
|
|
1028
|
-
|
|
1031
|
+
A();
|
|
1029
1032
|
}), de(() => {
|
|
1030
1033
|
a.value.storage_id && (Ie(), Oe());
|
|
1031
1034
|
});
|
|
@@ -1035,25 +1038,25 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
1035
1038
|
return JSON.stringify(t);
|
|
1036
1039
|
},
|
|
1037
1040
|
(t, o) => {
|
|
1038
|
-
t !== o && o !== void 0 &&
|
|
1041
|
+
t !== o && o !== void 0 && A();
|
|
1039
1042
|
}
|
|
1040
1043
|
), X(
|
|
1041
1044
|
() => a.value.endpoint,
|
|
1042
1045
|
(t, o) => {
|
|
1043
1046
|
t !== o && o !== void 0 && (h.value.current_page = a.value.page_starts_at);
|
|
1044
1047
|
}
|
|
1045
|
-
), (t, o) => (
|
|
1048
|
+
), (t, o) => (s(), r("div", null, [
|
|
1046
1049
|
d("div", {
|
|
1047
1050
|
class: k(["", a.value.class_container])
|
|
1048
1051
|
}, [
|
|
1049
|
-
|
|
1052
|
+
E(t.$slots, "default", {}, void 0, !0),
|
|
1050
1053
|
d("div", {
|
|
1051
1054
|
class: k(["", a.value.class_content])
|
|
1052
1055
|
}, [
|
|
1053
1056
|
d("div", {
|
|
1054
1057
|
class: k([a.value.class_filters, "d-flex justify-content-between align-items-start"])
|
|
1055
1058
|
}, [
|
|
1056
|
-
|
|
1059
|
+
E(t.$slots, "pageSize", {
|
|
1057
1060
|
changePageSize: ve,
|
|
1058
1061
|
limit_per_page: h.value.limit_per_page
|
|
1059
1062
|
}, () => [
|
|
@@ -1082,13 +1085,13 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
1082
1085
|
j(" " + C(a.value.second_text_page_size), 1)
|
|
1083
1086
|
], 2)
|
|
1084
1087
|
], !0),
|
|
1085
|
-
|
|
1086
|
-
(
|
|
1088
|
+
E(t.$slots, "fieldMiddle", {}, void 0, !0),
|
|
1089
|
+
(s(), H(ke, {
|
|
1087
1090
|
to: a.value.search_teleport || "body",
|
|
1088
1091
|
disabled: !a.value.search_teleport
|
|
1089
1092
|
}, [
|
|
1090
1093
|
d("div", Jt, [
|
|
1091
|
-
a.value.disable_search ? b("", !0) : (
|
|
1094
|
+
a.value.disable_search ? b("", !0) : (s(), H(mt, {
|
|
1092
1095
|
key: 0,
|
|
1093
1096
|
search: h.value.search,
|
|
1094
1097
|
"onUpdate:search": o[1] || (o[1] = (l) => h.value.search = l),
|
|
@@ -1096,7 +1099,7 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
1096
1099
|
"onUpdate:filter": o[2] || (o[2] = (l) => h.value.filter = l),
|
|
1097
1100
|
list_filter: a.value.list_filter,
|
|
1098
1101
|
item_use: Ee.value,
|
|
1099
|
-
onSearch:
|
|
1102
|
+
onSearch: f(A),
|
|
1100
1103
|
deactivate_search_on_clear: a.value.deactivate_search_on_clear,
|
|
1101
1104
|
placeholder_search: a.value.placeholder_search,
|
|
1102
1105
|
deactivate_search_empty: a.value.deactivate_search_empty,
|
|
@@ -1106,10 +1109,10 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
1106
1109
|
onClickedClearSearch: o[3] || (o[3] = (l) => t.$emit("clickedClearSearch"))
|
|
1107
1110
|
}, {
|
|
1108
1111
|
"search-field": L(() => [
|
|
1109
|
-
|
|
1112
|
+
E(t.$slots, "search-field", {
|
|
1110
1113
|
search: h.value.search,
|
|
1111
1114
|
filter: h.value.filter,
|
|
1112
|
-
reSearch:
|
|
1115
|
+
reSearch: f(A)
|
|
1113
1116
|
}, void 0, !0)
|
|
1114
1117
|
]),
|
|
1115
1118
|
_: 3
|
|
@@ -1120,22 +1123,22 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
1120
1123
|
toggleColumnVisibility: ie
|
|
1121
1124
|
}, {
|
|
1122
1125
|
"extra-actions": L(() => [
|
|
1123
|
-
|
|
1126
|
+
E(t.$slots, "extra-actions", {}, void 0, !0)
|
|
1124
1127
|
]),
|
|
1125
1128
|
_: 3
|
|
1126
1129
|
}, 8, ["use_column_manager", "columns_list"])
|
|
1127
1130
|
])
|
|
1128
1131
|
], 8, ["to", "disabled"]))
|
|
1129
1132
|
], 2),
|
|
1130
|
-
|
|
1131
|
-
selected_items:
|
|
1133
|
+
E(t.$slots, "item-selected-info", {
|
|
1134
|
+
selected_items: f(J),
|
|
1132
1135
|
clearSelection: () => J.value = []
|
|
1133
1136
|
}, () => [
|
|
1134
|
-
a.value.use_checkbox &&
|
|
1137
|
+
a.value.use_checkbox && f(J).length > 0 && !a.value.deactivate_selected_info ? (s(), r("div", Yt, [
|
|
1135
1138
|
d("h4", Gt, [
|
|
1136
1139
|
o[10] || (o[10] = d("strong", null, "oi Itens Selecionados:", -1)),
|
|
1137
1140
|
o[11] || (o[11] = j()),
|
|
1138
|
-
d("span", Xt, C(
|
|
1141
|
+
d("span", Xt, C(f(J).length), 1)
|
|
1139
1142
|
]),
|
|
1140
1143
|
d("a", {
|
|
1141
1144
|
class: "cursor-pointer",
|
|
@@ -1145,30 +1148,30 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
1145
1148
|
])])
|
|
1146
1149
|
])) : b("", !0)
|
|
1147
1150
|
], !0),
|
|
1148
|
-
|
|
1151
|
+
f(ze) ? (s(), H(jt, {
|
|
1149
1152
|
key: 0,
|
|
1150
1153
|
columns: y.value,
|
|
1151
1154
|
limit: h.value.limit_per_page,
|
|
1152
1155
|
type_loading: a.value.type_loading,
|
|
1153
1156
|
custom_loading: a.value.custom_loading,
|
|
1154
1157
|
class_table: a.value.class_table,
|
|
1155
|
-
attempt:
|
|
1158
|
+
attempt: f(ne),
|
|
1156
1159
|
pagination: h.value
|
|
1157
|
-
}, null, 8, ["columns", "limit", "type_loading", "custom_loading", "class_table", "attempt", "pagination"])) :
|
|
1160
|
+
}, null, 8, ["columns", "limit", "type_loading", "custom_loading", "class_table", "attempt", "pagination"])) : f(V) ? (s(), r("div", Wt, [
|
|
1158
1161
|
o[13] || (o[13] = d("h4", { class: "text-danger" }, "Ocorreu um Erro", -1)),
|
|
1159
|
-
|
|
1162
|
+
f(ne) ? (s(), r("p", Qt, " Não foi possível carregar os dados após " + C(f(ne).total) + " tentativa(s). ", 1)) : (s(), r("p", Rt, " Não foi possível carregar os dados. Verifique sua conexão. ")),
|
|
1160
1163
|
d("button", {
|
|
1161
1164
|
class: "btn btn-primary mt-2",
|
|
1162
1165
|
onClick: o[5] || (o[5] = //@ts-ignore
|
|
1163
|
-
(...l) =>
|
|
1166
|
+
(...l) => f(U) && f(U)(...l))
|
|
1164
1167
|
}, " Tentar Novamente ")
|
|
1165
|
-
])) :
|
|
1166
|
-
te.value || a.value.show_header_when_empty ? (
|
|
1168
|
+
])) : f(O) ? (s(), r("div", Zt, [
|
|
1169
|
+
te.value || a.value.show_header_when_empty ? (s(), r("div", ea, [
|
|
1167
1170
|
d("table", {
|
|
1168
1171
|
class: k(["table table-vcenter table-selectable", a.value.class_table])
|
|
1169
1172
|
}, [
|
|
1170
1173
|
d("thead", null, [
|
|
1171
|
-
G(
|
|
1174
|
+
G(f(lt), {
|
|
1172
1175
|
modelValue: oe.value,
|
|
1173
1176
|
"onUpdate:modelValue": o[7] || (o[7] = (l) => oe.value = l),
|
|
1174
1177
|
tag: "tr",
|
|
@@ -1180,15 +1183,15 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
1180
1183
|
onEnd: o[9] || (o[9] = () => Ne())
|
|
1181
1184
|
}, {
|
|
1182
1185
|
header: L(() => [
|
|
1183
|
-
a.value.use_expandable_items ? (
|
|
1184
|
-
a.value.use_checkbox ? (
|
|
1186
|
+
a.value.use_expandable_items ? (s(), r("th", ta)) : b("", !0),
|
|
1187
|
+
a.value.use_checkbox ? (s(), r("th", aa, [
|
|
1185
1188
|
d("input", {
|
|
1186
1189
|
class: "form-check-input m-0",
|
|
1187
1190
|
type: "checkbox",
|
|
1188
1191
|
ref_key: "selectAllCheckbox",
|
|
1189
1192
|
ref: pe,
|
|
1190
1193
|
onChange: o[6] || (o[6] = //@ts-ignore
|
|
1191
|
-
(...l) =>
|
|
1194
|
+
(...l) => f(me) && f(me)(...l)),
|
|
1192
1195
|
"aria-label": "Selecionar todos os itens na página"
|
|
1193
1196
|
}, null, 544)
|
|
1194
1197
|
])) : b("", !0)
|
|
@@ -1205,7 +1208,7 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
1205
1208
|
}, null, 8, ["header", "class_column", "use_ordering", "orderings_state", "onToggleOrderingState", "col"])
|
|
1206
1209
|
]),
|
|
1207
1210
|
footer: L(() => [
|
|
1208
|
-
(
|
|
1211
|
+
(s(!0), r(z, null, N(ge.value, (l) => (s(), H(be, {
|
|
1209
1212
|
key: l.field || l.header,
|
|
1210
1213
|
header: l.header,
|
|
1211
1214
|
class_column: l.class_column,
|
|
@@ -1220,7 +1223,7 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
1220
1223
|
}, 8, ["modelValue"])
|
|
1221
1224
|
]),
|
|
1222
1225
|
d("tbody", null, [
|
|
1223
|
-
te.value ? (
|
|
1226
|
+
te.value ? (s(!0), r(z, { key: 0 }, N(f(O), (l, M) => (s(), r(z, {
|
|
1224
1227
|
key: l[a.value.item_key]
|
|
1225
1228
|
}, [
|
|
1226
1229
|
G(et, {
|
|
@@ -1228,26 +1231,26 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
1228
1231
|
name: F.value ? "column-move" : ""
|
|
1229
1232
|
}, {
|
|
1230
1233
|
default: L(() => [
|
|
1231
|
-
a.value.use_expandable_items ? (
|
|
1232
|
-
|
|
1234
|
+
a.value.use_expandable_items ? (s(), r("td", sa, [
|
|
1235
|
+
E(t.$slots, "expand-button", {
|
|
1233
1236
|
item: l,
|
|
1234
1237
|
index: M,
|
|
1235
|
-
isExpanded:
|
|
1236
|
-
expand_item_toggle:
|
|
1238
|
+
isExpanded: f(R)(l),
|
|
1239
|
+
expand_item_toggle: f(W)
|
|
1237
1240
|
}, () => [
|
|
1238
1241
|
d("button", {
|
|
1239
1242
|
type: "button",
|
|
1240
|
-
class: k(["btn-clean btn-icon-anim", { "is-expanded":
|
|
1241
|
-
onClick: (p) =>
|
|
1243
|
+
class: k(["btn-clean btn-icon-anim", { "is-expanded": f(R)(l) }]),
|
|
1244
|
+
onClick: (p) => f(W)(l)
|
|
1242
1245
|
}, [
|
|
1243
|
-
a.value.type_button_expand === "arrow" ? (
|
|
1246
|
+
a.value.type_button_expand === "arrow" ? (s(), r("svg", la, [...o[14] || (o[14] = [
|
|
1244
1247
|
d("path", {
|
|
1245
1248
|
stroke: "none",
|
|
1246
1249
|
d: "M0 0h24v24H0z",
|
|
1247
1250
|
fill: "none"
|
|
1248
1251
|
}, null, -1),
|
|
1249
1252
|
d("path", { d: "M9 6l6 6l-6 6" }, null, -1)
|
|
1250
|
-
])])) : (
|
|
1253
|
+
])])) : (s(), r("svg", oa, [...o[15] || (o[15] = [
|
|
1251
1254
|
d("path", {
|
|
1252
1255
|
stroke: "none",
|
|
1253
1256
|
d: "M0 0h24v24H0z",
|
|
@@ -1259,63 +1262,63 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
1259
1262
|
}, null, -1),
|
|
1260
1263
|
d("path", { d: "M5 12l14 0" }, null, -1)
|
|
1261
1264
|
])]))
|
|
1262
|
-
], 10,
|
|
1265
|
+
], 10, na)
|
|
1263
1266
|
], !0)
|
|
1264
1267
|
])) : b("", !0),
|
|
1265
|
-
a.value.use_checkbox ? (
|
|
1268
|
+
a.value.use_checkbox ? (s(), r("td", ra, [
|
|
1266
1269
|
d("input", {
|
|
1267
1270
|
class: "form-check-input m-0",
|
|
1268
1271
|
type: "checkbox",
|
|
1269
|
-
checked:
|
|
1270
|
-
onChange: (p) =>
|
|
1272
|
+
checked: f(_e)(l),
|
|
1273
|
+
onChange: (p) => f(Ve)(l),
|
|
1271
1274
|
"aria-label": "Selecionar este item"
|
|
1272
1275
|
}, null, 40, ia)
|
|
1273
1276
|
])) : b("", !0),
|
|
1274
|
-
(
|
|
1277
|
+
(s(!0), r(z, null, N(De.value, (p, D) => (s(), r("td", {
|
|
1275
1278
|
key: p.field || p.header,
|
|
1276
1279
|
class: k(p.class_row)
|
|
1277
1280
|
}, [
|
|
1278
|
-
p.bodySlot ? (
|
|
1281
|
+
p.bodySlot ? (s(), H(ee(p.bodySlot), {
|
|
1279
1282
|
key: 0,
|
|
1280
1283
|
item: l,
|
|
1281
1284
|
index: D,
|
|
1282
|
-
"is-selected":
|
|
1283
|
-
}, null, 8, ["item", "index", "is-selected"])) : p.type === "text" ? (
|
|
1285
|
+
"is-selected": f(_e)(l)
|
|
1286
|
+
}, null, 8, ["item", "index", "is-selected"])) : p.type === "text" ? (s(), r("span", {
|
|
1284
1287
|
key: 1,
|
|
1285
1288
|
onClick: (P) => p.click ? p.click(l) : null,
|
|
1286
1289
|
class: k(ae(p, l))
|
|
1287
|
-
}, C(Ae(q(p.field, l, p.transform_function), p.limite_text ?? null)), 11, da)) : p.type === "date" ? (
|
|
1290
|
+
}, C(Ae(q(p.field, l, p.transform_function), p.limite_text ?? null)), 11, da)) : p.type === "date" ? (s(), r("span", {
|
|
1288
1291
|
key: 2,
|
|
1289
1292
|
onClick: (P) => p.click ? p.click(l) : null,
|
|
1290
1293
|
class: k(ae(p, l))
|
|
1291
1294
|
}, [
|
|
1292
|
-
p.format === "complete" ? (
|
|
1295
|
+
p.format === "complete" ? (s(), r("span", ca, C(new Date(q(
|
|
1293
1296
|
p.field,
|
|
1294
1297
|
l
|
|
1295
1298
|
)).toLocaleString()), 1)) : b("", !0),
|
|
1296
|
-
p.format === "simple" ? (
|
|
1299
|
+
p.format === "simple" ? (s(), r("span", pa, C(new Date(q(
|
|
1297
1300
|
p.field,
|
|
1298
1301
|
l
|
|
1299
1302
|
)).toLocaleDateString()), 1)) : b("", !0)
|
|
1300
|
-
], 10, ua)) : p.type === "html" ? (
|
|
1303
|
+
], 10, ua)) : p.type === "html" ? (s(), r("div", {
|
|
1301
1304
|
key: 3,
|
|
1302
1305
|
onClick: (P) => p.click ? p.click(l) : null,
|
|
1303
1306
|
class: k(ae(p, l)),
|
|
1304
1307
|
innerHTML: q(p.field, l)
|
|
1305
|
-
}, null, 10, _a)) : p.type === "img" ? (
|
|
1308
|
+
}, null, 10, _a)) : p.type === "img" ? (s(), r("div", {
|
|
1306
1309
|
key: 4,
|
|
1307
1310
|
onClick: (P) => p.click ? p.click(l) : null,
|
|
1308
1311
|
class: k(ae(p, l))
|
|
1309
1312
|
}, [
|
|
1310
|
-
q(p.field, l) ? (
|
|
1313
|
+
q(p.field, l) ? (s(), r("div", ue({
|
|
1311
1314
|
key: 0,
|
|
1312
1315
|
ref_for: !0
|
|
1313
1316
|
}, p.deactivate_img_preview ? {
|
|
1314
1317
|
class: "container-img"
|
|
1315
1318
|
} : {
|
|
1316
|
-
onMouseover: (P) =>
|
|
1317
|
-
onMousemove:
|
|
1318
|
-
onMouseleave:
|
|
1319
|
+
onMouseover: (P) => f(I)(P, q(p.field, l)),
|
|
1320
|
+
onMousemove: f(w),
|
|
1321
|
+
onMouseleave: f(_),
|
|
1319
1322
|
class: "container-img container-img-preview"
|
|
1320
1323
|
}), [
|
|
1321
1324
|
d("img", {
|
|
@@ -1328,7 +1331,7 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
1328
1331
|
}, null, 8, va),
|
|
1329
1332
|
o[16] || (o[16] = d("div", { class: "bg-img" }, null, -1))
|
|
1330
1333
|
], 16)) : b("", !0)
|
|
1331
|
-
], 10, ma)) : (
|
|
1334
|
+
], 10, ma)) : (s(), r("span", fa, [
|
|
1332
1335
|
o[17] || (o[17] = j("tipo ", -1)),
|
|
1333
1336
|
d("span", ha, C(p.type), 1),
|
|
1334
1337
|
o[18] || (o[18] = j(" não suportado", -1))
|
|
@@ -1342,7 +1345,7 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
1342
1345
|
css: !a.value.deactivate_animation_expand
|
|
1343
1346
|
}, {
|
|
1344
1347
|
default: L(() => [
|
|
1345
|
-
|
|
1348
|
+
f(R)(l) ? (s(), r("tr", {
|
|
1346
1349
|
key: 0,
|
|
1347
1350
|
id: "expand-item-" + l[a.value.item_key],
|
|
1348
1351
|
class: "expanded-item-row"
|
|
@@ -1350,7 +1353,7 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
1350
1353
|
d("td", {
|
|
1351
1354
|
colspan: Fe()
|
|
1352
1355
|
}, [
|
|
1353
|
-
|
|
1356
|
+
E(t.$slots, "after-row", { item: l }, void 0, !0)
|
|
1354
1357
|
], 8, ka)
|
|
1355
1358
|
], 8, ya)) : b("", !0)
|
|
1356
1359
|
]),
|
|
@@ -1360,28 +1363,28 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
1360
1363
|
])
|
|
1361
1364
|
], 2)
|
|
1362
1365
|
])) : b("", !0),
|
|
1363
|
-
!te.value &&
|
|
1364
|
-
|
|
1365
|
-
])) : te.value ? b("", !0) : (
|
|
1366
|
+
!te.value && f(Be) === !1 ? (s(), r("div", ba, [
|
|
1367
|
+
E(t.$slots, "idle-state", {}, void 0, !0)
|
|
1368
|
+
])) : te.value ? b("", !0) : (s(), r("div", wa, [...o[19] || (o[19] = [
|
|
1366
1369
|
d("p", { class: "m-0" }, "Nenhum item encontrado.", -1)
|
|
1367
1370
|
])]))
|
|
1368
1371
|
])) : b("", !0)
|
|
1369
1372
|
], 2)
|
|
1370
1373
|
], 2),
|
|
1371
|
-
(
|
|
1374
|
+
(s(), H(ke, {
|
|
1372
1375
|
to: a.value.pagination_teleport || "body",
|
|
1373
1376
|
disabled: !a.value.pagination_teleport
|
|
1374
1377
|
}, [
|
|
1375
|
-
|
|
1378
|
+
E(t.$slots, "pagination", {
|
|
1376
1379
|
pagination: h.value,
|
|
1377
|
-
tradePage:
|
|
1378
|
-
error:
|
|
1380
|
+
tradePage: f(U),
|
|
1381
|
+
error: f(V)
|
|
1379
1382
|
}, () => [
|
|
1380
|
-
!
|
|
1383
|
+
!f(V) && h.value.count > 0 ? (s(), r("div", {
|
|
1381
1384
|
key: 0,
|
|
1382
1385
|
class: k(["px-3", a.value.class_pagination])
|
|
1383
1386
|
}, [
|
|
1384
|
-
G(
|
|
1387
|
+
G(nt, {
|
|
1385
1388
|
page_starts_at: a.value.page_starts_at,
|
|
1386
1389
|
filtering: !0,
|
|
1387
1390
|
pagination: h.value,
|
|
@@ -1390,13 +1393,13 @@ const Ct = { class: "loading-container" }, $t = { key: 0 }, Mt = { key: 2 }, zt
|
|
|
1390
1393
|
], 2)) : b("", !0)
|
|
1391
1394
|
], !0)
|
|
1392
1395
|
], 8, ["to", "disabled"])),
|
|
1393
|
-
|
|
1396
|
+
f(m) ? (s(), r("div", {
|
|
1394
1397
|
key: 0,
|
|
1395
1398
|
class: "image-preview-container",
|
|
1396
|
-
style: at(
|
|
1399
|
+
style: at(f($))
|
|
1397
1400
|
}, [
|
|
1398
1401
|
d("img", {
|
|
1399
|
-
src:
|
|
1402
|
+
src: f(c),
|
|
1400
1403
|
alt: "Preview",
|
|
1401
1404
|
class: "image-preview-large"
|
|
1402
1405
|
}, null, 8, xa)
|
package/package.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
2
|
<div v-if="use_column_manager" class="dropdown d-inline-block ms-2">
|
|
4
3
|
<button class="btn dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false"
|
|
5
4
|
title="Gerenciar Colunas visíveis">
|
|
@@ -28,6 +27,9 @@
|
|
|
28
27
|
</div>
|
|
29
28
|
</div>
|
|
30
29
|
</div>
|
|
30
|
+
<slot name="extra-actions">
|
|
31
|
+
|
|
32
|
+
</slot>
|
|
31
33
|
</template>
|
|
32
34
|
<script setup lang="ts">
|
|
33
35
|
interface SearchProps {
|