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