@wgalleti/primevue-components 0.16.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/WKanbanBoard.vue_vue_type_script_setup_true_lang-DWs-ZSNZ.cjs +28 -0
- package/dist/WKanbanBoard.vue_vue_type_script_setup_true_lang-DWs-ZSNZ.cjs.map +1 -0
- package/dist/{WKanbanBoard.vue_vue_type_script_setup_true_lang-Bmqt_P_5.js → WKanbanBoard.vue_vue_type_script_setup_true_lang-DvyxNL4O.js} +1738 -1702
- package/dist/WKanbanBoard.vue_vue_type_script_setup_true_lang-DvyxNL4O.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/ui/WDialog.vue.d.ts +15 -0
- package/dist/components/ui/WMapSelect.vue.d.ts +7 -1
- package/dist/components.cjs +1 -1
- package/dist/components.js +26 -25
- package/dist/composables.cjs +1 -1
- package/dist/composables.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +68 -67
- package/dist/plugin-CIBvOgwG.js +14 -0
- package/dist/plugin-CIBvOgwG.js.map +1 -0
- package/dist/plugin-D2IZHyBm.cjs +2 -0
- package/dist/plugin-D2IZHyBm.cjs.map +1 -0
- package/dist/primevue-components.css +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/mapSelect.d.ts +10 -0
- package/dist/types/routeTabs.d.ts +15 -2
- package/dist/types.cjs +1 -1
- package/dist/types.js +6 -7
- package/dist/types.js.map +1 -1
- package/dist/useFormKeyboardNav-BgBAe0C7.cjs +3 -0
- package/dist/useFormKeyboardNav-BgBAe0C7.cjs.map +1 -0
- package/dist/{useFormKeyboardNav-CLCEo_O5.js → useFormKeyboardNav-BrKZrHq9.js} +180 -178
- package/dist/useFormKeyboardNav-BrKZrHq9.js.map +1 -0
- package/dist/useRouteTabs-CSo1j_ji.js +762 -0
- package/dist/useRouteTabs-CSo1j_ji.js.map +1 -0
- package/dist/useRouteTabs-VGx93R83.cjs +2 -0
- package/dist/useRouteTabs-VGx93R83.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/WKanbanBoard.vue_vue_type_script_setup_true_lang-Bmqt_P_5.js.map +0 -1
- package/dist/WKanbanBoard.vue_vue_type_script_setup_true_lang-DFRhQIiG.cjs +0 -28
- package/dist/WKanbanBoard.vue_vue_type_script_setup_true_lang-DFRhQIiG.cjs.map +0 -1
- package/dist/plugin-BaBF7c-e.js +0 -7
- package/dist/plugin-BaBF7c-e.js.map +0 -1
- package/dist/plugin-D1YvyKXX.cjs +0 -2
- package/dist/plugin-D1YvyKXX.cjs.map +0 -1
- package/dist/routeTabs--y12evp8.cjs +0 -2
- package/dist/routeTabs--y12evp8.cjs.map +0 -1
- package/dist/routeTabs-NnjycX9L.js +0 -10
- package/dist/routeTabs-NnjycX9L.js.map +0 -1
- package/dist/useFormKeyboardNav-CLCEo_O5.js.map +0 -1
- package/dist/useFormKeyboardNav-D4Ow3k4Y.cjs +0 -3
- package/dist/useFormKeyboardNav-D4Ow3k4Y.cjs.map +0 -1
- package/dist/useRouteTabs-63cZtRr3.js +0 -739
- package/dist/useRouteTabs-63cZtRr3.js.map +0 -1
- package/dist/useRouteTabs-Ds2QpP3I.cjs +0 -2
- package/dist/useRouteTabs-Ds2QpP3I.cjs.map +0 -1
|
@@ -1,88 +1,88 @@
|
|
|
1
1
|
import { inject as pt, nextTick as ht } from "vue";
|
|
2
|
-
import { a as Dt } from "./plugin-
|
|
2
|
+
import { a as Dt, u as Yt } from "./plugin-CIBvOgwG.js";
|
|
3
3
|
import h from "dayjs";
|
|
4
|
-
import { useToast as
|
|
5
|
-
import { useConfirm as
|
|
6
|
-
function
|
|
4
|
+
import { useToast as yt } from "primevue/usetoast";
|
|
5
|
+
import { useConfirm as gt } from "primevue/useconfirm";
|
|
6
|
+
function Mt(t) {
|
|
7
7
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
8
8
|
}
|
|
9
|
-
var H = { exports: {} },
|
|
10
|
-
function
|
|
9
|
+
var H = { exports: {} }, $t = H.exports, W;
|
|
10
|
+
function Ct() {
|
|
11
11
|
return W || (W = 1, (function(t, r) {
|
|
12
|
-
(function(
|
|
12
|
+
(function(i, n) {
|
|
13
13
|
t.exports = n();
|
|
14
|
-
})(
|
|
15
|
-
var
|
|
16
|
-
return (
|
|
17
|
-
}, o = function(
|
|
18
|
-
return function(
|
|
19
|
-
this[
|
|
14
|
+
})($t, (function() {
|
|
15
|
+
var i = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, n = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, c = /\d/, u = /\d\d/, e = /\d\d?/, l = /\d*[^-_:/,()\s\d]+/, a = {}, D = function(s) {
|
|
16
|
+
return (s = +s) + (s > 68 ? 1900 : 2e3);
|
|
17
|
+
}, o = function(s) {
|
|
18
|
+
return function(f) {
|
|
19
|
+
this[s] = +f;
|
|
20
20
|
};
|
|
21
|
-
}, p = [/[+-]\d\d:?(\d\d)?|Z/, function(
|
|
22
|
-
(this.zone || (this.zone = {})).offset = (function(
|
|
23
|
-
if (!
|
|
24
|
-
var d =
|
|
21
|
+
}, p = [/[+-]\d\d:?(\d\d)?|Z/, function(s) {
|
|
22
|
+
(this.zone || (this.zone = {})).offset = (function(f) {
|
|
23
|
+
if (!f || f === "Z") return 0;
|
|
24
|
+
var d = f.match(/([+-]|\d\d)/g), m = 60 * d[1] + (+d[2] || 0);
|
|
25
25
|
return m === 0 ? 0 : d[0] === "+" ? -m : m;
|
|
26
|
-
})(
|
|
27
|
-
}],
|
|
28
|
-
var
|
|
29
|
-
return
|
|
30
|
-
}, X = function(
|
|
26
|
+
})(s);
|
|
27
|
+
}], j = function(s) {
|
|
28
|
+
var f = a[s];
|
|
29
|
+
return f && (f.indexOf ? f : f.s.concat(f.f));
|
|
30
|
+
}, X = function(s, f) {
|
|
31
31
|
var d, m = a.meridiem;
|
|
32
32
|
if (m) {
|
|
33
|
-
for (var M = 1; M <= 24; M += 1) if (
|
|
33
|
+
for (var M = 1; M <= 24; M += 1) if (s.indexOf(m(M, 0, f)) > -1) {
|
|
34
34
|
d = M > 12;
|
|
35
35
|
break;
|
|
36
36
|
}
|
|
37
|
-
} else d =
|
|
37
|
+
} else d = s === (f ? "pm" : "PM");
|
|
38
38
|
return d;
|
|
39
|
-
}, at = { A: [l, function(
|
|
40
|
-
this.afternoon = X(
|
|
41
|
-
}], a: [l, function(
|
|
42
|
-
this.afternoon = X(
|
|
43
|
-
}], Q: [
|
|
44
|
-
this.month = 3 * (
|
|
45
|
-
}], S: [
|
|
46
|
-
this.milliseconds = 100 * +
|
|
47
|
-
}], SS: [u, function(
|
|
48
|
-
this.milliseconds = 10 * +
|
|
49
|
-
}], SSS: [/\d{3}/, function(
|
|
50
|
-
this.milliseconds = +
|
|
51
|
-
}], s: [e, o("seconds")], ss: [e, o("seconds")], m: [e, o("minutes")], mm: [e, o("minutes")], H: [e, o("hours")], h: [e, o("hours")], HH: [e, o("hours")], hh: [e, o("hours")], D: [e, o("day")], DD: [u, o("day")], Do: [l, function(
|
|
52
|
-
var
|
|
53
|
-
if (this.day = d[0],
|
|
54
|
-
}], w: [e, o("week")], ww: [u, o("week")], M: [e, o("month")], MM: [u, o("month")], MMM: [l, function(
|
|
55
|
-
var
|
|
39
|
+
}, at = { A: [l, function(s) {
|
|
40
|
+
this.afternoon = X(s, !1);
|
|
41
|
+
}], a: [l, function(s) {
|
|
42
|
+
this.afternoon = X(s, !0);
|
|
43
|
+
}], Q: [c, function(s) {
|
|
44
|
+
this.month = 3 * (s - 1) + 1;
|
|
45
|
+
}], S: [c, function(s) {
|
|
46
|
+
this.milliseconds = 100 * +s;
|
|
47
|
+
}], SS: [u, function(s) {
|
|
48
|
+
this.milliseconds = 10 * +s;
|
|
49
|
+
}], SSS: [/\d{3}/, function(s) {
|
|
50
|
+
this.milliseconds = +s;
|
|
51
|
+
}], s: [e, o("seconds")], ss: [e, o("seconds")], m: [e, o("minutes")], mm: [e, o("minutes")], H: [e, o("hours")], h: [e, o("hours")], HH: [e, o("hours")], hh: [e, o("hours")], D: [e, o("day")], DD: [u, o("day")], Do: [l, function(s) {
|
|
52
|
+
var f = a.ordinal, d = s.match(/\d+/);
|
|
53
|
+
if (this.day = d[0], f) for (var m = 1; m <= 31; m += 1) f(m).replace(/\[|\]/g, "") === s && (this.day = m);
|
|
54
|
+
}], w: [e, o("week")], ww: [u, o("week")], M: [e, o("month")], MM: [u, o("month")], MMM: [l, function(s) {
|
|
55
|
+
var f = j("months"), d = (j("monthsShort") || f.map((function(m) {
|
|
56
56
|
return m.slice(0, 3);
|
|
57
|
-
}))).indexOf(
|
|
57
|
+
}))).indexOf(s) + 1;
|
|
58
58
|
if (d < 1) throw new Error();
|
|
59
59
|
this.month = d % 12 || d;
|
|
60
|
-
}], MMMM: [l, function(
|
|
61
|
-
var
|
|
62
|
-
if (
|
|
63
|
-
this.month =
|
|
64
|
-
}], Y: [/[+-]?\d+/, o("year")], YY: [u, function(
|
|
65
|
-
this.year = D(
|
|
60
|
+
}], MMMM: [l, function(s) {
|
|
61
|
+
var f = j("months").indexOf(s) + 1;
|
|
62
|
+
if (f < 1) throw new Error();
|
|
63
|
+
this.month = f % 12 || f;
|
|
64
|
+
}], Y: [/[+-]?\d+/, o("year")], YY: [u, function(s) {
|
|
65
|
+
this.year = D(s);
|
|
66
66
|
}], YYYY: [/\d{4}/, o("year")], Z: p, ZZ: p };
|
|
67
|
-
function ut(
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
for (var m = (
|
|
67
|
+
function ut(s) {
|
|
68
|
+
var f, d;
|
|
69
|
+
f = s, d = a && a.formats;
|
|
70
|
+
for (var m = (s = f.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(x, T, g) {
|
|
71
71
|
var y = g && g.toUpperCase();
|
|
72
|
-
return
|
|
73
|
-
return
|
|
72
|
+
return T || d[g] || i[g] || d[y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(A, w, L) {
|
|
73
|
+
return w || L.slice(1);
|
|
74
74
|
}));
|
|
75
75
|
}))).match(n), M = m.length, $ = 0; $ < M; $ += 1) {
|
|
76
|
-
var v = m[$],
|
|
76
|
+
var v = m[$], F = at[v], C = F && F[0], b = F && F[1];
|
|
77
77
|
m[$] = b ? { regex: C, parser: b } : v.replace(/^\[|\]$/g, "");
|
|
78
78
|
}
|
|
79
|
-
return function(
|
|
80
|
-
for (var
|
|
81
|
-
var
|
|
82
|
-
if (typeof
|
|
79
|
+
return function(x) {
|
|
80
|
+
for (var T = {}, g = 0, y = 0; g < M; g += 1) {
|
|
81
|
+
var A = m[g];
|
|
82
|
+
if (typeof A == "string") y += A.length;
|
|
83
83
|
else {
|
|
84
|
-
var
|
|
85
|
-
L.call(
|
|
84
|
+
var w = A.regex, L = A.parser, I = x.slice(y), S = w.exec(I)[0];
|
|
85
|
+
L.call(T, S), x = x.replace(S, "");
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
return (function(P) {
|
|
@@ -91,19 +91,19 @@ function $t() {
|
|
|
91
91
|
var Y = P.hours;
|
|
92
92
|
N ? Y < 12 && (P.hours += 12) : Y === 12 && (P.hours = 0), delete P.afternoon;
|
|
93
93
|
}
|
|
94
|
-
})(
|
|
94
|
+
})(T), T;
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
|
-
return function(
|
|
98
|
-
d.p.customParseFormat = !0,
|
|
99
|
-
var m =
|
|
97
|
+
return function(s, f, d) {
|
|
98
|
+
d.p.customParseFormat = !0, s && s.parseTwoDigitYear && (D = s.parseTwoDigitYear);
|
|
99
|
+
var m = f.prototype, M = m.parse;
|
|
100
100
|
m.parse = function($) {
|
|
101
|
-
var v = $.date,
|
|
102
|
-
this.$u =
|
|
101
|
+
var v = $.date, F = $.utc, C = $.args;
|
|
102
|
+
this.$u = F;
|
|
103
103
|
var b = C[1];
|
|
104
104
|
if (typeof b == "string") {
|
|
105
|
-
var
|
|
106
|
-
|
|
105
|
+
var x = C[2] === !0, T = C[3] === !0, g = x || T, y = C[2];
|
|
106
|
+
T && (y = C[2]), a = this.$locale(), !x && y && (a = d.Ls[y]), this.$d = (function(I, S, P, N) {
|
|
107
107
|
try {
|
|
108
108
|
if (["x", "X"].indexOf(S) > -1) return new Date((S === "X" ? 1e3 : 1) * I);
|
|
109
109
|
var Y = ut(S)(I), R = Y.year, O = Y.month, ft = Y.day, ct = Y.hours, lt = Y.minutes, dt = Y.seconds, mt = Y.milliseconds, Q = Y.zone, G = Y.week, q = /* @__PURE__ */ new Date(), B = ft || (R || O ? 1 : q.getDate()), U = R || q.getFullYear(), _ = 0;
|
|
@@ -113,15 +113,15 @@ function $t() {
|
|
|
113
113
|
} catch {
|
|
114
114
|
return /* @__PURE__ */ new Date("");
|
|
115
115
|
}
|
|
116
|
-
})(v, b,
|
|
117
|
-
} else if (b instanceof Array) for (var
|
|
118
|
-
C[1] = b[
|
|
116
|
+
})(v, b, F, d), this.init(), y && y !== !0 && (this.$L = this.locale(y).$L), g && v != this.format(b) && (this.$d = /* @__PURE__ */ new Date("")), a = {};
|
|
117
|
+
} else if (b instanceof Array) for (var A = b.length, w = 1; w <= A; w += 1) {
|
|
118
|
+
C[1] = b[w - 1];
|
|
119
119
|
var L = d.apply(this, C);
|
|
120
120
|
if (L.isValid()) {
|
|
121
121
|
this.$d = L.$d, this.$L = L.$L, this.init();
|
|
122
122
|
break;
|
|
123
123
|
}
|
|
124
|
-
|
|
124
|
+
w === A && (this.$d = /* @__PURE__ */ new Date(""));
|
|
125
125
|
}
|
|
126
126
|
else M.call(this, $);
|
|
127
127
|
};
|
|
@@ -129,10 +129,10 @@ function $t() {
|
|
|
129
129
|
}));
|
|
130
130
|
})(H)), H.exports;
|
|
131
131
|
}
|
|
132
|
-
var
|
|
133
|
-
const et = /* @__PURE__ */
|
|
132
|
+
var bt = Ct();
|
|
133
|
+
const et = /* @__PURE__ */ Mt(bt);
|
|
134
134
|
h.extend(et);
|
|
135
|
-
function
|
|
135
|
+
function Tt(t) {
|
|
136
136
|
if (!t) return null;
|
|
137
137
|
if (t instanceof Date) return t;
|
|
138
138
|
const r = h(t, "YYYY-MM-DD", !0);
|
|
@@ -150,97 +150,97 @@ function Ft(t, r = "DD/MM/YYYY") {
|
|
|
150
150
|
function xt(t) {
|
|
151
151
|
return t ? h(t).format("DD/MM/YYYY HH:mm") : "—";
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function E(t) {
|
|
154
154
|
return t.replace(/\D/g, "");
|
|
155
155
|
}
|
|
156
156
|
function nt(t) {
|
|
157
157
|
if (!t) return "—";
|
|
158
|
-
const r =
|
|
158
|
+
const r = E(t);
|
|
159
159
|
return r.length !== 11 ? t : r.replace(/^(\d{3})(\d{3})(\d{3})(\d{2})$/, "$1.$2.$3-$4");
|
|
160
160
|
}
|
|
161
161
|
function ot(t) {
|
|
162
162
|
if (!t) return "—";
|
|
163
|
-
const r =
|
|
163
|
+
const r = E(t);
|
|
164
164
|
return r.length !== 14 ? t : r.replace(/^(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})$/, "$1.$2.$3/$4-$5");
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function Lt(t) {
|
|
167
167
|
if (!t) return "—";
|
|
168
|
-
const r =
|
|
168
|
+
const r = E(t);
|
|
169
169
|
return r.length === 11 ? nt(t) : r.length === 14 ? ot(t) : t;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function Pt(t) {
|
|
172
172
|
if (!t) return "—";
|
|
173
|
-
const r =
|
|
173
|
+
const r = E(t);
|
|
174
174
|
return r.length === 11 ? r.replace(/^(\d{2})(\d{5})(\d{4})$/, "($1) $2-$3") : r.length === 10 ? r.replace(/^(\d{2})(\d{4})(\d{4})$/, "($1) $2-$3") : t;
|
|
175
175
|
}
|
|
176
176
|
function it(t) {
|
|
177
177
|
if (!t) return null;
|
|
178
|
-
const r =
|
|
178
|
+
const r = E(t);
|
|
179
179
|
if (r.length !== 11) return "CPF deve ter 11 dígitos.";
|
|
180
180
|
if (/^(\d)\1{10}$/.test(r)) return "CPF inválido.";
|
|
181
|
-
let
|
|
182
|
-
for (let e = 0; e < 9; e++)
|
|
183
|
-
let n =
|
|
184
|
-
const
|
|
185
|
-
if (parseInt(r[9]) !==
|
|
186
|
-
|
|
187
|
-
for (let e = 0; e < 10; e++)
|
|
188
|
-
n =
|
|
181
|
+
let i = 0;
|
|
182
|
+
for (let e = 0; e < 9; e++) i += parseInt(r[e]) * (10 - e);
|
|
183
|
+
let n = i % 11;
|
|
184
|
+
const c = n < 2 ? 0 : 11 - n;
|
|
185
|
+
if (parseInt(r[9]) !== c) return "CPF inválido.";
|
|
186
|
+
i = 0;
|
|
187
|
+
for (let e = 0; e < 10; e++) i += parseInt(r[e]) * (11 - e);
|
|
188
|
+
n = i % 11;
|
|
189
189
|
const u = n < 2 ? 0 : 11 - n;
|
|
190
190
|
return parseInt(r[10]) !== u ? "CPF inválido." : null;
|
|
191
191
|
}
|
|
192
192
|
function st(t) {
|
|
193
193
|
if (!t) return null;
|
|
194
|
-
const r =
|
|
194
|
+
const r = E(t);
|
|
195
195
|
if (r.length !== 14) return "CNPJ deve ter 14 dígitos.";
|
|
196
196
|
if (/^(\d)\1{13}$/.test(r)) return "CNPJ inválido.";
|
|
197
|
-
const
|
|
197
|
+
const i = [5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2];
|
|
198
198
|
let n = 0;
|
|
199
|
-
for (let a = 0; a < 12; a++) n += parseInt(r[a]) *
|
|
200
|
-
let
|
|
201
|
-
const u =
|
|
199
|
+
for (let a = 0; a < 12; a++) n += parseInt(r[a]) * i[a];
|
|
200
|
+
let c = n % 11;
|
|
201
|
+
const u = c < 2 ? 0 : 11 - c;
|
|
202
202
|
if (parseInt(r[12]) !== u) return "CNPJ inválido.";
|
|
203
203
|
const e = [6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2];
|
|
204
204
|
n = 0;
|
|
205
205
|
for (let a = 0; a < 13; a++) n += parseInt(r[a]) * e[a];
|
|
206
|
-
|
|
207
|
-
const l =
|
|
206
|
+
c = n % 11;
|
|
207
|
+
const l = c < 2 ? 0 : 11 - c;
|
|
208
208
|
return parseInt(r[13]) !== l ? "CNPJ inválido." : null;
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function Et(t) {
|
|
211
211
|
if (!t) return null;
|
|
212
|
-
const r =
|
|
212
|
+
const r = E(t);
|
|
213
213
|
return r.length === 11 ? it(t) : r.length === 14 ? st(t) : "CPF deve ter 11 dígitos ou CNPJ deve ter 14 dígitos.";
|
|
214
214
|
}
|
|
215
215
|
const V = /* @__PURE__ */ new Map();
|
|
216
216
|
function tt(t, r) {
|
|
217
|
-
const
|
|
218
|
-
let n = V.get(
|
|
217
|
+
const i = `${t}-${r}`;
|
|
218
|
+
let n = V.get(i);
|
|
219
219
|
return n || (n = new Intl.NumberFormat(t, {
|
|
220
220
|
minimumFractionDigits: r,
|
|
221
221
|
maximumFractionDigits: r
|
|
222
|
-
}), V.set(
|
|
222
|
+
}), V.set(i, n)), n;
|
|
223
223
|
}
|
|
224
224
|
function jt(t, r) {
|
|
225
|
-
const
|
|
226
|
-
let n = V.get(
|
|
225
|
+
const i = `${t}-${r}`;
|
|
226
|
+
let n = V.get(i);
|
|
227
227
|
return n || (n = new Intl.NumberFormat(t, {
|
|
228
228
|
style: "currency",
|
|
229
229
|
currency: r
|
|
230
|
-
}), V.set(
|
|
230
|
+
}), V.set(i, n)), n;
|
|
231
231
|
}
|
|
232
|
-
function
|
|
232
|
+
function zt() {
|
|
233
233
|
const t = pt(Dt, {
|
|
234
234
|
defaultPageSize: 20,
|
|
235
235
|
dateFormat: "DD/MM/YYYY",
|
|
236
236
|
dateTimeFormat: "DD/MM/YYYY HH:mm",
|
|
237
237
|
locale: "pt-BR",
|
|
238
238
|
currency: "BRL"
|
|
239
|
-
}), r = (t == null ? void 0 : t.locale) ?? "pt-BR",
|
|
239
|
+
}), r = (t == null ? void 0 : t.locale) ?? "pt-BR", i = (t == null ? void 0 : t.currency) ?? "BRL";
|
|
240
240
|
function n(a) {
|
|
241
|
-
return a == null ? "—" : jt(r,
|
|
241
|
+
return a == null ? "—" : jt(r, i).format(a);
|
|
242
242
|
}
|
|
243
|
-
function
|
|
243
|
+
function c(a, D = 2) {
|
|
244
244
|
return a == null ? "—" : tt(r, D).format(a);
|
|
245
245
|
}
|
|
246
246
|
function u(a, D) {
|
|
@@ -254,43 +254,44 @@ function Zt() {
|
|
|
254
254
|
}
|
|
255
255
|
return {
|
|
256
256
|
formatCurrency: n,
|
|
257
|
-
formatNumber:
|
|
257
|
+
formatNumber: c,
|
|
258
258
|
formatDate: u,
|
|
259
259
|
formatDateTime: e,
|
|
260
260
|
formatPercent: l,
|
|
261
261
|
formatCpf: nt,
|
|
262
262
|
formatCnpj: ot,
|
|
263
|
-
formatCpfCnpj:
|
|
264
|
-
formatTelefone:
|
|
263
|
+
formatCpfCnpj: Lt,
|
|
264
|
+
formatTelefone: Pt,
|
|
265
265
|
validateCpf: it,
|
|
266
266
|
validateCnpj: st,
|
|
267
|
-
validateCpfCnpj:
|
|
268
|
-
parseDate:
|
|
267
|
+
validateCpfCnpj: Et,
|
|
268
|
+
parseDate: Tt,
|
|
269
269
|
toDateString: At,
|
|
270
270
|
toDateTimeString: wt
|
|
271
271
|
};
|
|
272
272
|
}
|
|
273
|
-
function
|
|
274
|
-
const t =
|
|
273
|
+
function Jt() {
|
|
274
|
+
const t = yt();
|
|
275
275
|
function r(u, e = "Sucesso") {
|
|
276
276
|
t.add({ severity: "success", summary: e, detail: u, life: 3e3 });
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function i(u, e = "Erro") {
|
|
279
279
|
t.add({ severity: "error", summary: e, detail: u, life: 5e3 });
|
|
280
280
|
}
|
|
281
281
|
function n(u, e = "Atenção") {
|
|
282
282
|
t.add({ severity: "warn", summary: e, detail: u, life: 4e3 });
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function c(u, e = "Info") {
|
|
285
285
|
t.add({ severity: "info", summary: e, detail: u, life: 3e3 });
|
|
286
286
|
}
|
|
287
|
-
return { success: r, error:
|
|
287
|
+
return { success: r, error: i, warn: n, info: c };
|
|
288
288
|
}
|
|
289
|
-
function
|
|
290
|
-
const t =
|
|
291
|
-
function
|
|
289
|
+
function Kt() {
|
|
290
|
+
const t = gt(), r = Yt(), i = () => (r == null ? void 0 : r.hostEl.value) ?? "body";
|
|
291
|
+
function n(u, e = "Deseja realmente excluir este registro?") {
|
|
292
292
|
t.require({
|
|
293
|
-
|
|
293
|
+
appendTo: i(),
|
|
294
|
+
message: e,
|
|
294
295
|
header: "Confirmar Exclusão",
|
|
295
296
|
icon: "pi pi-trash",
|
|
296
297
|
rejectLabel: "Cancelar",
|
|
@@ -302,13 +303,14 @@ function Jt() {
|
|
|
302
303
|
acceptProps: {
|
|
303
304
|
severity: "danger"
|
|
304
305
|
},
|
|
305
|
-
accept:
|
|
306
|
+
accept: u
|
|
306
307
|
});
|
|
307
308
|
}
|
|
308
|
-
function
|
|
309
|
+
function c(u, e, l = "Confirmação") {
|
|
309
310
|
t.require({
|
|
310
|
-
|
|
311
|
-
|
|
311
|
+
appendTo: i(),
|
|
312
|
+
message: u,
|
|
313
|
+
header: l,
|
|
312
314
|
icon: "pi pi-question-circle",
|
|
313
315
|
rejectLabel: "Cancelar",
|
|
314
316
|
rejectProps: {
|
|
@@ -316,94 +318,94 @@ function Jt() {
|
|
|
316
318
|
text: !0
|
|
317
319
|
},
|
|
318
320
|
acceptLabel: "Confirmar",
|
|
319
|
-
accept:
|
|
321
|
+
accept: e
|
|
320
322
|
});
|
|
321
323
|
}
|
|
322
|
-
return { confirmDelete:
|
|
324
|
+
return { confirmDelete: n, confirmAction: c };
|
|
323
325
|
}
|
|
324
|
-
function
|
|
326
|
+
function St(t) {
|
|
325
327
|
return t.replace(/_/g, " ").replace(/^\w/, (r) => r.toUpperCase());
|
|
326
328
|
}
|
|
327
|
-
function
|
|
329
|
+
function vt(t) {
|
|
328
330
|
if (typeof t == "string")
|
|
329
331
|
return t;
|
|
330
332
|
if (Array.isArray(t)) {
|
|
331
|
-
const r = t.filter((
|
|
333
|
+
const r = t.filter((i) => typeof i == "string");
|
|
332
334
|
return r.length > 0 ? r.join(" ") : null;
|
|
333
335
|
}
|
|
334
336
|
if (typeof t == "object" && t !== null) {
|
|
335
337
|
const r = t;
|
|
336
338
|
if (Array.isArray(r.non_field_errors) && r.non_field_errors.length > 0)
|
|
337
339
|
return r.non_field_errors.filter((n) => typeof n == "string").join(" ");
|
|
338
|
-
const
|
|
339
|
-
for (const [n,
|
|
340
|
+
const i = [];
|
|
341
|
+
for (const [n, c] of Object.entries(r)) {
|
|
340
342
|
if (n === "non_field_errors") continue;
|
|
341
|
-
const u =
|
|
342
|
-
if (Array.isArray(
|
|
343
|
-
const e =
|
|
344
|
-
e.length > 0 &&
|
|
345
|
-
} else typeof
|
|
343
|
+
const u = St(n);
|
|
344
|
+
if (Array.isArray(c)) {
|
|
345
|
+
const e = c.filter((l) => typeof l == "string");
|
|
346
|
+
e.length > 0 && i.push(`${u}: ${e.join(" ")}`);
|
|
347
|
+
} else typeof c == "string" && i.push(`${u}: ${c}`);
|
|
346
348
|
}
|
|
347
|
-
return
|
|
349
|
+
return i.length > 0 ? i.join(`
|
|
348
350
|
`) : null;
|
|
349
351
|
}
|
|
350
352
|
return null;
|
|
351
353
|
}
|
|
352
|
-
function
|
|
354
|
+
function It(t, r = "Erro inesperado") {
|
|
353
355
|
var u;
|
|
354
356
|
if (!t || typeof t != "object") return r;
|
|
355
|
-
const
|
|
357
|
+
const i = t, n = (u = i.response) == null ? void 0 : u.data;
|
|
356
358
|
if (!n || typeof n != "object")
|
|
357
|
-
return
|
|
358
|
-
const
|
|
359
|
-
return
|
|
359
|
+
return i.message || r;
|
|
360
|
+
const c = n.detail ?? n;
|
|
361
|
+
return vt(c) || r;
|
|
360
362
|
}
|
|
361
|
-
function
|
|
362
|
-
return { extractApiError:
|
|
363
|
+
function Xt() {
|
|
364
|
+
return { extractApiError: It };
|
|
363
365
|
}
|
|
364
366
|
h.extend(et);
|
|
365
|
-
const
|
|
366
|
-
function
|
|
367
|
+
const Nt = "DD/MM/YYYY", Ot = "DD/MM/YYYY HH:mm", rt = "YYYY-MM-DD", _t = "YYYY-MM-DDTHH:mm:ss";
|
|
368
|
+
function Qt(t = {}) {
|
|
367
369
|
const r = () => {
|
|
368
370
|
var o;
|
|
369
371
|
return ((o = t.showTime) == null ? void 0 : o.call(t)) ?? !1;
|
|
370
|
-
},
|
|
372
|
+
}, i = () => r() ? Ot : Nt, n = () => r() ? "##/##/#### ##:##" : "##/##/####", c = () => r() ? "dd/mm/aaaa hh:mm" : "dd/mm/aaaa";
|
|
371
373
|
function u(o) {
|
|
372
374
|
if (o == null || o === "") return null;
|
|
373
375
|
if (o instanceof Date) return isNaN(o.getTime()) ? null : o;
|
|
374
376
|
if (typeof o == "string") {
|
|
375
377
|
const p = h(o, rt, !0);
|
|
376
378
|
if (p.isValid()) return p.toDate();
|
|
377
|
-
const
|
|
378
|
-
return
|
|
379
|
+
const j = h(o);
|
|
380
|
+
return j.isValid() ? j.toDate() : null;
|
|
379
381
|
}
|
|
380
382
|
return null;
|
|
381
383
|
}
|
|
382
384
|
function e(o) {
|
|
383
385
|
var p;
|
|
384
|
-
return o ? (((p = t.valueFormat) == null ? void 0 : p.call(t)) ?? "iso") === "date" ? o : h(o).format(r() ?
|
|
386
|
+
return o ? (((p = t.valueFormat) == null ? void 0 : p.call(t)) ?? "iso") === "date" ? o : h(o).format(r() ? _t : rt) : null;
|
|
385
387
|
}
|
|
386
388
|
function l(o) {
|
|
387
|
-
return o ? h(o).format(
|
|
389
|
+
return o ? h(o).format(i()) : "";
|
|
388
390
|
}
|
|
389
391
|
function a(o) {
|
|
390
392
|
if (!o) return null;
|
|
391
|
-
const p = h(o,
|
|
393
|
+
const p = h(o, i(), !0);
|
|
392
394
|
return p.isValid() ? p.toDate() : null;
|
|
393
395
|
}
|
|
394
396
|
function D() {
|
|
395
397
|
return r() ? /* @__PURE__ */ new Date() : h().startOf("day").toDate();
|
|
396
398
|
}
|
|
397
|
-
return { toDate: u, toValue: e, toDisplay: l, fromDisplay: a, today: D, mask: n, placeholder:
|
|
399
|
+
return { toDate: u, toValue: e, toDisplay: l, fromDisplay: a, today: D, mask: n, placeholder: c, displayFormat: i };
|
|
398
400
|
}
|
|
399
|
-
const
|
|
401
|
+
const kt = [
|
|
400
402
|
'input:not([type="hidden"]):not([disabled])',
|
|
401
403
|
"textarea:not([disabled])",
|
|
402
404
|
"select:not([disabled])",
|
|
403
405
|
"button:not([disabled])",
|
|
404
406
|
'[tabindex]:not([tabindex="-1"])',
|
|
405
407
|
'[contenteditable="true"]'
|
|
406
|
-
].join(", "),
|
|
408
|
+
].join(", "), Ht = [
|
|
407
409
|
".p-select-overlay",
|
|
408
410
|
".p-autocomplete-overlay",
|
|
409
411
|
".p-multiselect-overlay",
|
|
@@ -411,16 +413,16 @@ const _t = [
|
|
|
411
413
|
".p-cascadeselect-overlay",
|
|
412
414
|
".p-treeselect-overlay"
|
|
413
415
|
].join(", ");
|
|
414
|
-
function
|
|
415
|
-
const
|
|
416
|
+
function Gt(t, r = {}) {
|
|
417
|
+
const i = () => r.enabled ? r.enabled() : !0;
|
|
416
418
|
function n() {
|
|
417
419
|
const e = t.value;
|
|
418
|
-
return e ? Array.from(e.querySelectorAll(
|
|
420
|
+
return e ? Array.from(e.querySelectorAll(kt)).filter(
|
|
419
421
|
(l) => l.getClientRects().length > 0 && !l.hasAttribute("data-kbd-skip")
|
|
420
422
|
) : [];
|
|
421
423
|
}
|
|
422
|
-
function
|
|
423
|
-
|
|
424
|
+
function c() {
|
|
425
|
+
i() && ht(() => {
|
|
424
426
|
const e = n(), l = e.find((D) => D.tagName !== "BUTTON") ?? e[0];
|
|
425
427
|
if (!l) return;
|
|
426
428
|
l.focus();
|
|
@@ -434,28 +436,28 @@ function Qt(t, r = {}) {
|
|
|
434
436
|
}
|
|
435
437
|
function u(e) {
|
|
436
438
|
var p;
|
|
437
|
-
if (!
|
|
439
|
+
if (!i() || e.key !== "Enter" || e.isComposing) return;
|
|
438
440
|
const l = e.target;
|
|
439
|
-
if (l.tagName === "TEXTAREA" || l.tagName === "BUTTON" || l.getAttribute("aria-expanded") === "true" || document.querySelector(
|
|
441
|
+
if (l.tagName === "TEXTAREA" || l.tagName === "BUTTON" || l.getAttribute("aria-expanded") === "true" || document.querySelector(Ht)) return;
|
|
440
442
|
e.preventDefault();
|
|
441
443
|
const a = n(), D = a.indexOf(l);
|
|
442
444
|
if (D === -1) return;
|
|
443
445
|
const o = a[D + 1];
|
|
444
446
|
o ? o.focus() : (p = r.onSubmit) == null || p.call(r);
|
|
445
447
|
}
|
|
446
|
-
return { focusFirst:
|
|
448
|
+
return { focusFirst: c, handleKeydown: u };
|
|
447
449
|
}
|
|
448
450
|
export {
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
451
|
+
Kt as a,
|
|
452
|
+
Jt as b,
|
|
453
|
+
Qt as c,
|
|
454
|
+
Gt as d,
|
|
455
|
+
It as e,
|
|
456
|
+
zt as f,
|
|
455
457
|
wt as g,
|
|
456
|
-
|
|
457
|
-
|
|
458
|
+
Tt as p,
|
|
459
|
+
E as s,
|
|
458
460
|
At as t,
|
|
459
|
-
|
|
461
|
+
Xt as u
|
|
460
462
|
};
|
|
461
|
-
//# sourceMappingURL=useFormKeyboardNav-
|
|
463
|
+
//# sourceMappingURL=useFormKeyboardNav-BrKZrHq9.js.map
|