@wgalleti/primevue-components 2.3.2 → 2.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/crud/WCrudView.vue.d.ts +57 -42
- package/dist/components/crud/WCrudView.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/crud/WCrudView.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/components/crud/WCrudView.vue_vue_type_script_setup_true_lang.js +455 -390
- package/dist/components/crud/WCrudView.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/primevue-components.css +1 -1
- package/package.json +1 -1
|
@@ -4,92 +4,99 @@ import t from "../ui/WPopover.vue.js";
|
|
|
4
4
|
import n from "../ui/WMenu.vue.js";
|
|
5
5
|
import { useTabHost as r } from "../../types/routeTabs.js";
|
|
6
6
|
import { useCardFit as i } from "../../composables/useCardFit.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import te from "
|
|
10
|
-
import ne from "
|
|
11
|
-
import re from "./
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import ye from "
|
|
16
|
-
import be from "primevue/
|
|
17
|
-
import xe from "primevue/
|
|
7
|
+
import { useBreakpoint as a } from "../../composables/useBreakpoint.js";
|
|
8
|
+
import { useUrlState as ee } from "../../composables/useUrlState.js";
|
|
9
|
+
import { useDelayedLoading as te } from "../../composables/useDelayedLoading.js";
|
|
10
|
+
import ne from "../ui/WSkeleton.vue.js";
|
|
11
|
+
import re from "./WCrudColumnRenderer.vue.js";
|
|
12
|
+
import ie from "./WCrudFormDialog.vue.js";
|
|
13
|
+
import { useFormatters as ae } from "../../composables/useFormatters.js";
|
|
14
|
+
import { downloadCsv as oe, toCsv as se } from "../../utils/csv.js";
|
|
15
|
+
import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createSlots as ce, createVNode as f, defineComponent as p, getCurrentInstance as le, guardReactiveProps as m, mergeModels as ue, mergeProps as de, nextTick as fe, normalizeClass as h, normalizeProps as g, normalizeStyle as pe, onMounted as me, openBlock as _, reactive as he, ref as v, renderList as y, renderSlot as b, resolveDirective as ge, toDisplayString as x, unref as S, useModel as _e, useSlots as ve, vShow as ye, watch as C, withCtx as w, withDirectives as T } from "vue";
|
|
16
|
+
import be from "primevue/dialog";
|
|
17
|
+
import xe from "primevue/datatable";
|
|
18
|
+
import Se from "primevue/column";
|
|
18
19
|
import E from "primevue/inputtext";
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
20
|
+
import Ce from "primevue/inputnumber";
|
|
21
|
+
import we from "primevue/select";
|
|
22
|
+
import Te from "primevue/checkbox";
|
|
23
|
+
import Ee from "primevue/iconfield";
|
|
24
|
+
import De from "primevue/inputicon";
|
|
25
|
+
import Oe from "primevue/paginator";
|
|
26
|
+
import ke from "primevue/tag";
|
|
26
27
|
// src/components/crud/WCrudView.vue?vue&type=script&setup=true&lang.ts
|
|
27
|
-
var
|
|
28
|
+
var Ae = {
|
|
28
29
|
key: 0,
|
|
29
30
|
class: "w-crud-header"
|
|
30
|
-
},
|
|
31
|
+
}, je = { class: "w-crud-header-content" }, Me = { class: "w-crud-title-row" }, Ne = { class: "w-crud-title" }, Pe = ["aria-busy"], Fe = {
|
|
31
32
|
key: 0,
|
|
32
33
|
class: "w-crud-subtitle"
|
|
33
|
-
},
|
|
34
|
+
}, Ie = { class: "w-crud-header-actions" }, Le = {
|
|
34
35
|
key: 0,
|
|
35
36
|
class: "w-crud-kpis"
|
|
36
|
-
},
|
|
37
|
+
}, Re = { class: "w-crud-kpi-content" }, ze = { class: "w-crud-kpi-label" }, Be = { class: "w-crud-kpi-value" }, Ve = {
|
|
37
38
|
key: 0,
|
|
38
39
|
class: "w-crud-probe",
|
|
39
40
|
"aria-hidden": "true"
|
|
40
|
-
},
|
|
41
|
+
}, He = {
|
|
41
42
|
key: 0,
|
|
42
43
|
class: "w-crud-bulkbar"
|
|
43
|
-
},
|
|
44
|
+
}, Ue = { class: "w-crud-bulkbar__count" }, We = { class: "w-crud-toolbar" }, Ge = { class: "w-crud-toolbar-start" }, Ke = {
|
|
45
|
+
key: 0,
|
|
46
|
+
class: "w-crud-search-row"
|
|
47
|
+
}, qe = ["aria-busy"], Je = { class: "w-crud-toolbar-end" }, Ye = { class: "w-crud-chooser" }, Xe = ["for"], Ze = {
|
|
44
48
|
key: 3,
|
|
45
49
|
class: "w-crud-view-toggle"
|
|
46
|
-
},
|
|
50
|
+
}, Qe = { class: "w-crud-empty" }, $e = { class: "w-crud-empty-text" }, et = {
|
|
47
51
|
key: 0,
|
|
48
52
|
class: "w-crud-group-head"
|
|
49
|
-
},
|
|
53
|
+
}, tt = { class: "w-crud-group-label" }, nt = { class: "w-crud-group-meta" }, rt = { class: "w-crud-actions" }, it = {
|
|
50
54
|
key: 2,
|
|
51
55
|
class: "w-crud-cards-wrap"
|
|
52
|
-
},
|
|
56
|
+
}, at = { class: "w-crud-toolbar w-crud-toolbar--standalone" }, ot = { class: "w-crud-toolbar-start" }, st = {
|
|
57
|
+
key: 0,
|
|
58
|
+
class: "w-crud-search-row"
|
|
59
|
+
}, ct = ["aria-busy"], lt = { class: "w-crud-toolbar-end" }, ut = {
|
|
53
60
|
key: 2,
|
|
54
61
|
class: "w-crud-view-toggle"
|
|
55
|
-
},
|
|
62
|
+
}, dt = {
|
|
56
63
|
key: 0,
|
|
57
64
|
class: "w-crud-cards-loading"
|
|
58
|
-
},
|
|
65
|
+
}, ft = {
|
|
59
66
|
key: 1,
|
|
60
67
|
class: "pi pi-spin pi-spinner"
|
|
61
|
-
},
|
|
68
|
+
}, pt = { class: "w-crud-empty" }, mt = { class: "w-crud-empty-text" }, ht = {
|
|
62
69
|
key: 0,
|
|
63
70
|
class: "w-crud-group-bar"
|
|
64
|
-
},
|
|
71
|
+
}, gt = [
|
|
65
72
|
"aria-expanded",
|
|
66
73
|
"aria-label",
|
|
67
74
|
"onClick"
|
|
68
|
-
],
|
|
75
|
+
], _t = { class: "w-crud-group-head" }, vt = { class: "w-crud-group-label" }, yt = { class: "w-crud-group-meta" }, bt = ["aria-label"], xt = [
|
|
69
76
|
"onClick",
|
|
70
77
|
"onDblclick",
|
|
71
78
|
"onContextmenu"
|
|
72
|
-
],
|
|
79
|
+
], St = { class: "w-crud-card-body" }, Ct = {
|
|
73
80
|
key: 0,
|
|
74
81
|
class: "w-crud-card-select"
|
|
75
|
-
},
|
|
82
|
+
}, wt = {
|
|
76
83
|
key: 0,
|
|
77
84
|
class: "w-crud-card-label"
|
|
78
|
-
},
|
|
85
|
+
}, Tt = { class: "w-crud-card-value" }, Et = {
|
|
79
86
|
key: 0,
|
|
80
87
|
class: "w-crud-card-actions"
|
|
81
|
-
},
|
|
88
|
+
}, Dt = {
|
|
82
89
|
key: 0,
|
|
83
90
|
class: "w-crud-rail"
|
|
84
|
-
},
|
|
91
|
+
}, Ot = {
|
|
85
92
|
key: 1,
|
|
86
93
|
class: "w-crud-rail-sep"
|
|
87
|
-
},
|
|
94
|
+
}, kt = {
|
|
88
95
|
key: 2,
|
|
89
96
|
class: "w-crud-rail-sep"
|
|
90
|
-
},
|
|
97
|
+
}, At = /*@__PURE__*/ p({
|
|
91
98
|
__name: "WCrudView",
|
|
92
|
-
props: /*@__PURE__*/
|
|
99
|
+
props: /*@__PURE__*/ ue({
|
|
93
100
|
crud: {},
|
|
94
101
|
title: {},
|
|
95
102
|
subtitle: {},
|
|
@@ -139,6 +146,7 @@ var ke = {
|
|
|
139
146
|
type: Boolean,
|
|
140
147
|
default: !0
|
|
141
148
|
},
|
|
149
|
+
railMenu: { default: "auto" },
|
|
142
150
|
contextMenu: {
|
|
143
151
|
type: Boolean,
|
|
144
152
|
default: !0
|
|
@@ -178,96 +186,96 @@ var ke = {
|
|
|
178
186
|
collapsedGroups: { default: () => [] },
|
|
179
187
|
collapsedGroupsModifiers: {}
|
|
180
188
|
}),
|
|
181
|
-
emits: /*@__PURE__*/
|
|
189
|
+
emits: /*@__PURE__*/ ue([
|
|
182
190
|
"row-expand",
|
|
183
191
|
"row-collapse",
|
|
184
192
|
"print",
|
|
185
193
|
"row-click"
|
|
186
194
|
], ["update:selectedRow", "update:collapsedGroups"]),
|
|
187
|
-
setup(p, { expose:
|
|
188
|
-
let
|
|
189
|
-
function
|
|
195
|
+
setup(p, { expose: ue, emit: At }) {
|
|
196
|
+
let jt = r(), D = p, O = At, Mt = ve(), { formatNumber: Nt } = ae(), { showSkeleton: Pt } = te(() => D.crud.loading.value, { delay: () => D.loadingDelay }), Ft = v({});
|
|
197
|
+
function It() {
|
|
190
198
|
return D.persistState ? `wcrud:view:${D.persistState}` : null;
|
|
191
199
|
}
|
|
192
|
-
function
|
|
200
|
+
function Lt(e) {
|
|
193
201
|
try {
|
|
194
202
|
return localStorage.getItem(e);
|
|
195
203
|
} catch {
|
|
196
204
|
return null;
|
|
197
205
|
}
|
|
198
206
|
}
|
|
199
|
-
function
|
|
207
|
+
function Rt(e, t) {
|
|
200
208
|
try {
|
|
201
209
|
localStorage.setItem(e, t);
|
|
202
210
|
} catch {}
|
|
203
211
|
}
|
|
204
|
-
function
|
|
205
|
-
let e =
|
|
212
|
+
function zt() {
|
|
213
|
+
let e = It();
|
|
206
214
|
if (e) {
|
|
207
|
-
let t =
|
|
215
|
+
let t = Lt(e);
|
|
208
216
|
if (t === "table" || t === "cards") return t;
|
|
209
217
|
}
|
|
210
218
|
return D.defaultView;
|
|
211
219
|
}
|
|
212
|
-
let
|
|
213
|
-
function
|
|
214
|
-
return
|
|
220
|
+
let Bt = v(D.defaultView), Vt = v(null), Ht = v(null), Ut = D.cardMode === "fit", { estreito: Wt } = i(Vt, Ht, Ut ? { regua: 0 } : {}), Gt = s(() => D.cardMode === "always" || (D.cardMode === "auto" || D.cardMode === "fit") && Wt.value), Kt = s(() => Gt.value ? "cards" : Bt.value), qt = s(() => D.viewToggle && !Gt.value);
|
|
221
|
+
function k(e) {
|
|
222
|
+
return Kt.value === e;
|
|
215
223
|
}
|
|
216
|
-
function
|
|
217
|
-
|
|
218
|
-
let t =
|
|
219
|
-
t &&
|
|
224
|
+
function Jt(e) {
|
|
225
|
+
Bt.value = e;
|
|
226
|
+
let t = It();
|
|
227
|
+
t && Rt(t, e);
|
|
220
228
|
}
|
|
221
|
-
let
|
|
222
|
-
function
|
|
229
|
+
let Yt = s(() => D.crud.pagination.rows ? (D.crud.pagination.page - 1) * D.crud.pagination.pageSize : 0), A = he({ hidden: [] }), Xt = v(null);
|
|
230
|
+
function Zt() {
|
|
223
231
|
return D.persistState ? `wcrud:cols:${D.persistState}` : null;
|
|
224
232
|
}
|
|
225
|
-
function
|
|
226
|
-
let e =
|
|
233
|
+
function Qt() {
|
|
234
|
+
let e = Zt();
|
|
227
235
|
if (e) try {
|
|
228
|
-
let t = JSON.parse(
|
|
229
|
-
Array.isArray(t.hidden) && (
|
|
236
|
+
let t = JSON.parse(Lt(e) || "{}");
|
|
237
|
+
Array.isArray(t.hidden) && (A.hidden = t.hidden);
|
|
230
238
|
} catch {}
|
|
231
239
|
}
|
|
232
|
-
function
|
|
233
|
-
let e =
|
|
234
|
-
e &&
|
|
240
|
+
function $t() {
|
|
241
|
+
let e = Zt();
|
|
242
|
+
e && Rt(e, JSON.stringify({ hidden: A.hidden }));
|
|
235
243
|
}
|
|
236
|
-
function
|
|
244
|
+
function en() {
|
|
237
245
|
return D.persistState ? `wcrud:filters:${D.persistState}` : null;
|
|
238
246
|
}
|
|
239
|
-
function
|
|
240
|
-
let e =
|
|
247
|
+
function tn() {
|
|
248
|
+
let e = en();
|
|
241
249
|
if (e) try {
|
|
242
|
-
let t = JSON.parse(
|
|
250
|
+
let t = JSON.parse(Lt(e) || "{}");
|
|
243
251
|
if (t && typeof t.columnFilters == "object" && t.columnFilters) for (let [e, n] of Object.entries(t.columnFilters)) n != null && n !== "" && (D.crud.columnFilters[e] = n);
|
|
244
252
|
typeof t.search == "string" && t.search && (D.crud.search.value = t.search);
|
|
245
253
|
} catch {}
|
|
246
254
|
}
|
|
247
|
-
function
|
|
248
|
-
let e =
|
|
249
|
-
e &&
|
|
255
|
+
function nn() {
|
|
256
|
+
let e = en();
|
|
257
|
+
e && Rt(e, JSON.stringify({
|
|
250
258
|
columnFilters: { ...D.crud.columnFilters },
|
|
251
259
|
search: D.crud.search.value
|
|
252
260
|
}));
|
|
253
261
|
}
|
|
254
|
-
C(D.crud.columnFilters,
|
|
255
|
-
let
|
|
256
|
-
function
|
|
257
|
-
|
|
262
|
+
C(D.crud.columnFilters, nn, { deep: !0 }), C(D.crud.search, nn);
|
|
263
|
+
let rn = s(() => D.crud.config.columns.filter((e) => e.visible !== !1));
|
|
264
|
+
function an(e, t) {
|
|
265
|
+
A.hidden = t ? A.hidden.filter((t) => t !== e) : [.../* @__PURE__ */ new Set([...A.hidden, e])], $t();
|
|
258
266
|
}
|
|
259
|
-
let
|
|
267
|
+
let j = s(() => D.crud.config.columns.filter((e) => e.visible !== !1 && !A.hidden.includes(e.field)).map((e) => e.type === "number" && !e.align || e.type === "currency" && !e.align ? {
|
|
260
268
|
...e,
|
|
261
269
|
align: "right"
|
|
262
270
|
} : e));
|
|
263
|
-
function
|
|
271
|
+
function on(e) {
|
|
264
272
|
if (e.align === "right") return "w-col-right text-right";
|
|
265
273
|
if (e.align === "center") return "w-col-center text-center";
|
|
266
274
|
}
|
|
267
|
-
let
|
|
268
|
-
let e =
|
|
275
|
+
let sn = s(() => {
|
|
276
|
+
let e = j.value.slice(0, D.cardFields), t = D.composed ? j.value.find((e) => e.type === "identity") : void 0;
|
|
269
277
|
return t ? [t, ...e.filter((e) => e !== t)].slice(0, D.cardFields) : e;
|
|
270
|
-
}),
|
|
278
|
+
}), cn = s(() => {
|
|
271
279
|
let e = [];
|
|
272
280
|
return D.crud.config.canEdit !== !1 && e.push({
|
|
273
281
|
action: "edit",
|
|
@@ -283,67 +291,67 @@ var ke = {
|
|
|
283
291
|
tooltip: "Excluir",
|
|
284
292
|
severity: "danger"
|
|
285
293
|
}), e;
|
|
286
|
-
}),
|
|
294
|
+
}), M = s(() => D.crud.config.rowActions ?? cn.value), ln = [
|
|
287
295
|
"success",
|
|
288
296
|
"warn",
|
|
289
297
|
"info",
|
|
290
298
|
"contrast"
|
|
291
299
|
];
|
|
292
|
-
C([
|
|
293
|
-
for (let n of [...e, ...t ?? []]) n.severity &&
|
|
300
|
+
C([M, () => D.crud.config.bulkActions], ([e, t]) => {
|
|
301
|
+
for (let n of [...e, ...t ?? []]) n.severity && ln.includes(n.severity) && (`${n.action}`, `${n.action}${n.severity}`);
|
|
294
302
|
}, { immediate: !0 });
|
|
295
|
-
let
|
|
296
|
-
function
|
|
303
|
+
let un = s(() => M.value.length > 0 || !!Mt["row-actions"]), dn = s(() => `${(M.value.length + +!!Mt["row-actions"]) * 2.5 + 1}rem`);
|
|
304
|
+
function fn(e) {
|
|
297
305
|
return e.tooltip ?? e.action;
|
|
298
306
|
}
|
|
299
|
-
function
|
|
300
|
-
let n = t &&
|
|
301
|
-
return n ? `${
|
|
307
|
+
function N(e, t) {
|
|
308
|
+
let n = t && z(e, t) ? e.disabledReason?.(t) : void 0;
|
|
309
|
+
return n ? `${fn(e)}: ${n}` : fn(e);
|
|
302
310
|
}
|
|
303
|
-
let
|
|
304
|
-
function
|
|
305
|
-
e.handler ? e.handler(t) : e.action === "edit" ? D.crud.openEditDialog(t) : e.action === "view" ? D.crud.openViewDialog(t) : e.action === "duplicate" ? D.crud.openDuplicateDialog(t) : e.action === "delete" && (
|
|
311
|
+
let P = s(() => D.csvScope === "all" ? "Exportar tudo (CSV)" : "Exportar página (CSV)");
|
|
312
|
+
function F(e, t) {
|
|
313
|
+
e.handler ? e.handler(t) : e.action === "edit" ? D.crud.openEditDialog(t) : e.action === "view" ? D.crud.openViewDialog(t) : e.action === "duplicate" ? D.crud.openDuplicateDialog(t) : e.action === "delete" && (Mt["delete-message"] ? (I.value = t, L.value = !0) : D.crud.confirmDelete(t));
|
|
306
314
|
}
|
|
307
|
-
let
|
|
308
|
-
async function
|
|
309
|
-
if (
|
|
310
|
-
|
|
315
|
+
let I = v(null), L = v(!1), pn = v(!1);
|
|
316
|
+
async function mn() {
|
|
317
|
+
if (I.value) {
|
|
318
|
+
pn.value = !0;
|
|
311
319
|
try {
|
|
312
|
-
await D.crud.performDelete(
|
|
320
|
+
await D.crud.performDelete(I.value), L.value = !1, I.value = null;
|
|
313
321
|
} finally {
|
|
314
|
-
|
|
322
|
+
pn.value = !1;
|
|
315
323
|
}
|
|
316
324
|
}
|
|
317
325
|
}
|
|
318
|
-
function
|
|
326
|
+
function R(e, t) {
|
|
319
327
|
return !e.visible || e.visible(t);
|
|
320
328
|
}
|
|
321
|
-
function
|
|
329
|
+
function z(e, t) {
|
|
322
330
|
return e.disabled ? e.disabled(t) : !1;
|
|
323
331
|
}
|
|
324
|
-
let
|
|
332
|
+
let hn = s(() => {
|
|
325
333
|
let e = D.crud.pagination.rows;
|
|
326
334
|
return typeof e == "number" && e > 0 ? e : D.crud.items.value.length;
|
|
327
|
-
}),
|
|
328
|
-
if (
|
|
329
|
-
let e =
|
|
330
|
-
return `${
|
|
331
|
-
}),
|
|
335
|
+
}), gn = s(() => D.crud.loading.value && !D.crud.items.value.length), _n = s(() => D.crud.extras.value.count_aproximado === !0), vn = s(() => `${Nt(hn.value, 0)}${_n.value ? "+" : ""}`), yn = s(() => {
|
|
336
|
+
if (gn.value) return "—";
|
|
337
|
+
let e = hn.value;
|
|
338
|
+
return `${vn.value} ${e === 1 && !_n.value ? "registro" : "registros"}`;
|
|
339
|
+
}), bn = s(() => !D.hideCount), xn = s(() => gn.value ? "—" : `{first}–{last} de ${_n.value ? vn.value : "{totalRecords}"}`), Sn = s(() => {
|
|
332
340
|
let e = [];
|
|
333
341
|
return D.showKpi && e.push({
|
|
334
342
|
icon: D.kpiIcon,
|
|
335
343
|
label: D.kpiLabel,
|
|
336
|
-
value:
|
|
344
|
+
value: Nt(D.crud.pagination.rows, 0)
|
|
337
345
|
}), e.push(...D.extraKpis), e;
|
|
338
|
-
}),
|
|
339
|
-
function
|
|
346
|
+
}), B = s(() => D.crud.config.canCreate !== !1), Cn = s(() => D.actionRail && (B.value || M.value.length > 0 || !!Mt["rail-actions"] || D.showPrint || D.exportCsv)), { isCelular: wn } = a(), V = s(() => Cn.value && D.railMenu === "auto" && wn.value), Tn = v(null), H = _e(p, "selectedRow"), U = _e(p, "collapsedGroups");
|
|
347
|
+
function En(e) {
|
|
340
348
|
return typeof D.groupBy == "function" ? D.groupBy(e) : String(e[D.groupBy] ?? "");
|
|
341
349
|
}
|
|
342
350
|
let W = s(() => {
|
|
343
351
|
if (!D.groupBy) return [];
|
|
344
352
|
let e = /* @__PURE__ */ new Map();
|
|
345
353
|
for (let t of D.crud.items.value) {
|
|
346
|
-
let n =
|
|
354
|
+
let n = En(t), r = e.get(n);
|
|
347
355
|
r ? r.push(t) : e.set(n, [t]);
|
|
348
356
|
}
|
|
349
357
|
let t = new Set(U.value);
|
|
@@ -354,19 +362,19 @@ var ke = {
|
|
|
354
362
|
count: n.length,
|
|
355
363
|
collapsed: t.has(e)
|
|
356
364
|
}));
|
|
357
|
-
}), G = s(() => !!D.groupBy),
|
|
358
|
-
function
|
|
365
|
+
}), G = s(() => !!D.groupBy), Dn = s(() => G.value ? En : void 0), On = s(() => new Map(W.value.map((e) => [e.groupKey, e]))), K = (e) => On.value.get(En(e)), q = s(() => G.value ? W.value.flatMap((e) => e.items) : D.crud.items.value), kn = s(() => W.value.filter((e) => !e.collapsed).map((e) => e.groupKey));
|
|
366
|
+
function An(e) {
|
|
359
367
|
let t = new Set(e ?? []), n = new Set(W.value.map((e) => e.groupKey));
|
|
360
368
|
U.value = [...U.value.filter((e) => !n.has(e)), ...W.value.filter((e) => !t.has(e.groupKey)).map((e) => e.groupKey)];
|
|
361
369
|
}
|
|
362
|
-
function
|
|
370
|
+
function jn(e) {
|
|
363
371
|
U.value = U.value.includes(e) ? U.value.filter((t) => t !== e) : [...U.value, e];
|
|
364
372
|
}
|
|
365
|
-
function
|
|
373
|
+
function Mn(e) {
|
|
366
374
|
let t = W.value.map((e) => e.groupKey), n = U.value.filter((e) => !t.includes(e));
|
|
367
375
|
U.value = e ? [...n, ...t] : n;
|
|
368
376
|
}
|
|
369
|
-
let
|
|
377
|
+
let Nn = s(() => {
|
|
370
378
|
if (!G.value) return [{
|
|
371
379
|
group: null,
|
|
372
380
|
items: q.value,
|
|
@@ -381,39 +389,39 @@ var ke = {
|
|
|
381
389
|
};
|
|
382
390
|
return e += t.count, n;
|
|
383
391
|
});
|
|
384
|
-
}), J = s(() => D.crud.config.selectionMode === "multiple"),
|
|
385
|
-
function
|
|
392
|
+
}), J = s(() => D.crud.config.selectionMode === "multiple"), Pn = (e) => e[D.crud.config.pk || "id"], Fn = (e) => D.crud.selectedItems.value.some((t) => Pn(t) === Pn(e));
|
|
393
|
+
function In(e) {
|
|
386
394
|
let t = D.crud.selectedItems.value;
|
|
387
|
-
D.crud.selectedItems.value =
|
|
395
|
+
D.crud.selectedItems.value = Fn(e) ? t.filter((t) => Pn(t) !== Pn(e)) : [...t, e];
|
|
388
396
|
}
|
|
389
|
-
let
|
|
390
|
-
function
|
|
397
|
+
let Ln = v(null);
|
|
398
|
+
function Rn(e) {
|
|
391
399
|
let t = D.crud.config.pk || "id", n = q.value.find((n) => n[t] === e);
|
|
392
400
|
if (!n) return;
|
|
393
401
|
let r = () => {
|
|
394
|
-
let e = q.value.filter((e) => !K(e)?.collapsed), t = (
|
|
402
|
+
let e = q.value.filter((e) => !K(e)?.collapsed), t = (Ln.value?.$el)?.querySelectorAll("tbody > tr:not(.p-datatable-row-group-header)");
|
|
395
403
|
t && t.length === e.length && t[e.indexOf(n)]?.scrollIntoView({
|
|
396
404
|
block: "nearest",
|
|
397
405
|
behavior: "smooth"
|
|
398
406
|
});
|
|
399
407
|
}, i = K(n);
|
|
400
|
-
i?.collapsed ? (
|
|
408
|
+
i?.collapsed ? (jn(i.groupKey), fe(r)) : r();
|
|
401
409
|
}
|
|
402
|
-
|
|
403
|
-
let
|
|
410
|
+
ue({ scrollToRow: Rn });
|
|
411
|
+
let zn = s(() => D.crud.config.editMode === "cell"), Bn = s(() => new Map(D.crud.config.form.map((e) => [e.field, e]))), Vn = [
|
|
404
412
|
"text",
|
|
405
413
|
"email",
|
|
406
414
|
"number",
|
|
407
415
|
"currency"
|
|
408
416
|
];
|
|
409
|
-
function
|
|
410
|
-
let t =
|
|
411
|
-
return t &&
|
|
417
|
+
function Hn(e) {
|
|
418
|
+
let t = Bn.value.get(e);
|
|
419
|
+
return t && Vn.includes(t.type || "text") ? t : void 0;
|
|
412
420
|
}
|
|
413
|
-
function
|
|
421
|
+
function Un(e) {
|
|
414
422
|
e.newValue !== (e.value ?? e.data[e.field]) && D.crud.updateField(e.data, e.field, e.newValue);
|
|
415
423
|
}
|
|
416
|
-
let
|
|
424
|
+
let Wn = s(() => D.crud.config.columns.filter((e) => e.filter)), Gn = [{
|
|
417
425
|
label: "Sim",
|
|
418
426
|
value: !0
|
|
419
427
|
}, {
|
|
@@ -423,28 +431,28 @@ var ke = {
|
|
|
423
431
|
function Y(e) {
|
|
424
432
|
return e.filter?.param || e.field;
|
|
425
433
|
}
|
|
426
|
-
let
|
|
427
|
-
function
|
|
434
|
+
let Kn = {};
|
|
435
|
+
function qn(e, t) {
|
|
428
436
|
let n = Y(e);
|
|
429
|
-
|
|
437
|
+
Kn[n] && clearTimeout(Kn[n]), Kn[n] = setTimeout(() => D.crud.setColumnFilter(n, t || null), 300);
|
|
430
438
|
}
|
|
431
|
-
let
|
|
432
|
-
function
|
|
439
|
+
let Jn = v(null);
|
|
440
|
+
function Yn(e) {
|
|
433
441
|
H.value = e;
|
|
434
442
|
}
|
|
435
|
-
let
|
|
436
|
-
function
|
|
443
|
+
let Xn = s(() => D.crud.config.openOnRowClick === !0);
|
|
444
|
+
function Zn(e) {
|
|
437
445
|
let t = e.target;
|
|
438
446
|
return t instanceof Element && t.closest("button,a,input,select,textarea,label,[role=\"button\"],[role=\"checkbox\"],[role=\"menu\"],[role=\"menuitem\"],[contenteditable],[data-p-selection-column=\"true\"],[data-p-cell-editing=\"true\"]") !== null;
|
|
439
447
|
}
|
|
440
|
-
let
|
|
441
|
-
function
|
|
442
|
-
if (D.crud.config.canEdit === !1 || D.crud.dialogVisible.value ||
|
|
448
|
+
let Qn = !1;
|
|
449
|
+
function $n(e) {
|
|
450
|
+
if (D.crud.config.canEdit === !1 || D.crud.dialogVisible.value || Qn) return;
|
|
443
451
|
let t = D.crud.openEditDialog(e);
|
|
444
|
-
t && (
|
|
452
|
+
t && (Qn = !0, t.finally(() => Qn = !1));
|
|
445
453
|
}
|
|
446
|
-
function
|
|
447
|
-
|
|
454
|
+
function er(e, t) {
|
|
455
|
+
Zn(e) || e instanceof KeyboardEvent && e.key !== "Enter" || (O("row-click", t), Xn.value || (H.value = t), Xn.value && !zn.value && $n(t));
|
|
448
456
|
}
|
|
449
457
|
C(() => D.crud.selectedItems.value, () => {
|
|
450
458
|
J.value && H.value && (H.value = null);
|
|
@@ -460,26 +468,26 @@ var ke = {
|
|
|
460
468
|
let n = D.crud.config.pk || "id", r = e.find((e) => e[n] === t[n]);
|
|
461
469
|
H.value = r ?? null;
|
|
462
470
|
});
|
|
463
|
-
function
|
|
471
|
+
function tr(e) {
|
|
464
472
|
let t = D.crud.config.pk || "id";
|
|
465
473
|
return J.value && H.value?.[t] === e[t] ? "p-datatable-row-selected" : void 0;
|
|
466
474
|
}
|
|
467
|
-
function
|
|
468
|
-
|
|
475
|
+
function nr(e) {
|
|
476
|
+
er(e.originalEvent, e.data);
|
|
469
477
|
}
|
|
470
|
-
function
|
|
471
|
-
D.cardBare || (
|
|
478
|
+
function rr(e, t) {
|
|
479
|
+
D.cardBare || (Yn(t), er(e, t));
|
|
472
480
|
}
|
|
473
|
-
function
|
|
474
|
-
D.cardBare ||
|
|
481
|
+
function ir(e) {
|
|
482
|
+
D.cardBare || Xn.value || $n(e);
|
|
475
483
|
}
|
|
476
|
-
function
|
|
477
|
-
D.contextMenu && (H.value = e.data,
|
|
484
|
+
function ar(e) {
|
|
485
|
+
D.contextMenu && (H.value = e.data, Jn.value?.show(e.originalEvent));
|
|
478
486
|
}
|
|
479
|
-
function
|
|
480
|
-
D.contextMenu && (e.preventDefault(), H.value = t,
|
|
487
|
+
function or(e, t) {
|
|
488
|
+
D.contextMenu && (e.preventDefault(), H.value = t, Jn.value?.show(e));
|
|
481
489
|
}
|
|
482
|
-
let
|
|
490
|
+
let sr = s(() => {
|
|
483
491
|
let e = H.value;
|
|
484
492
|
if (!e) return [];
|
|
485
493
|
let t = [{
|
|
@@ -487,12 +495,12 @@ var ke = {
|
|
|
487
495
|
icon: "pi pi-eye",
|
|
488
496
|
command: () => D.crud.openViewDialog(e)
|
|
489
497
|
}];
|
|
490
|
-
for (let n of
|
|
491
|
-
label:
|
|
498
|
+
for (let n of M.value) R(n, e) && t.push({
|
|
499
|
+
label: fn(n),
|
|
492
500
|
icon: n.icon,
|
|
493
501
|
class: n.severity === "danger" ? "w-crud-ctx-danger" : void 0,
|
|
494
|
-
disabled:
|
|
495
|
-
command: () =>
|
|
502
|
+
disabled: z(n, e),
|
|
503
|
+
command: () => F(n, e)
|
|
496
504
|
});
|
|
497
505
|
return D.showPrint && t.push({
|
|
498
506
|
label: "Imprimir",
|
|
@@ -501,49 +509,75 @@ var ke = {
|
|
|
501
509
|
}), D.exportCsv && (t.push({ separator: !0 }), t.push({
|
|
502
510
|
label: D.csvScope === "all" ? "Exportar tudo (CSV)" : "Exportar página (CSV)",
|
|
503
511
|
icon: "pi pi-download",
|
|
504
|
-
command: () =>
|
|
512
|
+
command: () => Q()
|
|
505
513
|
})), t;
|
|
514
|
+
}), cr = s(() => {
|
|
515
|
+
let e = X.value, t = [];
|
|
516
|
+
B.value && t.push({
|
|
517
|
+
label: "Novo",
|
|
518
|
+
icon: "pi pi-plus",
|
|
519
|
+
command: () => D.crud.openCreateDialog()
|
|
520
|
+
});
|
|
521
|
+
let n = M.value.filter((t) => !e || R(t, e));
|
|
522
|
+
t.length && n.length && t.push({ separator: !0 });
|
|
523
|
+
for (let r of n) t.push({
|
|
524
|
+
label: fn(r),
|
|
525
|
+
icon: r.icon,
|
|
526
|
+
class: r.severity === "danger" ? "w-crud-ctx-danger" : void 0,
|
|
527
|
+
disabled: !e || z(r, e),
|
|
528
|
+
command: () => e && F(r, e)
|
|
529
|
+
});
|
|
530
|
+
return t.length && (D.showPrint || D.exportCsv) && t.push({ separator: !0 }), D.showPrint && t.push({
|
|
531
|
+
label: "Imprimir",
|
|
532
|
+
icon: "pi pi-print",
|
|
533
|
+
disabled: !e,
|
|
534
|
+
command: () => lr()
|
|
535
|
+
}), D.exportCsv && t.push({
|
|
536
|
+
label: P.value,
|
|
537
|
+
icon: "pi pi-download",
|
|
538
|
+
command: () => Q()
|
|
539
|
+
}), t;
|
|
506
540
|
});
|
|
507
|
-
function
|
|
541
|
+
function lr() {
|
|
508
542
|
X.value && O("print", X.value);
|
|
509
543
|
}
|
|
510
544
|
let Z = v(!1);
|
|
511
|
-
async function
|
|
545
|
+
async function Q() {
|
|
512
546
|
if (!Z.value) {
|
|
513
547
|
Z.value = !0;
|
|
514
548
|
try {
|
|
515
|
-
let e = D.csvScope === "page" ? D.crud.items.value : await D.crud.fetchAll(D.csvPageSize), t =
|
|
516
|
-
|
|
549
|
+
let e = D.csvScope === "page" ? D.crud.items.value : await D.crud.fetchAll(D.csvPageSize), t = se(e, j.value);
|
|
550
|
+
oe(t, D.csvFilename);
|
|
517
551
|
} finally {
|
|
518
552
|
Z.value = !1;
|
|
519
553
|
}
|
|
520
554
|
}
|
|
521
555
|
}
|
|
522
|
-
function
|
|
556
|
+
function ur(e) {
|
|
523
557
|
if (!e) return;
|
|
524
558
|
let t = /(?:^|;)\s*min-width\s*:\s*([^;!]+)/i.exec(e)?.[1], n = /(?:^|;)\s*width\s*:\s*([^;!]+)/i.exec(e)?.[1];
|
|
525
559
|
return (t ?? n)?.trim();
|
|
526
560
|
}
|
|
527
|
-
let
|
|
528
|
-
function
|
|
529
|
-
return [
|
|
561
|
+
let dr = s(() => (j.value.find((e) => !ur(e.style)) ?? j.value[0])?.field);
|
|
562
|
+
function fr(e) {
|
|
563
|
+
return [on(e), e.field === dr.value ? "w-crud-col-title" : ""].filter(Boolean).join(" ");
|
|
530
564
|
}
|
|
531
|
-
let
|
|
565
|
+
let pr = s(() => {
|
|
532
566
|
let e = [];
|
|
533
567
|
J.value && e.push("var(--w-col-narrow)"), D.expandable && e.push("var(--w-col-narrow)");
|
|
534
|
-
for (let t of
|
|
535
|
-
let n =
|
|
536
|
-
t.field ===
|
|
568
|
+
for (let t of j.value) {
|
|
569
|
+
let n = ur(t.style);
|
|
570
|
+
t.field === dr.value ? n ? e.push(`max(var(--w-col-title-min), ${n})`) : e.push("var(--w-col-title-min)") : e.push(n ?? "var(--w-col-min)");
|
|
537
571
|
}
|
|
538
|
-
return
|
|
539
|
-
}),
|
|
572
|
+
return un.value && !D.actionRail && e.push(dn.value), e.length ? `calc(${e.join(" + ")})` : void 0;
|
|
573
|
+
}), mr = s(() => pr.value ? { "--w-crud-min": pr.value } : void 0), hr = s(() => ({
|
|
540
574
|
pcPaginator: { root: { class: "w-crud-paginator" } },
|
|
541
|
-
...G.value ? { rowGroupHeaderCell: { colspan: +!!J.value + +!!D.expandable +
|
|
542
|
-
})),
|
|
543
|
-
function
|
|
544
|
-
return
|
|
575
|
+
...G.value ? { rowGroupHeaderCell: { colspan: +!!J.value + +!!D.expandable + j.value.length + (un.value && !D.actionRail ? 1 : 0) } } : {}
|
|
576
|
+
})), gr = le()?.vnode.props ?? {}, _r = "urlState" in gr || "url-state" in gr, $ = D.urlState ? ee(typeof D.urlState == "string" ? D.urlState : "", _r) : null, vr = "onUpdate:selectedRow" in gr || "onUpdate:selected-row" in gr, yr = null;
|
|
577
|
+
function br() {
|
|
578
|
+
return Wn.value;
|
|
545
579
|
}
|
|
546
|
-
function
|
|
580
|
+
function xr(e) {
|
|
547
581
|
return Array.isArray(e) ? e.length && e.every((e) => [
|
|
548
582
|
"string",
|
|
549
583
|
"number",
|
|
@@ -554,7 +588,7 @@ var ke = {
|
|
|
554
588
|
"boolean"
|
|
555
589
|
].includes(typeof e) && e !== "" ? String(e) : null;
|
|
556
590
|
}
|
|
557
|
-
function
|
|
591
|
+
function Sr(e, t) {
|
|
558
592
|
let n = e.filter?.type || "text";
|
|
559
593
|
if (n === "numeric") return Number.isNaN(Number(t)) ? void 0 : Number(t);
|
|
560
594
|
if (n === "boolean") return t === "true" || t !== "false" && void 0;
|
|
@@ -566,87 +600,90 @@ var ke = {
|
|
|
566
600
|
}
|
|
567
601
|
return t;
|
|
568
602
|
}
|
|
569
|
-
function
|
|
570
|
-
if (
|
|
571
|
-
let e = D.crud, t =
|
|
603
|
+
function Cr() {
|
|
604
|
+
if (!$) return;
|
|
605
|
+
let e = D.crud, t = $.get("search");
|
|
572
606
|
t && (e.search.value = t);
|
|
573
|
-
for (let t of
|
|
574
|
-
let n =
|
|
607
|
+
for (let t of br()) {
|
|
608
|
+
let n = $.get(`f_${Y(t)}`), r = n === void 0 ? void 0 : Sr(t, n);
|
|
575
609
|
r !== void 0 && (e.columnFilters[Y(t)] = r);
|
|
576
610
|
}
|
|
577
|
-
let n = Number(
|
|
611
|
+
let n = Number($.get("page"));
|
|
578
612
|
Number.isInteger(n) && n > 1 && (e.pagination.page = n);
|
|
579
|
-
let r =
|
|
613
|
+
let r = $.get("sort");
|
|
580
614
|
if (r) {
|
|
581
615
|
let t = r.startsWith("-"), n = t ? r.slice(1) : r;
|
|
582
616
|
e.config.columns.some((e) => e.sortable && (e.sortField || e.field) === n) && (e.sort.field = n, e.sort.order = t ? -1 : 1);
|
|
583
617
|
}
|
|
584
|
-
|
|
618
|
+
vr && (yr = $.get("id") ?? null);
|
|
585
619
|
}
|
|
586
|
-
function
|
|
587
|
-
return
|
|
620
|
+
function wr() {
|
|
621
|
+
return !!$ && ($.get("search") !== void 0 || br().some((e) => $.get(`f_${Y(e)}`) !== void 0));
|
|
588
622
|
}
|
|
589
|
-
function
|
|
590
|
-
if (
|
|
623
|
+
function Tr() {
|
|
624
|
+
if (!$) return;
|
|
591
625
|
let e = D.crud, t = {
|
|
592
626
|
search: e.search.value || null,
|
|
593
627
|
page: e.pagination.page > 1 ? String(e.pagination.page) : null,
|
|
594
628
|
sort: e.sort.field && e.sort.order !== 0 ? `${e.sort.order === -1 ? "-" : ""}${e.sort.field}` : null
|
|
595
629
|
};
|
|
596
|
-
for (let n of
|
|
597
|
-
if (
|
|
630
|
+
for (let n of br()) t[`f_${Y(n)}`] = xr(e.columnFilters[Y(n)]);
|
|
631
|
+
if (vr && yr === null) {
|
|
598
632
|
let n = H.value?.[e.config.pk || "id"];
|
|
599
633
|
t.id = n == null ? null : String(n);
|
|
600
634
|
}
|
|
601
|
-
|
|
635
|
+
$.write(t);
|
|
602
636
|
}
|
|
603
|
-
return
|
|
637
|
+
return $ && (C(() => [
|
|
604
638
|
D.crud.search.value,
|
|
605
639
|
D.crud.pagination.page,
|
|
606
640
|
D.crud.sort.field,
|
|
607
641
|
D.crud.sort.order,
|
|
608
642
|
JSON.stringify(D.crud.columnFilters),
|
|
609
643
|
H.value
|
|
610
|
-
],
|
|
611
|
-
if (
|
|
612
|
-
let t = D.crud.config.pk || "id", n = e.find((e) => String(e[t]) ===
|
|
613
|
-
|
|
614
|
-
})),
|
|
615
|
-
|
|
644
|
+
], Tr), C(() => D.crud.items.value, (e) => {
|
|
645
|
+
if (yr === null) return;
|
|
646
|
+
let t = D.crud.config.pk || "id", n = e.find((e) => String(e[t]) === yr);
|
|
647
|
+
yr = null, H.value = n ?? null, Tr();
|
|
648
|
+
})), me(() => {
|
|
649
|
+
Bt.value = zt(), Qt(), wr() || tn(), Cr(), D.autoInit && D.crud.init();
|
|
616
650
|
}), (r, i) => {
|
|
617
|
-
let a =
|
|
618
|
-
return _(), u("div", { class: h(["w-crud", {
|
|
619
|
-
|
|
651
|
+
let a = ge("tooltip");
|
|
652
|
+
return _(), u("div", { class: h(["w-crud", {
|
|
653
|
+
"w-crud--composed": p.composed,
|
|
654
|
+
"w-crud--rail-menu": V.value
|
|
655
|
+
}]) }, [
|
|
656
|
+
p.showHeader ? (_(), u("div", Ae, [d("div", je, [d("div", Me, [d("h1", Ne, x(p.title), 1), bn.value ? (_(), u("span", {
|
|
620
657
|
key: 0,
|
|
621
658
|
class: "w-crud-count",
|
|
622
659
|
"aria-live": "polite",
|
|
623
660
|
"aria-busy": p.crud.loading.value || void 0
|
|
624
|
-
}, x(
|
|
661
|
+
}, x(yn.value), 9, Pe)) : l("", !0)]), p.subtitle ? (_(), u("p", Fe, x(p.subtitle), 1)) : l("", !0)]), d("div", Ie, [b(r.$slots, "header-actions"), B.value && !p.actionRail ? (_(), c(e, {
|
|
625
662
|
key: 0,
|
|
626
663
|
label: "Novo",
|
|
627
664
|
icon: "pi pi-plus",
|
|
628
665
|
onClick: i[0] ||= (e) => p.crud.openCreateDialog()
|
|
629
666
|
})) : l("", !0)])])) : l("", !0),
|
|
630
|
-
b(r.$slots, "before-table", {}, () => [
|
|
667
|
+
b(r.$slots, "before-table", {}, () => [Sn.value.length ? (_(), u("div", Le, [(_(!0), u(o, null, y(Sn.value, (e, t) => (_(), u("div", {
|
|
631
668
|
key: t,
|
|
632
669
|
class: "w-crud-kpi"
|
|
633
670
|
}, [d("div", { class: h(["w-crud-kpi-icon", e.severity ? `w-crud-kpi-icon--${e.severity}` : ""]) }, [d("i", {
|
|
634
671
|
class: h([e.icon]),
|
|
635
|
-
style:
|
|
636
|
-
}, null, 6)], 2), d("div",
|
|
637
|
-
d("div", { class: h(["w-crud-content", { "w-crud-content--rail":
|
|
672
|
+
style: pe(e.color ? `color: ${e.color}` : "")
|
|
673
|
+
}, null, 6)], 2), d("div", Re, [d("div", ze, x(e.label), 1), d("div", Be, x(e.value), 1)])]))), 128))])) : l("", !0)]),
|
|
674
|
+
d("div", { class: h(["w-crud-content", { "w-crud-content--rail": Cn.value && !V.value }]) }, [d("div", {
|
|
638
675
|
ref_key: "conteudo",
|
|
639
|
-
ref:
|
|
676
|
+
ref: Vt,
|
|
640
677
|
class: "w-crud-content-main"
|
|
641
|
-
}, [
|
|
678
|
+
}, [Ut ? (_(), u("div", Ve, [d("div", {
|
|
642
679
|
ref_key: "sonda",
|
|
643
|
-
ref:
|
|
644
|
-
style:
|
|
645
|
-
}, null, 4)])) : l("", !0),
|
|
680
|
+
ref: Ht,
|
|
681
|
+
style: pe({ width: pr.value ?? "0" })
|
|
682
|
+
}, null, 4)])) : l("", !0), k("table") ? (_(), u("div", {
|
|
646
683
|
key: 1,
|
|
647
684
|
class: h(["w-crud-table", { "w-crud-table--grouped": G.value }])
|
|
648
|
-
}, [J.value && p.crud.selectedItems.value.length ? (_(), u("div",
|
|
649
|
-
d("span",
|
|
685
|
+
}, [J.value && p.crud.selectedItems.value.length ? (_(), u("div", He, [
|
|
686
|
+
d("span", Ue, x(p.crud.selectedItems.value.length) + " selecionado(s) ", 1),
|
|
650
687
|
b(r.$slots, "bulk-actions", {
|
|
651
688
|
selected: p.crud.selectedItems.value,
|
|
652
689
|
crud: p.crud
|
|
@@ -678,20 +715,20 @@ var ke = {
|
|
|
678
715
|
void 0,
|
|
679
716
|
{ top: !0 }
|
|
680
717
|
]])
|
|
681
|
-
])) : l("", !0), f(S(
|
|
718
|
+
])) : l("", !0), f(S(xe), {
|
|
682
719
|
ref_key: "tableRef",
|
|
683
|
-
ref:
|
|
684
|
-
"expanded-rows":
|
|
685
|
-
"onUpdate:expandedRows": i[
|
|
720
|
+
ref: Ln,
|
|
721
|
+
"expanded-rows": Ft.value,
|
|
722
|
+
"onUpdate:expandedRows": i[10] ||= (e) => Ft.value = e,
|
|
686
723
|
value: q.value,
|
|
687
724
|
loading: p.skeleton ? p.crud.loading.value && !!q.value.length : p.crud.loading.value,
|
|
688
725
|
"row-group-mode": G.value ? "subheader" : void 0,
|
|
689
|
-
"group-rows-by":
|
|
726
|
+
"group-rows-by": Dn.value,
|
|
690
727
|
"expandable-row-groups": G.value,
|
|
691
|
-
"expanded-row-groups": G.value ?
|
|
728
|
+
"expanded-row-groups": G.value ? kn.value : void 0,
|
|
692
729
|
paginator: "",
|
|
693
730
|
rows: p.crud.pagination.pageSize,
|
|
694
|
-
first:
|
|
731
|
+
first: Yt.value,
|
|
695
732
|
"total-records": p.crud.pagination.rows,
|
|
696
733
|
"rows-per-page-options": [
|
|
697
734
|
10,
|
|
@@ -699,8 +736,8 @@ var ke = {
|
|
|
699
736
|
50
|
|
700
737
|
],
|
|
701
738
|
"paginator-template": "CurrentPageReport PrevPageLink NextPageLink",
|
|
702
|
-
"current-page-report-template":
|
|
703
|
-
pt:
|
|
739
|
+
"current-page-report-template": xn.value,
|
|
740
|
+
pt: hr.value,
|
|
704
741
|
lazy: "",
|
|
705
742
|
"striped-rows": "",
|
|
706
743
|
"removable-sort": "",
|
|
@@ -708,30 +745,30 @@ var ke = {
|
|
|
708
745
|
"sort-field": p.crud.sort.field ?? void 0,
|
|
709
746
|
"sort-order": p.crud.sort.order,
|
|
710
747
|
"data-key": p.crud.config.pk || "id",
|
|
711
|
-
"table-style":
|
|
712
|
-
"edit-mode":
|
|
748
|
+
"table-style": mr.value,
|
|
749
|
+
"edit-mode": zn.value ? "cell" : void 0,
|
|
713
750
|
selection: J.value ? p.crud.selectedItems.value : p.actionRail || p.contextMenu ? H.value : void 0,
|
|
714
751
|
"selection-mode": J.value ? void 0 : p.actionRail || p.contextMenu ? "single" : void 0,
|
|
715
752
|
"context-menu": p.contextMenu,
|
|
716
753
|
"context-menu-selection": p.contextMenu ? H.value : void 0,
|
|
717
|
-
"onUpdate:selection": i[
|
|
718
|
-
"onUpdate:contextMenuSelection": i[
|
|
719
|
-
"onUpdate:expandedRowGroups":
|
|
720
|
-
onRowContextmenu:
|
|
721
|
-
"row-class":
|
|
722
|
-
onRowClick:
|
|
754
|
+
"onUpdate:selection": i[11] ||= (e) => J.value ? p.crud.selectedItems.value = e : H.value = e,
|
|
755
|
+
"onUpdate:contextMenuSelection": i[12] ||= (e) => H.value = e,
|
|
756
|
+
"onUpdate:expandedRowGroups": An,
|
|
757
|
+
onRowContextmenu: ar,
|
|
758
|
+
"row-class": tr,
|
|
759
|
+
onRowClick: nr,
|
|
723
760
|
onPage: p.crud.onPage,
|
|
724
|
-
onSort: i[
|
|
761
|
+
onSort: i[13] ||= (e) => p.crud.onSort({
|
|
725
762
|
sortField: e.sortField,
|
|
726
763
|
sortOrder: e.sortOrder
|
|
727
764
|
}),
|
|
728
|
-
onRowExpand: i[
|
|
729
|
-
onRowCollapse: i[
|
|
730
|
-
onCellEditComplete:
|
|
731
|
-
},
|
|
732
|
-
header: w(() => [d("div",
|
|
733
|
-
p.showSearch ? (_(), c(S(
|
|
734
|
-
default: w(() => [f(S(
|
|
765
|
+
onRowExpand: i[14] ||= (e) => O("row-expand", e.data),
|
|
766
|
+
onRowCollapse: i[15] ||= (e) => O("row-collapse", e.data),
|
|
767
|
+
onCellEditComplete: Un
|
|
768
|
+
}, ce({
|
|
769
|
+
header: w(() => [d("div", We, [d("div", Ge, [
|
|
770
|
+
p.showSearch || V.value ? (_(), u("div", Ke, [p.showSearch ? (_(), c(S(Ee), { key: 0 }, {
|
|
771
|
+
default: w(() => [f(S(De), { class: "pi pi-search" }), f(S(E), {
|
|
735
772
|
"model-value": p.crud.search.value,
|
|
736
773
|
placeholder: "Buscar...",
|
|
737
774
|
"aria-label": "Buscar",
|
|
@@ -739,27 +776,38 @@ var ke = {
|
|
|
739
776
|
onInput: p.crud.onSearch
|
|
740
777
|
}, null, 8, ["model-value", "onInput"])]),
|
|
741
778
|
_: 1
|
|
742
|
-
})) : l("", !0),
|
|
743
|
-
|
|
779
|
+
})) : l("", !0), V.value ? (_(), u(o, { key: 1 }, [b(r.$slots, "rail-actions", {
|
|
780
|
+
selected: X.value,
|
|
781
|
+
crud: p.crud
|
|
782
|
+
}), f(e, {
|
|
783
|
+
variant: "ghost",
|
|
784
|
+
"icon-only": "",
|
|
785
|
+
icon: "pi pi-ellipsis-v",
|
|
786
|
+
"aria-label": "Ações",
|
|
787
|
+
"aria-haspopup": "menu",
|
|
788
|
+
class: "w-crud-rail-menu-btn",
|
|
789
|
+
onClick: i[2] ||= (e) => Tn.value?.toggle(e)
|
|
790
|
+
})], 64)) : l("", !0)])) : l("", !0),
|
|
791
|
+
!p.showHeader && bn.value ? (_(), u("span", {
|
|
744
792
|
key: 1,
|
|
745
793
|
class: "w-crud-count",
|
|
746
794
|
"aria-live": "polite",
|
|
747
795
|
"aria-busy": p.crud.loading.value || void 0
|
|
748
|
-
}, x(
|
|
796
|
+
}, x(yn.value), 9, qe)) : l("", !0),
|
|
749
797
|
b(r.$slots, "toolbar-start"),
|
|
750
|
-
(_(!0), u(o, null, y(
|
|
798
|
+
(_(!0), u(o, null, y(Wn.value, (e) => (_(), u(o, { key: e.field }, [(e.filter?.type || "text") === "text" ? (_(), c(S(E), {
|
|
751
799
|
key: 0,
|
|
752
800
|
"model-value": p.crud.columnFilters[Y(e)] ?? "",
|
|
753
801
|
placeholder: e.filter?.placeholder || e.header,
|
|
754
802
|
"aria-label": e.filter?.placeholder || e.header,
|
|
755
803
|
size: "small",
|
|
756
|
-
onInput: (t) =>
|
|
804
|
+
onInput: (t) => qn(e, t.target.value)
|
|
757
805
|
}, null, 8, [
|
|
758
806
|
"model-value",
|
|
759
807
|
"placeholder",
|
|
760
808
|
"aria-label",
|
|
761
809
|
"onInput"
|
|
762
|
-
])) : e.filter?.type === "select" ? (_(), c(S(
|
|
810
|
+
])) : e.filter?.type === "select" ? (_(), c(S(we), {
|
|
763
811
|
key: 1,
|
|
764
812
|
"model-value": p.crud.columnFilters[Y(e)],
|
|
765
813
|
options: e.filter?.options,
|
|
@@ -776,10 +824,10 @@ var ke = {
|
|
|
776
824
|
"placeholder",
|
|
777
825
|
"aria-label",
|
|
778
826
|
"onUpdate:modelValue"
|
|
779
|
-
])) : e.filter?.type === "boolean" ? (_(), c(S(
|
|
827
|
+
])) : e.filter?.type === "boolean" ? (_(), c(S(we), {
|
|
780
828
|
key: 2,
|
|
781
829
|
"model-value": p.crud.columnFilters[Y(e)],
|
|
782
|
-
options:
|
|
830
|
+
options: Gn,
|
|
783
831
|
"option-label": "label",
|
|
784
832
|
"option-value": "value",
|
|
785
833
|
placeholder: e.filter?.placeholder || e.header,
|
|
@@ -792,7 +840,7 @@ var ke = {
|
|
|
792
840
|
"placeholder",
|
|
793
841
|
"aria-label",
|
|
794
842
|
"onUpdate:modelValue"
|
|
795
|
-
])) : e.filter?.type === "numeric" ? (_(), c(S(
|
|
843
|
+
])) : e.filter?.type === "numeric" ? (_(), c(S(Ce), {
|
|
796
844
|
key: 3,
|
|
797
845
|
"model-value": p.crud.columnFilters[Y(e)] ?? null,
|
|
798
846
|
placeholder: e.filter?.placeholder || e.header,
|
|
@@ -812,9 +860,9 @@ var ke = {
|
|
|
812
860
|
label: "Limpar filtros",
|
|
813
861
|
icon: "pi pi-filter-slash",
|
|
814
862
|
size: "sm",
|
|
815
|
-
onClick: i[
|
|
863
|
+
onClick: i[3] ||= (e) => p.crud.clearColumnFilters()
|
|
816
864
|
})) : l("", !0)
|
|
817
|
-
]), d("div",
|
|
865
|
+
]), d("div", Je, [
|
|
818
866
|
b(r.$slots, "toolbar-actions"),
|
|
819
867
|
W.value.length > 1 ? (_(), u(o, { key: 0 }, [T(f(e, {
|
|
820
868
|
variant: "ghost",
|
|
@@ -822,7 +870,7 @@ var ke = {
|
|
|
822
870
|
icon: "pi pi-angle-double-down",
|
|
823
871
|
"aria-label": "Expandir grupos",
|
|
824
872
|
size: "sm",
|
|
825
|
-
onClick: i[
|
|
873
|
+
onClick: i[4] ||= (e) => Mn(!1)
|
|
826
874
|
}, null, 512), [[
|
|
827
875
|
a,
|
|
828
876
|
"Expandir grupos",
|
|
@@ -834,7 +882,7 @@ var ke = {
|
|
|
834
882
|
icon: "pi pi-angle-double-up",
|
|
835
883
|
"aria-label": "Recolher grupos",
|
|
836
884
|
size: "sm",
|
|
837
|
-
onClick: i[
|
|
885
|
+
onClick: i[5] ||= (e) => Mn(!0)
|
|
838
886
|
}, null, 512), [[
|
|
839
887
|
a,
|
|
840
888
|
"Recolher grupos",
|
|
@@ -848,7 +896,7 @@ var ke = {
|
|
|
848
896
|
"aria-label": "Colunas",
|
|
849
897
|
"aria-haspopup": "dialog",
|
|
850
898
|
size: "sm",
|
|
851
|
-
onClick: i[
|
|
899
|
+
onClick: i[6] ||= (e) => Xt.value?.toggle(e)
|
|
852
900
|
}, null, 512), [[
|
|
853
901
|
a,
|
|
854
902
|
"Colunas",
|
|
@@ -856,16 +904,16 @@ var ke = {
|
|
|
856
904
|
{ top: !0 }
|
|
857
905
|
]]), f(t, {
|
|
858
906
|
ref_key: "chooser",
|
|
859
|
-
ref:
|
|
907
|
+
ref: Xt
|
|
860
908
|
}, {
|
|
861
|
-
default: w(() => [d("div",
|
|
909
|
+
default: w(() => [d("div", Ye, [(_(!0), u(o, null, y(rn.value, (e) => (_(), u("div", {
|
|
862
910
|
key: e.field,
|
|
863
911
|
class: "w-crud-chooser__item"
|
|
864
|
-
}, [f(S(
|
|
865
|
-
"model-value": !
|
|
912
|
+
}, [f(S(Te), {
|
|
913
|
+
"model-value": !A.hidden.includes(e.field),
|
|
866
914
|
"input-id": `wcrud-col-${e.field}`,
|
|
867
915
|
binary: "",
|
|
868
|
-
"onUpdate:modelValue": (t) =>
|
|
916
|
+
"onUpdate:modelValue": (t) => an(e.field, !!t)
|
|
869
917
|
}, null, 8, [
|
|
870
918
|
"model-value",
|
|
871
919
|
"input-id",
|
|
@@ -873,32 +921,32 @@ var ke = {
|
|
|
873
921
|
]), d("label", {
|
|
874
922
|
for: `wcrud-col-${e.field}`,
|
|
875
923
|
class: "w-crud-chooser__label"
|
|
876
|
-
}, x(e.header), 9,
|
|
924
|
+
}, x(e.header), 9, Xe)]))), 128))])]),
|
|
877
925
|
_: 1
|
|
878
926
|
}, 512)], 64)) : l("", !0),
|
|
879
|
-
p.exportCsv ? T((_(), c(e, {
|
|
927
|
+
p.exportCsv && !V.value ? T((_(), c(e, {
|
|
880
928
|
key: 2,
|
|
881
929
|
variant: "ghost",
|
|
882
930
|
"icon-only": "",
|
|
883
931
|
icon: "pi pi-download",
|
|
884
|
-
"aria-label":
|
|
932
|
+
"aria-label": P.value,
|
|
885
933
|
size: "sm",
|
|
886
934
|
loading: Z.value,
|
|
887
|
-
onClick:
|
|
935
|
+
onClick: Q
|
|
888
936
|
}, null, 8, ["aria-label", "loading"])), [[
|
|
889
937
|
a,
|
|
890
|
-
|
|
938
|
+
P.value,
|
|
891
939
|
void 0,
|
|
892
940
|
{ top: !0 }
|
|
893
941
|
]]) : l("", !0),
|
|
894
|
-
|
|
942
|
+
qt.value ? (_(), u("div", Ze, [T(f(e, {
|
|
895
943
|
"icon-only": "",
|
|
896
944
|
icon: "pi pi-table",
|
|
897
945
|
"aria-label": "Ver como tabela",
|
|
898
|
-
"aria-pressed":
|
|
946
|
+
"aria-pressed": k("table"),
|
|
899
947
|
size: "sm",
|
|
900
|
-
variant:
|
|
901
|
-
onClick: i[
|
|
948
|
+
variant: k("table") ? "secondary" : "ghost",
|
|
949
|
+
onClick: i[7] ||= (e) => Jt("table")
|
|
902
950
|
}, null, 8, ["aria-pressed", "variant"]), [[
|
|
903
951
|
a,
|
|
904
952
|
"Ver como tabela",
|
|
@@ -908,57 +956,57 @@ var ke = {
|
|
|
908
956
|
"icon-only": "",
|
|
909
957
|
icon: "pi pi-th-large",
|
|
910
958
|
"aria-label": "Ver como cards",
|
|
911
|
-
"aria-pressed":
|
|
959
|
+
"aria-pressed": k("cards"),
|
|
912
960
|
size: "sm",
|
|
913
|
-
variant:
|
|
914
|
-
onClick: i[
|
|
961
|
+
variant: k("cards") ? "secondary" : "ghost",
|
|
962
|
+
onClick: i[8] ||= (e) => Jt("cards")
|
|
915
963
|
}, null, 8, ["aria-pressed", "variant"]), [[
|
|
916
964
|
a,
|
|
917
965
|
"Ver como cards",
|
|
918
966
|
void 0,
|
|
919
967
|
{ top: !0 }
|
|
920
968
|
]])])) : l("", !0),
|
|
921
|
-
!p.showHeader &&
|
|
969
|
+
!p.showHeader && B.value && !p.actionRail ? (_(), c(e, {
|
|
922
970
|
key: 4,
|
|
923
971
|
label: "Novo",
|
|
924
972
|
icon: "pi pi-plus",
|
|
925
|
-
onClick: i[
|
|
973
|
+
onClick: i[9] ||= (e) => p.crud.openCreateDialog()
|
|
926
974
|
})) : l("", !0)
|
|
927
975
|
])])]),
|
|
928
|
-
empty: w(() => [p.skeleton && p.crud.loading.value ? T((_(), c(
|
|
976
|
+
empty: w(() => [p.skeleton && p.crud.loading.value ? T((_(), c(ne, {
|
|
929
977
|
key: 0,
|
|
930
978
|
variant: "rows",
|
|
931
979
|
count: Math.min(p.crud.pagination.pageSize, 8)
|
|
932
|
-
}, null, 8, ["count"])), [[
|
|
933
|
-
i[
|
|
934
|
-
i[
|
|
935
|
-
d("p",
|
|
980
|
+
}, null, 8, ["count"])), [[ye, S(Pt)]]) : b(r.$slots, "empty", {}, () => [d("div", Qe, [
|
|
981
|
+
i[29] ||= d("div", { class: "w-crud-empty-icon" }, [d("i", { class: "pi pi-inbox" })], -1),
|
|
982
|
+
i[30] ||= d("p", { class: "w-crud-empty-title" }, "Nenhum registro encontrado", -1),
|
|
983
|
+
d("p", $e, " Tente ajustar sua busca" + x(B.value ? " ou crie um novo registro" : ""), 1)
|
|
936
984
|
])], void 0, 1)]),
|
|
937
985
|
default: w(() => [
|
|
938
|
-
J.value ? (_(), c(S(
|
|
986
|
+
J.value ? (_(), c(S(Se), {
|
|
939
987
|
key: 0,
|
|
940
988
|
"selection-mode": "multiple",
|
|
941
989
|
class: "w-col-narrow"
|
|
942
990
|
})) : l("", !0),
|
|
943
|
-
p.expandable ? (_(), c(S(
|
|
991
|
+
p.expandable ? (_(), c(S(Se), {
|
|
944
992
|
key: 1,
|
|
945
993
|
expander: "",
|
|
946
994
|
class: "w-col-narrow"
|
|
947
995
|
})) : l("", !0),
|
|
948
|
-
(_(!0), u(o, null, y(
|
|
996
|
+
(_(!0), u(o, null, y(j.value, (e) => (_(), c(S(Se), {
|
|
949
997
|
key: e.field,
|
|
950
998
|
field: e.field,
|
|
951
999
|
header: e.header,
|
|
952
1000
|
sortable: e.sortable,
|
|
953
1001
|
"sort-field": e.sortField,
|
|
954
|
-
style:
|
|
955
|
-
"header-class":
|
|
956
|
-
"body-class":
|
|
957
|
-
},
|
|
1002
|
+
style: pe(e.style),
|
|
1003
|
+
"header-class": fr(e),
|
|
1004
|
+
"body-class": fr(e)
|
|
1005
|
+
}, ce({
|
|
958
1006
|
body: w(({ data: t }) => [b(r.$slots, `column-${e.field}`, {
|
|
959
1007
|
data: t,
|
|
960
1008
|
value: t[e.field]
|
|
961
|
-
}, () => [f(
|
|
1009
|
+
}, () => [f(re, {
|
|
962
1010
|
column: e,
|
|
963
1011
|
value: t[e.field],
|
|
964
1012
|
"row-data": t
|
|
@@ -968,9 +1016,9 @@ var ke = {
|
|
|
968
1016
|
"row-data"
|
|
969
1017
|
])])]),
|
|
970
1018
|
_: 2
|
|
971
|
-
}, [
|
|
1019
|
+
}, [zn.value && Hn(e.field) ? {
|
|
972
1020
|
name: "editor",
|
|
973
|
-
fn: w(({ data: t }) => [["number", "currency"].includes(
|
|
1021
|
+
fn: w(({ data: t }) => [["number", "currency"].includes(Hn(e.field)?.type || "") ? (_(), c(S(Ce), {
|
|
974
1022
|
key: 0,
|
|
975
1023
|
"model-value": t[e.field] ?? null,
|
|
976
1024
|
fluid: "",
|
|
@@ -995,21 +1043,21 @@ var ke = {
|
|
|
995
1043
|
"header-class",
|
|
996
1044
|
"body-class"
|
|
997
1045
|
]))), 128)),
|
|
998
|
-
|
|
1046
|
+
un.value && !p.actionRail ? (_(), c(S(Se), {
|
|
999
1047
|
key: 2,
|
|
1000
1048
|
"header-class": "w-crud-actions-header",
|
|
1001
|
-
style:
|
|
1049
|
+
style: pe({ width: dn.value })
|
|
1002
1050
|
}, {
|
|
1003
|
-
body: w(({ data: t }) => [d("div",
|
|
1051
|
+
body: w(({ data: t }) => [d("div", rt, [(_(!0), u(o, null, y(M.value, (n) => (_(), u(o, { key: n.action }, [R(n, t) ? T((_(), c(e, {
|
|
1004
1052
|
key: 0,
|
|
1005
1053
|
"icon-only": "",
|
|
1006
1054
|
icon: n.icon,
|
|
1007
|
-
"aria-label":
|
|
1008
|
-
title: n.disabledReason ?
|
|
1055
|
+
"aria-label": N(n, t),
|
|
1056
|
+
title: n.disabledReason ? N(n, t) : void 0,
|
|
1009
1057
|
size: "sm",
|
|
1010
1058
|
variant: n.severity === "danger" ? "danger" : "ghost",
|
|
1011
|
-
disabled:
|
|
1012
|
-
onClick: (e) =>
|
|
1059
|
+
disabled: z(n, t),
|
|
1060
|
+
onClick: (e) => F(n, t)
|
|
1013
1061
|
}, null, 8, [
|
|
1014
1062
|
"icon",
|
|
1015
1063
|
"aria-label",
|
|
@@ -1019,7 +1067,7 @@ var ke = {
|
|
|
1019
1067
|
"onClick"
|
|
1020
1068
|
])), [[
|
|
1021
1069
|
a,
|
|
1022
|
-
n.disabledReason ?
|
|
1070
|
+
n.disabledReason ? N(n, t) : n.tooltip,
|
|
1023
1071
|
void 0,
|
|
1024
1072
|
{ top: !0 }
|
|
1025
1073
|
]]) : l("", !0)], 64))), 128)), b(r.$slots, "row-actions", {
|
|
@@ -1032,7 +1080,7 @@ var ke = {
|
|
|
1032
1080
|
_: 2
|
|
1033
1081
|
}, [G.value ? {
|
|
1034
1082
|
name: "groupheader",
|
|
1035
|
-
fn: w(({ data: e }) => [K(e) ? (_(), u("span",
|
|
1083
|
+
fn: w(({ data: e }) => [K(e) ? (_(), u("span", et, [b(r.$slots, "group-header", g(m(K(e))), () => [d("span", tt, x(K(e).label), 1)]), d("span", nt, [b(r.$slots, "group-meta", g(m(K(e))), () => [f(S(ke), {
|
|
1036
1084
|
value: String(K(e).count),
|
|
1037
1085
|
severity: "secondary",
|
|
1038
1086
|
rounded: ""
|
|
@@ -1065,10 +1113,10 @@ var ke = {
|
|
|
1065
1113
|
"context-menu",
|
|
1066
1114
|
"context-menu-selection",
|
|
1067
1115
|
"onPage"
|
|
1068
|
-
])], 2)) : (_(), u("div",
|
|
1069
|
-
d("div",
|
|
1070
|
-
p.showSearch ? (_(), c(S(
|
|
1071
|
-
default: w(() => [f(S(
|
|
1116
|
+
])], 2)) : (_(), u("div", it, [
|
|
1117
|
+
d("div", at, [d("div", ot, [
|
|
1118
|
+
p.showSearch || V.value ? (_(), u("div", st, [p.showSearch ? (_(), c(S(Ee), { key: 0 }, {
|
|
1119
|
+
default: w(() => [f(S(De), { class: "pi pi-search" }), f(S(E), {
|
|
1072
1120
|
"model-value": p.crud.search.value,
|
|
1073
1121
|
placeholder: "Buscar...",
|
|
1074
1122
|
"aria-label": "Buscar",
|
|
@@ -1076,27 +1124,38 @@ var ke = {
|
|
|
1076
1124
|
onInput: p.crud.onSearch
|
|
1077
1125
|
}, null, 8, ["model-value", "onInput"])]),
|
|
1078
1126
|
_: 1
|
|
1079
|
-
})) : l("", !0),
|
|
1080
|
-
|
|
1127
|
+
})) : l("", !0), V.value ? (_(), u(o, { key: 1 }, [b(r.$slots, "rail-actions", {
|
|
1128
|
+
selected: X.value,
|
|
1129
|
+
crud: p.crud
|
|
1130
|
+
}), f(e, {
|
|
1131
|
+
variant: "ghost",
|
|
1132
|
+
"icon-only": "",
|
|
1133
|
+
icon: "pi pi-ellipsis-v",
|
|
1134
|
+
"aria-label": "Ações",
|
|
1135
|
+
"aria-haspopup": "menu",
|
|
1136
|
+
class: "w-crud-rail-menu-btn",
|
|
1137
|
+
onClick: i[16] ||= (e) => Tn.value?.toggle(e)
|
|
1138
|
+
})], 64)) : l("", !0)])) : l("", !0),
|
|
1139
|
+
!p.showHeader && bn.value ? (_(), u("span", {
|
|
1081
1140
|
key: 1,
|
|
1082
1141
|
class: "w-crud-count",
|
|
1083
1142
|
"aria-live": "polite",
|
|
1084
1143
|
"aria-busy": p.crud.loading.value || void 0
|
|
1085
|
-
}, x(
|
|
1144
|
+
}, x(yn.value), 9, ct)) : l("", !0),
|
|
1086
1145
|
b(r.$slots, "toolbar-start"),
|
|
1087
|
-
(_(!0), u(o, null, y(
|
|
1146
|
+
(_(!0), u(o, null, y(Wn.value, (e) => (_(), u(o, { key: e.field }, [(e.filter?.type || "text") === "text" ? (_(), c(S(E), {
|
|
1088
1147
|
key: 0,
|
|
1089
1148
|
"model-value": p.crud.columnFilters[Y(e)] ?? "",
|
|
1090
1149
|
placeholder: e.filter?.placeholder || e.header,
|
|
1091
1150
|
"aria-label": e.filter?.placeholder || e.header,
|
|
1092
1151
|
size: "small",
|
|
1093
|
-
onInput: (t) =>
|
|
1152
|
+
onInput: (t) => qn(e, t.target.value)
|
|
1094
1153
|
}, null, 8, [
|
|
1095
1154
|
"model-value",
|
|
1096
1155
|
"placeholder",
|
|
1097
1156
|
"aria-label",
|
|
1098
1157
|
"onInput"
|
|
1099
|
-
])) : e.filter?.type === "select" ? (_(), c(S(
|
|
1158
|
+
])) : e.filter?.type === "select" ? (_(), c(S(we), {
|
|
1100
1159
|
key: 1,
|
|
1101
1160
|
"model-value": p.crud.columnFilters[Y(e)],
|
|
1102
1161
|
options: e.filter?.options,
|
|
@@ -1113,10 +1172,10 @@ var ke = {
|
|
|
1113
1172
|
"placeholder",
|
|
1114
1173
|
"aria-label",
|
|
1115
1174
|
"onUpdate:modelValue"
|
|
1116
|
-
])) : e.filter?.type === "boolean" ? (_(), c(S(
|
|
1175
|
+
])) : e.filter?.type === "boolean" ? (_(), c(S(we), {
|
|
1117
1176
|
key: 2,
|
|
1118
1177
|
"model-value": p.crud.columnFilters[Y(e)],
|
|
1119
|
-
options:
|
|
1178
|
+
options: Gn,
|
|
1120
1179
|
"option-label": "label",
|
|
1121
1180
|
"option-value": "value",
|
|
1122
1181
|
placeholder: e.filter?.placeholder || e.header,
|
|
@@ -1129,7 +1188,7 @@ var ke = {
|
|
|
1129
1188
|
"placeholder",
|
|
1130
1189
|
"aria-label",
|
|
1131
1190
|
"onUpdate:modelValue"
|
|
1132
|
-
])) : e.filter?.type === "numeric" ? (_(), c(S(
|
|
1191
|
+
])) : e.filter?.type === "numeric" ? (_(), c(S(Ce), {
|
|
1133
1192
|
key: 3,
|
|
1134
1193
|
"model-value": p.crud.columnFilters[Y(e)] ?? null,
|
|
1135
1194
|
placeholder: e.filter?.placeholder || e.header,
|
|
@@ -1149,9 +1208,9 @@ var ke = {
|
|
|
1149
1208
|
label: "Limpar filtros",
|
|
1150
1209
|
icon: "pi pi-filter-slash",
|
|
1151
1210
|
size: "sm",
|
|
1152
|
-
onClick: i[
|
|
1211
|
+
onClick: i[17] ||= (e) => p.crud.clearColumnFilters()
|
|
1153
1212
|
})) : l("", !0)
|
|
1154
|
-
]), d("div",
|
|
1213
|
+
]), d("div", lt, [
|
|
1155
1214
|
b(r.$slots, "toolbar-actions"),
|
|
1156
1215
|
W.value.length > 1 ? (_(), u(o, { key: 0 }, [T(f(e, {
|
|
1157
1216
|
variant: "ghost",
|
|
@@ -1159,7 +1218,7 @@ var ke = {
|
|
|
1159
1218
|
icon: "pi pi-angle-double-down",
|
|
1160
1219
|
"aria-label": "Expandir grupos",
|
|
1161
1220
|
size: "sm",
|
|
1162
|
-
onClick: i[
|
|
1221
|
+
onClick: i[18] ||= (e) => Mn(!1)
|
|
1163
1222
|
}, null, 512), [[
|
|
1164
1223
|
a,
|
|
1165
1224
|
"Expandir grupos",
|
|
@@ -1171,36 +1230,36 @@ var ke = {
|
|
|
1171
1230
|
icon: "pi pi-angle-double-up",
|
|
1172
1231
|
"aria-label": "Recolher grupos",
|
|
1173
1232
|
size: "sm",
|
|
1174
|
-
onClick: i[
|
|
1233
|
+
onClick: i[19] ||= (e) => Mn(!0)
|
|
1175
1234
|
}, null, 512), [[
|
|
1176
1235
|
a,
|
|
1177
1236
|
"Recolher grupos",
|
|
1178
1237
|
void 0,
|
|
1179
1238
|
{ top: !0 }
|
|
1180
1239
|
]])], 64)) : l("", !0),
|
|
1181
|
-
p.exportCsv ? T((_(), c(e, {
|
|
1240
|
+
p.exportCsv && !V.value ? T((_(), c(e, {
|
|
1182
1241
|
key: 1,
|
|
1183
1242
|
variant: "ghost",
|
|
1184
1243
|
"icon-only": "",
|
|
1185
1244
|
icon: "pi pi-download",
|
|
1186
|
-
"aria-label":
|
|
1245
|
+
"aria-label": P.value,
|
|
1187
1246
|
size: "sm",
|
|
1188
1247
|
loading: Z.value,
|
|
1189
|
-
onClick:
|
|
1248
|
+
onClick: Q
|
|
1190
1249
|
}, null, 8, ["aria-label", "loading"])), [[
|
|
1191
1250
|
a,
|
|
1192
|
-
|
|
1251
|
+
P.value,
|
|
1193
1252
|
void 0,
|
|
1194
1253
|
{ top: !0 }
|
|
1195
1254
|
]]) : l("", !0),
|
|
1196
|
-
|
|
1255
|
+
qt.value ? (_(), u("div", ut, [T(f(e, {
|
|
1197
1256
|
"icon-only": "",
|
|
1198
1257
|
icon: "pi pi-table",
|
|
1199
1258
|
"aria-label": "Ver como tabela",
|
|
1200
|
-
"aria-pressed":
|
|
1259
|
+
"aria-pressed": k("table"),
|
|
1201
1260
|
size: "sm",
|
|
1202
|
-
variant:
|
|
1203
|
-
onClick: i[
|
|
1261
|
+
variant: k("table") ? "secondary" : "ghost",
|
|
1262
|
+
onClick: i[20] ||= (e) => Jt("table")
|
|
1204
1263
|
}, null, 8, ["aria-pressed", "variant"]), [[
|
|
1205
1264
|
a,
|
|
1206
1265
|
"Ver como tabela",
|
|
@@ -1210,36 +1269,36 @@ var ke = {
|
|
|
1210
1269
|
"icon-only": "",
|
|
1211
1270
|
icon: "pi pi-th-large",
|
|
1212
1271
|
"aria-label": "Ver como cards",
|
|
1213
|
-
"aria-pressed":
|
|
1272
|
+
"aria-pressed": k("cards"),
|
|
1214
1273
|
size: "sm",
|
|
1215
|
-
variant:
|
|
1216
|
-
onClick: i[
|
|
1274
|
+
variant: k("cards") ? "secondary" : "ghost",
|
|
1275
|
+
onClick: i[21] ||= (e) => Jt("cards")
|
|
1217
1276
|
}, null, 8, ["aria-pressed", "variant"]), [[
|
|
1218
1277
|
a,
|
|
1219
1278
|
"Ver como cards",
|
|
1220
1279
|
void 0,
|
|
1221
1280
|
{ top: !0 }
|
|
1222
1281
|
]])])) : l("", !0),
|
|
1223
|
-
!p.showHeader &&
|
|
1282
|
+
!p.showHeader && B.value && !p.actionRail ? (_(), c(e, {
|
|
1224
1283
|
key: 3,
|
|
1225
1284
|
label: "Novo",
|
|
1226
1285
|
icon: "pi pi-plus",
|
|
1227
|
-
onClick: i[
|
|
1286
|
+
onClick: i[22] ||= (e) => p.crud.openCreateDialog()
|
|
1228
1287
|
})) : l("", !0)
|
|
1229
1288
|
])]),
|
|
1230
|
-
p.crud.loading.value && (!p.skeleton || !p.crud.items.value.length) ? (_(), u("div",
|
|
1289
|
+
p.crud.loading.value && (!p.skeleton || !p.crud.items.value.length) ? (_(), u("div", dt, [p.skeleton ? (_(), u(o, { key: 0 }, [S(Pt) ? (_(), c(ne, {
|
|
1231
1290
|
key: 0,
|
|
1232
1291
|
variant: "card"
|
|
1233
|
-
})) : l("", !0)], 64)) : (_(), u("i",
|
|
1292
|
+
})) : l("", !0)], 64)) : (_(), u("i", ft))])) : p.crud.items.value.length ? (_(!0), u(o, { key: 2 }, y(Nn.value, (t) => (_(), u(o, { key: t.group?.groupKey ?? "" }, [t.group ? (_(), u("div", ht, [d("button", {
|
|
1234
1293
|
type: "button",
|
|
1235
1294
|
class: "w-crud-group-toggle",
|
|
1236
1295
|
"aria-expanded": !t.group.collapsed,
|
|
1237
1296
|
"aria-label": `${t.group.collapsed ? "Expandir" : "Recolher"} ${t.group.label}`,
|
|
1238
|
-
onClick: (e) =>
|
|
1297
|
+
onClick: (e) => jn(t.group.groupKey)
|
|
1239
1298
|
}, [d("i", {
|
|
1240
1299
|
class: h(t.group.collapsed ? "pi pi-chevron-right" : "pi pi-chevron-down"),
|
|
1241
1300
|
"aria-hidden": "true"
|
|
1242
|
-
}, null, 2)], 8,
|
|
1301
|
+
}, null, 2)], 8, gt), d("span", _t, [b(r.$slots, "group-header", de({ ref_for: !0 }, t.group), () => [d("span", vt, x(t.group.label), 1)]), d("span", yt, [b(r.$slots, "group-meta", de({ ref_for: !0 }, t.group), () => [f(S(ke), {
|
|
1243
1302
|
value: String(t.group.count),
|
|
1244
1303
|
severity: "secondary",
|
|
1245
1304
|
rounded: ""
|
|
@@ -1251,31 +1310,31 @@ var ke = {
|
|
|
1251
1310
|
}, [(_(!0), u(o, null, y(t.items, (n, ee) => (_(), u("div", {
|
|
1252
1311
|
key: n[p.crud.config.pk || "id"] ?? ee,
|
|
1253
1312
|
role: "listitem",
|
|
1254
|
-
class: h(p.cardBare ? "w-crud-card-bare" : ["w-crud-card", { "w-crud-card--selected": H.value === n || J.value &&
|
|
1255
|
-
onClick: (e) =>
|
|
1256
|
-
onDblclick: (e) =>
|
|
1257
|
-
onContextmenu: (e) => !p.cardBare &&
|
|
1313
|
+
class: h(p.cardBare ? "w-crud-card-bare" : ["w-crud-card", { "w-crud-card--selected": H.value === n || J.value && Fn(n) }]),
|
|
1314
|
+
onClick: (e) => rr(e, n),
|
|
1315
|
+
onDblclick: (e) => ir(n),
|
|
1316
|
+
onContextmenu: (e) => !p.cardBare && or(e, n)
|
|
1258
1317
|
}, [b(r.$slots, "card", {
|
|
1259
1318
|
data: n,
|
|
1260
1319
|
crud: p.crud,
|
|
1261
|
-
columns:
|
|
1320
|
+
columns: sn.value,
|
|
1262
1321
|
index: t.offset + ee
|
|
1263
|
-
}, () => [d("div",
|
|
1322
|
+
}, () => [d("div", St, [J.value ? (_(), u("label", Ct, [f(S(Te), {
|
|
1264
1323
|
binary: "",
|
|
1265
|
-
"model-value":
|
|
1266
|
-
"aria-label": `Selecionar ${String(n[
|
|
1267
|
-
"onUpdate:modelValue": (e) =>
|
|
1324
|
+
"model-value": Fn(n),
|
|
1325
|
+
"aria-label": `Selecionar ${String(n[sn.value[0]?.field] ?? "")}`,
|
|
1326
|
+
"onUpdate:modelValue": (e) => In(n)
|
|
1268
1327
|
}, null, 8, [
|
|
1269
1328
|
"model-value",
|
|
1270
1329
|
"aria-label",
|
|
1271
1330
|
"onUpdate:modelValue"
|
|
1272
|
-
]), i[
|
|
1331
|
+
]), i[33] ||= d("span", null, "Selecionar", -1)])) : l("", !0), (_(!0), u(o, null, y(sn.value, (e, t) => (_(), u("div", {
|
|
1273
1332
|
key: e.field,
|
|
1274
1333
|
class: h(["w-crud-card-row", { "w-crud-card-row--title": t === 0 }])
|
|
1275
|
-
}, [t === 0 ? l("", !0) : (_(), u("span",
|
|
1334
|
+
}, [t === 0 ? l("", !0) : (_(), u("span", wt, x(e.header), 1)), d("span", Tt, [b(r.$slots, `column-${e.field}`, {
|
|
1276
1335
|
data: n,
|
|
1277
1336
|
value: n[e.field]
|
|
1278
|
-
}, () => [f(
|
|
1337
|
+
}, () => [f(re, {
|
|
1279
1338
|
column: e,
|
|
1280
1339
|
value: n[e.field],
|
|
1281
1340
|
"row-data": n
|
|
@@ -1283,16 +1342,16 @@ var ke = {
|
|
|
1283
1342
|
"column",
|
|
1284
1343
|
"value",
|
|
1285
1344
|
"row-data"
|
|
1286
|
-
])])])], 2))), 128))]),
|
|
1345
|
+
])])])], 2))), 128))]), un.value && !p.actionRail ? (_(), u("div", Et, [(_(!0), u(o, null, y(M.value, (t) => (_(), u(o, { key: t.action }, [R(t, n) ? T((_(), c(e, {
|
|
1287
1346
|
key: 0,
|
|
1288
1347
|
"icon-only": "",
|
|
1289
1348
|
icon: t.icon,
|
|
1290
|
-
"aria-label":
|
|
1291
|
-
title: t.disabledReason ?
|
|
1349
|
+
"aria-label": N(t, n),
|
|
1350
|
+
title: t.disabledReason ? N(t, n) : void 0,
|
|
1292
1351
|
size: "sm",
|
|
1293
1352
|
variant: t.severity === "danger" ? "danger" : "ghost",
|
|
1294
|
-
disabled:
|
|
1295
|
-
onClick: (e) =>
|
|
1353
|
+
disabled: z(t, n),
|
|
1354
|
+
onClick: (e) => F(t, n)
|
|
1296
1355
|
}, null, 8, [
|
|
1297
1356
|
"icon",
|
|
1298
1357
|
"aria-label",
|
|
@@ -1302,29 +1361,29 @@ var ke = {
|
|
|
1302
1361
|
"onClick"
|
|
1303
1362
|
])), [[
|
|
1304
1363
|
a,
|
|
1305
|
-
t.disabledReason ?
|
|
1364
|
+
t.disabledReason ? N(t, n) : t.tooltip,
|
|
1306
1365
|
void 0,
|
|
1307
1366
|
{ top: !0 }
|
|
1308
1367
|
]]) : l("", !0)], 64))), 128)), b(r.$slots, "row-actions", {
|
|
1309
1368
|
data: n,
|
|
1310
1369
|
crud: p.crud
|
|
1311
|
-
})])) : l("", !0)])], 42,
|
|
1312
|
-
i[
|
|
1313
|
-
i[
|
|
1314
|
-
d("p",
|
|
1370
|
+
})])) : l("", !0)])], 42, xt))), 128))], 10, bt))], 64))), 128)) : b(r.$slots, "empty", {}, () => [d("div", pt, [
|
|
1371
|
+
i[31] ||= d("div", { class: "w-crud-empty-icon" }, [d("i", { class: "pi pi-inbox" })], -1),
|
|
1372
|
+
i[32] ||= d("p", { class: "w-crud-empty-title" }, "Nenhum registro encontrado", -1),
|
|
1373
|
+
d("p", mt, " Tente ajustar sua busca" + x(B.value ? " ou crie um novo registro" : ""), 1)
|
|
1315
1374
|
])], void 0, 1),
|
|
1316
|
-
p.crud.items.value.length ? (_(), c(S(
|
|
1375
|
+
p.crud.items.value.length ? (_(), c(S(Oe), {
|
|
1317
1376
|
key: 3,
|
|
1318
1377
|
rows: p.crud.pagination.pageSize,
|
|
1319
1378
|
"total-records": p.crud.pagination.rows,
|
|
1320
|
-
first:
|
|
1379
|
+
first: Yt.value,
|
|
1321
1380
|
"rows-per-page-options": [
|
|
1322
1381
|
10,
|
|
1323
1382
|
20,
|
|
1324
1383
|
50
|
|
1325
1384
|
],
|
|
1326
1385
|
template: "CurrentPageReport PrevPageLink NextPageLink",
|
|
1327
|
-
"current-page-report-template":
|
|
1386
|
+
"current-page-report-template": xn.value,
|
|
1328
1387
|
class: "w-crud-paginator",
|
|
1329
1388
|
onPage: p.crud.onPage
|
|
1330
1389
|
}, null, 8, [
|
|
@@ -1334,29 +1393,29 @@ var ke = {
|
|
|
1334
1393
|
"current-page-report-template",
|
|
1335
1394
|
"onPage"
|
|
1336
1395
|
])) : l("", !0)
|
|
1337
|
-
]))], 512),
|
|
1338
|
-
|
|
1396
|
+
]))], 512), Cn.value && !V.value ? (_(), u("aside", Dt, [
|
|
1397
|
+
B.value ? T((_(), c(e, {
|
|
1339
1398
|
key: 0,
|
|
1340
1399
|
"icon-only": "",
|
|
1341
1400
|
icon: "pi pi-plus",
|
|
1342
1401
|
"aria-label": "Novo",
|
|
1343
|
-
onClick: i[
|
|
1402
|
+
onClick: i[23] ||= (e) => p.crud.openCreateDialog()
|
|
1344
1403
|
}, null, 512)), [[
|
|
1345
1404
|
a,
|
|
1346
1405
|
"Novo",
|
|
1347
1406
|
void 0,
|
|
1348
1407
|
{ left: !0 }
|
|
1349
1408
|
]]) : l("", !0),
|
|
1350
|
-
|
|
1351
|
-
(_(!0), u(o, null, y(
|
|
1409
|
+
B.value && M.value.length ? (_(), u("div", Ot)) : l("", !0),
|
|
1410
|
+
(_(!0), u(o, null, y(M.value, (t) => (_(), u(o, { key: t.action }, [!X.value || R(t, X.value) ? T((_(), c(e, {
|
|
1352
1411
|
key: 0,
|
|
1353
1412
|
"icon-only": "",
|
|
1354
1413
|
icon: t.icon,
|
|
1355
|
-
"aria-label":
|
|
1356
|
-
title: t.disabledReason ?
|
|
1414
|
+
"aria-label": N(t, X.value),
|
|
1415
|
+
title: t.disabledReason ? N(t, X.value) : void 0,
|
|
1357
1416
|
variant: t.severity === "danger" ? "danger" : "ghost",
|
|
1358
|
-
disabled: !X.value ||
|
|
1359
|
-
onClick: (e) => X.value &&
|
|
1417
|
+
disabled: !X.value || z(t, X.value),
|
|
1418
|
+
onClick: (e) => X.value && F(t, X.value)
|
|
1360
1419
|
}, null, 8, [
|
|
1361
1420
|
"icon",
|
|
1362
1421
|
"aria-label",
|
|
@@ -1366,7 +1425,7 @@ var ke = {
|
|
|
1366
1425
|
"onClick"
|
|
1367
1426
|
])), [[
|
|
1368
1427
|
a,
|
|
1369
|
-
t.disabledReason ?
|
|
1428
|
+
t.disabledReason ? N(t, X.value) : t.tooltip,
|
|
1370
1429
|
void 0,
|
|
1371
1430
|
{ left: !0 }
|
|
1372
1431
|
]]) : l("", !0)], 64))), 128)),
|
|
@@ -1374,7 +1433,7 @@ var ke = {
|
|
|
1374
1433
|
selected: X.value,
|
|
1375
1434
|
crud: p.crud
|
|
1376
1435
|
}),
|
|
1377
|
-
(
|
|
1436
|
+
(B.value || M.value.length || r.$slots["rail-actions"]) && (p.showPrint || p.exportCsv) ? (_(), u("div", kt)) : l("", !0),
|
|
1378
1437
|
p.showPrint ? T((_(), c(e, {
|
|
1379
1438
|
key: 3,
|
|
1380
1439
|
variant: "ghost",
|
|
@@ -1382,7 +1441,7 @@ var ke = {
|
|
|
1382
1441
|
icon: "pi pi-print",
|
|
1383
1442
|
"aria-label": "Imprimir",
|
|
1384
1443
|
disabled: !X.value,
|
|
1385
|
-
onClick:
|
|
1444
|
+
onClick: lr
|
|
1386
1445
|
}, null, 8, ["disabled"])), [[
|
|
1387
1446
|
a,
|
|
1388
1447
|
"Imprimir",
|
|
@@ -1394,12 +1453,12 @@ var ke = {
|
|
|
1394
1453
|
variant: "ghost",
|
|
1395
1454
|
"icon-only": "",
|
|
1396
1455
|
icon: "pi pi-download",
|
|
1397
|
-
"aria-label":
|
|
1456
|
+
"aria-label": P.value,
|
|
1398
1457
|
loading: Z.value,
|
|
1399
|
-
onClick:
|
|
1458
|
+
onClick: Q
|
|
1400
1459
|
}, null, 8, ["aria-label", "loading"])), [[
|
|
1401
1460
|
a,
|
|
1402
|
-
|
|
1461
|
+
P.value,
|
|
1403
1462
|
void 0,
|
|
1404
1463
|
{ left: !0 }
|
|
1405
1464
|
]]) : l("", !0)
|
|
@@ -1407,14 +1466,20 @@ var ke = {
|
|
|
1407
1466
|
p.contextMenu ? (_(), c(n, {
|
|
1408
1467
|
key: 1,
|
|
1409
1468
|
ref_key: "cm",
|
|
1410
|
-
ref:
|
|
1469
|
+
ref: Jn,
|
|
1411
1470
|
mode: "context",
|
|
1412
|
-
items:
|
|
1471
|
+
items: sr.value
|
|
1472
|
+
}, null, 8, ["items"])) : l("", !0),
|
|
1473
|
+
V.value ? (_(), c(n, {
|
|
1474
|
+
key: 2,
|
|
1475
|
+
ref_key: "railMenuRef",
|
|
1476
|
+
ref: Tn,
|
|
1477
|
+
items: cr.value
|
|
1413
1478
|
}, null, 8, ["items"])) : l("", !0),
|
|
1414
1479
|
b(r.$slots, "form-dialog", {
|
|
1415
1480
|
crud: p.crud,
|
|
1416
1481
|
dialogWidth: p.dialogWidth
|
|
1417
|
-
}, () => [f(
|
|
1482
|
+
}, () => [f(ie, {
|
|
1418
1483
|
visible: p.crud.dialogVisible.value,
|
|
1419
1484
|
title: p.crud.dialogTitle.value,
|
|
1420
1485
|
fields: p.crud.config.form,
|
|
@@ -1427,12 +1492,12 @@ var ke = {
|
|
|
1427
1492
|
"form-columns": p.formColumns ?? p.crud.config.formColumns,
|
|
1428
1493
|
"keyboard-nav": p.crud.config.keyboardNav,
|
|
1429
1494
|
"aside-width": p.asideWidth,
|
|
1430
|
-
"onUpdate:visible": i[
|
|
1495
|
+
"onUpdate:visible": i[24] ||= (e) => {
|
|
1431
1496
|
p.crud.dialogVisible.value = e, e || (p.crud.editingItem.value = null);
|
|
1432
1497
|
},
|
|
1433
|
-
"onUpdate:field": i[
|
|
1434
|
-
onSave: i[
|
|
1435
|
-
},
|
|
1498
|
+
"onUpdate:field": i[25] ||= (e, t) => p.crud.setFormField(e, t),
|
|
1499
|
+
onSave: i[26] ||= (e) => p.crud.save()
|
|
1500
|
+
}, ce({ _: 2 }, [
|
|
1436
1501
|
y(p.crud.config.form, (e) => ({
|
|
1437
1502
|
name: `field-${e.field}`,
|
|
1438
1503
|
fn: w((t) => [b(r.$slots, `field-${e.field}`, g(m(t)))])
|
|
@@ -1465,11 +1530,11 @@ var ke = {
|
|
|
1465
1530
|
"keyboard-nav",
|
|
1466
1531
|
"aside-width"
|
|
1467
1532
|
])]),
|
|
1468
|
-
r.$slots["delete-message"] ? (_(), c(S(
|
|
1469
|
-
key:
|
|
1470
|
-
visible:
|
|
1471
|
-
"onUpdate:visible": i[
|
|
1472
|
-
"append-to": S(
|
|
1533
|
+
r.$slots["delete-message"] ? (_(), c(S(be), {
|
|
1534
|
+
key: 3,
|
|
1535
|
+
visible: L.value,
|
|
1536
|
+
"onUpdate:visible": i[28] ||= (e) => L.value = e,
|
|
1537
|
+
"append-to": S(jt)?.hostEl.value ?? "body",
|
|
1473
1538
|
header: "Confirmar Exclusão",
|
|
1474
1539
|
modal: "",
|
|
1475
1540
|
draggable: !1,
|
|
@@ -1478,22 +1543,22 @@ var ke = {
|
|
|
1478
1543
|
footer: w(() => [f(e, {
|
|
1479
1544
|
variant: "ghost",
|
|
1480
1545
|
label: "Cancelar",
|
|
1481
|
-
disabled:
|
|
1482
|
-
onClick: i[
|
|
1546
|
+
disabled: pn.value,
|
|
1547
|
+
onClick: i[27] ||= (e) => L.value = !1
|
|
1483
1548
|
}, null, 8, ["disabled"]), f(e, {
|
|
1484
1549
|
variant: "danger",
|
|
1485
1550
|
label: "Excluir",
|
|
1486
1551
|
icon: "pi pi-trash",
|
|
1487
|
-
loading:
|
|
1488
|
-
onClick:
|
|
1552
|
+
loading: pn.value,
|
|
1553
|
+
onClick: mn
|
|
1489
1554
|
}, null, 8, ["loading"])]),
|
|
1490
|
-
default: w(() => [b(r.$slots, "delete-message", { item:
|
|
1555
|
+
default: w(() => [b(r.$slots, "delete-message", { item: I.value })]),
|
|
1491
1556
|
_: 3
|
|
1492
1557
|
}, 8, ["visible", "append-to"])) : l("", !0)
|
|
1493
1558
|
], 2);
|
|
1494
1559
|
};
|
|
1495
1560
|
}
|
|
1496
1561
|
});
|
|
1497
|
-
export {
|
|
1562
|
+
export { At as default };
|
|
1498
1563
|
|
|
1499
1564
|
//# sourceMappingURL=WCrudView.vue_vue_type_script_setup_true_lang.js.map
|