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