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