@wgalleti/primevue-components 0.9.3 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/WProgressFlow.vue_vue_type_script_setup_true_lang-CghB36QK.cjs +12 -0
- package/dist/WProgressFlow.vue_vue_type_script_setup_true_lang-CghB36QK.cjs.map +1 -0
- package/dist/{WProgressFlow.vue_vue_type_script_setup_true_lang-BZxi1797.js → WProgressFlow.vue_vue_type_script_setup_true_lang-KqwCnEHm.js} +415 -409
- package/dist/WProgressFlow.vue_vue_type_script_setup_true_lang-KqwCnEHm.js.map +1 -0
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/dist/WProgressFlow.vue_vue_type_script_setup_true_lang-BZxi1797.js.map +0 -1
- package/dist/WProgressFlow.vue_vue_type_script_setup_true_lang-CRx96kle.cjs +0 -12
- package/dist/WProgressFlow.vue_vue_type_script_setup_true_lang-CRx96kle.cjs.map +0 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { defineComponent as re, openBlock as o, createElementBlock as d, createBlock as C, unref as r, toDisplayString as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as re, openBlock as o, createElementBlock as d, createBlock as C, unref as r, toDisplayString as R, inject as vt, ref as U, onMounted as nt, nextTick as _e, computed as P, watch as Pe, reactive as Ee, resolveDirective as pt, Fragment as J, createElementVNode as m, mergeProps as Dt, createVNode as S, withDirectives as he, withCtx as K, createCommentVNode as b, renderList as ne, normalizeStyle as ke, createTextVNode as Fe, normalizeClass as Q, onBeforeUnmount as Et, renderSlot as B, isRef as Pt, withModifiers as Ft, createSlots as Ye, normalizeProps as tt, guardReactiveProps as lt, useSlots as It, createStaticVNode as Rt } from "vue";
|
|
2
|
+
import ht from "primevue/datatable";
|
|
3
3
|
import Me from "primevue/column";
|
|
4
|
-
import
|
|
4
|
+
import L from "primevue/button";
|
|
5
5
|
import ye from "primevue/inputtext";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
6
|
+
import Xe from "primevue/inputnumber";
|
|
7
|
+
import at from "primevue/select";
|
|
8
|
+
import yt from "primevue/popover";
|
|
9
9
|
import Mt from "primevue/checkbox";
|
|
10
10
|
import Ue from "primevue/iconfield";
|
|
11
11
|
import Be from "primevue/inputicon";
|
|
12
12
|
import At from "primevue/paginator";
|
|
13
13
|
import Ut from "primevue/contextmenu";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import { f as
|
|
14
|
+
import Ze from "primevue/dialog";
|
|
15
|
+
import gt from "primevue/tag";
|
|
16
|
+
import { f as it, b as Bt, a as Tt, e as st, c as Nt, d as Lt } from "./useFormKeyboardNav-D4Irq5RE.js";
|
|
17
17
|
import zt from "primevue/textarea";
|
|
18
|
-
import
|
|
18
|
+
import bt from "primevue/autocomplete";
|
|
19
19
|
import Ot from "primevue/toggleswitch";
|
|
20
20
|
import Wt from "primevue/colorpicker";
|
|
21
21
|
import jt from "primevue/password";
|
|
22
22
|
import { W as qt } from "./plugin-BKa0eSEM.js";
|
|
23
|
-
import
|
|
23
|
+
import wt from "primevue/datepicker";
|
|
24
24
|
import Kt from "primevue/inputgroup";
|
|
25
|
-
import
|
|
25
|
+
import rt from "primevue/inputgroupaddon";
|
|
26
26
|
import Ht from "primevue/slider";
|
|
27
|
-
import
|
|
27
|
+
import Ke from "primevue/skeleton";
|
|
28
28
|
const Gt = {
|
|
29
29
|
key: 0,
|
|
30
30
|
class: "text-muted-color text-xs"
|
|
@@ -43,7 +43,7 @@ const Gt = {
|
|
|
43
43
|
}, _t = {
|
|
44
44
|
key: 7,
|
|
45
45
|
class: "text-[0.8125rem]"
|
|
46
|
-
},
|
|
46
|
+
}, ot = /* @__PURE__ */ re({
|
|
47
47
|
__name: "WCrudColumnRenderer",
|
|
48
48
|
props: {
|
|
49
49
|
column: {},
|
|
@@ -51,26 +51,26 @@ const Gt = {
|
|
|
51
51
|
rowData: {}
|
|
52
52
|
},
|
|
53
53
|
setup(e) {
|
|
54
|
-
const { formatDate: a, formatDateTime: t, formatCurrency: n, formatNumber: i } =
|
|
54
|
+
const { formatDate: a, formatDateTime: t, formatCurrency: n, formatNumber: i } = it();
|
|
55
55
|
return (v, $) => e.value == null ? (o(), d("span", Gt, "—")) : e.column.type === "image" ? (o(), d("img", {
|
|
56
56
|
key: 1,
|
|
57
57
|
src: String(e.value),
|
|
58
58
|
alt: e.column.header,
|
|
59
59
|
class: "size-9 rounded-lg object-cover ring-1 ring-surface-200 dark:ring-surface-700"
|
|
60
|
-
}, null, 8, Yt)) : e.column.type === "boolean" ? (o(), C(r(
|
|
60
|
+
}, null, 8, Yt)) : e.column.type === "boolean" ? (o(), C(r(gt), {
|
|
61
61
|
key: 2,
|
|
62
62
|
value: e.column.tagValue ? e.column.tagValue(e.value, e.rowData) : e.value ? "Ativo" : "Inativo",
|
|
63
63
|
severity: e.column.tagSeverity ? e.column.tagSeverity(e.value, e.rowData) : e.value ? "success" : "danger",
|
|
64
64
|
class: "text-xs"
|
|
65
|
-
}, null, 8, ["value", "severity"])) : e.column.type === "date" ? (o(), d("span", Jt,
|
|
65
|
+
}, null, 8, ["value", "severity"])) : e.column.type === "date" ? (o(), d("span", Jt, R(r(a)(e.value)), 1)) : e.column.type === "datetime" ? (o(), d("span", Xt, R(r(t)(e.value)), 1)) : e.column.type === "currency" ? (o(), d("span", Zt, R(r(n)(e.value)), 1)) : e.column.type === "number" ? (o(), d("span", Qt, R(e.column.format ? e.column.format(e.value, e.rowData) : r(i)(e.value, e.column.decimals ?? 0)), 1)) : (o(), d("span", _t, R(e.column.format ? e.column.format(e.value, e.rowData) : e.value), 1));
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
|
-
var el = Object.defineProperty, tl = (e, a, t) => a in e ? el(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t,
|
|
69
|
-
const
|
|
68
|
+
var el = Object.defineProperty, tl = (e, a, t) => a in e ? el(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t, Ne = (e, a, t) => tl(e, typeof a != "symbol" ? a + "" : a, t);
|
|
69
|
+
const ut = {
|
|
70
70
|
"#": { pattern: /[0-9]/ },
|
|
71
71
|
"@": { pattern: /[a-zA-Z]/ },
|
|
72
72
|
"*": { pattern: /[a-zA-Z0-9]/ }
|
|
73
|
-
},
|
|
73
|
+
}, dt = (e, a, t) => e.replaceAll(a, "").replace(t, ".").replace("..", ".").replace(/[^.\d]/g, ""), ct = (e, a, t) => {
|
|
74
74
|
var n;
|
|
75
75
|
return new Intl.NumberFormat(((n = t.number) == null ? void 0 : n.locale) ?? "en", {
|
|
76
76
|
minimumFractionDigits: e,
|
|
@@ -80,35 +80,35 @@ const rt = {
|
|
|
80
80
|
}, ll = (e, a = !0, t) => {
|
|
81
81
|
var n, i, v, $;
|
|
82
82
|
const D = ((n = t.number) == null ? void 0 : n.unsigned) !== !0 && e.startsWith("-") ? "-" : "", x = ((i = t.number) == null ? void 0 : i.fraction) ?? 0;
|
|
83
|
-
let E =
|
|
84
|
-
const T = E.formatToParts(1000.12), w = ((v = T.find((F) => F.type === "group")) == null ? void 0 : v.value) ?? " ", H = (($ = T.find((F) => F.type === "decimal")) == null ? void 0 : $.value) ?? ".", X =
|
|
83
|
+
let E = ct(0, x, t);
|
|
84
|
+
const T = E.formatToParts(1000.12), w = ((v = T.find((F) => F.type === "group")) == null ? void 0 : v.value) ?? " ", H = (($ = T.find((F) => F.type === "decimal")) == null ? void 0 : $.value) ?? ".", X = dt(e, w, H);
|
|
85
85
|
if (Number.isNaN(parseFloat(X))) return D;
|
|
86
86
|
const Y = X.split(".");
|
|
87
87
|
if (Y[1] != null && Y[1].length >= 1) {
|
|
88
88
|
const F = Y[1].length <= x ? Y[1].length : x;
|
|
89
|
-
E =
|
|
89
|
+
E = ct(F, x, t);
|
|
90
90
|
}
|
|
91
91
|
let Z = E.format(parseFloat(X));
|
|
92
|
-
return a ? x > 0 && X.endsWith(".") && !X.slice(0, -1).includes(".") && (Z += H) : Z =
|
|
93
|
-
},
|
|
92
|
+
return a ? x > 0 && X.endsWith(".") && !X.slice(0, -1).includes(".") && (Z += H) : Z = dt(Z, w, H), D + Z;
|
|
93
|
+
}, kt = (e) => JSON.parse(e.replaceAll("'", '"')), al = (e, a = {}) => {
|
|
94
94
|
const t = { ...a };
|
|
95
|
-
e.dataset.maska != null && e.dataset.maska !== "" && (t.mask = ol(e.dataset.maska)), e.dataset.maskaEager != null && (t.eager =
|
|
95
|
+
e.dataset.maska != null && e.dataset.maska !== "" && (t.mask = ol(e.dataset.maska)), e.dataset.maskaEager != null && (t.eager = He(e.dataset.maskaEager)), e.dataset.maskaReversed != null && (t.reversed = He(e.dataset.maskaReversed)), e.dataset.maskaTokensReplace != null && (t.tokensReplace = He(e.dataset.maskaTokensReplace)), e.dataset.maskaTokens != null && (t.tokens = nl(e.dataset.maskaTokens));
|
|
96
96
|
const n = {};
|
|
97
|
-
return e.dataset.maskaNumberLocale != null && (n.locale = e.dataset.maskaNumberLocale), e.dataset.maskaNumberFraction != null && (n.fraction = parseInt(e.dataset.maskaNumberFraction)), e.dataset.maskaNumberUnsigned != null && (n.unsigned =
|
|
98
|
-
},
|
|
97
|
+
return e.dataset.maskaNumberLocale != null && (n.locale = e.dataset.maskaNumberLocale), e.dataset.maskaNumberFraction != null && (n.fraction = parseInt(e.dataset.maskaNumberFraction)), e.dataset.maskaNumberUnsigned != null && (n.unsigned = He(e.dataset.maskaNumberUnsigned)), (e.dataset.maskaNumber != null || Object.values(n).length > 0) && (t.number = n), t;
|
|
98
|
+
}, He = (e) => e !== "" ? !!JSON.parse(e) : !0, ol = (e) => e.startsWith("[") && e.endsWith("]") ? kt(e) : e, nl = (e) => {
|
|
99
99
|
if (e.startsWith("{") && e.endsWith("}"))
|
|
100
|
-
return
|
|
100
|
+
return kt(e);
|
|
101
101
|
const a = {};
|
|
102
102
|
return e.split("|").forEach((t) => {
|
|
103
103
|
const n = t.split(":");
|
|
104
104
|
a[n[0]] = {
|
|
105
|
-
pattern:
|
|
105
|
+
pattern: $t() ? new RegExp(n[1], "u") : new RegExp(n[1]),
|
|
106
106
|
optional: n[2] === "optional",
|
|
107
107
|
multiple: n[2] === "multiple",
|
|
108
108
|
repeated: n[2] === "repeated"
|
|
109
109
|
};
|
|
110
110
|
}), a;
|
|
111
|
-
},
|
|
111
|
+
}, $t = () => {
|
|
112
112
|
try {
|
|
113
113
|
return new RegExp("\\p{L}", "u"), !0;
|
|
114
114
|
} catch {
|
|
@@ -117,14 +117,14 @@ const rt = {
|
|
|
117
117
|
};
|
|
118
118
|
class il {
|
|
119
119
|
constructor(a = {}) {
|
|
120
|
-
|
|
120
|
+
Ne(this, "opts", {}), Ne(this, "memo", /* @__PURE__ */ new Map());
|
|
121
121
|
const t = { ...a };
|
|
122
122
|
if (t.tokens != null) {
|
|
123
|
-
t.tokens = t.tokensReplace ? { ...t.tokens } : { ...
|
|
123
|
+
t.tokens = t.tokensReplace ? { ...t.tokens } : { ...ut, ...t.tokens };
|
|
124
124
|
for (const n of Object.values(t.tokens))
|
|
125
|
-
typeof n.pattern == "string" && (n.pattern =
|
|
125
|
+
typeof n.pattern == "string" && (n.pattern = $t() ? new RegExp(n.pattern, "u") : new RegExp(n.pattern));
|
|
126
126
|
} else
|
|
127
|
-
t.tokens =
|
|
127
|
+
t.tokens = ut;
|
|
128
128
|
Array.isArray(t.mask) && (t.mask.length > 1 ? t.mask = [...t.mask].sort((n, i) => n.length - i.length) : t.mask = t.mask[0] ?? ""), t.mask === "" && (t.mask = null), this.opts = t;
|
|
129
129
|
}
|
|
130
130
|
masked(a) {
|
|
@@ -168,10 +168,10 @@ class il {
|
|
|
168
168
|
const i = `v=${a},mr=${t},m=${n ? 1 : 0}`;
|
|
169
169
|
if (this.memo.has(i)) return this.memo.get(i);
|
|
170
170
|
const { mask: v, escaped: $ } = this.escapeMask(t), D = [], x = this.opts.tokens != null ? this.opts.tokens : {}, E = this.isReversed() ? -1 : 1, T = this.isReversed() ? "unshift" : "push", w = this.isReversed() ? 0 : v.length - 1, H = this.isReversed() ? () => F > -1 && A > -1 : () => F < v.length && A < a.length, X = (V) => !this.isReversed() && V <= w || this.isReversed() && V >= w;
|
|
171
|
-
let Y, Z = -1, F = this.isReversed() ? v.length - 1 : 0, A = this.isReversed() ? a.length - 1 : 0,
|
|
171
|
+
let Y, Z = -1, F = this.isReversed() ? v.length - 1 : 0, A = this.isReversed() ? a.length - 1 : 0, z = !1;
|
|
172
172
|
for (; H(); ) {
|
|
173
|
-
const V = v.charAt(F), O = x[V],
|
|
174
|
-
if (!$.includes(F) && O != null ? (
|
|
173
|
+
const V = v.charAt(F), O = x[V], ie = (O == null ? void 0 : O.transform) != null ? O.transform(a.charAt(A)) : a.charAt(A);
|
|
174
|
+
if (!$.includes(F) && O != null ? (ie.match(O.pattern) != null ? (D[T](ie), O.repeated ? (Z === -1 ? Z = F : F === w && F !== Z && (F = Z - E), w === Z && (F -= E)) : O.multiple && (z = !0, F -= E), F += E) : O.multiple ? z && (F += E, A -= E, z = !1) : ie === Y ? Y = void 0 : O.optional && (F += E, A -= E), A += E) : (n && !this.isEager() && D[T](V), ie === V && !this.isEager() ? A += E : Y = V, this.isEager() || (F += E)), this.isEager())
|
|
175
175
|
for (; X(F) && (x[v.charAt(F)] == null || $.includes(F)); ) {
|
|
176
176
|
if (n) {
|
|
177
177
|
if (D[T](v.charAt(F)), a.charAt(A) === v.charAt(F)) {
|
|
@@ -187,7 +187,7 @@ class il {
|
|
|
187
187
|
}
|
|
188
188
|
class sl {
|
|
189
189
|
constructor(a, t = {}) {
|
|
190
|
-
|
|
190
|
+
Ne(this, "items", /* @__PURE__ */ new Map()), Ne(this, "eventAbortController"), Ne(this, "onInput", (n) => {
|
|
191
191
|
if (n instanceof CustomEvent && n.type === "input" && !n.isTrusted && !n.bubbles)
|
|
192
192
|
return;
|
|
193
193
|
const i = n.target, v = this.items.get(i);
|
|
@@ -250,11 +250,11 @@ class sl {
|
|
|
250
250
|
};
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
|
-
const
|
|
253
|
+
const et = /* @__PURE__ */ new WeakMap(), rl = (e, a) => {
|
|
254
254
|
if (e.arg == null || e.instance == null) return;
|
|
255
255
|
const t = "setup" in e.instance.$.type;
|
|
256
256
|
e.arg in e.instance ? e.instance[e.arg] = a : t && console.warn("Maska: please expose `%s` using defineExpose", e.arg);
|
|
257
|
-
},
|
|
257
|
+
}, Je = (e, a) => {
|
|
258
258
|
var t;
|
|
259
259
|
const n = e instanceof HTMLInputElement ? e : e.querySelector("input");
|
|
260
260
|
if (n == null || (n == null ? void 0 : n.type) === "file") return;
|
|
@@ -266,7 +266,7 @@ const _e = /* @__PURE__ */ new WeakMap(), rl = (e, a) => {
|
|
|
266
266
|
};
|
|
267
267
|
i.onMaska = i.onMaska == null ? v : Array.isArray(i.onMaska) ? [...i.onMaska, v] : [i.onMaska, v];
|
|
268
268
|
}
|
|
269
|
-
|
|
269
|
+
et.has(n) ? (t = et.get(n)) == null || t.update(i) : et.set(n, new sl(n, i));
|
|
270
270
|
}, ul = {
|
|
271
271
|
string: "text",
|
|
272
272
|
integer: "number",
|
|
@@ -345,17 +345,17 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
345
345
|
},
|
|
346
346
|
emits: ["update:modelValue"],
|
|
347
347
|
setup(e, { emit: a }) {
|
|
348
|
-
const t = e, n = a, i =
|
|
348
|
+
const t = e, n = a, i = vt(qt);
|
|
349
349
|
if (!i)
|
|
350
350
|
throw new Error("[wPrimeVueComponents] dataProvider não encontrado. Registre o WPrimeVuePlugin.");
|
|
351
351
|
const v = i, $ = Bt(), { confirmDelete: D } = Tt(), x = U(null), E = U([]), T = U(!1);
|
|
352
352
|
let w = null;
|
|
353
353
|
const H = U(null);
|
|
354
|
-
|
|
355
|
-
t.autofocus &&
|
|
356
|
-
var y,
|
|
357
|
-
const u = (
|
|
358
|
-
u && (u.setAttribute("autofocus", ""), u.focus(), (
|
|
354
|
+
nt(() => {
|
|
355
|
+
t.autofocus && _e(() => {
|
|
356
|
+
var y, N, I, ee;
|
|
357
|
+
const u = (I = (N = (y = H.value) == null ? void 0 : y.$el) == null ? void 0 : N.querySelector) == null ? void 0 : I.call(N, "input");
|
|
358
|
+
u && (u.setAttribute("autofocus", ""), u.focus(), (ee = u.select) == null || ee.call(u));
|
|
359
359
|
});
|
|
360
360
|
});
|
|
361
361
|
function X(u) {
|
|
@@ -379,12 +379,12 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
379
379
|
function A() {
|
|
380
380
|
const u = {};
|
|
381
381
|
for (const y of Z.value) {
|
|
382
|
-
const
|
|
383
|
-
X(
|
|
382
|
+
const N = Y(y.value);
|
|
383
|
+
X(N) || (u[y.field] = N);
|
|
384
384
|
}
|
|
385
385
|
return u;
|
|
386
386
|
}
|
|
387
|
-
const
|
|
387
|
+
const z = P(
|
|
388
388
|
() => F.value && t.blockedPlaceholder ? t.blockedPlaceholder : t.placeholder
|
|
389
389
|
);
|
|
390
390
|
async function V(u) {
|
|
@@ -408,15 +408,15 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
408
408
|
...A()
|
|
409
409
|
};
|
|
410
410
|
u && (y.search = u);
|
|
411
|
-
const
|
|
412
|
-
E.value =
|
|
411
|
+
const N = await v.list(t.endpoint, y);
|
|
412
|
+
E.value = N.data;
|
|
413
413
|
} catch {
|
|
414
414
|
E.value = [];
|
|
415
415
|
} finally {
|
|
416
416
|
T.value = !1;
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function ie(u) {
|
|
420
420
|
const y = u.query || "";
|
|
421
421
|
if (y.length < t.minLength) {
|
|
422
422
|
E.value = [];
|
|
@@ -444,74 +444,74 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
444
444
|
},
|
|
445
445
|
{ immediate: !0 }
|
|
446
446
|
);
|
|
447
|
-
const de = U(!1),
|
|
447
|
+
const de = U(!1), se = U([]), ge = U(!1), ce = U(""), be = U(1), we = U(15), ue = U(0), te = U(null), pe = U(null), W = U(0);
|
|
448
448
|
let me = null;
|
|
449
449
|
const $e = U([]), f = P(() => {
|
|
450
450
|
var u;
|
|
451
451
|
return (u = t.crudFields) != null && u.length ? !0 : $e.value.length > 0;
|
|
452
|
-
}), p = P(() => t.canCreate ?? f.value), g = P(() => t.canEdit ?? f.value), l = P(() => t.canDelete ?? f.value), k = P(() => g.value || l.value),
|
|
452
|
+
}), p = P(() => t.canCreate ?? f.value), g = P(() => t.canEdit ?? f.value), l = P(() => t.canDelete ?? f.value), k = P(() => g.value || l.value), le = P(() => {
|
|
453
453
|
var u;
|
|
454
454
|
return (u = t.crudFields) != null && u.length ? t.crudFields : cl($e.value);
|
|
455
455
|
}), j = P(() => {
|
|
456
456
|
var u, y;
|
|
457
|
-
return (u = t.crudColumns) != null && u.length ? t.crudColumns : (y = t.columns) != null && y.length ? t.columns.map((
|
|
458
|
-
field:
|
|
459
|
-
header:
|
|
457
|
+
return (u = t.crudColumns) != null && u.length ? t.crudColumns : (y = t.columns) != null && y.length ? t.columns.map((N) => ({
|
|
458
|
+
field: N.field,
|
|
459
|
+
header: N.header,
|
|
460
460
|
sortable: !0
|
|
461
461
|
})) : $e.value.length ? vl($e.value) : [{ field: t.optionLabel, header: t.optionLabel, sortable: !0 }];
|
|
462
462
|
});
|
|
463
|
-
async function
|
|
464
|
-
var u, y,
|
|
463
|
+
async function ae() {
|
|
464
|
+
var u, y, N;
|
|
465
465
|
if (F.value) {
|
|
466
|
-
|
|
466
|
+
se.value = [], ue.value = 0;
|
|
467
467
|
return;
|
|
468
468
|
}
|
|
469
469
|
ge.value = !0;
|
|
470
470
|
try {
|
|
471
|
-
const
|
|
471
|
+
const I = {
|
|
472
472
|
page: be.value,
|
|
473
473
|
page_size: we.value,
|
|
474
474
|
...t.endpointParams,
|
|
475
475
|
...A()
|
|
476
476
|
};
|
|
477
|
-
ce.value && (
|
|
478
|
-
const
|
|
479
|
-
|
|
477
|
+
ce.value && (I.search = ce.value), pe.value && W.value !== 0 && (I.ordering = W.value === -1 ? `-${pe.value}` : pe.value);
|
|
478
|
+
const ee = await v.list(t.endpoint, I);
|
|
479
|
+
se.value = ee.data, ue.value = ee.rows, (u = ee.extras) != null && u.fields && !((y = t.columns) != null && y.length) && !((N = t.crudFields) != null && N.length) && ($e.value = ee.extras.fields);
|
|
480
480
|
} catch {
|
|
481
|
-
|
|
481
|
+
se.value = [], ue.value = 0;
|
|
482
482
|
} finally {
|
|
483
483
|
ge.value = !1;
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
486
|
function _(u) {
|
|
487
|
-
u.key === "F2" && !t.disabled && (u.preventDefault(),
|
|
487
|
+
u.key === "F2" && !t.disabled && (u.preventDefault(), oe());
|
|
488
488
|
}
|
|
489
|
-
function
|
|
490
|
-
t.disabled || (ce.value = "", be.value = 1, pe.value = null, W.value = 0,
|
|
489
|
+
function oe() {
|
|
490
|
+
t.disabled || (ce.value = "", be.value = 1, pe.value = null, W.value = 0, te.value = null, de.value = !0, ae());
|
|
491
491
|
}
|
|
492
492
|
function Ie(u) {
|
|
493
|
-
be.value = u.page + 1, we.value = u.rows,
|
|
493
|
+
be.value = u.page + 1, we.value = u.rows, ae();
|
|
494
494
|
}
|
|
495
495
|
function Re(u) {
|
|
496
|
-
pe.value = u.sortField ?? null, W.value = u.sortOrder ?? 0, be.value = 1,
|
|
496
|
+
pe.value = u.sortField ?? null, W.value = u.sortOrder ?? 0, be.value = 1, ae();
|
|
497
497
|
}
|
|
498
|
-
function
|
|
499
|
-
|
|
498
|
+
function Le() {
|
|
499
|
+
te.value && (x.value = te.value, n("update:modelValue", te.value), de.value = !1);
|
|
500
500
|
}
|
|
501
|
-
function
|
|
501
|
+
function Qe(u) {
|
|
502
502
|
x.value = u.data, n("update:modelValue", u.data), de.value = !1;
|
|
503
503
|
}
|
|
504
|
-
const
|
|
504
|
+
const ze = U(null), Ce = U(null);
|
|
505
505
|
let Ve = "";
|
|
506
506
|
function c() {
|
|
507
|
-
Ve = "",
|
|
508
|
-
var y,
|
|
509
|
-
const u = (y =
|
|
510
|
-
(
|
|
507
|
+
Ve = "", _e(() => {
|
|
508
|
+
var y, N, I;
|
|
509
|
+
const u = (y = ze.value) == null ? void 0 : y.$el;
|
|
510
|
+
(N = u == null ? void 0 : u.focus) == null || N.call(u), (I = u == null ? void 0 : u.select) == null || I.call(u);
|
|
511
511
|
});
|
|
512
512
|
}
|
|
513
513
|
function h() {
|
|
514
|
-
|
|
514
|
+
_e(() => {
|
|
515
515
|
var y;
|
|
516
516
|
const u = (y = Ce.value) == null ? void 0 : y.querySelector(".p-datatable-tbody > tr");
|
|
517
517
|
u == null || u.focus();
|
|
@@ -525,103 +525,109 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
525
525
|
h();
|
|
526
526
|
return;
|
|
527
527
|
}
|
|
528
|
-
me && clearTimeout(me), Ve = y, be.value = 1,
|
|
528
|
+
me && clearTimeout(me), Ve = y, be.value = 1, ae();
|
|
529
529
|
}
|
|
530
530
|
function s(u) {
|
|
531
|
-
u.key === "Enter" && (u.preventDefault(), u.stopPropagation(),
|
|
531
|
+
u.key === "Enter" && (u.preventDefault(), u.stopPropagation(), te.value && Le());
|
|
532
532
|
}
|
|
533
533
|
Pe(ce, () => {
|
|
534
534
|
me && clearTimeout(me), me = setTimeout(() => {
|
|
535
|
-
be.value = 1, Ve = ce.value.trim(),
|
|
535
|
+
be.value = 1, Ve = ce.value.trim(), ae();
|
|
536
536
|
}, 300);
|
|
537
537
|
}), Pe(
|
|
538
538
|
() => Z.value.map((u) => Y(u.value)),
|
|
539
539
|
(u, y) => {
|
|
540
|
-
if (de.value && (be.value = 1,
|
|
541
|
-
const
|
|
542
|
-
|
|
540
|
+
if (de.value && (be.value = 1, ae()), !y) return;
|
|
541
|
+
const N = u.some((ee, Te) => ee !== y[Te]), I = y.some((ee) => !X(ee));
|
|
542
|
+
N && I && x.value && (x.value = null, n("update:modelValue", null));
|
|
543
543
|
}
|
|
544
544
|
);
|
|
545
|
-
const M = U(!1), q = U(!1), fe = U(null), xe = Ee({}), Ae = P(() => fe.value !== null),
|
|
546
|
-
function
|
|
545
|
+
const M = U(!1), q = U(!1), fe = U(null), xe = Ee({}), Ae = P(() => fe.value !== null), Oe = P(() => Ae.value ? "Editar Registro" : "Novo Registro");
|
|
546
|
+
function We() {
|
|
547
547
|
const u = {};
|
|
548
|
-
for (const y of
|
|
548
|
+
for (const y of le.value)
|
|
549
549
|
u[y.field] = y.defaultValue !== void 0 ? typeof y.defaultValue == "function" ? y.defaultValue() : y.defaultValue : null;
|
|
550
550
|
return u;
|
|
551
551
|
}
|
|
552
|
-
function
|
|
553
|
-
const u =
|
|
552
|
+
function je() {
|
|
553
|
+
const u = We();
|
|
554
554
|
for (const y of Object.keys(xe))
|
|
555
555
|
delete xe[y];
|
|
556
|
-
for (const [y,
|
|
557
|
-
xe[y] =
|
|
556
|
+
for (const [y, N] of Object.entries(u))
|
|
557
|
+
xe[y] = N;
|
|
558
558
|
}
|
|
559
|
-
function
|
|
560
|
-
fe.value = null,
|
|
559
|
+
function qe() {
|
|
560
|
+
fe.value = null, je(), M.value = !0;
|
|
561
561
|
}
|
|
562
562
|
function Se(u) {
|
|
563
563
|
fe.value = u;
|
|
564
|
-
for (const y of
|
|
564
|
+
for (const y of le.value)
|
|
565
565
|
xe[y.field] = u[y.field] !== void 0 ? u[y.field] : null;
|
|
566
566
|
M.value = !0;
|
|
567
567
|
}
|
|
568
|
-
function
|
|
568
|
+
function Ct(u, y) {
|
|
569
569
|
xe[u] = y;
|
|
570
570
|
}
|
|
571
|
-
async function
|
|
571
|
+
async function Vt() {
|
|
572
572
|
q.value = !0;
|
|
573
573
|
try {
|
|
574
574
|
const u = { ...xe };
|
|
575
|
-
for (const
|
|
576
|
-
const
|
|
577
|
-
if (
|
|
578
|
-
const
|
|
579
|
-
u[
|
|
575
|
+
for (const N of le.value) {
|
|
576
|
+
const I = u[N.field];
|
|
577
|
+
if (N.type === "fk" && I !== null && typeof I == "object") {
|
|
578
|
+
const ee = N.optionValue || "id";
|
|
579
|
+
u[N.field] = I[ee] ?? I;
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
582
|
let y;
|
|
583
583
|
if (Ae.value && fe.value) {
|
|
584
|
-
const
|
|
585
|
-
y = await v.update(t.endpoint,
|
|
586
|
-
const
|
|
587
|
-
|
|
588
|
-
} else
|
|
589
|
-
|
|
590
|
-
|
|
584
|
+
const N = fe.value[t.optionValue];
|
|
585
|
+
y = await v.update(t.endpoint, N, u);
|
|
586
|
+
const I = se.value.findIndex((ee) => ee[t.optionValue] === N);
|
|
587
|
+
I !== -1 && (se.value[I] = y.data), $.success("Registro atualizado com sucesso");
|
|
588
|
+
} else {
|
|
589
|
+
const N = A();
|
|
590
|
+
for (const [I, ee] of Object.entries(N)) {
|
|
591
|
+
const Te = u[I];
|
|
592
|
+
(Te == null || Te === "") && (u[I] = ee);
|
|
593
|
+
}
|
|
594
|
+
y = await v.create(t.endpoint, u), se.value.unshift(y.data), ue.value++, $.success("Registro criado com sucesso");
|
|
595
|
+
}
|
|
596
|
+
M.value = !1, fe.value = null, te.value = y.data;
|
|
591
597
|
} catch (u) {
|
|
592
|
-
$.error(
|
|
598
|
+
$.error(st(u, "Erro ao salvar registro"));
|
|
593
599
|
} finally {
|
|
594
600
|
q.value = !1;
|
|
595
601
|
}
|
|
596
602
|
}
|
|
597
|
-
function
|
|
603
|
+
function St(u) {
|
|
598
604
|
D(async () => {
|
|
599
605
|
try {
|
|
600
606
|
const y = u[t.optionValue];
|
|
601
607
|
await v.delete(t.endpoint, y);
|
|
602
|
-
const
|
|
603
|
-
|
|
608
|
+
const N = se.value.findIndex((I) => I[t.optionValue] === y);
|
|
609
|
+
N !== -1 && (se.value.splice(N, 1), ue.value--), x.value && x.value[t.optionValue] === y && (x.value = null, n("update:modelValue", null)), te.value && te.value[t.optionValue] === y && (te.value = null), $.success("Registro excluído com sucesso");
|
|
604
610
|
} catch (y) {
|
|
605
|
-
$.error(
|
|
611
|
+
$.error(st(y, "Erro ao excluir registro"));
|
|
606
612
|
}
|
|
607
613
|
});
|
|
608
614
|
}
|
|
609
615
|
return (u, y) => {
|
|
610
|
-
const
|
|
616
|
+
const N = pt("tooltip");
|
|
611
617
|
return o(), d(J, null, [
|
|
612
618
|
m("div", Dt({ class: "w-autocompletefk" }, u.$attrs), [
|
|
613
|
-
S(r(
|
|
619
|
+
S(r(bt), {
|
|
614
620
|
ref_key: "acRef",
|
|
615
621
|
ref: H,
|
|
616
622
|
"model-value": x.value,
|
|
617
623
|
suggestions: E.value,
|
|
618
624
|
"option-label": e.optionLabel,
|
|
619
|
-
placeholder:
|
|
625
|
+
placeholder: z.value,
|
|
620
626
|
disabled: e.disabled,
|
|
621
627
|
"force-selection": e.forceSelection,
|
|
622
628
|
loading: T.value,
|
|
623
629
|
fluid: "",
|
|
624
|
-
onComplete:
|
|
630
|
+
onComplete: ie,
|
|
625
631
|
onItemSelect: ve,
|
|
626
632
|
onClear: De,
|
|
627
633
|
onKeydown: _
|
|
@@ -632,21 +638,21 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
632
638
|
"data-kbd-skip": "",
|
|
633
639
|
tabindex: "-1",
|
|
634
640
|
class: "w-autocompletefk-trigger",
|
|
635
|
-
onClick:
|
|
641
|
+
onClick: oe
|
|
636
642
|
}, [...y[6] || (y[6] = [
|
|
637
643
|
m("i", { class: "pi pi-search" }, null, -1)
|
|
638
644
|
])], 8, pl)), [
|
|
639
645
|
[
|
|
640
|
-
|
|
646
|
+
N,
|
|
641
647
|
"Pesquisar (F2)",
|
|
642
648
|
void 0,
|
|
643
649
|
{ top: !0 }
|
|
644
650
|
]
|
|
645
651
|
])
|
|
646
652
|
], 16),
|
|
647
|
-
S(r(
|
|
653
|
+
S(r(Ze), {
|
|
648
654
|
visible: de.value,
|
|
649
|
-
"onUpdate:visible": y[4] || (y[4] = (
|
|
655
|
+
"onUpdate:visible": y[4] || (y[4] = (I) => de.value = I),
|
|
650
656
|
header: e.dialogHeader || "Pesquisar",
|
|
651
657
|
style: { width: "80vw" },
|
|
652
658
|
modal: "",
|
|
@@ -656,17 +662,17 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
656
662
|
}, {
|
|
657
663
|
footer: K(() => [
|
|
658
664
|
m("div", bl, [
|
|
659
|
-
S(r(
|
|
665
|
+
S(r(L), {
|
|
660
666
|
label: "Cancelar",
|
|
661
667
|
severity: "secondary",
|
|
662
668
|
text: "",
|
|
663
|
-
onClick: y[3] || (y[3] = (
|
|
669
|
+
onClick: y[3] || (y[3] = (I) => de.value = !1)
|
|
664
670
|
}),
|
|
665
|
-
S(r(
|
|
671
|
+
S(r(L), {
|
|
666
672
|
label: "Selecionar",
|
|
667
673
|
icon: "pi pi-check",
|
|
668
|
-
disabled: !
|
|
669
|
-
onClick:
|
|
674
|
+
disabled: !te.value,
|
|
675
|
+
onClick: Le
|
|
670
676
|
}, null, 8, ["disabled"])
|
|
671
677
|
])
|
|
672
678
|
]),
|
|
@@ -677,9 +683,9 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
677
683
|
S(r(Be), { class: "pi pi-search" }),
|
|
678
684
|
S(r(ye), {
|
|
679
685
|
ref_key: "modalSearchInput",
|
|
680
|
-
ref:
|
|
686
|
+
ref: ze,
|
|
681
687
|
modelValue: ce.value,
|
|
682
|
-
"onUpdate:modelValue": y[0] || (y[0] = (
|
|
688
|
+
"onUpdate:modelValue": y[0] || (y[0] = (I) => ce.value = I),
|
|
683
689
|
placeholder: "Pesquisar...",
|
|
684
690
|
class: "w-full",
|
|
685
691
|
autofocus: "",
|
|
@@ -689,12 +695,12 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
689
695
|
_: 1
|
|
690
696
|
}),
|
|
691
697
|
m("div", yl, [
|
|
692
|
-
p.value ? (o(), C(r(
|
|
698
|
+
p.value ? (o(), C(r(L), {
|
|
693
699
|
key: 0,
|
|
694
700
|
label: "Novo",
|
|
695
701
|
icon: "pi pi-plus",
|
|
696
702
|
size: "small",
|
|
697
|
-
onClick:
|
|
703
|
+
onClick: qe
|
|
698
704
|
})) : b("", !0)
|
|
699
705
|
])
|
|
700
706
|
]),
|
|
@@ -703,11 +709,11 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
703
709
|
ref: Ce,
|
|
704
710
|
onKeydownCapture: s
|
|
705
711
|
}, [
|
|
706
|
-
S(r(
|
|
707
|
-
selection:
|
|
708
|
-
"onUpdate:selection": y[1] || (y[1] = (
|
|
712
|
+
S(r(ht), {
|
|
713
|
+
selection: te.value,
|
|
714
|
+
"onUpdate:selection": y[1] || (y[1] = (I) => te.value = I),
|
|
709
715
|
"meta-key-selection": !1,
|
|
710
|
-
value:
|
|
716
|
+
value: se.value,
|
|
711
717
|
loading: ge.value,
|
|
712
718
|
paginator: "",
|
|
713
719
|
lazy: "",
|
|
@@ -721,8 +727,8 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
721
727
|
"selection-mode": "single",
|
|
722
728
|
"data-key": e.optionValue,
|
|
723
729
|
onPage: Ie,
|
|
724
|
-
onSort: y[2] || (y[2] = (
|
|
725
|
-
onRowDblclick:
|
|
730
|
+
onSort: y[2] || (y[2] = (I) => Re({ sortField: I.sortField, sortOrder: I.sortOrder })),
|
|
731
|
+
onRowDblclick: Qe
|
|
726
732
|
}, {
|
|
727
733
|
empty: K(() => [...y[7] || (y[7] = [
|
|
728
734
|
m("div", { class: "w-autocompletefk-empty" }, "Nenhum registro encontrado", -1)
|
|
@@ -732,21 +738,21 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
732
738
|
"selection-mode": "single",
|
|
733
739
|
"header-style": "width: 3rem"
|
|
734
740
|
}),
|
|
735
|
-
(o(!0), d(J, null,
|
|
736
|
-
key:
|
|
737
|
-
field:
|
|
738
|
-
header:
|
|
739
|
-
sortable:
|
|
740
|
-
style: ke(
|
|
741
|
+
(o(!0), d(J, null, ne(j.value, (I) => (o(), C(r(Me), {
|
|
742
|
+
key: I.field,
|
|
743
|
+
field: I.field,
|
|
744
|
+
header: I.header,
|
|
745
|
+
sortable: I.sortable ?? !0,
|
|
746
|
+
style: ke(I.style)
|
|
741
747
|
}, {
|
|
742
|
-
body: K(({ data:
|
|
743
|
-
|
|
748
|
+
body: K(({ data: ee }) => [
|
|
749
|
+
I.type ? (o(), C(ot, {
|
|
744
750
|
key: 0,
|
|
745
|
-
column:
|
|
746
|
-
value:
|
|
747
|
-
"row-data":
|
|
751
|
+
column: I,
|
|
752
|
+
value: ee[I.field],
|
|
753
|
+
"row-data": ee
|
|
748
754
|
}, null, 8, ["column", "value", "row-data"])) : (o(), d(J, { key: 1 }, [
|
|
749
|
-
Fe(
|
|
755
|
+
Fe(R(ee[I.field]), 1)
|
|
750
756
|
], 64))
|
|
751
757
|
]),
|
|
752
758
|
_: 2
|
|
@@ -756,34 +762,34 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
756
762
|
header: "",
|
|
757
763
|
style: { width: "6rem" }
|
|
758
764
|
}, {
|
|
759
|
-
body: K(({ data:
|
|
765
|
+
body: K(({ data: I }) => [
|
|
760
766
|
m("div", gl, [
|
|
761
|
-
g.value ? he((o(), C(r(
|
|
767
|
+
g.value ? he((o(), C(r(L), {
|
|
762
768
|
key: 0,
|
|
763
769
|
icon: "pi pi-pencil",
|
|
764
770
|
text: "",
|
|
765
771
|
rounded: "",
|
|
766
772
|
size: "small",
|
|
767
|
-
onClick: (
|
|
773
|
+
onClick: (ee) => Se(I)
|
|
768
774
|
}, null, 8, ["onClick"])), [
|
|
769
775
|
[
|
|
770
|
-
|
|
776
|
+
N,
|
|
771
777
|
"Editar",
|
|
772
778
|
void 0,
|
|
773
779
|
{ top: !0 }
|
|
774
780
|
]
|
|
775
781
|
]) : b("", !0),
|
|
776
|
-
l.value ? he((o(), C(r(
|
|
782
|
+
l.value ? he((o(), C(r(L), {
|
|
777
783
|
key: 1,
|
|
778
784
|
icon: "pi pi-trash",
|
|
779
785
|
text: "",
|
|
780
786
|
rounded: "",
|
|
781
787
|
size: "small",
|
|
782
788
|
severity: "danger",
|
|
783
|
-
onClick: (
|
|
789
|
+
onClick: (ee) => St(I)
|
|
784
790
|
}, null, 8, ["onClick"])), [
|
|
785
791
|
[
|
|
786
|
-
|
|
792
|
+
N,
|
|
787
793
|
"Excluir",
|
|
788
794
|
void 0,
|
|
789
795
|
{ top: !0 }
|
|
@@ -800,25 +806,25 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
800
806
|
]),
|
|
801
807
|
_: 1
|
|
802
808
|
}, 8, ["visible", "header"]),
|
|
803
|
-
f.value ? (o(), C(
|
|
809
|
+
f.value ? (o(), C(xt, {
|
|
804
810
|
key: 0,
|
|
805
811
|
visible: M.value,
|
|
806
|
-
title:
|
|
807
|
-
fields:
|
|
812
|
+
title: Oe.value,
|
|
813
|
+
fields: le.value,
|
|
808
814
|
"form-data": xe,
|
|
809
815
|
"is-editing": Ae.value,
|
|
810
816
|
saving: q.value,
|
|
811
817
|
width: e.dialogWidth,
|
|
812
|
-
"onUpdate:visible": y[5] || (y[5] = (
|
|
813
|
-
M.value =
|
|
818
|
+
"onUpdate:visible": y[5] || (y[5] = (I) => {
|
|
819
|
+
M.value = I, I || (fe.value = null);
|
|
814
820
|
}),
|
|
815
|
-
"onUpdate:field":
|
|
816
|
-
onSave:
|
|
821
|
+
"onUpdate:field": Ct,
|
|
822
|
+
onSave: Vt
|
|
817
823
|
}, null, 8, ["visible", "title", "fields", "form-data", "is-editing", "saving", "width"])) : b("", !0)
|
|
818
824
|
], 64);
|
|
819
825
|
};
|
|
820
826
|
}
|
|
821
|
-
}), kl = { class: "w-datepicker" }, $l = { class: "w-datepicker-panel" }, xl = { class: "w-datepicker-actions" },
|
|
827
|
+
}), kl = { class: "w-datepicker" }, $l = { class: "w-datepicker-panel" }, xl = { class: "w-datepicker-actions" }, mt = /* @__PURE__ */ re({
|
|
822
828
|
__name: "WDatePicker",
|
|
823
829
|
props: {
|
|
824
830
|
modelValue: { default: null },
|
|
@@ -865,8 +871,8 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
865
871
|
V.key === "F2" && !t.disabled && (V.preventDefault(), F());
|
|
866
872
|
}
|
|
867
873
|
function Z(V) {
|
|
868
|
-
var
|
|
869
|
-
w(V ?? null), t.showTime || (
|
|
874
|
+
var ie;
|
|
875
|
+
w(V ?? null), t.showTime || (ie = D.value) == null || ie.hide();
|
|
870
876
|
}
|
|
871
877
|
function F() {
|
|
872
878
|
w(i.today());
|
|
@@ -875,11 +881,11 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
875
881
|
var V;
|
|
876
882
|
w(null), (V = D.value) == null || V.hide();
|
|
877
883
|
}
|
|
878
|
-
function
|
|
884
|
+
function z(V) {
|
|
879
885
|
var O;
|
|
880
886
|
t.disabled || (O = D.value) == null || O.toggle(V);
|
|
881
887
|
}
|
|
882
|
-
return
|
|
888
|
+
return nt(() => {
|
|
883
889
|
t.autonow && t.modelValue == null && F();
|
|
884
890
|
}), (V, O) => (o(), d("div", kl, [
|
|
885
891
|
S(r(Ue), null, {
|
|
@@ -887,7 +893,7 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
887
893
|
he(S(r(ye), {
|
|
888
894
|
id: e.inputId,
|
|
889
895
|
modelValue: v.value,
|
|
890
|
-
"onUpdate:modelValue": O[0] || (O[0] = (
|
|
896
|
+
"onUpdate:modelValue": O[0] || (O[0] = (ie) => v.value = ie),
|
|
891
897
|
placeholder: e.placeholder ?? r(i).placeholder(),
|
|
892
898
|
disabled: e.disabled,
|
|
893
899
|
invalid: e.invalid,
|
|
@@ -898,25 +904,25 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
898
904
|
onBlur: X,
|
|
899
905
|
onKeydown: Y
|
|
900
906
|
}, null, 8, ["id", "modelValue", "placeholder", "disabled", "invalid"]), [
|
|
901
|
-
[r(
|
|
907
|
+
[r(Je), x.value]
|
|
902
908
|
]),
|
|
903
909
|
S(r(Be), {
|
|
904
910
|
class: Q(["pi pi-calendar w-datepicker-icon", { "w-datepicker-icon-disabled": e.disabled }]),
|
|
905
911
|
role: "button",
|
|
906
912
|
tabindex: "-1",
|
|
907
913
|
"aria-label": "Abrir calendário",
|
|
908
|
-
onClick:
|
|
914
|
+
onClick: z
|
|
909
915
|
}, null, 8, ["class"])
|
|
910
916
|
]),
|
|
911
917
|
_: 1
|
|
912
918
|
}),
|
|
913
|
-
S(r(
|
|
919
|
+
S(r(yt), {
|
|
914
920
|
ref_key: "op",
|
|
915
921
|
ref: D
|
|
916
922
|
}, {
|
|
917
923
|
default: K(() => [
|
|
918
924
|
m("div", $l, [
|
|
919
|
-
S(r(
|
|
925
|
+
S(r(wt), {
|
|
920
926
|
"model-value": $.value ?? void 0,
|
|
921
927
|
inline: "",
|
|
922
928
|
"show-time": e.showTime,
|
|
@@ -926,13 +932,13 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
926
932
|
"onUpdate:modelValue": Z
|
|
927
933
|
}, null, 8, ["model-value", "show-time", "min-date", "max-date"]),
|
|
928
934
|
m("div", xl, [
|
|
929
|
-
S(r(
|
|
935
|
+
S(r(L), {
|
|
930
936
|
label: "Hoje",
|
|
931
937
|
text: "",
|
|
932
938
|
size: "small",
|
|
933
939
|
onClick: F
|
|
934
940
|
}),
|
|
935
|
-
e.showClear ? (o(), C(r(
|
|
941
|
+
e.showClear ? (o(), C(r(L), {
|
|
936
942
|
key: 0,
|
|
937
943
|
label: "Limpar",
|
|
938
944
|
text: "",
|
|
@@ -983,9 +989,9 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
983
989
|
class: "w-money-input"
|
|
984
990
|
}, {
|
|
985
991
|
default: K(() => [
|
|
986
|
-
i.value ? (o(), C(r(
|
|
992
|
+
i.value ? (o(), C(r(rt), { key: 0 }, {
|
|
987
993
|
default: K(() => [
|
|
988
|
-
Fe(
|
|
994
|
+
Fe(R(i.value), 1)
|
|
989
995
|
]),
|
|
990
996
|
_: 1
|
|
991
997
|
})) : b("", !0),
|
|
@@ -998,9 +1004,9 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
998
1004
|
invalid: e.invalid,
|
|
999
1005
|
onInput: D
|
|
1000
1006
|
}, null, 8, ["model-value", "placeholder", "disabled", "invalid"]),
|
|
1001
|
-
e.suffix ? (o(), C(r(
|
|
1007
|
+
e.suffix ? (o(), C(r(rt), { key: 1 }, {
|
|
1002
1008
|
default: K(() => [
|
|
1003
|
-
Fe(
|
|
1009
|
+
Fe(R(e.suffix), 1)
|
|
1004
1010
|
]),
|
|
1005
1011
|
_: 1
|
|
1006
1012
|
})) : b("", !0)
|
|
@@ -1018,7 +1024,7 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
1018
1024
|
onInput: D
|
|
1019
1025
|
}, null, 8, ["model-value", "placeholder", "disabled", "invalid"]));
|
|
1020
1026
|
}
|
|
1021
|
-
}), Vl = { class: "w-imgcropper" }, Sl = ["src"], Dl = { class: "w-imgcropper-actions" }, El = ["accept"], Pl = { class: "w-imgcropper-stage" }, Fl = ["src"], Il = { class: "w-imgcropper-zoom" },
|
|
1027
|
+
}), Vl = { class: "w-imgcropper" }, Sl = ["src"], Dl = { class: "w-imgcropper-actions" }, El = ["accept"], Pl = { class: "w-imgcropper-stage" }, Fl = ["src"], Il = { class: "w-imgcropper-zoom" }, Ge = 300, Rl = /* @__PURE__ */ re({
|
|
1022
1028
|
__name: "WImageCropper",
|
|
1023
1029
|
props: {
|
|
1024
1030
|
modelValue: { default: null },
|
|
@@ -1052,8 +1058,8 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
1052
1058
|
}
|
|
1053
1059
|
let E = "image.png", T = "image/png", w = null;
|
|
1054
1060
|
function H(p) {
|
|
1055
|
-
var
|
|
1056
|
-
const g = p.target, l = (
|
|
1061
|
+
var le;
|
|
1062
|
+
const g = p.target, l = (le = g.files) == null ? void 0 : le[0];
|
|
1057
1063
|
if (g.value = "", !l) return;
|
|
1058
1064
|
if (!x(l)) {
|
|
1059
1065
|
n("error", "Tipo de arquivo não suportado.");
|
|
@@ -1068,27 +1074,27 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
1068
1074
|
k.onload = () => {
|
|
1069
1075
|
const j = new Image();
|
|
1070
1076
|
j.onload = () => {
|
|
1071
|
-
w = j, F.value = j.naturalWidth, A.value = j.naturalHeight,
|
|
1077
|
+
w = j, F.value = j.naturalWidth, A.value = j.naturalHeight, z.value = 1, Z.value = j.src, V.x = (ie.value - se.value) / 2, V.y = (ve.value - ge.value) / 2, Y.value = !0;
|
|
1072
1078
|
}, j.onerror = () => n("error", "Não foi possível carregar a imagem."), j.src = String(k.result);
|
|
1073
1079
|
}, k.onerror = () => n("error", "Falha ao ler o arquivo."), k.readAsDataURL(l);
|
|
1074
1080
|
}
|
|
1075
1081
|
function X() {
|
|
1076
1082
|
n("update:modelValue", null);
|
|
1077
1083
|
}
|
|
1078
|
-
const Y = U(!1), Z = U(""), F = U(0), A = U(0),
|
|
1079
|
-
() => F.value && A.value ? Math.max(
|
|
1080
|
-
), de = P(() => De.value *
|
|
1084
|
+
const Y = U(!1), Z = U(""), F = U(0), A = U(0), z = U(1), V = Ee({ x: 0, y: 0 }), O = P(() => t.circular ? 1 : t.aspectRatio || 1), ie = P(() => O.value >= 1 ? Ge : Math.round(Ge * O.value)), ve = P(() => O.value >= 1 ? Math.round(Ge / O.value) : Ge), De = P(
|
|
1085
|
+
() => F.value && A.value ? Math.max(ie.value / F.value, ve.value / A.value) : 1
|
|
1086
|
+
), de = P(() => De.value * z.value), se = P(() => F.value * de.value), ge = P(() => A.value * de.value);
|
|
1081
1087
|
function ce() {
|
|
1082
|
-
V.x = Math.min(0, Math.max(
|
|
1088
|
+
V.x = Math.min(0, Math.max(ie.value - se.value, V.x)), V.y = Math.min(0, Math.max(ve.value - ge.value, V.y));
|
|
1083
1089
|
}
|
|
1084
|
-
Pe(
|
|
1090
|
+
Pe(z, ce);
|
|
1085
1091
|
const be = P(() => ({
|
|
1086
|
-
width: `${
|
|
1092
|
+
width: `${se.value}px`,
|
|
1087
1093
|
height: `${ge.value}px`,
|
|
1088
1094
|
transform: `translate(${V.x}px, ${V.y}px)`
|
|
1089
1095
|
})), we = U(!1);
|
|
1090
1096
|
let ue = { x: 0, y: 0, ox: 0, oy: 0 };
|
|
1091
|
-
function
|
|
1097
|
+
function te(p) {
|
|
1092
1098
|
var g, l;
|
|
1093
1099
|
we.value = !0, (l = (g = p.currentTarget).setPointerCapture) == null || l.call(g, p.pointerId), ue = { x: p.clientX, y: p.clientY, ox: V.x, oy: V.y };
|
|
1094
1100
|
}
|
|
@@ -1107,14 +1113,14 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
1107
1113
|
}
|
|
1108
1114
|
function f() {
|
|
1109
1115
|
if (!w) return;
|
|
1110
|
-
const p = de.value, g = -V.x / p, l = -V.y / p, k =
|
|
1111
|
-
j.width = Math.max(1, Math.round(k)), j.height = Math.max(1, Math.round(
|
|
1112
|
-
const
|
|
1113
|
-
if (!
|
|
1116
|
+
const p = de.value, g = -V.x / p, l = -V.y / p, k = ie.value / p, le = ve.value / p, j = document.createElement("canvas");
|
|
1117
|
+
j.width = Math.max(1, Math.round(k)), j.height = Math.max(1, Math.round(le));
|
|
1118
|
+
const ae = j.getContext("2d");
|
|
1119
|
+
if (!ae) {
|
|
1114
1120
|
n("error", "Canvas indisponível neste ambiente.");
|
|
1115
1121
|
return;
|
|
1116
1122
|
}
|
|
1117
|
-
t.circular && (
|
|
1123
|
+
t.circular && (ae.beginPath(), ae.ellipse(
|
|
1118
1124
|
j.width / 2,
|
|
1119
1125
|
j.height / 2,
|
|
1120
1126
|
j.width / 2,
|
|
@@ -1122,15 +1128,15 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
1122
1128
|
0,
|
|
1123
1129
|
0,
|
|
1124
1130
|
Math.PI * 2
|
|
1125
|
-
),
|
|
1131
|
+
), ae.clip()), ae.drawImage(w, g, l, k, le, 0, 0, j.width, j.height);
|
|
1126
1132
|
const _ = me();
|
|
1127
1133
|
j.toBlob(
|
|
1128
|
-
(
|
|
1129
|
-
if (!
|
|
1134
|
+
(oe) => {
|
|
1135
|
+
if (!oe) {
|
|
1130
1136
|
n("error", "Falha ao processar a imagem.");
|
|
1131
1137
|
return;
|
|
1132
1138
|
}
|
|
1133
|
-
n("update:modelValue", new File([
|
|
1139
|
+
n("update:modelValue", new File([oe], $e(_), { type: _ })), Y.value = !1;
|
|
1134
1140
|
},
|
|
1135
1141
|
_,
|
|
1136
1142
|
0.92
|
|
@@ -1148,7 +1154,7 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
1148
1154
|
class: "w-imgcropper-img"
|
|
1149
1155
|
}, null, 8, Sl),
|
|
1150
1156
|
m("div", Dl, [
|
|
1151
|
-
S(r(
|
|
1157
|
+
S(r(L), {
|
|
1152
1158
|
type: "button",
|
|
1153
1159
|
icon: "pi pi-pencil",
|
|
1154
1160
|
rounded: "",
|
|
@@ -1156,7 +1162,7 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
1156
1162
|
"aria-label": "Trocar imagem",
|
|
1157
1163
|
onClick: D
|
|
1158
1164
|
}),
|
|
1159
|
-
S(r(
|
|
1165
|
+
S(r(L), {
|
|
1160
1166
|
type: "button",
|
|
1161
1167
|
icon: "pi pi-trash",
|
|
1162
1168
|
rounded: "",
|
|
@@ -1185,7 +1191,7 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
1185
1191
|
class: "w-imgcropper-file",
|
|
1186
1192
|
onChange: H
|
|
1187
1193
|
}, null, 40, El),
|
|
1188
|
-
S(r(
|
|
1194
|
+
S(r(Ze), {
|
|
1189
1195
|
visible: Y.value,
|
|
1190
1196
|
"onUpdate:visible": g[2] || (g[2] = (l) => Y.value = l),
|
|
1191
1197
|
modal: "",
|
|
@@ -1194,13 +1200,13 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
1194
1200
|
style: { width: "auto" }
|
|
1195
1201
|
}, {
|
|
1196
1202
|
footer: K(() => [
|
|
1197
|
-
S(r(
|
|
1203
|
+
S(r(L), {
|
|
1198
1204
|
type: "button",
|
|
1199
1205
|
label: "Cancelar",
|
|
1200
1206
|
text: "",
|
|
1201
1207
|
onClick: g[1] || (g[1] = (l) => Y.value = !1)
|
|
1202
1208
|
}),
|
|
1203
|
-
S(r(
|
|
1209
|
+
S(r(L), {
|
|
1204
1210
|
type: "button",
|
|
1205
1211
|
label: "Confirmar",
|
|
1206
1212
|
onClick: f
|
|
@@ -1210,8 +1216,8 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
1210
1216
|
m("div", Pl, [
|
|
1211
1217
|
m("div", {
|
|
1212
1218
|
class: Q(["w-imgcropper-viewport", { "is-circular": e.circular }]),
|
|
1213
|
-
style: ke({ width: `${
|
|
1214
|
-
onPointerdown:
|
|
1219
|
+
style: ke({ width: `${ie.value}px`, height: `${ve.value}px` }),
|
|
1220
|
+
onPointerdown: te,
|
|
1215
1221
|
onPointermove: pe,
|
|
1216
1222
|
onPointerup: W,
|
|
1217
1223
|
onPointerleave: W
|
|
@@ -1231,8 +1237,8 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
1231
1237
|
m("div", Il, [
|
|
1232
1238
|
g[4] || (g[4] = m("i", { class: "pi pi-search-minus" }, null, -1)),
|
|
1233
1239
|
S(r(Ht), {
|
|
1234
|
-
modelValue:
|
|
1235
|
-
"onUpdate:modelValue": g[0] || (g[0] = (l) =>
|
|
1240
|
+
modelValue: z.value,
|
|
1241
|
+
"onUpdate:modelValue": g[0] || (g[0] = (l) => z.value = l),
|
|
1236
1242
|
min: 1,
|
|
1237
1243
|
max: 4,
|
|
1238
1244
|
step: 0.01,
|
|
@@ -1276,9 +1282,9 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
1276
1282
|
function E(A) {
|
|
1277
1283
|
return String(A[t.optionLabel] ?? "");
|
|
1278
1284
|
}
|
|
1279
|
-
function T(A,
|
|
1280
|
-
if (!
|
|
1281
|
-
const V =
|
|
1285
|
+
function T(A, z) {
|
|
1286
|
+
if (!z) return !0;
|
|
1287
|
+
const V = z.toLowerCase();
|
|
1282
1288
|
return D.value.some(
|
|
1283
1289
|
(O) => String(A[O] ?? "").toLowerCase().includes(V)
|
|
1284
1290
|
);
|
|
@@ -1293,10 +1299,10 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
1293
1299
|
}
|
|
1294
1300
|
function Y(A) {
|
|
1295
1301
|
if (t.disabled) return;
|
|
1296
|
-
const
|
|
1302
|
+
const z = x(A);
|
|
1297
1303
|
n(
|
|
1298
1304
|
"update:selected",
|
|
1299
|
-
t.selected.filter((V) => V !==
|
|
1305
|
+
t.selected.filter((V) => V !== z)
|
|
1300
1306
|
);
|
|
1301
1307
|
}
|
|
1302
1308
|
function Z() {
|
|
@@ -1305,20 +1311,20 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
1305
1311
|
function F() {
|
|
1306
1312
|
t.disabled || n("update:selected", []);
|
|
1307
1313
|
}
|
|
1308
|
-
return (A,
|
|
1314
|
+
return (A, z) => (o(), d("div", {
|
|
1309
1315
|
class: Q(["w-transfer", { "w-transfer--disabled": e.disabled }])
|
|
1310
1316
|
}, [
|
|
1311
1317
|
m("div", Ul, [
|
|
1312
1318
|
m("div", Bl, [
|
|
1313
|
-
|
|
1314
|
-
m("span", Tl,
|
|
1319
|
+
z[2] || (z[2] = m("span", { class: "w-transfer__title" }, "Disponíveis", -1)),
|
|
1320
|
+
m("span", Tl, R(w.value.length), 1)
|
|
1315
1321
|
]),
|
|
1316
1322
|
S(r(Ue), { class: "w-transfer__search" }, {
|
|
1317
1323
|
default: K(() => [
|
|
1318
1324
|
S(r(Be), { class: "pi pi-search" }),
|
|
1319
1325
|
S(r(ye), {
|
|
1320
1326
|
modelValue: i.value,
|
|
1321
|
-
"onUpdate:modelValue":
|
|
1327
|
+
"onUpdate:modelValue": z[0] || (z[0] = (V) => i.value = V),
|
|
1322
1328
|
placeholder: "Buscar...",
|
|
1323
1329
|
fluid: ""
|
|
1324
1330
|
}, null, 8, ["modelValue"])
|
|
@@ -1326,19 +1332,19 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
1326
1332
|
_: 1
|
|
1327
1333
|
}),
|
|
1328
1334
|
m("ul", Nl, [
|
|
1329
|
-
(o(!0), d(J, null,
|
|
1335
|
+
(o(!0), d(J, null, ne(w.value, (V) => (o(), d("li", {
|
|
1330
1336
|
key: `a-${x(V)}`,
|
|
1331
1337
|
class: "w-transfer__item",
|
|
1332
1338
|
onClick: (O) => X(V)
|
|
1333
1339
|
}, [
|
|
1334
|
-
m("span", null,
|
|
1335
|
-
|
|
1340
|
+
m("span", null, R(E(V)), 1),
|
|
1341
|
+
z[3] || (z[3] = m("i", { class: "pi pi-angle-right" }, null, -1))
|
|
1336
1342
|
], 8, Ll))), 128)),
|
|
1337
1343
|
w.value.length ? b("", !0) : (o(), d("li", zl, "Nenhum item"))
|
|
1338
1344
|
])
|
|
1339
1345
|
]),
|
|
1340
1346
|
m("div", Ol, [
|
|
1341
|
-
S(r(
|
|
1347
|
+
S(r(L), {
|
|
1342
1348
|
type: "button",
|
|
1343
1349
|
icon: "pi pi-angle-double-right",
|
|
1344
1350
|
text: "",
|
|
@@ -1346,7 +1352,7 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
1346
1352
|
disabled: e.disabled || !w.value.length,
|
|
1347
1353
|
onClick: Z
|
|
1348
1354
|
}, null, 8, ["disabled"]),
|
|
1349
|
-
S(r(
|
|
1355
|
+
S(r(L), {
|
|
1350
1356
|
type: "button",
|
|
1351
1357
|
icon: "pi pi-angle-double-left",
|
|
1352
1358
|
text: "",
|
|
@@ -1357,15 +1363,15 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
1357
1363
|
]),
|
|
1358
1364
|
m("div", Wl, [
|
|
1359
1365
|
m("div", jl, [
|
|
1360
|
-
|
|
1361
|
-
m("span", ql,
|
|
1366
|
+
z[4] || (z[4] = m("span", { class: "w-transfer__title" }, "Selecionados", -1)),
|
|
1367
|
+
m("span", ql, R(H.value.length), 1)
|
|
1362
1368
|
]),
|
|
1363
1369
|
S(r(Ue), { class: "w-transfer__search" }, {
|
|
1364
1370
|
default: K(() => [
|
|
1365
1371
|
S(r(Be), { class: "pi pi-search" }),
|
|
1366
1372
|
S(r(ye), {
|
|
1367
1373
|
modelValue: v.value,
|
|
1368
|
-
"onUpdate:modelValue":
|
|
1374
|
+
"onUpdate:modelValue": z[1] || (z[1] = (V) => v.value = V),
|
|
1369
1375
|
placeholder: "Buscar...",
|
|
1370
1376
|
fluid: ""
|
|
1371
1377
|
}, null, 8, ["modelValue"])
|
|
@@ -1373,13 +1379,13 @@ const pl = ["disabled"], hl = { class: "w-autocompletefk-toolbar" }, yl = { clas
|
|
|
1373
1379
|
_: 1
|
|
1374
1380
|
}),
|
|
1375
1381
|
m("ul", Kl, [
|
|
1376
|
-
(o(!0), d(J, null,
|
|
1382
|
+
(o(!0), d(J, null, ne(H.value, (V) => (o(), d("li", {
|
|
1377
1383
|
key: `s-${x(V)}`,
|
|
1378
1384
|
class: "w-transfer__item",
|
|
1379
1385
|
onClick: (O) => Y(V)
|
|
1380
1386
|
}, [
|
|
1381
|
-
|
|
1382
|
-
m("span", null,
|
|
1387
|
+
z[5] || (z[5] = m("i", { class: "pi pi-angle-left" }, null, -1)),
|
|
1388
|
+
m("span", null, R(E(V)), 1)
|
|
1383
1389
|
], 8, Hl))), 128)),
|
|
1384
1390
|
H.value.length ? b("", !0) : (o(), d("li", Gl, "Nenhum item"))
|
|
1385
1391
|
])
|
|
@@ -1447,12 +1453,12 @@ const Xl = { class: "w-crud-form" }, Zl = {
|
|
|
1447
1453
|
if (!k)
|
|
1448
1454
|
D[f.field] = "CEP não encontrado. Preencha os campos manualmente.";
|
|
1449
1455
|
else {
|
|
1450
|
-
const
|
|
1451
|
-
for (const
|
|
1452
|
-
const _ =
|
|
1456
|
+
const le = f.cepFields || {}, j = Object.keys(le);
|
|
1457
|
+
for (const ae of j) {
|
|
1458
|
+
const _ = le[ae];
|
|
1453
1459
|
if (!_) continue;
|
|
1454
|
-
const
|
|
1455
|
-
(
|
|
1460
|
+
const oe = n.formData[_];
|
|
1461
|
+
(oe == null || oe === "") && i("update:field", _, k[ae] ?? "");
|
|
1456
1462
|
}
|
|
1457
1463
|
}
|
|
1458
1464
|
} finally {
|
|
@@ -1498,7 +1504,7 @@ const Xl = { class: "w-crud-form" }, Zl = {
|
|
|
1498
1504
|
if (f)
|
|
1499
1505
|
return f.replace(/9/g, "#").replace(/a/g, "S").replace(/\*/g, "X");
|
|
1500
1506
|
}
|
|
1501
|
-
function
|
|
1507
|
+
function z(f) {
|
|
1502
1508
|
if (!f) return "";
|
|
1503
1509
|
const p = String(f).replace(/\D/g, "").slice(0, 14);
|
|
1504
1510
|
return p.length <= 11 ? p.replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d{1,2})$/, "$1-$2") : p.replace(/(\d{2})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1/$2").replace(/(\d{4})(\d{1,2})$/, "$1-$2");
|
|
@@ -1508,7 +1514,7 @@ const Xl = { class: "w-crud-form" }, Zl = {
|
|
|
1508
1514
|
i("update:field", f, g);
|
|
1509
1515
|
}
|
|
1510
1516
|
const O = Ee({});
|
|
1511
|
-
function
|
|
1517
|
+
function ie(f) {
|
|
1512
1518
|
const p = n.formData[f.field];
|
|
1513
1519
|
if (p == null) return null;
|
|
1514
1520
|
const g = f.optionValue || "value";
|
|
@@ -1520,14 +1526,14 @@ const Xl = { class: "w-crud-form" }, Zl = {
|
|
|
1520
1526
|
function De(f, p) {
|
|
1521
1527
|
const g = (p.query || "").toLowerCase(), l = Y(f.options) || [], k = f.optionLabel || "label";
|
|
1522
1528
|
O[f.field] = l.filter(
|
|
1523
|
-
(
|
|
1529
|
+
(le) => String(le[k] || "").toLowerCase().includes(g)
|
|
1524
1530
|
);
|
|
1525
1531
|
}
|
|
1526
1532
|
function de(f, p) {
|
|
1527
1533
|
const g = f.optionValue || "value";
|
|
1528
1534
|
i("update:field", f.field, p.value[g]);
|
|
1529
1535
|
}
|
|
1530
|
-
function
|
|
1536
|
+
function se(f) {
|
|
1531
1537
|
const p = n.formData[f.field];
|
|
1532
1538
|
return p ? String(p).replace("#", "") : "FFFFFF";
|
|
1533
1539
|
}
|
|
@@ -1560,7 +1566,7 @@ const Xl = { class: "w-crud-form" }, Zl = {
|
|
|
1560
1566
|
function ue() {
|
|
1561
1567
|
Object.keys(v).forEach((f) => delete v[f]);
|
|
1562
1568
|
}
|
|
1563
|
-
function
|
|
1569
|
+
function te(f) {
|
|
1564
1570
|
return Math.max(1, Math.floor(f.columns ?? n.columns));
|
|
1565
1571
|
}
|
|
1566
1572
|
function pe(f, p) {
|
|
@@ -1568,47 +1574,47 @@ const Xl = { class: "w-crud-form" }, Zl = {
|
|
|
1568
1574
|
return g == null || g === "full" ? p : g === 0.5 ? Math.max(1, Math.round(p / 2)) : Math.min(Math.max(1, Math.floor(g)), p);
|
|
1569
1575
|
}
|
|
1570
1576
|
function W(f, p) {
|
|
1571
|
-
return { "--w-col-span": pe(f,
|
|
1577
|
+
return { "--w-col-span": pe(f, te(p)) };
|
|
1572
1578
|
}
|
|
1573
1579
|
function me(f, p) {
|
|
1574
|
-
return pe(f,
|
|
1580
|
+
return pe(f, te(p)) === te(p) ? "w-crud-form-col-full" : "w-crud-form-col-half";
|
|
1575
1581
|
}
|
|
1576
1582
|
const $e = P(() => {
|
|
1577
|
-
var l, k,
|
|
1583
|
+
var l, k, le, j, ae;
|
|
1578
1584
|
const f = /* @__PURE__ */ new Map(), p = [], g = /* @__PURE__ */ new Map();
|
|
1579
1585
|
for (const _ of T.value) {
|
|
1580
|
-
const
|
|
1581
|
-
f.has(
|
|
1582
|
-
id:
|
|
1586
|
+
const oe = ((l = _.fieldGroup) == null ? void 0 : l.id) ?? "__default__";
|
|
1587
|
+
f.has(oe) || (f.set(oe, {
|
|
1588
|
+
id: oe,
|
|
1583
1589
|
title: (k = _.fieldGroup) == null ? void 0 : k.title,
|
|
1584
|
-
description: (
|
|
1590
|
+
description: (le = _.fieldGroup) == null ? void 0 : le.description,
|
|
1585
1591
|
columns: (j = _.fieldGroup) == null ? void 0 : j.columns,
|
|
1586
1592
|
fields: []
|
|
1587
|
-
}), p.push(
|
|
1593
|
+
}), p.push(oe), ((ae = _.fieldGroup) == null ? void 0 : ae.order) != null && g.set(oe, _.fieldGroup.order)), f.get(oe).fields.push(_);
|
|
1588
1594
|
}
|
|
1589
|
-
return p.slice().sort((_,
|
|
1590
|
-
const Ie = g.get(_), Re = g.get(
|
|
1591
|
-
return Ie != null && Re != null ? Ie - Re : Ie != null ? -1 : Re != null ? 1 : p.indexOf(_) - p.indexOf(
|
|
1595
|
+
return p.slice().sort((_, oe) => {
|
|
1596
|
+
const Ie = g.get(_), Re = g.get(oe);
|
|
1597
|
+
return Ie != null && Re != null ? Ie - Re : Ie != null ? -1 : Re != null ? 1 : p.indexOf(_) - p.indexOf(oe);
|
|
1592
1598
|
}).map((_) => f.get(_));
|
|
1593
1599
|
});
|
|
1594
1600
|
return a({ validateAll: we, clearErrors: ue }), (f, p) => (o(), d("div", Xl, [
|
|
1595
|
-
(o(!0), d(J, null,
|
|
1601
|
+
(o(!0), d(J, null, ne($e.value, (g) => (o(), d("div", {
|
|
1596
1602
|
key: g.id,
|
|
1597
1603
|
class: "w-crud-form-group"
|
|
1598
1604
|
}, [
|
|
1599
1605
|
g.title ? (o(), d("div", Zl, [
|
|
1600
|
-
m("h3", Ql,
|
|
1601
|
-
g.description ? (o(), d("p", _l,
|
|
1606
|
+
m("h3", Ql, R(g.title), 1),
|
|
1607
|
+
g.description ? (o(), d("p", _l, R(g.description), 1)) : b("", !0)
|
|
1602
1608
|
])) : b("", !0),
|
|
1603
1609
|
m("div", {
|
|
1604
1610
|
class: "w-crud-form-fields",
|
|
1605
|
-
style: ke({ "--w-form-cols":
|
|
1611
|
+
style: ke({ "--w-form-cols": te(g) })
|
|
1606
1612
|
}, [
|
|
1607
|
-
(o(!0), d(J, null,
|
|
1613
|
+
(o(!0), d(J, null, ne(g.fields, (l) => B(f.$slots, `field-${l.field}`, {
|
|
1608
1614
|
field: l,
|
|
1609
1615
|
formData: e.formData,
|
|
1610
1616
|
isEditing: e.isEditing,
|
|
1611
|
-
setFormField: (k,
|
|
1617
|
+
setFormField: (k, le) => i("update:field", k, le)
|
|
1612
1618
|
}, () => [
|
|
1613
1619
|
l.type === "switch" ? (o(), d("div", {
|
|
1614
1620
|
key: 0,
|
|
@@ -1620,19 +1626,19 @@ const Xl = { class: "w-crud-form" }, Zl = {
|
|
|
1620
1626
|
disabled: w(l),
|
|
1621
1627
|
"onUpdate:modelValue": (k) => i("update:field", l.field, k)
|
|
1622
1628
|
}, null, 8, ["model-value", "disabled", "onUpdate:modelValue"]),
|
|
1623
|
-
m("label", ea,
|
|
1629
|
+
m("label", ea, R(l.switchLabel || l.label), 1)
|
|
1624
1630
|
], 4)) : l.type === "color" ? (o(), d("div", {
|
|
1625
1631
|
key: 1,
|
|
1626
1632
|
class: Q(me(l, g)),
|
|
1627
1633
|
style: ke(W(l, g))
|
|
1628
1634
|
}, [
|
|
1629
1635
|
m("label", ta, [
|
|
1630
|
-
Fe(
|
|
1636
|
+
Fe(R(l.label) + " ", 1),
|
|
1631
1637
|
l.required ? (o(), d("span", la, "*")) : b("", !0)
|
|
1632
1638
|
]),
|
|
1633
1639
|
m("div", aa, [
|
|
1634
1640
|
S(r(Wt), {
|
|
1635
|
-
"model-value":
|
|
1641
|
+
"model-value": se(l),
|
|
1636
1642
|
disabled: w(l),
|
|
1637
1643
|
"onUpdate:modelValue": (k) => ge(l, k)
|
|
1638
1644
|
}, null, 8, ["model-value", "disabled", "onUpdate:modelValue"]),
|
|
@@ -1650,7 +1656,7 @@ const Xl = { class: "w-crud-form" }, Zl = {
|
|
|
1650
1656
|
class: Q(me(l, g)),
|
|
1651
1657
|
style: ke(W(l, g))
|
|
1652
1658
|
}, [
|
|
1653
|
-
m("label", oa,
|
|
1659
|
+
m("label", oa, R(l.label), 1),
|
|
1654
1660
|
B(f.$slots, `image-${l.field}`, {
|
|
1655
1661
|
field: l,
|
|
1656
1662
|
formData: e.formData
|
|
@@ -1664,14 +1670,14 @@ const Xl = { class: "w-crud-form" }, Zl = {
|
|
|
1664
1670
|
}
|
|
1665
1671
|
}, null, 8, ["model-value", "accept", "onUpdate:modelValue", "onError"])
|
|
1666
1672
|
]),
|
|
1667
|
-
v[l.field] ? (o(), d("small", na,
|
|
1673
|
+
v[l.field] ? (o(), d("small", na, R(v[l.field]), 1)) : b("", !0)
|
|
1668
1674
|
], 6)) : l.type === "transfer" ? (o(), d("div", {
|
|
1669
1675
|
key: 3,
|
|
1670
1676
|
class: Q(me(l, g)),
|
|
1671
1677
|
style: ke(W(l, g))
|
|
1672
1678
|
}, [
|
|
1673
1679
|
m("label", ia, [
|
|
1674
|
-
Fe(
|
|
1680
|
+
Fe(R(l.label) + " ", 1),
|
|
1675
1681
|
l.required ? (o(), d("span", sa, "*")) : b("", !0)
|
|
1676
1682
|
]),
|
|
1677
1683
|
S(Yl, {
|
|
@@ -1689,7 +1695,7 @@ const Xl = { class: "w-crud-form" }, Zl = {
|
|
|
1689
1695
|
style: ke(W(l, g))
|
|
1690
1696
|
}, [
|
|
1691
1697
|
m("label", ra, [
|
|
1692
|
-
Fe(
|
|
1698
|
+
Fe(R(l.label) + " ", 1),
|
|
1693
1699
|
l.required ? (o(), d("span", ua, "*")) : b("", !0),
|
|
1694
1700
|
$[l.field] ? (o(), d("i", da)) : b("", !0)
|
|
1695
1701
|
]),
|
|
@@ -1702,7 +1708,7 @@ const Xl = { class: "w-crud-form" }, Zl = {
|
|
|
1702
1708
|
disabled: w(l),
|
|
1703
1709
|
"onUpdate:modelValue": (k) => i("update:field", l.field, k)
|
|
1704
1710
|
}, null, 8, ["model-value", "autofocus", "placeholder", "disabled", "onUpdate:modelValue"])), [
|
|
1705
|
-
[r(
|
|
1711
|
+
[r(Je), { mask: A(l.mask) }]
|
|
1706
1712
|
]) : !l.type || l.type === "text" ? (o(), C(r(ye), {
|
|
1707
1713
|
key: 1,
|
|
1708
1714
|
"model-value": e.formData[l.field],
|
|
@@ -1729,7 +1735,7 @@ const Xl = { class: "w-crud-form" }, Zl = {
|
|
|
1729
1735
|
placeholder: l.placeholder,
|
|
1730
1736
|
disabled: w(l),
|
|
1731
1737
|
"onUpdate:modelValue": (k) => i("update:field", l.field, k)
|
|
1732
|
-
}, null, 8, ["model-value", "feedback", "placeholder", "disabled", "onUpdate:modelValue"])) : l.type === "number" ? (o(), C(r(
|
|
1738
|
+
}, null, 8, ["model-value", "feedback", "placeholder", "disabled", "onUpdate:modelValue"])) : l.type === "number" ? (o(), C(r(Xe), {
|
|
1733
1739
|
key: 4,
|
|
1734
1740
|
"model-value": e.formData[l.field],
|
|
1735
1741
|
fluid: "",
|
|
@@ -1753,7 +1759,7 @@ const Xl = { class: "w-crud-form" }, Zl = {
|
|
|
1753
1759
|
placeholder: l.placeholder,
|
|
1754
1760
|
disabled: w(l),
|
|
1755
1761
|
"onUpdate:modelValue": (k) => i("update:field", l.field, k)
|
|
1756
|
-
}, null, 8, ["model-value", "decimals", "prefix", "suffix", "placeholder", "disabled", "onUpdate:modelValue"])) : l.type === "currency" ? (o(), C(r(
|
|
1762
|
+
}, null, 8, ["model-value", "decimals", "prefix", "suffix", "placeholder", "disabled", "onUpdate:modelValue"])) : l.type === "currency" ? (o(), C(r(Xe), {
|
|
1757
1763
|
key: 6,
|
|
1758
1764
|
"model-value": e.formData[l.field],
|
|
1759
1765
|
fluid: "",
|
|
@@ -1765,7 +1771,7 @@ const Xl = { class: "w-crud-form" }, Zl = {
|
|
|
1765
1771
|
placeholder: l.placeholder,
|
|
1766
1772
|
disabled: w(l),
|
|
1767
1773
|
"onUpdate:modelValue": (k) => i("update:field", l.field, k)
|
|
1768
|
-
}, null, 8, ["model-value", "min", "max", "placeholder", "disabled", "onUpdate:modelValue"])) : l.type === "select" ? (o(), C(r(
|
|
1774
|
+
}, null, 8, ["model-value", "min", "max", "placeholder", "disabled", "onUpdate:modelValue"])) : l.type === "select" ? (o(), C(r(at), {
|
|
1769
1775
|
key: 7,
|
|
1770
1776
|
"model-value": e.formData[l.field],
|
|
1771
1777
|
fluid: "",
|
|
@@ -1776,9 +1782,9 @@ const Xl = { class: "w-crud-form" }, Zl = {
|
|
|
1776
1782
|
placeholder: l.placeholder,
|
|
1777
1783
|
disabled: w(l),
|
|
1778
1784
|
"onUpdate:modelValue": (k) => i("update:field", l.field, k)
|
|
1779
|
-
}, null, 8, ["model-value", "options", "option-label", "option-value", "show-clear", "placeholder", "disabled", "onUpdate:modelValue"])) : l.type === "autocomplete" ? (o(), C(r(
|
|
1785
|
+
}, null, 8, ["model-value", "options", "option-label", "option-value", "show-clear", "placeholder", "disabled", "onUpdate:modelValue"])) : l.type === "autocomplete" ? (o(), C(r(bt), {
|
|
1780
1786
|
key: 8,
|
|
1781
|
-
"model-value":
|
|
1787
|
+
"model-value": ie(l),
|
|
1782
1788
|
fluid: "",
|
|
1783
1789
|
suggestions: ve(l),
|
|
1784
1790
|
"option-label": l.optionLabel || "label",
|
|
@@ -1806,7 +1812,7 @@ const Xl = { class: "w-crud-form" }, Zl = {
|
|
|
1806
1812
|
"can-edit": l.canEdit,
|
|
1807
1813
|
"can-delete": l.canDelete,
|
|
1808
1814
|
"onUpdate:modelValue": (k) => i("update:field", l.field, k)
|
|
1809
|
-
}, null, 8, ["model-value", "autofocus", "endpoint", "endpoint-params", "drilldown", "blocked-placeholder", "option-label", "placeholder", "disabled", "show-clear", "dialog-header", "crud-fields", "crud-columns", "can-create", "can-edit", "can-delete", "onUpdate:modelValue"])) : l.type === "date" ? (o(), C(
|
|
1815
|
+
}, null, 8, ["model-value", "autofocus", "endpoint", "endpoint-params", "drilldown", "blocked-placeholder", "option-label", "placeholder", "disabled", "show-clear", "dialog-header", "crud-fields", "crud-columns", "can-create", "can-edit", "can-delete", "onUpdate:modelValue"])) : l.type === "date" ? (o(), C(mt, {
|
|
1810
1816
|
key: 10,
|
|
1811
1817
|
"model-value": e.formData[l.field],
|
|
1812
1818
|
"value-format": "date",
|
|
@@ -1816,7 +1822,7 @@ const Xl = { class: "w-crud-form" }, Zl = {
|
|
|
1816
1822
|
placeholder: l.placeholder,
|
|
1817
1823
|
disabled: w(l),
|
|
1818
1824
|
"onUpdate:modelValue": (k) => i("update:field", l.field, k)
|
|
1819
|
-
}, null, 8, ["model-value", "autonow", "min-date", "max-date", "placeholder", "disabled", "onUpdate:modelValue"])) : l.type === "datetime" ? (o(), C(
|
|
1825
|
+
}, null, 8, ["model-value", "autonow", "min-date", "max-date", "placeholder", "disabled", "onUpdate:modelValue"])) : l.type === "datetime" ? (o(), C(mt, {
|
|
1820
1826
|
key: 11,
|
|
1821
1827
|
"model-value": e.formData[l.field],
|
|
1822
1828
|
"value-format": "date",
|
|
@@ -1829,7 +1835,7 @@ const Xl = { class: "w-crud-form" }, Zl = {
|
|
|
1829
1835
|
"onUpdate:modelValue": (k) => i("update:field", l.field, k)
|
|
1830
1836
|
}, null, 8, ["model-value", "autonow", "min-date", "max-date", "placeholder", "disabled", "onUpdate:modelValue"])) : l.type === "cpf_cnpj" ? (o(), C(r(ye), {
|
|
1831
1837
|
key: 12,
|
|
1832
|
-
"model-value":
|
|
1838
|
+
"model-value": z(e.formData[l.field]),
|
|
1833
1839
|
fluid: "",
|
|
1834
1840
|
maxlength: "18",
|
|
1835
1841
|
placeholder: l.placeholder || "000.000.000-00",
|
|
@@ -1847,7 +1853,7 @@ const Xl = { class: "w-crud-form" }, Zl = {
|
|
|
1847
1853
|
"onUpdate:modelValue": (k) => i("update:field", l.field, k),
|
|
1848
1854
|
onBlur: (k) => be(l)
|
|
1849
1855
|
}, null, 8, ["model-value", "placeholder", "disabled", "invalid", "onUpdate:modelValue", "onBlur"])), [
|
|
1850
|
-
[r(
|
|
1856
|
+
[r(Je), { mask: A(l.mask) }]
|
|
1851
1857
|
]) : l.type === "cep" ? he((o(), C(r(ye), {
|
|
1852
1858
|
key: 14,
|
|
1853
1859
|
"model-value": e.formData[l.field],
|
|
@@ -1857,7 +1863,7 @@ const Xl = { class: "w-crud-form" }, Zl = {
|
|
|
1857
1863
|
invalid: !!D[l.field],
|
|
1858
1864
|
onInput: (k) => E(l, k)
|
|
1859
1865
|
}, null, 8, ["model-value", "placeholder", "disabled", "invalid", "onInput"])), [
|
|
1860
|
-
[r(
|
|
1866
|
+
[r(Je), { mask: "#####-###" }]
|
|
1861
1867
|
]) : l.type === "textarea" ? (o(), C(r(zt), {
|
|
1862
1868
|
key: 15,
|
|
1863
1869
|
"model-value": e.formData[l.field],
|
|
@@ -1868,14 +1874,14 @@ const Xl = { class: "w-crud-form" }, Zl = {
|
|
|
1868
1874
|
disabled: w(l),
|
|
1869
1875
|
"onUpdate:modelValue": (k) => i("update:field", l.field, k)
|
|
1870
1876
|
}, null, 8, ["model-value", "autofocus", "rows", "placeholder", "disabled", "onUpdate:modelValue"])) : b("", !0),
|
|
1871
|
-
D[l.field] ? (o(), d("small", ca,
|
|
1877
|
+
D[l.field] ? (o(), d("small", ca, R(D[l.field]), 1)) : v[l.field] ? (o(), d("small", ma, R(v[l.field]), 1)) : b("", !0)
|
|
1872
1878
|
], 6))
|
|
1873
1879
|
], void 0, l.field)), 128))
|
|
1874
1880
|
], 4)
|
|
1875
1881
|
]))), 128))
|
|
1876
1882
|
]));
|
|
1877
1883
|
}
|
|
1878
|
-
}), va = { class: "w-crud-form-footer" },
|
|
1884
|
+
}), va = { class: "w-crud-form-footer" }, xt = /* @__PURE__ */ re({
|
|
1879
1885
|
__name: "WCrudFormDialog",
|
|
1880
1886
|
props: {
|
|
1881
1887
|
visible: { type: Boolean },
|
|
@@ -1904,7 +1910,7 @@ const Xl = { class: "w-crud-form" }, Zl = {
|
|
|
1904
1910
|
(E) => {
|
|
1905
1911
|
E && i.value && i.value.clearErrors();
|
|
1906
1912
|
}
|
|
1907
|
-
), (E, T) => (o(), C(r(
|
|
1913
|
+
), (E, T) => (o(), C(r(Ze), {
|
|
1908
1914
|
visible: e.visible,
|
|
1909
1915
|
header: e.title,
|
|
1910
1916
|
style: ke({ width: e.width }),
|
|
@@ -1932,17 +1938,17 @@ const Xl = { class: "w-crud-form" }, Zl = {
|
|
|
1932
1938
|
disabled: e.disabled,
|
|
1933
1939
|
columns: e.formColumns,
|
|
1934
1940
|
"onUpdate:field": T[0] || (T[0] = (w, H) => n("update:field", w, H))
|
|
1935
|
-
},
|
|
1936
|
-
|
|
1941
|
+
}, Ye({ _: 2 }, [
|
|
1942
|
+
ne(e.fields, (w) => ({
|
|
1937
1943
|
name: `field-${w.field}`,
|
|
1938
1944
|
fn: K((H) => [
|
|
1939
|
-
B(E.$slots, `field-${w.field}`,
|
|
1945
|
+
B(E.$slots, `field-${w.field}`, tt(lt(H)))
|
|
1940
1946
|
])
|
|
1941
1947
|
})),
|
|
1942
|
-
|
|
1948
|
+
ne(e.fields.filter((w) => w.type === "image"), (w) => ({
|
|
1943
1949
|
name: `image-${w.field}`,
|
|
1944
1950
|
fn: K((H) => [
|
|
1945
|
-
B(E.$slots, `image-${w.field}`,
|
|
1951
|
+
B(E.$slots, `image-${w.field}`, tt(lt(H)))
|
|
1946
1952
|
])
|
|
1947
1953
|
}))
|
|
1948
1954
|
]), 1032, ["fields", "form-data", "is-editing", "disabled", "columns"]),
|
|
@@ -1951,7 +1957,7 @@ const Xl = { class: "w-crud-form" }, Zl = {
|
|
|
1951
1957
|
saving: e.saving,
|
|
1952
1958
|
disabled: e.disabled
|
|
1953
1959
|
}, () => [
|
|
1954
|
-
S(r(
|
|
1960
|
+
S(r(L), {
|
|
1955
1961
|
type: "button",
|
|
1956
1962
|
label: e.disabled ? "Fechar" : "Cancelar",
|
|
1957
1963
|
severity: "secondary",
|
|
@@ -1960,7 +1966,7 @@ const Xl = { class: "w-crud-form" }, Zl = {
|
|
|
1960
1966
|
"data-kbd-skip": "",
|
|
1961
1967
|
onClick: T[1] || (T[1] = (w) => n("update:visible", !1))
|
|
1962
1968
|
}, null, 8, ["label", "disabled"]),
|
|
1963
|
-
e.disabled ? b("", !0) : (o(), C(r(
|
|
1969
|
+
e.disabled ? b("", !0) : (o(), C(r(L), {
|
|
1964
1970
|
key: 0,
|
|
1965
1971
|
type: "submit",
|
|
1966
1972
|
label: e.isEditing ? "Atualizar" : "Salvar",
|
|
@@ -1979,12 +1985,12 @@ function pa(e, a) {
|
|
|
1979
1985
|
const t = a[e.field];
|
|
1980
1986
|
return e.format ? e.format(t, a) : t == null ? "" : typeof t == "boolean" ? t ? "Sim" : "Não" : String(t);
|
|
1981
1987
|
}
|
|
1982
|
-
function
|
|
1988
|
+
function ft(e, a) {
|
|
1983
1989
|
return e.includes('"') || e.includes(a) || e.includes(`
|
|
1984
1990
|
`) || e.includes("\r") ? `"${e.replace(/"/g, '""')}"` : e;
|
|
1985
1991
|
}
|
|
1986
1992
|
function ha(e, a, t = {}) {
|
|
1987
|
-
const n = t.separator ?? ";", i = a.map(($) =>
|
|
1993
|
+
const n = t.separator ?? ";", i = a.map(($) => ft($.header, n)).join(n), v = e.map(($) => a.map((D) => ft(pa(D, $), n)).join(n));
|
|
1988
1994
|
return "\uFEFF" + [i, ...v].join(`\r
|
|
1989
1995
|
`);
|
|
1990
1996
|
}
|
|
@@ -2072,7 +2078,7 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2072
2078
|
},
|
|
2073
2079
|
emits: ["row-expand", "row-collapse", "print"],
|
|
2074
2080
|
setup(e, { emit: a }) {
|
|
2075
|
-
const t = e, n = a, i = It(), { formatNumber: v } =
|
|
2081
|
+
const t = e, n = a, i = It(), { formatNumber: v } = it(), $ = U({}), D = U(t.defaultView);
|
|
2076
2082
|
function x(c) {
|
|
2077
2083
|
return D.value === c;
|
|
2078
2084
|
}
|
|
@@ -2102,14 +2108,14 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2102
2108
|
function A(c, h) {
|
|
2103
2109
|
w.hidden = h ? w.hidden.filter((G) => G !== c) : [.../* @__PURE__ */ new Set([...w.hidden, c])], Z();
|
|
2104
2110
|
}
|
|
2105
|
-
const
|
|
2111
|
+
const z = P(
|
|
2106
2112
|
() => t.crud.config.columns.filter((c) => c.visible !== !1 && !w.hidden.includes(c.field)).map((c) => c.type === "number" && !c.align ? { ...c, align: "right" } : c.type === "currency" && !c.align ? { ...c, align: "right" } : c)
|
|
2107
2113
|
);
|
|
2108
2114
|
function V(c) {
|
|
2109
2115
|
if (c.align === "right") return "text-right";
|
|
2110
2116
|
if (c.align === "center") return "text-center";
|
|
2111
2117
|
}
|
|
2112
|
-
const O = P(() =>
|
|
2118
|
+
const O = P(() => z.value.slice(0, t.cardFields)), ie = P(() => {
|
|
2113
2119
|
const c = [];
|
|
2114
2120
|
return t.crud.config.canEdit !== !1 && c.push({ action: "edit", icon: "pi pi-pencil", tooltip: "Editar" }), t.crud.config.canCreate !== !1 && c.push({
|
|
2115
2121
|
action: "duplicate",
|
|
@@ -2123,7 +2129,7 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2123
2129
|
severity: "danger"
|
|
2124
2130
|
}), c;
|
|
2125
2131
|
}), ve = P(
|
|
2126
|
-
() => t.crud.config.rowActions ??
|
|
2132
|
+
() => t.crud.config.rowActions ?? ie.value
|
|
2127
2133
|
), De = P(
|
|
2128
2134
|
() => ve.value.length > 0 || !!i["row-actions"]
|
|
2129
2135
|
);
|
|
@@ -2132,14 +2138,14 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2132
2138
|
c.handler(h);
|
|
2133
2139
|
return;
|
|
2134
2140
|
}
|
|
2135
|
-
c.action === "edit" ? t.crud.openEditDialog(h) : c.action === "view" ? t.crud.openViewDialog(h) : c.action === "duplicate" ? t.crud.openDuplicateDialog(h) : c.action === "delete" && (i["delete-message"] ? (
|
|
2141
|
+
c.action === "edit" ? t.crud.openEditDialog(h) : c.action === "view" ? t.crud.openViewDialog(h) : c.action === "duplicate" ? t.crud.openDuplicateDialog(h) : c.action === "delete" && (i["delete-message"] ? (se.value = h, ge.value = !0) : t.crud.confirmDelete(h));
|
|
2136
2142
|
}
|
|
2137
|
-
const
|
|
2143
|
+
const se = U(null), ge = U(!1), ce = U(!1);
|
|
2138
2144
|
async function be() {
|
|
2139
|
-
if (
|
|
2145
|
+
if (se.value) {
|
|
2140
2146
|
ce.value = !0;
|
|
2141
2147
|
try {
|
|
2142
|
-
await t.crud.performDelete(
|
|
2148
|
+
await t.crud.performDelete(se.value), ge.value = !1, se.value = null;
|
|
2143
2149
|
} finally {
|
|
2144
2150
|
ce.value = !1;
|
|
2145
2151
|
}
|
|
@@ -2151,7 +2157,7 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2151
2157
|
function ue(c, h) {
|
|
2152
2158
|
return c.disabled ? c.disabled(h) : !1;
|
|
2153
2159
|
}
|
|
2154
|
-
const
|
|
2160
|
+
const te = P(() => {
|
|
2155
2161
|
const c = [];
|
|
2156
2162
|
return t.showKpi && c.push({
|
|
2157
2163
|
icon: t.kpiIcon,
|
|
@@ -2168,7 +2174,7 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2168
2174
|
}
|
|
2169
2175
|
const k = P(
|
|
2170
2176
|
() => t.crud.config.columns.filter((c) => c.filter)
|
|
2171
|
-
),
|
|
2177
|
+
), le = [
|
|
2172
2178
|
{ label: "Sim", value: !0 },
|
|
2173
2179
|
{ label: "Não", value: !1 }
|
|
2174
2180
|
];
|
|
@@ -2176,24 +2182,24 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2176
2182
|
var h;
|
|
2177
2183
|
return ((h = c.filter) == null ? void 0 : h.param) || c.field;
|
|
2178
2184
|
}
|
|
2179
|
-
const
|
|
2185
|
+
const ae = {};
|
|
2180
2186
|
function _(c, h) {
|
|
2181
2187
|
const G = j(c);
|
|
2182
|
-
|
|
2188
|
+
ae[G] && clearTimeout(ae[G]), ae[G] = setTimeout(() => t.crud.setColumnFilter(G, h || null), 300);
|
|
2183
2189
|
}
|
|
2184
|
-
const
|
|
2190
|
+
const oe = U(null);
|
|
2185
2191
|
function Ie(c) {
|
|
2186
2192
|
W.value = c;
|
|
2187
2193
|
}
|
|
2188
2194
|
function Re(c) {
|
|
2189
2195
|
var h;
|
|
2190
|
-
t.contextMenu && (W.value = c.data, (h =
|
|
2196
|
+
t.contextMenu && (W.value = c.data, (h = oe.value) == null || h.show(c.originalEvent));
|
|
2191
2197
|
}
|
|
2192
|
-
function
|
|
2198
|
+
function Le(c, h) {
|
|
2193
2199
|
var G;
|
|
2194
|
-
t.contextMenu && (c.preventDefault(), W.value = h, (G =
|
|
2200
|
+
t.contextMenu && (c.preventDefault(), W.value = h, (G = oe.value) == null || G.show(c));
|
|
2195
2201
|
}
|
|
2196
|
-
const
|
|
2202
|
+
const Qe = P(() => {
|
|
2197
2203
|
const c = W.value;
|
|
2198
2204
|
if (!c) return [];
|
|
2199
2205
|
const h = [
|
|
@@ -2221,7 +2227,7 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2221
2227
|
command: () => Ve()
|
|
2222
2228
|
})), h;
|
|
2223
2229
|
});
|
|
2224
|
-
function
|
|
2230
|
+
function ze() {
|
|
2225
2231
|
W.value && n("print", W.value);
|
|
2226
2232
|
}
|
|
2227
2233
|
const Ce = U(!1);
|
|
@@ -2229,26 +2235,26 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2229
2235
|
if (!Ce.value) {
|
|
2230
2236
|
Ce.value = !0;
|
|
2231
2237
|
try {
|
|
2232
|
-
const c = t.csvScope === "page" ? t.crud.items.value : await t.crud.fetchAll(t.csvPageSize), h = ha(c,
|
|
2238
|
+
const c = t.csvScope === "page" ? t.crud.items.value : await t.crud.fetchAll(t.csvPageSize), h = ha(c, z.value);
|
|
2233
2239
|
ya(h, t.csvFilename);
|
|
2234
2240
|
} finally {
|
|
2235
2241
|
Ce.value = !1;
|
|
2236
2242
|
}
|
|
2237
2243
|
}
|
|
2238
2244
|
}
|
|
2239
|
-
return
|
|
2245
|
+
return nt(() => {
|
|
2240
2246
|
Y(), t.autoInit && t.crud.init();
|
|
2241
2247
|
}), (c, h) => {
|
|
2242
|
-
const G =
|
|
2248
|
+
const G = pt("tooltip");
|
|
2243
2249
|
return o(), d("div", ga, [
|
|
2244
2250
|
e.showHeader ? (o(), d("div", ba, [
|
|
2245
2251
|
m("div", wa, [
|
|
2246
|
-
m("h1", ka,
|
|
2247
|
-
e.subtitle ? (o(), d("p", $a,
|
|
2252
|
+
m("h1", ka, R(e.title), 1),
|
|
2253
|
+
e.subtitle ? (o(), d("p", $a, R(e.subtitle), 1)) : b("", !0)
|
|
2248
2254
|
]),
|
|
2249
2255
|
m("div", xa, [
|
|
2250
2256
|
B(c.$slots, "header-actions"),
|
|
2251
|
-
pe.value && !e.actionRail ? (o(), C(r(
|
|
2257
|
+
pe.value && !e.actionRail ? (o(), C(r(L), {
|
|
2252
2258
|
key: 0,
|
|
2253
2259
|
label: "Novo",
|
|
2254
2260
|
icon: "pi pi-plus",
|
|
@@ -2257,8 +2263,8 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2257
2263
|
])
|
|
2258
2264
|
])) : b("", !0),
|
|
2259
2265
|
B(c.$slots, "before-table", {}, () => [
|
|
2260
|
-
|
|
2261
|
-
(o(!0), d(J, null,
|
|
2266
|
+
te.value.length ? (o(), d("div", Ca, [
|
|
2267
|
+
(o(!0), d(J, null, ne(te.value, (s, M) => (o(), d("div", {
|
|
2262
2268
|
key: M,
|
|
2263
2269
|
class: "w-crud-kpi"
|
|
2264
2270
|
}, [
|
|
@@ -2271,8 +2277,8 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2271
2277
|
}, null, 6)
|
|
2272
2278
|
], 2),
|
|
2273
2279
|
m("div", Va, [
|
|
2274
|
-
m("div", Sa,
|
|
2275
|
-
m("div", Da,
|
|
2280
|
+
m("div", Sa, R(s.label), 1),
|
|
2281
|
+
m("div", Da, R(s.value), 1)
|
|
2276
2282
|
])
|
|
2277
2283
|
]))), 128))
|
|
2278
2284
|
])) : b("", !0)
|
|
@@ -2282,8 +2288,8 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2282
2288
|
}, [
|
|
2283
2289
|
m("div", Ea, [
|
|
2284
2290
|
k.value.length ? (o(), d("div", Pa, [
|
|
2285
|
-
(o(!0), d(J, null,
|
|
2286
|
-
var M, q, fe, xe, Ae,
|
|
2291
|
+
(o(!0), d(J, null, ne(k.value, (s) => {
|
|
2292
|
+
var M, q, fe, xe, Ae, Oe, We, je, qe;
|
|
2287
2293
|
return o(), d(J, {
|
|
2288
2294
|
key: s.field
|
|
2289
2295
|
}, [
|
|
@@ -2293,7 +2299,7 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2293
2299
|
placeholder: ((q = s.filter) == null ? void 0 : q.placeholder) || s.header,
|
|
2294
2300
|
size: "small",
|
|
2295
2301
|
onInput: (Se) => _(s, Se.target.value)
|
|
2296
|
-
}, null, 8, ["model-value", "placeholder", "onInput"])) : ((fe = s.filter) == null ? void 0 : fe.type) === "select" ? (o(), C(r(
|
|
2302
|
+
}, null, 8, ["model-value", "placeholder", "onInput"])) : ((fe = s.filter) == null ? void 0 : fe.type) === "select" ? (o(), C(r(at), {
|
|
2297
2303
|
key: 1,
|
|
2298
2304
|
"model-value": e.crud.columnFilters[j(s)],
|
|
2299
2305
|
options: (xe = s.filter) == null ? void 0 : xe.options,
|
|
@@ -2303,26 +2309,26 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2303
2309
|
"show-clear": "",
|
|
2304
2310
|
size: "small",
|
|
2305
2311
|
"onUpdate:modelValue": (Se) => e.crud.setColumnFilter(j(s), Se)
|
|
2306
|
-
}, null, 8, ["model-value", "options", "placeholder", "onUpdate:modelValue"])) : ((
|
|
2312
|
+
}, null, 8, ["model-value", "options", "placeholder", "onUpdate:modelValue"])) : ((Oe = s.filter) == null ? void 0 : Oe.type) === "boolean" ? (o(), C(r(at), {
|
|
2307
2313
|
key: 2,
|
|
2308
2314
|
"model-value": e.crud.columnFilters[j(s)],
|
|
2309
|
-
options:
|
|
2315
|
+
options: le,
|
|
2310
2316
|
"option-label": "label",
|
|
2311
2317
|
"option-value": "value",
|
|
2312
|
-
placeholder: ((
|
|
2318
|
+
placeholder: ((We = s.filter) == null ? void 0 : We.placeholder) || s.header,
|
|
2313
2319
|
"show-clear": "",
|
|
2314
2320
|
size: "small",
|
|
2315
2321
|
"onUpdate:modelValue": (Se) => e.crud.setColumnFilter(j(s), Se)
|
|
2316
|
-
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])) : ((
|
|
2322
|
+
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])) : ((je = s.filter) == null ? void 0 : je.type) === "numeric" ? (o(), C(r(Xe), {
|
|
2317
2323
|
key: 3,
|
|
2318
2324
|
"model-value": e.crud.columnFilters[j(s)] ?? null,
|
|
2319
|
-
placeholder: ((
|
|
2325
|
+
placeholder: ((qe = s.filter) == null ? void 0 : qe.placeholder) || s.header,
|
|
2320
2326
|
size: "small",
|
|
2321
2327
|
"onUpdate:modelValue": (Se) => e.crud.setColumnFilter(j(s), Se)
|
|
2322
2328
|
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])) : b("", !0)
|
|
2323
2329
|
], 64);
|
|
2324
2330
|
}), 128)),
|
|
2325
|
-
Object.keys(e.crud.columnFilters).length ? (o(), C(r(
|
|
2331
|
+
Object.keys(e.crud.columnFilters).length ? (o(), C(r(L), {
|
|
2326
2332
|
key: 0,
|
|
2327
2333
|
label: "Limpar filtros",
|
|
2328
2334
|
icon: "pi pi-filter-slash",
|
|
@@ -2333,12 +2339,12 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2333
2339
|
])) : b("", !0),
|
|
2334
2340
|
D.value === "table" ? (o(), d("div", Fa, [
|
|
2335
2341
|
me.value && e.crud.selectedItems.value.length ? (o(), d("div", Ia, [
|
|
2336
|
-
m("span", Ra,
|
|
2342
|
+
m("span", Ra, R(e.crud.selectedItems.value.length) + " selecionado(s) ", 1),
|
|
2337
2343
|
B(c.$slots, "bulk-actions", {
|
|
2338
2344
|
selected: e.crud.selectedItems.value,
|
|
2339
2345
|
crud: e.crud
|
|
2340
2346
|
}, () => [
|
|
2341
|
-
(o(!0), d(J, null,
|
|
2347
|
+
(o(!0), d(J, null, ne(e.crud.config.bulkActions || [], (s) => (o(), C(r(L), {
|
|
2342
2348
|
key: s.action,
|
|
2343
2349
|
label: s.label,
|
|
2344
2350
|
icon: s.icon,
|
|
@@ -2348,7 +2354,7 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2348
2354
|
onClick: (M) => s.handler(e.crud.selectedItems.value)
|
|
2349
2355
|
}, null, 8, ["label", "icon", "severity", "disabled", "onClick"]))), 128))
|
|
2350
2356
|
]),
|
|
2351
|
-
he(S(r(
|
|
2357
|
+
he(S(r(L), {
|
|
2352
2358
|
icon: "pi pi-times",
|
|
2353
2359
|
text: "",
|
|
2354
2360
|
rounded: "",
|
|
@@ -2363,7 +2369,7 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2363
2369
|
]
|
|
2364
2370
|
])
|
|
2365
2371
|
])) : b("", !0),
|
|
2366
|
-
S(r(
|
|
2372
|
+
S(r(ht), {
|
|
2367
2373
|
"expanded-rows": $.value,
|
|
2368
2374
|
"onUpdate:expandedRows": h[7] || (h[7] = (s) => $.value = s),
|
|
2369
2375
|
value: e.crud.items.value,
|
|
@@ -2395,7 +2401,7 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2395
2401
|
onRowExpand: h[11] || (h[11] = (s) => n("row-expand", s.data)),
|
|
2396
2402
|
onRowCollapse: h[12] || (h[12] = (s) => n("row-collapse", s.data)),
|
|
2397
2403
|
onCellEditComplete: l
|
|
2398
|
-
},
|
|
2404
|
+
}, Ye({
|
|
2399
2405
|
header: K(() => [
|
|
2400
2406
|
m("div", Ma, [
|
|
2401
2407
|
m("div", Aa, [
|
|
@@ -2417,7 +2423,7 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2417
2423
|
m("div", Ua, [
|
|
2418
2424
|
B(c.$slots, "toolbar-actions"),
|
|
2419
2425
|
e.persistState ? (o(), d(J, { key: 0 }, [
|
|
2420
|
-
he(S(r(
|
|
2426
|
+
he(S(r(L), {
|
|
2421
2427
|
icon: "pi pi-sliders-h",
|
|
2422
2428
|
text: "",
|
|
2423
2429
|
size: "small",
|
|
@@ -2433,13 +2439,13 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2433
2439
|
{ top: !0 }
|
|
2434
2440
|
]
|
|
2435
2441
|
]),
|
|
2436
|
-
S(r(
|
|
2442
|
+
S(r(yt), {
|
|
2437
2443
|
ref_key: "chooser",
|
|
2438
2444
|
ref: H
|
|
2439
2445
|
}, {
|
|
2440
2446
|
default: K(() => [
|
|
2441
2447
|
m("div", Ba, [
|
|
2442
|
-
(o(!0), d(J, null,
|
|
2448
|
+
(o(!0), d(J, null, ne(F.value, (s) => (o(), d("div", {
|
|
2443
2449
|
key: s.field,
|
|
2444
2450
|
style: { display: "flex", "align-items": "center", gap: "0.5rem" }
|
|
2445
2451
|
}, [
|
|
@@ -2452,14 +2458,14 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2452
2458
|
m("label", {
|
|
2453
2459
|
for: `wcrud-col-${s.field}`,
|
|
2454
2460
|
style: { "font-size": "0.85rem", cursor: "pointer" }
|
|
2455
|
-
},
|
|
2461
|
+
}, R(s.header), 9, Ta)
|
|
2456
2462
|
]))), 128))
|
|
2457
2463
|
])
|
|
2458
2464
|
]),
|
|
2459
2465
|
_: 1
|
|
2460
2466
|
}, 512)
|
|
2461
2467
|
], 64)) : b("", !0),
|
|
2462
|
-
e.exportCsv ? he((o(), C(r(
|
|
2468
|
+
e.exportCsv ? he((o(), C(r(L), {
|
|
2463
2469
|
key: 1,
|
|
2464
2470
|
icon: "pi pi-download",
|
|
2465
2471
|
text: "",
|
|
@@ -2475,14 +2481,14 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2475
2481
|
]
|
|
2476
2482
|
]) : b("", !0),
|
|
2477
2483
|
e.viewToggle ? (o(), d("div", Na, [
|
|
2478
|
-
S(r(
|
|
2484
|
+
S(r(L), {
|
|
2479
2485
|
icon: "pi pi-table",
|
|
2480
2486
|
size: "small",
|
|
2481
2487
|
text: !x("table"),
|
|
2482
2488
|
outlined: x("table"),
|
|
2483
2489
|
onClick: h[4] || (h[4] = (s) => E("table"))
|
|
2484
2490
|
}, null, 8, ["text", "outlined"]),
|
|
2485
|
-
S(r(
|
|
2491
|
+
S(r(L), {
|
|
2486
2492
|
icon: "pi pi-th-large",
|
|
2487
2493
|
size: "small",
|
|
2488
2494
|
text: !x("cards"),
|
|
@@ -2490,7 +2496,7 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2490
2496
|
onClick: h[5] || (h[5] = (s) => E("cards"))
|
|
2491
2497
|
}, null, 8, ["text", "outlined"])
|
|
2492
2498
|
])) : b("", !0),
|
|
2493
|
-
!e.showHeader && pe.value && !e.actionRail ? (o(), C(r(
|
|
2499
|
+
!e.showHeader && pe.value && !e.actionRail ? (o(), C(r(L), {
|
|
2494
2500
|
key: 3,
|
|
2495
2501
|
label: "Novo",
|
|
2496
2502
|
icon: "pi pi-plus",
|
|
@@ -2521,7 +2527,7 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2521
2527
|
expander: "",
|
|
2522
2528
|
style: { width: "3rem" }
|
|
2523
2529
|
})) : b("", !0),
|
|
2524
|
-
(o(!0), d(J, null,
|
|
2530
|
+
(o(!0), d(J, null, ne(z.value, (s) => (o(), C(r(Me), {
|
|
2525
2531
|
key: s.field,
|
|
2526
2532
|
field: s.field,
|
|
2527
2533
|
header: s.header,
|
|
@@ -2529,13 +2535,13 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2529
2535
|
style: ke(s.style),
|
|
2530
2536
|
"header-class": V(s),
|
|
2531
2537
|
"body-class": V(s)
|
|
2532
|
-
},
|
|
2538
|
+
}, Ye({
|
|
2533
2539
|
body: K(({ data: M }) => [
|
|
2534
2540
|
B(c.$slots, `column-${s.field}`, {
|
|
2535
2541
|
data: M,
|
|
2536
2542
|
value: M[s.field]
|
|
2537
2543
|
}, () => [
|
|
2538
|
-
S(
|
|
2544
|
+
S(ot, {
|
|
2539
2545
|
column: s,
|
|
2540
2546
|
value: M[s.field],
|
|
2541
2547
|
"row-data": M
|
|
@@ -2549,7 +2555,7 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2549
2555
|
fn: K(({ data: M }) => {
|
|
2550
2556
|
var q;
|
|
2551
2557
|
return [
|
|
2552
|
-
["number", "currency"].includes(((q = g(s.field)) == null ? void 0 : q.type) || "") ? (o(), C(r(
|
|
2558
|
+
["number", "currency"].includes(((q = g(s.field)) == null ? void 0 : q.type) || "") ? (o(), C(r(Xe), {
|
|
2553
2559
|
key: 0,
|
|
2554
2560
|
"model-value": M[s.field] ?? null,
|
|
2555
2561
|
fluid: "",
|
|
@@ -2578,10 +2584,10 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2578
2584
|
}, {
|
|
2579
2585
|
body: K(({ data: s }) => [
|
|
2580
2586
|
m("div", La, [
|
|
2581
|
-
(o(!0), d(J, null,
|
|
2587
|
+
(o(!0), d(J, null, ne(ve.value, (M) => (o(), d(J, {
|
|
2582
2588
|
key: M.action
|
|
2583
2589
|
}, [
|
|
2584
|
-
we(M, s) ? he((o(), C(r(
|
|
2590
|
+
we(M, s) ? he((o(), C(r(L), {
|
|
2585
2591
|
key: 0,
|
|
2586
2592
|
icon: M.icon,
|
|
2587
2593
|
text: "",
|
|
@@ -2640,7 +2646,7 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2640
2646
|
]),
|
|
2641
2647
|
m("div", ja, [
|
|
2642
2648
|
B(c.$slots, "toolbar-actions"),
|
|
2643
|
-
e.exportCsv ? he((o(), C(r(
|
|
2649
|
+
e.exportCsv ? he((o(), C(r(L), {
|
|
2644
2650
|
key: 0,
|
|
2645
2651
|
icon: "pi pi-download",
|
|
2646
2652
|
text: "",
|
|
@@ -2656,14 +2662,14 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2656
2662
|
]
|
|
2657
2663
|
]) : b("", !0),
|
|
2658
2664
|
e.viewToggle ? (o(), d("div", qa, [
|
|
2659
|
-
S(r(
|
|
2665
|
+
S(r(L), {
|
|
2660
2666
|
icon: "pi pi-table",
|
|
2661
2667
|
size: "small",
|
|
2662
2668
|
text: !x("table"),
|
|
2663
2669
|
outlined: x("table"),
|
|
2664
2670
|
onClick: h[13] || (h[13] = (s) => E("table"))
|
|
2665
2671
|
}, null, 8, ["text", "outlined"]),
|
|
2666
|
-
S(r(
|
|
2672
|
+
S(r(L), {
|
|
2667
2673
|
icon: "pi pi-th-large",
|
|
2668
2674
|
size: "small",
|
|
2669
2675
|
text: !x("cards"),
|
|
@@ -2671,7 +2677,7 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2671
2677
|
onClick: h[14] || (h[14] = (s) => E("cards"))
|
|
2672
2678
|
}, null, 8, ["text", "outlined"])
|
|
2673
2679
|
])) : b("", !0),
|
|
2674
|
-
!e.showHeader && pe.value && !e.actionRail ? (o(), C(r(
|
|
2680
|
+
!e.showHeader && pe.value && !e.actionRail ? (o(), C(r(L), {
|
|
2675
2681
|
key: 2,
|
|
2676
2682
|
label: "Novo",
|
|
2677
2683
|
icon: "pi pi-plus",
|
|
@@ -2682,25 +2688,25 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2682
2688
|
e.crud.loading.value ? (o(), d("div", Ka, [...h[23] || (h[23] = [
|
|
2683
2689
|
m("i", { class: "pi pi-spin pi-spinner" }, null, -1)
|
|
2684
2690
|
])])) : e.crud.items.value.length ? (o(), d("div", Ha, [
|
|
2685
|
-
(o(!0), d(J, null,
|
|
2691
|
+
(o(!0), d(J, null, ne(e.crud.items.value, (s, M) => (o(), d("div", {
|
|
2686
2692
|
key: s[e.crud.config.pk || "id"] ?? M,
|
|
2687
2693
|
class: Q(["w-crud-card", { "w-crud-card--selected": W.value === s }]),
|
|
2688
2694
|
onClick: (q) => Ie(s),
|
|
2689
2695
|
onDblclick: (q) => e.crud.config.canEdit !== !1 && e.crud.openEditDialog(s),
|
|
2690
|
-
onContextmenu: (q) =>
|
|
2696
|
+
onContextmenu: (q) => Le(q, s)
|
|
2691
2697
|
}, [
|
|
2692
2698
|
m("div", Ya, [
|
|
2693
|
-
(o(!0), d(J, null,
|
|
2699
|
+
(o(!0), d(J, null, ne(O.value, (q, fe) => (o(), d("div", {
|
|
2694
2700
|
key: q.field,
|
|
2695
2701
|
class: Q(["w-crud-card-row", { "w-crud-card-row--title": fe === 0 }])
|
|
2696
2702
|
}, [
|
|
2697
|
-
fe !== 0 ? (o(), d("span", Ja,
|
|
2703
|
+
fe !== 0 ? (o(), d("span", Ja, R(q.header), 1)) : b("", !0),
|
|
2698
2704
|
m("span", Xa, [
|
|
2699
2705
|
B(c.$slots, `column-${q.field}`, {
|
|
2700
2706
|
data: s,
|
|
2701
2707
|
value: s[q.field]
|
|
2702
2708
|
}, () => [
|
|
2703
|
-
S(
|
|
2709
|
+
S(ot, {
|
|
2704
2710
|
column: q,
|
|
2705
2711
|
value: s[q.field],
|
|
2706
2712
|
"row-data": s
|
|
@@ -2710,10 +2716,10 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2710
2716
|
], 2))), 128))
|
|
2711
2717
|
]),
|
|
2712
2718
|
De.value && !e.actionRail ? (o(), d("div", Za, [
|
|
2713
|
-
(o(!0), d(J, null,
|
|
2719
|
+
(o(!0), d(J, null, ne(ve.value, (q) => (o(), d(J, {
|
|
2714
2720
|
key: q.action
|
|
2715
2721
|
}, [
|
|
2716
|
-
we(q, s) ? he((o(), C(r(
|
|
2722
|
+
we(q, s) ? he((o(), C(r(L), {
|
|
2717
2723
|
key: 0,
|
|
2718
2724
|
icon: q.icon,
|
|
2719
2725
|
text: "",
|
|
@@ -2754,7 +2760,7 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2754
2760
|
]))
|
|
2755
2761
|
]),
|
|
2756
2762
|
e.actionRail ? (o(), d("aside", Qa, [
|
|
2757
|
-
pe.value ? he((o(), C(r(
|
|
2763
|
+
pe.value ? he((o(), C(r(L), {
|
|
2758
2764
|
key: 0,
|
|
2759
2765
|
icon: "pi pi-plus",
|
|
2760
2766
|
rounded: "",
|
|
@@ -2768,10 +2774,10 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2768
2774
|
]
|
|
2769
2775
|
]) : b("", !0),
|
|
2770
2776
|
pe.value && ve.value.length ? (o(), d("div", _a)) : b("", !0),
|
|
2771
|
-
(o(!0), d(J, null,
|
|
2777
|
+
(o(!0), d(J, null, ne(ve.value, (s) => (o(), d(J, {
|
|
2772
2778
|
key: s.action
|
|
2773
2779
|
}, [
|
|
2774
|
-
!W.value || we(s, W.value) ? he((o(), C(r(
|
|
2780
|
+
!W.value || we(s, W.value) ? he((o(), C(r(L), {
|
|
2775
2781
|
key: 0,
|
|
2776
2782
|
icon: s.icon,
|
|
2777
2783
|
text: "",
|
|
@@ -2793,13 +2799,13 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2793
2799
|
crud: e.crud
|
|
2794
2800
|
}),
|
|
2795
2801
|
e.showPrint || e.exportCsv ? (o(), d("div", eo)) : b("", !0),
|
|
2796
|
-
e.showPrint ? he((o(), C(r(
|
|
2802
|
+
e.showPrint ? he((o(), C(r(L), {
|
|
2797
2803
|
key: 3,
|
|
2798
2804
|
icon: "pi pi-print",
|
|
2799
2805
|
text: "",
|
|
2800
2806
|
rounded: "",
|
|
2801
2807
|
disabled: !W.value,
|
|
2802
|
-
onClick:
|
|
2808
|
+
onClick: ze
|
|
2803
2809
|
}, null, 8, ["disabled"])), [
|
|
2804
2810
|
[
|
|
2805
2811
|
G,
|
|
@@ -2808,7 +2814,7 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2808
2814
|
{ left: !0 }
|
|
2809
2815
|
]
|
|
2810
2816
|
]) : b("", !0),
|
|
2811
|
-
e.exportCsv ? he((o(), C(r(
|
|
2817
|
+
e.exportCsv ? he((o(), C(r(L), {
|
|
2812
2818
|
key: 4,
|
|
2813
2819
|
icon: "pi pi-download",
|
|
2814
2820
|
text: "",
|
|
@@ -2828,8 +2834,8 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2828
2834
|
e.contextMenu ? (o(), C(r(Ut), {
|
|
2829
2835
|
key: 1,
|
|
2830
2836
|
ref_key: "cm",
|
|
2831
|
-
ref:
|
|
2832
|
-
model:
|
|
2837
|
+
ref: oe,
|
|
2838
|
+
model: Qe.value
|
|
2833
2839
|
}, null, 8, ["model"])) : b("", !0),
|
|
2834
2840
|
B(c.$slots, "form-dialog", {
|
|
2835
2841
|
crud: e.crud,
|
|
@@ -2837,7 +2843,7 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2837
2843
|
}, () => {
|
|
2838
2844
|
var s;
|
|
2839
2845
|
return [
|
|
2840
|
-
S(
|
|
2846
|
+
S(xt, {
|
|
2841
2847
|
visible: e.crud.dialogVisible.value,
|
|
2842
2848
|
title: e.crud.dialogTitle.value,
|
|
2843
2849
|
fields: e.crud.config.form,
|
|
@@ -2853,17 +2859,17 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2853
2859
|
}),
|
|
2854
2860
|
"onUpdate:field": h[18] || (h[18] = (M, q) => e.crud.setFormField(M, q)),
|
|
2855
2861
|
onSave: h[19] || (h[19] = (M) => e.crud.save())
|
|
2856
|
-
},
|
|
2857
|
-
|
|
2862
|
+
}, Ye({ _: 2 }, [
|
|
2863
|
+
ne(e.crud.config.form, (M) => ({
|
|
2858
2864
|
name: `field-${M.field}`,
|
|
2859
2865
|
fn: K((q) => [
|
|
2860
|
-
B(c.$slots, `field-${M.field}`,
|
|
2866
|
+
B(c.$slots, `field-${M.field}`, tt(lt(q)))
|
|
2861
2867
|
])
|
|
2862
2868
|
}))
|
|
2863
2869
|
]), 1032, ["visible", "title", "fields", "form-data", "is-editing", "saving", "disabled", "width", "form-columns", "keyboard-nav"])
|
|
2864
2870
|
];
|
|
2865
2871
|
}),
|
|
2866
|
-
c.$slots["delete-message"] ? (o(), C(r(
|
|
2872
|
+
c.$slots["delete-message"] ? (o(), C(r(Ze), {
|
|
2867
2873
|
key: 2,
|
|
2868
2874
|
visible: ge.value,
|
|
2869
2875
|
"onUpdate:visible": h[21] || (h[21] = (s) => ge.value = s),
|
|
@@ -2874,7 +2880,7 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2874
2880
|
style: { width: "30rem" }
|
|
2875
2881
|
}, {
|
|
2876
2882
|
footer: K(() => [
|
|
2877
|
-
S(r(
|
|
2883
|
+
S(r(L), {
|
|
2878
2884
|
type: "button",
|
|
2879
2885
|
label: "Cancelar",
|
|
2880
2886
|
severity: "secondary",
|
|
@@ -2882,7 +2888,7 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2882
2888
|
disabled: ce.value,
|
|
2883
2889
|
onClick: h[20] || (h[20] = (s) => ge.value = !1)
|
|
2884
2890
|
}, null, 8, ["disabled"]),
|
|
2885
|
-
S(r(
|
|
2891
|
+
S(r(L), {
|
|
2886
2892
|
type: "button",
|
|
2887
2893
|
label: "Excluir",
|
|
2888
2894
|
icon: "pi pi-trash",
|
|
@@ -2892,7 +2898,7 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2892
2898
|
}, null, 8, ["loading"])
|
|
2893
2899
|
]),
|
|
2894
2900
|
default: K(() => [
|
|
2895
|
-
B(c.$slots, "delete-message", { item:
|
|
2901
|
+
B(c.$slots, "delete-message", { item: se.value })
|
|
2896
2902
|
]),
|
|
2897
2903
|
_: 3
|
|
2898
2904
|
}, 8, ["visible"])) : b("", !0)
|
|
@@ -2915,7 +2921,7 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2915
2921
|
function n(i) {
|
|
2916
2922
|
t("update:modelValue", i ?? null);
|
|
2917
2923
|
}
|
|
2918
|
-
return (i, v) => (o(), C(r(
|
|
2924
|
+
return (i, v) => (o(), C(r(wt), {
|
|
2919
2925
|
"model-value": e.modelValue ?? void 0,
|
|
2920
2926
|
"selection-mode": "range",
|
|
2921
2927
|
placeholder: e.placeholder,
|
|
@@ -2963,7 +2969,7 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2963
2969
|
paga: { label: "Paga", severity: "success" },
|
|
2964
2970
|
inadimplente: { label: "Inadimplente", severity: "danger" }
|
|
2965
2971
|
}, n = P(() => (a.map ?? t)[a.value] ?? { label: a.value, severity: "secondary" });
|
|
2966
|
-
return (i, v) => (o(), C(r(
|
|
2972
|
+
return (i, v) => (o(), C(r(gt), {
|
|
2967
2973
|
value: n.value.label,
|
|
2968
2974
|
severity: n.value.severity
|
|
2969
2975
|
}, null, 8, ["value", "severity"]));
|
|
@@ -2984,12 +2990,12 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
2984
2990
|
const t = a;
|
|
2985
2991
|
return (n, i) => (o(), d("div", lo, [
|
|
2986
2992
|
m("div", ao, [
|
|
2987
|
-
m("h2", oo,
|
|
2988
|
-
e.subtitle ? (o(), d("p", no,
|
|
2993
|
+
m("h2", oo, R(e.title), 1),
|
|
2994
|
+
e.subtitle ? (o(), d("p", no, R(e.subtitle), 1)) : b("", !0)
|
|
2989
2995
|
]),
|
|
2990
2996
|
m("div", io, [
|
|
2991
2997
|
B(n.$slots, "actions"),
|
|
2992
|
-
e.actionLabel ? (o(), C(r(
|
|
2998
|
+
e.actionLabel ? (o(), C(r(L), {
|
|
2993
2999
|
key: 0,
|
|
2994
3000
|
label: e.actionLabel,
|
|
2995
3001
|
icon: e.actionIcon,
|
|
@@ -3019,9 +3025,9 @@ const ga = { class: "w-crud" }, ba = {
|
|
|
3019
3025
|
class: Q(e.icon)
|
|
3020
3026
|
}, null, 2)
|
|
3021
3027
|
]),
|
|
3022
|
-
m("p", uo,
|
|
3023
|
-
e.description ? (o(), d("p", co,
|
|
3024
|
-
e.actionLabel ? (o(), C(r(
|
|
3028
|
+
m("p", uo, R(e.title), 1),
|
|
3029
|
+
e.description ? (o(), d("p", co, R(e.description), 1)) : b("", !0),
|
|
3030
|
+
e.actionLabel ? (o(), C(r(L), {
|
|
3025
3031
|
key: 1,
|
|
3026
3032
|
label: e.actionLabel,
|
|
3027
3033
|
icon: e.actionIcon,
|
|
@@ -3049,7 +3055,7 @@ Symbol(process.env.NODE_ENV !== "production" ? "router view location" : "");
|
|
|
3049
3055
|
* @license MIT
|
|
3050
3056
|
*/
|
|
3051
3057
|
function fo() {
|
|
3052
|
-
return
|
|
3058
|
+
return vt(mo);
|
|
3053
3059
|
}
|
|
3054
3060
|
const vo = { class: "w-detail-header" }, po = { class: "w-detail-header-left" }, ho = { class: "w-detail-header-content" }, yo = { class: "w-detail-header-title" }, go = {
|
|
3055
3061
|
key: 0,
|
|
@@ -3072,7 +3078,7 @@ const vo = { class: "w-detail-header" }, po = { class: "w-detail-header-left" },
|
|
|
3072
3078
|
}
|
|
3073
3079
|
return (i, v) => (o(), d("div", vo, [
|
|
3074
3080
|
m("div", po, [
|
|
3075
|
-
S(r(
|
|
3081
|
+
S(r(L), {
|
|
3076
3082
|
icon: "pi pi-arrow-left",
|
|
3077
3083
|
text: "",
|
|
3078
3084
|
rounded: "",
|
|
@@ -3083,8 +3089,8 @@ const vo = { class: "w-detail-header" }, po = { class: "w-detail-header-left" },
|
|
|
3083
3089
|
class: Q([e.icon, "w-detail-header-icon"])
|
|
3084
3090
|
}, null, 2)) : b("", !0),
|
|
3085
3091
|
m("div", ho, [
|
|
3086
|
-
m("h2", yo,
|
|
3087
|
-
e.subtitle ? (o(), d("p", go,
|
|
3092
|
+
m("h2", yo, R(e.title), 1),
|
|
3093
|
+
e.subtitle ? (o(), d("p", go, R(e.subtitle), 1)) : b("", !0)
|
|
3088
3094
|
]),
|
|
3089
3095
|
e.status ? (o(), C(to, {
|
|
3090
3096
|
key: 1,
|
|
@@ -3107,20 +3113,20 @@ const vo = { class: "w-detail-header" }, po = { class: "w-detail-header-left" },
|
|
|
3107
3113
|
fields: {}
|
|
3108
3114
|
},
|
|
3109
3115
|
setup(e) {
|
|
3110
|
-
const { formatCurrency: a, formatDate: t, formatNumber: n } =
|
|
3116
|
+
const { formatCurrency: a, formatDate: t, formatNumber: n } = it();
|
|
3111
3117
|
function i(v) {
|
|
3112
3118
|
const $ = v.value;
|
|
3113
3119
|
return $ == null || $ === "" ? "-" : v.format === "currency" ? a(Number($)) : v.format === "date" ? t(String($)) : v.format === "datetime" ? t(String($), "DD/MM/YYYY HH:mm") : v.format === "number" ? n(Number($)) : String($);
|
|
3114
3120
|
}
|
|
3115
3121
|
return (v, $) => (o(), d("div", wo, [
|
|
3116
|
-
e.title ? (o(), d("h3", ko,
|
|
3122
|
+
e.title ? (o(), d("h3", ko, R(e.title), 1)) : b("", !0),
|
|
3117
3123
|
m("div", $o, [
|
|
3118
|
-
(o(!0), d(J, null,
|
|
3124
|
+
(o(!0), d(J, null, ne(e.fields, (D) => (o(), d("div", {
|
|
3119
3125
|
key: D.label,
|
|
3120
3126
|
class: "w-info-card-field"
|
|
3121
3127
|
}, [
|
|
3122
|
-
m("span", xo,
|
|
3123
|
-
m("span", Co,
|
|
3128
|
+
m("span", xo, R(D.label), 1),
|
|
3129
|
+
m("span", Co, R(i(D)), 1)
|
|
3124
3130
|
]))), 128))
|
|
3125
3131
|
])
|
|
3126
3132
|
]));
|
|
@@ -3156,20 +3162,20 @@ const vo = { class: "w-detail-header" }, po = { class: "w-detail-header-left" },
|
|
|
3156
3162
|
class: Q(["w-kpi-card", e.severity ? `w-kpi-card--${e.severity}` : ""])
|
|
3157
3163
|
}, [
|
|
3158
3164
|
e.loading ? (o(), d("div", Vo, [
|
|
3159
|
-
S(r(
|
|
3165
|
+
S(r(Ke), {
|
|
3160
3166
|
shape: "circle",
|
|
3161
3167
|
size: "2.75rem"
|
|
3162
3168
|
}),
|
|
3163
3169
|
m("div", So, [
|
|
3164
|
-
S(r(
|
|
3170
|
+
S(r(Ke), {
|
|
3165
3171
|
width: "6rem",
|
|
3166
3172
|
height: "0.75rem"
|
|
3167
3173
|
}),
|
|
3168
|
-
S(r(
|
|
3174
|
+
S(r(Ke), {
|
|
3169
3175
|
width: "7.5rem",
|
|
3170
3176
|
height: "1.5rem"
|
|
3171
3177
|
}),
|
|
3172
|
-
S(r(
|
|
3178
|
+
S(r(Ke), {
|
|
3173
3179
|
width: "5rem",
|
|
3174
3180
|
height: "0.75rem"
|
|
3175
3181
|
})
|
|
@@ -3189,20 +3195,20 @@ const vo = { class: "w-detail-header" }, po = { class: "w-detail-header-left" },
|
|
|
3189
3195
|
e.trend ? (o(), d("span", {
|
|
3190
3196
|
key: 0,
|
|
3191
3197
|
class: Q(["w-kpi-card__trend-badge", e.trend.direction ? `w-kpi-card__trend-badge--${e.trend.direction}` : ""])
|
|
3192
|
-
},
|
|
3198
|
+
}, R(e.trend.value), 3)) : b("", !0)
|
|
3193
3199
|
])
|
|
3194
3200
|
])) : b("", !0)
|
|
3195
3201
|
]),
|
|
3196
3202
|
m("div", Fo, [
|
|
3197
|
-
m("p", Io,
|
|
3203
|
+
m("p", Io, R(e.label), 1),
|
|
3198
3204
|
m("div", Ro, [
|
|
3199
3205
|
B(a.$slots, "value", {}, () => [
|
|
3200
|
-
Fe(
|
|
3206
|
+
Fe(R(e.value), 1)
|
|
3201
3207
|
])
|
|
3202
3208
|
]),
|
|
3203
3209
|
e.hint || a.$slots.hint ? (o(), d("p", Mo, [
|
|
3204
3210
|
B(a.$slots, "hint", {}, () => [
|
|
3205
|
-
Fe(
|
|
3211
|
+
Fe(R(e.hint), 1)
|
|
3206
3212
|
])
|
|
3207
3213
|
])) : b("", !0)
|
|
3208
3214
|
]),
|
|
@@ -3227,11 +3233,11 @@ const vo = { class: "w-detail-header" }, po = { class: "w-detail-header-left" },
|
|
|
3227
3233
|
return (n, i) => (o(), d("div", {
|
|
3228
3234
|
class: Q(["w-kpi-grid", t.value])
|
|
3229
3235
|
}, [
|
|
3230
|
-
n.$slots.item ? (o(!0), d(J, { key: 0 },
|
|
3236
|
+
n.$slots.item ? (o(!0), d(J, { key: 0 }, ne(e.items, (v, $) => B(n.$slots, "item", {
|
|
3231
3237
|
key: $,
|
|
3232
3238
|
item: v,
|
|
3233
3239
|
index: $
|
|
3234
|
-
})), 128)) : (o(!0), d(J, { key: 1 },
|
|
3240
|
+
})), 128)) : (o(!0), d(J, { key: 1 }, ne(e.items, (v, $) => (o(), C(Uo, {
|
|
3235
3241
|
key: $,
|
|
3236
3242
|
label: v.label,
|
|
3237
3243
|
value: v.value,
|
|
@@ -3275,10 +3281,10 @@ const vo = { class: "w-detail-header" }, po = { class: "w-detail-header-left" },
|
|
|
3275
3281
|
])) : b("", !0),
|
|
3276
3282
|
m("div", No, [
|
|
3277
3283
|
m("div", Lo, [
|
|
3278
|
-
m("h3", zo,
|
|
3284
|
+
m("h3", zo, R(e.title), 1),
|
|
3279
3285
|
B(a.$slots, "meta")
|
|
3280
3286
|
]),
|
|
3281
|
-
e.subtitle ? (o(), d("p", Oo,
|
|
3287
|
+
e.subtitle ? (o(), d("p", Oo, R(e.subtitle), 1)) : b("", !0)
|
|
3282
3288
|
])
|
|
3283
3289
|
]),
|
|
3284
3290
|
a.$slots.actions ? (o(), d("div", Wo, [
|
|
@@ -3308,8 +3314,8 @@ const vo = { class: "w-detail-header" }, po = { class: "w-detail-header-left" },
|
|
|
3308
3314
|
}, [
|
|
3309
3315
|
e.title || e.description || a.$slots.actions ? (o(), d("div", jo, [
|
|
3310
3316
|
m("div", qo, [
|
|
3311
|
-
m("h3", Ko,
|
|
3312
|
-
e.description ? (o(), d("p", Ho,
|
|
3317
|
+
m("h3", Ko, R(e.title), 1),
|
|
3318
|
+
e.description ? (o(), d("p", Ho, R(e.description), 1)) : b("", !0)
|
|
3313
3319
|
]),
|
|
3314
3320
|
a.$slots.actions ? (o(), d("div", Go, [
|
|
3315
3321
|
B(a.$slots, "actions")
|
|
@@ -3370,7 +3376,7 @@ const vo = { class: "w-detail-header" }, po = { class: "w-detail-header-left" },
|
|
|
3370
3376
|
return (i, v) => (o(), d("div", {
|
|
3371
3377
|
class: Q(["w-progress-flow", `w-progress-flow--${e.orientation}`])
|
|
3372
3378
|
}, [
|
|
3373
|
-
(o(!0), d(J, null,
|
|
3379
|
+
(o(!0), d(J, null, ne(e.steps, ($, D) => (o(), d("div", {
|
|
3374
3380
|
key: $.key,
|
|
3375
3381
|
class: Q(["w-progress-flow__step", `w-progress-flow__step--${n(D)}`])
|
|
3376
3382
|
}, [
|
|
@@ -3380,11 +3386,11 @@ const vo = { class: "w-detail-header" }, po = { class: "w-detail-header-left" },
|
|
|
3380
3386
|
state: n(D)
|
|
3381
3387
|
}, () => [
|
|
3382
3388
|
m("div", Qo, [
|
|
3383
|
-
m("span", null,
|
|
3389
|
+
m("span", null, R(D + 1), 1)
|
|
3384
3390
|
]),
|
|
3385
3391
|
m("div", _o, [
|
|
3386
|
-
m("p", en,
|
|
3387
|
-
$.description ? (o(), d("p", tn,
|
|
3392
|
+
m("p", en, R($.label), 1),
|
|
3393
|
+
$.description ? (o(), d("p", tn, R($.description), 1)) : b("", !0)
|
|
3388
3394
|
])
|
|
3389
3395
|
])
|
|
3390
3396
|
], 2))), 128))
|
|
@@ -3395,10 +3401,10 @@ export {
|
|
|
3395
3401
|
Al as W,
|
|
3396
3402
|
Ln as _,
|
|
3397
3403
|
wl as a,
|
|
3398
|
-
|
|
3399
|
-
|
|
3404
|
+
ot as b,
|
|
3405
|
+
xt as c,
|
|
3400
3406
|
Fn as d,
|
|
3401
|
-
|
|
3407
|
+
mt as e,
|
|
3402
3408
|
In as f,
|
|
3403
3409
|
An as g,
|
|
3404
3410
|
Mn as h,
|
|
@@ -3420,4 +3426,4 @@ export {
|
|
|
3420
3426
|
cl as x,
|
|
3421
3427
|
ha as y
|
|
3422
3428
|
};
|
|
3423
|
-
//# sourceMappingURL=WProgressFlow.vue_vue_type_script_setup_true_lang-
|
|
3429
|
+
//# sourceMappingURL=WProgressFlow.vue_vue_type_script_setup_true_lang-KqwCnEHm.js.map
|