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