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