@comercti/react-components-hmg 0.0.40 → 0.0.41
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/comerc-style-guide.cjs.js +1 -1
- package/comerc-style-guide.es.js +108 -104
- package/comerc-style-guide.umd.js +1 -1
- package/package.json +1 -1
package/comerc-style-guide.es.js
CHANGED
|
@@ -509,8 +509,8 @@ const mo = {
|
|
|
509
509
|
], 2)
|
|
510
510
|
], 2),
|
|
511
511
|
s("div", go, [
|
|
512
|
-
(i(!0), d(U, null, W(k.value, (P,
|
|
513
|
-
key:
|
|
512
|
+
(i(!0), d(U, null, W(k.value, (P, $) => (i(), d("div", {
|
|
513
|
+
key: $,
|
|
514
514
|
class: "border-[1px] rounded-xl w-full shadow bg-white m-2"
|
|
515
515
|
}, [
|
|
516
516
|
s("div", vo, [
|
|
@@ -553,7 +553,7 @@ const mo = {
|
|
|
553
553
|
}, [
|
|
554
554
|
s("div", {
|
|
555
555
|
class: "flex items-center space-x-1 cursor-pointer",
|
|
556
|
-
onClick: (
|
|
556
|
+
onClick: ($) => P.sortable ? n(m)(P.value) : null
|
|
557
557
|
}, [
|
|
558
558
|
s("span", Ao, B(P.text), 1),
|
|
559
559
|
P.sortable ? (i(), d("span", Bo, B(n(r) === P.value ? n(u) ? "↓" : "↑" : "⇅"), 1)) : y("", !0)
|
|
@@ -562,9 +562,9 @@ const mo = {
|
|
|
562
562
|
])
|
|
563
563
|
], 2),
|
|
564
564
|
s("tbody", null, [
|
|
565
|
-
(i(!0), d(U, null, W(k.value, (P,
|
|
565
|
+
(i(!0), d(U, null, W(k.value, (P, $) => (i(), d("tr", {
|
|
566
566
|
key: P.id,
|
|
567
|
-
class: v(["border-b", { "bg-ce_white": S.striped &&
|
|
567
|
+
class: v(["border-b", { "bg-ce_white": S.striped && $ % 2 === 0, "hover:bg-ce_white": !S.striped }])
|
|
568
568
|
}, [
|
|
569
569
|
S.selectable ? (i(), d("td", Vo, [
|
|
570
570
|
z(De, {
|
|
@@ -1371,8 +1371,8 @@ const yn = /* @__PURE__ */ hn(bn, [["render", wn]]), Cn = ["id", "checked", "dis
|
|
|
1371
1371
|
return O.charAt(0).toUpperCase() + O.slice(1);
|
|
1372
1372
|
}), l = I(() => {
|
|
1373
1373
|
const E = u.value.getFullYear(), O = u.value.getMonth(), S = new Date(E, O, 1).getDay(), H = new Date(E, O, 1 - (S + 6) % 7), P = [];
|
|
1374
|
-
for (let
|
|
1375
|
-
const L = new Date(H.getFullYear(), H.getMonth(), H.getDate() +
|
|
1374
|
+
for (let $ = 0; $ < 42; $++) {
|
|
1375
|
+
const L = new Date(H.getFullYear(), H.getMonth(), H.getDate() + $);
|
|
1376
1376
|
P.push({
|
|
1377
1377
|
date: L,
|
|
1378
1378
|
currentMonth: L.getMonth() === O
|
|
@@ -1626,7 +1626,7 @@ const yn = /* @__PURE__ */ hn(bn, [["render", wn]]), Cn = ["id", "checked", "dis
|
|
|
1626
1626
|
const X = Ve(g.value, _);
|
|
1627
1627
|
g.value = X, p.value = Ve(X, -1);
|
|
1628
1628
|
}
|
|
1629
|
-
}, P = () => H("left", -1),
|
|
1629
|
+
}, P = () => H("left", -1), $ = () => H("left", 1), L = () => H("right", -1), N = () => H("right", 1), w = (h) => {
|
|
1630
1630
|
p.value = new Date(h.getFullYear(), h.getMonth(), 1), g.value = new Date(
|
|
1631
1631
|
p.value.getFullYear(),
|
|
1632
1632
|
p.value.getMonth() + 1,
|
|
@@ -1642,7 +1642,7 @@ const yn = /* @__PURE__ */ hn(bn, [["render", wn]]), Cn = ["id", "checked", "dis
|
|
|
1642
1642
|
c.value = new Date(h.getFullYear(), h.getMonth(), 1);
|
|
1643
1643
|
}, V = (h) => {
|
|
1644
1644
|
l.value = h.start, m.value = h.end, a("update:start", h.start), a("update:end", h.end), E();
|
|
1645
|
-
},
|
|
1645
|
+
}, j = (h) => {
|
|
1646
1646
|
l.value && !m.value && (b.value = h);
|
|
1647
1647
|
};
|
|
1648
1648
|
return f.value ? (l.value = o.start ? typeof o.start == "string" ? ae(o.start) : new Date(o.start) : null, m.value = o.end ? typeof o.end == "string" ? ae(o.end) : new Date(o.end) : null) : c.value = o.modelValue ? typeof o.modelValue == "string" ? ae(o.modelValue) : new Date(o.modelValue) : null, re(() => {
|
|
@@ -1722,9 +1722,9 @@ const yn = /* @__PURE__ */ hn(bn, [["render", wn]]), Cn = ["id", "checked", "dis
|
|
|
1722
1722
|
hoveredDate: b.value,
|
|
1723
1723
|
onSelectDate: S,
|
|
1724
1724
|
onPrevMonth: P,
|
|
1725
|
-
onNextMonth:
|
|
1725
|
+
onNextMonth: $,
|
|
1726
1726
|
onUpdateMonth: w,
|
|
1727
|
-
onHoverDate:
|
|
1727
|
+
onHoverDate: j
|
|
1728
1728
|
}, null, 8, ["displayDate", "rangeStart", "rangeEnd", "hoveredDate"]),
|
|
1729
1729
|
_[2] || (_[2] = s("div", { class: "h-full w-0.5 border-l border-gray-200" }, null, -1)),
|
|
1730
1730
|
z(me, {
|
|
@@ -1737,7 +1737,7 @@ const yn = /* @__PURE__ */ hn(bn, [["render", wn]]), Cn = ["id", "checked", "dis
|
|
|
1737
1737
|
onPrevMonth: L,
|
|
1738
1738
|
onNextMonth: N,
|
|
1739
1739
|
onUpdateMonth: M,
|
|
1740
|
-
onHoverDate:
|
|
1740
|
+
onHoverDate: j
|
|
1741
1741
|
}, null, 8, ["displayDate", "rangeStart", "rangeEnd", "hoveredDate"])
|
|
1742
1742
|
], 64)) : (i(), G(me, {
|
|
1743
1743
|
key: 1,
|
|
@@ -1767,9 +1767,9 @@ const yn = /* @__PURE__ */ hn(bn, [["render", wn]]), Cn = ["id", "checked", "dis
|
|
|
1767
1767
|
hoveredDate: b.value,
|
|
1768
1768
|
onSelectDate: S,
|
|
1769
1769
|
onPrevMonth: P,
|
|
1770
|
-
onNextMonth:
|
|
1770
|
+
onNextMonth: $,
|
|
1771
1771
|
onUpdateMonth: w,
|
|
1772
|
-
onHoverDate:
|
|
1772
|
+
onHoverDate: j
|
|
1773
1773
|
}, null, 8, ["displayDate", "rangeStart", "rangeEnd", "hoveredDate"]),
|
|
1774
1774
|
_[3] || (_[3] = s("div", { class: "h-full w-0.5 border-l border-gray-200" }, null, -1)),
|
|
1775
1775
|
z(me, {
|
|
@@ -1782,7 +1782,7 @@ const yn = /* @__PURE__ */ hn(bn, [["render", wn]]), Cn = ["id", "checked", "dis
|
|
|
1782
1782
|
onPrevMonth: L,
|
|
1783
1783
|
onNextMonth: N,
|
|
1784
1784
|
onUpdateMonth: M,
|
|
1785
|
-
onHoverDate:
|
|
1785
|
+
onHoverDate: j
|
|
1786
1786
|
}, null, 8, ["displayDate", "rangeStart", "rangeEnd", "hoveredDate"])
|
|
1787
1787
|
], 64)) : (i(), G(me, {
|
|
1788
1788
|
key: 1,
|
|
@@ -1974,30 +1974,30 @@ const yn = /* @__PURE__ */ hn(bn, [["render", wn]]), Cn = ["id", "checked", "dis
|
|
|
1974
1974
|
}
|
|
1975
1975
|
function E(V) {
|
|
1976
1976
|
return V.flatMap(
|
|
1977
|
-
(
|
|
1977
|
+
(j) => j.subMenu ? [j.text, ...j.subMenu.map((h) => h.text)] : [j.text]
|
|
1978
1978
|
);
|
|
1979
1979
|
}
|
|
1980
|
-
function O(V,
|
|
1980
|
+
function O(V, j) {
|
|
1981
1981
|
let h = [];
|
|
1982
|
-
h = V.filter((_) => _.text.toLowerCase() ===
|
|
1982
|
+
h = V.filter((_) => _.text.toLowerCase() === j.toLowerCase());
|
|
1983
1983
|
for (const _ of V) {
|
|
1984
1984
|
let X = [];
|
|
1985
|
-
_.subMenu && _.subMenu.length > 0 && (X = _.subMenu.filter((K) => K.text.toLowerCase() ===
|
|
1985
|
+
_.subMenu && _.subMenu.length > 0 && (X = _.subMenu.filter((K) => K.text.toLowerCase() === j.toLowerCase())), X.length > 0 && (h = [_]);
|
|
1986
1986
|
}
|
|
1987
1987
|
h.length > 0 && T(h);
|
|
1988
1988
|
}
|
|
1989
1989
|
function T(V) {
|
|
1990
1990
|
if (r.value.length == 1) {
|
|
1991
|
-
const
|
|
1992
|
-
t.value =
|
|
1991
|
+
const j = V.findIndex((h) => h.text === r.value[0].text);
|
|
1992
|
+
t.value = j;
|
|
1993
1993
|
}
|
|
1994
|
-
r.value = V.sort((
|
|
1995
|
-
const _ = Array.isArray(
|
|
1994
|
+
r.value = V.sort((j, h) => {
|
|
1995
|
+
const _ = Array.isArray(j.subMenu) && j.subMenu.length > 0 ? 1 : 0, X = Array.isArray(h.subMenu) && h.subMenu.length > 0 ? 1 : 0;
|
|
1996
1996
|
return _ - X;
|
|
1997
1997
|
});
|
|
1998
1998
|
}
|
|
1999
1999
|
function S(V) {
|
|
2000
|
-
l.value.includes(V) ? l.value = l.value.filter((
|
|
2000
|
+
l.value.includes(V) ? l.value = l.value.filter((j) => j !== V) : l.value.push(V), t.value = V;
|
|
2001
2001
|
}
|
|
2002
2002
|
function H(V) {
|
|
2003
2003
|
u.value = V;
|
|
@@ -2005,16 +2005,16 @@ const yn = /* @__PURE__ */ hn(bn, [["render", wn]]), Cn = ["id", "checked", "dis
|
|
|
2005
2005
|
function P() {
|
|
2006
2006
|
t.value = 0;
|
|
2007
2007
|
}
|
|
2008
|
-
function
|
|
2008
|
+
function $(V) {
|
|
2009
2009
|
t.value = V;
|
|
2010
2010
|
}
|
|
2011
2011
|
function L() {
|
|
2012
2012
|
l.value = [];
|
|
2013
2013
|
}
|
|
2014
|
-
function N(V,
|
|
2015
|
-
Object.keys(o.value).length > 0 && (o.value = {}), h && (o.value[V] =
|
|
2014
|
+
function N(V, j, h) {
|
|
2015
|
+
Object.keys(o.value).length > 0 && (o.value = {}), h && (o.value[V] = j);
|
|
2016
2016
|
}
|
|
2017
|
-
const w = (V,
|
|
2017
|
+
const w = (V, j) => {
|
|
2018
2018
|
const h = [
|
|
2019
2019
|
{
|
|
2020
2020
|
text: "Meus serviços",
|
|
@@ -2031,15 +2031,15 @@ const yn = /* @__PURE__ */ hn(bn, [["render", wn]]), Cn = ["id", "checked", "dis
|
|
|
2031
2031
|
// Garantindo string
|
|
2032
2032
|
)
|
|
2033
2033
|
}
|
|
2034
|
-
], K = [
|
|
2034
|
+
], K = [...j, ...h, ..._].sort((se, fe) => {
|
|
2035
2035
|
var Be, tt;
|
|
2036
2036
|
return +!!((Be = se.subMenu) != null && Be.length) - +!!((tt = fe.subMenu) != null && tt.length);
|
|
2037
2037
|
});
|
|
2038
2038
|
r.value = K, u.value = [...K];
|
|
2039
2039
|
};
|
|
2040
2040
|
function M(V) {
|
|
2041
|
-
let
|
|
2042
|
-
return "options" in V && (
|
|
2041
|
+
let j = { text: V.text, path: V.path };
|
|
2042
|
+
return "options" in V && (j = { ...j, options: V.options }), j;
|
|
2043
2043
|
}
|
|
2044
2044
|
function A(V) {
|
|
2045
2045
|
return /^(https?|ftp):\/\/([\w-]+(\.[\w-]+)+)(:\d+)?(\/[^\s]*)?$/i.test(V);
|
|
@@ -2058,7 +2058,7 @@ const yn = /* @__PURE__ */ hn(bn, [["render", wn]]), Cn = ["id", "checked", "dis
|
|
|
2058
2058
|
atualizaOpcoesMenu: w,
|
|
2059
2059
|
alterarMenu: g,
|
|
2060
2060
|
limparArrayIndicesDropdown: L,
|
|
2061
|
-
setarIndiceMenu:
|
|
2061
|
+
setarIndiceMenu: $,
|
|
2062
2062
|
setarIndiceDropdowns: N,
|
|
2063
2063
|
setarBackupMenu: H,
|
|
2064
2064
|
obterTextosMenu: E,
|
|
@@ -2151,29 +2151,29 @@ const yn = /* @__PURE__ */ hn(bn, [["render", wn]]), Cn = ["id", "checked", "dis
|
|
|
2151
2151
|
]));
|
|
2152
2152
|
}
|
|
2153
2153
|
}), bs = (e) => {
|
|
2154
|
-
const t = D([]), o = D(null), a = D(!1), r = D(!1), u = D(!1), c = D([]), l = (
|
|
2154
|
+
const t = D([]), o = D(null), a = D(!1), r = D(!1), u = D(!1), c = D([]), l = ($) => {
|
|
2155
2155
|
if (t.value = t.value.filter((L) => !c.value.includes(L)), c.value = [], Q("ce-file-upload")) {
|
|
2156
|
-
|
|
2156
|
+
$("updateFiles", t.value);
|
|
2157
2157
|
return;
|
|
2158
2158
|
}
|
|
2159
|
-
|
|
2159
|
+
$("update:modelValue", t.value);
|
|
2160
2160
|
};
|
|
2161
|
-
function m(
|
|
2161
|
+
function m($) {
|
|
2162
2162
|
if (t.value = [], Q("ce-file-upload")) {
|
|
2163
|
-
|
|
2163
|
+
$("updateFiles", t.value);
|
|
2164
2164
|
return;
|
|
2165
2165
|
}
|
|
2166
|
-
|
|
2166
|
+
$("update:modelValue", t.value);
|
|
2167
2167
|
}
|
|
2168
|
-
const b = (
|
|
2169
|
-
if (t.value.splice(
|
|
2168
|
+
const b = ($, L) => {
|
|
2169
|
+
if (t.value.splice($, 1), T(), Q("ce-file-upload")) {
|
|
2170
2170
|
L("updateFiles", t.value);
|
|
2171
2171
|
return;
|
|
2172
2172
|
}
|
|
2173
2173
|
L("update:modelValue", t.value);
|
|
2174
|
-
}, p = (
|
|
2174
|
+
}, p = ($) => e.accept.includes($.type), g = ($) => {
|
|
2175
2175
|
var w;
|
|
2176
|
-
const L = (w =
|
|
2176
|
+
const L = (w = $.split(".").pop()) == null ? void 0 : w.toLowerCase();
|
|
2177
2177
|
return {
|
|
2178
2178
|
pdf: "bg-red-500",
|
|
2179
2179
|
doc: "bg-blue-500",
|
|
@@ -2196,31 +2196,31 @@ const yn = /* @__PURE__ */ hn(bn, [["render", wn]]), Cn = ["id", "checked", "dis
|
|
|
2196
2196
|
function k() {
|
|
2197
2197
|
return e.maxFile > 0 && t.value.length >= e.maxFile ? (a.value = !0, o.value = `Limite máximo de ${e.maxFile} arquivos atingido.`, !0) : (a.value = !1, o.value = null, !1);
|
|
2198
2198
|
}
|
|
2199
|
-
function f(
|
|
2200
|
-
const L =
|
|
2201
|
-
return e.maxFileSize > 0 && L > e.maxFileSize ? (a.value = !0, o.value = `O arquivo ${
|
|
2199
|
+
function f($) {
|
|
2200
|
+
const L = $.size / 1024;
|
|
2201
|
+
return e.maxFileSize > 0 && L > e.maxFileSize ? (a.value = !0, o.value = `O arquivo ${$.name} excede o tamanho máximo de ${e.maxFileSize} KB.`, !0) : (a.value = !1, o.value = null, !1);
|
|
2202
2202
|
}
|
|
2203
|
-
function C(
|
|
2203
|
+
function C($) {
|
|
2204
2204
|
o.value = null, u.value = !0;
|
|
2205
|
-
const L = { file:
|
|
2205
|
+
const L = { file: $, progress: 0, status: "uploading" };
|
|
2206
2206
|
t.value.push(L);
|
|
2207
2207
|
}
|
|
2208
|
-
const x = async (
|
|
2209
|
-
if (!f(
|
|
2210
|
-
C(
|
|
2208
|
+
const x = async ($, L) => {
|
|
2209
|
+
if (!f($) && !k()) {
|
|
2210
|
+
C($);
|
|
2211
2211
|
try {
|
|
2212
2212
|
for (let w = 1; w <= 10; w++) {
|
|
2213
2213
|
await new Promise((A) => setTimeout(A, 300));
|
|
2214
|
-
const M = t.value.findIndex((A) => A.file ===
|
|
2214
|
+
const M = t.value.findIndex((A) => A.file === $);
|
|
2215
2215
|
M !== -1 && (t.value[M] = { ...t.value[M], progress: w * 10 });
|
|
2216
2216
|
}
|
|
2217
|
-
const N = t.value.findIndex((w) => w.file ===
|
|
2217
|
+
const N = t.value.findIndex((w) => w.file === $);
|
|
2218
2218
|
N !== -1 && (t.value[N] = {
|
|
2219
2219
|
...t.value[N],
|
|
2220
2220
|
status: Math.random() > 0.2 ? "success" : "error"
|
|
2221
2221
|
});
|
|
2222
2222
|
} catch {
|
|
2223
|
-
const N = t.value.findIndex((w) => w.file ===
|
|
2223
|
+
const N = t.value.findIndex((w) => w.file === $);
|
|
2224
2224
|
N !== -1 && (t.value[N] = { ...t.value[N], status: "error" });
|
|
2225
2225
|
} finally {
|
|
2226
2226
|
if (u.value = !1, Q("ce-file-upload")) {
|
|
@@ -2231,11 +2231,11 @@ const yn = /* @__PURE__ */ hn(bn, [["render", wn]]), Cn = ["id", "checked", "dis
|
|
|
2231
2231
|
}
|
|
2232
2232
|
}
|
|
2233
2233
|
}, E = I(
|
|
2234
|
-
() => e.accept.map((
|
|
2235
|
-
), O = (
|
|
2234
|
+
() => e.accept.map(($) => $.split("/")[1].toUpperCase()).join(", ")
|
|
2235
|
+
), O = ($, L) => {
|
|
2236
2236
|
var N;
|
|
2237
|
-
if (
|
|
2238
|
-
const w = Array.from(
|
|
2237
|
+
if ($.preventDefault(), T(), (N = $.dataTransfer) != null && N.files) {
|
|
2238
|
+
const w = Array.from($.dataTransfer.files);
|
|
2239
2239
|
if (w.some((A) => !p(A))) {
|
|
2240
2240
|
o.value = "Arquivo inválido! Formatos permitidos: " + E.value;
|
|
2241
2241
|
return;
|
|
@@ -2247,8 +2247,8 @@ const yn = /* @__PURE__ */ hn(bn, [["render", wn]]), Cn = ["id", "checked", "dis
|
|
|
2247
2247
|
}, T = () => {
|
|
2248
2248
|
a.value = !1, r.value = !1;
|
|
2249
2249
|
};
|
|
2250
|
-
function S(
|
|
2251
|
-
return !e.multiple &&
|
|
2250
|
+
function S($) {
|
|
2251
|
+
return !e.multiple && $.length > 1 ? (o.value = "Apenas um arquivo pode ser enviado por vez", a.value = !0, !0) : !1;
|
|
2252
2252
|
}
|
|
2253
2253
|
return {
|
|
2254
2254
|
arquivos: t,
|
|
@@ -2266,9 +2266,9 @@ const yn = /* @__PURE__ */ hn(bn, [["render", wn]]), Cn = ["id", "checked", "dis
|
|
|
2266
2266
|
limparArquivos: m,
|
|
2267
2267
|
removerSelecionados: l,
|
|
2268
2268
|
removeArquivos: b,
|
|
2269
|
-
manipulaArquivos: (
|
|
2269
|
+
manipulaArquivos: ($, L) => {
|
|
2270
2270
|
T();
|
|
2271
|
-
const N =
|
|
2271
|
+
const N = $.target;
|
|
2272
2272
|
N != null && N.files && Array.from(N.files).forEach((w) => {
|
|
2273
2273
|
x(w, L);
|
|
2274
2274
|
});
|
|
@@ -2276,11 +2276,11 @@ const yn = /* @__PURE__ */ hn(bn, [["render", wn]]), Cn = ["id", "checked", "dis
|
|
|
2276
2276
|
validaArquivo: p,
|
|
2277
2277
|
recebeArquivo: x,
|
|
2278
2278
|
manipulaArquivoViaArrastaSolta: O,
|
|
2279
|
-
manipulaArrastar: (
|
|
2279
|
+
manipulaArrastar: ($) => {
|
|
2280
2280
|
var N;
|
|
2281
|
-
|
|
2282
|
-
const L = Array.from(
|
|
2283
|
-
S(L) || (N =
|
|
2281
|
+
$.preventDefault(), T();
|
|
2282
|
+
const L = Array.from($.dataTransfer.items).filter((w) => w.kind === "file");
|
|
2283
|
+
S(L) || (N = $.dataTransfer) != null && N.items && (Array.from($.dataTransfer.items).some(
|
|
2284
2284
|
(M) => M.kind === "file" && !e.accept.includes(M.type)
|
|
2285
2285
|
) ? (a.value = !0, o.value = "Arquivo inválido") : r.value = !0);
|
|
2286
2286
|
},
|
|
@@ -2390,7 +2390,7 @@ const yn = /* @__PURE__ */ hn(bn, [["render", wn]]), Cn = ["id", "checked", "dis
|
|
|
2390
2390
|
}, null, 40, Cs)
|
|
2391
2391
|
], 34),
|
|
2392
2392
|
(i(!0), d(U, null, W(n(r), (H, P) => {
|
|
2393
|
-
var
|
|
2393
|
+
var $;
|
|
2394
2394
|
return i(), d("div", {
|
|
2395
2395
|
key: P,
|
|
2396
2396
|
class: "border rounded-lg p-4 flex items-center space-x-3 shadow-md flex-col relative"
|
|
@@ -2427,7 +2427,7 @@ const yn = /* @__PURE__ */ hn(bn, [["render", wn]]), Cn = ["id", "checked", "dis
|
|
|
2427
2427
|
s("div", {
|
|
2428
2428
|
class: v(["text-white font-bold text-[0.7rem] px-2 content-center rounded absolute top-5 h-5 -left-2", n(O)(H.file.name)])
|
|
2429
2429
|
}, [
|
|
2430
|
-
s("p", null, B(((
|
|
2430
|
+
s("p", null, B((($ = H.file.name.split(".").pop()) == null ? void 0 : $.toUpperCase()) || "ARQ"), 1)
|
|
2431
2431
|
], 2)
|
|
2432
2432
|
]),
|
|
2433
2433
|
s("div", Ds, [
|
|
@@ -2680,7 +2680,7 @@ const Ns = ["for", "innerHTML"], Qs = { class: "relative" }, Ws = ["id", "value"
|
|
|
2680
2680
|
}
|
|
2681
2681
|
r("update:modelValue", M);
|
|
2682
2682
|
}
|
|
2683
|
-
},
|
|
2683
|
+
}, $ = (w) => {
|
|
2684
2684
|
if (T(w)) {
|
|
2685
2685
|
const M = Array.isArray(f.value) ? [...f.value] : [], A = M.indexOf(w.value);
|
|
2686
2686
|
if (A !== -1) {
|
|
@@ -2693,14 +2693,14 @@ const Ns = ["for", "innerHTML"], Qs = { class: "relative" }, Ws = ["id", "value"
|
|
|
2693
2693
|
}
|
|
2694
2694
|
}, L = (w, M, A) => {
|
|
2695
2695
|
if (a.multiple && M.shiftKey && u.value !== null) {
|
|
2696
|
-
const V = Math.min(u.value, A),
|
|
2697
|
-
for (let X = V; X <=
|
|
2696
|
+
const V = Math.min(u.value, A), j = Math.max(u.value, A), h = k.value[u.value], _ = h ? T(h) : !0;
|
|
2697
|
+
for (let X = V; X <= j; X++) {
|
|
2698
2698
|
const K = k.value[X];
|
|
2699
|
-
K && !K.disabled && !K.header && (_ ? P(K) :
|
|
2699
|
+
K && !K.disabled && !K.header && (_ ? P(K) : $(K));
|
|
2700
2700
|
}
|
|
2701
2701
|
u.value = A;
|
|
2702
2702
|
} else
|
|
2703
|
-
a.multiple ? (T(w) ?
|
|
2703
|
+
a.multiple ? (T(w) ? $(w) : P(w), u.value = A) : N(w);
|
|
2704
2704
|
}, N = (w) => {
|
|
2705
2705
|
if (!w.disabled) {
|
|
2706
2706
|
if (a.multiple && (w.value === "" || w.value === null)) {
|
|
@@ -2780,7 +2780,7 @@ const Ns = ["for", "innerHTML"], Qs = { class: "relative" }, Ws = ["id", "value"
|
|
|
2780
2780
|
s("span", null, B(S(A)), 1),
|
|
2781
2781
|
w.closeChip ? (i(), d("button", {
|
|
2782
2782
|
key: 0,
|
|
2783
|
-
onClick: Ce((
|
|
2783
|
+
onClick: Ce((j) => H(A), ["stop"]),
|
|
2784
2784
|
class: "ml-2 text-gray-600 hover:text-gray-800"
|
|
2785
2785
|
}, " × ", 8, Gs)) : y("", !0)
|
|
2786
2786
|
]))), 128))
|
|
@@ -2837,7 +2837,7 @@ const Ns = ["for", "innerHTML"], Qs = { class: "relative" }, Ws = ["id", "value"
|
|
|
2837
2837
|
T(A) ? "bg-gray-100" : "",
|
|
2838
2838
|
A.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
2839
2839
|
]),
|
|
2840
|
-
onClick: (
|
|
2840
|
+
onClick: (j) => L(A, j, V)
|
|
2841
2841
|
}, [
|
|
2842
2842
|
s("span", {
|
|
2843
2843
|
innerHTML: A.label || A.value
|
|
@@ -4494,9 +4494,9 @@ const jr = /* @__PURE__ */ q({
|
|
|
4494
4494
|
atualizaOpcoesMenu: S,
|
|
4495
4495
|
defineRetorno: H,
|
|
4496
4496
|
validaUrl: P
|
|
4497
|
-
} = Je(),
|
|
4498
|
-
function N(M, A, V,
|
|
4499
|
-
P(A.path) && window.open(A.path, "_blank"), g(M, A.text, V), k(
|
|
4497
|
+
} = Je(), $ = e, L = t;
|
|
4498
|
+
function N(M, A, V, j) {
|
|
4499
|
+
P(A.path) && window.open(A.path, "_blank"), g(M, A.text, V), k(j);
|
|
4500
4500
|
const h = H(A);
|
|
4501
4501
|
if (V) {
|
|
4502
4502
|
L("redirect", h);
|
|
@@ -4508,9 +4508,13 @@ const jr = /* @__PURE__ */ q({
|
|
|
4508
4508
|
function w() {
|
|
4509
4509
|
L("backToHome", !0);
|
|
4510
4510
|
}
|
|
4511
|
-
return
|
|
4512
|
-
|
|
4513
|
-
|
|
4511
|
+
return Y(
|
|
4512
|
+
() => $.itemsMenu,
|
|
4513
|
+
(M) => {
|
|
4514
|
+
T(M), C(M), S($.itemsMenuMyService, $.itemsMenu);
|
|
4515
|
+
},
|
|
4516
|
+
{ deep: !0, immediate: !0 }
|
|
4517
|
+
), (M, A) => (i(), d(U, null, [
|
|
4514
4518
|
s("div", qr, [
|
|
4515
4519
|
s("div", Ur, [
|
|
4516
4520
|
s("img", {
|
|
@@ -4580,20 +4584,20 @@ const jr = /* @__PURE__ */ q({
|
|
|
4580
4584
|
color: "#737373"
|
|
4581
4585
|
}, null, 8, ["name"]))
|
|
4582
4586
|
], 2),
|
|
4583
|
-
(i(!0), d(U, null, W(n(u), (V,
|
|
4587
|
+
(i(!0), d(U, null, W(n(u), (V, j) => {
|
|
4584
4588
|
var h;
|
|
4585
4589
|
return i(), d("div", {
|
|
4586
4590
|
class: "px-2.5 mb-2 flex items-center",
|
|
4587
|
-
key:
|
|
4591
|
+
key: j
|
|
4588
4592
|
}, [
|
|
4589
4593
|
((h = V.subMenu) == null ? void 0 : h.length) == 0 ? (i(), d("div", {
|
|
4590
4594
|
key: 0,
|
|
4591
4595
|
class: v(["flex items-center cursor-pointer h-12 rounded-lg w-full text-[#292929] font-[600]", {
|
|
4592
|
-
"bg-gray-100":
|
|
4596
|
+
"bg-gray-100": j === n(a),
|
|
4593
4597
|
"justify-center": !n(o),
|
|
4594
4598
|
"pl-[1rem] space-x-2": n(o)
|
|
4595
4599
|
}]),
|
|
4596
|
-
onClick: (_) => N(null, V, !1,
|
|
4600
|
+
onClick: (_) => N(null, V, !1, j)
|
|
4597
4601
|
}, [
|
|
4598
4602
|
z(Z, {
|
|
4599
4603
|
name: V.icon || "",
|
|
@@ -4609,9 +4613,9 @@ const jr = /* @__PURE__ */ q({
|
|
|
4609
4613
|
], 10, Yr)) : (i(), d("div", Gr, [
|
|
4610
4614
|
s("div", {
|
|
4611
4615
|
"data-testid": "menu-dropdown",
|
|
4612
|
-
onClick: (_) => n(E)(
|
|
4616
|
+
onClick: (_) => n(E)(j),
|
|
4613
4617
|
class: v(["flex items-center cursor-pointer h-12 rounded-lg w-full", {
|
|
4614
|
-
"bg-gray-100": n(l).includes(
|
|
4618
|
+
"bg-gray-100": n(l).includes(j) || j === n(a),
|
|
4615
4619
|
"!justify-center": !n(o),
|
|
4616
4620
|
"px-[1rem]": n(o)
|
|
4617
4621
|
}])
|
|
@@ -4634,7 +4638,7 @@ const jr = /* @__PURE__ */ q({
|
|
|
4634
4638
|
], 2)
|
|
4635
4639
|
], 2),
|
|
4636
4640
|
z(Z, {
|
|
4637
|
-
name: n(l).includes(
|
|
4641
|
+
name: n(l).includes(j) ? n(Le) : n(Fe),
|
|
4638
4642
|
size: "24",
|
|
4639
4643
|
color: "#737373",
|
|
4640
4644
|
class: v({
|
|
@@ -4643,15 +4647,15 @@ const jr = /* @__PURE__ */ q({
|
|
|
4643
4647
|
})
|
|
4644
4648
|
}, null, 8, ["name", "class"])
|
|
4645
4649
|
], 10, Jr),
|
|
4646
|
-
n(o) && n(l).includes(
|
|
4650
|
+
n(o) && n(l).includes(j) ? (i(), d("div", {
|
|
4647
4651
|
key: 0,
|
|
4648
|
-
class: v(["rounded-lg pt-4 overflow-hidden transition-all duration-300 ease-in-out max-h-max w-full", { "max-h-full": n(l).includes(
|
|
4652
|
+
class: v(["rounded-lg pt-4 overflow-hidden transition-all duration-300 ease-in-out max-h-max w-full", { "max-h-full": n(l).includes(j) }])
|
|
4649
4653
|
}, [
|
|
4650
4654
|
(i(!0), d(U, null, W(V.subMenu, (_, X) => (i(), d("div", {
|
|
4651
4655
|
class: v(["h-12 flex flex-col justify-center w-full rounded-lg pl-12 hover:bg-gray-100 text-[#424242] font-[400]", {
|
|
4652
|
-
"w-[310px] bg-gray-100": n(r)[X] === _.text &&
|
|
4656
|
+
"w-[310px] bg-gray-100": n(r)[X] === _.text && j === n(a)
|
|
4653
4657
|
}]),
|
|
4654
|
-
onClick: (K) => N(X, _, !0,
|
|
4658
|
+
onClick: (K) => N(X, _, !0, j),
|
|
4655
4659
|
key: X
|
|
4656
4660
|
}, [
|
|
4657
4661
|
z(xe, {
|
|
@@ -4740,13 +4744,13 @@ const jr = /* @__PURE__ */ q({
|
|
|
4740
4744
|
obterTextosMenu: S,
|
|
4741
4745
|
alternarDropdown: H,
|
|
4742
4746
|
buscarNoMenu: P,
|
|
4743
|
-
definirOpcoesMenu:
|
|
4747
|
+
definirOpcoesMenu: $,
|
|
4744
4748
|
travarMenuPorCliqueNoInput: L,
|
|
4745
4749
|
defineRetorno: N
|
|
4746
4750
|
} = Je(), w = e, M = t;
|
|
4747
|
-
function A(V,
|
|
4748
|
-
b(V,
|
|
4749
|
-
const X = N(
|
|
4751
|
+
function A(V, j, h, _) {
|
|
4752
|
+
b(V, j.text, h), p(_);
|
|
4753
|
+
const X = N(j);
|
|
4750
4754
|
if (h) {
|
|
4751
4755
|
M("redirect", X);
|
|
4752
4756
|
return;
|
|
@@ -4756,12 +4760,12 @@ const jr = /* @__PURE__ */ q({
|
|
|
4756
4760
|
return Y(w, () => {
|
|
4757
4761
|
w.isHome && a();
|
|
4758
4762
|
}), re(() => {
|
|
4759
|
-
|
|
4760
|
-
}), (V,
|
|
4763
|
+
$(w.items), T(w.items);
|
|
4764
|
+
}), (V, j) => (i(), d("div", {
|
|
4761
4765
|
class: v(["sm:hidden pt-[25px] relative h-full overflow-auto scrollbar-hide transition-all duration-300 ease-in-out bg-white border border-gray-200 rounded-lg", { "w-[310px] mr-2.5": n(o), "z-0": n(O), "z-10": !n(O) && n(o) }]),
|
|
4762
|
-
onMouseenter:
|
|
4766
|
+
onMouseenter: j[5] || (j[5] = //@ts-ignore
|
|
4763
4767
|
(...h) => n(l) && n(l)(...h)),
|
|
4764
|
-
onMouseleave:
|
|
4768
|
+
onMouseleave: j[6] || (j[6] = //@ts-ignore
|
|
4765
4769
|
(...h) => n(m) && n(m)(...h))
|
|
4766
4770
|
}, [
|
|
4767
4771
|
s("div", {
|
|
@@ -4774,7 +4778,7 @@ const jr = /* @__PURE__ */ q({
|
|
|
4774
4778
|
}])
|
|
4775
4779
|
}, " Menu ", 2),
|
|
4776
4780
|
s("button", {
|
|
4777
|
-
onClick:
|
|
4781
|
+
onClick: j[0] || (j[0] = (h) => n(c)(M))
|
|
4778
4782
|
}, [
|
|
4779
4783
|
z(Z, {
|
|
4780
4784
|
name: n(o) ? n(Nt) : n(Qt),
|
|
@@ -4791,10 +4795,10 @@ const jr = /* @__PURE__ */ q({
|
|
|
4791
4795
|
key: 1,
|
|
4792
4796
|
placeholder: "Pesquisar",
|
|
4793
4797
|
items: n(S)(n(x)),
|
|
4794
|
-
"onUpdate:modelValue":
|
|
4795
|
-
onFilterList:
|
|
4796
|
-
onClearFilter:
|
|
4797
|
-
"onInput:focus":
|
|
4798
|
+
"onUpdate:modelValue": j[1] || (j[1] = (h) => n(P)(n(x), String(h))),
|
|
4799
|
+
onFilterList: j[2] || (j[2] = (h) => n(P)(n(x), String(h))),
|
|
4800
|
+
onClearFilter: j[3] || (j[3] = (h) => n($)(n(x))),
|
|
4801
|
+
"onInput:focus": j[4] || (j[4] = (h) => n(L)(M))
|
|
4798
4802
|
}, null, 8, ["items"])) : (i(), G(Z, {
|
|
4799
4803
|
key: 0,
|
|
4800
4804
|
name: n(ze),
|