diff --git a/dist/eli-vue.es.js b/dist/eli-vue.es.js index 3cbefcc..dd6618d 100644 --- a/dist/eli-vue.es.js +++ b/dist/eli-vue.es.js @@ -1,14 +1,14 @@ -import { defineComponent as I, createBlock as W, openBlock as c, mergeProps as Se, withCtx as ae, renderSlot as Be, computed as S, ref as O, resolveComponent as K, createVNode as N, createTextVNode as qe, createElementVNode as v, createCommentVNode as Q, toDisplayString as F, h as je, watch as me, createElementBlock as $, withDirectives as ra, withKeys as Ca, vModelText as Aa, Fragment as re, renderList as pe, normalizeStyle as ze, resolveDynamicComponent as Te, normalizeClass as Me, withModifiers as ue, Teleport as Sa, createSlots as ka, onMounted as la, vModelSelect as Da, onBeforeUnmount as Ma } from "vue"; -import { VBtn as Ba } from "vuetify/components/VBtn"; -import { VBadge as Ta } from "vuetify/components/VBadge"; +import { defineComponent as I, createBlock as W, openBlock as c, mergeProps as Ae, withCtx as ae, renderSlot as Be, computed as S, ref as O, resolveComponent as K, createVNode as N, createTextVNode as qe, createElementVNode as v, createCommentVNode as Q, toDisplayString as F, h as je, watch as me, createElementBlock as $, withDirectives as la, withKeys as Aa, vModelText as Sa, Fragment as ue, renderList as pe, normalizeStyle as ze, resolveDynamicComponent as Te, normalizeClass as Me, withModifiers as se, Teleport as ka, createSlots as Da, onMounted as ia, vModelSelect as Ma, onBeforeUnmount as Ba } from "vue"; +import { VBtn as Ta } from "vuetify/components/VBtn"; +import { VBadge as wa } from "vuetify/components/VBadge"; import { VTextField as He } from "vuetify/components/VTextField"; -import { VCard as ia, VCardTitle as sa, VCardText as ua, VCardActions as ca } from "vuetify/components/VCard"; -import { VContainer as wa } from "vuetify/components/VGrid"; -import { VChip as Pa, VTextarea as Oa, VSelect as Fa } from "vuetify/components"; -import { VChip as Va } from "vuetify/components/VChip"; -import { VTextarea as qa } from "vuetify/components/VTextarea"; -import { VSelect as Na } from "vuetify/components/VSelect"; -const Ia = I({ +import { VCard as sa, VCardTitle as ua, VCardText as ca, VCardActions as da } from "vuetify/components/VCard"; +import { VContainer as Pa } from "vuetify/components/VGrid"; +import { VChip as Oa, VTextarea as Fa, VSelect as Va } from "vuetify/components"; +import { VChip as qa } from "vuetify/components/VChip"; +import { VTextarea as Na } from "vuetify/components/VTextarea"; +import { VSelect as Ia } from "vuetify/components/VSelect"; +const La = I({ name: "EliBotao", inheritAttrs: !1, props: { @@ -39,8 +39,8 @@ const Ia = I({ o[r] = i; return o; }; -function La(e, a, o, r, i, f) { - return c(), W(Ba, Se({ +function ja(e, a, o, r, i, f) { + return c(), W(Ta, Ae({ color: e.color, variant: e.variant, size: e.size, @@ -53,10 +53,10 @@ function La(e, a, o, r, i, f) { _: 3 }, 16, ["color", "variant", "size", "disabled", "loading"]); } -const da = /* @__PURE__ */ L(Ia, [["render", La]]), Je = { +const fa = /* @__PURE__ */ L(La, [["render", ja]]), We = { suave: "4px", pill: "10px" -}, ja = I({ +}, za = I({ name: "EliBadge", inheritAttrs: !1, props: { @@ -95,14 +95,14 @@ const da = /* @__PURE__ */ L(Ia, [["render", La]]), Je = { } }, setup(e) { - const a = S(() => e.radius in Je ? Je[e.radius] : e.radius), o = S(() => e.dot || e.badge !== void 0 ? e.visible : !1), r = S(() => ({ + const a = S(() => e.radius in We ? We[e.radius] : e.radius), o = S(() => e.dot || e.badge !== void 0 ? e.visible : !1), r = S(() => ({ "--eli-badge-radius": a.value })); return { showBadge: o, badgeStyle: r }; } }); -function za(e, a, o, r, i, f) { - return e.showBadge ? (c(), W(Ta, Se({ +function Ha(e, a, o, r, i, f) { + return e.showBadge ? (c(), W(wa, Ae({ key: 0, color: e.color }, e.$attrs, { @@ -120,29 +120,29 @@ function za(e, a, o, r, i, f) { _: 3 }, 16, ["color", "location", "offset-x", "offset-y", "dot", "content", "style"])) : Be(e.$slots, "default", { key: 1 }); } -const Ue = /* @__PURE__ */ L(ja, [["render", za]]); -function Ha(e) { - return e.replace(/\D+/g, ""); -} +const Ue = /* @__PURE__ */ L(za, [["render", Ha]]); function Ua(e) { - const a = Ha(e); - return a.length <= 11 ? a.replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d{1,2})$/, "$1-$2").slice(0, 14) : a.replace(/^(\d{2})(\d)/, "$1.$2").replace(/^(\d{2})\.(\d{3})(\d)/, "$1.$2.$3").replace(/\.(\d{3})(\d)/, ".$1/$2").replace(/(\d{4})(\d)/, "$1-$2").slice(0, 18); + return e.replace(/\D+/g, ""); } function Ya(e) { - return e.replace(/\D+/g, ""); + const a = Ua(e); + return a.length <= 11 ? a.replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d{1,2})$/, "$1-$2").slice(0, 14) : a.replace(/^(\d{2})(\d)/, "$1.$2").replace(/^(\d{2})\.(\d{3})(\d)/, "$1.$2.$3").replace(/\.(\d{3})(\d)/, ".$1/$2").replace(/(\d{4})(\d)/, "$1-$2").slice(0, 18); } function Ra(e) { - const a = Ya(e); - return a ? a.length <= 10 ? a.replace(/^(\d{2})(\d)/, "($1) $2").replace(/(\d{4})(\d)/, "$1-$2").slice(0, 14) : a.replace(/^(\d{2})(\d)/, "($1) $2").replace(/(\d{5})(\d)/, "$1-$2").slice(0, 15) : ""; -} -function Ja(e) { return e.replace(/\D+/g, ""); } +function Ja(e) { + const a = Ra(e); + return a ? a.length <= 10 ? a.replace(/^(\d{2})(\d)/, "($1) $2").replace(/(\d{4})(\d)/, "$1-$2").slice(0, 14) : a.replace(/^(\d{2})(\d)/, "($1) $2").replace(/(\d{5})(\d)/, "$1-$2").slice(0, 15) : ""; +} function Wa(e) { - const a = Ja(e); + return e.replace(/\D+/g, ""); +} +function Za(e) { + const a = Wa(e); return a ? a.replace(/^(\d{5})(\d)/, "$1-$2").slice(0, 9) : ""; } -const Za = I({ +const Xa = I({ name: "EliEntradaTexto", inheritAttrs: !1, props: { @@ -180,11 +180,11 @@ const Za = I({ function n(l) { switch (r.value) { case "telefone": - return Ra(l); + return Ja(l); case "cpfCnpj": - return Ua(l); + return Ya(l); case "cep": - return Wa(l); + return Za(l); default: return l; } @@ -196,9 +196,9 @@ const Za = I({ return { attrs: a, emit: o, localValue: i, inputHtmlType: f, inputMode: t, onInput: d }; } }); -function Xa(e, a, o, r, i, f) { +function Ga(e, a, o, r, i, f) { var t, n, d, l; - return c(), W(He, Se({ + return c(), W(He, Ae({ modelValue: e.localValue, "onUpdate:modelValue": a[0] || (a[0] = (u) => e.localValue = u), type: e.inputHtmlType, @@ -213,10 +213,10 @@ function Xa(e, a, o, r, i, f) { onInput: e.onInput }), null, 16, ["modelValue", "type", "inputmode", "label", "placeholder", "counter", "maxlength", "onInput"]); } -const Ye = /* @__PURE__ */ L(Za, [["render", Xa]]), Ga = I({ +const Ye = /* @__PURE__ */ L(Xa, [["render", Ga]]), Ka = I({ name: "EliOlaMundo", components: { - EliBotao: da, + EliBotao: fa, EliBadge: Ue, EliEntradaTexto: Ye }, @@ -230,17 +230,17 @@ const Ye = /* @__PURE__ */ L(Za, [["render", Xa]]), Ga = I({ cep: a }; } -}), Ka = { class: "grid-example" }; -function Qa(e, a, o, r, i, f) { +}), Qa = { class: "grid-example" }; +function xa(e, a, o, r, i, f) { const t = K("EliBadge"), n = K("EliEntradaTexto"), d = K("EliBotao"); - return c(), W(wa, null, { + return c(), W(Pa, null, { default: ae(() => [ - N(ia, { + N(sa, { class: "mx-auto", max_width: "400" }, { default: ae(() => [ - N(sa, null, { + N(ua, null, { default: ae(() => [ N(t, { badge: "Novo", @@ -255,10 +255,10 @@ function Qa(e, a, o, r, i, f) { ]), _: 1 }), - N(ua, null, { + N(ca, null, { default: ae(() => [ a[6] || (a[6] = qe(" Este é um componente de exemplo integrado com Vuetify. ", -1)), - v("div", Ka, [ + v("div", Qa, [ N(n, { value: e.nome, "onUpdate:value": a[0] || (a[0] = (l) => e.nome = l), @@ -289,7 +289,7 @@ function Qa(e, a, o, r, i, f) { ]), _: 1 }), - N(ca, null, { + N(da, null, { default: ae(() => [ N(d, { color: "primary", @@ -311,7 +311,7 @@ function Qa(e, a, o, r, i, f) { _: 1 }); } -const xa = /* @__PURE__ */ L(Ga, [["render", Qa]]), et = I({ +const et = /* @__PURE__ */ L(Ka, [["render", xa]]), at = I({ name: "EliCartao", components: { EliBadge: Ue }, inheritAttrs: !1, @@ -362,22 +362,22 @@ const xa = /* @__PURE__ */ L(Ga, [["render", Qa]]), et = I({ onClick: f }; } -}), at = { class: "eli-cartao__titulo-texto" }, tt = { class: "eli-cartao__status" }; -function ot(e, a, o, r, i, f) { +}), tt = { class: "eli-cartao__titulo-texto" }, ot = { class: "eli-cartao__status" }; +function nt(e, a, o, r, i, f) { const t = K("EliBadge"); - return c(), W(ia, Se({ + return c(), W(sa, Ae({ class: ["eli-cartao", e.classeStatus], variant: e.variant }, e.$attrs), { default: ae(() => [ - N(sa, { class: "eli-cartao__titulo" }, { + N(ua, { class: "eli-cartao__titulo" }, { default: ae(() => [ - v("div", at, [ + v("div", tt, [ Be(e.$slots, "titulo", {}, () => [ qe(F(e.titulo), 1) ]) ]), - v("div", tt, [ + v("div", ot, [ N(t, { badge: e.rotuloStatus, radius: "pill", @@ -392,13 +392,13 @@ function ot(e, a, o, r, i, f) { ]), _: 3 }), - N(ua, { class: "eli-cartao__conteudo" }, { + N(ca, { class: "eli-cartao__conteudo" }, { default: ae(() => [ Be(e.$slots, "default") ]), _: 3 }), - e.$slots.acoes ? (c(), W(ca, { + e.$slots.acoes ? (c(), W(da, { key: 0, class: "eli-cartao__acoes" }, { @@ -411,15 +411,15 @@ function ot(e, a, o, r, i, f) { _: 3 }, 16, ["variant", "class"]); } -const nt = /* @__PURE__ */ L(et, [["render", ot]]); -var fa = ((e) => (e[e.sucesso = 200] = "sucesso", e[e.erroConhecido = 400] = "erroConhecido", e[e.erroPermissao = 401] = "erroPermissao", e[e.erroNaoEncontrado = 404] = "erroNaoEncontrado", e[e.erroDesconhecido = 500] = "erroDesconhecido", e[e.tempoEsgotado = 504] = "tempoEsgotado", e))(fa || {}); +const rt = /* @__PURE__ */ L(at, [["render", nt]]); +var pa = ((e) => (e[e.sucesso = 200] = "sucesso", e[e.erroConhecido = 400] = "erroConhecido", e[e.erroPermissao = 401] = "erroPermissao", e[e.erroNaoEncontrado = 404] = "erroNaoEncontrado", e[e.erroDesconhecido = 500] = "erroDesconhecido", e[e.tempoEsgotado = 504] = "tempoEsgotado", e))(pa || {}); /** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const rt = (e) => { +const lt = (e) => { for (const a in e) if (a.startsWith("aria-") || a === "role" || a === "title") return !0; @@ -431,28 +431,28 @@ const rt = (e) => { * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const We = (e) => e === ""; +const Ze = (e) => e === ""; /** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const lt = (...e) => e.filter((a, o, r) => !!a && a.trim() !== "" && r.indexOf(a) === o).join(" ").trim(); +const it = (...e) => e.filter((a, o, r) => !!a && a.trim() !== "" && r.indexOf(a) === o).join(" ").trim(); /** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const Ze = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(); +const Xe = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(); /** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const it = (e) => e.replace( +const st = (e) => e.replace( /^([A-Z])|[\s-_]+(\w)/g, (a, o, r) => r ? r.toUpperCase() : o.toLowerCase() ); @@ -462,8 +462,8 @@ const it = (e) => e.replace( * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const st = (e) => { - const a = it(e); +const ut = (e) => { + const a = st(e); return a.charAt(0).toUpperCase() + a.slice(1); }; /** @@ -489,7 +489,7 @@ var Fe = { * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const ut = ({ +const ct = ({ name: e, iconNode: a, absoluteStrokeWidth: o, @@ -507,13 +507,13 @@ const ut = ({ width: t, height: t, stroke: n, - "stroke-width": We(o) || We(r) || o === !0 || r === !0 ? Number(i || f || Fe["stroke-width"]) * 24 / Number(t) : i || f || Fe["stroke-width"], - class: lt( + "stroke-width": Ze(o) || Ze(r) || o === !0 || r === !0 ? Number(i || f || Fe["stroke-width"]) * 24 / Number(t) : i || f || Fe["stroke-width"], + class: it( "lucide", d.class, - ...e ? [`lucide-${Ze(st(e))}-icon`, `lucide-${Ze(e)}`] : ["lucide-icon"] + ...e ? [`lucide-${Xe(ut(e))}-icon`, `lucide-${Xe(e)}`] : ["lucide-icon"] ), - ...!l.default && !rt(d) && { "aria-hidden": "true" } + ...!l.default && !lt(d) && { "aria-hidden": "true" } }, [...a.map((u) => je(...u)), ...l.default ? [l.default()] : []] ); @@ -524,7 +524,7 @@ const ut = ({ * See the LICENSE file in the root directory of this source tree. */ const we = (e, a) => (o, { slots: r, attrs: i }) => je( - ut, + ct, { ...i, ...o, @@ -539,7 +539,7 @@ const we = (e, a) => (o, { slots: r, attrs: i }) => je( * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const Xe = we("arrow-down", [ +const Ge = we("arrow-down", [ ["path", { d: "M12 5v14", key: "s699le" }], ["path", { d: "m19 12-7 7-7-7", key: "1idqje" }] ]); @@ -549,7 +549,7 @@ const Xe = we("arrow-down", [ * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const Ge = we("arrow-up", [ +const Ke = we("arrow-up", [ ["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }], ["path", { d: "M12 19V5", key: "x0mq9r" }] ]); @@ -559,7 +559,7 @@ const Ge = we("arrow-up", [ * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const Ke = we("chevron-down", [ +const Qe = we("chevron-down", [ ["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }] ]); /** @@ -568,7 +568,7 @@ const Ke = we("chevron-down", [ * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const Qe = we("chevron-right", [ +const xe = we("chevron-right", [ ["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }] ]); /** @@ -577,7 +577,7 @@ const Qe = we("chevron-right", [ * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const ct = we("ellipsis-vertical", [ +const dt = we("ellipsis-vertical", [ ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }], ["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }], ["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }] @@ -588,12 +588,12 @@ const ct = we("ellipsis-vertical", [ * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const dt = we("search", [ +const ft = we("search", [ ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }], ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }] -]), ft = I({ +]), pt = I({ name: "EliTabelaCaixaDeBusca", - components: { Search: dt }, + components: { Search: ft }, props: { modelo: { type: String, @@ -619,20 +619,20 @@ const dt = we("search", [ } return { texto: o, emitirBusca: r }; } -}), pt = { class: "eli-tabela__busca" }, vt = { class: "eli-tabela__busca-input-wrapper" }; -function mt(e, a, o, r, i, f) { +}), vt = { class: "eli-tabela__busca" }, mt = { class: "eli-tabela__busca-input-wrapper" }; +function bt(e, a, o, r, i, f) { const t = K("Search"); - return c(), $("div", pt, [ - v("div", vt, [ - ra(v("input", { + return c(), $("div", vt, [ + v("div", mt, [ + la(v("input", { id: "eli-tabela-busca", "onUpdate:modelValue": a[0] || (a[0] = (n) => e.texto = n), type: "search", class: "eli-tabela__busca-input", placeholder: "Digite termos para filtrar", - onKeyup: a[1] || (a[1] = Ca((...n) => e.emitirBusca && e.emitirBusca(...n), ["enter"])) + onKeyup: a[1] || (a[1] = Aa((...n) => e.emitirBusca && e.emitirBusca(...n), ["enter"])) }, null, 544), [ - [Aa, e.texto] + [Sa, e.texto] ]), v("button", { type: "button", @@ -651,9 +651,9 @@ function mt(e, a, o, r, i, f) { ]) ]); } -const bt = /* @__PURE__ */ L(ft, [["render", mt]]), ht = I({ +const ht = /* @__PURE__ */ L(pt, [["render", bt]]), gt = I({ name: "EliTabelaCabecalho", - components: { EliTabelaCaixaDeBusca: bt }, + components: { EliTabelaCaixaDeBusca: ht }, props: { exibirBusca: { type: Boolean, @@ -702,17 +702,17 @@ const bt = /* @__PURE__ */ L(ft, [["render", mt]]), ht = I({ } return { temAcoesCabecalho: o, emitBuscar: r, emitColunas: i, emitFiltroAvancado: f }; } -}), gt = { class: "eli-tabela__cabecalho" }, $t = { +}), $t = { class: "eli-tabela__cabecalho" }, yt = { key: 0, class: "eli-tabela__busca-grupo" -}, yt = { +}, _t = { key: 1, class: "eli-tabela__acoes-cabecalho" -}, _t = ["onClick"], Et = { class: "eli-tabela__acoes-cabecalho-rotulo" }; -function Ct(e, a, o, r, i, f) { +}, Et = ["onClick"], Ct = { class: "eli-tabela__acoes-cabecalho-rotulo" }; +function At(e, a, o, r, i, f) { const t = K("EliTabelaCaixaDeBusca"); - return c(), $("div", gt, [ - e.exibirBusca ? (c(), $("div", $t, [ + return c(), $("div", $t, [ + e.exibirBusca ? (c(), $("div", yt, [ e.exibirBotaoColunas ? (c(), $("button", { key: 0, type: "button", @@ -730,8 +730,8 @@ function Ct(e, a, o, r, i, f) { onBuscar: e.emitBuscar }, null, 8, ["modelo", "onBuscar"]) ])) : Q("", !0), - e.temAcoesCabecalho ? (c(), $("div", yt, [ - (c(!0), $(re, null, pe(e.acoesCabecalho, (n, d) => (c(), $("button", { + e.temAcoesCabecalho ? (c(), $("div", _t, [ + (c(!0), $(ue, null, pe(e.acoesCabecalho, (n, d) => (c(), $("button", { key: `${n.rotulo}-${d}`, type: "button", class: "eli-tabela__acoes-cabecalho-botao", @@ -744,12 +744,12 @@ function Ct(e, a, o, r, i, f) { size: 16, "stroke-width": 2 })) : Q("", !0), - v("span", Et, F(n.rotulo), 1) - ], 12, _t))), 128)) + v("span", Ct, F(n.rotulo), 1) + ], 12, Et))), 128)) ])) : Q("", !0) ]); } -const At = /* @__PURE__ */ L(ht, [["render", Ct]]), St = I({ +const St = /* @__PURE__ */ L(gt, [["render", At]]), kt = I({ name: "EliTabelaEstados", props: { carregando: { @@ -766,25 +766,25 @@ const At = /* @__PURE__ */ L(ht, [["render", Ct]]), St = I({ default: void 0 } } -}), kt = { +}), Dt = { key: 0, class: "eli-tabela eli-tabela--carregando", "aria-busy": "true" -}, Dt = { +}, Mt = { key: 1, class: "eli-tabela eli-tabela--erro", role: "alert" -}, Mt = { class: "eli-tabela__erro-mensagem" }, Bt = { +}, Bt = { class: "eli-tabela__erro-mensagem" }, Tt = { key: 2, class: "eli-tabela eli-tabela--vazio" }; -function Tt(e, a, o, r, i, f) { - return e.carregando ? (c(), $("div", kt, " Carregando... ")) : e.erro ? (c(), $("div", Dt, [ +function wt(e, a, o, r, i, f) { + return e.carregando ? (c(), $("div", Dt, " Carregando... ")) : e.erro ? (c(), $("div", Mt, [ a[0] || (a[0] = v("div", { class: "eli-tabela__erro-titulo" }, "Erro", -1)), - v("div", Mt, F(e.erro), 1) - ])) : (c(), $("div", Bt, F(e.mensagemVazio ?? "Nenhum registro encontrado."), 1)); + v("div", Bt, F(e.erro), 1) + ])) : (c(), $("div", Tt, F(e.mensagemVazio ?? "Nenhum registro encontrado."), 1)); } -const wt = /* @__PURE__ */ L(St, [["render", Tt]]), Pt = I({ +const Pt = /* @__PURE__ */ L(kt, [["render", wt]]), Ot = I({ name: "EliTabelaDebug", props: { isDev: { @@ -800,12 +800,12 @@ const wt = /* @__PURE__ */ L(St, [["render", Tt]]), Pt = I({ required: !0 } } -}), Ot = { +}), Ft = { key: 0, style: { position: "fixed", left: "8px", bottom: "8px", "z-index": "999999", background: "rgba(185,28,28,0.9)", color: "#fff", padding: "6px 10px", "border-radius": "8px", "font-size": "12px", "max-width": "500px" } }; -function Ft(e, a, o, r, i, f) { - return e.isDev ? (c(), $("div", Ot, [ +function Vt(e, a, o, r, i, f) { + return e.isDev ? (c(), $("div", Ft, [ a[0] || (a[0] = v("div", null, [ v("b", null, "EliTabela debug") ], -1)), @@ -814,9 +814,9 @@ function Ft(e, a, o, r, i, f) { Be(e.$slots, "default") ])) : Q("", !0); } -const Vt = /* @__PURE__ */ L(Pt, [["render", Ft]]), qt = I({ +const qt = /* @__PURE__ */ L(Ot, [["render", Vt]]), Nt = I({ name: "EliTabelaHead", - components: { ArrowUp: Ge, ArrowDown: Xe }, + components: { ArrowUp: Ke, ArrowDown: Ge }, props: { colunas: { type: Array, @@ -852,30 +852,30 @@ const Vt = /* @__PURE__ */ L(Pt, [["render", Ft]]), qt = I({ a("alternarOrdenacao", i); } return { - ArrowUp: Ge, - ArrowDown: Xe, + ArrowUp: Ke, + ArrowDown: Ge, isOrdenavel: o, emitAlternarOrdenacao: r }; } -}), Nt = { class: "eli-tabela__thead" }, It = { class: "eli-tabela__tr eli-tabela__tr--header" }, Lt = { +}), It = { class: "eli-tabela__thead" }, Lt = { class: "eli-tabela__tr eli-tabela__tr--header" }, jt = { key: 0, class: "eli-tabela__th eli-tabela__th--expander", scope: "col" -}, jt = ["onClick"], zt = { class: "eli-tabela__th-texto" }, Ht = { +}, zt = ["onClick"], Ht = { class: "eli-tabela__th-texto" }, Ut = { key: 1, class: "eli-tabela__th-label" -}, Ut = { +}, Yt = { key: 1, class: "eli-tabela__th eli-tabela__th--acoes", scope: "col" }; -function Yt(e, a, o, r, i, f) { +function Rt(e, a, o, r, i, f) { const t = K("ArrowUp"); - return c(), $("thead", Nt, [ - v("tr", It, [ - e.temColunasInvisiveis ? (c(), $("th", Lt)) : Q("", !0), - (c(!0), $(re, null, pe(e.colunas, (n, d) => (c(), $("th", { + return c(), $("thead", It, [ + v("tr", Lt, [ + e.temColunasInvisiveis ? (c(), $("th", jt)) : Q("", !0), + (c(!0), $(ue, null, pe(e.colunas, (n, d) => (c(), $("th", { key: `th-${d}`, class: Me(["eli-tabela__th", [e.isOrdenavel(n) ? "eli-tabela__th--ordenavel" : void 0]]), scope: "col" @@ -888,7 +888,7 @@ function Yt(e, a, o, r, i, f) { ]]), onClick: (l) => e.emitAlternarOrdenacao(String(n.coluna_ordem)) }, [ - v("span", zt, F(n.rotulo), 1), + v("span", Ht, F(n.rotulo), 1), e.colunaOrdenacao === String(n.coluna_ordem) ? (c(), W(Te(e.direcaoOrdenacao === "asc" ? e.ArrowUp : e.ArrowDown), { key: 0, class: "eli-tabela__th-icone", @@ -902,13 +902,13 @@ function Yt(e, a, o, r, i, f) { "stroke-width": 2, "aria-hidden": "true" })) - ], 10, jt)) : (c(), $("span", Ht, F(n.rotulo), 1)) + ], 10, zt)) : (c(), $("span", Ut, F(n.rotulo), 1)) ], 2))), 128)), - e.temAcoes ? (c(), $("th", Ut, " Ações ")) : Q("", !0) + e.temAcoes ? (c(), $("th", Yt, " Ações ")) : Q("", !0) ]) ]); } -const Rt = /* @__PURE__ */ L(qt, [["render", Yt]]), Jt = I({ +const Jt = /* @__PURE__ */ L(Nt, [["render", Rt]]), Wt = I({ name: "EliTabelaCelulaTextoSimples", components: {}, props: { @@ -923,17 +923,17 @@ const Rt = /* @__PURE__ */ L(qt, [["render", Yt]]), Jt = I({ setup({ dados: e }) { return { dados: e }; } -}), Wt = { key: 1 }; -function Zt(e, a, o, r, i, f) { +}), Zt = { key: 1 }; +function Xt(e, a, o, r, i, f) { var t, n, d; return (t = e.dados) != null && t.acao ? (c(), $("button", { key: 0, type: "button", class: "eli-tabela__celula-link", - onClick: a[0] || (a[0] = ue((l) => e.dados.acao(), ["stop", "prevent"])) - }, F((n = e.dados) == null ? void 0 : n.texto), 1)) : (c(), $("span", Wt, F((d = e.dados) == null ? void 0 : d.texto), 1)); + onClick: a[0] || (a[0] = se((l) => e.dados.acao(), ["stop", "prevent"])) + }, F((n = e.dados) == null ? void 0 : n.texto), 1)) : (c(), $("span", Zt, F((d = e.dados) == null ? void 0 : d.texto), 1)); } -const Xt = /* @__PURE__ */ L(Jt, [["render", Zt]]), Gt = I({ +const Gt = /* @__PURE__ */ L(Wt, [["render", Xt]]), Kt = I({ name: "EliTabelaCelulaTextoTruncado", props: { dados: { @@ -943,25 +943,25 @@ const Xt = /* @__PURE__ */ L(Jt, [["render", Zt]]), Gt = I({ setup({ dados: e }) { return { dados: e }; } -}), Kt = ["title"], Qt = ["title"]; -function xt(e, a, o, r, i, f) { +}), Qt = ["title"], xt = ["title"]; +function eo(e, a, o, r, i, f) { var t, n, d, l, u; return (t = e.dados) != null && t.acao ? (c(), $("button", { key: 0, type: "button", class: "eli-tabela__texto-truncado eli-tabela__celula-link", title: (n = e.dados) == null ? void 0 : n.texto, - onClick: a[0] || (a[0] = ue((b) => { + onClick: a[0] || (a[0] = se((b) => { var k, D; return (D = (k = e.dados) == null ? void 0 : k.acao) == null ? void 0 : D.call(k); }, ["stop", "prevent"])) - }, F((d = e.dados) == null ? void 0 : d.texto), 9, Kt)) : (c(), $("span", { + }, F((d = e.dados) == null ? void 0 : d.texto), 9, Qt)) : (c(), $("span", { key: 1, class: "eli-tabela__texto-truncado", title: (l = e.dados) == null ? void 0 : l.texto - }, F((u = e.dados) == null ? void 0 : u.texto), 9, Qt)); + }, F((u = e.dados) == null ? void 0 : u.texto), 9, xt)); } -const eo = /* @__PURE__ */ L(Gt, [["render", xt]]), ao = I({ +const ao = /* @__PURE__ */ L(Kt, [["render", eo]]), to = I({ name: "EliTabelaCelulaNumero", components: {}, props: { @@ -977,19 +977,19 @@ const eo = /* @__PURE__ */ L(Gt, [["render", xt]]), ao = I({ }); return { dados: e, textoNumero: a }; } -}), to = { key: 1 }; -function oo(e, a, o, r, i, f) { +}), oo = { key: 1 }; +function no(e, a, o, r, i, f) { var t; return (t = e.dados) != null && t.acao ? (c(), $("button", { key: 0, type: "button", class: "eli-tabela__celula-link", - onClick: a[0] || (a[0] = ue((n) => e.dados.acao(), ["stop", "prevent"])) - }, F(e.textoNumero), 1)) : (c(), $("span", to, F(e.textoNumero), 1)); + onClick: a[0] || (a[0] = se((n) => e.dados.acao(), ["stop", "prevent"])) + }, F(e.textoNumero), 1)) : (c(), $("span", oo, F(e.textoNumero), 1)); } -const no = /* @__PURE__ */ L(ao, [["render", oo]]), ro = I({ +const ro = /* @__PURE__ */ L(to, [["render", no]]), lo = I({ name: "EliTabelaCelulaTags", - components: { VChip: Pa }, + components: { VChip: Oa }, props: { dados: { type: Object, @@ -999,18 +999,18 @@ const no = /* @__PURE__ */ L(ao, [["render", oo]]), ro = I({ setup({ dados: e }) { return { dados: e }; } -}), lo = { class: "eli-tabela__celula-tags" }; -function io(e, a, o, r, i, f) { +}), io = { class: "eli-tabela__celula-tags" }; +function so(e, a, o, r, i, f) { var t; - return c(), $("div", lo, [ - (c(!0), $(re, null, pe(((t = e.dados) == null ? void 0 : t.opcoes) ?? [], (n, d) => (c(), W(Va, { + return c(), $("div", io, [ + (c(!0), $(ue, null, pe(((t = e.dados) == null ? void 0 : t.opcoes) ?? [], (n, d) => (c(), W(qa, { key: d, class: "eli-tabela__celula-tag", size: "small", variant: "tonal", color: n.cor, clickable: !!n.acao, - onClick: ue((l) => { + onClick: se((l) => { var u; return (u = n.acao) == null ? void 0 : u.call(n); }, ["stop", "prevent"]) @@ -1027,16 +1027,16 @@ function io(e, a, o, r, i, f) { }, 1032, ["color", "clickable", "onClick"]))), 128)) ]); } -const so = /* @__PURE__ */ L(ro, [["render", io]]); -function pa(e) { +const uo = /* @__PURE__ */ L(lo, [["render", so]]); +function va(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } -var Ne = { exports: {} }, uo = Ne.exports, xe; -function co() { - return xe || (xe = 1, (function(e, a) { +var Ne = { exports: {} }, co = Ne.exports, ea; +function fo() { + return ea || (ea = 1, (function(e, a) { (function(o, r) { e.exports = r(); - })(uo, (function() { + })(co, (function() { var o = 1e3, r = 6e4, i = 36e5, f = "millisecond", t = "second", n = "minute", d = "hour", l = "day", u = "week", b = "month", k = "quarter", D = "year", y = "date", s = "Invalid Date", _ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, g = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, E = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(M) { var h = ["th", "st", "nd", "rd"], p = M % 100; return "[" + M + (h[(p - 20) % 10] || h[p] || h[0]) + "]"; @@ -1048,55 +1048,55 @@ function co() { return (h <= 0 ? "+" : "-") + Z(C, 2, "0") + ":" + Z(m, 2, "0"); }, m: function M(h, p) { if (h.date() < p.date()) return -M(p, h); - var C = 12 * (p.year() - h.year()) + (p.month() - h.month()), m = h.clone().add(C, b), T = p - m < 0, B = h.clone().add(C + (T ? -1 : 1), b); - return +(-(C + (p - m) / (T ? m - B : B - m)) || 0); + var C = 12 * (p.year() - h.year()) + (p.month() - h.month()), m = h.clone().add(C, b), B = p - m < 0, T = h.clone().add(C + (B ? -1 : 1), b); + return +(-(C + (p - m) / (B ? m - T : T - m)) || 0); }, a: function(M) { return M < 0 ? Math.ceil(M) || 0 : Math.floor(M); }, p: function(M) { return { M: b, y: D, w: u, d: l, D: y, h: d, m: n, s: t, ms: f, Q: k }[M] || String(M || "").toLowerCase().replace(/s$/, ""); }, u: function(M) { return M === void 0; - } }, Y = "en", X = {}; - X[Y] = E; + } }, R = "en", X = {}; + X[R] = E; var le = "$isDayjsObject", j = function(M) { - return M instanceof ke || !(!M || !M[le]); + return M instanceof Se || !(!M || !M[le]); }, be = function M(h, p, C) { var m; - if (!h) return Y; + if (!h) return R; if (typeof h == "string") { - var T = h.toLowerCase(); - X[T] && (m = T), p && (X[T] = p, m = T); - var B = h.split("-"); - if (!m && B.length > 1) return M(B[0]); + var B = h.toLowerCase(); + X[B] && (m = B), p && (X[B] = p, m = B); + var T = h.split("-"); + if (!m && T.length > 1) return M(T[0]); } else { - var q = h.name; - X[q] = h, m = q; + var V = h.name; + X[V] = h, m = V; } - return !C && m && (Y = m), m || !C && Y; - }, V = function(M, h) { + return !C && m && (R = m), m || !C && R; + }, q = function(M, h) { if (j(M)) return M.clone(); var p = typeof h == "object" ? h : {}; - return p.date = M, p.args = arguments, new ke(p); + return p.date = M, p.args = arguments, new Se(p); }, w = oe; w.l = be, w.i = j, w.w = function(M, h) { - return V(M, { locale: h.$L, utc: h.$u, x: h.$x, $offset: h.$offset }); + return q(M, { locale: h.$L, utc: h.$u, x: h.$x, $offset: h.$offset }); }; - var ke = (function() { + var Se = (function() { function M(p) { this.$L = be(p.locale, null, !0), this.parse(p), this.$x = this.$x || p.x || {}, this[le] = !0; } var h = M.prototype; return h.parse = function(p) { this.$d = (function(C) { - var m = C.date, T = C.utc; + var m = C.date, B = C.utc; if (m === null) return /* @__PURE__ */ new Date(NaN); if (w.u(m)) return /* @__PURE__ */ new Date(); if (m instanceof Date) return new Date(m); if (typeof m == "string" && !/Z$/i.test(m)) { - var B = m.match(_); - if (B) { - var q = B[2] - 1 || 0, R = (B[7] || "0").substring(0, 3); - return T ? new Date(Date.UTC(B[1], q, B[3] || 1, B[4] || 0, B[5] || 0, B[6] || 0, R)) : new Date(B[1], q, B[3] || 1, B[4] || 0, B[5] || 0, B[6] || 0, R); + var T = m.match(_); + if (T) { + var V = T[2] - 1 || 0, U = (T[7] || "0").substring(0, 3); + return B ? new Date(Date.UTC(T[1], V, T[3] || 1, T[4] || 0, T[5] || 0, T[6] || 0, U)) : new Date(T[1], V, T[3] || 1, T[4] || 0, T[5] || 0, T[6] || 0, U); } } return new Date(m); @@ -1109,12 +1109,12 @@ function co() { }, h.isValid = function() { return this.$d.toString() !== s; }, h.isSame = function(p, C) { - var m = V(p); + var m = q(p); return this.startOf(C) <= m && m <= this.endOf(C); }, h.isAfter = function(p, C) { - return V(p) < this.startOf(C); + return q(p) < this.startOf(C); }, h.isBefore = function(p, C) { - return this.endOf(C) < V(p); + return this.endOf(C) < q(p); }, h.$g = function(p, C, m) { return w.u(p) ? this[C] : this.set(m, p); }, h.unix = function() { @@ -1122,74 +1122,74 @@ function co() { }, h.valueOf = function() { return this.$d.getTime(); }, h.startOf = function(p, C) { - var m = this, T = !!w.u(C) || C, B = w.p(p), q = function(_e, te) { - var ge = w.w(m.$u ? Date.UTC(m.$y, te, _e) : new Date(m.$y, te, _e), m); - return T ? ge : ge.endOf(l); - }, R = function(_e, te) { - return w.w(m.toDate()[_e].apply(m.toDate("s"), (T ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(te)), m); - }, G = this.$W, x = this.$M, ie = this.$D, de = "set" + (this.$u ? "UTC" : ""); - switch (B) { + var m = this, B = !!w.u(C) || C, T = w.p(p), V = function(he, te) { + var ge = w.w(m.$u ? Date.UTC(m.$y, te, he) : new Date(m.$y, te, he), m); + return B ? ge : ge.endOf(l); + }, U = function(he, te) { + return w.w(m.toDate()[he].apply(m.toDate("s"), (B ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(te)), m); + }, G = this.$W, x = this.$M, ne = this.$D, _e = "set" + (this.$u ? "UTC" : ""); + switch (T) { case D: - return T ? q(1, 0) : q(31, 11); + return B ? V(1, 0) : V(31, 11); case b: - return T ? q(1, x) : q(0, x + 1); + return B ? V(1, x) : V(0, x + 1); case u: - var he = this.$locale().weekStart || 0, Ee = (G < he ? G + 7 : G) - he; - return q(T ? ie - Ee : ie + (6 - Ee), x); + var ce = this.$locale().weekStart || 0, Ee = (G < ce ? G + 7 : G) - ce; + return V(B ? ne - Ee : ne + (6 - Ee), x); case l: case y: - return R(de + "Hours", 0); + return U(_e + "Hours", 0); case d: - return R(de + "Minutes", 1); + return U(_e + "Minutes", 1); case n: - return R(de + "Seconds", 2); + return U(_e + "Seconds", 2); case t: - return R(de + "Milliseconds", 3); + return U(_e + "Milliseconds", 3); default: return this.clone(); } }, h.endOf = function(p) { return this.startOf(p, !1); }, h.$set = function(p, C) { - var m, T = w.p(p), B = "set" + (this.$u ? "UTC" : ""), q = (m = {}, m[l] = B + "Date", m[y] = B + "Date", m[b] = B + "Month", m[D] = B + "FullYear", m[d] = B + "Hours", m[n] = B + "Minutes", m[t] = B + "Seconds", m[f] = B + "Milliseconds", m)[T], R = T === l ? this.$D + (C - this.$W) : C; - if (T === b || T === D) { + var m, B = w.p(p), T = "set" + (this.$u ? "UTC" : ""), V = (m = {}, m[l] = T + "Date", m[y] = T + "Date", m[b] = T + "Month", m[D] = T + "FullYear", m[d] = T + "Hours", m[n] = T + "Minutes", m[t] = T + "Seconds", m[f] = T + "Milliseconds", m)[B], U = B === l ? this.$D + (C - this.$W) : C; + if (B === b || B === D) { var G = this.clone().set(y, 1); - G.$d[q](R), G.init(), this.$d = G.set(y, Math.min(this.$D, G.daysInMonth())).$d; - } else q && this.$d[q](R); + G.$d[V](U), G.init(), this.$d = G.set(y, Math.min(this.$D, G.daysInMonth())).$d; + } else V && this.$d[V](U); return this.init(), this; }, h.set = function(p, C) { return this.clone().$set(p, C); }, h.get = function(p) { return this[w.p(p)](); }, h.add = function(p, C) { - var m, T = this; + var m, B = this; p = Number(p); - var B = w.p(C), q = function(x) { - var ie = V(T); - return w.w(ie.date(ie.date() + Math.round(x * p)), T); + var T = w.p(C), V = function(x) { + var ne = q(B); + return w.w(ne.date(ne.date() + Math.round(x * p)), B); }; - if (B === b) return this.set(b, this.$M + p); - if (B === D) return this.set(D, this.$y + p); - if (B === l) return q(1); - if (B === u) return q(7); - var R = (m = {}, m[n] = r, m[d] = i, m[t] = o, m)[B] || 1, G = this.$d.getTime() + p * R; + if (T === b) return this.set(b, this.$M + p); + if (T === D) return this.set(D, this.$y + p); + if (T === l) return V(1); + if (T === u) return V(7); + var U = (m = {}, m[n] = r, m[d] = i, m[t] = o, m)[T] || 1, G = this.$d.getTime() + p * U; return w.w(G, this); }, h.subtract = function(p, C) { return this.add(-1 * p, C); }, h.format = function(p) { var C = this, m = this.$locale(); if (!this.isValid()) return m.invalidDate || s; - var T = p || "YYYY-MM-DDTHH:mm:ssZ", B = w.z(this), q = this.$H, R = this.$m, G = this.$M, x = m.weekdays, ie = m.months, de = m.meridiem, he = function(te, ge, Ce, De) { - return te && (te[ge] || te(C, T)) || Ce[ge].slice(0, De); + var B = p || "YYYY-MM-DDTHH:mm:ssZ", T = w.z(this), V = this.$H, U = this.$m, G = this.$M, x = m.weekdays, ne = m.months, _e = m.meridiem, ce = function(te, ge, ke, De) { + return te && (te[ge] || te(C, B)) || ke[ge].slice(0, De); }, Ee = function(te) { - return w.s(q % 12 || 12, te, "0"); - }, _e = de || function(te, ge, Ce) { + return w.s(V % 12 || 12, te, "0"); + }, he = _e || function(te, ge, ke) { var De = te < 12 ? "AM" : "PM"; - return Ce ? De.toLowerCase() : De; + return ke ? De.toLowerCase() : De; }; - return T.replace(g, (function(te, ge) { - return ge || (function(Ce) { - switch (Ce) { + return B.replace(g, (function(te, ge) { + return ge || (function(ke) { + switch (ke) { case "YY": return String(C.$y).slice(-2); case "YYYY": @@ -1199,9 +1199,9 @@ function co() { case "MM": return w.s(G + 1, 2, "0"); case "MMM": - return he(m.monthsShort, G, ie, 3); + return ce(m.monthsShort, G, ne, 3); case "MMMM": - return he(ie, G); + return ce(ne, G); case "D": return C.$D; case "DD": @@ -1209,27 +1209,27 @@ function co() { case "d": return String(C.$W); case "dd": - return he(m.weekdaysMin, C.$W, x, 2); + return ce(m.weekdaysMin, C.$W, x, 2); case "ddd": - return he(m.weekdaysShort, C.$W, x, 3); + return ce(m.weekdaysShort, C.$W, x, 3); case "dddd": return x[C.$W]; case "H": - return String(q); + return String(V); case "HH": - return w.s(q, 2, "0"); + return w.s(V, 2, "0"); case "h": return Ee(1); case "hh": return Ee(2); case "a": - return _e(q, R, !0); + return he(V, U, !0); case "A": - return _e(q, R, !1); + return he(V, U, !1); case "m": - return String(R); + return String(U); case "mm": - return w.s(R, 2, "0"); + return w.s(U, 2, "0"); case "s": return String(C.$s); case "ss": @@ -1237,54 +1237,54 @@ function co() { case "SSS": return w.s(C.$ms, 3, "0"); case "Z": - return B; + return T; } return null; - })(te) || B.replace(":", ""); + })(te) || T.replace(":", ""); })); }, h.utcOffset = function() { return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); }, h.diff = function(p, C, m) { - var T, B = this, q = w.p(C), R = V(p), G = (R.utcOffset() - this.utcOffset()) * r, x = this - R, ie = function() { - return w.m(B, R); + var B, T = this, V = w.p(C), U = q(p), G = (U.utcOffset() - this.utcOffset()) * r, x = this - U, ne = function() { + return w.m(T, U); }; - switch (q) { + switch (V) { case D: - T = ie() / 12; + B = ne() / 12; break; case b: - T = ie(); + B = ne(); break; case k: - T = ie() / 3; + B = ne() / 3; break; case u: - T = (x - G) / 6048e5; + B = (x - G) / 6048e5; break; case l: - T = (x - G) / 864e5; + B = (x - G) / 864e5; break; case d: - T = x / i; + B = x / i; break; case n: - T = x / r; + B = x / r; break; case t: - T = x / o; + B = x / o; break; default: - T = x; + B = x; } - return m ? T : w.a(T); + return m ? B : w.a(B); }, h.daysInMonth = function() { return this.endOf(b).$D; }, h.$locale = function() { return X[this.$L]; }, h.locale = function(p, C) { if (!p) return this.$L; - var m = this.clone(), T = be(p, C, !0); - return T && (m.$L = T), m; + var m = this.clone(), B = be(p, C, !0); + return B && (m.$L = B), m; }, h.clone = function() { return w.w(this.$d, this); }, h.toDate = function() { @@ -1296,27 +1296,27 @@ function co() { }, h.toString = function() { return this.$d.toUTCString(); }, M; - })(), Pe = ke.prototype; - return V.prototype = Pe, [["$ms", f], ["$s", t], ["$m", n], ["$H", d], ["$W", l], ["$M", b], ["$y", D], ["$D", y]].forEach((function(M) { + })(), Pe = Se.prototype; + return q.prototype = Pe, [["$ms", f], ["$s", t], ["$m", n], ["$H", d], ["$W", l], ["$M", b], ["$y", D], ["$D", y]].forEach((function(M) { Pe[M[1]] = function(h) { return this.$g(h, M[0], M[1]); }; - })), V.extend = function(M, h) { - return M.$i || (M(h, ke, V), M.$i = !0), V; - }, V.locale = be, V.isDayjs = j, V.unix = function(M) { - return V(1e3 * M); - }, V.en = X[Y], V.Ls = X, V.p = {}, V; + })), q.extend = function(M, h) { + return M.$i || (M(h, Se, q), M.$i = !0), q; + }, q.locale = be, q.isDayjs = j, q.unix = function(M) { + return q(1e3 * M); + }, q.en = X[R], q.Ls = X, q.p = {}, q; })); })(Ne)), Ne.exports; } -var fo = co(); -const Ae = /* @__PURE__ */ pa(fo); -var Ie = { exports: {} }, po = Ie.exports, ea; -function vo() { - return ea || (ea = 1, (function(e, a) { +var po = fo(); +const Ce = /* @__PURE__ */ va(po); +var Ie = { exports: {} }, vo = Ie.exports, aa; +function mo() { + return aa || (aa = 1, (function(e, a) { (function(o, r) { e.exports = r(); - })(po, (function() { + })(vo, (function() { return function(o, r, i) { o = o || {}; var f = r.prototype, t = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" }; @@ -1325,13 +1325,13 @@ function vo() { } i.en.relativeTime = t, f.fromToBase = function(l, u, b, k, D) { for (var y, s, _, g = b.$locale().relativeTime || t, E = o.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], Z = E.length, oe = 0; oe < Z; oe += 1) { - var Y = E[oe]; - Y.d && (y = k ? i(l).diff(b, Y.d, !0) : b.diff(l, Y.d, !0)); + var R = E[oe]; + R.d && (y = k ? i(l).diff(b, R.d, !0) : b.diff(l, R.d, !0)); var X = (o.rounding || Math.round)(Math.abs(y)); - if (_ = y > 0, X <= Y.r || !Y.r) { - X <= 1 && oe > 0 && (Y = E[oe - 1]); - var le = g[Y.l]; - D && (X = D("" + X)), s = typeof le == "string" ? le.replace("%d", X) : le(X, u, Y.l, _); + if (_ = y > 0, X <= R.r || !R.r) { + X <= 1 && oe > 0 && (R = E[oe - 1]); + var le = g[R.l]; + D && (X = D("" + X)), s = typeof le == "string" ? le.replace("%d", X) : le(X, u, R.l, _); break; } } @@ -1355,10 +1355,10 @@ function vo() { })); })(Ie)), Ie.exports; } -var mo = vo(); -const bo = /* @__PURE__ */ pa(mo); -Ae.extend(bo); -const ho = I({ +var bo = mo(); +const ho = /* @__PURE__ */ va(bo); +Ce.extend(ho); +const go = I({ name: "EliTabelaCelulaData", props: { dados: { @@ -1371,27 +1371,27 @@ const ho = I({ const o = e == null ? void 0 : e.valor; if (!o) return ""; const r = (e == null ? void 0 : e.formato) ?? "data"; - return r === "relativo" ? Ae(o).fromNow() : r === "data_hora" ? Ae(o).format("DD/MM/YYYY HH:mm") : Ae(o).format("DD/MM/YYYY"); + return r === "relativo" ? Ce(o).fromNow() : r === "data_hora" ? Ce(o).format("DD/MM/YYYY HH:mm") : Ce(o).format("DD/MM/YYYY"); }); return { dados: e, textoData: a }; } -}), go = { key: 1 }; -function $o(e, a, o, r, i, f) { +}), $o = { key: 1 }; +function yo(e, a, o, r, i, f) { var t; return (t = e.dados) != null && t.acao ? (c(), $("button", { key: 0, type: "button", class: "eli-tabela__celula-link", - onClick: a[0] || (a[0] = ue((n) => e.dados.acao(), ["stop", "prevent"])) - }, F(e.textoData), 1)) : (c(), $("span", go, F(e.textoData), 1)); + onClick: a[0] || (a[0] = se((n) => e.dados.acao(), ["stop", "prevent"])) + }, F(e.textoData), 1)) : (c(), $("span", $o, F(e.textoData), 1)); } -const yo = /* @__PURE__ */ L(ho, [["render", $o]]), _o = { - textoSimples: Xt, - textoTruncado: eo, - numero: no, - tags: so, - data: yo -}, Eo = I({ +const _o = /* @__PURE__ */ L(go, [["render", yo]]), Eo = { + textoSimples: Gt, + textoTruncado: ao, + numero: ro, + tags: uo, + data: _o +}, Co = I({ name: "EliTabelaCelula", props: { celula: { @@ -1401,16 +1401,16 @@ const yo = /* @__PURE__ */ L(ho, [["render", $o]]), _o = { } }, setup(e) { - const a = S(() => e.celula[0]), o = S(() => e.celula[1]), r = S(() => _o[a.value]), i = S(() => o.value); + const a = S(() => e.celula[0]), o = S(() => e.celula[1]), r = S(() => Eo[a.value]), i = S(() => o.value); return { Componente: r, dadosParaComponente: i }; } }); -function Co(e, a, o, r, i, f) { +function Ao(e, a, o, r, i, f) { return c(), W(Te(e.Componente), { dados: e.dadosParaComponente }, null, 8, ["dados"]); } -const va = /* @__PURE__ */ L(Eo, [["render", Co]]), Ao = I({ +const ma = /* @__PURE__ */ L(Co, [["render", Ao]]), So = I({ name: "EliTabelaDetalhesLinha", - components: { EliTabelaCelula: va }, + components: { EliTabelaCelula: ma }, props: { linha: { type: null, @@ -1421,16 +1421,16 @@ const va = /* @__PURE__ */ L(Eo, [["render", Co]]), Ao = I({ required: !0 } } -}), So = { class: "eli-tabela__detalhes" }, ko = { class: "eli-tabela__detalhe-rotulo" }, Do = { class: "eli-tabela__detalhe-valor" }; -function Mo(e, a, o, r, i, f) { +}), ko = { class: "eli-tabela__detalhes" }, Do = { class: "eli-tabela__detalhe-rotulo" }, Mo = { class: "eli-tabela__detalhe-valor" }; +function Bo(e, a, o, r, i, f) { const t = K("EliTabelaCelula"); - return c(), $("div", So, [ - (c(!0), $(re, null, pe(e.colunasInvisiveis, (n, d) => (c(), $("div", { + return c(), $("div", ko, [ + (c(!0), $(ue, null, pe(e.colunasInvisiveis, (n, d) => (c(), $("div", { key: `det-${d}-${n.rotulo}`, class: "eli-tabela__detalhe" }, [ - v("div", ko, F(n.rotulo), 1), - v("div", Do, [ + v("div", Do, F(n.rotulo), 1), + v("div", Mo, [ N(t, { celula: n.celula(e.linha) }, null, 8, ["celula"]) @@ -1438,14 +1438,14 @@ function Mo(e, a, o, r, i, f) { ]))), 128)) ]); } -const Bo = /* @__PURE__ */ L(Ao, [["render", Mo]]), To = I({ +const To = /* @__PURE__ */ L(So, [["render", Bo]]), wo = I({ name: "EliTabelaBody", components: { - EliTabelaCelula: va, - EliTabelaDetalhesLinha: Bo, - MoreVertical: ct, - ChevronRight: Qe, - ChevronDown: Ke + EliTabelaCelula: ma, + EliTabelaDetalhesLinha: To, + MoreVertical: dt, + ChevronRight: xe, + ChevronDown: Qe }, props: { colunas: { @@ -1491,17 +1491,17 @@ const Bo = /* @__PURE__ */ L(Ao, [["render", Mo]]), To = I({ }, setup() { return { - ChevronRight: Qe, - ChevronDown: Ke + ChevronRight: xe, + ChevronDown: Qe }; } -}), wo = { class: "eli-tabela__tbody" }, Po = ["aria-expanded", "aria-label", "title", "onClick"], Oo = ["id", "disabled", "aria-expanded", "aria-controls", "aria-label", "title", "onClick"], Fo = ["colspan"]; -function Vo(e, a, o, r, i, f) { +}), Po = { class: "eli-tabela__tbody" }, Oo = ["aria-expanded", "aria-label", "title", "onClick"], Fo = ["id", "disabled", "aria-expanded", "aria-controls", "aria-label", "title", "onClick"], Vo = ["colspan"]; +function qo(e, a, o, r, i, f) { const t = K("EliTabelaCelula"), n = K("MoreVertical"), d = K("EliTabelaDetalhesLinha"); - return c(), $("tbody", wo, [ - (c(!0), $(re, null, pe(e.linhas, (l, u) => { + return c(), $("tbody", Po, [ + (c(!0), $(ue, null, pe(e.linhas, (l, u) => { var b, k, D, y, s, _; - return c(), $(re, { + return c(), $(ue, { key: `grp-${u}` }, [ v("tr", { @@ -1517,7 +1517,7 @@ function Vo(e, a, o, r, i, f) { "aria-expanded": (k = e.linhasExpandidas) != null && k[u] ? "true" : "false", "aria-label": (D = e.linhasExpandidas) != null && D[u] ? "Ocultar colunas ocultas" : "Mostrar colunas ocultas", title: (y = e.linhasExpandidas) != null && y[u] ? "Ocultar detalhes" : "Mostrar detalhes", - onClick: ue((g) => e.alternarLinhaExpandida(u), ["stop"]) + onClick: se((g) => e.alternarLinhaExpandida(u), ["stop"]) }, [ (c(), W(Te((s = e.linhasExpandidas) != null && s[u] ? e.ChevronDown : e.ChevronRight), { class: "eli-tabela__expander-icone", @@ -1525,9 +1525,9 @@ function Vo(e, a, o, r, i, f) { "stroke-width": 2, "aria-hidden": "true" })) - ], 10, Po) + ], 10, Oo) ])) : Q("", !0), - (c(!0), $(re, null, pe(e.colunas, (g, E) => (c(), $("td", { + (c(!0), $(ue, null, pe(e.colunas, (g, E) => (c(), $("td", { key: `td-${u}-${E}`, class: "eli-tabela__td" }, [ @@ -1552,14 +1552,14 @@ function Vo(e, a, o, r, i, f) { "aria-controls": e.possuiAcoes(u) ? `eli-tabela-acoes-menu-${u}` : void 0, "aria-label": e.possuiAcoes(u) ? "Ações da linha" : "Nenhuma ação disponível", title: e.possuiAcoes(u) ? "Ações" : "Nenhuma ação disponível", - onClick: ue((g) => e.toggleMenu(u, g), ["stop"]) + onClick: se((g) => e.toggleMenu(u, g), ["stop"]) }, [ N(n, { class: "eli-tabela__acoes-toggle-icone", size: 18, "stroke-width": 2 }) - ], 8, Oo) + ], 8, Fo) ], 2) ])) : Q("", !0) ], 2), @@ -1575,13 +1575,13 @@ function Vo(e, a, o, r, i, f) { linha: l, colunasInvisiveis: e.colunasInvisiveis }, null, 8, ["linha", "colunasInvisiveis"]) - ], 8, Fo) + ], 8, Vo) ], 2)) : Q("", !0) ], 64); }), 128)) ]); } -const qo = /* @__PURE__ */ L(To, [["render", Vo]]), No = I({ +const No = /* @__PURE__ */ L(wo, [["render", qo]]), Io = I({ name: "EliTabelaMenuAcoes", props: { menuAberto: { @@ -1616,9 +1616,9 @@ const qo = /* @__PURE__ */ L(To, [["render", Vo]]), No = I({ } return { menuEl: r, possuiAcoes: i, emitExecutar: f }; } -}), Io = ["id", "aria-labelledby"], Lo = ["aria-label", "title", "onClick"], jo = { class: "eli-tabela__acoes-item-texto" }; -function zo(e, a, o, r, i, f) { - return c(), W(Sa, { to: "body" }, [ +}), Lo = ["id", "aria-labelledby"], jo = ["aria-label", "title", "onClick"], zo = { class: "eli-tabela__acoes-item-texto" }; +function Ho(e, a, o, r, i, f) { + return c(), W(ka, { to: "body" }, [ e.menuAberto !== null && e.possuiAcoes ? (c(), $("ul", { key: 0, id: `eli-tabela-acoes-menu-${e.menuAberto}`, @@ -1633,7 +1633,7 @@ function zo(e, a, o, r, i, f) { zIndex: 999999 }) }, [ - (c(!0), $(re, null, pe(e.acoes, (t) => (c(), $("li", { + (c(!0), $(ue, null, pe(e.acoes, (t) => (c(), $("li", { key: `acao-${e.menuAberto}-${t.indice}`, class: "eli-tabela__acoes-item", role: "none" @@ -1645,20 +1645,20 @@ function zo(e, a, o, r, i, f) { role: "menuitem", "aria-label": t.acao.rotulo, title: t.acao.rotulo, - onClick: ue((n) => e.emitExecutar(t), ["stop"]) + onClick: se((n) => e.emitExecutar(t), ["stop"]) }, [ (c(), W(Te(t.acao.icone), { class: "eli-tabela__acoes-item-icone", size: 16, "stroke-width": 2 })), - v("span", jo, F(t.acao.rotulo), 1) - ], 12, Lo) + v("span", zo, F(t.acao.rotulo), 1) + ], 12, jo) ]))), 128)) - ], 12, Io)) : Q("", !0) + ], 12, Lo)) : Q("", !0) ]); } -const Ho = /* @__PURE__ */ L(No, [["render", zo]]), Uo = I({ +const Uo = /* @__PURE__ */ L(Io, [["render", Ho]]), Yo = I({ name: "EliTabelaPaginacao", props: { pagina: { @@ -1721,29 +1721,29 @@ const Ho = /* @__PURE__ */ L(No, [["render", zo]]), Uo = I({ totalPaginasExibidas: d }; } -}), Yo = { +}), Ro = { key: 0, class: "eli-tabela__paginacao", role: "navigation", "aria-label": "Paginação de resultados" -}, Ro = ["disabled"], Jo = { +}, Jo = ["disabled"], Wo = { key: 0, class: "eli-tabela__pagina-ellipsis", "aria-hidden": "true" -}, Wo = ["disabled", "aria-current", "aria-label", "onClick"], Zo = ["disabled"]; -function Xo(e, a, o, r, i, f) { - return e.totalPaginasExibidas > 1 ? (c(), $("nav", Yo, [ +}, Zo = ["disabled", "aria-current", "aria-label", "onClick"], Xo = ["disabled"]; +function Go(e, a, o, r, i, f) { + return e.totalPaginasExibidas > 1 ? (c(), $("nav", Ro, [ v("button", { type: "button", class: "eli-tabela__pagina-botao", disabled: e.anteriorDesabilitado, "aria-label": "Página anterior", onClick: a[0] || (a[0] = (t) => e.irParaPagina(e.paginaAtual - 1)) - }, " << ", 8, Ro), - (c(!0), $(re, null, pe(e.botoes, (t, n) => (c(), $(re, { + }, " << ", 8, Jo), + (c(!0), $(ue, null, pe(e.botoes, (t, n) => (c(), $(ue, { key: `${t.label}-${n}` }, [ - t.ehEllipsis ? (c(), $("span", Jo, F(t.label), 1)) : (c(), $("button", { + t.ehEllipsis ? (c(), $("span", Wo, F(t.label), 1)) : (c(), $("button", { key: 1, type: "button", class: Me(["eli-tabela__pagina-botao", t.ativo ? "eli-tabela__pagina-botao--ativo" : void 0]), @@ -1751,7 +1751,7 @@ function Xo(e, a, o, r, i, f) { "aria-current": t.ativo ? "page" : void 0, "aria-label": `Ir para página ${t.label}`, onClick: (d) => e.irParaPagina(t.pagina) - }, F(t.label), 11, Wo)) + }, F(t.label), 11, Zo)) ], 64))), 128)), v("button", { type: "button", @@ -1759,10 +1759,10 @@ function Xo(e, a, o, r, i, f) { disabled: e.proximaDesabilitada, "aria-label": "Próxima página", onClick: a[1] || (a[1] = (t) => e.irParaPagina(e.paginaAtual + 1)) - }, " >> ", 8, Zo) + }, " >> ", 8, Xo) ])) : Q("", !0); } -const Go = /* @__PURE__ */ L(Uo, [["render", Xo]]), aa = "application/x-eli-tabela-coluna", Ko = I({ +const Ko = /* @__PURE__ */ L(Yo, [["render", Go]]), ta = "application/x-eli-tabela-coluna", Qo = I({ name: "EliTabelaModalColunas", props: { aberto: { @@ -1796,12 +1796,12 @@ const Go = /* @__PURE__ */ L(Uo, [["render", Xo]]), aa = "application/x-eli-tabe var X, le; const y = e.rotulosColunas, s = (((X = e.configInicial.visiveis) == null ? void 0 : X.length) ?? 0) > 0 || (((le = e.configInicial.invisiveis) == null ? void 0 : le.length) ?? 0) > 0, _ = new Set( e.colunas.filter((j) => j.visivel === !1).map((j) => j.rotulo) - ), g = s ? new Set(e.configInicial.invisiveis ?? []) : _, E = y.filter((j) => !g.has(j)), Z = e.configInicial.visiveis ?? [], oe = new Set(E), Y = []; + ), g = s ? new Set(e.configInicial.invisiveis ?? []) : _, E = y.filter((j) => !g.has(j)), Z = e.configInicial.visiveis ?? [], oe = new Set(E), R = []; for (const j of Z) - oe.has(j) && Y.push(j); + oe.has(j) && R.push(j); for (const j of E) - Y.includes(j) || Y.push(j); - o.value = Y, r.value = y.filter((j) => g.has(j)); + R.includes(j) || R.push(j); + o.value = R, r.value = y.filter((j) => g.has(j)); } me( () => [e.aberto, e.rotulosColunas, e.configInicial, e.colunas], @@ -1822,14 +1822,14 @@ const Go = /* @__PURE__ */ L(Uo, [["render", Xo]]), aa = "application/x-eli-tabe function n(y, s) { var _, g; try { - (_ = y.dataTransfer) == null || _.setData(aa, JSON.stringify(s)), (g = y.dataTransfer) == null || g.setData("text/plain", s.rotulo), y.dataTransfer.effectAllowed = "move"; + (_ = y.dataTransfer) == null || _.setData(ta, JSON.stringify(s)), (g = y.dataTransfer) == null || g.setData("text/plain", s.rotulo), y.dataTransfer.effectAllowed = "move"; } catch { } } function d(y) { var s; try { - const _ = (s = y.dataTransfer) == null ? void 0 : s.getData(aa); + const _ = (s = y.dataTransfer) == null ? void 0 : s.getData(ta); if (!_) return null; const g = JSON.parse(_); return !g || typeof g.rotulo != "string" || g.origem !== "visiveis" && g.origem !== "invisiveis" ? null : g; @@ -1880,21 +1880,21 @@ const Go = /* @__PURE__ */ L(Uo, [["render", Xo]]), aa = "application/x-eli-tabe onDropLista: D }; } -}), Qo = { +}), xo = { class: "eli-tabela-modal-colunas__modal", role: "dialog", "aria-modal": "true", "aria-label": "Configurar colunas" -}, xo = { class: "eli-tabela-modal-colunas__header" }, en = { class: "eli-tabela-modal-colunas__conteudo" }, an = { class: "eli-tabela-modal-colunas__coluna" }, tn = ["onDragstart", "onDrop"], on = { class: "eli-tabela-modal-colunas__item-texto" }, nn = { class: "eli-tabela-modal-colunas__coluna" }, rn = ["onDragstart", "onDrop"], ln = { class: "eli-tabela-modal-colunas__item-texto" }, sn = { class: "eli-tabela-modal-colunas__footer" }; -function un(e, a, o, r, i, f) { +}, en = { class: "eli-tabela-modal-colunas__header" }, an = { class: "eli-tabela-modal-colunas__conteudo" }, tn = { class: "eli-tabela-modal-colunas__coluna" }, on = ["onDragstart", "onDrop"], nn = { class: "eli-tabela-modal-colunas__item-texto" }, rn = { class: "eli-tabela-modal-colunas__coluna" }, ln = ["onDragstart", "onDrop"], sn = { class: "eli-tabela-modal-colunas__item-texto" }, un = { class: "eli-tabela-modal-colunas__footer" }; +function cn(e, a, o, r, i, f) { return e.aberto ? (c(), $("div", { key: 0, class: "eli-tabela-modal-colunas__overlay", role: "presentation", - onClick: a[9] || (a[9] = ue((...t) => e.emitFechar && e.emitFechar(...t), ["self"])) + onClick: a[9] || (a[9] = se((...t) => e.emitFechar && e.emitFechar(...t), ["self"])) }, [ - v("div", Qo, [ - v("header", xo, [ + v("div", xo, [ + v("header", en, [ a[10] || (a[10] = v("h3", { class: "eli-tabela-modal-colunas__titulo" }, "Colunas", -1)), v("button", { type: "button", @@ -1903,21 +1903,21 @@ function un(e, a, o, r, i, f) { onClick: a[0] || (a[0] = (...t) => e.emitFechar && e.emitFechar(...t)) }, " × ") ]), - v("div", en, [ - v("div", an, [ + v("div", an, [ + v("div", tn, [ a[12] || (a[12] = v("div", { class: "eli-tabela-modal-colunas__coluna-titulo" }, "Visíveis", -1)), v("div", { class: "eli-tabela-modal-colunas__lista", - onDragover: a[2] || (a[2] = ue(() => { + onDragover: a[2] || (a[2] = se(() => { }, ["prevent"])), onDrop: a[3] || (a[3] = (t) => e.onDropLista(t, "visiveis", null)) }, [ - (c(!0), $(re, null, pe(e.visiveisLocal, (t, n) => (c(), $("div", { + (c(!0), $(ue, null, pe(e.visiveisLocal, (t, n) => (c(), $("div", { key: `vis-${t}`, class: "eli-tabela-modal-colunas__item", draggable: "true", onDragstart: (d) => e.onDragStart(d, t, "visiveis", n), - onDragover: a[1] || (a[1] = ue(() => { + onDragover: a[1] || (a[1] = se(() => { }, ["prevent"])), onDrop: (d) => e.onDropItem(d, "visiveis", n) }, [ @@ -1925,24 +1925,24 @@ function un(e, a, o, r, i, f) { class: "eli-tabela-modal-colunas__item-handle", "aria-hidden": "true" }, "⋮⋮", -1)), - v("span", on, F(t), 1) - ], 40, tn))), 128)) + v("span", nn, F(t), 1) + ], 40, on))), 128)) ], 32) ]), - v("div", nn, [ + v("div", rn, [ a[14] || (a[14] = v("div", { class: "eli-tabela-modal-colunas__coluna-titulo" }, "Invisíveis", -1)), v("div", { class: "eli-tabela-modal-colunas__lista", - onDragover: a[5] || (a[5] = ue(() => { + onDragover: a[5] || (a[5] = se(() => { }, ["prevent"])), onDrop: a[6] || (a[6] = (t) => e.onDropLista(t, "invisiveis", null)) }, [ - (c(!0), $(re, null, pe(e.invisiveisLocal, (t, n) => (c(), $("div", { + (c(!0), $(ue, null, pe(e.invisiveisLocal, (t, n) => (c(), $("div", { key: `inv-${t}`, class: "eli-tabela-modal-colunas__item", draggable: "true", onDragstart: (d) => e.onDragStart(d, t, "invisiveis", n), - onDragover: a[4] || (a[4] = ue(() => { + onDragover: a[4] || (a[4] = se(() => { }, ["prevent"])), onDrop: (d) => e.onDropItem(d, "invisiveis", n) }, [ @@ -1950,12 +1950,12 @@ function un(e, a, o, r, i, f) { class: "eli-tabela-modal-colunas__item-handle", "aria-hidden": "true" }, "⋮⋮", -1)), - v("span", ln, F(t), 1) - ], 40, rn))), 128)) + v("span", sn, F(t), 1) + ], 40, ln))), 128)) ], 32) ]) ]), - v("footer", sn, [ + v("footer", un, [ v("button", { type: "button", class: "eli-tabela-modal-colunas__botao eli-tabela-modal-colunas__botao--sec", @@ -1970,8 +1970,8 @@ function un(e, a, o, r, i, f) { ]) ])) : Q("", !0); } -const cn = /* @__PURE__ */ L(Ko, [["render", un]]); -function dn(e) { +const dn = /* @__PURE__ */ L(Qo, [["render", cn]]); +function fn(e) { if (!Number.isFinite(e) || e <= 0 || e >= 1) return 0; const a = e.toString(); if (a.includes("e-")) { @@ -1981,7 +1981,7 @@ function dn(e) { const o = a.indexOf("."); return o === -1 ? 0 : a.slice(o + 1).replace(/0+$/, "").length; } -function fn(e) { +function pn(e) { const a = (e ?? "").trim().replace(/,/g, "."); if (!a) return null; const o = Number(a); @@ -1990,16 +1990,16 @@ function fn(e) { function Le(e, a) { return e == null ? "" : a === null ? String(e) : Number(e).toFixed(Math.max(0, a)).replace(/\./g, ","); } -function ta(e) { +function oa(e) { return (e ?? "").replace(/\D+/g, ""); } -function pn(e) { +function vn(e) { const a = (e ?? "").replace(/[^0-9.,]+/g, ""), o = a.match(/[.,]/); if (!o) return a; const r = o[0], i = a.indexOf(r), f = a.slice(0, i).replace(/[.,]/g, ""), t = a.slice(i + 1).replace(/[.,]/g, ""); return `${f.length ? f : "0"}${r}${t}`; } -function vn(e, a) { +function mn(e, a) { if (a === null) return e; if (a <= 0) return e.replace(/[.,]/g, ""); const o = e.match(/[.,]/); @@ -2007,13 +2007,13 @@ function vn(e, a) { const r = o[0], i = e.indexOf(r), f = e.slice(0, i), t = e.slice(i + 1); return `${f}${r}${t.slice(0, a)}`; } -function mn(e) { +function bn(e) { const a = e.match(/^(\d+)[.,]$/); if (!a) return null; const o = Number(a[1]); return Number.isNaN(o) ? null : o; } -const bn = I({ +const hn = I({ name: "EliEntradaNumero", inheritAttrs: !1, props: { @@ -2039,7 +2039,7 @@ const bn = I({ const r = S(() => { var u; const l = (u = e.opcoes) == null ? void 0 : u.precisao; - return l == null ? null : dn(l); + return l == null ? null : fn(l); }), i = S(() => r.value === 0), f = S(() => { const l = r.value; return l !== null && l > 0; @@ -2053,24 +2053,24 @@ const bn = I({ ); function d(l) { if (f.value) { - const D = r.value ?? 0, y = ta(l), s = y ? Number(y) : 0, _ = Math.pow(10, D), g = y ? s / _ : null, E = g === null ? null : g; + const D = r.value ?? 0, y = oa(l), s = y ? Number(y) : 0, _ = Math.pow(10, D), g = y ? s / _ : null, E = g === null ? null : g; n.value = E, o("update:value", E), o("input", E), o("change", E), t.value = Le(E, D); return; } - const u = i.value ? ta(l) : pn(l), b = i.value ? u : vn(u, r.value); + const u = i.value ? oa(l) : vn(l), b = i.value ? u : mn(u, r.value); let k = null; if (b) { - const y = (i.value ? null : mn(b)) ?? fn(b); + const y = (i.value ? null : bn(b)) ?? pn(b); k = y === null ? null : y; } n.value = k, o("update:value", k), o("input", k), o("change", k), t.value = Le(k, r.value); } return { attrs: a, emit: o, displayValue: t, isInteiro: i, onUpdateModelValue: d }; } -}), hn = { class: "eli-entrada__prefixo" }, gn = { class: "eli-entrada__sufixo" }; -function $n(e, a, o, r, i, f) { +}), gn = { class: "eli-entrada__prefixo" }, $n = { class: "eli-entrada__sufixo" }; +function yn(e, a, o, r, i, f) { var t, n, d, l; - return c(), W(He, Se({ + return c(), W(He, Ae({ "model-value": e.displayValue, label: (t = e.opcoes) == null ? void 0 : t.rotulo, placeholder: (n = e.opcoes) == null ? void 0 : n.placeholder, @@ -2081,24 +2081,24 @@ function $n(e, a, o, r, i, f) { "onUpdate:modelValue": e.onUpdateModelValue, onFocus: a[0] || (a[0] = () => e.emit("focus")), onBlur: a[1] || (a[1] = () => e.emit("blur")) - }), ka({ _: 2 }, [ + }), Da({ _: 2 }, [ (d = e.opcoes) != null && d.prefixo ? { name: "prepend-inner", fn: ae(() => [ - v("span", hn, F(e.opcoes.prefixo), 1) + v("span", gn, F(e.opcoes.prefixo), 1) ]), key: "0" } : void 0, (l = e.opcoes) != null && l.sufixo ? { name: "append-inner", fn: ae(() => [ - v("span", gn, F(e.opcoes.sufixo), 1) + v("span", $n, F(e.opcoes.sufixo), 1) ]), key: "1" } : void 0 ]), 1040, ["model-value", "label", "placeholder", "type", "inputmode", "pattern", "onUpdate:modelValue"]); } -const ma = /* @__PURE__ */ L(bn, [["render", $n]]), yn = I({ +const ba = /* @__PURE__ */ L(hn, [["render", yn]]), _n = I({ name: "EliEntradaDataHora", inheritAttrs: !1, props: { @@ -2168,10 +2168,10 @@ const ma = /* @__PURE__ */ L(bn, [["render", $n]]), yn = I({ () => i.value === "data" ? "date" : "datetime-local" ); function n(s) { - return i.value === "data" ? Ae(s).format("YYYY-MM-DD") : Ae(s).format("YYYY-MM-DDTHH:mm"); + return i.value === "data" ? Ce(s).format("YYYY-MM-DD") : Ce(s).format("YYYY-MM-DDTHH:mm"); } function d(s) { - return i.value === "data" ? Ae(`${s}T00:00`).format() : Ae(s).format(); + return i.value === "data" ? Ce(`${s}T00:00`).format() : Ce(s).format(); } const l = S(() => e.value !== void 0 ? e.value ?? null : e.modelValue), u = S({ get: () => l.value ? n(l.value) : "", @@ -2211,10 +2211,10 @@ const ma = /* @__PURE__ */ L(bn, [["render", $n]]), yn = I({ emitCompatBlur: y }; } -}), _n = { class: "eli-data-hora" }; -function En(e, a, o, r, i, f) { - return c(), $("div", _n, [ - N(He, Se({ +}), En = { class: "eli-data-hora" }; +function Cn(e, a, o, r, i, f) { + return c(), $("div", En, [ + N(He, Ae({ modelValue: e.valor, "onUpdate:modelValue": a[0] || (a[0] = (t) => e.valor = t), type: e.tipoInput, @@ -2236,9 +2236,9 @@ function En(e, a, o, r, i, f) { }), null, 16, ["modelValue", "type", "label", "placeholder", "disabled", "clearable", "error", "error-messages", "hint", "persistent-hint", "density", "variant", "min", "max", "onFocus", "onBlur"]) ]); } -const ba = /* @__PURE__ */ L(yn, [["render", En]]), Cn = I({ +const ha = /* @__PURE__ */ L(_n, [["render", Cn]]), An = I({ name: "EliEntradaParagrafo", - components: { VTextarea: Oa }, + components: { VTextarea: Fa }, inheritAttrs: !1, props: { value: { @@ -2267,9 +2267,9 @@ const ba = /* @__PURE__ */ L(yn, [["render", En]]), Cn = I({ return { attrs: a, emit: o, localValue: r, opcoes: e.opcoes }; } }); -function An(e, a, o, r, i, f) { +function Sn(e, a, o, r, i, f) { var t, n, d, l, u, b, k, D, y, s, _, g; - return c(), W(qa, Se({ + return c(), W(Na, Ae({ modelValue: e.localValue, "onUpdate:modelValue": a[0] || (a[0] = (E) => e.localValue = E), label: (t = e.opcoes) == null ? void 0 : t.rotulo, @@ -2290,9 +2290,9 @@ function An(e, a, o, r, i, f) { onBlur: a[2] || (a[2] = () => e.emit("blur")) }), null, 16, ["modelValue", "label", "placeholder", "rows", "counter", "maxlength", "clearable", "error", "error-messages", "hint", "persistent-hint", "density", "variant"]); } -const Sn = /* @__PURE__ */ L(Cn, [["render", An]]), kn = I({ +const kn = /* @__PURE__ */ L(An, [["render", Sn]]), Dn = I({ name: "EliEntradaSelecao", - components: { VSelect: Fa }, + components: { VSelect: Va }, inheritAttrs: !1, props: { value: { @@ -2332,7 +2332,7 @@ const Sn = /* @__PURE__ */ L(Cn, [["render", An]]), kn = I({ () => { t(); } - ), la(() => { + ), ia(() => { t(); }), me( r, @@ -2343,9 +2343,9 @@ const Sn = /* @__PURE__ */ L(Cn, [["render", An]]), kn = I({ ), { attrs: a, emit: o, localValue: f, opcoes: e.opcoes, itens: r, carregando: i }; } }); -function Dn(e, a, o, r, i, f) { +function Mn(e, a, o, r, i, f) { var t, n, d, l, u, b, k, D, y; - return c(), W(Na, Se({ + return c(), W(Ia, Ae({ modelValue: e.localValue, "onUpdate:modelValue": a[0] || (a[0] = (s) => e.localValue = s), label: (t = e.opcoes) == null ? void 0 : t.rotulo, @@ -2368,16 +2368,16 @@ function Dn(e, a, o, r, i, f) { onBlur: a[2] || (a[2] = () => e.emit("blur")) }), null, 16, ["modelValue", "label", "placeholder", "items", "loading", "disabled", "clearable", "error", "error-messages", "hint", "persistent-hint", "density", "variant"]); } -const Mn = /* @__PURE__ */ L(kn, [["render", Dn]]); -function Bn(e) { +const Bn = /* @__PURE__ */ L(Dn, [["render", Mn]]); +function Tn(e) { return e === "texto" || e === "numero" || e === "dataHora"; } -function Tn(e) { +function wn(e) { var o, r; const a = (r = (o = e == null ? void 0 : e.entrada) == null ? void 0 : o[1]) == null ? void 0 : r.rotulo; return String(a || ((e == null ? void 0 : e.coluna) ?? "Filtro")); } -const wn = I({ +const Pn = I({ name: "EliTabelaModalFiltroAvancado", props: { aberto: { type: Boolean, required: !0 }, @@ -2402,7 +2402,7 @@ const wn = I({ }); function t(s) { const _ = s == null ? void 0 : s[0]; - return _ === "numero" ? ma : _ === "dataHora" ? ba : Ye; + return _ === "numero" ? ba : _ === "dataHora" ? ha : Ye; } function n(s) { return (s == null ? void 0 : s[1]) ?? { rotulo: "" }; @@ -2414,16 +2414,16 @@ const wn = I({ var g; const s = e.filtrosBase ?? [], _ = Array.isArray(e.modelo) ? e.modelo : []; o.value = _.map((E) => { - const Z = s.find((j) => String(j.coluna) === String(E.coluna)) ?? s[0], oe = (Z == null ? void 0 : Z.entrada) ?? E.entrada, Y = (Z == null ? void 0 : Z.coluna) ?? E.coluna, X = String((Z == null ? void 0 : Z.operador) ?? "="), le = E.valor ?? d(oe); + const Z = s.find((j) => String(j.coluna) === String(E.coluna)) ?? s[0], oe = (Z == null ? void 0 : Z.entrada) ?? E.entrada, R = (Z == null ? void 0 : Z.coluna) ?? E.coluna, X = String((Z == null ? void 0 : Z.operador) ?? "="), le = E.valor ?? d(oe); return { - coluna: Y, + coluna: R, operador: X, entrada: oe, valor: le }; }); for (const E of o.value) - i.value.includes(String(E.coluna)) && (E.operador = String(((g = s.find((Z) => String(Z.coluna) === String(E.coluna))) == null ? void 0 : g.operador) ?? "="), E.entrada && !Bn(E.entrada[0]) && (E.entrada = ["texto", { rotulo: "Valor" }])); + i.value.includes(String(E.coluna)) && (E.operador = String(((g = s.find((Z) => String(Z.coluna) === String(E.coluna))) == null ? void 0 : g.operador) ?? "="), E.entrada && !Tn(E.entrada[0]) && (E.entrada = ["texto", { rotulo: "Valor" }])); } me( () => [e.aberto, e.filtrosBase, e.modelo], @@ -2472,30 +2472,30 @@ const wn = I({ emitFechar: k, emitSalvar: y, emitLimpar: D, - rotuloDoFiltro: Tn + rotuloDoFiltro: wn }; } -}), Pn = { +}), On = { class: "eli-tabela-modal-filtro__modal", role: "dialog", "aria-modal": "true", "aria-label": "Filtro avançado" -}, On = { class: "eli-tabela-modal-filtro__header" }, Fn = { class: "eli-tabela-modal-filtro__conteudo" }, Vn = { +}, Fn = { class: "eli-tabela-modal-filtro__header" }, Vn = { class: "eli-tabela-modal-filtro__conteudo" }, qn = { key: 0, class: "eli-tabela-modal-filtro__vazio" -}, qn = { +}, Nn = { key: 1, class: "eli-tabela-modal-filtro__lista" -}, Nn = { class: "eli-tabela-modal-filtro__entrada" }, In = ["onClick"], Ln = { class: "eli-tabela-modal-filtro__acoes" }, jn = ["disabled"], zn = ["value"], Hn = ["disabled"], Un = { class: "eli-tabela-modal-filtro__footer" }; -function Yn(e, a, o, r, i, f) { +}, In = { class: "eli-tabela-modal-filtro__entrada" }, Ln = ["onClick"], jn = { class: "eli-tabela-modal-filtro__acoes" }, zn = ["disabled"], Hn = ["value"], Un = ["disabled"], Yn = { class: "eli-tabela-modal-filtro__footer" }; +function Rn(e, a, o, r, i, f) { return e.aberto ? (c(), $("div", { key: 0, class: "eli-tabela-modal-filtro__overlay", role: "presentation", - onClick: a[6] || (a[6] = ue((...t) => e.emitFechar && e.emitFechar(...t), ["self"])) + onClick: a[6] || (a[6] = se((...t) => e.emitFechar && e.emitFechar(...t), ["self"])) }, [ - v("div", Pn, [ - v("header", On, [ + v("div", On, [ + v("header", Fn, [ a[7] || (a[7] = v("h3", { class: "eli-tabela-modal-filtro__titulo" }, "Filtro avançado", -1)), v("button", { type: "button", @@ -2504,13 +2504,13 @@ function Yn(e, a, o, r, i, f) { onClick: a[0] || (a[0] = (...t) => e.emitFechar && e.emitFechar(...t)) }, " × ") ]), - v("div", Fn, [ - e.filtrosBase.length ? (c(), $("div", qn, [ - (c(!0), $(re, null, pe(e.linhas, (t, n) => (c(), $("div", { + v("div", Vn, [ + e.filtrosBase.length ? (c(), $("div", Nn, [ + (c(!0), $(ue, null, pe(e.linhas, (t, n) => (c(), $("div", { key: String(t.coluna), class: "eli-tabela-modal-filtro__linha" }, [ - v("div", Nn, [ + v("div", In, [ (c(), W(Te(e.componenteEntrada(t.entrada)), { value: t.valor, "onUpdate:value": (d) => t.valor = d, @@ -2524,11 +2524,11 @@ function Yn(e, a, o, r, i, f) { title: "Remover", "aria-label": "Remover", onClick: (d) => e.remover(n) - }, " × ", 8, In) + }, " × ", 8, Ln) ]))), 128)) - ])) : (c(), $("div", Vn, " Nenhum filtro configurado na tabela. ")), - v("div", Ln, [ - ra(v("select", { + ])) : (c(), $("div", qn, " Nenhum filtro configurado na tabela. ")), + v("div", jn, [ + la(v("select", { "onUpdate:modelValue": a[1] || (a[1] = (t) => e.colunaParaAdicionar = t), class: "eli-tabela-modal-filtro__select", disabled: !e.opcoesParaAdicionar.length @@ -2537,22 +2537,22 @@ function Yn(e, a, o, r, i, f) { disabled: "", value: "" }, "Selecione um filtro…", -1)), - (c(!0), $(re, null, pe(e.opcoesParaAdicionar, (t) => (c(), $("option", { + (c(!0), $(ue, null, pe(e.opcoesParaAdicionar, (t) => (c(), $("option", { key: String(t.coluna), value: String(t.coluna) - }, F(e.rotuloDoFiltro(t)), 9, zn))), 128)) - ], 8, jn), [ - [Da, e.colunaParaAdicionar] + }, F(e.rotuloDoFiltro(t)), 9, Hn))), 128)) + ], 8, zn), [ + [Ma, e.colunaParaAdicionar] ]), v("button", { type: "button", class: "eli-tabela-modal-filtro__botao", onClick: a[2] || (a[2] = (...t) => e.adicionar && e.adicionar(...t)), disabled: !e.colunaParaAdicionar - }, " Adicionar ", 8, Hn) + }, " Adicionar ", 8, Un) ]) ]), - v("footer", Un, [ + v("footer", Yn, [ v("button", { type: "button", class: "eli-tabela-modal-filtro__botao eli-tabela-modal-filtro__botao--sec", @@ -2572,34 +2572,34 @@ function Yn(e, a, o, r, i, f) { ]) ])) : Q("", !0); } -const Rn = /* @__PURE__ */ L(wn, [["render", Yn]]), Jn = "eli:tabela"; -function ha(e) { - return `${Jn}:${e}:colunas`; -} +const Jn = /* @__PURE__ */ L(Pn, [["render", Rn]]), Wn = "eli:tabela"; function ga(e) { + return `${Wn}:${e}:colunas`; +} +function $a(e) { if (!e || typeof e != "object") return { visiveis: [], invisiveis: [] }; const a = e, o = Array.isArray(a.visiveis) ? a.visiveis.filter((i) => typeof i == "string") : [], r = Array.isArray(a.invisiveis) ? a.invisiveis.filter((i) => typeof i == "string") : []; return { visiveis: o, invisiveis: r }; } -function oa(e) { +function na(e) { try { - const a = window.localStorage.getItem(ha(e)); - return a ? ga(JSON.parse(a)) : { visiveis: [], invisiveis: [] }; + const a = window.localStorage.getItem(ga(e)); + return a ? $a(JSON.parse(a)) : { visiveis: [], invisiveis: [] }; } catch { return { visiveis: [], invisiveis: [] }; } } -function Wn(e, a) { +function Zn(e, a) { try { - window.localStorage.setItem(ha(e), JSON.stringify(ga(a))); + window.localStorage.setItem(ga(e), JSON.stringify($a(a))); } catch { } } function Re(e) { return `eli_tabela:${e}:filtro_avancado`; } -function na(e) { +function ra(e) { try { const a = localStorage.getItem(Re(e)); if (!a) return []; @@ -2609,31 +2609,31 @@ function na(e) { return []; } } -function Zn(e, a) { +function Xn(e, a) { try { localStorage.setItem(Re(e), JSON.stringify(a ?? [])); } catch { } } -function Xn(e) { +function Gn(e) { try { localStorage.removeItem(Re(e)); } catch { } } -const Gn = I({ +const Kn = I({ name: "EliTabela", inheritAttrs: !1, components: { - EliTabelaCabecalho: At, - EliTabelaEstados: wt, - EliTabelaDebug: Vt, - EliTabelaHead: Rt, - EliTabelaBody: qo, - EliTabelaMenuAcoes: Ho, - EliTabelaPaginacao: Go, - EliTabelaModalColunas: cn, - EliTabelaModalFiltroAvancado: Rn + EliTabelaCabecalho: St, + EliTabelaEstados: Pt, + EliTabelaDebug: qt, + EliTabelaHead: Jt, + EliTabelaBody: No, + EliTabelaMenuAcoes: Uo, + EliTabelaPaginacao: Ko, + EliTabelaModalColunas: dn, + EliTabelaModalFiltroAvancado: Jn }, props: { /** Configuração principal da tabela (colunas, consulta e ações) */ @@ -2643,7 +2643,7 @@ const Gn = I({ } }, setup(e) { - const o = O(!1), r = O(null), i = O([]), f = O(0), t = O([]), n = O(null), d = O(null), l = O({ top: 0, left: 0 }), u = O(""), b = O(1), k = O(null), D = O("asc"), y = O(!1), s = O(na(e.tabela.nome)); + const o = O(!1), r = O(null), i = O([]), f = O(0), t = O([]), n = O(null), d = O(null), l = O({ top: 0, left: 0 }), u = O(""), b = O(1), k = O(null), D = O("asc"), y = O(!1), s = O(ra(e.tabela.nome)); function _() { y.value = !0; } @@ -2651,10 +2651,10 @@ const Gn = I({ y.value = !1; } function E() { - s.value = [], Xn(e.tabela.nome), y.value = !1, u.value = "", b.value !== 1 ? b.value = 1 : $e(); + s.value = [], Gn(e.tabela.nome), y.value = !1, u.value = "", b.value !== 1 ? b.value = 1 : $e(); } function Z(A) { - s.value = A ?? [], Zn(e.tabela.nome, A ?? []), y.value = !1, u.value = "", b.value !== 1 ? b.value = 1 : $e(); + s.value = A ?? [], Xn(e.tabela.nome, A ?? []), y.value = !1, u.value = "", b.value !== 1 ? b.value = 1 : $e(); } const oe = S(() => { const A = e.tabela.filtroAvancado ?? []; @@ -2666,15 +2666,15 @@ const Gn = I({ valor: P.valor } : null; }).filter(Boolean); - }), Y = S(() => e.tabela), X = S(() => !!e.tabela.mostrarCaixaDeBusca), le = S(() => e.tabela.acoesTabela ?? []), j = S(() => le.value.length > 0), be = O(!1), V = O( - oa(e.tabela.nome) - ), w = O({}), ke = S(() => e.tabela.colunas.map((A) => A.rotulo)), Pe = S(() => { - var ne, se; - const A = e.tabela.colunas, z = (((ne = V.value.visiveis) == null ? void 0 : ne.length) ?? 0) > 0 || (((se = V.value.invisiveis) == null ? void 0 : se.length) ?? 0) > 0 ? V.value.invisiveis ?? [] : A.filter((J) => J.visivel === !1).map((J) => J.rotulo), H = new Set(z), fe = A.filter((J) => H.has(J.rotulo)), ce = z, ye = /* @__PURE__ */ new Map(); + }), R = S(() => e.tabela), X = S(() => !!e.tabela.mostrarCaixaDeBusca), le = S(() => e.tabela.acoesTabela ?? []), j = S(() => le.value.length > 0), be = O(!1), q = O( + na(e.tabela.nome) + ), w = O({}), Se = S(() => e.tabela.colunas.map((A) => A.rotulo)), Pe = S(() => { + var re, ie; + const A = e.tabela.colunas, z = (((re = q.value.visiveis) == null ? void 0 : re.length) ?? 0) > 0 || (((ie = q.value.invisiveis) == null ? void 0 : ie.length) ?? 0) > 0 ? q.value.invisiveis ?? [] : A.filter((J) => J.visivel === !1).map((J) => J.rotulo), H = new Set(z), fe = A.filter((J) => H.has(J.rotulo)), de = z, ye = /* @__PURE__ */ new Map(); for (const J of fe) ye.has(J.rotulo) || ye.set(J.rotulo, J); const ee = []; - for (const J of ce) { + for (const J of de) { const ve = ye.get(J); ve && ee.push(ve); } @@ -2683,24 +2683,24 @@ const Gn = I({ return ee; }), M = S(() => Pe.value.length > 0), h = S(() => { var J, ve; - const A = e.tabela.colunas, P = ke.value, z = (((J = V.value.visiveis) == null ? void 0 : J.length) ?? 0) > 0 || (((ve = V.value.invisiveis) == null ? void 0 : ve.length) ?? 0) > 0, H = z ? V.value.invisiveis ?? [] : e.tabela.colunas.filter((U) => U.visivel === !1).map((U) => U.rotulo), fe = new Set(H), ce = P.filter((U) => !fe.has(U)), ye = new Set(ce), ee = z ? V.value.visiveis ?? [] : [], ne = []; - for (const U of ee) - ye.has(U) && ne.push(U); - for (const U of ce) - ne.includes(U) || ne.push(U); - const se = /* @__PURE__ */ new Map(); - for (const U of A) - se.has(U.rotulo) || se.set(U.rotulo, U); - return ne.map((U) => se.get(U)).filter(Boolean); - }); - function p() { + const A = e.tabela.colunas, P = Se.value, z = (((J = q.value.visiveis) == null ? void 0 : J.length) ?? 0) > 0 || (((ve = q.value.invisiveis) == null ? void 0 : ve.length) ?? 0) > 0, H = z ? q.value.invisiveis ?? [] : e.tabela.colunas.filter((Y) => Y.visivel === !1).map((Y) => Y.rotulo), fe = new Set(H), de = P.filter((Y) => !fe.has(Y)), ye = new Set(de), ee = z ? q.value.visiveis ?? [] : [], re = []; + for (const Y of ee) + ye.has(Y) && re.push(Y); + for (const Y of de) + re.includes(Y) || re.push(Y); + const ie = /* @__PURE__ */ new Map(); + for (const Y of A) + ie.has(Y.rotulo) || ie.set(Y.rotulo, Y); + return re.map((Y) => ie.get(Y)).filter(Boolean); + }), p = S(() => h.value.length + (ne.value ? 1 : 0) + (M.value ? 1 : 0)); + function C() { be.value = !0; } - function C() { + function m() { be.value = !1; } - function m(A) { - V.value = A, Wn(e.tabela.nome, A), be.value = !1, w.value = {}; + function B(A) { + q.value = A, Zn(e.tabela.nome, A), be.value = !1, w.value = {}; } function T(A) { const P = !!w.value[A]; @@ -2709,33 +2709,33 @@ const Gn = I({ [A]: !P }; } - const B = S(() => { + const V = S(() => { const A = e.tabela.registros_por_consulta; return typeof A == "number" && A > 0 ? Math.floor(A) : 10; - }), q = S(() => { - const A = B.value; + }), U = S(() => { + const A = V.value; if (!A || A <= 0) return 1; const P = f.value ?? 0; return P ? Math.max(1, Math.ceil(P / A)) : 1; - }), R = S(() => i.value ?? []), G = S(() => f.value ?? 0), x = S(() => (e.tabela.acoesLinha ?? []).length > 0), ie = S(() => (e.tabela.filtroAvancado ?? []).length > 0); - let de = 0; - function he(A) { - var ee, ne, se, J, ve, U; - const P = A.getBoundingClientRect(), z = 8, H = ((se = (ne = (ee = d.value) == null ? void 0 : ee.menuEl) == null ? void 0 : ne.value) == null ? void 0 : se.offsetHeight) ?? 0, fe = ((U = (ve = (J = d.value) == null ? void 0 : J.menuEl) == null ? void 0 : ve.value) == null ? void 0 : U.offsetWidth) ?? 180; - let ce = P.bottom + z; + }), G = S(() => i.value ?? []), x = S(() => f.value ?? 0), ne = S(() => (e.tabela.acoesLinha ?? []).length > 0), _e = S(() => (e.tabela.filtroAvancado ?? []).length > 0); + let ce = 0; + function Ee(A) { + var ee, re, ie, J, ve, Y; + const P = A.getBoundingClientRect(), z = 8, H = ((ie = (re = (ee = d.value) == null ? void 0 : ee.menuEl) == null ? void 0 : re.value) == null ? void 0 : ie.offsetHeight) ?? 0, fe = ((Y = (ve = (J = d.value) == null ? void 0 : J.menuEl) == null ? void 0 : ve.value) == null ? void 0 : Y.offsetWidth) ?? 180; + let de = P.bottom + z; const ye = P.right - fe; - H && ce + H > window.innerHeight - z && (ce = P.top - z - H), l.value = { - top: Math.max(z, Math.round(ce)), + H && de + H > window.innerHeight - z && (de = P.top - z - H), l.value = { + top: Math.max(z, Math.round(de)), left: Math.max(z, Math.round(ye)) }; } - function Ee(A) { + function he(A) { var z, H; if (n.value === null) return; const P = A.target; (H = (z = d.value) == null ? void 0 : z.menuEl) != null && H.value && d.value.menuEl.value.contains(P) || (n.value = null); } - function _e(A) { + function te(A) { if (A) { if (k.value === A) { D.value = D.value === "asc" ? "desc" : "asc", $e(); @@ -2744,42 +2744,42 @@ const Gn = I({ k.value = A, D.value = "asc", b.value !== 1 ? b.value = 1 : $e(); } } - function te(A) { + function ge(A) { u.value !== A && (u.value = A, b.value !== 1 ? b.value = 1 : $e()); } - function ge(A) { - const P = Math.min(Math.max(1, A), q.value); + function ke(A) { + const P = Math.min(Math.max(1, A), U.value); P !== b.value && (b.value = P); } - function Ce(A) { + function De(A) { const P = e.tabela.acoesLinha ?? [], z = t.value[A] ?? []; return P.map((H, fe) => { - const ce = H.exibir === void 0 ? !0 : typeof H.exibir == "boolean" ? H.exibir : !1; + const de = H.exibir === void 0 ? !0 : typeof H.exibir == "boolean" ? H.exibir : !1; return { acao: H, indice: fe, - visivel: z[fe] ?? ce + visivel: z[fe] ?? de }; }).filter((H) => H.visivel); } - function De(A) { - return Ce(A).length > 0; + function Je(A) { + return De(A).length > 0; } - function $a(A, P) { - if (!De(A)) return; + function ya(A, P) { + if (!Je(A)) return; if (n.value === A) { n.value = null; return; } n.value = A; const z = (P == null ? void 0 : P.currentTarget) ?? null; - z && (he(z), requestAnimationFrame(() => he(z))); + z && (Ee(z), requestAnimationFrame(() => Ee(z))); } async function $e() { - var ce, ye; - const A = ++de; + var de, ye; + const A = ++ce; o.value = !0, r.value = null, t.value = [], n.value = null, w.value = {}; - const P = Math.max(1, B.value), H = { + const P = Math.max(1, V.value), H = { offSet: (b.value - 1) * P, limit: P }, fe = (u.value ?? "").trim(); @@ -2791,34 +2791,34 @@ const Gn = I({ } k.value && (H.coluna_ordem = k.value, H.direcao_ordem = D.value); try { - const ee = e.tabela, ne = await ee.consulta(H); - if (A !== de) return; - if (ne.cod !== fa.sucesso) { - i.value = [], f.value = 0, r.value = ne.mensagem; + const ee = e.tabela, re = await ee.consulta(H); + if (A !== ce) return; + if (re.cod !== pa.sucesso) { + i.value = [], f.value = 0, r.value = re.mensagem; return; } - const se = ((ce = ne.valor) == null ? void 0 : ce.valores) ?? [], J = ((ye = ne.valor) == null ? void 0 : ye.quantidade) ?? se.length; - i.value = se, f.value = Number(J) || 0; + const ie = ((de = re.valor) == null ? void 0 : de.valores) ?? [], J = ((ye = re.valor) == null ? void 0 : ye.quantidade) ?? ie.length; + i.value = ie, f.value = Number(J) || 0; const ve = Math.max(1, Math.ceil((f.value || 0) / P)); b.value > ve && (b.value = ve); - const U = ee.acoesLinha ?? []; - if (!U.length) { + const Y = ee.acoesLinha ?? []; + if (!Y.length) { t.value = []; return; } - const ya = se.map( - () => U.map((Oe) => Oe.exibir === void 0 ? !0 : typeof Oe.exibir == "boolean" ? Oe.exibir : !1) + const _a = ie.map( + () => Y.map((Oe) => Oe.exibir === void 0 ? !0 : typeof Oe.exibir == "boolean" ? Oe.exibir : !1) ); - t.value = ya; - const _a = await Promise.all( - se.map( + t.value = _a; + const Ea = await Promise.all( + ie.map( async (Oe) => Promise.all( - U.map(async (Ve) => { + Y.map(async (Ve) => { if (Ve.exibir === void 0) return !0; if (typeof Ve.exibir == "boolean") return Ve.exibir; try { - const Ea = Ve.exibir(Oe); - return !!await Promise.resolve(Ea); + const Ca = Ve.exibir(Oe); + return !!await Promise.resolve(Ca); } catch { return !1; } @@ -2826,18 +2826,18 @@ const Gn = I({ ) ) ); - A === de && (t.value = _a); + A === ce && (t.value = Ea); } catch (ee) { - if (A !== de) return; + if (A !== ce) return; i.value = [], f.value = 0, r.value = ee instanceof Error ? ee.message : "Erro ao carregar dados."; } finally { - A === de && (o.value = !1); + A === ce && (o.value = !1); } } - return la(() => { - document.addEventListener("click", Ee), $e(); - }), Ma(() => { - document.removeEventListener("click", Ee); + return ia(() => { + document.addEventListener("click", he), $e(); + }), Ba(() => { + document.removeEventListener("click", he); }), me( () => e.tabela.mostrarCaixaDeBusca, (A) => { @@ -2848,7 +2848,7 @@ const Gn = I({ }), me( () => e.tabela, () => { - n.value = null, k.value = null, D.value = "asc", u.value = "", be.value = !1, y.value = !1, V.value = oa(e.tabela.nome), s.value = na(e.tabela.nome), w.value = {}, b.value !== 1 ? b.value = 1 : $e(); + n.value = null, k.value = null, D.value = "asc", u.value = "", be.value = !1, y.value = !1, q.value = na(e.tabela.nome), s.value = ra(e.tabela.nome), w.value = {}, b.value !== 1 ? b.value = 1 : $e(); } ), me( () => e.tabela.registros_por_consulta, @@ -2860,38 +2860,39 @@ const Gn = I({ }), { // state isDev: !1, - tabela: Y, + tabela: R, carregando: o, erro: r, linhas: i, - linhasPaginadas: R, + linhasPaginadas: G, filtrosAvancadosAtivos: oe, - quantidadeFiltrada: G, + quantidadeFiltrada: x, quantidade: f, menuAberto: n, valorBusca: u, paginaAtual: b, colunaOrdenacao: k, direcaoOrdenacao: D, - totalPaginas: q, - registrosPorConsulta: B, + totalPaginas: U, + registrosPorConsulta: V, // computed exibirBusca: X, - exibirFiltroAvancado: ie, + exibirFiltroAvancado: _e, acoesCabecalho: le, temAcoesCabecalho: j, - temAcoes: x, + temAcoes: ne, + totalColunas: p, colunasEfetivas: h, - rotulosColunas: ke, + rotulosColunas: Se, modalColunasAberto: be, - configColunas: V, + configColunas: q, temColunasInvisiveis: M, colunasInvisiveisEfetivas: Pe, linhasExpandidas: w, - abrirModalColunas: p, + abrirModalColunas: C, abrirModalFiltro: _, - fecharModalColunas: C, - salvarModalColunas: m, + fecharModalColunas: m, + salvarModalColunas: B, modalFiltroAberto: y, filtrosUi: s, salvarFiltrosAvancados: Z, @@ -2899,21 +2900,21 @@ const Gn = I({ fecharModalFiltro: g, alternarLinhaExpandida: T, // actions - alternarOrdenacao: _e, - atualizarBusca: te, - irParaPagina: ge, - acoesDisponiveisPorLinha: Ce, - possuiAcoes: De, - toggleMenu: $a, + alternarOrdenacao: te, + atualizarBusca: ge, + irParaPagina: ke, + acoesDisponiveisPorLinha: De, + possuiAcoes: Je, + toggleMenu: ya, // popup menuPopup: d, menuPopupPos: l }; } -}), Kn = { class: "eli-tabela" }, Qn = { class: "eli-tabela__table" }; -function xn(e, a, o, r, i, f) { - const t = K("EliTabelaDebug"), n = K("EliTabelaEstados"), d = K("EliTabelaCabecalho"), l = K("EliTabelaModalColunas"), u = K("EliTabelaModalFiltroAvancado"), b = K("EliTabelaHead"), k = K("EliTabelaBody"), D = K("EliTabelaMenuAcoes"), y = K("EliTabelaPaginacao"); - return c(), $("div", Kn, [ +}), Qn = { class: "eli-tabela" }, xn = { class: "eli-tabela__table" }, er = { key: 0 }, ar = ["colspan"]; +function tr(e, a, o, r, i, f) { + const t = K("EliTabelaDebug"), n = K("EliTabelaCabecalho"), d = K("EliTabelaModalColunas"), l = K("EliTabelaModalFiltroAvancado"), u = K("EliTabelaHead"), b = K("EliTabelaEstados"), k = K("EliTabelaBody"), D = K("EliTabelaMenuAcoes"), y = K("EliTabelaPaginacao"); + return c(), $("div", Qn, [ N(t, { isDev: e.isDev, menuAberto: e.menuAberto, @@ -2928,96 +2929,104 @@ function xn(e, a, o, r, i, f) { ]), _: 1 }, 8, ["isDev", "menuAberto", "menuPopupPos"]), - e.carregando || e.erro || !e.linhas.length ? (c(), W(n, { + e.exibirBusca || e.temAcoesCabecalho ? (c(), W(n, { key: 0, - carregando: e.carregando, - erro: e.erro, - mensagemVazio: e.tabela.mensagemVazio - }, null, 8, ["carregando", "erro", "mensagemVazio"])) : (c(), $(re, { key: 1 }, [ - e.exibirBusca || e.temAcoesCabecalho ? (c(), W(d, { - key: 0, - exibirBusca: e.exibirBusca, - exibirBotaoFiltroAvancado: e.exibirFiltroAvancado, - valorBusca: e.valorBusca, - acoesCabecalho: e.acoesCabecalho, - onBuscar: e.atualizarBusca, - onColunas: e.abrirModalColunas, - onFiltroAvancado: e.abrirModalFiltro - }, null, 8, ["exibirBusca", "exibirBotaoFiltroAvancado", "valorBusca", "acoesCabecalho", "onBuscar", "onColunas", "onFiltroAvancado"])) : Q("", !0), - N(l, { - aberto: e.modalColunasAberto, - rotulosColunas: e.rotulosColunas, - configInicial: e.configColunas, - colunas: e.tabela.colunas, - onFechar: e.fecharModalColunas, - onSalvar: e.salvarModalColunas - }, null, 8, ["aberto", "rotulosColunas", "configInicial", "colunas", "onFechar", "onSalvar"]), + exibirBusca: e.exibirBusca, + exibirBotaoFiltroAvancado: e.exibirFiltroAvancado, + valorBusca: e.valorBusca, + acoesCabecalho: e.acoesCabecalho, + onBuscar: e.atualizarBusca, + onColunas: e.abrirModalColunas, + onFiltroAvancado: e.abrirModalFiltro + }, null, 8, ["exibirBusca", "exibirBotaoFiltroAvancado", "valorBusca", "acoesCabecalho", "onBuscar", "onColunas", "onFiltroAvancado"])) : Q("", !0), + N(d, { + aberto: e.modalColunasAberto, + rotulosColunas: e.rotulosColunas, + configInicial: e.configColunas, + colunas: e.tabela.colunas, + onFechar: e.fecharModalColunas, + onSalvar: e.salvarModalColunas + }, null, 8, ["aberto", "rotulosColunas", "configInicial", "colunas", "onFechar", "onSalvar"]), + N(l, { + aberto: e.modalFiltroAberto, + filtrosBase: e.tabela.filtroAvancado ?? [], + modelo: e.filtrosUi, + onFechar: e.fecharModalFiltro, + onLimpar: e.limparFiltrosAvancados, + onSalvar: e.salvarFiltrosAvancados + }, null, 8, ["aberto", "filtrosBase", "modelo", "onFechar", "onLimpar", "onSalvar"]), + v("table", xn, [ N(u, { - aberto: e.modalFiltroAberto, - filtrosBase: e.tabela.filtroAvancado ?? [], - modelo: e.filtrosUi, - onFechar: e.fecharModalFiltro, - onLimpar: e.limparFiltrosAvancados, - onSalvar: e.salvarFiltrosAvancados - }, null, 8, ["aberto", "filtrosBase", "modelo", "onFechar", "onLimpar", "onSalvar"]), - v("table", Qn, [ - N(b, { - colunas: e.colunasEfetivas, - temAcoes: e.temAcoes, - temColunasInvisiveis: e.temColunasInvisiveis, - colunaOrdenacao: e.colunaOrdenacao, - direcaoOrdenacao: e.direcaoOrdenacao, - onAlternarOrdenacao: e.alternarOrdenacao - }, null, 8, ["colunas", "temAcoes", "temColunasInvisiveis", "colunaOrdenacao", "direcaoOrdenacao", "onAlternarOrdenacao"]), - N(k, { - colunas: e.colunasEfetivas, - colunasInvisiveis: e.colunasInvisiveisEfetivas, - temColunasInvisiveis: e.temColunasInvisiveis, - linhasExpandidas: e.linhasExpandidas, - linhas: e.linhasPaginadas, - temAcoes: e.temAcoes, - menuAberto: e.menuAberto, - possuiAcoes: e.possuiAcoes, - toggleMenu: e.toggleMenu, - alternarLinhaExpandida: e.alternarLinhaExpandida - }, null, 8, ["colunas", "colunasInvisiveis", "temColunasInvisiveis", "linhasExpandidas", "linhas", "temAcoes", "menuAberto", "possuiAcoes", "toggleMenu", "alternarLinhaExpandida"]) - ]), - N(D, { - ref: "menuPopup", - menuAberto: e.menuAberto, - posicao: e.menuPopupPos, - acoes: e.menuAberto === null ? [] : e.acoesDisponiveisPorLinha(e.menuAberto), - linha: e.menuAberto === null ? null : e.linhasPaginadas[e.menuAberto], - onExecutar: a[0] || (a[0] = ({ acao: s, linha: _ }) => { - e.menuAberto = null, s.acao(_); - }) - }, null, 8, ["menuAberto", "posicao", "acoes", "linha"]), - e.totalPaginas > 1 && e.quantidadeFiltrada > 0 ? (c(), W(y, { + colunas: e.colunasEfetivas, + temAcoes: e.temAcoes, + temColunasInvisiveis: e.temColunasInvisiveis, + colunaOrdenacao: e.colunaOrdenacao, + direcaoOrdenacao: e.direcaoOrdenacao, + onAlternarOrdenacao: e.alternarOrdenacao + }, null, 8, ["colunas", "temAcoes", "temColunasInvisiveis", "colunaOrdenacao", "direcaoOrdenacao", "onAlternarOrdenacao"]), + e.carregando || e.erro || !e.linhas.length ? (c(), $("tbody", er, [ + v("tr", null, [ + v("td", { + colspan: e.totalColunas, + style: { padding: "0" } + }, [ + N(b, { + carregando: e.carregando, + erro: e.erro, + mensagemVazio: e.tabela.mensagemVazio, + style: { border: "none", "border-radius": "0" } + }, null, 8, ["carregando", "erro", "mensagemVazio"]) + ], 8, ar) + ]) + ])) : (c(), W(k, { key: 1, - pagina: e.paginaAtual, - totalPaginas: e.totalPaginas, - maximoBotoes: e.tabela.maximo_botoes_paginacao, - onAlterar: e.irParaPagina - }, null, 8, ["pagina", "totalPaginas", "maximoBotoes", "onAlterar"])) : Q("", !0) - ], 64)) + colunas: e.colunasEfetivas, + colunasInvisiveis: e.colunasInvisiveisEfetivas, + temColunasInvisiveis: e.temColunasInvisiveis, + linhasExpandidas: e.linhasExpandidas, + linhas: e.linhasPaginadas, + temAcoes: e.temAcoes, + menuAberto: e.menuAberto, + possuiAcoes: e.possuiAcoes, + toggleMenu: e.toggleMenu, + alternarLinhaExpandida: e.alternarLinhaExpandida + }, null, 8, ["colunas", "colunasInvisiveis", "temColunasInvisiveis", "linhasExpandidas", "linhas", "temAcoes", "menuAberto", "possuiAcoes", "toggleMenu", "alternarLinhaExpandida"])) + ]), + N(D, { + ref: "menuPopup", + menuAberto: e.menuAberto, + posicao: e.menuPopupPos, + acoes: e.menuAberto === null ? [] : e.acoesDisponiveisPorLinha(e.menuAberto), + linha: e.menuAberto === null ? null : e.linhasPaginadas[e.menuAberto], + onExecutar: a[0] || (a[0] = ({ acao: s, linha: _ }) => { + e.menuAberto = null, s.acao(_); + }) + }, null, 8, ["menuAberto", "posicao", "acoes", "linha"]), + e.totalPaginas > 1 && e.quantidadeFiltrada > 0 ? (c(), W(y, { + key: 1, + pagina: e.paginaAtual, + totalPaginas: e.totalPaginas, + maximoBotoes: e.tabela.maximo_botoes_paginacao, + onAlterar: e.irParaPagina + }, null, 8, ["pagina", "totalPaginas", "maximoBotoes", "onAlterar"])) : Q("", !0) ]); } -const er = /* @__PURE__ */ L(Gn, [["render", xn]]), dr = (e, a) => [e, a], fr = { +const or = /* @__PURE__ */ L(Kn, [["render", tr]]), vr = (e, a) => [e, a], mr = { install(e) { - e.component("EliOlaMundo", xa), e.component("EliBotao", da), e.component("EliBadge", Ue), e.component("EliCartao", nt), e.component("EliTabela", er), e.component("EliEntradaTexto", Ye), e.component("EliEntradaNumero", ma), e.component("EliEntradaDataHora", ba), e.component("EliEntradaParagrafo", Sn), e.component("EliEntradaSelecao", Mn); + e.component("EliOlaMundo", et), e.component("EliBotao", fa), e.component("EliBadge", Ue), e.component("EliCartao", rt), e.component("EliTabela", or), e.component("EliEntradaTexto", Ye), e.component("EliEntradaNumero", ba), e.component("EliEntradaDataHora", ha), e.component("EliEntradaParagrafo", kn), e.component("EliEntradaSelecao", Bn); } }; export { Ue as EliBadge, - da as EliBotao, - nt as EliCartao, - ba as EliEntradaDataHora, - ma as EliEntradaNumero, - Sn as EliEntradaParagrafo, - Mn as EliEntradaSelecao, + fa as EliBotao, + rt as EliCartao, + ha as EliEntradaDataHora, + ba as EliEntradaNumero, + kn as EliEntradaParagrafo, + Bn as EliEntradaSelecao, Ye as EliEntradaTexto, - xa as EliOlaMundo, - er as EliTabela, - dr as celulaTabela, - fr as default + et as EliOlaMundo, + or as EliTabela, + vr as celulaTabela, + mr as default }; diff --git a/dist/eli-vue.umd.js b/dist/eli-vue.umd.js index 01be0cc..be27e9a 100644 --- a/dist/eli-vue.umd.js +++ b/dist/eli-vue.umd.js @@ -1,9 +1,9 @@ -(function(w,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("vuetify/components/VBtn"),require("vuetify/components/VBadge"),require("vuetify/components/VTextField"),require("vuetify/components/VCard"),require("vuetify/components/VGrid"),require("vuetify/components"),require("vuetify/components/VChip"),require("vuetify/components/VTextarea"),require("vuetify/components/VSelect")):typeof define=="function"&&define.amd?define(["exports","vue","vuetify/components/VBtn","vuetify/components/VBadge","vuetify/components/VTextField","vuetify/components/VCard","vuetify/components/VGrid","vuetify/components","vuetify/components/VChip","vuetify/components/VTextarea","vuetify/components/VSelect"],t):(w=typeof globalThis<"u"?globalThis:w||self,t(w.eli_vue={},w.Vue,w.VBtn,w.VBadge,w.VTextField,w.VCard,w.VGrid,w.components,w.VChip,w.VTextarea,w.VSelect))})(this,(function(w,t,xe,et,Ce,se,tt,ve,at,ot,nt){"use strict";const rt=t.defineComponent({name:"EliBotao",inheritAttrs:!1,props:{color:{type:String,default:"primary"},variant:{type:String,default:"elevated"},size:{type:String,default:"default"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}}}),T=(e,a)=>{const n=e.__vccOpts||e;for(const[l,s]of a)n[l]=s;return n};function lt(e,a,n,l,s,m){return t.openBlock(),t.createBlock(xe.VBtn,t.mergeProps({color:e.color,variant:e.variant,size:e.size,disabled:e.disabled,loading:e.loading},e.$attrs,{class:"eli-botao text-none pt-1"}),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["color","variant","size","disabled","loading"])}const _e=T(rt,[["render",lt]]),Ae={suave:"4px",pill:"10px"},it=t.defineComponent({name:"EliBadge",inheritAttrs:!1,props:{color:{type:String,default:"primary"},location:{type:String,default:"top right"},offsetX:{type:String,default:"0"},offsetY:{type:String,default:"0"},dot:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},badge:{type:[String,Number],default:void 0},radius:{type:String,default:"suave"}},setup(e){const a=t.computed(()=>e.radius in Ae?Ae[e.radius]:e.radius),n=t.computed(()=>e.dot||e.badge!==void 0?e.visible:!1),l=t.computed(()=>({"--eli-badge-radius":a.value}));return{showBadge:n,badgeStyle:l}}});function st(e,a,n,l,s,m){return e.showBadge?(t.openBlock(),t.createBlock(et.VBadge,t.mergeProps({key:0,color:e.color},e.$attrs,{location:e.location,"offset-x":e.offsetX,"offset-y":e.offsetY,dot:e.dot,content:e.badge,style:e.badgeStyle,class:"eli-badge"}),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["color","location","offset-x","offset-y","dot","content","style"])):t.renderSlot(e.$slots,"default",{key:1})}const ye=T(it,[["render",st]]);function ct(e){return e.replace(/\D+/g,"")}function dt(e){const a=ct(e);return a.length<=11?a.replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d{1,2})$/,"$1-$2").slice(0,14):a.replace(/^(\d{2})(\d)/,"$1.$2").replace(/^(\d{2})\.(\d{3})(\d)/,"$1.$2.$3").replace(/\.(\d{3})(\d)/,".$1/$2").replace(/(\d{4})(\d)/,"$1-$2").slice(0,18)}function ut(e){return e.replace(/\D+/g,"")}function mt(e){const a=ut(e);return a?a.length<=10?a.replace(/^(\d{2})(\d)/,"($1) $2").replace(/(\d{4})(\d)/,"$1-$2").slice(0,14):a.replace(/^(\d{2})(\d)/,"($1) $2").replace(/(\d{5})(\d)/,"$1-$2").slice(0,15):""}function pt(e){return e.replace(/\D+/g,"")}function ft(e){const a=pt(e);return a?a.replace(/^(\d{5})(\d)/,"$1-$2").slice(0,9):""}const bt=t.defineComponent({name:"EliEntradaTexto",inheritAttrs:!1,props:{value:{type:[String,null],default:void 0},opcoes:{type:Object,required:!0}},emits:{"update:value":e=>!0,input:e=>!0,change:e=>!0,focus:()=>!0,blur:()=>!0},setup(e,{attrs:a,emit:n}){const l=t.computed(()=>{var i;return((i=e.opcoes)==null?void 0:i.formato)??"texto"}),s=t.computed({get:()=>e.value,set:i=>{n("update:value",i),n("input",i),n("change",i)}}),m=t.computed(()=>l.value==="email"?"email":l.value==="url"?"url":"text"),o=t.computed(()=>{if(l.value==="telefone")return"tel";if(l.value==="cpfCnpj"||l.value==="cep")return"numeric"});function r(i){switch(l.value){case"telefone":return mt(i);case"cpfCnpj":return dt(i);case"cep":return ft(i);default:return i}}function u(i){const d=i.target,b=r(d.value);d.value=b,s.value=b}return{attrs:a,emit:n,localValue:s,inputHtmlType:m,inputMode:o,onInput:u}}});function ht(e,a,n,l,s,m){var o,r,u,i;return t.openBlock(),t.createBlock(Ce.VTextField,t.mergeProps({modelValue:e.localValue,"onUpdate:modelValue":a[0]||(a[0]=d=>e.localValue=d),type:e.inputHtmlType,inputmode:e.inputMode,label:(o=e.opcoes)==null?void 0:o.rotulo,placeholder:(r=e.opcoes)==null?void 0:r.placeholder,counter:(u=e.opcoes)==null?void 0:u.limiteCaracteres,maxlength:(i=e.opcoes)==null?void 0:i.limiteCaracteres},e.attrs,{onFocus:a[1]||(a[1]=()=>e.emit("focus")),onBlur:a[2]||(a[2]=()=>e.emit("blur")),onInput:e.onInput}),null,16,["modelValue","type","inputmode","label","placeholder","counter","maxlength","onInput"])}const $e=T(bt,[["render",ht]]),gt=t.defineComponent({name:"EliOlaMundo",components:{EliBotao:_e,EliBadge:ye,EliEntradaTexto:$e},setup(){const e=t.ref(""),a=t.ref(""),n=t.ref(""),l=t.ref(""),s=t.ref("");return{nome:e,email:l,documento:s,telefone:n,cep:a}}}),yt={class:"grid-example"};function $t(e,a,n,l,s,m){const o=t.resolveComponent("EliBadge"),r=t.resolveComponent("EliEntradaTexto"),u=t.resolveComponent("EliBotao");return t.openBlock(),t.createBlock(tt.VContainer,null,{default:t.withCtx(()=>[t.createVNode(se.VCard,{class:"mx-auto",max_width:"400"},{default:t.withCtx(()=>[t.createVNode(se.VCardTitle,null,{default:t.withCtx(()=>[t.createVNode(o,{badge:"Novo","offset-x":"-15",location:"right center"},{default:t.withCtx(()=>[...a[5]||(a[5]=[t.createTextVNode(" Olá Mundo! ",-1)])]),_:1})]),_:1}),t.createVNode(se.VCardText,null,{default:t.withCtx(()=>[a[6]||(a[6]=t.createTextVNode(" Este é um componente de exemplo integrado com Vuetify. ",-1)),t.createElementVNode("div",yt,[t.createVNode(r,{value:e.nome,"onUpdate:value":a[0]||(a[0]=i=>e.nome=i),opcoes:{rotulo:"Nome",placeholder:"Digite o nome"},density:"compact"},null,8,["value"]),t.createVNode(r,{value:e.telefone,"onUpdate:value":a[1]||(a[1]=i=>e.telefone=i),opcoes:{rotulo:"Telefone",formato:"telefone"}},null,8,["value"]),t.createVNode(r,{value:e.cep,"onUpdate:value":a[2]||(a[2]=i=>e.cep=i),opcoes:{rotulo:"CEP",placeholder:"00000-000",formato:"cep"}},null,8,["value"]),t.createVNode(r,{value:e.documento,"onUpdate:value":a[3]||(a[3]=i=>e.documento=i),opcoes:{rotulo:"CPF / CNPJ",formato:"cpfCnpj"}},null,8,["value"]),t.createVNode(r,{value:e.email,"onUpdate:value":a[4]||(a[4]=i=>e.email=i),opcoes:{rotulo:"Email",placeholder:"email@exemplo.com",formato:"email"}},null,8,["value"])])]),_:1}),t.createVNode(se.VCardActions,null,{default:t.withCtx(()=>[t.createVNode(u,{color:"primary",variant:"elevated",block:""},{default:t.withCtx(()=>[...a[7]||(a[7]=[t.createTextVNode(" Botão Vuetify ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})}const Me=T(gt,[["render",$t]]),Et=t.defineComponent({name:"EliCartao",components:{EliBadge:ye},inheritAttrs:!1,props:{titulo:{type:String,default:""},status:{type:String,required:!0},variant:{type:String,default:"outlined"}},emits:{clicar:e=>!0},setup(e,{emit:a}){const n=t.computed(()=>e.status),l=t.computed(()=>{switch(e.status){case"novo":return"primary";case"rascunho":return"secondary";case"vendido":return"success";case"cancelado":return"error"}}),s=t.computed(()=>`eli-cartao--${e.status}`);function m(){a("clicar",e.status)}return{rotuloStatus:n,corStatus:l,classeStatus:s,onClick:m}}}),kt={class:"eli-cartao__titulo-texto"},Bt={class:"eli-cartao__status"};function Ct(e,a,n,l,s,m){const o=t.resolveComponent("EliBadge");return t.openBlock(),t.createBlock(se.VCard,t.mergeProps({class:["eli-cartao",e.classeStatus],variant:e.variant},e.$attrs),{default:t.withCtx(()=>[t.createVNode(se.VCardTitle,{class:"eli-cartao__titulo"},{default:t.withCtx(()=>[t.createElementVNode("div",kt,[t.renderSlot(e.$slots,"titulo",{},()=>[t.createTextVNode(t.toDisplayString(e.titulo),1)])]),t.createElementVNode("div",Bt,[t.createVNode(o,{badge:e.rotuloStatus,radius:"pill",color:e.corStatus},{default:t.withCtx(()=>[...a[0]||(a[0]=[t.createElementVNode("span",null,null,-1)])]),_:1},8,["badge","color"])])]),_:3}),t.createVNode(se.VCardText,{class:"eli-cartao__conteudo"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3}),e.$slots.acoes?(t.openBlock(),t.createBlock(se.VCardActions,{key:0,class:"eli-cartao__acoes"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"acoes")]),_:3})):t.createCommentVNode("",!0)]),_:3},16,["variant","class"])}const we=T(Et,[["render",Ct]]);var Te=(e=>(e[e.sucesso=200]="sucesso",e[e.erroConhecido=400]="erroConhecido",e[e.erroPermissao=401]="erroPermissao",e[e.erroNaoEncontrado=404]="erroNaoEncontrado",e[e.erroDesconhecido=500]="erroDesconhecido",e[e.tempoEsgotado=504]="tempoEsgotado",e))(Te||{});/** +(function(w,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("vuetify/components/VBtn"),require("vuetify/components/VBadge"),require("vuetify/components/VTextField"),require("vuetify/components/VCard"),require("vuetify/components/VGrid"),require("vuetify/components"),require("vuetify/components/VChip"),require("vuetify/components/VTextarea"),require("vuetify/components/VSelect")):typeof define=="function"&&define.amd?define(["exports","vue","vuetify/components/VBtn","vuetify/components/VBadge","vuetify/components/VTextField","vuetify/components/VCard","vuetify/components/VGrid","vuetify/components","vuetify/components/VChip","vuetify/components/VTextarea","vuetify/components/VSelect"],t):(w=typeof globalThis<"u"?globalThis:w||self,t(w.eli_vue={},w.Vue,w.VBtn,w.VBadge,w.VTextField,w.VCard,w.VGrid,w.components,w.VChip,w.VTextarea,w.VSelect))})(this,(function(w,t,et,tt,Ce,ie,at,ve,ot,nt,lt){"use strict";const rt=t.defineComponent({name:"EliBotao",inheritAttrs:!1,props:{color:{type:String,default:"primary"},variant:{type:String,default:"elevated"},size:{type:String,default:"default"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}}}),T=(e,a)=>{const n=e.__vccOpts||e;for(const[r,s]of a)n[r]=s;return n};function it(e,a,n,r,s,m){return t.openBlock(),t.createBlock(et.VBtn,t.mergeProps({color:e.color,variant:e.variant,size:e.size,disabled:e.disabled,loading:e.loading},e.$attrs,{class:"eli-botao text-none pt-1"}),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["color","variant","size","disabled","loading"])}const _e=T(rt,[["render",it]]),Ae={suave:"4px",pill:"10px"},st=t.defineComponent({name:"EliBadge",inheritAttrs:!1,props:{color:{type:String,default:"primary"},location:{type:String,default:"top right"},offsetX:{type:String,default:"0"},offsetY:{type:String,default:"0"},dot:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},badge:{type:[String,Number],default:void 0},radius:{type:String,default:"suave"}},setup(e){const a=t.computed(()=>e.radius in Ae?Ae[e.radius]:e.radius),n=t.computed(()=>e.dot||e.badge!==void 0?e.visible:!1),r=t.computed(()=>({"--eli-badge-radius":a.value}));return{showBadge:n,badgeStyle:r}}});function ct(e,a,n,r,s,m){return e.showBadge?(t.openBlock(),t.createBlock(tt.VBadge,t.mergeProps({key:0,color:e.color},e.$attrs,{location:e.location,"offset-x":e.offsetX,"offset-y":e.offsetY,dot:e.dot,content:e.badge,style:e.badgeStyle,class:"eli-badge"}),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["color","location","offset-x","offset-y","dot","content","style"])):t.renderSlot(e.$slots,"default",{key:1})}const ye=T(st,[["render",ct]]);function dt(e){return e.replace(/\D+/g,"")}function ut(e){const a=dt(e);return a.length<=11?a.replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d{1,2})$/,"$1-$2").slice(0,14):a.replace(/^(\d{2})(\d)/,"$1.$2").replace(/^(\d{2})\.(\d{3})(\d)/,"$1.$2.$3").replace(/\.(\d{3})(\d)/,".$1/$2").replace(/(\d{4})(\d)/,"$1-$2").slice(0,18)}function mt(e){return e.replace(/\D+/g,"")}function pt(e){const a=mt(e);return a?a.length<=10?a.replace(/^(\d{2})(\d)/,"($1) $2").replace(/(\d{4})(\d)/,"$1-$2").slice(0,14):a.replace(/^(\d{2})(\d)/,"($1) $2").replace(/(\d{5})(\d)/,"$1-$2").slice(0,15):""}function ft(e){return e.replace(/\D+/g,"")}function bt(e){const a=ft(e);return a?a.replace(/^(\d{5})(\d)/,"$1-$2").slice(0,9):""}const ht=t.defineComponent({name:"EliEntradaTexto",inheritAttrs:!1,props:{value:{type:[String,null],default:void 0},opcoes:{type:Object,required:!0}},emits:{"update:value":e=>!0,input:e=>!0,change:e=>!0,focus:()=>!0,blur:()=>!0},setup(e,{attrs:a,emit:n}){const r=t.computed(()=>{var i;return((i=e.opcoes)==null?void 0:i.formato)??"texto"}),s=t.computed({get:()=>e.value,set:i=>{n("update:value",i),n("input",i),n("change",i)}}),m=t.computed(()=>r.value==="email"?"email":r.value==="url"?"url":"text"),o=t.computed(()=>{if(r.value==="telefone")return"tel";if(r.value==="cpfCnpj"||r.value==="cep")return"numeric"});function l(i){switch(r.value){case"telefone":return pt(i);case"cpfCnpj":return ut(i);case"cep":return bt(i);default:return i}}function u(i){const d=i.target,b=l(d.value);d.value=b,s.value=b}return{attrs:a,emit:n,localValue:s,inputHtmlType:m,inputMode:o,onInput:u}}});function gt(e,a,n,r,s,m){var o,l,u,i;return t.openBlock(),t.createBlock(Ce.VTextField,t.mergeProps({modelValue:e.localValue,"onUpdate:modelValue":a[0]||(a[0]=d=>e.localValue=d),type:e.inputHtmlType,inputmode:e.inputMode,label:(o=e.opcoes)==null?void 0:o.rotulo,placeholder:(l=e.opcoes)==null?void 0:l.placeholder,counter:(u=e.opcoes)==null?void 0:u.limiteCaracteres,maxlength:(i=e.opcoes)==null?void 0:i.limiteCaracteres},e.attrs,{onFocus:a[1]||(a[1]=()=>e.emit("focus")),onBlur:a[2]||(a[2]=()=>e.emit("blur")),onInput:e.onInput}),null,16,["modelValue","type","inputmode","label","placeholder","counter","maxlength","onInput"])}const $e=T(ht,[["render",gt]]),yt=t.defineComponent({name:"EliOlaMundo",components:{EliBotao:_e,EliBadge:ye,EliEntradaTexto:$e},setup(){const e=t.ref(""),a=t.ref(""),n=t.ref(""),r=t.ref(""),s=t.ref("");return{nome:e,email:r,documento:s,telefone:n,cep:a}}}),$t={class:"grid-example"};function Et(e,a,n,r,s,m){const o=t.resolveComponent("EliBadge"),l=t.resolveComponent("EliEntradaTexto"),u=t.resolveComponent("EliBotao");return t.openBlock(),t.createBlock(at.VContainer,null,{default:t.withCtx(()=>[t.createVNode(ie.VCard,{class:"mx-auto",max_width:"400"},{default:t.withCtx(()=>[t.createVNode(ie.VCardTitle,null,{default:t.withCtx(()=>[t.createVNode(o,{badge:"Novo","offset-x":"-15",location:"right center"},{default:t.withCtx(()=>[...a[5]||(a[5]=[t.createTextVNode(" Olá Mundo! ",-1)])]),_:1})]),_:1}),t.createVNode(ie.VCardText,null,{default:t.withCtx(()=>[a[6]||(a[6]=t.createTextVNode(" Este é um componente de exemplo integrado com Vuetify. ",-1)),t.createElementVNode("div",$t,[t.createVNode(l,{value:e.nome,"onUpdate:value":a[0]||(a[0]=i=>e.nome=i),opcoes:{rotulo:"Nome",placeholder:"Digite o nome"},density:"compact"},null,8,["value"]),t.createVNode(l,{value:e.telefone,"onUpdate:value":a[1]||(a[1]=i=>e.telefone=i),opcoes:{rotulo:"Telefone",formato:"telefone"}},null,8,["value"]),t.createVNode(l,{value:e.cep,"onUpdate:value":a[2]||(a[2]=i=>e.cep=i),opcoes:{rotulo:"CEP",placeholder:"00000-000",formato:"cep"}},null,8,["value"]),t.createVNode(l,{value:e.documento,"onUpdate:value":a[3]||(a[3]=i=>e.documento=i),opcoes:{rotulo:"CPF / CNPJ",formato:"cpfCnpj"}},null,8,["value"]),t.createVNode(l,{value:e.email,"onUpdate:value":a[4]||(a[4]=i=>e.email=i),opcoes:{rotulo:"Email",placeholder:"email@exemplo.com",formato:"email"}},null,8,["value"])])]),_:1}),t.createVNode(ie.VCardActions,null,{default:t.withCtx(()=>[t.createVNode(u,{color:"primary",variant:"elevated",block:""},{default:t.withCtx(()=>[...a[7]||(a[7]=[t.createTextVNode(" Botão Vuetify ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})}const Me=T(yt,[["render",Et]]),kt=t.defineComponent({name:"EliCartao",components:{EliBadge:ye},inheritAttrs:!1,props:{titulo:{type:String,default:""},status:{type:String,required:!0},variant:{type:String,default:"outlined"}},emits:{clicar:e=>!0},setup(e,{emit:a}){const n=t.computed(()=>e.status),r=t.computed(()=>{switch(e.status){case"novo":return"primary";case"rascunho":return"secondary";case"vendido":return"success";case"cancelado":return"error"}}),s=t.computed(()=>`eli-cartao--${e.status}`);function m(){a("clicar",e.status)}return{rotuloStatus:n,corStatus:r,classeStatus:s,onClick:m}}}),Bt={class:"eli-cartao__titulo-texto"},Ct={class:"eli-cartao__status"};function vt(e,a,n,r,s,m){const o=t.resolveComponent("EliBadge");return t.openBlock(),t.createBlock(ie.VCard,t.mergeProps({class:["eli-cartao",e.classeStatus],variant:e.variant},e.$attrs),{default:t.withCtx(()=>[t.createVNode(ie.VCardTitle,{class:"eli-cartao__titulo"},{default:t.withCtx(()=>[t.createElementVNode("div",Bt,[t.renderSlot(e.$slots,"titulo",{},()=>[t.createTextVNode(t.toDisplayString(e.titulo),1)])]),t.createElementVNode("div",Ct,[t.createVNode(o,{badge:e.rotuloStatus,radius:"pill",color:e.corStatus},{default:t.withCtx(()=>[...a[0]||(a[0]=[t.createElementVNode("span",null,null,-1)])]),_:1},8,["badge","color"])])]),_:3}),t.createVNode(ie.VCardText,{class:"eli-cartao__conteudo"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3}),e.$slots.acoes?(t.openBlock(),t.createBlock(ie.VCardActions,{key:0,class:"eli-cartao__acoes"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"acoes")]),_:3})):t.createCommentVNode("",!0)]),_:3},16,["variant","class"])}const we=T(kt,[["render",vt]]);var Te=(e=>(e[e.sucesso=200]="sucesso",e[e.erroConhecido=400]="erroConhecido",e[e.erroPermissao=401]="erroPermissao",e[e.erroNaoEncontrado=404]="erroNaoEncontrado",e[e.erroDesconhecido=500]="erroDesconhecido",e[e.tempoEsgotado=504]="tempoEsgotado",e))(Te||{});/** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const vt=e=>{for(const a in e)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1};/** + */const _t=e=>{for(const a in e)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1};/** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. @@ -13,7 +13,7 @@ * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const _t=(...e)=>e.filter((a,n,l)=>!!a&&a.trim()!==""&&l.indexOf(a)===n).join(" ").trim();/** + */const Vt=(...e)=>e.filter((a,n,r)=>!!a&&a.trim()!==""&&r.indexOf(a)===n).join(" ").trim();/** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. @@ -23,12 +23,12 @@ * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Vt=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,n,l)=>l?l.toUpperCase():n.toLowerCase());/** + */const St=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,n,r)=>r?r.toUpperCase():n.toLowerCase());/** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const St=e=>{const a=Vt(e);return a.charAt(0).toUpperCase()+a.slice(1)};/** + */const Dt=e=>{const a=St(e);return a.charAt(0).toUpperCase()+a.slice(1)};/** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. @@ -38,12 +38,12 @@ * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Dt=({name:e,iconNode:a,absoluteStrokeWidth:n,"absolute-stroke-width":l,strokeWidth:s,"stroke-width":m,size:o=be.width,color:r=be.stroke,...u},{slots:i})=>t.h("svg",{...be,...u,width:o,height:o,stroke:r,"stroke-width":Pe(n)||Pe(l)||n===!0||l===!0?Number(s||m||be["stroke-width"])*24/Number(o):s||m||be["stroke-width"],class:_t("lucide",u.class,...e?[`lucide-${Fe(St(e))}-icon`,`lucide-${Fe(e)}`]:["lucide-icon"]),...!i.default&&!vt(u)&&{"aria-hidden":"true"}},[...a.map(d=>t.h(...d)),...i.default?[i.default()]:[]]);/** + */const Nt=({name:e,iconNode:a,absoluteStrokeWidth:n,"absolute-stroke-width":r,strokeWidth:s,"stroke-width":m,size:o=be.width,color:l=be.stroke,...u},{slots:i})=>t.h("svg",{...be,...u,width:o,height:o,stroke:l,"stroke-width":Pe(n)||Pe(r)||n===!0||r===!0?Number(s||m||be["stroke-width"])*24/Number(o):s||m||be["stroke-width"],class:Vt("lucide",u.class,...e?[`lucide-${Fe(Dt(e))}-icon`,`lucide-${Fe(e)}`]:["lucide-icon"]),...!i.default&&!_t(u)&&{"aria-hidden":"true"}},[...a.map(d=>t.h(...d)),...i.default?[i.default()]:[]]);/** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const fe=(e,a)=>(n,{slots:l,attrs:s})=>t.h(Dt,{...s,...n,iconNode:a,name:e},l);/** + */const fe=(e,a)=>(n,{slots:r,attrs:s})=>t.h(Nt,{...s,...n,iconNode:a,name:e},r);/** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. @@ -68,9 +68,9 @@ * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Nt=fe("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/** + */const At=fe("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const At=fe("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),Mt=t.defineComponent({name:"EliTabelaCaixaDeBusca",components:{Search:At},props:{modelo:{type:String,required:!1,default:""}},emits:{buscar(e){return typeof e=="string"}},setup(e,{emit:a}){const n=t.ref(e.modelo??"");t.watch(()=>e.modelo,s=>{s!==void 0&&s!==n.value&&(n.value=s)});function l(){a("buscar",n.value.trim())}return{texto:n,emitirBusca:l}}}),wt={class:"eli-tabela__busca"},Tt={class:"eli-tabela__busca-input-wrapper"};function Pt(e,a,n,l,s,m){const o=t.resolveComponent("Search");return t.openBlock(),t.createElementBlock("div",wt,[t.createElementVNode("div",Tt,[t.withDirectives(t.createElementVNode("input",{id:"eli-tabela-busca","onUpdate:modelValue":a[0]||(a[0]=r=>e.texto=r),type:"search",class:"eli-tabela__busca-input",placeholder:"Digite termos para filtrar",onKeyup:a[1]||(a[1]=t.withKeys((...r)=>e.emitirBusca&&e.emitirBusca(...r),["enter"]))},null,544),[[t.vModelText,e.texto]]),t.createElementVNode("button",{type:"button",class:"eli-tabela__busca-botao","aria-label":"Buscar",title:"Buscar",onClick:a[2]||(a[2]=(...r)=>e.emitirBusca&&e.emitirBusca(...r))},[t.createVNode(o,{class:"eli-tabela__busca-botao-icone",size:16,"stroke-width":2,"aria-hidden":"true"})])])])}const Ft=T(Mt,[["render",Pt]]),Ot=t.defineComponent({name:"EliTabelaCabecalho",components:{EliTabelaCaixaDeBusca:Ft},props:{exibirBusca:{type:Boolean,required:!0},exibirBotaoColunas:{type:Boolean,required:!1,default:!0},exibirBotaoFiltroAvancado:{type:Boolean,required:!1,default:!1},valorBusca:{type:String,required:!0},acoesCabecalho:{type:Array,required:!0}},emits:{buscar(e){return typeof e=="string"},colunas(){return!0},filtroAvancado(){return!0}},setup(e,{emit:a}){const n=t.computed(()=>e.acoesCabecalho.length>0);function l(o){a("buscar",o)}function s(){a("colunas")}function m(){a("filtroAvancado")}return{temAcoesCabecalho:n,emitBuscar:l,emitColunas:s,emitFiltroAvancado:m}}}),qt={class:"eli-tabela__cabecalho"},It={key:0,class:"eli-tabela__busca-grupo"},Lt={key:1,class:"eli-tabela__acoes-cabecalho"},zt=["onClick"],jt={class:"eli-tabela__acoes-cabecalho-rotulo"};function Ht(e,a,n,l,s,m){const o=t.resolveComponent("EliTabelaCaixaDeBusca");return t.openBlock(),t.createElementBlock("div",qt,[e.exibirBusca?(t.openBlock(),t.createElementBlock("div",It,[e.exibirBotaoColunas?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"eli-tabela__acoes-cabecalho-botao eli-tabela__acoes-cabecalho-botao--colunas",onClick:a[0]||(a[0]=(...r)=>e.emitColunas&&e.emitColunas(...r))}," Colunas ")):t.createCommentVNode("",!0),e.exibirBotaoFiltroAvancado?(t.openBlock(),t.createElementBlock("button",{key:1,type:"button",class:"eli-tabela__acoes-cabecalho-botao eli-tabela__acoes-cabecalho-botao--filtro",onClick:a[1]||(a[1]=(...r)=>e.emitFiltroAvancado&&e.emitFiltroAvancado(...r))}," Filtro ")):t.createCommentVNode("",!0),t.createVNode(o,{modelo:e.valorBusca,onBuscar:e.emitBuscar},null,8,["modelo","onBuscar"])])):t.createCommentVNode("",!0),e.temAcoesCabecalho?(t.openBlock(),t.createElementBlock("div",Lt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.acoesCabecalho,(r,u)=>(t.openBlock(),t.createElementBlock("button",{key:`${r.rotulo}-${u}`,type:"button",class:"eli-tabela__acoes-cabecalho-botao",style:t.normalizeStyle(r.cor?{backgroundColor:r.cor,color:"#fff"}:void 0),onClick:r.acao},[r.icone?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.icone),{key:0,class:"eli-tabela__acoes-cabecalho-icone",size:16,"stroke-width":2})):t.createCommentVNode("",!0),t.createElementVNode("span",jt,t.toDisplayString(r.rotulo),1)],12,zt))),128))])):t.createCommentVNode("",!0)])}const Ut=T(Ot,[["render",Ht]]),Yt=t.defineComponent({name:"EliTabelaEstados",props:{carregando:{type:Boolean,required:!0},erro:{type:String,required:!0},mensagemVazio:{type:String,required:!1,default:void 0}}}),Rt={key:0,class:"eli-tabela eli-tabela--carregando","aria-busy":"true"},Jt={key:1,class:"eli-tabela eli-tabela--erro",role:"alert"},Wt={class:"eli-tabela__erro-mensagem"},Zt={key:2,class:"eli-tabela eli-tabela--vazio"};function Gt(e,a,n,l,s,m){return e.carregando?(t.openBlock(),t.createElementBlock("div",Rt," Carregando... ")):e.erro?(t.openBlock(),t.createElementBlock("div",Jt,[a[0]||(a[0]=t.createElementVNode("div",{class:"eli-tabela__erro-titulo"},"Erro",-1)),t.createElementVNode("div",Wt,t.toDisplayString(e.erro),1)])):(t.openBlock(),t.createElementBlock("div",Zt,t.toDisplayString(e.mensagemVazio??"Nenhum registro encontrado."),1))}const Xt=T(Yt,[["render",Gt]]),Kt=t.defineComponent({name:"EliTabelaDebug",props:{isDev:{type:Boolean,required:!0},menuAberto:{type:Number,required:!0},menuPopupPos:{type:Object,required:!0}}}),Qt={key:0,style:{position:"fixed",left:"8px",bottom:"8px","z-index":"999999",background:"rgba(185,28,28,0.9)",color:"#fff",padding:"6px 10px","border-radius":"8px","font-size":"12px","max-width":"500px"}};function xt(e,a,n,l,s,m){return e.isDev?(t.openBlock(),t.createElementBlock("div",Qt,[a[0]||(a[0]=t.createElementVNode("div",null,[t.createElementVNode("b",null,"EliTabela debug")],-1)),t.createElementVNode("div",null,"menuAberto: "+t.toDisplayString(e.menuAberto),1),t.createElementVNode("div",null,"menuPos: top="+t.toDisplayString(e.menuPopupPos.top)+", left="+t.toDisplayString(e.menuPopupPos.left),1),t.renderSlot(e.$slots,"default")])):t.createCommentVNode("",!0)}const ea=T(Kt,[["render",xt]]),ta=t.defineComponent({name:"EliTabelaHead",components:{ArrowUp:qe,ArrowDown:Oe},props:{colunas:{type:Array,required:!0},temAcoes:{type:Boolean,required:!0},temColunasInvisiveis:{type:Boolean,required:!0},colunaOrdenacao:{type:String,required:!0},direcaoOrdenacao:{type:String,required:!0}},emits:{alternarOrdenacao(e){return typeof e=="string"&&e.length>0}},setup(e,{emit:a}){function n(s){return(s==null?void 0:s.coluna_ordem)!==void 0&&(s==null?void 0:s.coluna_ordem)!==null}function l(s){a("alternarOrdenacao",s)}return{ArrowUp:qe,ArrowDown:Oe,isOrdenavel:n,emitAlternarOrdenacao:l}}}),aa={class:"eli-tabela__thead"},oa={class:"eli-tabela__tr eli-tabela__tr--header"},na={key:0,class:"eli-tabela__th eli-tabela__th--expander",scope:"col"},ra=["onClick"],la={class:"eli-tabela__th-texto"},ia={key:1,class:"eli-tabela__th-label"},sa={key:1,class:"eli-tabela__th eli-tabela__th--acoes",scope:"col"};function ca(e,a,n,l,s,m){const o=t.resolveComponent("ArrowUp");return t.openBlock(),t.createElementBlock("thead",aa,[t.createElementVNode("tr",oa,[e.temColunasInvisiveis?(t.openBlock(),t.createElementBlock("th",na)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.colunas,(r,u)=>(t.openBlock(),t.createElementBlock("th",{key:`th-${u}`,class:t.normalizeClass(["eli-tabela__th",[e.isOrdenavel(r)?"eli-tabela__th--ordenavel":void 0]]),scope:"col"},[e.isOrdenavel(r)?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:t.normalizeClass(["eli-tabela__th-botao",[e.colunaOrdenacao===String(r.coluna_ordem)?"eli-tabela__th-botao--ativo":void 0]]),onClick:i=>e.emitAlternarOrdenacao(String(r.coluna_ordem))},[t.createElementVNode("span",la,t.toDisplayString(r.rotulo),1),e.colunaOrdenacao===String(r.coluna_ordem)?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.direcaoOrdenacao==="asc"?e.ArrowUp:e.ArrowDown),{key:0,class:"eli-tabela__th-icone",size:16,"stroke-width":2,"aria-hidden":"true"})):(t.openBlock(),t.createBlock(o,{key:1,class:"eli-tabela__th-icone eli-tabela__th-icone--oculto",size:16,"stroke-width":2,"aria-hidden":"true"}))],10,ra)):(t.openBlock(),t.createElementBlock("span",ia,t.toDisplayString(r.rotulo),1))],2))),128)),e.temAcoes?(t.openBlock(),t.createElementBlock("th",sa," Ações ")):t.createCommentVNode("",!0)])])}const da=T(ta,[["render",ca]]),ua=t.defineComponent({name:"EliTabelaCelulaTextoSimples",components:{},props:{dados:{type:Object}},data(){return{}},methods:{},setup({dados:e}){return{dados:e}}}),ma={key:1};function pa(e,a,n,l,s,m){var o,r,u;return(o=e.dados)!=null&&o.acao?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"eli-tabela__celula-link",onClick:a[0]||(a[0]=t.withModifiers(i=>e.dados.acao(),["stop","prevent"]))},t.toDisplayString((r=e.dados)==null?void 0:r.texto),1)):(t.openBlock(),t.createElementBlock("span",ma,t.toDisplayString((u=e.dados)==null?void 0:u.texto),1))}const fa=T(ua,[["render",pa]]),ba=t.defineComponent({name:"EliTabelaCelulaTextoTruncado",props:{dados:{type:Object}},setup({dados:e}){return{dados:e}}}),ha=["title"],ga=["title"];function ya(e,a,n,l,s,m){var o,r,u,i,d;return(o=e.dados)!=null&&o.acao?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"eli-tabela__texto-truncado eli-tabela__celula-link",title:(r=e.dados)==null?void 0:r.texto,onClick:a[0]||(a[0]=t.withModifiers(b=>{var C,v;return(v=(C=e.dados)==null?void 0:C.acao)==null?void 0:v.call(C)},["stop","prevent"]))},t.toDisplayString((u=e.dados)==null?void 0:u.texto),9,ha)):(t.openBlock(),t.createElementBlock("span",{key:1,class:"eli-tabela__texto-truncado",title:(i=e.dados)==null?void 0:i.texto},t.toDisplayString((d=e.dados)==null?void 0:d.texto),9,ga))}const $a=T(ba,[["render",ya]]),Ea=t.defineComponent({name:"EliTabelaCelulaNumero",components:{},props:{dados:{type:Object}},setup({dados:e}){const a=t.computed(()=>{var r,u;const n=String(e==null?void 0:e.numero).replace(".",","),l=(r=e==null?void 0:e.prefixo)==null?void 0:r.trim(),s=(u=e==null?void 0:e.sufixo)==null?void 0:u.trim(),m=l?`${l} `:"",o=s?` ${s}`:"";return`${m}${n}${o}`});return{dados:e,textoNumero:a}}}),ka={key:1};function Ba(e,a,n,l,s,m){var o;return(o=e.dados)!=null&&o.acao?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"eli-tabela__celula-link",onClick:a[0]||(a[0]=t.withModifiers(r=>e.dados.acao(),["stop","prevent"]))},t.toDisplayString(e.textoNumero),1)):(t.openBlock(),t.createElementBlock("span",ka,t.toDisplayString(e.textoNumero),1))}const Ca=T(Ea,[["render",Ba]]),va=t.defineComponent({name:"EliTabelaCelulaTags",components:{VChip:ve.VChip},props:{dados:{type:Object,required:!1}},setup({dados:e}){return{dados:e}}}),_a={class:"eli-tabela__celula-tags"};function Va(e,a,n,l,s,m){var o;return t.openBlock(),t.createElementBlock("div",_a,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(((o=e.dados)==null?void 0:o.opcoes)??[],(r,u)=>(t.openBlock(),t.createBlock(at.VChip,{key:u,class:"eli-tabela__celula-tag",size:"small",variant:"tonal",color:r.cor,clickable:!!r.acao,onClick:t.withModifiers(i=>{var d;return(d=r.acao)==null?void 0:d.call(r)},["stop","prevent"])},{default:t.withCtx(()=>[r.icone?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.icone),{key:0,class:"eli-tabela__celula-tag-icone",size:14})):t.createCommentVNode("",!0),t.createElementVNode("span",null,t.toDisplayString(r.rotulo),1)]),_:2},1032,["color","clickable","onClick"]))),128))])}const Sa=T(va,[["render",Va]]);function ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ee={exports:{}},Da=Ee.exports,je;function Na(){return je||(je=1,(function(e,a){(function(n,l){e.exports=l()})(Da,(function(){var n=1e3,l=6e4,s=36e5,m="millisecond",o="second",r="minute",u="hour",i="day",d="week",b="month",C="quarter",v="year",y="date",c="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,E={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(_){var h=["th","st","nd","rd"],p=_%100;return"["+_+(h[(p-20)%10]||h[p]||h[0])+"]"}},j=function(_,h,p){var k=String(_);return!k||k.length>=h?_:""+Array(h+1-k.length).join(p)+_},W={s:j,z:function(_){var h=-_.utcOffset(),p=Math.abs(h),k=Math.floor(p/60),f=p%60;return(h<=0?"+":"-")+j(k,2,"0")+":"+j(f,2,"0")},m:function _(h,p){if(h.date()
|
+ |
+