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