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