diff --git a/dist/eli-vue.css b/dist/eli-vue.css index 87be6e7..a0a49e1 100644 --- a/dist/eli-vue.css +++ b/dist/eli-vue.css @@ -1 +1 @@ -@font-face{font-family:Google Sans;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://paiol.idz.one/estaticos/GoogleSans/GoogleSans-VariableFont_GRAD,opsz,wght.ttf) format("truetype")}@font-face{font-family:Google Sans;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://paiol.idz.one/estaticos/GoogleSans/GoogleSans-Italic-VariableFont_GRAD,opsz,wght.ttf) format("truetype")}:root{--eli-font-family: "Google Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;--v-font-family: var(--eli-font-family)}html,body{font-family:var(--eli-font-family)}:where([class^=eli-],[class*=" eli-"]){font-family:var(--eli-font-family);--v-font-family: var(--eli-font-family)}button,input,select,textarea{font-family:inherit}[data-v-371c8db4] .v-badge__badge,[data-v-371c8db4] .v-badge__content{border-radius:var(--eli-badge-radius)!important}.eli-input[data-v-756cb549]{width:100%}.checkbox-group[data-v-756cb549]{display:flex;gap:8px;flex-wrap:wrap}.cursor-pointer[data-v-756cb549]{cursor:pointer}.eli-cartao[data-v-6c492bd9]{border-radius:12px}.eli-cartao__titulo[data-v-6c492bd9]{display:flex;align-items:center;justify-content:space-between;gap:12px}.eli-cartao__titulo-texto[data-v-6c492bd9]{min-width:0}.eli-cartao__conteudo[data-v-6c492bd9]{padding-top:8px}.eli-cartao__acoes[data-v-6c492bd9]{padding-top:0}.eli-cartao--cancelado[data-v-6c492bd9]{opacity:.85}.eli-data-hora[data-v-71afabb6]{width:100%}.eli-tabela__busca[data-v-341415d1]{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.eli-tabela__busca-input-wrapper[data-v-341415d1]{display:inline-flex;align-items:stretch;border-radius:var(--eli-tabela-cabecalho-controle-radius, 8px);border:1px solid rgba(15,23,42,.15);overflow:hidden;background:#fff;height:var(--eli-tabela-cabecalho-controle-altura, 34px)}.eli-tabela__busca-input[data-v-341415d1]{height:100%;padding:0 12px;border:none;outline:none;font-size:.875rem;color:#0f172ad9}.eli-tabela__busca-input[data-v-341415d1]::-webkit-search-cancel-button,.eli-tabela__busca-input[data-v-341415d1]::-webkit-search-decoration{-webkit-appearance:none}.eli-tabela__busca-input[data-v-341415d1]::placeholder{color:#6b7280d9}.eli-tabela__busca-botao[data-v-341415d1]{display:inline-flex;align-items:center;justify-content:center;border:none;background:#2563eb1f;color:#2563ebf2;height:100%;padding:0 12px;cursor:pointer;transition:background-color .2s ease,color .2s ease}.eli-tabela__busca-botao-icone[data-v-341415d1]{display:block}.eli-tabela__busca-botao[data-v-341415d1]:hover,.eli-tabela__busca-botao[data-v-341415d1]:focus-visible{background:#2563eb33;color:#2563eb}.eli-tabela__busca-botao[data-v-341415d1]:focus-visible{outline:2px solid rgba(37,99,235,.35);outline-offset:2px}.eli-tabela__busca-grupo[data-v-42938cb8]{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}.eli-tabela__celula-link[data-v-7a629ffa]{all:unset;display:inline;color:#2563eb;cursor:pointer;text-decoration:underline;text-decoration-color:#2563eb8c;text-underline-offset:2px}.eli-tabela__celula-link[data-v-7a629ffa]:hover{color:#1d4ed8;text-decoration-color:#1d4ed8bf}.eli-tabela__celula-link[data-v-7a629ffa]:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px;border-radius:4px}.eli-tabela__texto-truncado[data-v-74854889]{display:inline-block;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:top}.eli-tabela__celula-link[data-v-74854889]{all:unset;display:inline;color:#2563eb;cursor:pointer;text-decoration:underline;text-decoration-color:#2563eb8c;text-underline-offset:2px}.eli-tabela__celula-link[data-v-74854889]:hover{color:#1d4ed8;text-decoration-color:#1d4ed8bf}.eli-tabela__celula-link[data-v-74854889]:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px;border-radius:4px}.eli-tabela__celula-link[data-v-e7bac7ff]{all:unset;display:inline;color:#2563eb;cursor:pointer;text-decoration:underline;text-decoration-color:#2563eb8c;text-underline-offset:2px}.eli-tabela__celula-link[data-v-e7bac7ff]:hover{color:#1d4ed8;text-decoration-color:#1d4ed8bf}.eli-tabela__celula-link[data-v-e7bac7ff]:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px;border-radius:4px}.eli-tabela__paginacao[data-v-5ca7a362]{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:12px;flex-wrap:wrap}.eli-tabela__pagina-botao[data-v-5ca7a362]{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:6px 14px;border-radius:9999px;border:1px solid rgba(15,23,42,.12);background:#fff;font-size:.875rem;font-weight:500;color:#0f172ad1;cursor:pointer;transition:background-color .2s ease,border-color .2s ease,color .2s ease}.eli-tabela__pagina-botao[data-v-5ca7a362]:hover,.eli-tabela__pagina-botao[data-v-5ca7a362]:focus-visible{background-color:#2563eb14;border-color:#2563eb66;color:#2563ebf2}.eli-tabela__pagina-botao[data-v-5ca7a362]:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px}.eli-tabela__pagina-botao[data-v-5ca7a362]:disabled{cursor:default;opacity:.5;background:#94a3b814;border-color:#94a3b82e;color:#475569bf}.eli-tabela__pagina-botao--ativo[data-v-5ca7a362]{background:#2563eb1f;border-color:#2563eb66;color:#2563ebf2}.eli-tabela__pagina-ellipsis[data-v-5ca7a362]{display:inline-flex;align-items:center;justify-content:center;width:32px;color:#6b7280d9;font-size:.9rem}.eli-tabela-modal-colunas__overlay[data-v-b8f693ef]{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a59;z-index:4000;display:flex;align-items:center;justify-content:center;padding:16px}.eli-tabela-modal-colunas__modal[data-v-b8f693ef]{width:min(860px,100%);background:#fff;border-radius:14px;border:1px solid rgba(15,23,42,.1);box-shadow:0 18px 60px #0f172a40;overflow:hidden}.eli-tabela-modal-colunas__header[data-v-b8f693ef]{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid rgba(15,23,42,.08)}.eli-tabela-modal-colunas__titulo[data-v-b8f693ef]{font-size:1rem;margin:0}.eli-tabela-modal-colunas__fechar[data-v-b8f693ef]{width:34px;height:34px;border-radius:10px;border:none;background:transparent;cursor:pointer;font-size:22px;line-height:1;color:#0f172acc}.eli-tabela-modal-colunas__fechar[data-v-b8f693ef]:hover,.eli-tabela-modal-colunas__fechar[data-v-b8f693ef]:focus-visible{background:#0f172a0f}.eli-tabela-modal-colunas__conteudo[data-v-b8f693ef]{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:16px}.eli-tabela-modal-colunas__coluna-titulo[data-v-b8f693ef]{font-weight:600;margin-bottom:8px}.eli-tabela-modal-colunas__lista[data-v-b8f693ef]{min-height:260px;border:1px solid rgba(15,23,42,.12);border-radius:12px;padding:10px;background:#0f172a03}.eli-tabela-modal-colunas__item[data-v-b8f693ef]{display:flex;align-items:center;gap:10px;padding:10px;border-radius:10px;border:1px solid rgba(15,23,42,.08);background:#fff;cursor:grab;-webkit-user-select:none;user-select:none}.eli-tabela-modal-colunas__item+.eli-tabela-modal-colunas__item[data-v-b8f693ef]{margin-top:8px}.eli-tabela-modal-colunas__item[data-v-b8f693ef]:active{cursor:grabbing}.eli-tabela-modal-colunas__item-handle[data-v-b8f693ef]{color:#0f172a8c;font-size:14px}.eli-tabela-modal-colunas__item-texto[data-v-b8f693ef]{flex:1;min-width:0}.eli-tabela-modal-colunas__footer[data-v-b8f693ef]{display:flex;justify-content:flex-end;gap:8px;padding:14px 16px;border-top:1px solid rgba(15,23,42,.08)}.eli-tabela-modal-colunas__botao[data-v-b8f693ef]{height:34px;padding:0 14px;border-radius:10px;border:1px solid rgba(15,23,42,.12);background:#fff;cursor:pointer;font-size:.9rem}.eli-tabela-modal-colunas__botao--sec[data-v-b8f693ef]:hover,.eli-tabela-modal-colunas__botao--sec[data-v-b8f693ef]:focus-visible{background:#0f172a0f}.eli-tabela-modal-colunas__botao--prim[data-v-b8f693ef]{border:none;background:#2563ebf2;color:#fff}.eli-tabela-modal-colunas__botao--prim[data-v-b8f693ef]:hover,.eli-tabela-modal-colunas__botao--prim[data-v-b8f693ef]:focus-visible{background:#2563eb}@media(max-width:720px){.eli-tabela-modal-colunas__conteudo[data-v-b8f693ef]{grid-template-columns:1fr}}.eli-tabela{width:100%}.eli-tabela__table{width:100%;border-collapse:separate;border-spacing:0;border:1px solid rgba(0,0,0,.12);border-radius:12px;overflow:visible}.eli-tabela__tbody{overflow:visible}.eli-tabela__tbody .eli-tabela__tr--zebra .eli-tabela__td{background:#0f172a05}.eli-tabela__th,.eli-tabela__td{padding:10px 12px;border-bottom:1px solid rgba(0,0,0,.08);vertical-align:top}.eli-tabela__th{text-align:left;font-weight:600;background:#00000008}.eli-tabela__th--ordenavel{padding:0}.eli-tabela__th--ordenavel .eli-tabela__th-botao{padding:10px 12px}.eli-tabela__th-botao{display:inline-flex;align-items:center;justify-content:flex-start;gap:8px;width:100%;background:transparent;border:none;font:inherit;color:inherit;cursor:pointer;text-align:left;transition:color .2s ease}.eli-tabela__th-botao:hover,.eli-tabela__th-botao:focus-visible{color:#0f172ad9}.eli-tabela__th-botao:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px}.eli-tabela__th-botao--ativo{color:#2563ebf2}.eli-tabela__th-texto{flex:1;min-width:0;white-space:nowrap}.eli-tabela__th-icone{flex-shrink:0}.eli-tabela__th-icone--oculto{opacity:0}.eli-tabela__tr:last-child .eli-tabela__td{border-bottom:none}.eli-tabela__td--clicavel{cursor:pointer}.eli-tabela__td--clicavel:hover{background:#00000008}.eli-tabela--erro{border:1px solid rgba(220,53,69,.35);border-radius:12px;padding:12px}.eli-tabela--carregando{border:1px dashed rgba(0,0,0,.25);border-radius:12px;padding:12px;opacity:.8}.eli-tabela__erro-titulo{font-weight:700;margin-bottom:4px}.eli-tabela__erro-mensagem{opacity:.9}.eli-tabela--vazio{border:1px dashed rgba(0,0,0,.25);border-radius:12px;padding:12px;opacity:.8}.eli-tabela__th--acoes{text-align:right;white-space:nowrap}.eli-tabela__td--acoes{white-space:nowrap;overflow:visible}.eli-tabela__acoes-container{display:flex;justify-content:flex-end;position:relative;z-index:1}.eli-tabela__acoes-container--aberto{z-index:200}.eli-tabela__cabecalho{width:100%;box-sizing:border-box;display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-bottom:12px;flex-wrap:wrap;--eli-tabela-cabecalho-controle-altura: 34px;--eli-tabela-cabecalho-controle-radius: 8px}.eli-tabela__acoes-cabecalho{display:inline-flex;gap:8px;flex-wrap:wrap}.eli-tabela__acoes-cabecalho-botao{display:inline-flex;align-items:center;gap:6px;height:var(--eli-tabela-cabecalho-controle-altura);padding:0 14px;border-radius:var(--eli-tabela-cabecalho-controle-radius);border:none;background:#2563eb1f;color:#2563ebf2;font-size:.875rem;font-weight:500;line-height:1;cursor:pointer;transition:background-color .2s ease,color .2s ease}.eli-tabela__acoes-cabecalho-botao:hover,.eli-tabela__acoes-cabecalho-botao:focus-visible{background:#2563eb33}.eli-tabela__acoes-cabecalho-botao:focus-visible{outline:2px solid rgba(37,99,235,.35);outline-offset:2px}.eli-tabela__acoes-cabecalho-icone{display:inline-block}.eli-tabela__acoes-cabecalho-rotulo{line-height:1}.eli-tabela__acoes-toggle{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:9999px;border:none;background:transparent;color:#0f172ab8;cursor:pointer;transition:background-color .2s ease,color .2s ease}.eli-tabela__acoes-toggle-icone{display:block}.eli-tabela__acoes-toggle:hover,.eli-tabela__acoes-toggle:focus-visible{background-color:#0f172a14;color:#0f172af2}.eli-tabela__acoes-toggle:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px}.eli-tabela__acoes-toggle:disabled{cursor:default;color:#94a3b8cc;background:transparent}.eli-tabela__acoes-menu{min-width:180px;padding:6px 0;margin:0;list-style:none;background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:10px;box-shadow:0 12px 30px #0f172a2e;z-index:1000}.eli-tabela__acoes-item{margin:0}.eli-tabela__acoes-item-botao{display:flex;align-items:center;gap:8px;width:100%;padding:8px 12px;border:none;background:transparent;font-size:.9rem;cursor:pointer;transition:background-color .2s ease}.eli-tabela__acoes-item-botao:hover,.eli-tabela__acoes-item-botao:focus-visible{background-color:#0f172a0f}.eli-tabela__acoes-item-botao:focus-visible{outline:2px solid currentColor;outline-offset:-2px}.eli-tabela__acoes-item-icone{flex-shrink:0}.eli-tabela__acoes-item-texto{flex:1;text-align:left}.eli-tabela__th--expander,.eli-tabela__td--expander{width:42px;padding:6px 8px;text-align:center;vertical-align:middle}.eli-tabela__expander-botao{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:9999px;border:none;background:transparent;color:#0f172ab8;cursor:pointer;transition:background-color .2s ease,color .2s ease}.eli-tabela__expander-botao:hover,.eli-tabela__expander-botao:focus-visible{background-color:#0f172a14;color:#0f172af2}.eli-tabela__expander-botao:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px}.eli-tabela__expander-botao--ativo{background-color:#0f172a0f;color:#0f172af2}.eli-tabela__td--detalhes{padding:12px}.eli-tabela__tr--detalhes .eli-tabela__td{border-bottom:1px solid rgba(0,0,0,.08)}.eli-tabela__detalhes{display:grid;gap:10px;padding-left:4px}.eli-tabela__detalhe{display:grid;grid-template-columns:180px 1fr;gap:10px;align-items:start}.eli-tabela__detalhe-rotulo{font-weight:600;color:#0f172ad9}.eli-tabela__detalhe-valor{min-width:0}@media(max-width:720px){.eli-tabela__detalhe{grid-template-columns:1fr}}.eli-entrada__prefixo[data-v-77cbf216],.eli-entrada__sufixo[data-v-77cbf216]{opacity:.75;font-size:.9em;white-space:nowrap}.eli-entrada__prefixo[data-v-77cbf216]{margin-right:6px}.eli-entrada__sufixo[data-v-77cbf216]{margin-left:6px} +@font-face{font-family:Google Sans;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://paiol.idz.one/estaticos/GoogleSans/GoogleSans-VariableFont_GRAD,opsz,wght.ttf) format("truetype")}@font-face{font-family:Google Sans;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://paiol.idz.one/estaticos/GoogleSans/GoogleSans-Italic-VariableFont_GRAD,opsz,wght.ttf) format("truetype")}:root{--eli-font-family: "Google Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;--v-font-family: var(--eli-font-family)}html,body{font-family:var(--eli-font-family)}:where([class^=eli-],[class*=" eli-"]){font-family:var(--eli-font-family);--v-font-family: var(--eli-font-family)}button,input,select,textarea{font-family:inherit}[data-v-371c8db4] .v-badge__badge,[data-v-371c8db4] .v-badge__content{border-radius:var(--eli-badge-radius)!important}.eli-input[data-v-756cb549]{width:100%}.checkbox-group[data-v-756cb549]{display:flex;gap:8px;flex-wrap:wrap}.cursor-pointer[data-v-756cb549]{cursor:pointer}.eli-cartao[data-v-6c492bd9]{border-radius:12px}.eli-cartao__titulo[data-v-6c492bd9]{display:flex;align-items:center;justify-content:space-between;gap:12px}.eli-cartao__titulo-texto[data-v-6c492bd9]{min-width:0}.eli-cartao__conteudo[data-v-6c492bd9]{padding-top:8px}.eli-cartao__acoes[data-v-6c492bd9]{padding-top:0}.eli-cartao--cancelado[data-v-6c492bd9]{opacity:.85}.eli-tabela__busca[data-v-341415d1]{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.eli-tabela__busca-input-wrapper[data-v-341415d1]{display:inline-flex;align-items:stretch;border-radius:var(--eli-tabela-cabecalho-controle-radius, 8px);border:1px solid rgba(15,23,42,.15);overflow:hidden;background:#fff;height:var(--eli-tabela-cabecalho-controle-altura, 34px)}.eli-tabela__busca-input[data-v-341415d1]{height:100%;padding:0 12px;border:none;outline:none;font-size:.875rem;color:#0f172ad9}.eli-tabela__busca-input[data-v-341415d1]::-webkit-search-cancel-button,.eli-tabela__busca-input[data-v-341415d1]::-webkit-search-decoration{-webkit-appearance:none}.eli-tabela__busca-input[data-v-341415d1]::placeholder{color:#6b7280d9}.eli-tabela__busca-botao[data-v-341415d1]{display:inline-flex;align-items:center;justify-content:center;border:none;background:#2563eb1f;color:#2563ebf2;height:100%;padding:0 12px;cursor:pointer;transition:background-color .2s ease,color .2s ease}.eli-tabela__busca-botao-icone[data-v-341415d1]{display:block}.eli-tabela__busca-botao[data-v-341415d1]:hover,.eli-tabela__busca-botao[data-v-341415d1]:focus-visible{background:#2563eb33;color:#2563eb}.eli-tabela__busca-botao[data-v-341415d1]:focus-visible{outline:2px solid rgba(37,99,235,.35);outline-offset:2px}.eli-tabela__busca-grupo[data-v-42938cb8]{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}.eli-tabela__celula-link[data-v-7a629ffa]{all:unset;display:inline;color:#2563eb;cursor:pointer;text-decoration:underline;text-decoration-color:#2563eb8c;text-underline-offset:2px}.eli-tabela__celula-link[data-v-7a629ffa]:hover{color:#1d4ed8;text-decoration-color:#1d4ed8bf}.eli-tabela__celula-link[data-v-7a629ffa]:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px;border-radius:4px}.eli-tabela__texto-truncado[data-v-74854889]{display:inline-block;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:top}.eli-tabela__celula-link[data-v-74854889]{all:unset;display:inline;color:#2563eb;cursor:pointer;text-decoration:underline;text-decoration-color:#2563eb8c;text-underline-offset:2px}.eli-tabela__celula-link[data-v-74854889]:hover{color:#1d4ed8;text-decoration-color:#1d4ed8bf}.eli-tabela__celula-link[data-v-74854889]:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px;border-radius:4px}.eli-tabela__celula-link[data-v-e7bac7ff]{all:unset;display:inline;color:#2563eb;cursor:pointer;text-decoration:underline;text-decoration-color:#2563eb8c;text-underline-offset:2px}.eli-tabela__celula-link[data-v-e7bac7ff]:hover{color:#1d4ed8;text-decoration-color:#1d4ed8bf}.eli-tabela__celula-link[data-v-e7bac7ff]:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px;border-radius:4px}.eli-tabela__paginacao[data-v-5ca7a362]{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:12px;flex-wrap:wrap}.eli-tabela__pagina-botao[data-v-5ca7a362]{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:6px 14px;border-radius:9999px;border:1px solid rgba(15,23,42,.12);background:#fff;font-size:.875rem;font-weight:500;color:#0f172ad1;cursor:pointer;transition:background-color .2s ease,border-color .2s ease,color .2s ease}.eli-tabela__pagina-botao[data-v-5ca7a362]:hover,.eli-tabela__pagina-botao[data-v-5ca7a362]:focus-visible{background-color:#2563eb14;border-color:#2563eb66;color:#2563ebf2}.eli-tabela__pagina-botao[data-v-5ca7a362]:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px}.eli-tabela__pagina-botao[data-v-5ca7a362]:disabled{cursor:default;opacity:.5;background:#94a3b814;border-color:#94a3b82e;color:#475569bf}.eli-tabela__pagina-botao--ativo[data-v-5ca7a362]{background:#2563eb1f;border-color:#2563eb66;color:#2563ebf2}.eli-tabela__pagina-ellipsis[data-v-5ca7a362]{display:inline-flex;align-items:center;justify-content:center;width:32px;color:#6b7280d9;font-size:.9rem}.eli-tabela-modal-colunas__overlay[data-v-b8f693ef]{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a59;z-index:4000;display:flex;align-items:center;justify-content:center;padding:16px}.eli-tabela-modal-colunas__modal[data-v-b8f693ef]{width:min(860px,100%);background:#fff;border-radius:14px;border:1px solid rgba(15,23,42,.1);box-shadow:0 18px 60px #0f172a40;overflow:hidden}.eli-tabela-modal-colunas__header[data-v-b8f693ef]{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid rgba(15,23,42,.08)}.eli-tabela-modal-colunas__titulo[data-v-b8f693ef]{font-size:1rem;margin:0}.eli-tabela-modal-colunas__fechar[data-v-b8f693ef]{width:34px;height:34px;border-radius:10px;border:none;background:transparent;cursor:pointer;font-size:22px;line-height:1;color:#0f172acc}.eli-tabela-modal-colunas__fechar[data-v-b8f693ef]:hover,.eli-tabela-modal-colunas__fechar[data-v-b8f693ef]:focus-visible{background:#0f172a0f}.eli-tabela-modal-colunas__conteudo[data-v-b8f693ef]{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:16px}.eli-tabela-modal-colunas__coluna-titulo[data-v-b8f693ef]{font-weight:600;margin-bottom:8px}.eli-tabela-modal-colunas__lista[data-v-b8f693ef]{min-height:260px;border:1px solid rgba(15,23,42,.12);border-radius:12px;padding:10px;background:#0f172a03}.eli-tabela-modal-colunas__item[data-v-b8f693ef]{display:flex;align-items:center;gap:10px;padding:10px;border-radius:10px;border:1px solid rgba(15,23,42,.08);background:#fff;cursor:grab;-webkit-user-select:none;user-select:none}.eli-tabela-modal-colunas__item+.eli-tabela-modal-colunas__item[data-v-b8f693ef]{margin-top:8px}.eli-tabela-modal-colunas__item[data-v-b8f693ef]:active{cursor:grabbing}.eli-tabela-modal-colunas__item-handle[data-v-b8f693ef]{color:#0f172a8c;font-size:14px}.eli-tabela-modal-colunas__item-texto[data-v-b8f693ef]{flex:1;min-width:0}.eli-tabela-modal-colunas__footer[data-v-b8f693ef]{display:flex;justify-content:flex-end;gap:8px;padding:14px 16px;border-top:1px solid rgba(15,23,42,.08)}.eli-tabela-modal-colunas__botao[data-v-b8f693ef]{height:34px;padding:0 14px;border-radius:10px;border:1px solid rgba(15,23,42,.12);background:#fff;cursor:pointer;font-size:.9rem}.eli-tabela-modal-colunas__botao--sec[data-v-b8f693ef]:hover,.eli-tabela-modal-colunas__botao--sec[data-v-b8f693ef]:focus-visible{background:#0f172a0f}.eli-tabela-modal-colunas__botao--prim[data-v-b8f693ef]{border:none;background:#2563ebf2;color:#fff}.eli-tabela-modal-colunas__botao--prim[data-v-b8f693ef]:hover,.eli-tabela-modal-colunas__botao--prim[data-v-b8f693ef]:focus-visible{background:#2563eb}@media(max-width:720px){.eli-tabela-modal-colunas__conteudo[data-v-b8f693ef]{grid-template-columns:1fr}}.eli-tabela{width:100%}.eli-tabela__table{width:100%;border-collapse:separate;border-spacing:0;border:1px solid rgba(0,0,0,.12);border-radius:12px;overflow:visible}.eli-tabela__tbody{overflow:visible}.eli-tabela__tbody .eli-tabela__tr--zebra .eli-tabela__td{background:#0f172a05}.eli-tabela__th,.eli-tabela__td{padding:10px 12px;border-bottom:1px solid rgba(0,0,0,.08);vertical-align:top}.eli-tabela__th{text-align:left;font-weight:600;background:#00000008}.eli-tabela__th--ordenavel{padding:0}.eli-tabela__th--ordenavel .eli-tabela__th-botao{padding:10px 12px}.eli-tabela__th-botao{display:inline-flex;align-items:center;justify-content:flex-start;gap:8px;width:100%;background:transparent;border:none;font:inherit;color:inherit;cursor:pointer;text-align:left;transition:color .2s ease}.eli-tabela__th-botao:hover,.eli-tabela__th-botao:focus-visible{color:#0f172ad9}.eli-tabela__th-botao:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px}.eli-tabela__th-botao--ativo{color:#2563ebf2}.eli-tabela__th-texto{flex:1;min-width:0;white-space:nowrap}.eli-tabela__th-icone{flex-shrink:0}.eli-tabela__th-icone--oculto{opacity:0}.eli-tabela__tr:last-child .eli-tabela__td{border-bottom:none}.eli-tabela__td--clicavel{cursor:pointer}.eli-tabela__td--clicavel:hover{background:#00000008}.eli-tabela--erro{border:1px solid rgba(220,53,69,.35);border-radius:12px;padding:12px}.eli-tabela--carregando{border:1px dashed rgba(0,0,0,.25);border-radius:12px;padding:12px;opacity:.8}.eli-tabela__erro-titulo{font-weight:700;margin-bottom:4px}.eli-tabela__erro-mensagem{opacity:.9}.eli-tabela--vazio{border:1px dashed rgba(0,0,0,.25);border-radius:12px;padding:12px;opacity:.8}.eli-tabela__th--acoes{text-align:right;white-space:nowrap}.eli-tabela__td--acoes{white-space:nowrap;overflow:visible}.eli-tabela__acoes-container{display:flex;justify-content:flex-end;position:relative;z-index:1}.eli-tabela__acoes-container--aberto{z-index:200}.eli-tabela__cabecalho{width:100%;box-sizing:border-box;display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-bottom:12px;flex-wrap:wrap;--eli-tabela-cabecalho-controle-altura: 34px;--eli-tabela-cabecalho-controle-radius: 8px}.eli-tabela__acoes-cabecalho{display:inline-flex;gap:8px;flex-wrap:wrap}.eli-tabela__acoes-cabecalho-botao{display:inline-flex;align-items:center;gap:6px;height:var(--eli-tabela-cabecalho-controle-altura);padding:0 14px;border-radius:var(--eli-tabela-cabecalho-controle-radius);border:none;background:#2563eb1f;color:#2563ebf2;font-size:.875rem;font-weight:500;line-height:1;cursor:pointer;transition:background-color .2s ease,color .2s ease}.eli-tabela__acoes-cabecalho-botao:hover,.eli-tabela__acoes-cabecalho-botao:focus-visible{background:#2563eb33}.eli-tabela__acoes-cabecalho-botao:focus-visible{outline:2px solid rgba(37,99,235,.35);outline-offset:2px}.eli-tabela__acoes-cabecalho-icone{display:inline-block}.eli-tabela__acoes-cabecalho-rotulo{line-height:1}.eli-tabela__acoes-toggle{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:9999px;border:none;background:transparent;color:#0f172ab8;cursor:pointer;transition:background-color .2s ease,color .2s ease}.eli-tabela__acoes-toggle-icone{display:block}.eli-tabela__acoes-toggle:hover,.eli-tabela__acoes-toggle:focus-visible{background-color:#0f172a14;color:#0f172af2}.eli-tabela__acoes-toggle:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px}.eli-tabela__acoes-toggle:disabled{cursor:default;color:#94a3b8cc;background:transparent}.eli-tabela__acoes-menu{min-width:180px;padding:6px 0;margin:0;list-style:none;background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:10px;box-shadow:0 12px 30px #0f172a2e;z-index:1000}.eli-tabela__acoes-item{margin:0}.eli-tabela__acoes-item-botao{display:flex;align-items:center;gap:8px;width:100%;padding:8px 12px;border:none;background:transparent;font-size:.9rem;cursor:pointer;transition:background-color .2s ease}.eli-tabela__acoes-item-botao:hover,.eli-tabela__acoes-item-botao:focus-visible{background-color:#0f172a0f}.eli-tabela__acoes-item-botao:focus-visible{outline:2px solid currentColor;outline-offset:-2px}.eli-tabela__acoes-item-icone{flex-shrink:0}.eli-tabela__acoes-item-texto{flex:1;text-align:left}.eli-tabela__th--expander,.eli-tabela__td--expander{width:42px;padding:6px 8px;text-align:center;vertical-align:middle}.eli-tabela__expander-botao{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:9999px;border:none;background:transparent;color:#0f172ab8;cursor:pointer;transition:background-color .2s ease,color .2s ease}.eli-tabela__expander-botao:hover,.eli-tabela__expander-botao:focus-visible{background-color:#0f172a14;color:#0f172af2}.eli-tabela__expander-botao:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px}.eli-tabela__expander-botao--ativo{background-color:#0f172a0f;color:#0f172af2}.eli-tabela__td--detalhes{padding:12px}.eli-tabela__tr--detalhes .eli-tabela__td{border-bottom:1px solid rgba(0,0,0,.08)}.eli-tabela__detalhes{display:grid;gap:10px;padding-left:4px}.eli-tabela__detalhe{display:grid;grid-template-columns:180px 1fr;gap:10px;align-items:start}.eli-tabela__detalhe-rotulo{font-weight:600;color:#0f172ad9}.eli-tabela__detalhe-valor{min-width:0}@media(max-width:720px){.eli-tabela__detalhe{grid-template-columns:1fr}}.eli-entrada__prefixo[data-v-77cbf216],.eli-entrada__sufixo[data-v-77cbf216]{opacity:.75;font-size:.9em;white-space:nowrap}.eli-entrada__prefixo[data-v-77cbf216]{margin-right:6px}.eli-entrada__sufixo[data-v-77cbf216]{margin-left:6px}.eli-data-hora[data-v-1bfd1be8]{width:100%} diff --git a/dist/eli-vue.es.js b/dist/eli-vue.es.js index 12f8629..c6fc228 100644 --- a/dist/eli-vue.es.js +++ b/dist/eli-vue.es.js @@ -1,4 +1,4 @@ -import { defineComponent as H, createBlock as z, openBlock as i, mergeProps as me, withCtx as ee, renderSlot as $e, computed as V, ref as B, createElementBlock as g, createCommentVNode as te, createSlots as Je, createVNode as M, createTextVNode as ke, toDisplayString as j, Fragment as le, renderList as pe, resolveComponent as x, createElementVNode as _, h as Be, watch as fe, withDirectives as ra, withKeys as sa, vModelText as ia, normalizeStyle as Te, resolveDynamicComponent as De, normalizeClass as be, withModifiers as ce, Teleport as ua, onMounted as da, onBeforeUnmount as ca } from "vue"; +import { defineComponent as H, createBlock as z, openBlock as i, mergeProps as me, withCtx as ee, renderSlot as ye, computed as k, ref as T, createElementBlock as y, createCommentVNode as te, createSlots as Je, createVNode as B, createTextVNode as ke, toDisplayString as j, Fragment as le, renderList as pe, resolveComponent as x, createElementVNode as E, h as Be, watch as fe, withDirectives as ra, withKeys as sa, vModelText as ia, normalizeStyle as Te, resolveDynamicComponent as De, normalizeClass as be, withModifiers as ce, Teleport as ua, onMounted as da, onBeforeUnmount as ca } from "vue"; import { VBtn as pa } from "vuetify/components/VBtn"; import { VBadge as ma } from "vuetify/components/VBadge"; import { VCheckbox as fa } from "vuetify/components/VCheckbox"; @@ -6,10 +6,10 @@ import { VIcon as va } from "vuetify/components/VIcon"; import { VRadio as ba } from "vuetify/components/VRadio"; import { VRadioGroup as ha } from "vuetify/components/VRadioGroup"; import { VSelect as ga } from "vuetify/components/VSelect"; -import { VTextField as Ae } from "vuetify/components/VTextField"; -import { VTextarea as $a } from "vuetify/components/VTextarea"; +import { VTextField as Me } from "vuetify/components/VTextField"; +import { VTextarea as ya } from "vuetify/components/VTextarea"; import { VCard as We, VCardTitle as Ze, VCardText as Ge, VCardActions as Xe } from "vuetify/components/VCard"; -import { VContainer as ya } from "vuetify/components/VGrid"; +import { VContainer as $a } from "vuetify/components/VGrid"; const Ca = H({ name: "EliBotao", inheritAttrs: !1, @@ -37,11 +37,11 @@ const Ca = H({ } }), Y = (e, a) => { const o = e.__vccOpts || e; - for (const [r, s] of a) - o[r] = s; + for (const [l, s] of a) + o[l] = s; return o; }; -function _a(e, a, o, r, s, f) { +function Ea(e, a, o, l, s, v) { return i(), z(pa, me({ color: e.color, variant: e.variant, @@ -50,15 +50,15 @@ function _a(e, a, o, r, s, f) { loading: e.loading }, e.$attrs, { class: "eli-botao text-none pt-1" }), { default: ee(() => [ - $e(e.$slots, "default") + ye(e.$slots, "default") ]), _: 3 }, 16, ["color", "variant", "size", "disabled", "loading"]); } -const Ke = /* @__PURE__ */ Y(Ca, [["render", _a]]), Oe = { +const Ke = /* @__PURE__ */ Y(Ca, [["render", Ea]]), Oe = { suave: "4px", pill: "10px" -}, Ea = H({ +}, _a = H({ name: "EliBadge", inheritAttrs: !1, props: { @@ -97,13 +97,13 @@ const Ke = /* @__PURE__ */ Y(Ca, [["render", _a]]), Oe = { } }, setup(e) { - const a = V(() => e.radius in Oe ? Oe[e.radius] : e.radius), o = V(() => e.dot || e.badge !== void 0 ? e.visible : !1), r = V(() => ({ + const a = k(() => e.radius in Oe ? Oe[e.radius] : e.radius), o = k(() => e.dot || e.badge !== void 0 ? e.visible : !1), l = k(() => ({ "--eli-badge-radius": a.value })); - return { showBadge: o, badgeStyle: r }; + return { showBadge: o, badgeStyle: l }; } }); -function ka(e, a, o, r, s, f) { +function ka(e, a, o, l, s, v) { return e.showBadge ? (i(), z(ma, me({ key: 0, color: e.color @@ -117,12 +117,12 @@ function ka(e, a, o, r, s, f) { class: "eli-badge" }), { default: ee(() => [ - $e(e.$slots, "default", {}, void 0, !0) + ye(e.$slots, "default", {}, void 0, !0) ]), _: 3 - }, 16, ["color", "location", "offset-x", "offset-y", "dot", "content", "style"])) : $e(e.$slots, "default", { key: 1 }, void 0, !0); + }, 16, ["color", "location", "offset-x", "offset-y", "dot", "content", "style"])) : ye(e.$slots, "default", { key: 1 }, void 0, !0); } -const Ie = /* @__PURE__ */ Y(Ea, [["render", ka], ["__scopeId", "data-v-371c8db4"]]); +const Pe = /* @__PURE__ */ Y(_a, [["render", ka], ["__scopeId", "data-v-371c8db4"]]); function Da(e) { return e.replace(/\D+/g, ""); } @@ -137,22 +137,22 @@ function Va(e) { const a = wa(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 Pe(e) { +function Ie(e) { return e.replace(/\D+/g, ""); } function Qe(e) { const a = e.replace(/[^\d,]/g, ""), o = a.split(","); return o.length > 2 ? o[0] + "," + o.slice(1).join("") : a; } -function Aa(e) { +function Ma(e) { return Qe(e.replace(/%/g, "")); } -function Ma(e) { - const a = Pe(e); +function Aa(e) { + const a = Ie(e); return a ? (parseInt(a, 10) / 100).toFixed(2).replace(".", ",").replace(/\B(?=(\d{3})+(?!\d))/g, ".") : ""; } function Ba(e) { - const a = Pe(e).slice(0, 8); + const a = Ie(e).slice(0, 8); return a.length <= 5 ? a : a.replace(/^(\d{5})(\d{1,3})$/, "$1-$2"); } const Ta = H({ @@ -198,12 +198,12 @@ const Ta = H({ }, emits: ["update:modelValue", "change", "focus", "blur"], setup(e, { emit: a, attrs: o }) { - const r = B(!1), s = B(!1), f = V({ + const l = T(!1), s = T(!1), v = k({ get: () => e.modelValue, set: (D) => { a("update:modelValue", D), a("change", D); } - }), t = V( + }), t = k( () => [ "text", "password", @@ -218,80 +218,80 @@ const Ta = H({ "porcentagem", "cep" ].includes(e.type) - ), n = V( + ), n = k( () => e.type === "password" ? s.value ? "text" : "password" : "text" - ), m = V(() => { + ), f = k(() => { if (e.type === "telefone") return "tel"; if (e.type === "porcentagem") return "decimal"; if (e.type.startsWith("numerico")) return "numeric"; - }), l = V( - () => e.error ? "error" : r.value ? e.color : void 0 + }), r = k( + () => e.error ? "error" : l.value ? e.color : void 0 ); - function c(D) { - const y = D.target; - let v = y.value; + function p(D) { + const $ = D.target; + let d = $.value; switch (e.type) { case "numericoInteiro": - v = Pe(v); + d = Ie(d); break; case "numericoDecimal": - v = Qe(v); + d = Qe(d); break; case "numericoMoeda": - v = Ma(v); + d = Aa(d); break; case "porcentagem": - v = Aa(v); + d = Ma(d); break; case "telefone": - v = Va(v); + d = Va(d); break; case "cpfCnpj": - v = Sa(v); + d = Sa(d); break; case "cep": - v = Ba(v); + d = Ba(d); break; } - y.value = v, a("update:modelValue", v), a("change", v); + $.value = d, a("update:modelValue", d), a("change", d); } - function $() { + function C() { s.value = !s.value; } - const I = V(() => (e.options || []).map((D) => { + const P = k(() => (e.options || []).map((D) => { if (D && typeof D == "object" && "value" in D) { - const v = D.value; + const d = D.value; return { - label: D.label ?? String(v), - value: v, + label: D.label ?? String(d), + value: d, disabled: D.disabled }; } - const y = D; - return { label: String(y), value: y }; + const $ = D; + return { label: String($), value: $ }; })); return { attrs: o, - value: f, + value: v, isTextLike: t, inputHtmlType: n, - inputMode: m, - internalColor: l, + inputMode: f, + internalColor: r, showPassword: s, - togglePassword: $, - onInput: c, + togglePassword: C, + onInput: p, onFocus: () => a("focus"), onBlur: () => a("blur"), - computedItems: I + computedItems: P }; } -}), Ia = { class: "eli-input" }, Pa = { +}), Pa = { class: "eli-input" }, Ia = { key: 4, class: "checkbox-group" }; -function Oa(e, a, o, r, s, f) { - return i(), g("div", Ia, [ - e.isTextLike ? (i(), z(Ae, me({ +function Oa(e, a, o, l, s, v) { + return i(), y("div", Pa, [ + e.isTextLike ? (i(), z(Me, me({ key: 0, modelValue: e.value, "onUpdate:modelValue": a[0] || (a[0] = (t) => e.value = t), @@ -317,7 +317,7 @@ function Oa(e, a, o, r, s, f) { e.type === "password" && e.showPasswordToggle ? { name: "append-inner", fn: ee(() => [ - M(va, { + B(va, { class: "cursor-pointer", onClick: e.togglePassword }, { @@ -329,7 +329,7 @@ function Oa(e, a, o, r, s, f) { ]), key: "0" } : void 0 - ]), 1040, ["modelValue", "type", "label", "placeholder", "disabled", "clearable", "error", "error-messages", "hint", "persistent-hint", "density", "variant", "color", "inputmode", "suffix", "onFocus", "onBlur", "onInput"])) : e.type === "textarea" ? (i(), z($a, me({ + ]), 1040, ["modelValue", "type", "label", "placeholder", "disabled", "clearable", "error", "error-messages", "hint", "persistent-hint", "density", "variant", "color", "inputmode", "suffix", "onFocus", "onBlur", "onInput"])) : e.type === "textarea" ? (i(), z(ya, me({ key: 1, modelValue: e.value, "onUpdate:modelValue": a[1] || (a[1] = (t) => e.value = t), @@ -364,15 +364,15 @@ function Oa(e, a, o, r, s, f) { row: e.row }, { default: ee(() => [ - (i(!0), g(le, null, pe(e.computedItems, (t) => (i(), z(ba, { + (i(!0), y(le, null, pe(e.computedItems, (t) => (i(), z(ba, { key: String(t.value), label: t.label, value: t.value }, null, 8, ["label", "value"]))), 128)) ]), _: 1 - }, 8, ["modelValue", "row"])) : e.type === "checkbox" ? (i(), g("div", Pa, [ - (i(!0), g(le, null, pe(e.computedItems, (t) => (i(), z(fa, { + }, 8, ["modelValue", "row"])) : e.type === "checkbox" ? (i(), y("div", Ia, [ + (i(!0), y(le, null, pe(e.computedItems, (t) => (i(), z(fa, { key: String(t.value), modelValue: e.value, "onUpdate:modelValue": a[4] || (a[4] = (n) => e.value = n), @@ -387,40 +387,40 @@ const xe = /* @__PURE__ */ Y(Ta, [["render", Oa], ["__scopeId", "data-v-756cb549 name: "EliOlaMundo", components: { EliBotao: Ke, - EliBadge: Ie, + EliBadge: Pe, EliInput: xe }, setup() { - const e = B(""), a = B([]), o = B(""), r = B(""), s = B(""), f = B(""), t = B(""), n = B(""), m = B(""), l = B(""), c = B(""), $ = B(null), I = B([]); + const e = T(""), a = T([]), o = T(""), l = T(""), s = T(""), v = T(""), t = T(""), n = T(""), f = T(""), r = T(""), p = T(""), C = T(null), P = T([]); return { nome: e, email: n, - documento: c, + documento: p, estado: a, - telefone: r, - mensagem: m, - senha: l, - cor: $, - habilidades: I, + telefone: l, + mensagem: f, + senha: r, + cor: C, + habilidades: P, idade: s, - altura: f, + altura: v, cep: o, valor: t }; } }), qa = { class: "grid-example" }; -function La(e, a, o, r, s, f) { - const t = x("EliBadge"), n = x("EliInput"), m = x("EliBotao"); - return i(), z(ya, null, { +function Fa(e, a, o, l, s, v) { + const t = x("EliBadge"), n = x("EliInput"), f = x("EliBotao"); + return i(), z($a, null, { default: ee(() => [ - M(We, { + B(We, { class: "mx-auto", max_width: "400" }, { default: ee(() => [ - M(Ze, null, { + B(Ze, null, { default: ee(() => [ - M(t, { + B(t, { badge: "Novo", "offset-x": "-15", location: "right center" @@ -433,51 +433,51 @@ function La(e, a, o, r, s, f) { ]), _: 1 }), - M(Ge, null, { + B(Ge, null, { default: ee(() => [ a[15] || (a[15] = ke(" Este é um componente de exemplo integrado com Vuetify. ", -1)), - _("div", qa, [ - M(n, { + E("div", qa, [ + B(n, { modelValue: e.nome, - "onUpdate:modelValue": a[0] || (a[0] = (l) => e.nome = l), + "onUpdate:modelValue": a[0] || (a[0] = (r) => e.nome = r), label: "Nome", placeholder: "Digite o nome", density: "compact" }, null, 8, ["modelValue"]), - M(n, { + B(n, { modelValue: e.idade, - "onUpdate:modelValue": a[1] || (a[1] = (l) => e.idade = l), + "onUpdate:modelValue": a[1] || (a[1] = (r) => e.idade = r), type: "numericoInteiro", label: "Idade", density: "default" }, null, 8, ["modelValue"]), - M(n, { + B(n, { modelValue: e.altura, - "onUpdate:modelValue": a[2] || (a[2] = (l) => e.altura = l), + "onUpdate:modelValue": a[2] || (a[2] = (r) => e.altura = r), type: "numericoDecimal", label: "Altura", density: "comfortable" }, null, 8, ["modelValue"]), - M(n, { + B(n, { modelValue: e.valor, - "onUpdate:modelValue": a[3] || (a[3] = (l) => e.valor = l), + "onUpdate:modelValue": a[3] || (a[3] = (r) => e.valor = r), type: "numericoMoeda", label: "Valor" }, null, 8, ["modelValue"]), - M(n, { + B(n, { modelValue: e.telefone, - "onUpdate:modelValue": a[4] || (a[4] = (l) => e.telefone = l), + "onUpdate:modelValue": a[4] || (a[4] = (r) => e.telefone = r), type: "telefone", label: "Telefone" }, null, 8, ["modelValue"]), - M(n, { + B(n, { modelValue: e.cep, - "onUpdate:modelValue": a[5] || (a[5] = (l) => e.cep = l), + "onUpdate:modelValue": a[5] || (a[5] = (r) => e.cep = r), type: "cep", label: "CEP", placeholder: "00000-000" }, null, 8, ["modelValue"]), - M(n, { + B(n, { type: "select", label: "Estado", options: [ @@ -485,58 +485,58 @@ function La(e, a, o, r, s, f) { { label: "Rio de Janeiro", value: "RJ" } ], modelValue: e.estado, - "onUpdate:modelValue": a[6] || (a[6] = (l) => e.estado = l), + "onUpdate:modelValue": a[6] || (a[6] = (r) => e.estado = r), multiple: "" }, null, 8, ["modelValue"]), - M(n, { + B(n, { modelValue: e.documento, - "onUpdate:modelValue": a[7] || (a[7] = (l) => e.documento = l), + "onUpdate:modelValue": a[7] || (a[7] = (r) => e.documento = r), type: "cpfCnpj", label: "CPF / CNPJ" }, null, 8, ["modelValue"]), - M(n, { + B(n, { modelValue: e.email, - "onUpdate:modelValue": a[8] || (a[8] = (l) => e.email = l), + "onUpdate:modelValue": a[8] || (a[8] = (r) => e.email = r), label: "Email", placeholder: "email@exemplo.com" }, null, 8, ["modelValue"]), - M(n, { + B(n, { modelValue: e.senha, - "onUpdate:modelValue": a[9] || (a[9] = (l) => e.senha = l), + "onUpdate:modelValue": a[9] || (a[9] = (r) => e.senha = r), label: "Senha", type: "password", showPasswordToggle: !0, placeholder: "Digite sua senha" }, null, 8, ["modelValue"]), - M(n, { + B(n, { type: "textarea", modelValue: e.mensagem, - "onUpdate:modelValue": a[10] || (a[10] = (l) => e.mensagem = l), + "onUpdate:modelValue": a[10] || (a[10] = (r) => e.mensagem = r), label: "Mensagem", rows: 5 }, null, 8, ["modelValue"]), - M(n, { + B(n, { type: "radio", modelValue: e.cor, - "onUpdate:modelValue": a[11] || (a[11] = (l) => e.cor = l), + "onUpdate:modelValue": a[11] || (a[11] = (r) => e.cor = r), label: "Cor favorita", options: [ { label: "Azul", value: "azul" }, { label: "Verde", value: "verde" } ] }, null, 8, ["modelValue"]), - M(n, { + B(n, { type: "checkbox", modelValue: e.habilidades, - "onUpdate:modelValue": a[12] || (a[12] = (l) => e.habilidades = l), + "onUpdate:modelValue": a[12] || (a[12] = (r) => e.habilidades = r), options: [ { label: "Vue", value: "vue" }, { label: "React", value: "react" } ] }, null, 8, ["modelValue"]), - M(n, { + B(n, { modelValue: e.nome, - "onUpdate:modelValue": a[13] || (a[13] = (l) => e.nome = l), + "onUpdate:modelValue": a[13] || (a[13] = (r) => e.nome = r), label: "Nome", error: !0, "error-messages": ["Obrigatório"] @@ -545,9 +545,9 @@ function La(e, a, o, r, s, f) { ]), _: 1 }), - M(Xe, null, { + B(Xe, null, { default: ee(() => [ - M(m, { + B(f, { color: "primary", variant: "elevated", block: "" @@ -567,9 +567,9 @@ function La(e, a, o, r, s, f) { _: 1 }); } -const Fa = /* @__PURE__ */ Y(Na, [["render", La]]), ja = H({ +const La = /* @__PURE__ */ Y(Na, [["render", Fa]]), ja = H({ name: "EliCartao", - components: { EliBadge: Ie }, + components: { EliBadge: Pe }, inheritAttrs: !1, props: { /** Título de fallback caso o slot `titulo` não seja usado. */ @@ -596,7 +596,7 @@ const Fa = /* @__PURE__ */ Y(Na, [["render", La]]), ja = H({ clicar: (e) => !0 }, setup(e, { emit: a }) { - const o = V(() => e.status), r = V(() => { + const o = k(() => e.status), l = k(() => { switch (e.status) { case "novo": return "primary"; @@ -607,40 +607,40 @@ const Fa = /* @__PURE__ */ Y(Na, [["render", La]]), ja = H({ case "cancelado": return "error"; } - }), s = V(() => `eli-cartao--${e.status}`); - function f() { + }), s = k(() => `eli-cartao--${e.status}`); + function v() { a("clicar", e.status); } return { rotuloStatus: o, - corStatus: r, + corStatus: l, classeStatus: s, - onClick: f + onClick: v }; } }), Ua = { class: "eli-cartao__titulo-texto" }, za = { class: "eli-cartao__status" }; -function Ha(e, a, o, r, s, f) { +function Ha(e, a, o, l, s, v) { const t = x("EliBadge"); return i(), z(We, me({ class: ["eli-cartao", e.classeStatus], variant: e.variant }, e.$attrs), { default: ee(() => [ - M(Ze, { class: "eli-cartao__titulo" }, { + B(Ze, { class: "eli-cartao__titulo" }, { default: ee(() => [ - _("div", Ua, [ - $e(e.$slots, "titulo", {}, () => [ + E("div", Ua, [ + ye(e.$slots, "titulo", {}, () => [ ke(j(e.titulo), 1) ], !0) ]), - _("div", za, [ - M(t, { + E("div", za, [ + B(t, { badge: e.rotuloStatus, radius: "pill", color: e.corStatus }, { default: ee(() => [...a[0] || (a[0] = [ - _("span", null, null, -1) + E("span", null, null, -1) ])]), _: 1 }, 8, ["badge", "color"]) @@ -648,9 +648,9 @@ function Ha(e, a, o, r, s, f) { ]), _: 3 }), - M(Ge, { class: "eli-cartao__conteudo" }, { + B(Ge, { class: "eli-cartao__conteudo" }, { default: ee(() => [ - $e(e.$slots, "default", {}, void 0, !0) + ye(e.$slots, "default", {}, void 0, !0) ]), _: 3 }), @@ -659,7 +659,7 @@ function Ha(e, a, o, r, s, f) { class: "eli-cartao__acoes" }, { default: ee(() => [ - $e(e.$slots, "acoes", {}, void 0, !0) + ye(e.$slots, "acoes", {}, void 0, !0) ]), _: 3 })) : te("", !0) @@ -668,443 +668,6 @@ function Ha(e, a, o, r, s, f) { }, 16, ["variant", "class"]); } const Ya = /* @__PURE__ */ Y(ja, [["render", Ha], ["__scopeId", "data-v-6c492bd9"]]); -function Ra(e) { - return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; -} -var Ve = { exports: {} }, Ja = Ve.exports, Ne; -function Wa() { - return Ne || (Ne = 1, (function(e, a) { - (function(o, r) { - e.exports = r(); - })(Ja, (function() { - var o = 1e3, r = 6e4, s = 36e5, f = "millisecond", t = "second", n = "minute", m = "hour", l = "day", c = "week", $ = "month", I = "quarter", D = "year", y = "date", v = "Invalid Date", T = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, C = /\[([^\]]+)]|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, k = { 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(E) { - var p = ["th", "st", "nd", "rd"], u = E % 100; - return "[" + E + (p[(u - 20) % 10] || p[u] || p[0]) + "]"; - } }, oe = function(E, p, u) { - var h = String(E); - return !h || h.length >= p ? E : "" + Array(p + 1 - h.length).join(u) + E; - }, ie = { s: oe, z: function(E) { - var p = -E.utcOffset(), u = Math.abs(p), h = Math.floor(u / 60), d = u % 60; - return (p <= 0 ? "+" : "-") + oe(h, 2, "0") + ":" + oe(d, 2, "0"); - }, m: function E(p, u) { - if (p.date() < u.date()) return -E(u, p); - var h = 12 * (u.year() - p.year()) + (u.month() - p.month()), d = p.clone().add(h, $), S = u - d < 0, w = p.clone().add(h + (S ? -1 : 1), $); - return +(-(h + (u - d) / (S ? d - w : w - d)) || 0); - }, a: function(E) { - return E < 0 ? Math.ceil(E) || 0 : Math.floor(E); - }, p: function(E) { - return { M: $, y: D, w: c, d: l, D: y, h: m, m: n, s: t, ms: f, Q: I }[E] || String(E || "").toLowerCase().replace(/s$/, ""); - }, u: function(E) { - return E === void 0; - } }, re = "en", se = {}; - se[re] = k; - var ve = "$isDayjsObject", X = function(E) { - return E instanceof ge || !(!E || !E[ve]); - }, he = function E(p, u, h) { - var d; - if (!p) return re; - if (typeof p == "string") { - var S = p.toLowerCase(); - se[S] && (d = S), u && (se[S] = u, d = S); - var w = p.split("-"); - if (!d && w.length > 1) return E(w[0]); - } else { - var N = p.name; - se[N] = p, d = N; - } - return !h && d && (re = d), d || !h && re; - }, G = function(E, p) { - if (X(E)) return E.clone(); - var u = typeof p == "object" ? p : {}; - return u.date = E, u.args = arguments, new ge(u); - }, P = ie; - P.l = he, P.i = X, P.w = function(E, p) { - return G(E, { locale: p.$L, utc: p.$u, x: p.$x, $offset: p.$offset }); - }; - var ge = (function() { - function E(u) { - this.$L = he(u.locale, null, !0), this.parse(u), this.$x = this.$x || u.x || {}, this[ve] = !0; - } - var p = E.prototype; - return p.parse = function(u) { - this.$d = (function(h) { - var d = h.date, S = h.utc; - if (d === null) return /* @__PURE__ */ new Date(NaN); - if (P.u(d)) return /* @__PURE__ */ new Date(); - if (d instanceof Date) return new Date(d); - if (typeof d == "string" && !/Z$/i.test(d)) { - var w = d.match(T); - if (w) { - var N = w[2] - 1 || 0, F = (w[7] || "0").substring(0, 3); - return S ? new Date(Date.UTC(w[1], N, w[3] || 1, w[4] || 0, w[5] || 0, w[6] || 0, F)) : new Date(w[1], N, w[3] || 1, w[4] || 0, w[5] || 0, w[6] || 0, F); - } - } - return new Date(d); - })(u), this.init(); - }, p.init = function() { - var u = this.$d; - this.$y = u.getFullYear(), this.$M = u.getMonth(), this.$D = u.getDate(), this.$W = u.getDay(), this.$H = u.getHours(), this.$m = u.getMinutes(), this.$s = u.getSeconds(), this.$ms = u.getMilliseconds(); - }, p.$utils = function() { - return P; - }, p.isValid = function() { - return this.$d.toString() !== v; - }, p.isSame = function(u, h) { - var d = G(u); - return this.startOf(h) <= d && d <= this.endOf(h); - }, p.isAfter = function(u, h) { - return G(u) < this.startOf(h); - }, p.isBefore = function(u, h) { - return this.endOf(h) < G(u); - }, p.$g = function(u, h, d) { - return P.u(u) ? this[h] : this.set(d, u); - }, p.unix = function() { - return Math.floor(this.valueOf() / 1e3); - }, p.valueOf = function() { - return this.$d.getTime(); - }, p.startOf = function(u, h) { - var d = this, S = !!P.u(h) || h, w = P.p(u), N = function(O, L) { - var R = P.w(d.$u ? Date.UTC(d.$y, L, O) : new Date(d.$y, L, O), d); - return S ? R : R.endOf(l); - }, F = function(O, L) { - return P.w(d.toDate()[O].apply(d.toDate("s"), (S ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(L)), d); - }, W = this.$W, ae = this.$M, Z = this.$D, b = "set" + (this.$u ? "UTC" : ""); - switch (w) { - case D: - return S ? N(1, 0) : N(31, 11); - case $: - return S ? N(1, ae) : N(0, ae + 1); - case c: - var A = this.$locale().weekStart || 0, q = (W < A ? W + 7 : W) - A; - return N(S ? Z - q : Z + (6 - q), ae); - case l: - case y: - return F(b + "Hours", 0); - case m: - return F(b + "Minutes", 1); - case n: - return F(b + "Seconds", 2); - case t: - return F(b + "Milliseconds", 3); - default: - return this.clone(); - } - }, p.endOf = function(u) { - return this.startOf(u, !1); - }, p.$set = function(u, h) { - var d, S = P.p(u), w = "set" + (this.$u ? "UTC" : ""), N = (d = {}, d[l] = w + "Date", d[y] = w + "Date", d[$] = w + "Month", d[D] = w + "FullYear", d[m] = w + "Hours", d[n] = w + "Minutes", d[t] = w + "Seconds", d[f] = w + "Milliseconds", d)[S], F = S === l ? this.$D + (h - this.$W) : h; - if (S === $ || S === D) { - var W = this.clone().set(y, 1); - W.$d[N](F), W.init(), this.$d = W.set(y, Math.min(this.$D, W.daysInMonth())).$d; - } else N && this.$d[N](F); - return this.init(), this; - }, p.set = function(u, h) { - return this.clone().$set(u, h); - }, p.get = function(u) { - return this[P.p(u)](); - }, p.add = function(u, h) { - var d, S = this; - u = Number(u); - var w = P.p(h), N = function(ae) { - var Z = G(S); - return P.w(Z.date(Z.date() + Math.round(ae * u)), S); - }; - if (w === $) return this.set($, this.$M + u); - if (w === D) return this.set(D, this.$y + u); - if (w === l) return N(1); - if (w === c) return N(7); - var F = (d = {}, d[n] = r, d[m] = s, d[t] = o, d)[w] || 1, W = this.$d.getTime() + u * F; - return P.w(W, this); - }, p.subtract = function(u, h) { - return this.add(-1 * u, h); - }, p.format = function(u) { - var h = this, d = this.$locale(); - if (!this.isValid()) return d.invalidDate || v; - var S = u || "YYYY-MM-DDTHH:mm:ssZ", w = P.z(this), N = this.$H, F = this.$m, W = this.$M, ae = d.weekdays, Z = d.months, b = d.meridiem, A = function(L, R, K, Q) { - return L && (L[R] || L(h, S)) || K[R].slice(0, Q); - }, q = function(L) { - return P.s(N % 12 || 12, L, "0"); - }, O = b || function(L, R, K) { - var Q = L < 12 ? "AM" : "PM"; - return K ? Q.toLowerCase() : Q; - }; - return S.replace(C, (function(L, R) { - return R || (function(K) { - switch (K) { - case "YY": - return String(h.$y).slice(-2); - case "YYYY": - return P.s(h.$y, 4, "0"); - case "M": - return W + 1; - case "MM": - return P.s(W + 1, 2, "0"); - case "MMM": - return A(d.monthsShort, W, Z, 3); - case "MMMM": - return A(Z, W); - case "D": - return h.$D; - case "DD": - return P.s(h.$D, 2, "0"); - case "d": - return String(h.$W); - case "dd": - return A(d.weekdaysMin, h.$W, ae, 2); - case "ddd": - return A(d.weekdaysShort, h.$W, ae, 3); - case "dddd": - return ae[h.$W]; - case "H": - return String(N); - case "HH": - return P.s(N, 2, "0"); - case "h": - return q(1); - case "hh": - return q(2); - case "a": - return O(N, F, !0); - case "A": - return O(N, F, !1); - case "m": - return String(F); - case "mm": - return P.s(F, 2, "0"); - case "s": - return String(h.$s); - case "ss": - return P.s(h.$s, 2, "0"); - case "SSS": - return P.s(h.$ms, 3, "0"); - case "Z": - return w; - } - return null; - })(L) || w.replace(":", ""); - })); - }, p.utcOffset = function() { - return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); - }, p.diff = function(u, h, d) { - var S, w = this, N = P.p(h), F = G(u), W = (F.utcOffset() - this.utcOffset()) * r, ae = this - F, Z = function() { - return P.m(w, F); - }; - switch (N) { - case D: - S = Z() / 12; - break; - case $: - S = Z(); - break; - case I: - S = Z() / 3; - break; - case c: - S = (ae - W) / 6048e5; - break; - case l: - S = (ae - W) / 864e5; - break; - case m: - S = ae / s; - break; - case n: - S = ae / r; - break; - case t: - S = ae / o; - break; - default: - S = ae; - } - return d ? S : P.a(S); - }, p.daysInMonth = function() { - return this.endOf($).$D; - }, p.$locale = function() { - return se[this.$L]; - }, p.locale = function(u, h) { - if (!u) return this.$L; - var d = this.clone(), S = he(u, h, !0); - return S && (d.$L = S), d; - }, p.clone = function() { - return P.w(this.$d, this); - }, p.toDate = function() { - return new Date(this.valueOf()); - }, p.toJSON = function() { - return this.isValid() ? this.toISOString() : null; - }, p.toISOString = function() { - return this.$d.toISOString(); - }, p.toString = function() { - return this.$d.toUTCString(); - }, E; - })(), Ce = ge.prototype; - return G.prototype = Ce, [["$ms", f], ["$s", t], ["$m", n], ["$H", m], ["$W", l], ["$M", $], ["$y", D], ["$D", y]].forEach((function(E) { - Ce[E[1]] = function(p) { - return this.$g(p, E[0], E[1]); - }; - })), G.extend = function(E, p) { - return E.$i || (E(p, ge, G), E.$i = !0), G; - }, G.locale = he, G.isDayjs = X, G.unix = function(E) { - return G(1e3 * E); - }, G.en = se[re], G.Ls = se, G.p = {}, G; - })); - })(Ve)), Ve.exports; -} -var Za = Wa(); -const we = /* @__PURE__ */ Ra(Za), Ga = H({ - name: "EliDataHora", - inheritAttrs: !1, - props: { - /** - * Valor em ISO 8601: - * - com offset (ex.: `2026-01-09T13:15:00-03:00`) - * - ou UTC absoluto (ex.: `2026-01-09T16:15:00Z`) - */ - modelValue: { - type: String, - default: null - }, - /** - * Define o tipo de entrada. - * - `dataHora`: usa `datetime-local` - * - `data`: usa `date` - */ - modo: { - type: String, - default: "dataHora" - }, - /** Rótulo exibido no v-text-field (Vuetify). */ - rotulo: { - type: String, - default: "Data e hora" - }, - /** Placeholder do input. */ - placeholder: { - type: String, - default: "" - }, - /** Desabilita a interação. */ - desabilitado: { - type: Boolean, - default: !1 - }, - /** Se true, mostra ícone para limpar o valor (Vuetify clearable). */ - limpavel: { - type: Boolean, - default: !1 - }, - /** Estado de erro (visual). */ - erro: { - type: Boolean, - default: !1 - }, - /** Mensagens de erro. */ - mensagensErro: { - type: [String, Array], - default: () => [] - }, - /** Texto de apoio. */ - dica: { - type: String, - default: "" - }, - /** Mantém a dica sempre visível. */ - dicaPersistente: { - type: Boolean, - default: !1 - }, - /** Densidade do campo (Vuetify). */ - densidade: { - type: String, - default: "comfortable" - }, - /** Variante do v-text-field (Vuetify). */ - variante: { - type: String, - default: "outlined" - }, - /** - * Valor mínimo permitido. - * ISO 8601 (offset ou `Z`). - */ - min: { - // ISO 8601 (offset ou Z) - type: String, - default: void 0 - }, - /** - * Valor máximo permitido. - * ISO 8601 (offset ou `Z`). - */ - max: { - // ISO 8601 (offset ou Z) - type: String, - default: void 0 - } - }, - emits: { - /** v-model padrão. */ - "update:modelValue": (e) => !0, - /** Alias para consumidores que querem um evento semântico. */ - alterar: (e) => !0, - foco: () => !0, - desfoco: () => !0 - }, - setup(e, { emit: a, attrs: o }) { - const r = V( - () => e.modo === "data" ? "date" : "datetime-local" - ); - function s(l) { - return e.modo === "data" ? we(l).format("YYYY-MM-DD") : we(l).format("YYYY-MM-DDTHH:mm"); - } - function f(l) { - return e.modo === "data" ? we(`${l}T00:00`).format() : we(l).format(); - } - const t = V({ - get: () => e.modelValue ? s(e.modelValue) : "", - set: (l) => { - const c = l && l.length > 0 ? l : null; - if (!c) { - a("update:modelValue", null), a("alterar", null); - return; - } - const $ = f(c); - a("update:modelValue", $), a("alterar", $); - } - }), n = V(() => { - if (e.min) - return s(e.min); - }), m = V(() => { - if (e.max) - return s(e.max); - }); - return { attrs: o, valor: t, emit: a, minLocal: n, maxLocal: m, tipoInput: r }; - } -}), Xa = { class: "eli-data-hora" }; -function Ka(e, a, o, r, s, f) { - return i(), g("div", Xa, [ - M(Ae, me({ - modelValue: e.valor, - "onUpdate:modelValue": a[0] || (a[0] = (t) => e.valor = t), - type: e.tipoInput, - label: e.rotulo, - placeholder: e.placeholder, - disabled: e.desabilitado, - clearable: e.limpavel, - error: e.erro, - "error-messages": e.mensagensErro, - hint: e.dica, - "persistent-hint": e.dicaPersistente, - density: e.densidade, - variant: e.variante, - min: e.minLocal, - max: e.maxLocal - }, e.attrs, { - onFocus: a[1] || (a[1] = (t) => e.emit("foco")), - onBlur: a[2] || (a[2] = (t) => e.emit("desfoco")) - }), null, 16, ["modelValue", "type", "label", "placeholder", "disabled", "clearable", "error", "error-messages", "hint", "persistent-hint", "density", "variant", "min", "max"]) - ]); -} -const Qa = /* @__PURE__ */ Y(Ga, [["render", Ka], ["__scopeId", "data-v-71afabb6"]]); var ea = ((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))(ea || {}); /** * @license lucide-vue-next v0.563.0 - ISC @@ -1112,7 +675,7 @@ var ea = ((e) => (e[e.sucesso = 200] = "sucesso", e[e.erroConhecido = 400] = "er * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const xa = (e) => { +const Ra = (e) => { for (const a in e) if (a.startsWith("aria-") || a === "role" || a === "title") return !0; @@ -1124,30 +687,30 @@ const xa = (e) => { * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const qe = (e) => e === ""; +const Ne = (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 et = (...e) => e.filter((a, o, r) => !!a && a.trim() !== "" && r.indexOf(a) === o).join(" ").trim(); +const Ja = (...e) => e.filter((a, o, l) => !!a && a.trim() !== "" && l.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 Le = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(); +const qe = (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 at = (e) => e.replace( +const Wa = (e) => e.replace( /^([A-Z])|[\s-_]+(\w)/g, - (a, o, r) => r ? r.toUpperCase() : o.toLowerCase() + (a, o, l) => l ? l.toUpperCase() : o.toLowerCase() ); /** * @license lucide-vue-next v0.563.0 - ISC @@ -1155,8 +718,8 @@ const at = (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 tt = (e) => { - const a = at(e); +const Za = (e) => { + const a = Wa(e); return a.charAt(0).toUpperCase() + a.slice(1); }; /** @@ -1165,7 +728,7 @@ const tt = (e) => { * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -var Ee = { +var _e = { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, @@ -1182,33 +745,33 @@ var Ee = { * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const ot = ({ +const Ga = ({ name: e, iconNode: a, absoluteStrokeWidth: o, - "absolute-stroke-width": r, + "absolute-stroke-width": l, strokeWidth: s, - "stroke-width": f, - size: t = Ee.width, - color: n = Ee.stroke, - ...m -}, { slots: l }) => Be( + "stroke-width": v, + size: t = _e.width, + color: n = _e.stroke, + ...f +}, { slots: r }) => Be( "svg", { - ...Ee, - ...m, + ..._e, + ...f, width: t, height: t, stroke: n, - "stroke-width": qe(o) || qe(r) || o === !0 || r === !0 ? Number(s || f || Ee["stroke-width"]) * 24 / Number(t) : s || f || Ee["stroke-width"], - class: et( + "stroke-width": Ne(o) || Ne(l) || o === !0 || l === !0 ? Number(s || v || _e["stroke-width"]) * 24 / Number(t) : s || v || _e["stroke-width"], + class: Ja( "lucide", - m.class, - ...e ? [`lucide-${Le(tt(e))}-icon`, `lucide-${Le(e)}`] : ["lucide-icon"] + f.class, + ...e ? [`lucide-${qe(Za(e))}-icon`, `lucide-${qe(e)}`] : ["lucide-icon"] ), - ...!l.default && !xa(m) && { "aria-hidden": "true" } + ...!r.default && !Ra(f) && { "aria-hidden": "true" } }, - [...a.map((c) => Be(...c)), ...l.default ? [l.default()] : []] + [...a.map((p) => Be(...p)), ...r.default ? [r.default()] : []] ); /** * @license lucide-vue-next v0.563.0 - ISC @@ -1216,15 +779,15 @@ const ot = ({ * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const ye = (e, a) => (o, { slots: r, attrs: s }) => Be( - ot, +const $e = (e, a) => (o, { slots: l, attrs: s }) => Be( + Ga, { ...s, ...o, iconNode: a, name: e }, - r + l ); /** * @license lucide-vue-next v0.563.0 - ISC @@ -1232,7 +795,7 @@ const ye = (e, a) => (o, { slots: r, attrs: s }) => Be( * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const Fe = ye("arrow-down", [ +const Fe = $e("arrow-down", [ ["path", { d: "M12 5v14", key: "s699le" }], ["path", { d: "m19 12-7 7-7-7", key: "1idqje" }] ]); @@ -1242,7 +805,7 @@ const Fe = ye("arrow-down", [ * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const je = ye("arrow-up", [ +const Le = $e("arrow-up", [ ["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }], ["path", { d: "M12 19V5", key: "x0mq9r" }] ]); @@ -1252,7 +815,7 @@ const je = ye("arrow-up", [ * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const Ue = ye("chevron-down", [ +const je = $e("chevron-down", [ ["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }] ]); /** @@ -1261,7 +824,7 @@ const Ue = ye("chevron-down", [ * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const ze = ye("chevron-right", [ +const Ue = $e("chevron-right", [ ["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }] ]); /** @@ -1270,7 +833,7 @@ const ze = ye("chevron-right", [ * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const nt = ye("ellipsis-vertical", [ +const Xa = $e("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" }] @@ -1281,12 +844,12 @@ const nt = ye("ellipsis-vertical", [ * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const lt = ye("search", [ +const Ka = $e("search", [ ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }], ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }] -]), rt = H({ +]), Qa = H({ name: "EliTabelaCaixaDeBusca", - components: { Search: lt }, + components: { Search: Ka }, props: { modelo: { type: String, @@ -1300,24 +863,24 @@ const lt = ye("search", [ } }, setup(e, { emit: a }) { - const o = B(e.modelo ?? ""); + const o = T(e.modelo ?? ""); fe( () => e.modelo, (s) => { s !== void 0 && s !== o.value && (o.value = s); } ); - function r() { + function l() { a("buscar", o.value.trim()); } - return { texto: o, emitirBusca: r }; + return { texto: o, emitirBusca: l }; } -}), st = { class: "eli-tabela__busca" }, it = { class: "eli-tabela__busca-input-wrapper" }; -function ut(e, a, o, r, s, f) { +}), xa = { class: "eli-tabela__busca" }, et = { class: "eli-tabela__busca-input-wrapper" }; +function at(e, a, o, l, s, v) { const t = x("Search"); - return i(), g("div", st, [ - _("div", it, [ - ra(_("input", { + return i(), y("div", xa, [ + E("div", et, [ + ra(E("input", { id: "eli-tabela-busca", "onUpdate:modelValue": a[0] || (a[0] = (n) => e.texto = n), type: "search", @@ -1327,14 +890,14 @@ function ut(e, a, o, r, s, f) { }, null, 544), [ [ia, e.texto] ]), - _("button", { + E("button", { type: "button", class: "eli-tabela__busca-botao", "aria-label": "Buscar", title: "Buscar", onClick: a[2] || (a[2] = (...n) => e.emitirBusca && e.emitirBusca(...n)) }, [ - M(t, { + B(t, { class: "eli-tabela__busca-botao-icone", size: 16, "stroke-width": 2, @@ -1344,9 +907,9 @@ function ut(e, a, o, r, s, f) { ]) ]); } -const dt = /* @__PURE__ */ Y(rt, [["render", ut], ["__scopeId", "data-v-341415d1"]]), ct = H({ +const tt = /* @__PURE__ */ Y(Qa, [["render", at], ["__scopeId", "data-v-341415d1"]]), ot = H({ name: "EliTabelaCabecalho", - components: { EliTabelaCaixaDeBusca: dt }, + components: { EliTabelaCaixaDeBusca: tt }, props: { exibirBusca: { type: Boolean, @@ -1375,40 +938,40 @@ const dt = /* @__PURE__ */ Y(rt, [["render", ut], ["__scopeId", "data-v-341415d1 } }, setup(e, { emit: a }) { - const o = V(() => e.acoesCabecalho.length > 0); - function r(f) { - a("buscar", f); + const o = k(() => e.acoesCabecalho.length > 0); + function l(v) { + a("buscar", v); } function s() { a("colunas"); } - return { temAcoesCabecalho: o, emitBuscar: r, emitColunas: s }; + return { temAcoesCabecalho: o, emitBuscar: l, emitColunas: s }; } -}), pt = { class: "eli-tabela__cabecalho" }, mt = { +}), nt = { class: "eli-tabela__cabecalho" }, lt = { key: 0, class: "eli-tabela__busca-grupo" -}, ft = { +}, rt = { key: 1, class: "eli-tabela__acoes-cabecalho" -}, vt = ["onClick"], bt = { class: "eli-tabela__acoes-cabecalho-rotulo" }; -function ht(e, a, o, r, s, f) { +}, st = ["onClick"], it = { class: "eli-tabela__acoes-cabecalho-rotulo" }; +function ut(e, a, o, l, s, v) { const t = x("EliTabelaCaixaDeBusca"); - return i(), g("div", pt, [ - e.exibirBusca ? (i(), g("div", mt, [ - e.exibirBotaoColunas ? (i(), g("button", { + return i(), y("div", nt, [ + e.exibirBusca ? (i(), y("div", lt, [ + e.exibirBotaoColunas ? (i(), y("button", { key: 0, type: "button", class: "eli-tabela__acoes-cabecalho-botao eli-tabela__acoes-cabecalho-botao--colunas", onClick: a[0] || (a[0] = (...n) => e.emitColunas && e.emitColunas(...n)) }, " Colunas ")) : te("", !0), - M(t, { + B(t, { modelo: e.valorBusca, onBuscar: e.emitBuscar }, null, 8, ["modelo", "onBuscar"]) ])) : te("", !0), - e.temAcoesCabecalho ? (i(), g("div", ft, [ - (i(!0), g(le, null, pe(e.acoesCabecalho, (n, m) => (i(), g("button", { - key: `${n.rotulo}-${m}`, + e.temAcoesCabecalho ? (i(), y("div", rt, [ + (i(!0), y(le, null, pe(e.acoesCabecalho, (n, f) => (i(), y("button", { + key: `${n.rotulo}-${f}`, type: "button", class: "eli-tabela__acoes-cabecalho-botao", style: Te(n.cor ? { backgroundColor: n.cor, color: "#fff" } : void 0), @@ -1420,12 +983,12 @@ function ht(e, a, o, r, s, f) { size: 16, "stroke-width": 2 })) : te("", !0), - _("span", bt, j(n.rotulo), 1) - ], 12, vt))), 128)) + E("span", it, j(n.rotulo), 1) + ], 12, st))), 128)) ])) : te("", !0) ]); } -const gt = /* @__PURE__ */ Y(ct, [["render", ht], ["__scopeId", "data-v-42938cb8"]]), $t = H({ +const dt = /* @__PURE__ */ Y(ot, [["render", ut], ["__scopeId", "data-v-42938cb8"]]), ct = H({ name: "EliTabelaEstados", props: { carregando: { @@ -1442,25 +1005,25 @@ const gt = /* @__PURE__ */ Y(ct, [["render", ht], ["__scopeId", "data-v-42938cb8 default: void 0 } } -}), yt = { +}), pt = { key: 0, class: "eli-tabela eli-tabela--carregando", "aria-busy": "true" -}, Ct = { +}, mt = { key: 1, class: "eli-tabela eli-tabela--erro", role: "alert" -}, _t = { class: "eli-tabela__erro-mensagem" }, Et = { +}, ft = { class: "eli-tabela__erro-mensagem" }, vt = { key: 2, class: "eli-tabela eli-tabela--vazio" }; -function kt(e, a, o, r, s, f) { - return e.carregando ? (i(), g("div", yt, " Carregando... ")) : e.erro ? (i(), g("div", Ct, [ - a[0] || (a[0] = _("div", { class: "eli-tabela__erro-titulo" }, "Erro", -1)), - _("div", _t, j(e.erro), 1) - ])) : (i(), g("div", Et, j(e.mensagemVazio ?? "Nenhum registro encontrado."), 1)); +function bt(e, a, o, l, s, v) { + return e.carregando ? (i(), y("div", pt, " Carregando... ")) : e.erro ? (i(), y("div", mt, [ + a[0] || (a[0] = E("div", { class: "eli-tabela__erro-titulo" }, "Erro", -1)), + E("div", ft, j(e.erro), 1) + ])) : (i(), y("div", vt, j(e.mensagemVazio ?? "Nenhum registro encontrado."), 1)); } -const Dt = /* @__PURE__ */ Y($t, [["render", kt]]), St = H({ +const ht = /* @__PURE__ */ Y(ct, [["render", bt]]), gt = H({ name: "EliTabelaDebug", props: { isDev: { @@ -1476,22 +1039,22 @@ const Dt = /* @__PURE__ */ Y($t, [["render", kt]]), St = H({ required: !0 } } -}), wt = { +}), yt = { 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 Vt(e, a, o, r, s, f) { - return e.isDev ? (i(), g("div", wt, [ - a[0] || (a[0] = _("div", null, [ - _("b", null, "EliTabela debug") +function $t(e, a, o, l, s, v) { + return e.isDev ? (i(), y("div", yt, [ + a[0] || (a[0] = E("div", null, [ + E("b", null, "EliTabela debug") ], -1)), - _("div", null, "menuAberto: " + j(e.menuAberto), 1), - _("div", null, "menuPos: top=" + j(e.menuPopupPos.top) + ", left=" + j(e.menuPopupPos.left), 1) + E("div", null, "menuAberto: " + j(e.menuAberto), 1), + E("div", null, "menuPos: top=" + j(e.menuPopupPos.top) + ", left=" + j(e.menuPopupPos.left), 1) ])) : te("", !0); } -const At = /* @__PURE__ */ Y(St, [["render", Vt]]), Mt = H({ +const Ct = /* @__PURE__ */ Y(gt, [["render", $t]]), Et = H({ name: "EliTabelaHead", - components: { ArrowUp: je, ArrowDown: Fe }, + components: { ArrowUp: Le, ArrowDown: Fe }, props: { colunas: { type: Array, @@ -1523,47 +1086,47 @@ const At = /* @__PURE__ */ Y(St, [["render", Vt]]), Mt = H({ function o(s) { return (s == null ? void 0 : s.coluna_ordem) !== void 0 && (s == null ? void 0 : s.coluna_ordem) !== null; } - function r(s) { + function l(s) { a("alternarOrdenacao", s); } return { - ArrowUp: je, + ArrowUp: Le, ArrowDown: Fe, isOrdenavel: o, - emitAlternarOrdenacao: r + emitAlternarOrdenacao: l }; } -}), Bt = { class: "eli-tabela__thead" }, Tt = { class: "eli-tabela__tr eli-tabela__tr--header" }, It = { +}), _t = { class: "eli-tabela__thead" }, kt = { class: "eli-tabela__tr eli-tabela__tr--header" }, Dt = { key: 0, class: "eli-tabela__th eli-tabela__th--expander", scope: "col" -}, Pt = ["onClick"], Ot = { class: "eli-tabela__th-texto" }, Nt = { +}, St = ["onClick"], wt = { class: "eli-tabela__th-texto" }, Vt = { key: 1, class: "eli-tabela__th-label" -}, qt = { +}, Mt = { key: 1, class: "eli-tabela__th eli-tabela__th--acoes", scope: "col" }; -function Lt(e, a, o, r, s, f) { +function At(e, a, o, l, s, v) { const t = x("ArrowUp"); - return i(), g("thead", Bt, [ - _("tr", Tt, [ - e.temColunasInvisiveis ? (i(), g("th", It)) : te("", !0), - (i(!0), g(le, null, pe(e.colunas, (n, m) => (i(), g("th", { - key: `th-${m}`, + return i(), y("thead", _t, [ + E("tr", kt, [ + e.temColunasInvisiveis ? (i(), y("th", Dt)) : te("", !0), + (i(!0), y(le, null, pe(e.colunas, (n, f) => (i(), y("th", { + key: `th-${f}`, class: be(["eli-tabela__th", [e.isOrdenavel(n) ? "eli-tabela__th--ordenavel" : void 0]]), scope: "col" }, [ - e.isOrdenavel(n) ? (i(), g("button", { + e.isOrdenavel(n) ? (i(), y("button", { key: 0, type: "button", class: be(["eli-tabela__th-botao", [ e.colunaOrdenacao === String(n.coluna_ordem) ? "eli-tabela__th-botao--ativo" : void 0 ]]), - onClick: (l) => e.emitAlternarOrdenacao(String(n.coluna_ordem)) + onClick: (r) => e.emitAlternarOrdenacao(String(n.coluna_ordem)) }, [ - _("span", Ot, j(n.rotulo), 1), + E("span", wt, j(n.rotulo), 1), e.colunaOrdenacao === String(n.coluna_ordem) ? (i(), z(De(e.direcaoOrdenacao === "asc" ? e.ArrowUp : e.ArrowDown), { key: 0, class: "eli-tabela__th-icone", @@ -1577,13 +1140,13 @@ function Lt(e, a, o, r, s, f) { "stroke-width": 2, "aria-hidden": "true" })) - ], 10, Pt)) : (i(), g("span", Nt, j(n.rotulo), 1)) + ], 10, St)) : (i(), y("span", Vt, j(n.rotulo), 1)) ], 2))), 128)), - e.temAcoes ? (i(), g("th", qt, " Ações ")) : te("", !0) + e.temAcoes ? (i(), y("th", Mt, " Ações ")) : te("", !0) ]) ]); } -const Ft = /* @__PURE__ */ Y(Mt, [["render", Lt]]), jt = H({ +const Bt = /* @__PURE__ */ Y(Et, [["render", At]]), Tt = H({ name: "EliTabelaCelulaTextoSimples", components: {}, props: { @@ -1598,17 +1161,17 @@ const Ft = /* @__PURE__ */ Y(Mt, [["render", Lt]]), jt = H({ setup({ dados: e }) { return { dados: e }; } -}), Ut = { key: 1 }; -function zt(e, a, o, r, s, f) { - var t, n, m; - return (t = e.dados) != null && t.acao ? (i(), g("button", { +}), Pt = { key: 1 }; +function It(e, a, o, l, s, v) { + var t, n, f; + return (t = e.dados) != null && t.acao ? (i(), y("button", { key: 0, type: "button", class: "eli-tabela__celula-link", - onClick: a[0] || (a[0] = ce((l) => e.dados.acao(), ["stop", "prevent"])) - }, j((n = e.dados) == null ? void 0 : n.texto), 1)) : (i(), g("span", Ut, j((m = e.dados) == null ? void 0 : m.texto), 1)); + onClick: a[0] || (a[0] = ce((r) => e.dados.acao(), ["stop", "prevent"])) + }, j((n = e.dados) == null ? void 0 : n.texto), 1)) : (i(), y("span", Pt, j((f = e.dados) == null ? void 0 : f.texto), 1)); } -const Ht = /* @__PURE__ */ Y(jt, [["render", zt], ["__scopeId", "data-v-7a629ffa"]]), Yt = H({ +const Ot = /* @__PURE__ */ Y(Tt, [["render", It], ["__scopeId", "data-v-7a629ffa"]]), Nt = H({ name: "EliTabelaCelulaTextoTruncado", props: { dados: { @@ -1618,22 +1181,22 @@ const Ht = /* @__PURE__ */ Y(jt, [["render", zt], ["__scopeId", "data-v-7a629ffa setup({ dados: e }) { return { dados: e }; } -}), Rt = ["title"], Jt = ["title"]; -function Wt(e, a, o, r, s, f) { - var t, n, m, l, c; - return (t = e.dados) != null && t.acao ? (i(), g("button", { +}), qt = ["title"], Ft = ["title"]; +function Lt(e, a, o, l, s, v) { + var t, n, f, r, p; + return (t = e.dados) != null && t.acao ? (i(), y("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] = ce(($) => e.dados.acao(), ["stop", "prevent"])) - }, j((m = e.dados) == null ? void 0 : m.texto), 9, Rt)) : (i(), g("span", { + onClick: a[0] || (a[0] = ce((C) => e.dados.acao(), ["stop", "prevent"])) + }, j((f = e.dados) == null ? void 0 : f.texto), 9, qt)) : (i(), y("span", { key: 1, class: "eli-tabela__texto-truncado", - title: (l = e.dados) == null ? void 0 : l.texto - }, j((c = e.dados) == null ? void 0 : c.texto), 9, Jt)); + title: (r = e.dados) == null ? void 0 : r.texto + }, j((p = e.dados) == null ? void 0 : p.texto), 9, Ft)); } -const Zt = /* @__PURE__ */ Y(Yt, [["render", Wt], ["__scopeId", "data-v-74854889"]]), Gt = H({ +const jt = /* @__PURE__ */ Y(Nt, [["render", Lt], ["__scopeId", "data-v-74854889"]]), Ut = H({ name: "EliTabelaCelulaNumero", components: {}, props: { @@ -1648,21 +1211,21 @@ const Zt = /* @__PURE__ */ Y(Yt, [["render", Wt], ["__scopeId", "data-v-74854889 setup({ dados: e }) { return { dados: e }; } -}), Xt = { key: 1 }; -function Kt(e, a, o, r, s, f) { - var t, n, m; - return (t = e.dados) != null && t.acao ? (i(), g("button", { +}), zt = { key: 1 }; +function Ht(e, a, o, l, s, v) { + var t, n, f; + return (t = e.dados) != null && t.acao ? (i(), y("button", { key: 0, type: "button", class: "eli-tabela__celula-link", - onClick: a[0] || (a[0] = ce((l) => e.dados.acao(), ["stop", "prevent"])) - }, j(String((n = e.dados) == null ? void 0 : n.numero).replace(".", ",")), 1)) : (i(), g("span", Xt, j(String((m = e.dados) == null ? void 0 : m.numero).replace(".", ",")), 1)); + onClick: a[0] || (a[0] = ce((r) => e.dados.acao(), ["stop", "prevent"])) + }, j(String((n = e.dados) == null ? void 0 : n.numero).replace(".", ",")), 1)) : (i(), y("span", zt, j(String((f = e.dados) == null ? void 0 : f.numero).replace(".", ",")), 1)); } -const Qt = /* @__PURE__ */ Y(Gt, [["render", Kt], ["__scopeId", "data-v-e7bac7ff"]]), xt = { - textoSimples: Ht, - textoTruncado: Zt, - numero: Qt -}, eo = H({ +const Yt = /* @__PURE__ */ Y(Ut, [["render", Ht], ["__scopeId", "data-v-e7bac7ff"]]), Rt = { + textoSimples: Ot, + textoTruncado: jt, + numero: Yt +}, Jt = H({ name: "EliTabelaCelula", props: { celula: { @@ -1672,14 +1235,14 @@ const Qt = /* @__PURE__ */ Y(Gt, [["render", Kt], ["__scopeId", "data-v-e7bac7ff } }, setup(e) { - const a = V(() => e.celula[0]), o = V(() => e.celula[1]), r = V(() => xt[a.value]), s = V(() => o.value); - return { Componente: r, dadosParaComponente: s }; + const a = k(() => e.celula[0]), o = k(() => e.celula[1]), l = k(() => Rt[a.value]), s = k(() => o.value); + return { Componente: l, dadosParaComponente: s }; } }); -function ao(e, a, o, r, s, f) { +function Wt(e, a, o, l, s, v) { return i(), z(De(e.Componente), { dados: e.dadosParaComponente }, null, 8, ["dados"]); } -const aa = /* @__PURE__ */ Y(eo, [["render", ao]]), to = H({ +const aa = /* @__PURE__ */ Y(Jt, [["render", Wt]]), Zt = H({ name: "EliTabelaDetalhesLinha", components: { EliTabelaCelula: aa }, props: { @@ -1692,31 +1255,31 @@ const aa = /* @__PURE__ */ Y(eo, [["render", ao]]), to = H({ required: !0 } } -}), oo = { class: "eli-tabela__detalhes" }, no = { class: "eli-tabela__detalhe-rotulo" }, lo = { class: "eli-tabela__detalhe-valor" }; -function ro(e, a, o, r, s, f) { +}), Gt = { class: "eli-tabela__detalhes" }, Xt = { class: "eli-tabela__detalhe-rotulo" }, Kt = { class: "eli-tabela__detalhe-valor" }; +function Qt(e, a, o, l, s, v) { const t = x("EliTabelaCelula"); - return i(), g("div", oo, [ - (i(!0), g(le, null, pe(e.colunasInvisiveis, (n, m) => (i(), g("div", { - key: `det-${m}-${n.rotulo}`, + return i(), y("div", Gt, [ + (i(!0), y(le, null, pe(e.colunasInvisiveis, (n, f) => (i(), y("div", { + key: `det-${f}-${n.rotulo}`, class: "eli-tabela__detalhe" }, [ - _("div", no, j(n.rotulo), 1), - _("div", lo, [ - M(t, { + E("div", Xt, j(n.rotulo), 1), + E("div", Kt, [ + B(t, { celula: n.celula(e.linha) }, null, 8, ["celula"]) ]) ]))), 128)) ]); } -const so = /* @__PURE__ */ Y(to, [["render", ro], ["__scopeId", "data-v-f1ee8d20"]]), io = H({ +const xt = /* @__PURE__ */ Y(Zt, [["render", Qt], ["__scopeId", "data-v-f1ee8d20"]]), eo = H({ name: "EliTabelaBody", components: { EliTabelaCelula: aa, - EliTabelaDetalhesLinha: so, - MoreVertical: nt, - ChevronRight: ze, - ChevronDown: Ue + EliTabelaDetalhesLinha: xt, + MoreVertical: Xa, + ChevronRight: Ue, + ChevronDown: je }, props: { colunas: { @@ -1762,97 +1325,97 @@ const so = /* @__PURE__ */ Y(to, [["render", ro], ["__scopeId", "data-v-f1ee8d20 }, setup() { return { - ChevronRight: ze, - ChevronDown: Ue + ChevronRight: Ue, + ChevronDown: je }; } -}), uo = { class: "eli-tabela__tbody" }, co = ["aria-expanded", "aria-label", "title", "onClick"], po = ["id", "disabled", "aria-expanded", "aria-controls", "aria-label", "title", "onClick"], mo = ["colspan"]; -function fo(e, a, o, r, s, f) { - const t = x("EliTabelaCelula"), n = x("MoreVertical"), m = x("EliTabelaDetalhesLinha"); - return i(), g("tbody", uo, [ - (i(!0), g(le, null, pe(e.linhas, (l, c) => { - var $, I, D, y, v, T; - return i(), g(le, { - key: `grp-${c}` +}), ao = { class: "eli-tabela__tbody" }, to = ["aria-expanded", "aria-label", "title", "onClick"], oo = ["id", "disabled", "aria-expanded", "aria-controls", "aria-label", "title", "onClick"], no = ["colspan"]; +function lo(e, a, o, l, s, v) { + const t = x("EliTabelaCelula"), n = x("MoreVertical"), f = x("EliTabelaDetalhesLinha"); + return i(), y("tbody", ao, [ + (i(!0), y(le, null, pe(e.linhas, (r, p) => { + var C, P, D, $, d, M; + return i(), y(le, { + key: `grp-${p}` }, [ - _("tr", { - class: be(["eli-tabela__tr", [c % 2 === 1 ? "eli-tabela__tr--zebra" : void 0]]) + E("tr", { + class: be(["eli-tabela__tr", [p % 2 === 1 ? "eli-tabela__tr--zebra" : void 0]]) }, [ - e.temColunasInvisiveis ? (i(), g("td", { + e.temColunasInvisiveis ? (i(), y("td", { class: "eli-tabela__td eli-tabela__td--expander", - key: `td-${c}-exp` + key: `td-${p}-exp` }, [ - _("button", { + E("button", { type: "button", - class: be(["eli-tabela__expander-botao", [($ = e.linhasExpandidas) != null && $[c] ? "eli-tabela__expander-botao--ativo" : void 0]]), - "aria-expanded": (I = e.linhasExpandidas) != null && I[c] ? "true" : "false", - "aria-label": (D = e.linhasExpandidas) != null && D[c] ? "Ocultar colunas ocultas" : "Mostrar colunas ocultas", - title: (y = e.linhasExpandidas) != null && y[c] ? "Ocultar detalhes" : "Mostrar detalhes", - onClick: ce((C) => e.alternarLinhaExpandida(c), ["stop"]) + class: be(["eli-tabela__expander-botao", [(C = e.linhasExpandidas) != null && C[p] ? "eli-tabela__expander-botao--ativo" : void 0]]), + "aria-expanded": (P = e.linhasExpandidas) != null && P[p] ? "true" : "false", + "aria-label": (D = e.linhasExpandidas) != null && D[p] ? "Ocultar colunas ocultas" : "Mostrar colunas ocultas", + title: ($ = e.linhasExpandidas) != null && $[p] ? "Ocultar detalhes" : "Mostrar detalhes", + onClick: ce((g) => e.alternarLinhaExpandida(p), ["stop"]) }, [ - (i(), z(De((v = e.linhasExpandidas) != null && v[c] ? e.ChevronDown : e.ChevronRight), { + (i(), z(De((d = e.linhasExpandidas) != null && d[p] ? e.ChevronDown : e.ChevronRight), { class: "eli-tabela__expander-icone", size: 16, "stroke-width": 2, "aria-hidden": "true" })) - ], 10, co) + ], 10, to) ])) : te("", !0), - (i(!0), g(le, null, pe(e.colunas, (C, k) => (i(), g("td", { - key: `td-${c}-${k}`, + (i(!0), y(le, null, pe(e.colunas, (g, S) => (i(), y("td", { + key: `td-${p}-${S}`, class: "eli-tabela__td" }, [ - M(t, { - celula: C.celula(l) + B(t, { + celula: g.celula(r) }, null, 8, ["celula"]) ]))), 128)), - e.temAcoes ? (i(), g("td", { + e.temAcoes ? (i(), y("td", { class: "eli-tabela__td eli-tabela__td--acoes", - key: `td-${c}-acoes` + key: `td-${p}-acoes` }, [ - _("div", { - class: be(["eli-tabela__acoes-container", [e.menuAberto === c ? "eli-tabela__acoes-container--aberto" : void 0]]) + E("div", { + class: be(["eli-tabela__acoes-container", [e.menuAberto === p ? "eli-tabela__acoes-container--aberto" : void 0]]) }, [ - _("button", { + E("button", { class: "eli-tabela__acoes-toggle", type: "button", - id: `eli-tabela-acoes-toggle-${c}`, - disabled: !e.possuiAcoes(c), + id: `eli-tabela-acoes-toggle-${p}`, + disabled: !e.possuiAcoes(p), "aria-haspopup": "menu", - "aria-expanded": e.menuAberto === c ? "true" : "false", - "aria-controls": e.possuiAcoes(c) ? `eli-tabela-acoes-menu-${c}` : void 0, - "aria-label": e.possuiAcoes(c) ? "Ações da linha" : "Nenhuma ação disponível", - title: e.possuiAcoes(c) ? "Ações" : "Nenhuma ação disponível", - onClick: ce((C) => e.toggleMenu(c, C), ["stop"]) + "aria-expanded": e.menuAberto === p ? "true" : "false", + "aria-controls": e.possuiAcoes(p) ? `eli-tabela-acoes-menu-${p}` : void 0, + "aria-label": e.possuiAcoes(p) ? "Ações da linha" : "Nenhuma ação disponível", + title: e.possuiAcoes(p) ? "Ações" : "Nenhuma ação disponível", + onClick: ce((g) => e.toggleMenu(p, g), ["stop"]) }, [ - M(n, { + B(n, { class: "eli-tabela__acoes-toggle-icone", size: 18, "stroke-width": 2 }) - ], 8, po) + ], 8, oo) ], 2) ])) : te("", !0) ], 2), - e.temColunasInvisiveis && ((T = e.linhasExpandidas) != null && T[c]) ? (i(), g("tr", { + e.temColunasInvisiveis && ((M = e.linhasExpandidas) != null && M[p]) ? (i(), y("tr", { key: 0, - class: be(["eli-tabela__tr eli-tabela__tr--detalhes", [c % 2 === 1 ? "eli-tabela__tr--zebra" : void 0]]) + class: be(["eli-tabela__tr eli-tabela__tr--detalhes", [p % 2 === 1 ? "eli-tabela__tr--zebra" : void 0]]) }, [ - _("td", { + E("td", { class: "eli-tabela__td eli-tabela__td--detalhes", colspan: (e.temColunasInvisiveis ? 1 : 0) + e.colunas.length + (e.temAcoes ? 1 : 0) }, [ - M(m, { - linha: l, + B(f, { + linha: r, colunasInvisiveis: e.colunasInvisiveis }, null, 8, ["linha", "colunasInvisiveis"]) - ], 8, mo) + ], 8, no) ], 2)) : te("", !0) ], 64); }), 128)) ]); } -const vo = /* @__PURE__ */ Y(io, [["render", fo]]), bo = H({ +const ro = /* @__PURE__ */ Y(eo, [["render", lo]]), so = H({ name: "EliTabelaMenuAcoes", props: { menuAberto: { @@ -1879,18 +1442,18 @@ const vo = /* @__PURE__ */ Y(io, [["render", fo]]), bo = H({ } }, setup(e, { emit: a, expose: o }) { - const r = B(null); - o({ menuEl: r }); - const s = V(() => e.acoes.length > 0); - function f(t) { + const l = T(null); + o({ menuEl: l }); + const s = k(() => e.acoes.length > 0); + function v(t) { e.linha && a("executar", { acao: t.acao, linha: e.linha }); } - return { menuEl: r, possuiAcoes: s, emitExecutar: f }; + return { menuEl: l, possuiAcoes: s, emitExecutar: v }; } -}), ho = ["id", "aria-labelledby"], go = ["aria-label", "title", "onClick"], $o = { class: "eli-tabela__acoes-item-texto" }; -function yo(e, a, o, r, s, f) { +}), io = ["id", "aria-labelledby"], uo = ["aria-label", "title", "onClick"], co = { class: "eli-tabela__acoes-item-texto" }; +function po(e, a, o, l, s, v) { return i(), z(ua, { to: "body" }, [ - e.menuAberto !== null && e.possuiAcoes ? (i(), g("ul", { + e.menuAberto !== null && e.possuiAcoes ? (i(), y("ul", { key: 0, id: `eli-tabela-acoes-menu-${e.menuAberto}`, ref: "menuEl", @@ -1904,12 +1467,12 @@ function yo(e, a, o, r, s, f) { zIndex: 999999 }) }, [ - (i(!0), g(le, null, pe(e.acoes, (t) => (i(), g("li", { + (i(!0), y(le, null, pe(e.acoes, (t) => (i(), y("li", { key: `acao-${e.menuAberto}-${t.indice}`, class: "eli-tabela__acoes-item", role: "none" }, [ - _("button", { + E("button", { type: "button", class: "eli-tabela__acoes-item-botao", style: Te({ color: t.acao.cor }), @@ -1923,13 +1486,13 @@ function yo(e, a, o, r, s, f) { size: 16, "stroke-width": 2 })), - _("span", $o, j(t.acao.rotulo), 1) - ], 12, go) + E("span", co, j(t.acao.rotulo), 1) + ], 12, uo) ]))), 128)) - ], 12, ho)) : te("", !0) + ], 12, io)) : te("", !0) ]); } -const Co = /* @__PURE__ */ Y(bo, [["render", yo]]), _o = H({ +const mo = /* @__PURE__ */ Y(so, [["render", po]]), fo = H({ name: "EliTabelaPaginacao", props: { pagina: { @@ -1951,89 +1514,89 @@ const Co = /* @__PURE__ */ Y(bo, [["render", yo]]), _o = H({ } }, setup(e, { emit: a }) { - const o = V(() => { - const l = e.maximoBotoes; - return typeof l == "number" && l >= 5 ? Math.floor(l) : 7; - }), r = V(() => { - const l = e.totalPaginas, c = e.pagina, $ = o.value, I = [], D = (k) => { - I.push({ - label: String(k), - pagina: k, - ativo: k === c + const o = k(() => { + const r = e.maximoBotoes; + return typeof r == "number" && r >= 5 ? Math.floor(r) : 7; + }), l = k(() => { + const r = e.totalPaginas, p = e.pagina, C = o.value, P = [], D = (S) => { + P.push({ + label: String(S), + pagina: S, + ativo: S === p }); - }, y = () => { - I.push({ label: "…", ehEllipsis: !0 }); + }, $ = () => { + P.push({ label: "…", ehEllipsis: !0 }); }; - if (l <= $) { - for (let k = 1; k <= l; k += 1) - D(k); - return I; + if (r <= C) { + for (let S = 1; S <= r; S += 1) + D(S); + return P; } - const v = Math.max(3, $ - 2); - let T = Math.max(2, c - Math.floor(v / 2)), C = T + v - 1; - C >= l && (C = l - 1, T = C - v + 1), D(1), T > 2 && y(); - for (let k = T; k <= C; k += 1) - D(k); - return C < l - 1 && y(), D(l), I; + const d = Math.max(3, C - 2); + let M = Math.max(2, p - Math.floor(d / 2)), g = M + d - 1; + g >= r && (g = r - 1, M = g - d + 1), D(1), M > 2 && $(); + for (let S = M; S <= g; S += 1) + D(S); + return g < r - 1 && $(), D(r), P; }); - function s(l) { - if (!l) + function s(r) { + if (!r) return; - const c = Math.min(Math.max(1, l), e.totalPaginas); - c !== e.pagina && a("alterar", c); + const p = Math.min(Math.max(1, r), e.totalPaginas); + p !== e.pagina && a("alterar", p); } - const f = V(() => e.pagina <= 1), t = V(() => e.pagina >= e.totalPaginas), n = V(() => e.pagina), m = V(() => e.totalPaginas); + const v = k(() => e.pagina <= 1), t = k(() => e.pagina >= e.totalPaginas), n = k(() => e.pagina), f = k(() => e.totalPaginas); return { - botoes: r, + botoes: l, irParaPagina: s, - anteriorDesabilitado: f, + anteriorDesabilitado: v, proximaDesabilitada: t, paginaAtual: n, - totalPaginasExibidas: m + totalPaginasExibidas: f }; } -}), Eo = { +}), vo = { key: 0, class: "eli-tabela__paginacao", role: "navigation", "aria-label": "Paginação de resultados" -}, ko = ["disabled"], Do = { +}, bo = ["disabled"], ho = { key: 0, class: "eli-tabela__pagina-ellipsis", "aria-hidden": "true" -}, So = ["disabled", "aria-current", "aria-label", "onClick"], wo = ["disabled"]; -function Vo(e, a, o, r, s, f) { - return e.totalPaginasExibidas > 1 ? (i(), g("nav", Eo, [ - _("button", { +}, go = ["disabled", "aria-current", "aria-label", "onClick"], yo = ["disabled"]; +function $o(e, a, o, l, s, v) { + return e.totalPaginasExibidas > 1 ? (i(), y("nav", vo, [ + E("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, ko), - (i(!0), g(le, null, pe(e.botoes, (t, n) => (i(), g(le, { + }, " << ", 8, bo), + (i(!0), y(le, null, pe(e.botoes, (t, n) => (i(), y(le, { key: `${t.label}-${n}` }, [ - t.ehEllipsis ? (i(), g("span", Do, j(t.label), 1)) : (i(), g("button", { + t.ehEllipsis ? (i(), y("span", ho, j(t.label), 1)) : (i(), y("button", { key: 1, type: "button", class: be(["eli-tabela__pagina-botao", t.ativo ? "eli-tabela__pagina-botao--ativo" : void 0]), disabled: t.ativo, "aria-current": t.ativo ? "page" : void 0, "aria-label": `Ir para página ${t.label}`, - onClick: (m) => e.irParaPagina(t.pagina) - }, j(t.label), 11, So)) + onClick: (f) => e.irParaPagina(t.pagina) + }, j(t.label), 11, go)) ], 64))), 128)), - _("button", { + E("button", { type: "button", class: "eli-tabela__pagina-botao", disabled: e.proximaDesabilitada, "aria-label": "Próxima página", onClick: a[1] || (a[1] = (t) => e.irParaPagina(e.paginaAtual + 1)) - }, " >> ", 8, wo) + }, " >> ", 8, yo) ])) : te("", !0); } -const Ao = /* @__PURE__ */ Y(_o, [["render", Vo], ["__scopeId", "data-v-5ca7a362"]]), He = "application/x-eli-tabela-coluna", Mo = H({ +const Co = /* @__PURE__ */ Y(fo, [["render", $o], ["__scopeId", "data-v-5ca7a362"]]), ze = "application/x-eli-tabela-coluna", Eo = H({ name: "EliTabelaModalColunas", props: { aberto: { @@ -2062,17 +1625,17 @@ const Ao = /* @__PURE__ */ Y(_o, [["render", Vo], ["__scopeId", "data-v-5ca7a362 } }, setup(e, { emit: a }) { - const o = B([]), r = B([]); + const o = T([]), l = T([]); function s() { var se, ve; - const y = e.rotulosColunas, v = (((se = e.configInicial.visiveis) == null ? void 0 : se.length) ?? 0) > 0 || (((ve = e.configInicial.invisiveis) == null ? void 0 : ve.length) ?? 0) > 0, T = new Set( + const $ = e.rotulosColunas, d = (((se = e.configInicial.visiveis) == null ? void 0 : se.length) ?? 0) > 0 || (((ve = e.configInicial.invisiveis) == null ? void 0 : ve.length) ?? 0) > 0, M = new Set( e.colunas.filter((X) => X.visivel === !1).map((X) => X.rotulo) - ), C = v ? new Set(e.configInicial.invisiveis ?? []) : T, k = y.filter((X) => !C.has(X)), oe = e.configInicial.visiveis ?? [], ie = new Set(k), re = []; + ), g = d ? new Set(e.configInicial.invisiveis ?? []) : M, S = $.filter((X) => !g.has(X)), oe = e.configInicial.visiveis ?? [], ie = new Set(S), re = []; for (const X of oe) ie.has(X) && re.push(X); - for (const X of k) + for (const X of S) re.includes(X) || re.push(X); - o.value = re, r.value = y.filter((X) => C.has(X)); + o.value = re, l.value = $.filter((X) => g.has(X)); } fe( () => [e.aberto, e.rotulosColunas, e.configInicial, e.colunas], @@ -2081,158 +1644,158 @@ const Ao = /* @__PURE__ */ Y(_o, [["render", Vo], ["__scopeId", "data-v-5ca7a362 }, { deep: !0, immediate: !0 } ); - function f() { + function v() { a("fechar"); } function t() { a("salvar", { visiveis: [...o.value], - invisiveis: [...r.value] + invisiveis: [...l.value] }); } - function n(y, v) { - var T, C; + function n($, d) { + var M, g; try { - (T = y.dataTransfer) == null || T.setData(He, JSON.stringify(v)), (C = y.dataTransfer) == null || C.setData("text/plain", v.rotulo), y.dataTransfer.effectAllowed = "move"; + (M = $.dataTransfer) == null || M.setData(ze, JSON.stringify(d)), (g = $.dataTransfer) == null || g.setData("text/plain", d.rotulo), $.dataTransfer.effectAllowed = "move"; } catch { } } - function m(y) { - var v; + function f($) { + var d; try { - const T = (v = y.dataTransfer) == null ? void 0 : v.getData(He); - if (!T) return null; - const C = JSON.parse(T); - return !C || typeof C.rotulo != "string" || C.origem !== "visiveis" && C.origem !== "invisiveis" ? null : C; + const M = (d = $.dataTransfer) == null ? void 0 : d.getData(ze); + if (!M) return null; + const g = JSON.parse(M); + return !g || typeof g.rotulo != "string" || g.origem !== "visiveis" && g.origem !== "invisiveis" ? null : g; } catch { return null; } } - function l(y) { - const v = y.origem === "visiveis" ? o.value : r.value, T = v.indexOf(y.rotulo); - T >= 0 && v.splice(T, 1); + function r($) { + const d = $.origem === "visiveis" ? o.value : l.value, M = d.indexOf($.rotulo); + M >= 0 && d.splice(M, 1); } - function c(y, v, T) { - const C = y === "visiveis" ? o.value : r.value, k = C.indexOf(v); - k >= 0 && C.splice(k, 1), T === null || T < 0 || T > C.length ? C.push(v) : C.splice(T, 0, v); + function p($, d, M) { + const g = $ === "visiveis" ? o.value : l.value, S = g.indexOf(d); + S >= 0 && g.splice(S, 1), M === null || M < 0 || M > g.length ? g.push(d) : g.splice(M, 0, d); } - function $(y, v, T, C) { - n(y, { rotulo: v, origem: T, index: C }); + function C($, d, M, g) { + n($, { rotulo: d, origem: M, index: g }); } - function I(y, v, T) { - const C = m(y); - if (C) - if (l(C), c(v, C.rotulo, T), v === "visiveis") { - const k = r.value.indexOf(C.rotulo); - k >= 0 && r.value.splice(k, 1); + function P($, d, M) { + const g = f($); + if (g) + if (r(g), p(d, g.rotulo, M), d === "visiveis") { + const S = l.value.indexOf(g.rotulo); + S >= 0 && l.value.splice(S, 1); } else { - const k = o.value.indexOf(C.rotulo); - k >= 0 && o.value.splice(k, 1); + const S = o.value.indexOf(g.rotulo); + S >= 0 && o.value.splice(S, 1); } } - function D(y, v, T) { - const C = m(y); - if (C) - if (l(C), c(v, C.rotulo, null), v === "visiveis") { - const k = r.value.indexOf(C.rotulo); - k >= 0 && r.value.splice(k, 1); + function D($, d, M) { + const g = f($); + if (g) + if (r(g), p(d, g.rotulo, null), d === "visiveis") { + const S = l.value.indexOf(g.rotulo); + S >= 0 && l.value.splice(S, 1); } else { - const k = o.value.indexOf(C.rotulo); - k >= 0 && o.value.splice(k, 1); + const S = o.value.indexOf(g.rotulo); + S >= 0 && o.value.splice(S, 1); } } return { visiveisLocal: o, - invisiveisLocal: r, - emitFechar: f, + invisiveisLocal: l, + emitFechar: v, emitSalvar: t, - onDragStart: $, - onDropItem: I, + onDragStart: C, + onDropItem: P, onDropLista: D }; } -}), Bo = { +}), _o = { class: "eli-tabela-modal-colunas__modal", role: "dialog", "aria-modal": "true", "aria-label": "Configurar colunas" -}, To = { class: "eli-tabela-modal-colunas__header" }, Io = { class: "eli-tabela-modal-colunas__conteudo" }, Po = { class: "eli-tabela-modal-colunas__coluna" }, Oo = ["onDragstart", "onDrop"], No = { class: "eli-tabela-modal-colunas__item-texto" }, qo = { class: "eli-tabela-modal-colunas__coluna" }, Lo = ["onDragstart", "onDrop"], Fo = { class: "eli-tabela-modal-colunas__item-texto" }, jo = { class: "eli-tabela-modal-colunas__footer" }; -function Uo(e, a, o, r, s, f) { - return e.aberto ? (i(), g("div", { +}, ko = { class: "eli-tabela-modal-colunas__header" }, Do = { class: "eli-tabela-modal-colunas__conteudo" }, So = { class: "eli-tabela-modal-colunas__coluna" }, wo = ["onDragstart", "onDrop"], Vo = { class: "eli-tabela-modal-colunas__item-texto" }, Mo = { class: "eli-tabela-modal-colunas__coluna" }, Ao = ["onDragstart", "onDrop"], Bo = { class: "eli-tabela-modal-colunas__item-texto" }, To = { class: "eli-tabela-modal-colunas__footer" }; +function Po(e, a, o, l, s, v) { + return e.aberto ? (i(), y("div", { key: 0, class: "eli-tabela-modal-colunas__overlay", role: "presentation", onClick: a[9] || (a[9] = ce((...t) => e.emitFechar && e.emitFechar(...t), ["self"])) }, [ - _("div", Bo, [ - _("header", To, [ - a[10] || (a[10] = _("h3", { class: "eli-tabela-modal-colunas__titulo" }, "Colunas", -1)), - _("button", { + E("div", _o, [ + E("header", ko, [ + a[10] || (a[10] = E("h3", { class: "eli-tabela-modal-colunas__titulo" }, "Colunas", -1)), + E("button", { type: "button", class: "eli-tabela-modal-colunas__fechar", "aria-label": "Fechar", onClick: a[0] || (a[0] = (...t) => e.emitFechar && e.emitFechar(...t)) }, " × ") ]), - _("div", Io, [ - _("div", Po, [ - a[12] || (a[12] = _("div", { class: "eli-tabela-modal-colunas__coluna-titulo" }, "Visíveis", -1)), - _("div", { + E("div", Do, [ + E("div", So, [ + a[12] || (a[12] = E("div", { class: "eli-tabela-modal-colunas__coluna-titulo" }, "Visíveis", -1)), + E("div", { class: "eli-tabela-modal-colunas__lista", onDragover: a[2] || (a[2] = ce(() => { }, ["prevent"])), onDrop: a[3] || (a[3] = (t) => e.onDropLista(t, "visiveis", null)) }, [ - (i(!0), g(le, null, pe(e.visiveisLocal, (t, n) => (i(), g("div", { + (i(!0), y(le, null, pe(e.visiveisLocal, (t, n) => (i(), y("div", { key: `vis-${t}`, class: "eli-tabela-modal-colunas__item", draggable: "true", - onDragstart: (m) => e.onDragStart(m, t, "visiveis", n), + onDragstart: (f) => e.onDragStart(f, t, "visiveis", n), onDragover: a[1] || (a[1] = ce(() => { }, ["prevent"])), - onDrop: (m) => e.onDropItem(m, "visiveis", n) + onDrop: (f) => e.onDropItem(f, "visiveis", n) }, [ - a[11] || (a[11] = _("span", { + a[11] || (a[11] = E("span", { class: "eli-tabela-modal-colunas__item-handle", "aria-hidden": "true" }, "⋮⋮", -1)), - _("span", No, j(t), 1) - ], 40, Oo))), 128)) + E("span", Vo, j(t), 1) + ], 40, wo))), 128)) ], 32) ]), - _("div", qo, [ - a[14] || (a[14] = _("div", { class: "eli-tabela-modal-colunas__coluna-titulo" }, "Invisíveis", -1)), - _("div", { + E("div", Mo, [ + a[14] || (a[14] = E("div", { class: "eli-tabela-modal-colunas__coluna-titulo" }, "Invisíveis", -1)), + E("div", { class: "eli-tabela-modal-colunas__lista", onDragover: a[5] || (a[5] = ce(() => { }, ["prevent"])), onDrop: a[6] || (a[6] = (t) => e.onDropLista(t, "invisiveis", null)) }, [ - (i(!0), g(le, null, pe(e.invisiveisLocal, (t, n) => (i(), g("div", { + (i(!0), y(le, null, pe(e.invisiveisLocal, (t, n) => (i(), y("div", { key: `inv-${t}`, class: "eli-tabela-modal-colunas__item", draggable: "true", - onDragstart: (m) => e.onDragStart(m, t, "invisiveis", n), + onDragstart: (f) => e.onDragStart(f, t, "invisiveis", n), onDragover: a[4] || (a[4] = ce(() => { }, ["prevent"])), - onDrop: (m) => e.onDropItem(m, "invisiveis", n) + onDrop: (f) => e.onDropItem(f, "invisiveis", n) }, [ - a[13] || (a[13] = _("span", { + a[13] || (a[13] = E("span", { class: "eli-tabela-modal-colunas__item-handle", "aria-hidden": "true" }, "⋮⋮", -1)), - _("span", Fo, j(t), 1) - ], 40, Lo))), 128)) + E("span", Bo, j(t), 1) + ], 40, Ao))), 128)) ], 32) ]) ]), - _("footer", jo, [ - _("button", { + E("footer", To, [ + E("button", { type: "button", class: "eli-tabela-modal-colunas__botao eli-tabela-modal-colunas__botao--sec", onClick: a[7] || (a[7] = (...t) => e.emitFechar && e.emitFechar(...t)) }, " Cancelar "), - _("button", { + E("button", { type: "button", class: "eli-tabela-modal-colunas__botao eli-tabela-modal-colunas__botao--prim", onClick: a[8] || (a[8] = (...t) => e.emitSalvar && e.emitSalvar(...t)) @@ -2241,17 +1804,17 @@ function Uo(e, a, o, r, s, f) { ]) ])) : te("", !0); } -const zo = /* @__PURE__ */ Y(Mo, [["render", Uo], ["__scopeId", "data-v-b8f693ef"]]), Ho = "eli:tabela"; +const Io = /* @__PURE__ */ Y(Eo, [["render", Po], ["__scopeId", "data-v-b8f693ef"]]), Oo = "eli:tabela"; function ta(e) { - return `${Ho}:${e}:colunas`; + return `${Oo}:${e}:colunas`; } function oa(e) { if (!e || typeof e != "object") return { visiveis: [], invisiveis: [] }; - const a = e, o = Array.isArray(a.visiveis) ? a.visiveis.filter((s) => typeof s == "string") : [], r = Array.isArray(a.invisiveis) ? a.invisiveis.filter((s) => typeof s == "string") : []; - return { visiveis: o, invisiveis: r }; + const a = e, o = Array.isArray(a.visiveis) ? a.visiveis.filter((s) => typeof s == "string") : [], l = Array.isArray(a.invisiveis) ? a.invisiveis.filter((s) => typeof s == "string") : []; + return { visiveis: o, invisiveis: l }; } -function Ye(e) { +function He(e) { try { const a = window.localStorage.getItem(ta(e)); return a ? oa(JSON.parse(a)) : { visiveis: [], invisiveis: [] }; @@ -2259,24 +1822,24 @@ function Ye(e) { return { visiveis: [], invisiveis: [] }; } } -function Yo(e, a) { +function No(e, a) { try { window.localStorage.setItem(ta(e), JSON.stringify(oa(a))); } catch { } } -const Ro = H({ +const qo = H({ name: "EliTabela", inheritAttrs: !1, components: { - EliTabelaCabecalho: gt, - EliTabelaEstados: Dt, - EliTabelaDebug: At, - EliTabelaHead: Ft, - EliTabelaBody: vo, - EliTabelaMenuAcoes: Co, - EliTabelaPaginacao: Ao, - EliTabelaModalColunas: zo + EliTabelaCabecalho: dt, + EliTabelaEstados: ht, + EliTabelaDebug: Ct, + EliTabelaHead: Bt, + EliTabelaBody: ro, + EliTabelaMenuAcoes: mo, + EliTabelaPaginacao: Co, + EliTabelaModalColunas: Io }, props: { /** Configuração principal da tabela (colunas, consulta e ações) */ @@ -2286,24 +1849,24 @@ const Ro = H({ } }, setup(e) { - const o = B(!1), r = B(null), s = B([]), f = B(0), t = B([]), n = B(null), m = B(null), l = B({ top: 0, left: 0 }), c = B(""), $ = B(1), I = B(null), D = B("asc"), y = V(() => e.tabela), v = V(() => !!e.tabela.mostrarCaixaDeBusca), T = V(() => e.tabela.acoesTabela ?? []), C = V(() => T.value.length > 0), k = B(!1), oe = B( - Ye(e.tabela.nome) - ), ie = B({}), re = V(() => e.tabela.colunas.map((b) => b.rotulo)), se = V(() => { + const o = T(!1), l = T(null), s = T([]), v = T(0), t = T([]), n = T(null), f = T(null), r = T({ top: 0, left: 0 }), p = T(""), C = T(1), P = T(null), D = T("asc"), $ = k(() => e.tabela), d = k(() => !!e.tabela.mostrarCaixaDeBusca), M = k(() => e.tabela.acoesTabela ?? []), g = k(() => M.value.length > 0), S = T(!1), oe = T( + He(e.tabela.nome) + ), ie = T({}), re = k(() => e.tabela.colunas.map((b) => b.rotulo)), se = k(() => { var ne, ue; - const b = e.tabela.colunas, q = (((ne = oe.value.visiveis) == null ? void 0 : ne.length) ?? 0) > 0 || (((ue = oe.value.invisiveis) == null ? void 0 : ue.length) ?? 0) > 0 ? oe.value.invisiveis ?? [] : b.filter((U) => U.visivel === !1).map((U) => U.rotulo), O = new Set(q), L = b.filter((U) => O.has(U.rotulo)), R = q, K = /* @__PURE__ */ new Map(); - for (const U of L) + const b = e.tabela.colunas, q = (((ne = oe.value.visiveis) == null ? void 0 : ne.length) ?? 0) > 0 || (((ue = oe.value.invisiveis) == null ? void 0 : ue.length) ?? 0) > 0 ? oe.value.invisiveis ?? [] : b.filter((U) => U.visivel === !1).map((U) => U.rotulo), O = new Set(q), F = b.filter((U) => O.has(U.rotulo)), R = q, K = /* @__PURE__ */ new Map(); + for (const U of F) K.has(U.rotulo) || K.set(U.rotulo, U); const Q = []; for (const U of R) { const de = K.get(U); de && Q.push(de); } - for (const U of L) + for (const U of F) Q.includes(U) || Q.push(U); return Q; - }), ve = V(() => se.value.length > 0), X = V(() => { + }), ve = k(() => se.value.length > 0), X = k(() => { var U, de; - const b = e.tabela.colunas, A = re.value, q = (((U = oe.value.visiveis) == null ? void 0 : U.length) ?? 0) > 0 || (((de = oe.value.invisiveis) == null ? void 0 : de.length) ?? 0) > 0, O = q ? oe.value.invisiveis ?? [] : e.tabela.colunas.filter((J) => J.visivel === !1).map((J) => J.rotulo), L = new Set(O), R = A.filter((J) => !L.has(J)), K = new Set(R), Q = q ? oe.value.visiveis ?? [] : [], ne = []; + const b = e.tabela.colunas, A = re.value, q = (((U = oe.value.visiveis) == null ? void 0 : U.length) ?? 0) > 0 || (((de = oe.value.invisiveis) == null ? void 0 : de.length) ?? 0) > 0, O = q ? oe.value.invisiveis ?? [] : e.tabela.colunas.filter((J) => J.visivel === !1).map((J) => J.rotulo), F = new Set(O), R = A.filter((J) => !F.has(J)), K = new Set(R), Q = q ? oe.value.visiveis ?? [] : [], ne = []; for (const J of Q) K.has(J) && ne.push(J); for (const J of R) @@ -2314,13 +1877,13 @@ const Ro = H({ return ne.map((J) => ue.get(J)).filter(Boolean); }); function he() { - k.value = !0; + S.value = !0; } function G() { - k.value = !1; + S.value = !1; } - function P(b) { - oe.value = b, Yo(e.tabela.nome, b), k.value = !1, ie.value = {}; + function I(b) { + oe.value = b, No(e.tabela.nome, b), S.value = !1, ie.value = {}; } function ge(b) { const A = !!ie.value[b]; @@ -2329,61 +1892,61 @@ const Ro = H({ [b]: !A }; } - const Ce = V(() => { + const Ce = k(() => { const b = e.tabela.registros_por_consulta; return typeof b == "number" && b > 0 ? Math.floor(b) : 10; - }), E = V(() => { + }), _ = k(() => { const b = Ce.value; if (!b || b <= 0) return 1; - const A = f.value; + const A = v.value; return A ? Math.max(1, Math.ceil(A / b)) : 1; - }), p = V(() => (e.tabela.acoesLinha ?? []).length > 0); + }), m = k(() => (e.tabela.acoesLinha ?? []).length > 0); let u = 0; function h(b) { var Q, ne, ue, U, de, J; - const A = b.getBoundingClientRect(), q = 8, O = ((ue = (ne = (Q = m.value) == null ? void 0 : Q.menuEl) == null ? void 0 : ne.value) == null ? void 0 : ue.offsetHeight) ?? 0, L = ((J = (de = (U = m.value) == null ? void 0 : U.menuEl) == null ? void 0 : de.value) == null ? void 0 : J.offsetWidth) ?? 180; + const A = b.getBoundingClientRect(), q = 8, O = ((ue = (ne = (Q = f.value) == null ? void 0 : Q.menuEl) == null ? void 0 : ne.value) == null ? void 0 : ue.offsetHeight) ?? 0, F = ((J = (de = (U = f.value) == null ? void 0 : U.menuEl) == null ? void 0 : de.value) == null ? void 0 : J.offsetWidth) ?? 180; let R = A.bottom + q; - const K = A.right - L; - O && R + O > window.innerHeight - q && (R = A.top - q - O), l.value = { + const K = A.right - F; + O && R + O > window.innerHeight - q && (R = A.top - q - O), r.value = { top: Math.max(q, Math.round(R)), left: Math.max(q, Math.round(K)) }; } - function d(b) { + function c(b) { var q, O; if (n.value === null) return; const A = b.target; - (O = (q = m.value) == null ? void 0 : q.menuEl) != null && O.value && m.value.menuEl.value.contains(A) || (n.value = null); + (O = (q = f.value) == null ? void 0 : q.menuEl) != null && O.value && f.value.menuEl.value.contains(A) || (n.value = null); } - function S(b) { + function w(b) { if (b) { - if (I.value === b) { + if (P.value === b) { D.value = D.value === "asc" ? "desc" : "asc", Z(); return; } - I.value = b, D.value = "asc", $.value !== 1 ? $.value = 1 : Z(); + P.value = b, D.value = "asc", C.value !== 1 ? C.value = 1 : Z(); } } - function w(b) { - c.value !== b && (c.value = b, $.value !== 1 ? $.value = 1 : Z()); + function V(b) { + p.value !== b && (p.value = b, C.value !== 1 ? C.value = 1 : Z()); } function N(b) { - const A = Math.min(Math.max(1, b), E.value); - A !== $.value && ($.value = A); + const A = Math.min(Math.max(1, b), _.value); + A !== C.value && (C.value = A); } - function F(b) { + function L(b) { const A = e.tabela.acoesLinha ?? [], q = t.value[b] ?? []; - return A.map((O, L) => { + return A.map((O, F) => { const R = O.exibir === void 0 ? !0 : typeof O.exibir == "boolean" ? O.exibir : !1; return { acao: O, - indice: L, - visivel: q[L] ?? R + indice: F, + visivel: q[F] ?? R }; }).filter((O) => O.visivel); } function W(b) { - return F(b).length > 0; + return L(b).length > 0; } function ae(b, A) { if (!W(b)) return; @@ -2396,26 +1959,26 @@ const Ro = H({ q && (h(q), requestAnimationFrame(() => h(q))); } async function Z() { - var L, R; + var F, R; const b = ++u; - o.value = !0, r.value = null, t.value = [], n.value = null, ie.value = {}; + o.value = !0, l.value = null, t.value = [], n.value = null, ie.value = {}; const A = Math.max(1, Ce.value), O = { - offSet: ($.value - 1) * A, + offSet: (C.value - 1) * A, limit: A }; - c.value && (O.texto_busca = c.value), I.value && (O.coluna_ordem = I.value, O.direcao_ordem = D.value); + p.value && (O.texto_busca = p.value), P.value && (O.coluna_ordem = P.value, O.direcao_ordem = D.value); try { const K = e.tabela, Q = await K.consulta(O); if (b !== u) return; if (Q.cod !== ea.sucesso) { - s.value = [], f.value = 0, r.value = Q.mensagem; + s.value = [], v.value = 0, l.value = Q.mensagem; return; } - const ne = ((L = Q.valor) == null ? void 0 : L.valores) ?? [], ue = ((R = Q.valor) == null ? void 0 : R.quantidade) ?? ne.length; - s.value = ne, f.value = ue; + const ne = ((F = Q.valor) == null ? void 0 : F.valores) ?? [], ue = ((R = Q.valor) == null ? void 0 : R.quantidade) ?? ne.length; + s.value = ne, v.value = ue; const U = Math.max(1, Math.ceil((ue || 0) / A)); - if ($.value > U) { - $.value = U; + if (C.value > U) { + C.value = U; return; } const de = K.acoesLinha ?? []; @@ -2424,17 +1987,17 @@ const Ro = H({ return; } const J = ne.map( - () => de.map((_e) => _e.exibir === void 0 ? !0 : typeof _e.exibir == "boolean" ? _e.exibir : !1) + () => de.map((Ee) => Ee.exibir === void 0 ? !0 : typeof Ee.exibir == "boolean" ? Ee.exibir : !1) ); t.value = J; const na = await Promise.all( ne.map( - async (_e) => Promise.all( + async (Ee) => Promise.all( de.map(async (Se) => { if (Se.exibir === void 0) return !0; if (typeof Se.exibir == "boolean") return Se.exibir; try { - const la = Se.exibir(_e); + const la = Se.exibir(Ee); return !!await Promise.resolve(la); } catch { return !1; @@ -2446,81 +2009,81 @@ const Ro = H({ b === u && (t.value = na); } catch (K) { if (b !== u) return; - s.value = [], f.value = 0, r.value = K instanceof Error ? K.message : "Erro ao carregar dados."; + s.value = [], v.value = 0, l.value = K instanceof Error ? K.message : "Erro ao carregar dados."; } finally { b === u && (o.value = !1); } } return da(() => { - document.addEventListener("click", d), Z(); + document.addEventListener("click", c), Z(); }), ca(() => { - document.removeEventListener("click", d); + document.removeEventListener("click", c); }), fe( () => e.tabela.mostrarCaixaDeBusca, (b) => { - !b && c.value && (c.value = "", $.value !== 1 ? $.value = 1 : Z()); + !b && p.value && (p.value = "", C.value !== 1 ? C.value = 1 : Z()); } - ), fe($, (b, A) => { + ), fe(C, (b, A) => { b !== A && Z(); }), fe( () => e.tabela, () => { - n.value = null, I.value = null, D.value = "asc", c.value = "", k.value = !1, oe.value = Ye(e.tabela.nome), ie.value = {}, $.value !== 1 ? $.value = 1 : Z(); + n.value = null, P.value = null, D.value = "asc", p.value = "", S.value = !1, oe.value = He(e.tabela.nome), ie.value = {}, C.value !== 1 ? C.value = 1 : Z(); } ), fe( () => e.tabela.registros_por_consulta, () => { - $.value !== 1 ? $.value = 1 : Z(); + C.value !== 1 ? C.value = 1 : Z(); } ), fe(s, () => { n.value = null, ie.value = {}; }), { // state isDev: !1, - tabela: y, + tabela: $, carregando: o, - erro: r, + erro: l, linhas: s, - quantidade: f, + quantidade: v, menuAberto: n, - valorBusca: c, - paginaAtual: $, - colunaOrdenacao: I, + valorBusca: p, + paginaAtual: C, + colunaOrdenacao: P, direcaoOrdenacao: D, - totalPaginas: E, + totalPaginas: _, // computed - exibirBusca: v, - acoesCabecalho: T, - temAcoesCabecalho: C, - temAcoes: p, + exibirBusca: d, + acoesCabecalho: M, + temAcoesCabecalho: g, + temAcoes: m, colunasEfetivas: X, rotulosColunas: re, - modalColunasAberto: k, + modalColunasAberto: S, configColunas: oe, temColunasInvisiveis: ve, colunasInvisiveisEfetivas: se, linhasExpandidas: ie, abrirModalColunas: he, fecharModalColunas: G, - salvarModalColunas: P, + salvarModalColunas: I, alternarLinhaExpandida: ge, // actions - alternarOrdenacao: S, - atualizarBusca: w, + alternarOrdenacao: w, + atualizarBusca: V, irParaPagina: N, - acoesDisponiveisPorLinha: F, + acoesDisponiveisPorLinha: L, possuiAcoes: W, toggleMenu: ae, // popup - menuPopup: m, - menuPopupPos: l + menuPopup: f, + menuPopupPos: r }; } -}), Jo = { class: "eli-tabela" }, Wo = { class: "eli-tabela__table" }; -function Zo(e, a, o, r, s, f) { - const t = x("EliTabelaDebug"), n = x("EliTabelaEstados"), m = x("EliTabelaCabecalho"), l = x("EliTabelaModalColunas"), c = x("EliTabelaHead"), $ = x("EliTabelaBody"), I = x("EliTabelaMenuAcoes"), D = x("EliTabelaPaginacao"); - return i(), g("div", Jo, [ - M(t, { +}), Fo = { class: "eli-tabela" }, Lo = { class: "eli-tabela__table" }; +function jo(e, a, o, l, s, v) { + const t = x("EliTabelaDebug"), n = x("EliTabelaEstados"), f = x("EliTabelaCabecalho"), r = x("EliTabelaModalColunas"), p = x("EliTabelaHead"), C = x("EliTabelaBody"), P = x("EliTabelaMenuAcoes"), D = x("EliTabelaPaginacao"); + return i(), y("div", Fo, [ + B(t, { isDev: e.isDev, menuAberto: e.menuAberto, menuPopupPos: e.menuPopupPos @@ -2530,8 +2093,8 @@ function Zo(e, a, o, r, s, f) { carregando: e.carregando, erro: e.erro, mensagemVazio: e.tabela.mensagemVazio - }, null, 8, ["carregando", "erro", "mensagemVazio"])) : (i(), g(le, { key: 1 }, [ - e.exibirBusca || e.temAcoesCabecalho ? (i(), z(m, { + }, null, 8, ["carregando", "erro", "mensagemVazio"])) : (i(), y(le, { key: 1 }, [ + e.exibirBusca || e.temAcoesCabecalho ? (i(), z(f, { key: 0, exibirBusca: e.exibirBusca, valorBusca: e.valorBusca, @@ -2539,7 +2102,7 @@ function Zo(e, a, o, r, s, f) { onBuscar: e.atualizarBusca, onColunas: e.abrirModalColunas }, null, 8, ["exibirBusca", "valorBusca", "acoesCabecalho", "onBuscar", "onColunas"])) : te("", !0), - M(l, { + B(r, { aberto: e.modalColunasAberto, rotulosColunas: e.rotulosColunas, configInicial: e.configColunas, @@ -2547,8 +2110,8 @@ function Zo(e, a, o, r, s, f) { onFechar: e.fecharModalColunas, onSalvar: e.salvarModalColunas }, null, 8, ["aberto", "rotulosColunas", "configInicial", "colunas", "onFechar", "onSalvar"]), - _("table", Wo, [ - M(c, { + E("table", Lo, [ + B(p, { colunas: e.colunasEfetivas, temAcoes: e.temAcoes, temColunasInvisiveis: e.temColunasInvisiveis, @@ -2556,7 +2119,7 @@ function Zo(e, a, o, r, s, f) { direcaoOrdenacao: e.direcaoOrdenacao, onAlternarOrdenacao: e.alternarOrdenacao }, null, 8, ["colunas", "temAcoes", "temColunasInvisiveis", "colunaOrdenacao", "direcaoOrdenacao", "onAlternarOrdenacao"]), - M($, { + B(C, { colunas: e.colunasEfetivas, colunasInvisiveis: e.colunasInvisiveisEfetivas, temColunasInvisiveis: e.temColunasInvisiveis, @@ -2569,14 +2132,14 @@ function Zo(e, a, o, r, s, f) { alternarLinhaExpandida: e.alternarLinhaExpandida }, null, 8, ["colunas", "colunasInvisiveis", "temColunasInvisiveis", "linhasExpandidas", "linhas", "temAcoes", "menuAberto", "possuiAcoes", "toggleMenu", "alternarLinhaExpandida"]) ]), - M(I, { + B(P, { ref: "menuPopup", menuAberto: e.menuAberto, posicao: e.menuPopupPos, acoes: e.menuAberto === null ? [] : e.acoesDisponiveisPorLinha(e.menuAberto), linha: e.menuAberto === null ? null : e.linhas[e.menuAberto], - onExecutar: a[0] || (a[0] = ({ acao: y, linha: v }) => { - e.menuAberto = null, y.acao(v); + onExecutar: a[0] || (a[0] = ({ acao: $, linha: d }) => { + e.menuAberto = null, $.acao(d); }) }, null, 8, ["menuAberto", "posicao", "acoes", "linha"]), e.totalPaginas > 1 && e.quantidade > 0 ? (i(), z(D, { @@ -2589,7 +2152,7 @@ function Zo(e, a, o, r, s, f) { ], 64)) ]); } -const Go = /* @__PURE__ */ Y(Ro, [["render", Zo]]), Xo = H({ +const Uo = /* @__PURE__ */ Y(qo, [["render", jo]]), zo = H({ name: "EliEntradaTexto", inheritAttrs: !1, props: { @@ -2612,73 +2175,73 @@ const Go = /* @__PURE__ */ Y(Ro, [["render", Zo]]), Xo = H({ blur: () => !0 }, setup(e, { attrs: a, emit: o }) { - const r = V({ + const l = k({ get: () => e.value, set: (s) => { o("update:value", s), o("input", s), o("change", s); } }); - return { attrs: a, emit: o, localValue: r }; + return { attrs: a, emit: o, localValue: l }; } }); -function Ko(e, a, o, r, s, f) { - var t, n, m, l; - return i(), z(Ae, me({ +function Ho(e, a, o, l, s, v) { + var t, n, f, r; + return i(), z(Me, me({ modelValue: e.localValue, - "onUpdate:modelValue": a[0] || (a[0] = (c) => e.localValue = c), + "onUpdate:modelValue": a[0] || (a[0] = (p) => e.localValue = p), label: (t = e.opcoes) == null ? void 0 : t.rotulo, placeholder: (n = e.opcoes) == null ? void 0 : n.placeholder, - counter: (m = e.opcoes) == null ? void 0 : m.limiteCaracteres, - maxlength: (l = e.opcoes) == null ? void 0 : l.limiteCaracteres + counter: (f = e.opcoes) == null ? void 0 : f.limiteCaracteres, + maxlength: (r = e.opcoes) == null ? void 0 : r.limiteCaracteres }, e.attrs, { onFocus: a[1] || (a[1] = () => e.emit("focus")), onBlur: a[2] || (a[2] = () => e.emit("blur")) }), null, 16, ["modelValue", "label", "placeholder", "counter", "maxlength"]); } -const Qo = /* @__PURE__ */ Y(Xo, [["render", Ko]]); -function xo(e) { +const Yo = /* @__PURE__ */ Y(zo, [["render", Ho]]); +function Ro(e) { if (!Number.isFinite(e) || e <= 0 || e >= 1) return 0; const a = e.toString(); if (a.includes("e-")) { - const [, s] = a.split("e-"), f = Number(s); - return Number.isFinite(f) ? f : 0; + const [, s] = a.split("e-"), v = Number(s); + return Number.isFinite(v) ? v : 0; } const o = a.indexOf("."); return o === -1 ? 0 : a.slice(o + 1).replace(/0+$/, "").length; } -function en(e) { +function Jo(e) { const a = (e ?? "").trim().replace(/,/g, "."); if (!a) return null; const o = Number(a); return Number.isNaN(o) ? null : o; } -function Me(e, a) { +function Ae(e, a) { return e == null ? "" : a === null ? String(e) : Number(e).toFixed(Math.max(0, a)).replace(/\./g, ","); } -function Re(e) { +function Ye(e) { return (e ?? "").replace(/\D+/g, ""); } -function an(e) { +function Wo(e) { const a = (e ?? "").replace(/[^0-9.,]+/g, ""), o = a.match(/[.,]/); if (!o) return a; - const r = o[0], s = a.indexOf(r), f = a.slice(0, s).replace(/[.,]/g, ""), t = a.slice(s + 1).replace(/[.,]/g, ""); - return `${f.length ? f : "0"}${r}${t}`; + const l = o[0], s = a.indexOf(l), v = a.slice(0, s).replace(/[.,]/g, ""), t = a.slice(s + 1).replace(/[.,]/g, ""); + return `${v.length ? v : "0"}${l}${t}`; } -function tn(e, a) { +function Zo(e, a) { if (a === null) return e; if (a <= 0) return e.replace(/[.,]/g, ""); const o = e.match(/[.,]/); if (!o) return e; - const r = o[0], s = e.indexOf(r), f = e.slice(0, s), t = e.slice(s + 1); - return `${f}${r}${t.slice(0, a)}`; + const l = o[0], s = e.indexOf(l), v = e.slice(0, s), t = e.slice(s + 1); + return `${v}${l}${t.slice(0, a)}`; } -function on(e) { +function Go(e) { const a = e.match(/^(\d+)[.,]$/); if (!a) return null; const o = Number(a[1]); return Number.isNaN(o) ? null : o; } -const nn = H({ +const Xo = H({ name: "EliEntradaNumero", inheritAttrs: !1, props: { @@ -2701,41 +2264,41 @@ const nn = H({ blur: () => !0 }, setup(e, { attrs: a, emit: o }) { - const r = V(() => { - var c; - const l = (c = e.opcoes) == null ? void 0 : c.precisao; - return l == null ? null : xo(l); - }), s = V(() => r.value === 0), f = V(() => { - const l = r.value; - return l !== null && l > 0; - }), t = B(""), n = B(void 0); + const l = k(() => { + var p; + const r = (p = e.opcoes) == null ? void 0 : p.precisao; + return r == null ? null : Ro(r); + }), s = k(() => l.value === 0), v = k(() => { + const r = l.value; + return r !== null && r > 0; + }), t = T(""), n = T(void 0); fe( () => e.value, - (l) => { - l !== n.value && (t.value = Me(l, r.value), n.value = l); + (r) => { + r !== n.value && (t.value = Ae(r, l.value), n.value = r); }, { immediate: !0 } ); - function m(l) { - if (f.value) { - const D = r.value ?? 0, y = Re(l), v = y ? Number(y) : 0, T = Math.pow(10, D), C = y ? v / T : null, k = C === null ? null : C; - n.value = k, o("update:value", k), o("input", k), o("change", k), t.value = Me(k, D); + function f(r) { + if (v.value) { + const D = l.value ?? 0, $ = Ye(r), d = $ ? Number($) : 0, M = Math.pow(10, D), g = $ ? d / M : null, S = g === null ? null : g; + n.value = S, o("update:value", S), o("input", S), o("change", S), t.value = Ae(S, D); return; } - const c = s.value ? Re(l) : an(l), $ = s.value ? c : tn(c, r.value); - let I = null; - if ($) { - const y = (s.value ? null : on($)) ?? en($); - I = y === null ? null : y; + const p = s.value ? Ye(r) : Wo(r), C = s.value ? p : Zo(p, l.value); + let P = null; + if (C) { + const $ = (s.value ? null : Go(C)) ?? Jo(C); + P = $ === null ? null : $; } - n.value = I, o("update:value", I), o("input", I), o("change", I), t.value = Me(I, r.value); + n.value = P, o("update:value", P), o("input", P), o("change", P), t.value = Ae(P, l.value); } - return { attrs: a, emit: o, displayValue: t, isInteiro: s, onUpdateModelValue: m }; + return { attrs: a, emit: o, displayValue: t, isInteiro: s, onUpdateModelValue: f }; } -}), ln = { class: "eli-entrada__prefixo" }, rn = { class: "eli-entrada__sufixo" }; -function sn(e, a, o, r, s, f) { - var t, n, m, l; - return i(), z(Ae, me({ +}), Ko = { class: "eli-entrada__prefixo" }, Qo = { class: "eli-entrada__sufixo" }; +function xo(e, a, o, l, s, v) { + var t, n, f, r; + return i(), z(Me, me({ "model-value": e.displayValue, label: (t = e.opcoes) == null ? void 0 : t.rotulo, placeholder: (n = e.opcoes) == null ? void 0 : n.placeholder, @@ -2747,36 +2310,457 @@ function sn(e, a, o, r, s, f) { onFocus: a[0] || (a[0] = () => e.emit("focus")), onBlur: a[1] || (a[1] = () => e.emit("blur")) }), Je({ _: 2 }, [ - (m = e.opcoes) != null && m.prefixo ? { + (f = e.opcoes) != null && f.prefixo ? { name: "prepend-inner", fn: ee(() => [ - _("span", ln, j(e.opcoes.prefixo), 1) + E("span", Ko, j(e.opcoes.prefixo), 1) ]), key: "0" } : void 0, - (l = e.opcoes) != null && l.sufixo ? { + (r = e.opcoes) != null && r.sufixo ? { name: "append-inner", fn: ee(() => [ - _("span", rn, j(e.opcoes.sufixo), 1) + E("span", Qo, j(e.opcoes.sufixo), 1) ]), key: "1" } : void 0 ]), 1040, ["model-value", "label", "placeholder", "type", "inputmode", "pattern", "onUpdate:modelValue"]); } -const un = /* @__PURE__ */ Y(nn, [["render", sn], ["__scopeId", "data-v-77cbf216"]]), _n = { +const en = /* @__PURE__ */ Y(Xo, [["render", xo], ["__scopeId", "data-v-77cbf216"]]); +function an(e) { + return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; +} +var Ve = { exports: {} }, tn = Ve.exports, Re; +function on() { + return Re || (Re = 1, (function(e, a) { + (function(o, l) { + e.exports = l(); + })(tn, (function() { + var o = 1e3, l = 6e4, s = 36e5, v = "millisecond", t = "second", n = "minute", f = "hour", r = "day", p = "week", C = "month", P = "quarter", D = "year", $ = "date", d = "Invalid Date", M = /^(\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, S = { 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 m = ["th", "st", "nd", "rd"], u = _ % 100; + return "[" + _ + (m[(u - 20) % 10] || m[u] || m[0]) + "]"; + } }, oe = function(_, m, u) { + var h = String(_); + return !h || h.length >= m ? _ : "" + Array(m + 1 - h.length).join(u) + _; + }, ie = { s: oe, z: function(_) { + var m = -_.utcOffset(), u = Math.abs(m), h = Math.floor(u / 60), c = u % 60; + return (m <= 0 ? "+" : "-") + oe(h, 2, "0") + ":" + oe(c, 2, "0"); + }, m: function _(m, u) { + if (m.date() < u.date()) return -_(u, m); + var h = 12 * (u.year() - m.year()) + (u.month() - m.month()), c = m.clone().add(h, C), w = u - c < 0, V = m.clone().add(h + (w ? -1 : 1), C); + return +(-(h + (u - c) / (w ? c - V : V - c)) || 0); + }, a: function(_) { + return _ < 0 ? Math.ceil(_) || 0 : Math.floor(_); + }, p: function(_) { + return { M: C, y: D, w: p, d: r, D: $, h: f, m: n, s: t, ms: v, Q: P }[_] || String(_ || "").toLowerCase().replace(/s$/, ""); + }, u: function(_) { + return _ === void 0; + } }, re = "en", se = {}; + se[re] = S; + var ve = "$isDayjsObject", X = function(_) { + return _ instanceof ge || !(!_ || !_[ve]); + }, he = function _(m, u, h) { + var c; + if (!m) return re; + if (typeof m == "string") { + var w = m.toLowerCase(); + se[w] && (c = w), u && (se[w] = u, c = w); + var V = m.split("-"); + if (!c && V.length > 1) return _(V[0]); + } else { + var N = m.name; + se[N] = m, c = N; + } + return !h && c && (re = c), c || !h && re; + }, G = function(_, m) { + if (X(_)) return _.clone(); + var u = typeof m == "object" ? m : {}; + return u.date = _, u.args = arguments, new ge(u); + }, I = ie; + I.l = he, I.i = X, I.w = function(_, m) { + return G(_, { locale: m.$L, utc: m.$u, x: m.$x, $offset: m.$offset }); + }; + var ge = (function() { + function _(u) { + this.$L = he(u.locale, null, !0), this.parse(u), this.$x = this.$x || u.x || {}, this[ve] = !0; + } + var m = _.prototype; + return m.parse = function(u) { + this.$d = (function(h) { + var c = h.date, w = h.utc; + if (c === null) return /* @__PURE__ */ new Date(NaN); + if (I.u(c)) return /* @__PURE__ */ new Date(); + if (c instanceof Date) return new Date(c); + if (typeof c == "string" && !/Z$/i.test(c)) { + var V = c.match(M); + if (V) { + var N = V[2] - 1 || 0, L = (V[7] || "0").substring(0, 3); + return w ? new Date(Date.UTC(V[1], N, V[3] || 1, V[4] || 0, V[5] || 0, V[6] || 0, L)) : new Date(V[1], N, V[3] || 1, V[4] || 0, V[5] || 0, V[6] || 0, L); + } + } + return new Date(c); + })(u), this.init(); + }, m.init = function() { + var u = this.$d; + this.$y = u.getFullYear(), this.$M = u.getMonth(), this.$D = u.getDate(), this.$W = u.getDay(), this.$H = u.getHours(), this.$m = u.getMinutes(), this.$s = u.getSeconds(), this.$ms = u.getMilliseconds(); + }, m.$utils = function() { + return I; + }, m.isValid = function() { + return this.$d.toString() !== d; + }, m.isSame = function(u, h) { + var c = G(u); + return this.startOf(h) <= c && c <= this.endOf(h); + }, m.isAfter = function(u, h) { + return G(u) < this.startOf(h); + }, m.isBefore = function(u, h) { + return this.endOf(h) < G(u); + }, m.$g = function(u, h, c) { + return I.u(u) ? this[h] : this.set(c, u); + }, m.unix = function() { + return Math.floor(this.valueOf() / 1e3); + }, m.valueOf = function() { + return this.$d.getTime(); + }, m.startOf = function(u, h) { + var c = this, w = !!I.u(h) || h, V = I.p(u), N = function(O, F) { + var R = I.w(c.$u ? Date.UTC(c.$y, F, O) : new Date(c.$y, F, O), c); + return w ? R : R.endOf(r); + }, L = function(O, F) { + return I.w(c.toDate()[O].apply(c.toDate("s"), (w ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(F)), c); + }, W = this.$W, ae = this.$M, Z = this.$D, b = "set" + (this.$u ? "UTC" : ""); + switch (V) { + case D: + return w ? N(1, 0) : N(31, 11); + case C: + return w ? N(1, ae) : N(0, ae + 1); + case p: + var A = this.$locale().weekStart || 0, q = (W < A ? W + 7 : W) - A; + return N(w ? Z - q : Z + (6 - q), ae); + case r: + case $: + return L(b + "Hours", 0); + case f: + return L(b + "Minutes", 1); + case n: + return L(b + "Seconds", 2); + case t: + return L(b + "Milliseconds", 3); + default: + return this.clone(); + } + }, m.endOf = function(u) { + return this.startOf(u, !1); + }, m.$set = function(u, h) { + var c, w = I.p(u), V = "set" + (this.$u ? "UTC" : ""), N = (c = {}, c[r] = V + "Date", c[$] = V + "Date", c[C] = V + "Month", c[D] = V + "FullYear", c[f] = V + "Hours", c[n] = V + "Minutes", c[t] = V + "Seconds", c[v] = V + "Milliseconds", c)[w], L = w === r ? this.$D + (h - this.$W) : h; + if (w === C || w === D) { + var W = this.clone().set($, 1); + W.$d[N](L), W.init(), this.$d = W.set($, Math.min(this.$D, W.daysInMonth())).$d; + } else N && this.$d[N](L); + return this.init(), this; + }, m.set = function(u, h) { + return this.clone().$set(u, h); + }, m.get = function(u) { + return this[I.p(u)](); + }, m.add = function(u, h) { + var c, w = this; + u = Number(u); + var V = I.p(h), N = function(ae) { + var Z = G(w); + return I.w(Z.date(Z.date() + Math.round(ae * u)), w); + }; + if (V === C) return this.set(C, this.$M + u); + if (V === D) return this.set(D, this.$y + u); + if (V === r) return N(1); + if (V === p) return N(7); + var L = (c = {}, c[n] = l, c[f] = s, c[t] = o, c)[V] || 1, W = this.$d.getTime() + u * L; + return I.w(W, this); + }, m.subtract = function(u, h) { + return this.add(-1 * u, h); + }, m.format = function(u) { + var h = this, c = this.$locale(); + if (!this.isValid()) return c.invalidDate || d; + var w = u || "YYYY-MM-DDTHH:mm:ssZ", V = I.z(this), N = this.$H, L = this.$m, W = this.$M, ae = c.weekdays, Z = c.months, b = c.meridiem, A = function(F, R, K, Q) { + return F && (F[R] || F(h, w)) || K[R].slice(0, Q); + }, q = function(F) { + return I.s(N % 12 || 12, F, "0"); + }, O = b || function(F, R, K) { + var Q = F < 12 ? "AM" : "PM"; + return K ? Q.toLowerCase() : Q; + }; + return w.replace(g, (function(F, R) { + return R || (function(K) { + switch (K) { + case "YY": + return String(h.$y).slice(-2); + case "YYYY": + return I.s(h.$y, 4, "0"); + case "M": + return W + 1; + case "MM": + return I.s(W + 1, 2, "0"); + case "MMM": + return A(c.monthsShort, W, Z, 3); + case "MMMM": + return A(Z, W); + case "D": + return h.$D; + case "DD": + return I.s(h.$D, 2, "0"); + case "d": + return String(h.$W); + case "dd": + return A(c.weekdaysMin, h.$W, ae, 2); + case "ddd": + return A(c.weekdaysShort, h.$W, ae, 3); + case "dddd": + return ae[h.$W]; + case "H": + return String(N); + case "HH": + return I.s(N, 2, "0"); + case "h": + return q(1); + case "hh": + return q(2); + case "a": + return O(N, L, !0); + case "A": + return O(N, L, !1); + case "m": + return String(L); + case "mm": + return I.s(L, 2, "0"); + case "s": + return String(h.$s); + case "ss": + return I.s(h.$s, 2, "0"); + case "SSS": + return I.s(h.$ms, 3, "0"); + case "Z": + return V; + } + return null; + })(F) || V.replace(":", ""); + })); + }, m.utcOffset = function() { + return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); + }, m.diff = function(u, h, c) { + var w, V = this, N = I.p(h), L = G(u), W = (L.utcOffset() - this.utcOffset()) * l, ae = this - L, Z = function() { + return I.m(V, L); + }; + switch (N) { + case D: + w = Z() / 12; + break; + case C: + w = Z(); + break; + case P: + w = Z() / 3; + break; + case p: + w = (ae - W) / 6048e5; + break; + case r: + w = (ae - W) / 864e5; + break; + case f: + w = ae / s; + break; + case n: + w = ae / l; + break; + case t: + w = ae / o; + break; + default: + w = ae; + } + return c ? w : I.a(w); + }, m.daysInMonth = function() { + return this.endOf(C).$D; + }, m.$locale = function() { + return se[this.$L]; + }, m.locale = function(u, h) { + if (!u) return this.$L; + var c = this.clone(), w = he(u, h, !0); + return w && (c.$L = w), c; + }, m.clone = function() { + return I.w(this.$d, this); + }, m.toDate = function() { + return new Date(this.valueOf()); + }, m.toJSON = function() { + return this.isValid() ? this.toISOString() : null; + }, m.toISOString = function() { + return this.$d.toISOString(); + }, m.toString = function() { + return this.$d.toUTCString(); + }, _; + })(), Ce = ge.prototype; + return G.prototype = Ce, [["$ms", v], ["$s", t], ["$m", n], ["$H", f], ["$W", r], ["$M", C], ["$y", D], ["$D", $]].forEach((function(_) { + Ce[_[1]] = function(m) { + return this.$g(m, _[0], _[1]); + }; + })), G.extend = function(_, m) { + return _.$i || (_(m, ge, G), _.$i = !0), G; + }, G.locale = he, G.isDayjs = X, G.unix = function(_) { + return G(1e3 * _); + }, G.en = se[re], G.Ls = se, G.p = {}, G; + })); + })(Ve)), Ve.exports; +} +var nn = on(); +const we = /* @__PURE__ */ an(nn), ln = H({ + name: "EliEntradaDataHora", + inheritAttrs: !1, + props: { + // --- Novo padrão EliEntrada --- + value: { + type: String, + default: void 0 + }, + opcoes: { + type: Object, + required: !1, + default: void 0 + }, + // --- Compatibilidade com componente antigo EliDataHora --- + modelValue: { + type: String, + default: null + }, + modo: { type: String, default: void 0 }, + rotulo: { type: String, default: void 0 }, + placeholder: { type: String, default: void 0 }, + desabilitado: { type: Boolean, default: void 0 }, + limpavel: { type: Boolean, default: void 0 }, + erro: { type: Boolean, default: void 0 }, + mensagensErro: { + type: [String, Array], + default: void 0 + }, + dica: { type: String, default: void 0 }, + dicaPersistente: { type: Boolean, default: void 0 }, + densidade: { type: String, default: void 0 }, + variante: { type: String, default: void 0 }, + min: { type: String, default: void 0 }, + max: { type: String, default: void 0 } + }, + emits: { + // Novo padrão + "update:value": (e) => !0, + input: (e) => !0, + // compat Vue2 + change: (e) => !0, + // Compat antigo + "update:modelValue": (e) => !0, + alterar: (e) => !0, + foco: () => !0, + desfoco: () => !0, + focus: () => !0, + blur: () => !0 + }, + setup(e, { emit: a, attrs: o }) { + const l = k(() => e.opcoes ? e.opcoes : { + rotulo: e.rotulo ?? "Data e hora", + placeholder: e.placeholder ?? "", + modo: e.modo ?? "dataHora", + limpavel: e.limpavel, + erro: e.erro, + mensagensErro: e.mensagensErro, + dica: e.dica, + dicaPersistente: e.dicaPersistente, + densidade: e.densidade, + variante: e.variante, + min: e.min, + max: e.max + }), s = k( + () => l.value.modo ?? "dataHora" + ), v = k(() => !!e.desabilitado), t = k( + () => s.value === "data" ? "date" : "datetime-local" + ); + function n(d) { + return s.value === "data" ? we(d).format("YYYY-MM-DD") : we(d).format("YYYY-MM-DDTHH:mm"); + } + function f(d) { + return s.value === "data" ? we(`${d}T00:00`).format() : we(d).format(); + } + const r = k(() => e.value !== void 0 ? e.value ?? null : e.modelValue), p = k({ + get: () => r.value ? n(r.value) : "", + set: (d) => { + const M = d && d.length > 0 ? d : null; + if (!M) { + a("update:value", null), a("input", null), a("change", null), a("update:modelValue", null), a("alterar", null); + return; + } + const g = f(M); + a("update:value", g), a("input", g), a("change", g), a("update:modelValue", g), a("alterar", g); + } + }), C = k(() => { + const d = l.value.min; + if (d) + return n(d); + }), P = k(() => { + const d = l.value.max; + if (d) + return n(d); + }); + function D() { + a("foco"), a("focus"); + } + function $() { + a("desfoco"), a("blur"); + } + return { + attrs: o, + valor: p, + tipoInput: t, + minLocal: C, + maxLocal: P, + opcoesEfetivas: l, + desabilitadoEfetivo: v, + emitCompatFocus: D, + emitCompatBlur: $ + }; + } +}), rn = { class: "eli-data-hora" }; +function sn(e, a, o, l, s, v) { + return i(), y("div", rn, [ + B(Me, me({ + modelValue: e.valor, + "onUpdate:modelValue": a[0] || (a[0] = (t) => e.valor = t), + type: e.tipoInput, + label: e.opcoesEfetivas.rotulo, + placeholder: e.opcoesEfetivas.placeholder, + disabled: e.desabilitadoEfetivo, + clearable: !!e.opcoesEfetivas.limpavel, + error: !!e.opcoesEfetivas.erro, + "error-messages": e.opcoesEfetivas.mensagensErro, + hint: e.opcoesEfetivas.dica, + "persistent-hint": !!e.opcoesEfetivas.dicaPersistente, + density: e.opcoesEfetivas.densidade ?? "comfortable", + variant: e.opcoesEfetivas.variante ?? "outlined", + min: e.minLocal, + max: e.maxLocal + }, e.attrs, { + onFocus: e.emitCompatFocus, + onBlur: e.emitCompatBlur + }), null, 16, ["modelValue", "type", "label", "placeholder", "disabled", "clearable", "error", "error-messages", "hint", "persistent-hint", "density", "variant", "min", "max", "onFocus", "onBlur"]) + ]); +} +const un = /* @__PURE__ */ Y(ln, [["render", sn], ["__scopeId", "data-v-1bfd1be8"]]), En = { install(e) { - e.component("EliOlaMundo", Fa), e.component("EliBotao", Ke), e.component("EliBadge", Ie), e.component("EliInput", xe), e.component("EliCartao", Ya), e.component("EliDataHora", Qa), e.component("EliTabela", Go), e.component("EliEntradaTexto", Qo), e.component("EliEntradaNumero", un); + e.component("EliOlaMundo", La), e.component("EliBotao", Ke), e.component("EliBadge", Pe), e.component("EliInput", xe), e.component("EliCartao", Ya), e.component("EliTabela", Uo), e.component("EliEntradaTexto", Yo), e.component("EliEntradaNumero", en), e.component("EliEntradaDataHora", un); } }; export { - Ie as EliBadge, + Pe as EliBadge, Ke as EliBotao, Ya as EliCartao, - Qa as EliDataHora, - un as EliEntradaNumero, - Qo as EliEntradaTexto, + un as EliEntradaDataHora, + en as EliEntradaNumero, + Yo as EliEntradaTexto, xe as EliInput, - Fa as EliOlaMundo, - Go as EliTabela, - _n as default + La as EliOlaMundo, + Uo as EliTabela, + En as default }; diff --git a/dist/eli-vue.umd.js b/dist/eli-vue.umd.js index c17c64c..c7a1581 100644 --- a/dist/eli-vue.umd.js +++ b/dist/eli-vue.umd.js @@ -1,34 +1,34 @@ -(function(A,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("vuetify/components/VBtn"),require("vuetify/components/VBadge"),require("vuetify/components/VCheckbox"),require("vuetify/components/VIcon"),require("vuetify/components/VRadio"),require("vuetify/components/VRadioGroup"),require("vuetify/components/VSelect"),require("vuetify/components/VTextField"),require("vuetify/components/VTextarea"),require("vuetify/components/VCard"),require("vuetify/components/VGrid")):typeof define=="function"&&define.amd?define(["exports","vue","vuetify/components/VBtn","vuetify/components/VBadge","vuetify/components/VCheckbox","vuetify/components/VIcon","vuetify/components/VRadio","vuetify/components/VRadioGroup","vuetify/components/VSelect","vuetify/components/VTextField","vuetify/components/VTextarea","vuetify/components/VCard","vuetify/components/VGrid"],t):(A=typeof globalThis<"u"?globalThis:A||self,t(A.eli_vue={},A.Vue,A.VBtn,A.VBadge,A.VCheckbox,A.VIcon,A.VRadio,A.VRadioGroup,A.VSelect,A.VTextField,A.VTextarea,A.VCard,A.VGrid))})(this,(function(A,t,Le,ze,je,Ue,He,Re,Ye,se,Je,ee,Ge){"use strict";const We=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}}}),O=(e,a)=>{const n=e.__vccOpts||e;for(const[i,s]of a)n[i]=s;return n};function Ze(e,a,n,i,s,f){return t.openBlock(),t.createBlock(Le.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 pe=O(We,[["render",Ze]]),ge={suave:"4px",pill:"10px"},Xe=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 ge?ge[e.radius]:e.radius),n=t.computed(()=>e.dot||e.badge!==void 0?e.visible:!1),i=t.computed(()=>({"--eli-badge-radius":a.value}));return{showBadge:n,badgeStyle:i}}});function Ke(e,a,n,i,s,f){return e.showBadge?(t.openBlock(),t.createBlock(ze.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",{},void 0,!0)]),_:3},16,["color","location","offset-x","offset-y","dot","content","style"])):t.renderSlot(e.$slots,"default",{key:1},void 0,!0)}const ce=O(Xe,[["render",Ke],["__scopeId","data-v-371c8db4"]]);function Qe(e){return e.replace(/\D+/g,"")}function xe(e){const a=Qe(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 et(e){return e.replace(/\D+/g,"")}function tt(e){const a=et(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 fe(e){return e.replace(/\D+/g,"")}function ye(e){const a=e.replace(/[^\d,]/g,""),n=a.split(",");return n.length>2?n[0]+","+n.slice(1).join(""):a}function at(e){return ye(e.replace(/%/g,""))}function ot(e){const a=fe(e);return a?(parseInt(a,10)/100).toFixed(2).replace(".",",").replace(/\B(?=(\d{3})+(?!\d))/g,"."):""}function nt(e){const a=fe(e).slice(0,8);return a.length<=5?a:a.replace(/^(\d{5})(\d{1,3})$/,"$1-$2")}const lt=t.defineComponent({name:"EliInput",inheritAttrs:!1,props:{modelValue:{type:[String,Number,Boolean,Array],default:""},type:{type:String,default:"text"},label:String,placeholder:String,disabled:Boolean,error:Boolean,errorMessages:{type:[String,Array],default:()=>[]},hint:String,persistentHint:Boolean,rows:{type:Number,default:4},options:{type:Array,default:()=>[]},clearable:Boolean,variant:{type:String,default:"outlined"},density:{type:String,default:"comfortable"},color:{type:String,default:"primary"},row:Boolean,showPasswordToggle:Boolean,multiple:Boolean,chips:Boolean},emits:["update:modelValue","change","focus","blur"],setup(e,{emit:a,attrs:n}){const i=t.ref(!1),s=t.ref(!1),f=t.computed({get:()=>e.modelValue,set:C=>{a("update:modelValue",C),a("change",C)}}),o=t.computed(()=>["text","password","email","search","url","telefone","cpfCnpj","numericoInteiro","numericoDecimal","numericoMoeda","porcentagem","cep"].includes(e.type)),l=t.computed(()=>e.type==="password"?s.value?"text":"password":"text"),p=t.computed(()=>{if(e.type==="telefone")return"tel";if(e.type==="porcentagem")return"decimal";if(e.type.startsWith("numerico"))return"numeric"}),r=t.computed(()=>e.error?"error":i.value?e.color:void 0);function u(C){const $=C.target;let b=$.value;switch(e.type){case"numericoInteiro":b=fe(b);break;case"numericoDecimal":b=ye(b);break;case"numericoMoeda":b=ot(b);break;case"porcentagem":b=at(b);break;case"telefone":b=tt(b);break;case"cpfCnpj":b=xe(b);break;case"cep":b=nt(b);break}$.value=b,a("update:modelValue",b),a("change",b)}function y(){s.value=!s.value}const _=t.computed(()=>(e.options||[]).map(C=>{if(C&&typeof C=="object"&&"value"in C){const b=C.value;return{label:C.label??String(b),value:b,disabled:C.disabled}}const $=C;return{label:String($),value:$}}));return{attrs:n,value:f,isTextLike:o,inputHtmlType:l,inputMode:p,internalColor:r,showPassword:s,togglePassword:y,onInput:u,onFocus:()=>a("focus"),onBlur:()=>a("blur"),computedItems:_}}}),rt={class:"eli-input"},it={key:4,class:"checkbox-group"};function st(e,a,n,i,s,f){return t.openBlock(),t.createElementBlock("div",rt,[e.isTextLike?(t.openBlock(),t.createBlock(se.VTextField,t.mergeProps({key:0,modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=o=>e.value=o),type:e.inputHtmlType,label:e.label,placeholder:e.placeholder,disabled:e.disabled,clearable:e.clearable&&e.type!=="password",error:e.error,"error-messages":e.errorMessages,hint:e.hint,"persistent-hint":e.persistentHint,density:e.density,variant:e.variant,color:e.internalColor,inputmode:e.inputMode,suffix:e.type==="porcentagem"?"%":void 0},e.attrs,{onFocus:e.onFocus,onBlur:e.onBlur,onInput:e.onInput}),t.createSlots({_:2},[e.type==="password"&&e.showPasswordToggle?{name:"append-inner",fn:t.withCtx(()=>[t.createVNode(Ue.VIcon,{class:"cursor-pointer",onClick:e.togglePassword},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.showPassword?"mdi-eye-off":"mdi-eye"),1)]),_:1},8,["onClick"])]),key:"0"}:void 0]),1040,["modelValue","type","label","placeholder","disabled","clearable","error","error-messages","hint","persistent-hint","density","variant","color","inputmode","suffix","onFocus","onBlur","onInput"])):e.type==="textarea"?(t.openBlock(),t.createBlock(Je.VTextarea,t.mergeProps({key:1,modelValue:e.value,"onUpdate:modelValue":a[1]||(a[1]=o=>e.value=o),label:e.label,rows:e.rows,density:e.density,variant:e.variant},e.attrs),null,16,["modelValue","label","rows","density","variant"])):e.type==="select"?(t.openBlock(),t.createBlock(Ye.VSelect,t.mergeProps({key:2,modelValue:e.value,"onUpdate:modelValue":a[2]||(a[2]=o=>e.value=o),items:e.computedItems,label:e.label,placeholder:e.placeholder,multiple:e.multiple,chips:e.chips,clearable:e.clearable,disabled:e.disabled,density:e.density,variant:e.variant,"item-title":"label","item-value":"value",error:e.error,"error-messages":e.errorMessages},e.attrs,{onFocus:e.onFocus,onBlur:e.onBlur}),null,16,["modelValue","items","label","placeholder","multiple","chips","clearable","disabled","density","variant","error","error-messages","onFocus","onBlur"])):e.type==="radio"?(t.openBlock(),t.createBlock(Re.VRadioGroup,{key:3,modelValue:e.value,"onUpdate:modelValue":a[3]||(a[3]=o=>e.value=o),row:e.row},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.computedItems,o=>(t.openBlock(),t.createBlock(He.VRadio,{key:String(o.value),label:o.label,value:o.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","row"])):e.type==="checkbox"?(t.openBlock(),t.createElementBlock("div",it,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.computedItems,o=>(t.openBlock(),t.createBlock(je.VCheckbox,{key:String(o.value),modelValue:e.value,"onUpdate:modelValue":a[4]||(a[4]=l=>e.value=l),label:o.label,value:o.value,density:e.density},null,8,["modelValue","label","value","density"]))),128))])):t.createCommentVNode("",!0)])}const be=O(lt,[["render",st],["__scopeId","data-v-756cb549"]]),ct=t.defineComponent({name:"EliOlaMundo",components:{EliBotao:pe,EliBadge:ce,EliInput:be},setup(){const e=t.ref(""),a=t.ref([]),n=t.ref(""),i=t.ref(""),s=t.ref(""),f=t.ref(""),o=t.ref(""),l=t.ref(""),p=t.ref(""),r=t.ref(""),u=t.ref(""),y=t.ref(null),_=t.ref([]);return{nome:e,email:l,documento:u,estado:a,telefone:i,mensagem:p,senha:r,cor:y,habilidades:_,idade:s,altura:f,cep:n,valor:o}}}),dt={class:"grid-example"};function ut(e,a,n,i,s,f){const o=t.resolveComponent("EliBadge"),l=t.resolveComponent("EliInput"),p=t.resolveComponent("EliBotao");return t.openBlock(),t.createBlock(Ge.VContainer,null,{default:t.withCtx(()=>[t.createVNode(ee.VCard,{class:"mx-auto",max_width:"400"},{default:t.withCtx(()=>[t.createVNode(ee.VCardTitle,null,{default:t.withCtx(()=>[t.createVNode(o,{badge:"Novo","offset-x":"-15",location:"right center"},{default:t.withCtx(()=>[...a[14]||(a[14]=[t.createTextVNode(" Olá Mundo! ",-1)])]),_:1})]),_:1}),t.createVNode(ee.VCardText,null,{default:t.withCtx(()=>[a[15]||(a[15]=t.createTextVNode(" Este é um componente de exemplo integrado com Vuetify. ",-1)),t.createElementVNode("div",dt,[t.createVNode(l,{modelValue:e.nome,"onUpdate:modelValue":a[0]||(a[0]=r=>e.nome=r),label:"Nome",placeholder:"Digite o nome",density:"compact"},null,8,["modelValue"]),t.createVNode(l,{modelValue:e.idade,"onUpdate:modelValue":a[1]||(a[1]=r=>e.idade=r),type:"numericoInteiro",label:"Idade",density:"default"},null,8,["modelValue"]),t.createVNode(l,{modelValue:e.altura,"onUpdate:modelValue":a[2]||(a[2]=r=>e.altura=r),type:"numericoDecimal",label:"Altura",density:"comfortable"},null,8,["modelValue"]),t.createVNode(l,{modelValue:e.valor,"onUpdate:modelValue":a[3]||(a[3]=r=>e.valor=r),type:"numericoMoeda",label:"Valor"},null,8,["modelValue"]),t.createVNode(l,{modelValue:e.telefone,"onUpdate:modelValue":a[4]||(a[4]=r=>e.telefone=r),type:"telefone",label:"Telefone"},null,8,["modelValue"]),t.createVNode(l,{modelValue:e.cep,"onUpdate:modelValue":a[5]||(a[5]=r=>e.cep=r),type:"cep",label:"CEP",placeholder:"00000-000"},null,8,["modelValue"]),t.createVNode(l,{type:"select",label:"Estado",options:[{label:"São Paulo",value:"SP"},{label:"Rio de Janeiro",value:"RJ"}],modelValue:e.estado,"onUpdate:modelValue":a[6]||(a[6]=r=>e.estado=r),multiple:""},null,8,["modelValue"]),t.createVNode(l,{modelValue:e.documento,"onUpdate:modelValue":a[7]||(a[7]=r=>e.documento=r),type:"cpfCnpj",label:"CPF / CNPJ"},null,8,["modelValue"]),t.createVNode(l,{modelValue:e.email,"onUpdate:modelValue":a[8]||(a[8]=r=>e.email=r),label:"Email",placeholder:"email@exemplo.com"},null,8,["modelValue"]),t.createVNode(l,{modelValue:e.senha,"onUpdate:modelValue":a[9]||(a[9]=r=>e.senha=r),label:"Senha",type:"password",showPasswordToggle:!0,placeholder:"Digite sua senha"},null,8,["modelValue"]),t.createVNode(l,{type:"textarea",modelValue:e.mensagem,"onUpdate:modelValue":a[10]||(a[10]=r=>e.mensagem=r),label:"Mensagem",rows:5},null,8,["modelValue"]),t.createVNode(l,{type:"radio",modelValue:e.cor,"onUpdate:modelValue":a[11]||(a[11]=r=>e.cor=r),label:"Cor favorita",options:[{label:"Azul",value:"azul"},{label:"Verde",value:"verde"}]},null,8,["modelValue"]),t.createVNode(l,{type:"checkbox",modelValue:e.habilidades,"onUpdate:modelValue":a[12]||(a[12]=r=>e.habilidades=r),options:[{label:"Vue",value:"vue"},{label:"React",value:"react"}]},null,8,["modelValue"]),t.createVNode(l,{modelValue:e.nome,"onUpdate:modelValue":a[13]||(a[13]=r=>e.nome=r),label:"Nome",error:!0,"error-messages":["Obrigatório"]},null,8,["modelValue"])])]),_:1}),t.createVNode(ee.VCardActions,null,{default:t.withCtx(()=>[t.createVNode(p,{color:"primary",variant:"elevated",block:""},{default:t.withCtx(()=>[...a[16]||(a[16]=[t.createTextVNode(" Botão Vuetify ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})}const $e=O(ct,[["render",ut]]),mt=t.defineComponent({name:"EliCartao",components:{EliBadge:ce},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),i=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 f(){a("clicar",e.status)}return{rotuloStatus:n,corStatus:i,classeStatus:s,onClick:f}}}),pt={class:"eli-cartao__titulo-texto"},ft={class:"eli-cartao__status"};function bt(e,a,n,i,s,f){const o=t.resolveComponent("EliBadge");return t.openBlock(),t.createBlock(ee.VCard,t.mergeProps({class:["eli-cartao",e.classeStatus],variant:e.variant},e.$attrs),{default:t.withCtx(()=>[t.createVNode(ee.VCardTitle,{class:"eli-cartao__titulo"},{default:t.withCtx(()=>[t.createElementVNode("div",pt,[t.renderSlot(e.$slots,"titulo",{},()=>[t.createTextVNode(t.toDisplayString(e.titulo),1)],!0)]),t.createElementVNode("div",ft,[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(ee.VCardText,{class:"eli-cartao__conteudo"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3}),e.$slots.acoes?(t.openBlock(),t.createBlock(ee.VCardActions,{key:0,class:"eli-cartao__acoes"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"acoes",{},void 0,!0)]),_:3})):t.createCommentVNode("",!0)]),_:3},16,["variant","class"])}const ke=O(mt,[["render",bt],["__scopeId","data-v-6c492bd9"]]);function ht(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var de={exports:{}},gt=de.exports,Be;function yt(){return Be||(Be=1,(function(e,a){(function(n,i){e.exports=i()})(gt,(function(){var n=1e3,i=6e4,s=36e5,f="millisecond",o="second",l="minute",p="hour",r="day",u="week",y="month",_="quarter",C="year",$="date",b="Invalid Date",D=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,k=/\[([^\]]+)]|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(B){var m=["th","st","nd","rd"],c=B%100;return"["+B+(m[(c-20)%10]||m[c]||m[0])+"]"}},G=function(B,m,c){var g=String(B);return!g||g.length>=m?B:""+Array(m+1-g.length).join(c)+B},K={s:G,z:function(B){var m=-B.utcOffset(),c=Math.abs(m),g=Math.floor(c/60),d=c%60;return(m<=0?"+":"-")+G(g,2,"0")+":"+G(d,2,"0")},m:function B(m,c){if(m.date()1)return B(S[0])}else{var M=m.name;X[M]=m,d=M}return!g&&d&&(Z=d),d||!g&&Z},U=function(B,m){if(H(B))return B.clone();var c=typeof m=="object"?m:{};return c.date=B,c.args=arguments,new ne(c)},w=K;w.l=oe,w.i=H,w.w=function(B,m){return U(B,{locale:m.$L,utc:m.$u,x:m.$x,$offset:m.$offset})};var ne=(function(){function B(c){this.$L=oe(c.locale,null,!0),this.parse(c),this.$x=this.$x||c.x||{},this[te]=!0}var m=B.prototype;return m.parse=function(c){this.$d=(function(g){var d=g.date,V=g.utc;if(d===null)return new Date(NaN);if(w.u(d))return new Date;if(d instanceof Date)return new Date(d);if(typeof d=="string"&&!/Z$/i.test(d)){var S=d.match(D);if(S){var M=S[2]-1||0,I=(S[7]||"0").substring(0,3);return V?new Date(Date.UTC(S[1],M,S[3]||1,S[4]||0,S[5]||0,S[6]||0,I)):new Date(S[1],M,S[3]||1,S[4]||0,S[5]||0,S[6]||0,I)}}return new Date(d)})(c),this.init()},m.init=function(){var c=this.$d;this.$y=c.getFullYear(),this.$M=c.getMonth(),this.$D=c.getDate(),this.$W=c.getDay(),this.$H=c.getHours(),this.$m=c.getMinutes(),this.$s=c.getSeconds(),this.$ms=c.getMilliseconds()},m.$utils=function(){return w},m.isValid=function(){return this.$d.toString()!==b},m.isSame=function(c,g){var d=U(c);return this.startOf(g)<=d&&d<=this.endOf(g)},m.isAfter=function(c,g){return U(c)[]},dica:{type:String,default:""},dicaPersistente:{type:Boolean,default:!1},densidade:{type:String,default:"comfortable"},variante:{type:String,default:"outlined"},min:{type:String,default:void 0},max:{type:String,default:void 0}},emits:{"update:modelValue":e=>!0,alterar:e=>!0,foco:()=>!0,desfoco:()=>!0},setup(e,{emit:a,attrs:n}){const i=t.computed(()=>e.modo==="data"?"date":"datetime-local");function s(r){return e.modo==="data"?ue(r).format("YYYY-MM-DD"):ue(r).format("YYYY-MM-DDTHH:mm")}function f(r){return e.modo==="data"?ue(`${r}T00:00`).format():ue(r).format()}const o=t.computed({get:()=>e.modelValue?s(e.modelValue):"",set:r=>{const u=r&&r.length>0?r:null;if(!u){a("update:modelValue",null),a("alterar",null);return}const y=f(u);a("update:modelValue",y),a("alterar",y)}}),l=t.computed(()=>{if(e.min)return s(e.min)}),p=t.computed(()=>{if(e.max)return s(e.max)});return{attrs:n,valor:o,emit:a,minLocal:l,maxLocal:p,tipoInput:i}}}),Bt={class:"eli-data-hora"};function Et(e,a,n,i,s,f){return t.openBlock(),t.createElementBlock("div",Bt,[t.createVNode(se.VTextField,t.mergeProps({modelValue:e.valor,"onUpdate:modelValue":a[0]||(a[0]=o=>e.valor=o),type:e.tipoInput,label:e.rotulo,placeholder:e.placeholder,disabled:e.desabilitado,clearable:e.limpavel,error:e.erro,"error-messages":e.mensagensErro,hint:e.dica,"persistent-hint":e.dicaPersistente,density:e.densidade,variant:e.variante,min:e.minLocal,max:e.maxLocal},e.attrs,{onFocus:a[1]||(a[1]=o=>e.emit("foco")),onBlur:a[2]||(a[2]=o=>e.emit("desfoco"))}),null,16,["modelValue","type","label","placeholder","disabled","clearable","error","error-messages","hint","persistent-hint","density","variant","min","max"])])}const Ee=O(kt,[["render",Et],["__scopeId","data-v-71afabb6"]]);var Ce=(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))(Ce||{});/** +(function(A,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("vuetify/components/VBtn"),require("vuetify/components/VBadge"),require("vuetify/components/VCheckbox"),require("vuetify/components/VIcon"),require("vuetify/components/VRadio"),require("vuetify/components/VRadioGroup"),require("vuetify/components/VSelect"),require("vuetify/components/VTextField"),require("vuetify/components/VTextarea"),require("vuetify/components/VCard"),require("vuetify/components/VGrid")):typeof define=="function"&&define.amd?define(["exports","vue","vuetify/components/VBtn","vuetify/components/VBadge","vuetify/components/VCheckbox","vuetify/components/VIcon","vuetify/components/VRadio","vuetify/components/VRadioGroup","vuetify/components/VSelect","vuetify/components/VTextField","vuetify/components/VTextarea","vuetify/components/VCard","vuetify/components/VGrid"],t):(A=typeof globalThis<"u"?globalThis:A||self,t(A.eli_vue={},A.Vue,A.VBtn,A.VBadge,A.VCheckbox,A.VIcon,A.VRadio,A.VRadioGroup,A.VSelect,A.VTextField,A.VTextarea,A.VCard,A.VGrid))})(this,(function(A,t,Le,ze,je,Ue,He,Re,Ye,se,Je,ee,Ge){"use strict";const We=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}}}),O=(e,a)=>{const n=e.__vccOpts||e;for(const[r,s]of a)n[r]=s;return n};function Ze(e,a,n,r,s,b){return t.openBlock(),t.createBlock(Le.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 pe=O(We,[["render",Ze]]),ge={suave:"4px",pill:"10px"},Xe=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 ge?ge[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 Ke(e,a,n,r,s,b){return e.showBadge?(t.openBlock(),t.createBlock(ze.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",{},void 0,!0)]),_:3},16,["color","location","offset-x","offset-y","dot","content","style"])):t.renderSlot(e.$slots,"default",{key:1},void 0,!0)}const ce=O(Xe,[["render",Ke],["__scopeId","data-v-371c8db4"]]);function Qe(e){return e.replace(/\D+/g,"")}function xe(e){const a=Qe(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 et(e){return e.replace(/\D+/g,"")}function tt(e){const a=et(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 fe(e){return e.replace(/\D+/g,"")}function ye(e){const a=e.replace(/[^\d,]/g,""),n=a.split(",");return n.length>2?n[0]+","+n.slice(1).join(""):a}function at(e){return ye(e.replace(/%/g,""))}function ot(e){const a=fe(e);return a?(parseInt(a,10)/100).toFixed(2).replace(".",",").replace(/\B(?=(\d{3})+(?!\d))/g,"."):""}function nt(e){const a=fe(e).slice(0,8);return a.length<=5?a:a.replace(/^(\d{5})(\d{1,3})$/,"$1-$2")}const lt=t.defineComponent({name:"EliInput",inheritAttrs:!1,props:{modelValue:{type:[String,Number,Boolean,Array],default:""},type:{type:String,default:"text"},label:String,placeholder:String,disabled:Boolean,error:Boolean,errorMessages:{type:[String,Array],default:()=>[]},hint:String,persistentHint:Boolean,rows:{type:Number,default:4},options:{type:Array,default:()=>[]},clearable:Boolean,variant:{type:String,default:"outlined"},density:{type:String,default:"comfortable"},color:{type:String,default:"primary"},row:Boolean,showPasswordToggle:Boolean,multiple:Boolean,chips:Boolean},emits:["update:modelValue","change","focus","blur"],setup(e,{emit:a,attrs:n}){const r=t.ref(!1),s=t.ref(!1),b=t.computed({get:()=>e.modelValue,set:B=>{a("update:modelValue",B),a("change",B)}}),o=t.computed(()=>["text","password","email","search","url","telefone","cpfCnpj","numericoInteiro","numericoDecimal","numericoMoeda","porcentagem","cep"].includes(e.type)),l=t.computed(()=>e.type==="password"?s.value?"text":"password":"text"),f=t.computed(()=>{if(e.type==="telefone")return"tel";if(e.type==="porcentagem")return"decimal";if(e.type.startsWith("numerico"))return"numeric"}),i=t.computed(()=>e.error?"error":r.value?e.color:void 0);function m(B){const $=B.target;let d=$.value;switch(e.type){case"numericoInteiro":d=fe(d);break;case"numericoDecimal":d=ye(d);break;case"numericoMoeda":d=ot(d);break;case"porcentagem":d=at(d);break;case"telefone":d=tt(d);break;case"cpfCnpj":d=xe(d);break;case"cep":d=nt(d);break}$.value=d,a("update:modelValue",d),a("change",d)}function k(){s.value=!s.value}const D=t.computed(()=>(e.options||[]).map(B=>{if(B&&typeof B=="object"&&"value"in B){const d=B.value;return{label:B.label??String(d),value:d,disabled:B.disabled}}const $=B;return{label:String($),value:$}}));return{attrs:n,value:b,isTextLike:o,inputHtmlType:l,inputMode:f,internalColor:i,showPassword:s,togglePassword:k,onInput:m,onFocus:()=>a("focus"),onBlur:()=>a("blur"),computedItems:D}}}),rt={class:"eli-input"},it={key:4,class:"checkbox-group"};function st(e,a,n,r,s,b){return t.openBlock(),t.createElementBlock("div",rt,[e.isTextLike?(t.openBlock(),t.createBlock(se.VTextField,t.mergeProps({key:0,modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=o=>e.value=o),type:e.inputHtmlType,label:e.label,placeholder:e.placeholder,disabled:e.disabled,clearable:e.clearable&&e.type!=="password",error:e.error,"error-messages":e.errorMessages,hint:e.hint,"persistent-hint":e.persistentHint,density:e.density,variant:e.variant,color:e.internalColor,inputmode:e.inputMode,suffix:e.type==="porcentagem"?"%":void 0},e.attrs,{onFocus:e.onFocus,onBlur:e.onBlur,onInput:e.onInput}),t.createSlots({_:2},[e.type==="password"&&e.showPasswordToggle?{name:"append-inner",fn:t.withCtx(()=>[t.createVNode(Ue.VIcon,{class:"cursor-pointer",onClick:e.togglePassword},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.showPassword?"mdi-eye-off":"mdi-eye"),1)]),_:1},8,["onClick"])]),key:"0"}:void 0]),1040,["modelValue","type","label","placeholder","disabled","clearable","error","error-messages","hint","persistent-hint","density","variant","color","inputmode","suffix","onFocus","onBlur","onInput"])):e.type==="textarea"?(t.openBlock(),t.createBlock(Je.VTextarea,t.mergeProps({key:1,modelValue:e.value,"onUpdate:modelValue":a[1]||(a[1]=o=>e.value=o),label:e.label,rows:e.rows,density:e.density,variant:e.variant},e.attrs),null,16,["modelValue","label","rows","density","variant"])):e.type==="select"?(t.openBlock(),t.createBlock(Ye.VSelect,t.mergeProps({key:2,modelValue:e.value,"onUpdate:modelValue":a[2]||(a[2]=o=>e.value=o),items:e.computedItems,label:e.label,placeholder:e.placeholder,multiple:e.multiple,chips:e.chips,clearable:e.clearable,disabled:e.disabled,density:e.density,variant:e.variant,"item-title":"label","item-value":"value",error:e.error,"error-messages":e.errorMessages},e.attrs,{onFocus:e.onFocus,onBlur:e.onBlur}),null,16,["modelValue","items","label","placeholder","multiple","chips","clearable","disabled","density","variant","error","error-messages","onFocus","onBlur"])):e.type==="radio"?(t.openBlock(),t.createBlock(Re.VRadioGroup,{key:3,modelValue:e.value,"onUpdate:modelValue":a[3]||(a[3]=o=>e.value=o),row:e.row},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.computedItems,o=>(t.openBlock(),t.createBlock(He.VRadio,{key:String(o.value),label:o.label,value:o.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","row"])):e.type==="checkbox"?(t.openBlock(),t.createElementBlock("div",it,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.computedItems,o=>(t.openBlock(),t.createBlock(je.VCheckbox,{key:String(o.value),modelValue:e.value,"onUpdate:modelValue":a[4]||(a[4]=l=>e.value=l),label:o.label,value:o.value,density:e.density},null,8,["modelValue","label","value","density"]))),128))])):t.createCommentVNode("",!0)])}const be=O(lt,[["render",st],["__scopeId","data-v-756cb549"]]),ct=t.defineComponent({name:"EliOlaMundo",components:{EliBotao:pe,EliBadge:ce,EliInput:be},setup(){const e=t.ref(""),a=t.ref([]),n=t.ref(""),r=t.ref(""),s=t.ref(""),b=t.ref(""),o=t.ref(""),l=t.ref(""),f=t.ref(""),i=t.ref(""),m=t.ref(""),k=t.ref(null),D=t.ref([]);return{nome:e,email:l,documento:m,estado:a,telefone:r,mensagem:f,senha:i,cor:k,habilidades:D,idade:s,altura:b,cep:n,valor:o}}}),dt={class:"grid-example"};function ut(e,a,n,r,s,b){const o=t.resolveComponent("EliBadge"),l=t.resolveComponent("EliInput"),f=t.resolveComponent("EliBotao");return t.openBlock(),t.createBlock(Ge.VContainer,null,{default:t.withCtx(()=>[t.createVNode(ee.VCard,{class:"mx-auto",max_width:"400"},{default:t.withCtx(()=>[t.createVNode(ee.VCardTitle,null,{default:t.withCtx(()=>[t.createVNode(o,{badge:"Novo","offset-x":"-15",location:"right center"},{default:t.withCtx(()=>[...a[14]||(a[14]=[t.createTextVNode(" Olá Mundo! ",-1)])]),_:1})]),_:1}),t.createVNode(ee.VCardText,null,{default:t.withCtx(()=>[a[15]||(a[15]=t.createTextVNode(" Este é um componente de exemplo integrado com Vuetify. ",-1)),t.createElementVNode("div",dt,[t.createVNode(l,{modelValue:e.nome,"onUpdate:modelValue":a[0]||(a[0]=i=>e.nome=i),label:"Nome",placeholder:"Digite o nome",density:"compact"},null,8,["modelValue"]),t.createVNode(l,{modelValue:e.idade,"onUpdate:modelValue":a[1]||(a[1]=i=>e.idade=i),type:"numericoInteiro",label:"Idade",density:"default"},null,8,["modelValue"]),t.createVNode(l,{modelValue:e.altura,"onUpdate:modelValue":a[2]||(a[2]=i=>e.altura=i),type:"numericoDecimal",label:"Altura",density:"comfortable"},null,8,["modelValue"]),t.createVNode(l,{modelValue:e.valor,"onUpdate:modelValue":a[3]||(a[3]=i=>e.valor=i),type:"numericoMoeda",label:"Valor"},null,8,["modelValue"]),t.createVNode(l,{modelValue:e.telefone,"onUpdate:modelValue":a[4]||(a[4]=i=>e.telefone=i),type:"telefone",label:"Telefone"},null,8,["modelValue"]),t.createVNode(l,{modelValue:e.cep,"onUpdate:modelValue":a[5]||(a[5]=i=>e.cep=i),type:"cep",label:"CEP",placeholder:"00000-000"},null,8,["modelValue"]),t.createVNode(l,{type:"select",label:"Estado",options:[{label:"São Paulo",value:"SP"},{label:"Rio de Janeiro",value:"RJ"}],modelValue:e.estado,"onUpdate:modelValue":a[6]||(a[6]=i=>e.estado=i),multiple:""},null,8,["modelValue"]),t.createVNode(l,{modelValue:e.documento,"onUpdate:modelValue":a[7]||(a[7]=i=>e.documento=i),type:"cpfCnpj",label:"CPF / CNPJ"},null,8,["modelValue"]),t.createVNode(l,{modelValue:e.email,"onUpdate:modelValue":a[8]||(a[8]=i=>e.email=i),label:"Email",placeholder:"email@exemplo.com"},null,8,["modelValue"]),t.createVNode(l,{modelValue:e.senha,"onUpdate:modelValue":a[9]||(a[9]=i=>e.senha=i),label:"Senha",type:"password",showPasswordToggle:!0,placeholder:"Digite sua senha"},null,8,["modelValue"]),t.createVNode(l,{type:"textarea",modelValue:e.mensagem,"onUpdate:modelValue":a[10]||(a[10]=i=>e.mensagem=i),label:"Mensagem",rows:5},null,8,["modelValue"]),t.createVNode(l,{type:"radio",modelValue:e.cor,"onUpdate:modelValue":a[11]||(a[11]=i=>e.cor=i),label:"Cor favorita",options:[{label:"Azul",value:"azul"},{label:"Verde",value:"verde"}]},null,8,["modelValue"]),t.createVNode(l,{type:"checkbox",modelValue:e.habilidades,"onUpdate:modelValue":a[12]||(a[12]=i=>e.habilidades=i),options:[{label:"Vue",value:"vue"},{label:"React",value:"react"}]},null,8,["modelValue"]),t.createVNode(l,{modelValue:e.nome,"onUpdate:modelValue":a[13]||(a[13]=i=>e.nome=i),label:"Nome",error:!0,"error-messages":["Obrigatório"]},null,8,["modelValue"])])]),_:1}),t.createVNode(ee.VCardActions,null,{default:t.withCtx(()=>[t.createVNode(f,{color:"primary",variant:"elevated",block:""},{default:t.withCtx(()=>[...a[16]||(a[16]=[t.createTextVNode(" Botão Vuetify ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})}const $e=O(ct,[["render",ut]]),mt=t.defineComponent({name:"EliCartao",components:{EliBadge:ce},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 b(){a("clicar",e.status)}return{rotuloStatus:n,corStatus:r,classeStatus:s,onClick:b}}}),pt={class:"eli-cartao__titulo-texto"},ft={class:"eli-cartao__status"};function bt(e,a,n,r,s,b){const o=t.resolveComponent("EliBadge");return t.openBlock(),t.createBlock(ee.VCard,t.mergeProps({class:["eli-cartao",e.classeStatus],variant:e.variant},e.$attrs),{default:t.withCtx(()=>[t.createVNode(ee.VCardTitle,{class:"eli-cartao__titulo"},{default:t.withCtx(()=>[t.createElementVNode("div",pt,[t.renderSlot(e.$slots,"titulo",{},()=>[t.createTextVNode(t.toDisplayString(e.titulo),1)],!0)]),t.createElementVNode("div",ft,[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(ee.VCardText,{class:"eli-cartao__conteudo"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3}),e.$slots.acoes?(t.openBlock(),t.createBlock(ee.VCardActions,{key:0,class:"eli-cartao__acoes"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"acoes",{},void 0,!0)]),_:3})):t.createCommentVNode("",!0)]),_:3},16,["variant","class"])}const ke=O(mt,[["render",bt],["__scopeId","data-v-6c492bd9"]]);var Ee=(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))(Ee||{});/** * @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 Ct=e=>{for(const a in e)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1};/** + */const ht=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. * See the LICENSE file in the root directory of this source tree. - */const Ve=e=>e==="";/** + */const Be=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 Vt=(...e)=>e.filter((a,n,i)=>!!a&&a.trim()!==""&&i.indexOf(a)===n).join(" ").trim();/** + */const gt=(...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. * See the LICENSE file in the root directory of this source tree. - */const Se=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/** + */const Ce=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 St=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,n,i)=>i?i.toUpperCase():n.toLowerCase());/** + */const yt=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 vt=e=>{const a=St(e);return a.charAt(0).toUpperCase()+a.slice(1)};/** + */const $t=e=>{const a=yt(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,39 +38,39 @@ * * 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":i,strokeWidth:s,"stroke-width":f,size:o=le.width,color:l=le.stroke,...p},{slots:r})=>t.h("svg",{...le,...p,width:o,height:o,stroke:l,"stroke-width":Ve(n)||Ve(i)||n===!0||i===!0?Number(s||f||le["stroke-width"])*24/Number(o):s||f||le["stroke-width"],class:Vt("lucide",p.class,...e?[`lucide-${Se(vt(e))}-icon`,`lucide-${Se(e)}`]:["lucide-icon"]),...!r.default&&!Ct(p)&&{"aria-hidden":"true"}},[...a.map(u=>t.h(...u)),...r.default?[r.default()]:[]]);/** + */const kt=({name:e,iconNode:a,absoluteStrokeWidth:n,"absolute-stroke-width":r,strokeWidth:s,"stroke-width":b,size:o=le.width,color:l=le.stroke,...f},{slots:i})=>t.h("svg",{...le,...f,width:o,height:o,stroke:l,"stroke-width":Be(n)||Be(r)||n===!0||r===!0?Number(s||b||le["stroke-width"])*24/Number(o):s||b||le["stroke-width"],class:gt("lucide",f.class,...e?[`lucide-${Ce($t(e))}-icon`,`lucide-${Ce(e)}`]:["lucide-icon"]),...!i.default&&!ht(f)&&{"aria-hidden":"true"}},[...a.map(m=>t.h(...m)),...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 ae=(e,a)=>(n,{slots:i,attrs:s})=>t.h(Dt,{...s,...n,iconNode:a,name:e},i);/** + */const ae=(e,a)=>(n,{slots:r,attrs:s})=>t.h(kt,{...s,...n,iconNode:a,name:e},r);/** * @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 ve=ae("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** + */const Ve=ae("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** * @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 De=ae("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** + */const ve=ae("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** * @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 _e=ae("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + */const Se=ae("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @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 we=ae("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + */const _e=ae("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** * @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 _t=ae("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 Et=ae("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 wt=ae("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),Nt=t.defineComponent({name:"EliTabelaCaixaDeBusca",components:{Search:wt},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 i(){a("buscar",n.value.trim())}return{texto:n,emitirBusca:i}}}),Mt={class:"eli-tabela__busca"},At={class:"eli-tabela__busca-input-wrapper"};function Tt(e,a,n,i,s,f){const o=t.resolveComponent("Search");return t.openBlock(),t.createElementBlock("div",Mt,[t.createElementVNode("div",At,[t.withDirectives(t.createElementVNode("input",{id:"eli-tabela-busca","onUpdate:modelValue":a[0]||(a[0]=l=>e.texto=l),type:"search",class:"eli-tabela__busca-input",placeholder:"Digite termos para filtrar",onKeyup:a[1]||(a[1]=t.withKeys((...l)=>e.emitirBusca&&e.emitirBusca(...l),["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]=(...l)=>e.emitirBusca&&e.emitirBusca(...l))},[t.createVNode(o,{class:"eli-tabela__busca-botao-icone",size:16,"stroke-width":2,"aria-hidden":"true"})])])])}const Pt=O(Nt,[["render",Tt],["__scopeId","data-v-341415d1"]]),It=t.defineComponent({name:"EliTabelaCabecalho",components:{EliTabelaCaixaDeBusca:Pt},props:{exibirBusca:{type:Boolean,required:!0},exibirBotaoColunas:{type:Boolean,required:!1,default:!0},valorBusca:{type:String,required:!0},acoesCabecalho:{type:Array,required:!0}},emits:{buscar(e){return typeof e=="string"},colunas(){return!0}},setup(e,{emit:a}){const n=t.computed(()=>e.acoesCabecalho.length>0);function i(f){a("buscar",f)}function s(){a("colunas")}return{temAcoesCabecalho:n,emitBuscar:i,emitColunas:s}}}),Ot={class:"eli-tabela__cabecalho"},qt={key:0,class:"eli-tabela__busca-grupo"},Ft={key:1,class:"eli-tabela__acoes-cabecalho"},Lt=["onClick"],zt={class:"eli-tabela__acoes-cabecalho-rotulo"};function jt(e,a,n,i,s,f){const o=t.resolveComponent("EliTabelaCaixaDeBusca");return t.openBlock(),t.createElementBlock("div",Ot,[e.exibirBusca?(t.openBlock(),t.createElementBlock("div",qt,[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]=(...l)=>e.emitColunas&&e.emitColunas(...l))}," Colunas ")):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",Ft,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.acoesCabecalho,(l,p)=>(t.openBlock(),t.createElementBlock("button",{key:`${l.rotulo}-${p}`,type:"button",class:"eli-tabela__acoes-cabecalho-botao",style:t.normalizeStyle(l.cor?{backgroundColor:l.cor,color:"#fff"}:void 0),onClick:l.acao},[l.icone?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.icone),{key:0,class:"eli-tabela__acoes-cabecalho-icone",size:16,"stroke-width":2})):t.createCommentVNode("",!0),t.createElementVNode("span",zt,t.toDisplayString(l.rotulo),1)],12,Lt))),128))])):t.createCommentVNode("",!0)])}const Ut=O(It,[["render",jt],["__scopeId","data-v-42938cb8"]]),Ht=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"},Yt={key:1,class:"eli-tabela eli-tabela--erro",role:"alert"},Jt={class:"eli-tabela__erro-mensagem"},Gt={key:2,class:"eli-tabela eli-tabela--vazio"};function Wt(e,a,n,i,s,f){return e.carregando?(t.openBlock(),t.createElementBlock("div",Rt," Carregando... ")):e.erro?(t.openBlock(),t.createElementBlock("div",Yt,[a[0]||(a[0]=t.createElementVNode("div",{class:"eli-tabela__erro-titulo"},"Erro",-1)),t.createElementVNode("div",Jt,t.toDisplayString(e.erro),1)])):(t.openBlock(),t.createElementBlock("div",Gt,t.toDisplayString(e.mensagemVazio??"Nenhum registro encontrado."),1))}const Zt=O(Ht,[["render",Wt]]),Xt=t.defineComponent({name:"EliTabelaDebug",props:{isDev:{type:Boolean,required:!0},menuAberto:{type:Number,required:!0},menuPopupPos:{type:Object,required:!0}}}),Kt={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 Qt(e,a,n,i,s,f){return e.isDev?(t.openBlock(),t.createElementBlock("div",Kt,[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.createCommentVNode("",!0)}const xt=O(Xt,[["render",Qt]]),ea=t.defineComponent({name:"EliTabelaHead",components:{ArrowUp:De,ArrowDown:ve},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 i(s){a("alternarOrdenacao",s)}return{ArrowUp:De,ArrowDown:ve,isOrdenavel:n,emitAlternarOrdenacao:i}}}),ta={class:"eli-tabela__thead"},aa={class:"eli-tabela__tr eli-tabela__tr--header"},oa={key:0,class:"eli-tabela__th eli-tabela__th--expander",scope:"col"},na=["onClick"],la={class:"eli-tabela__th-texto"},ra={key:1,class:"eli-tabela__th-label"},ia={key:1,class:"eli-tabela__th eli-tabela__th--acoes",scope:"col"};function sa(e,a,n,i,s,f){const o=t.resolveComponent("ArrowUp");return t.openBlock(),t.createElementBlock("thead",ta,[t.createElementVNode("tr",aa,[e.temColunasInvisiveis?(t.openBlock(),t.createElementBlock("th",oa)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.colunas,(l,p)=>(t.openBlock(),t.createElementBlock("th",{key:`th-${p}`,class:t.normalizeClass(["eli-tabela__th",[e.isOrdenavel(l)?"eli-tabela__th--ordenavel":void 0]]),scope:"col"},[e.isOrdenavel(l)?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:t.normalizeClass(["eli-tabela__th-botao",[e.colunaOrdenacao===String(l.coluna_ordem)?"eli-tabela__th-botao--ativo":void 0]]),onClick:r=>e.emitAlternarOrdenacao(String(l.coluna_ordem))},[t.createElementVNode("span",la,t.toDisplayString(l.rotulo),1),e.colunaOrdenacao===String(l.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,na)):(t.openBlock(),t.createElementBlock("span",ra,t.toDisplayString(l.rotulo),1))],2))),128)),e.temAcoes?(t.openBlock(),t.createElementBlock("th",ia," Ações ")):t.createCommentVNode("",!0)])])}const ca=O(ea,[["render",sa]]),da=t.defineComponent({name:"EliTabelaCelulaTextoSimples",components:{},props:{dados:{type:Object}},data(){return{}},methods:{},setup({dados:e}){return{dados:e}}}),ua={key:1};function ma(e,a,n,i,s,f){var o,l,p;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((l=e.dados)==null?void 0:l.texto),1)):(t.openBlock(),t.createElementBlock("span",ua,t.toDisplayString((p=e.dados)==null?void 0:p.texto),1))}const pa=O(da,[["render",ma],["__scopeId","data-v-7a629ffa"]]),fa=t.defineComponent({name:"EliTabelaCelulaTextoTruncado",props:{dados:{type:Object}},setup({dados:e}){return{dados:e}}}),ba=["title"],ha=["title"];function ga(e,a,n,i,s,f){var o,l,p,r,u;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:(l=e.dados)==null?void 0:l.texto,onClick:a[0]||(a[0]=t.withModifiers(y=>e.dados.acao(),["stop","prevent"]))},t.toDisplayString((p=e.dados)==null?void 0:p.texto),9,ba)):(t.openBlock(),t.createElementBlock("span",{key:1,class:"eli-tabela__texto-truncado",title:(r=e.dados)==null?void 0:r.texto},t.toDisplayString((u=e.dados)==null?void 0:u.texto),9,ha))}const ya=O(fa,[["render",ga],["__scopeId","data-v-74854889"]]),$a=t.defineComponent({name:"EliTabelaCelulaNumero",components:{},props:{dados:{type:Object}},data(){return{}},methods:{},setup({dados:e}){return{dados:e}}}),ka={key:1};function Ba(e,a,n,i,s,f){var o,l,p;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(String((l=e.dados)==null?void 0:l.numero).replace(".",",")),1)):(t.openBlock(),t.createElementBlock("span",ka,t.toDisplayString(String((p=e.dados)==null?void 0:p.numero).replace(".",",")),1))}const Ea={textoSimples:pa,textoTruncado:ya,numero:O($a,[["render",Ba],["__scopeId","data-v-e7bac7ff"]])},Ca=t.defineComponent({name:"EliTabelaCelula",props:{celula:{type:Array,required:!0}},setup(e){const a=t.computed(()=>e.celula[0]),n=t.computed(()=>e.celula[1]),i=t.computed(()=>Ea[a.value]),s=t.computed(()=>n.value);return{Componente:i,dadosParaComponente:s}}});function Va(e,a,n,i,s,f){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Componente),{dados:e.dadosParaComponente},null,8,["dados"])}const Ne=O(Ca,[["render",Va]]),Sa=t.defineComponent({name:"EliTabelaDetalhesLinha",components:{EliTabelaCelula:Ne},props:{linha:{type:null,required:!0},colunasInvisiveis:{type:Array,required:!0}}}),va={class:"eli-tabela__detalhes"},Da={class:"eli-tabela__detalhe-rotulo"},_a={class:"eli-tabela__detalhe-valor"};function wa(e,a,n,i,s,f){const o=t.resolveComponent("EliTabelaCelula");return t.openBlock(),t.createElementBlock("div",va,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.colunasInvisiveis,(l,p)=>(t.openBlock(),t.createElementBlock("div",{key:`det-${p}-${l.rotulo}`,class:"eli-tabela__detalhe"},[t.createElementVNode("div",Da,t.toDisplayString(l.rotulo),1),t.createElementVNode("div",_a,[t.createVNode(o,{celula:l.celula(e.linha)},null,8,["celula"])])]))),128))])}const Na=O(Sa,[["render",wa],["__scopeId","data-v-f1ee8d20"]]),Ma=t.defineComponent({name:"EliTabelaBody",components:{EliTabelaCelula:Ne,EliTabelaDetalhesLinha:Na,MoreVertical:_t,ChevronRight:we,ChevronDown:_e},props:{colunas:{type:Array,required:!0},colunasInvisiveis:{type:Array,required:!0},temColunasInvisiveis:{type:Boolean,required:!0},linhasExpandidas:{type:Object,required:!0},linhas:{type:Array,required:!0},temAcoes:{type:Boolean,required:!0},menuAberto:{type:Number,required:!0},possuiAcoes:{type:Function,required:!0},toggleMenu:{type:Function,required:!0},alternarLinhaExpandida:{type:Function,required:!0}},setup(){return{ChevronRight:we,ChevronDown:_e}}}),Aa={class:"eli-tabela__tbody"},Ta=["aria-expanded","aria-label","title","onClick"],Pa=["id","disabled","aria-expanded","aria-controls","aria-label","title","onClick"],Ia=["colspan"];function Oa(e,a,n,i,s,f){const o=t.resolveComponent("EliTabelaCelula"),l=t.resolveComponent("MoreVertical"),p=t.resolveComponent("EliTabelaDetalhesLinha");return t.openBlock(),t.createElementBlock("tbody",Aa,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.linhas,(r,u)=>{var y,_,C,$,b,D;return t.openBlock(),t.createElementBlock(t.Fragment,{key:`grp-${u}`},[t.createElementVNode("tr",{class:t.normalizeClass(["eli-tabela__tr",[u%2===1?"eli-tabela__tr--zebra":void 0]])},[e.temColunasInvisiveis?(t.openBlock(),t.createElementBlock("td",{class:"eli-tabela__td eli-tabela__td--expander",key:`td-${u}-exp`},[t.createElementVNode("button",{type:"button",class:t.normalizeClass(["eli-tabela__expander-botao",[(y=e.linhasExpandidas)!=null&&y[u]?"eli-tabela__expander-botao--ativo":void 0]]),"aria-expanded":(_=e.linhasExpandidas)!=null&&_[u]?"true":"false","aria-label":(C=e.linhasExpandidas)!=null&&C[u]?"Ocultar colunas ocultas":"Mostrar colunas ocultas",title:($=e.linhasExpandidas)!=null&&$[u]?"Ocultar detalhes":"Mostrar detalhes",onClick:t.withModifiers(k=>e.alternarLinhaExpandida(u),["stop"])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent((b=e.linhasExpandidas)!=null&&b[u]?e.ChevronDown:e.ChevronRight),{class:"eli-tabela__expander-icone",size:16,"stroke-width":2,"aria-hidden":"true"}))],10,Ta)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.colunas,(k,E)=>(t.openBlock(),t.createElementBlock("td",{key:`td-${u}-${E}`,class:"eli-tabela__td"},[t.createVNode(o,{celula:k.celula(r)},null,8,["celula"])]))),128)),e.temAcoes?(t.openBlock(),t.createElementBlock("td",{class:"eli-tabela__td eli-tabela__td--acoes",key:`td-${u}-acoes`},[t.createElementVNode("div",{class:t.normalizeClass(["eli-tabela__acoes-container",[e.menuAberto===u?"eli-tabela__acoes-container--aberto":void 0]])},[t.createElementVNode("button",{class:"eli-tabela__acoes-toggle",type:"button",id:`eli-tabela-acoes-toggle-${u}`,disabled:!e.possuiAcoes(u),"aria-haspopup":"menu","aria-expanded":e.menuAberto===u?"true":"false","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:t.withModifiers(k=>e.toggleMenu(u,k),["stop"])},[t.createVNode(l,{class:"eli-tabela__acoes-toggle-icone",size:18,"stroke-width":2})],8,Pa)],2)])):t.createCommentVNode("",!0)],2),e.temColunasInvisiveis&&((D=e.linhasExpandidas)!=null&&D[u])?(t.openBlock(),t.createElementBlock("tr",{key:0,class:t.normalizeClass(["eli-tabela__tr eli-tabela__tr--detalhes",[u%2===1?"eli-tabela__tr--zebra":void 0]])},[t.createElementVNode("td",{class:"eli-tabela__td eli-tabela__td--detalhes",colspan:(e.temColunasInvisiveis?1:0)+e.colunas.length+(e.temAcoes?1:0)},[t.createVNode(p,{linha:r,colunasInvisiveis:e.colunasInvisiveis},null,8,["linha","colunasInvisiveis"])],8,Ia)],2)):t.createCommentVNode("",!0)],64)}),128))])}const qa=O(Ma,[["render",Oa]]),Fa=t.defineComponent({name:"EliTabelaMenuAcoes",props:{menuAberto:{type:Number,required:!0},posicao:{type:Object,required:!0},acoes:{type:Array,required:!0},linha:{type:null,required:!0}},emits:{executar(e){return e!==null&&typeof e=="object"}},setup(e,{emit:a,expose:n}){const i=t.ref(null);n({menuEl:i});const s=t.computed(()=>e.acoes.length>0);function f(o){e.linha&&a("executar",{acao:o.acao,linha:e.linha})}return{menuEl:i,possuiAcoes:s,emitExecutar:f}}}),La=["id","aria-labelledby"],za=["aria-label","title","onClick"],ja={class:"eli-tabela__acoes-item-texto"};function Ua(e,a,n,i,s,f){return t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[e.menuAberto!==null&&e.possuiAcoes?(t.openBlock(),t.createElementBlock("ul",{key:0,id:`eli-tabela-acoes-menu-${e.menuAberto}`,ref:"menuEl",class:"eli-tabela__acoes-menu",role:"menu","aria-labelledby":`eli-tabela-acoes-toggle-${e.menuAberto}`,style:t.normalizeStyle({position:"fixed",top:`${e.posicao.top}px`,left:`${e.posicao.left}px`,zIndex:999999})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.acoes,o=>(t.openBlock(),t.createElementBlock("li",{key:`acao-${e.menuAberto}-${o.indice}`,class:"eli-tabela__acoes-item",role:"none"},[t.createElementVNode("button",{type:"button",class:"eli-tabela__acoes-item-botao",style:t.normalizeStyle({color:o.acao.cor}),role:"menuitem","aria-label":o.acao.rotulo,title:o.acao.rotulo,onClick:t.withModifiers(l=>e.emitExecutar(o),["stop"])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.acao.icone),{class:"eli-tabela__acoes-item-icone",size:16,"stroke-width":2})),t.createElementVNode("span",ja,t.toDisplayString(o.acao.rotulo),1)],12,za)]))),128))],12,La)):t.createCommentVNode("",!0)])}const Ha=O(Fa,[["render",Ua]]),Ra=t.defineComponent({name:"EliTabelaPaginacao",props:{pagina:{type:Number,required:!0},totalPaginas:{type:Number,required:!0},maximoBotoes:{type:Number,required:!1}},emits:{alterar(e){return Number.isFinite(e)}},setup(e,{emit:a}){const n=t.computed(()=>{const r=e.maximoBotoes;return typeof r=="number"&&r>=5?Math.floor(r):7}),i=t.computed(()=>{const r=e.totalPaginas,u=e.pagina,y=n.value,_=[],C=E=>{_.push({label:String(E),pagina:E,ativo:E===u})},$=()=>{_.push({label:"…",ehEllipsis:!0})};if(r<=y){for(let E=1;E<=r;E+=1)C(E);return _}const b=Math.max(3,y-2);let D=Math.max(2,u-Math.floor(b/2)),k=D+b-1;k>=r&&(k=r-1,D=k-b+1),C(1),D>2&&$();for(let E=D;E<=k;E+=1)C(E);return ke.pagina<=1),o=t.computed(()=>e.pagina>=e.totalPaginas),l=t.computed(()=>e.pagina),p=t.computed(()=>e.totalPaginas);return{botoes:i,irParaPagina:s,anteriorDesabilitado:f,proximaDesabilitada:o,paginaAtual:l,totalPaginasExibidas:p}}}),Ya={key:0,class:"eli-tabela__paginacao",role:"navigation","aria-label":"Paginação de resultados"},Ja=["disabled"],Ga={key:0,class:"eli-tabela__pagina-ellipsis","aria-hidden":"true"},Wa=["disabled","aria-current","aria-label","onClick"],Za=["disabled"];function Xa(e,a,n,i,s,f){return e.totalPaginasExibidas>1?(t.openBlock(),t.createElementBlock("nav",Ya,[t.createElementVNode("button",{type:"button",class:"eli-tabela__pagina-botao",disabled:e.anteriorDesabilitado,"aria-label":"Página anterior",onClick:a[0]||(a[0]=o=>e.irParaPagina(e.paginaAtual-1))}," << ",8,Ja),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.botoes,(o,l)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`${o.label}-${l}`},[o.ehEllipsis?(t.openBlock(),t.createElementBlock("span",Ga,t.toDisplayString(o.label),1)):(t.openBlock(),t.createElementBlock("button",{key:1,type:"button",class:t.normalizeClass(["eli-tabela__pagina-botao",o.ativo?"eli-tabela__pagina-botao--ativo":void 0]),disabled:o.ativo,"aria-current":o.ativo?"page":void 0,"aria-label":`Ir para página ${o.label}`,onClick:p=>e.irParaPagina(o.pagina)},t.toDisplayString(o.label),11,Wa))],64))),128)),t.createElementVNode("button",{type:"button",class:"eli-tabela__pagina-botao",disabled:e.proximaDesabilitada,"aria-label":"Próxima página",onClick:a[1]||(a[1]=o=>e.irParaPagina(e.paginaAtual+1))}," >> ",8,Za)])):t.createCommentVNode("",!0)}const Ka=O(Ra,[["render",Xa],["__scopeId","data-v-5ca7a362"]]),Me="application/x-eli-tabela-coluna",Qa=t.defineComponent({name:"EliTabelaModalColunas",props:{aberto:{type:Boolean,required:!0},rotulosColunas:{type:Array,required:!0},configInicial:{type:Object,required:!0},colunas:{type:Array,required:!0}},emits:{fechar(){return!0},salvar(e){return!0}},setup(e,{emit:a}){const n=t.ref([]),i=t.ref([]);function s(){var X,te;const $=e.rotulosColunas,b=(((X=e.configInicial.visiveis)==null?void 0:X.length)??0)>0||(((te=e.configInicial.invisiveis)==null?void 0:te.length)??0)>0,D=new Set(e.colunas.filter(H=>H.visivel===!1).map(H=>H.rotulo)),k=b?new Set(e.configInicial.invisiveis??[]):D,E=$.filter(H=>!k.has(H)),G=e.configInicial.visiveis??[],K=new Set(E),Z=[];for(const H of G)K.has(H)&&Z.push(H);for(const H of E)Z.includes(H)||Z.push(H);n.value=Z,i.value=$.filter(H=>k.has(H))}t.watch(()=>[e.aberto,e.rotulosColunas,e.configInicial,e.colunas],()=>{e.aberto&&s()},{deep:!0,immediate:!0});function f(){a("fechar")}function o(){a("salvar",{visiveis:[...n.value],invisiveis:[...i.value]})}function l($,b){var D,k;try{(D=$.dataTransfer)==null||D.setData(Me,JSON.stringify(b)),(k=$.dataTransfer)==null||k.setData("text/plain",b.rotulo),$.dataTransfer.effectAllowed="move"}catch{}}function p($){var b;try{const D=(b=$.dataTransfer)==null?void 0:b.getData(Me);if(!D)return null;const k=JSON.parse(D);return!k||typeof k.rotulo!="string"||k.origem!=="visiveis"&&k.origem!=="invisiveis"?null:k}catch{return null}}function r($){const b=$.origem==="visiveis"?n.value:i.value,D=b.indexOf($.rotulo);D>=0&&b.splice(D,1)}function u($,b,D){const k=$==="visiveis"?n.value:i.value,E=k.indexOf(b);E>=0&&k.splice(E,1),D===null||D<0||D>k.length?k.push(b):k.splice(D,0,b)}function y($,b,D,k){l($,{rotulo:b,origem:D,index:k})}function _($,b,D){const k=p($);if(k)if(r(k),u(b,k.rotulo,D),b==="visiveis"){const E=i.value.indexOf(k.rotulo);E>=0&&i.value.splice(E,1)}else{const E=n.value.indexOf(k.rotulo);E>=0&&n.value.splice(E,1)}}function C($,b,D){const k=p($);if(k)if(r(k),u(b,k.rotulo,null),b==="visiveis"){const E=i.value.indexOf(k.rotulo);E>=0&&i.value.splice(E,1)}else{const E=n.value.indexOf(k.rotulo);E>=0&&n.value.splice(E,1)}}return{visiveisLocal:n,invisiveisLocal:i,emitFechar:f,emitSalvar:o,onDragStart:y,onDropItem:_,onDropLista:C}}}),xa={class:"eli-tabela-modal-colunas__modal",role:"dialog","aria-modal":"true","aria-label":"Configurar colunas"},eo={class:"eli-tabela-modal-colunas__header"},to={class:"eli-tabela-modal-colunas__conteudo"},ao={class:"eli-tabela-modal-colunas__coluna"},oo=["onDragstart","onDrop"],no={class:"eli-tabela-modal-colunas__item-texto"},lo={class:"eli-tabela-modal-colunas__coluna"},ro=["onDragstart","onDrop"],io={class:"eli-tabela-modal-colunas__item-texto"},so={class:"eli-tabela-modal-colunas__footer"};function co(e,a,n,i,s,f){return e.aberto?(t.openBlock(),t.createElementBlock("div",{key:0,class:"eli-tabela-modal-colunas__overlay",role:"presentation",onClick:a[9]||(a[9]=t.withModifiers((...o)=>e.emitFechar&&e.emitFechar(...o),["self"]))},[t.createElementVNode("div",xa,[t.createElementVNode("header",eo,[a[10]||(a[10]=t.createElementVNode("h3",{class:"eli-tabela-modal-colunas__titulo"},"Colunas",-1)),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-colunas__fechar","aria-label":"Fechar",onClick:a[0]||(a[0]=(...o)=>e.emitFechar&&e.emitFechar(...o))}," × ")]),t.createElementVNode("div",to,[t.createElementVNode("div",ao,[a[12]||(a[12]=t.createElementVNode("div",{class:"eli-tabela-modal-colunas__coluna-titulo"},"Visíveis",-1)),t.createElementVNode("div",{class:"eli-tabela-modal-colunas__lista",onDragover:a[2]||(a[2]=t.withModifiers(()=>{},["prevent"])),onDrop:a[3]||(a[3]=o=>e.onDropLista(o,"visiveis",null))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.visiveisLocal,(o,l)=>(t.openBlock(),t.createElementBlock("div",{key:`vis-${o}`,class:"eli-tabela-modal-colunas__item",draggable:"true",onDragstart:p=>e.onDragStart(p,o,"visiveis",l),onDragover:a[1]||(a[1]=t.withModifiers(()=>{},["prevent"])),onDrop:p=>e.onDropItem(p,"visiveis",l)},[a[11]||(a[11]=t.createElementVNode("span",{class:"eli-tabela-modal-colunas__item-handle","aria-hidden":"true"},"⋮⋮",-1)),t.createElementVNode("span",no,t.toDisplayString(o),1)],40,oo))),128))],32)]),t.createElementVNode("div",lo,[a[14]||(a[14]=t.createElementVNode("div",{class:"eli-tabela-modal-colunas__coluna-titulo"},"Invisíveis",-1)),t.createElementVNode("div",{class:"eli-tabela-modal-colunas__lista",onDragover:a[5]||(a[5]=t.withModifiers(()=>{},["prevent"])),onDrop:a[6]||(a[6]=o=>e.onDropLista(o,"invisiveis",null))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.invisiveisLocal,(o,l)=>(t.openBlock(),t.createElementBlock("div",{key:`inv-${o}`,class:"eli-tabela-modal-colunas__item",draggable:"true",onDragstart:p=>e.onDragStart(p,o,"invisiveis",l),onDragover:a[4]||(a[4]=t.withModifiers(()=>{},["prevent"])),onDrop:p=>e.onDropItem(p,"invisiveis",l)},[a[13]||(a[13]=t.createElementVNode("span",{class:"eli-tabela-modal-colunas__item-handle","aria-hidden":"true"},"⋮⋮",-1)),t.createElementVNode("span",io,t.toDisplayString(o),1)],40,ro))),128))],32)])]),t.createElementVNode("footer",so,[t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-colunas__botao eli-tabela-modal-colunas__botao--sec",onClick:a[7]||(a[7]=(...o)=>e.emitFechar&&e.emitFechar(...o))}," Cancelar "),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-colunas__botao eli-tabela-modal-colunas__botao--prim",onClick:a[8]||(a[8]=(...o)=>e.emitSalvar&&e.emitSalvar(...o))}," Salvar ")])])])):t.createCommentVNode("",!0)}const uo=O(Qa,[["render",co],["__scopeId","data-v-b8f693ef"]]),mo="eli:tabela";function Ae(e){return`${mo}:${e}:colunas`}function Te(e){if(!e||typeof e!="object")return{visiveis:[],invisiveis:[]};const a=e,n=Array.isArray(a.visiveis)?a.visiveis.filter(s=>typeof s=="string"):[],i=Array.isArray(a.invisiveis)?a.invisiveis.filter(s=>typeof s=="string"):[];return{visiveis:n,invisiveis:i}}function Pe(e){try{const a=window.localStorage.getItem(Ae(e));return a?Te(JSON.parse(a)):{visiveis:[],invisiveis:[]}}catch{return{visiveis:[],invisiveis:[]}}}function po(e,a){try{window.localStorage.setItem(Ae(e),JSON.stringify(Te(a)))}catch{}}const fo=t.defineComponent({name:"EliTabela",inheritAttrs:!1,components:{EliTabelaCabecalho:Ut,EliTabelaEstados:Zt,EliTabelaDebug:xt,EliTabelaHead:ca,EliTabelaBody:qa,EliTabelaMenuAcoes:Ha,EliTabelaPaginacao:Ka,EliTabelaModalColunas:uo},props:{tabela:{type:Object,required:!0}},setup(e){const n=t.ref(!1),i=t.ref(null),s=t.ref([]),f=t.ref(0),o=t.ref([]),l=t.ref(null),p=t.ref(null),r=t.ref({top:0,left:0}),u=t.ref(""),y=t.ref(1),_=t.ref(null),C=t.ref("asc"),$=t.computed(()=>e.tabela),b=t.computed(()=>!!e.tabela.mostrarCaixaDeBusca),D=t.computed(()=>e.tabela.acoesTabela??[]),k=t.computed(()=>D.value.length>0),E=t.ref(!1),G=t.ref(Pe(e.tabela.nome)),K=t.ref({}),Z=t.computed(()=>e.tabela.colunas.map(h=>h.rotulo)),X=t.computed(()=>{var W,Q;const h=e.tabela.colunas,T=(((W=G.value.visiveis)==null?void 0:W.length)??0)>0||(((Q=G.value.invisiveis)==null?void 0:Q.length)??0)>0?G.value.invisiveis??[]:h.filter(q=>q.visivel===!1).map(q=>q.rotulo),N=new Set(T),P=h.filter(q=>N.has(q.rotulo)),F=T,R=new Map;for(const q of P)R.has(q.rotulo)||R.set(q.rotulo,q);const Y=[];for(const q of F){const x=R.get(q);x&&Y.push(x)}for(const q of P)Y.includes(q)||Y.push(q);return Y}),te=t.computed(()=>X.value.length>0),H=t.computed(()=>{var q,x;const h=e.tabela.colunas,v=Z.value,T=(((q=G.value.visiveis)==null?void 0:q.length)??0)>0||(((x=G.value.invisiveis)==null?void 0:x.length)??0)>0,N=T?G.value.invisiveis??[]:e.tabela.colunas.filter(L=>L.visivel===!1).map(L=>L.rotulo),P=new Set(N),F=v.filter(L=>!P.has(L)),R=new Set(F),Y=T?G.value.visiveis??[]:[],W=[];for(const L of Y)R.has(L)&&W.push(L);for(const L of F)W.includes(L)||W.push(L);const Q=new Map;for(const L of h)Q.has(L.rotulo)||Q.set(L.rotulo,L);return W.map(L=>Q.get(L)).filter(Boolean)});function oe(){E.value=!0}function U(){E.value=!1}function w(h){G.value=h,po(e.tabela.nome,h),E.value=!1,K.value={}}function ne(h){const v=!!K.value[h];K.value={...K.value,[h]:!v}}const re=t.computed(()=>{const h=e.tabela.registros_por_consulta;return typeof h=="number"&&h>0?Math.floor(h):10}),B=t.computed(()=>{const h=re.value;if(!h||h<=0)return 1;const v=f.value;return v?Math.max(1,Math.ceil(v/h)):1}),m=t.computed(()=>(e.tabela.acoesLinha??[]).length>0);let c=0;function g(h){var Y,W,Q,q,x,L;const v=h.getBoundingClientRect(),T=8,N=((Q=(W=(Y=p.value)==null?void 0:Y.menuEl)==null?void 0:W.value)==null?void 0:Q.offsetHeight)??0,P=((L=(x=(q=p.value)==null?void 0:q.menuEl)==null?void 0:x.value)==null?void 0:L.offsetWidth)??180;let F=v.bottom+T;const R=v.right-P;N&&F+N>window.innerHeight-T&&(F=v.top-T-N),r.value={top:Math.max(T,Math.round(F)),left:Math.max(T,Math.round(R))}}function d(h){var T,N;if(l.value===null)return;const v=h.target;(N=(T=p.value)==null?void 0:T.menuEl)!=null&&N.value&&p.value.menuEl.value.contains(v)||(l.value=null)}function V(h){if(h){if(_.value===h){C.value=C.value==="asc"?"desc":"asc",j();return}_.value=h,C.value="asc",y.value!==1?y.value=1:j()}}function S(h){u.value!==h&&(u.value=h,y.value!==1?y.value=1:j())}function M(h){const v=Math.min(Math.max(1,h),B.value);v!==y.value&&(y.value=v)}function I(h){const v=e.tabela.acoesLinha??[],T=o.value[h]??[];return v.map((N,P)=>{const F=N.exibir===void 0?!0:typeof N.exibir=="boolean"?N.exibir:!1;return{acao:N,indice:P,visivel:T[P]??F}}).filter(N=>N.visivel)}function z(h){return I(h).length>0}function J(h,v){if(!z(h))return;if(l.value===h){l.value=null;return}l.value=h;const T=(v==null?void 0:v.currentTarget)??null;T&&(g(T),requestAnimationFrame(()=>g(T)))}async function j(){var P,F;const h=++c;n.value=!0,i.value=null,o.value=[],l.value=null,K.value={};const v=Math.max(1,re.value),N={offSet:(y.value-1)*v,limit:v};u.value&&(N.texto_busca=u.value),_.value&&(N.coluna_ordem=_.value,N.direcao_ordem=C.value);try{const R=e.tabela,Y=await R.consulta(N);if(h!==c)return;if(Y.cod!==Ce.sucesso){s.value=[],f.value=0,i.value=Y.mensagem;return}const W=((P=Y.valor)==null?void 0:P.valores)??[],Q=((F=Y.valor)==null?void 0:F.quantidade)??W.length;s.value=W,f.value=Q;const q=Math.max(1,Math.ceil((Q||0)/v));if(y.value>q){y.value=q;return}const x=R.acoesLinha??[];if(!x.length){o.value=[];return}const L=W.map(()=>x.map(ie=>ie.exibir===void 0?!0:typeof ie.exibir=="boolean"?ie.exibir:!1));o.value=L;const No=await Promise.all(W.map(async ie=>Promise.all(x.map(async me=>{if(me.exibir===void 0)return!0;if(typeof me.exibir=="boolean")return me.exibir;try{const Mo=me.exibir(ie);return!!await Promise.resolve(Mo)}catch{return!1}}))));h===c&&(o.value=No)}catch(R){if(h!==c)return;s.value=[],f.value=0,i.value=R instanceof Error?R.message:"Erro ao carregar dados."}finally{h===c&&(n.value=!1)}}return t.onMounted(()=>{document.addEventListener("click",d),j()}),t.onBeforeUnmount(()=>{document.removeEventListener("click",d)}),t.watch(()=>e.tabela.mostrarCaixaDeBusca,h=>{!h&&u.value&&(u.value="",y.value!==1?y.value=1:j())}),t.watch(y,(h,v)=>{h!==v&&j()}),t.watch(()=>e.tabela,()=>{l.value=null,_.value=null,C.value="asc",u.value="",E.value=!1,G.value=Pe(e.tabela.nome),K.value={},y.value!==1?y.value=1:j()}),t.watch(()=>e.tabela.registros_por_consulta,()=>{y.value!==1?y.value=1:j()}),t.watch(s,()=>{l.value=null,K.value={}}),{isDev:!1,tabela:$,carregando:n,erro:i,linhas:s,quantidade:f,menuAberto:l,valorBusca:u,paginaAtual:y,colunaOrdenacao:_,direcaoOrdenacao:C,totalPaginas:B,exibirBusca:b,acoesCabecalho:D,temAcoesCabecalho:k,temAcoes:m,colunasEfetivas:H,rotulosColunas:Z,modalColunasAberto:E,configColunas:G,temColunasInvisiveis:te,colunasInvisiveisEfetivas:X,linhasExpandidas:K,abrirModalColunas:oe,fecharModalColunas:U,salvarModalColunas:w,alternarLinhaExpandida:ne,alternarOrdenacao:V,atualizarBusca:S,irParaPagina:M,acoesDisponiveisPorLinha:I,possuiAcoes:z,toggleMenu:J,menuPopup:p,menuPopupPos:r}}}),bo={class:"eli-tabela"},ho={class:"eli-tabela__table"};function go(e,a,n,i,s,f){const o=t.resolveComponent("EliTabelaDebug"),l=t.resolveComponent("EliTabelaEstados"),p=t.resolveComponent("EliTabelaCabecalho"),r=t.resolveComponent("EliTabelaModalColunas"),u=t.resolveComponent("EliTabelaHead"),y=t.resolveComponent("EliTabelaBody"),_=t.resolveComponent("EliTabelaMenuAcoes"),C=t.resolveComponent("EliTabelaPaginacao");return t.openBlock(),t.createElementBlock("div",bo,[t.createVNode(o,{isDev:e.isDev,menuAberto:e.menuAberto,menuPopupPos:e.menuPopupPos},null,8,["isDev","menuAberto","menuPopupPos"]),e.carregando||e.erro||!e.linhas.length?(t.openBlock(),t.createBlock(l,{key:0,carregando:e.carregando,erro:e.erro,mensagemVazio:e.tabela.mensagemVazio},null,8,["carregando","erro","mensagemVazio"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.exibirBusca||e.temAcoesCabecalho?(t.openBlock(),t.createBlock(p,{key:0,exibirBusca:e.exibirBusca,valorBusca:e.valorBusca,acoesCabecalho:e.acoesCabecalho,onBuscar:e.atualizarBusca,onColunas:e.abrirModalColunas},null,8,["exibirBusca","valorBusca","acoesCabecalho","onBuscar","onColunas"])):t.createCommentVNode("",!0),t.createVNode(r,{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"]),t.createElementVNode("table",ho,[t.createVNode(u,{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"]),t.createVNode(y,{colunas:e.colunasEfetivas,colunasInvisiveis:e.colunasInvisiveisEfetivas,temColunasInvisiveis:e.temColunasInvisiveis,linhasExpandidas:e.linhasExpandidas,linhas:e.linhas,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"])]),t.createVNode(_,{ref:"menuPopup",menuAberto:e.menuAberto,posicao:e.menuPopupPos,acoes:e.menuAberto===null?[]:e.acoesDisponiveisPorLinha(e.menuAberto),linha:e.menuAberto===null?null:e.linhas[e.menuAberto],onExecutar:a[0]||(a[0]=({acao:$,linha:b})=>{e.menuAberto=null,$.acao(b)})},null,8,["menuAberto","posicao","acoes","linha"]),e.totalPaginas>1&&e.quantidade>0?(t.openBlock(),t.createBlock(C,{key:1,pagina:e.paginaAtual,totalPaginas:e.totalPaginas,maximoBotoes:e.tabela.maximo_botoes_paginacao,onAlterar:e.irParaPagina},null,8,["pagina","totalPaginas","maximoBotoes","onAlterar"])):t.createCommentVNode("",!0)],64))])}const Ie=O(fo,[["render",go]]),yo=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 i=t.computed({get:()=>e.value,set:s=>{n("update:value",s),n("input",s),n("change",s)}});return{attrs:a,emit:n,localValue:i}}});function $o(e,a,n,i,s,f){var o,l,p,r;return t.openBlock(),t.createBlock(se.VTextField,t.mergeProps({modelValue:e.localValue,"onUpdate:modelValue":a[0]||(a[0]=u=>e.localValue=u),label:(o=e.opcoes)==null?void 0:o.rotulo,placeholder:(l=e.opcoes)==null?void 0:l.placeholder,counter:(p=e.opcoes)==null?void 0:p.limiteCaracteres,maxlength:(r=e.opcoes)==null?void 0:r.limiteCaracteres},e.attrs,{onFocus:a[1]||(a[1]=()=>e.emit("focus")),onBlur:a[2]||(a[2]=()=>e.emit("blur"))}),null,16,["modelValue","label","placeholder","counter","maxlength"])}const Oe=O(yo,[["render",$o]]);function ko(e){if(!Number.isFinite(e)||e<=0||e>=1)return 0;const a=e.toString();if(a.includes("e-")){const[,s]=a.split("e-"),f=Number(s);return Number.isFinite(f)?f:0}const n=a.indexOf(".");return n===-1?0:a.slice(n+1).replace(/0+$/,"").length}function Bo(e){const a=(e??"").trim().replace(/,/g,".");if(!a)return null;const n=Number(a);return Number.isNaN(n)?null:n}function he(e,a){return e==null?"":a===null?String(e):Number(e).toFixed(Math.max(0,a)).replace(/\./g,",")}function qe(e){return(e??"").replace(/\D+/g,"")}function Eo(e){const a=(e??"").replace(/[^0-9.,]+/g,""),n=a.match(/[.,]/);if(!n)return a;const i=n[0],s=a.indexOf(i),f=a.slice(0,s).replace(/[.,]/g,""),o=a.slice(s+1).replace(/[.,]/g,"");return`${f.length?f:"0"}${i}${o}`}function Co(e,a){if(a===null)return e;if(a<=0)return e.replace(/[.,]/g,"");const n=e.match(/[.,]/);if(!n)return e;const i=n[0],s=e.indexOf(i),f=e.slice(0,s),o=e.slice(s+1);return`${f}${i}${o.slice(0,a)}`}function Vo(e){const a=e.match(/^(\d+)[.,]$/);if(!a)return null;const n=Number(a[1]);return Number.isNaN(n)?null:n}const So=t.defineComponent({name:"EliEntradaNumero",inheritAttrs:!1,props:{value:{type:[Number,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 i=t.computed(()=>{var u;const r=(u=e.opcoes)==null?void 0:u.precisao;return r==null?null:ko(r)}),s=t.computed(()=>i.value===0),f=t.computed(()=>{const r=i.value;return r!==null&&r>0}),o=t.ref(""),l=t.ref(void 0);t.watch(()=>e.value,r=>{r!==l.value&&(o.value=he(r,i.value),l.value=r)},{immediate:!0});function p(r){if(f.value){const C=i.value??0,$=qe(r),b=$?Number($):0,D=Math.pow(10,C),k=$?b/D:null,E=k===null?null:k;l.value=E,n("update:value",E),n("input",E),n("change",E),o.value=he(E,C);return}const u=s.value?qe(r):Eo(r),y=s.value?u:Co(u,i.value);let _=null;if(y){const $=(s.value?null:Vo(y))??Bo(y);_=$===null?null:$}l.value=_,n("update:value",_),n("input",_),n("change",_),o.value=he(_,i.value)}return{attrs:a,emit:n,displayValue:o,isInteiro:s,onUpdateModelValue:p}}}),vo={class:"eli-entrada__prefixo"},Do={class:"eli-entrada__sufixo"};function _o(e,a,n,i,s,f){var o,l,p,r;return t.openBlock(),t.createBlock(se.VTextField,t.mergeProps({"model-value":e.displayValue,label:(o=e.opcoes)==null?void 0:o.rotulo,placeholder:(l=e.opcoes)==null?void 0:l.placeholder,type:e.isInteiro?"number":"text",inputmode:e.isInteiro?"numeric":"decimal",pattern:e.isInteiro?"[0-9]*":"[0-9.,]*"},e.attrs,{"onUpdate:modelValue":e.onUpdateModelValue,onFocus:a[0]||(a[0]=()=>e.emit("focus")),onBlur:a[1]||(a[1]=()=>e.emit("blur"))}),t.createSlots({_:2},[(p=e.opcoes)!=null&&p.prefixo?{name:"prepend-inner",fn:t.withCtx(()=>[t.createElementVNode("span",vo,t.toDisplayString(e.opcoes.prefixo),1)]),key:"0"}:void 0,(r=e.opcoes)!=null&&r.sufixo?{name:"append-inner",fn:t.withCtx(()=>[t.createElementVNode("span",Do,t.toDisplayString(e.opcoes.sufixo),1)]),key:"1"}:void 0]),1040,["model-value","label","placeholder","type","inputmode","pattern","onUpdate:modelValue"])}const Fe=O(So,[["render",_o],["__scopeId","data-v-77cbf216"]]),wo={install(e){e.component("EliOlaMundo",$e),e.component("EliBotao",pe),e.component("EliBadge",ce),e.component("EliInput",be),e.component("EliCartao",ke),e.component("EliDataHora",Ee),e.component("EliTabela",Ie),e.component("EliEntradaTexto",Oe),e.component("EliEntradaNumero",Fe)}};A.EliBadge=ce,A.EliBotao=pe,A.EliCartao=ke,A.EliDataHora=Ee,A.EliEntradaNumero=Fe,A.EliEntradaTexto=Oe,A.EliInput=be,A.EliOlaMundo=$e,A.EliTabela=Ie,A.default=wo,Object.defineProperties(A,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})})); + */const Bt=ae("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),Ct=t.defineComponent({name:"EliTabelaCaixaDeBusca",components:{Search:Bt},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 r(){a("buscar",n.value.trim())}return{texto:n,emitirBusca:r}}}),Vt={class:"eli-tabela__busca"},vt={class:"eli-tabela__busca-input-wrapper"};function St(e,a,n,r,s,b){const o=t.resolveComponent("Search");return t.openBlock(),t.createElementBlock("div",Vt,[t.createElementVNode("div",vt,[t.withDirectives(t.createElementVNode("input",{id:"eli-tabela-busca","onUpdate:modelValue":a[0]||(a[0]=l=>e.texto=l),type:"search",class:"eli-tabela__busca-input",placeholder:"Digite termos para filtrar",onKeyup:a[1]||(a[1]=t.withKeys((...l)=>e.emitirBusca&&e.emitirBusca(...l),["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]=(...l)=>e.emitirBusca&&e.emitirBusca(...l))},[t.createVNode(o,{class:"eli-tabela__busca-botao-icone",size:16,"stroke-width":2,"aria-hidden":"true"})])])])}const _t=O(Ct,[["render",St],["__scopeId","data-v-341415d1"]]),Dt=t.defineComponent({name:"EliTabelaCabecalho",components:{EliTabelaCaixaDeBusca:_t},props:{exibirBusca:{type:Boolean,required:!0},exibirBotaoColunas:{type:Boolean,required:!1,default:!0},valorBusca:{type:String,required:!0},acoesCabecalho:{type:Array,required:!0}},emits:{buscar(e){return typeof e=="string"},colunas(){return!0}},setup(e,{emit:a}){const n=t.computed(()=>e.acoesCabecalho.length>0);function r(b){a("buscar",b)}function s(){a("colunas")}return{temAcoesCabecalho:n,emitBuscar:r,emitColunas:s}}}),wt={class:"eli-tabela__cabecalho"},Nt={key:0,class:"eli-tabela__busca-grupo"},Mt={key:1,class:"eli-tabela__acoes-cabecalho"},At=["onClick"],Tt={class:"eli-tabela__acoes-cabecalho-rotulo"};function Pt(e,a,n,r,s,b){const o=t.resolveComponent("EliTabelaCaixaDeBusca");return t.openBlock(),t.createElementBlock("div",wt,[e.exibirBusca?(t.openBlock(),t.createElementBlock("div",Nt,[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]=(...l)=>e.emitColunas&&e.emitColunas(...l))}," Colunas ")):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",Mt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.acoesCabecalho,(l,f)=>(t.openBlock(),t.createElementBlock("button",{key:`${l.rotulo}-${f}`,type:"button",class:"eli-tabela__acoes-cabecalho-botao",style:t.normalizeStyle(l.cor?{backgroundColor:l.cor,color:"#fff"}:void 0),onClick:l.acao},[l.icone?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.icone),{key:0,class:"eli-tabela__acoes-cabecalho-icone",size:16,"stroke-width":2})):t.createCommentVNode("",!0),t.createElementVNode("span",Tt,t.toDisplayString(l.rotulo),1)],12,At))),128))])):t.createCommentVNode("",!0)])}const It=O(Dt,[["render",Pt],["__scopeId","data-v-42938cb8"]]),Ot=t.defineComponent({name:"EliTabelaEstados",props:{carregando:{type:Boolean,required:!0},erro:{type:String,required:!0},mensagemVazio:{type:String,required:!1,default:void 0}}}),qt={key:0,class:"eli-tabela eli-tabela--carregando","aria-busy":"true"},Ft={key:1,class:"eli-tabela eli-tabela--erro",role:"alert"},Lt={class:"eli-tabela__erro-mensagem"},zt={key:2,class:"eli-tabela eli-tabela--vazio"};function jt(e,a,n,r,s,b){return e.carregando?(t.openBlock(),t.createElementBlock("div",qt," Carregando... ")):e.erro?(t.openBlock(),t.createElementBlock("div",Ft,[a[0]||(a[0]=t.createElementVNode("div",{class:"eli-tabela__erro-titulo"},"Erro",-1)),t.createElementVNode("div",Lt,t.toDisplayString(e.erro),1)])):(t.openBlock(),t.createElementBlock("div",zt,t.toDisplayString(e.mensagemVazio??"Nenhum registro encontrado."),1))}const Ut=O(Ot,[["render",jt]]),Ht=t.defineComponent({name:"EliTabelaDebug",props:{isDev:{type:Boolean,required:!0},menuAberto:{type:Number,required:!0},menuPopupPos:{type:Object,required:!0}}}),Rt={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 Yt(e,a,n,r,s,b){return e.isDev?(t.openBlock(),t.createElementBlock("div",Rt,[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.createCommentVNode("",!0)}const Jt=O(Ht,[["render",Yt]]),Gt=t.defineComponent({name:"EliTabelaHead",components:{ArrowUp:ve,ArrowDown:Ve},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 r(s){a("alternarOrdenacao",s)}return{ArrowUp:ve,ArrowDown:Ve,isOrdenavel:n,emitAlternarOrdenacao:r}}}),Wt={class:"eli-tabela__thead"},Zt={class:"eli-tabela__tr eli-tabela__tr--header"},Xt={key:0,class:"eli-tabela__th eli-tabela__th--expander",scope:"col"},Kt=["onClick"],Qt={class:"eli-tabela__th-texto"},xt={key:1,class:"eli-tabela__th-label"},ea={key:1,class:"eli-tabela__th eli-tabela__th--acoes",scope:"col"};function ta(e,a,n,r,s,b){const o=t.resolveComponent("ArrowUp");return t.openBlock(),t.createElementBlock("thead",Wt,[t.createElementVNode("tr",Zt,[e.temColunasInvisiveis?(t.openBlock(),t.createElementBlock("th",Xt)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.colunas,(l,f)=>(t.openBlock(),t.createElementBlock("th",{key:`th-${f}`,class:t.normalizeClass(["eli-tabela__th",[e.isOrdenavel(l)?"eli-tabela__th--ordenavel":void 0]]),scope:"col"},[e.isOrdenavel(l)?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:t.normalizeClass(["eli-tabela__th-botao",[e.colunaOrdenacao===String(l.coluna_ordem)?"eli-tabela__th-botao--ativo":void 0]]),onClick:i=>e.emitAlternarOrdenacao(String(l.coluna_ordem))},[t.createElementVNode("span",Qt,t.toDisplayString(l.rotulo),1),e.colunaOrdenacao===String(l.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,Kt)):(t.openBlock(),t.createElementBlock("span",xt,t.toDisplayString(l.rotulo),1))],2))),128)),e.temAcoes?(t.openBlock(),t.createElementBlock("th",ea," Ações ")):t.createCommentVNode("",!0)])])}const aa=O(Gt,[["render",ta]]),oa=t.defineComponent({name:"EliTabelaCelulaTextoSimples",components:{},props:{dados:{type:Object}},data(){return{}},methods:{},setup({dados:e}){return{dados:e}}}),na={key:1};function la(e,a,n,r,s,b){var o,l,f;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((l=e.dados)==null?void 0:l.texto),1)):(t.openBlock(),t.createElementBlock("span",na,t.toDisplayString((f=e.dados)==null?void 0:f.texto),1))}const ra=O(oa,[["render",la],["__scopeId","data-v-7a629ffa"]]),ia=t.defineComponent({name:"EliTabelaCelulaTextoTruncado",props:{dados:{type:Object}},setup({dados:e}){return{dados:e}}}),sa=["title"],ca=["title"];function da(e,a,n,r,s,b){var o,l,f,i,m;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:(l=e.dados)==null?void 0:l.texto,onClick:a[0]||(a[0]=t.withModifiers(k=>e.dados.acao(),["stop","prevent"]))},t.toDisplayString((f=e.dados)==null?void 0:f.texto),9,sa)):(t.openBlock(),t.createElementBlock("span",{key:1,class:"eli-tabela__texto-truncado",title:(i=e.dados)==null?void 0:i.texto},t.toDisplayString((m=e.dados)==null?void 0:m.texto),9,ca))}const ua=O(ia,[["render",da],["__scopeId","data-v-74854889"]]),ma=t.defineComponent({name:"EliTabelaCelulaNumero",components:{},props:{dados:{type:Object}},data(){return{}},methods:{},setup({dados:e}){return{dados:e}}}),pa={key:1};function fa(e,a,n,r,s,b){var o,l,f;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(String((l=e.dados)==null?void 0:l.numero).replace(".",",")),1)):(t.openBlock(),t.createElementBlock("span",pa,t.toDisplayString(String((f=e.dados)==null?void 0:f.numero).replace(".",",")),1))}const ba={textoSimples:ra,textoTruncado:ua,numero:O(ma,[["render",fa],["__scopeId","data-v-e7bac7ff"]])},ha=t.defineComponent({name:"EliTabelaCelula",props:{celula:{type:Array,required:!0}},setup(e){const a=t.computed(()=>e.celula[0]),n=t.computed(()=>e.celula[1]),r=t.computed(()=>ba[a.value]),s=t.computed(()=>n.value);return{Componente:r,dadosParaComponente:s}}});function ga(e,a,n,r,s,b){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Componente),{dados:e.dadosParaComponente},null,8,["dados"])}const De=O(ha,[["render",ga]]),ya=t.defineComponent({name:"EliTabelaDetalhesLinha",components:{EliTabelaCelula:De},props:{linha:{type:null,required:!0},colunasInvisiveis:{type:Array,required:!0}}}),$a={class:"eli-tabela__detalhes"},ka={class:"eli-tabela__detalhe-rotulo"},Ea={class:"eli-tabela__detalhe-valor"};function Ba(e,a,n,r,s,b){const o=t.resolveComponent("EliTabelaCelula");return t.openBlock(),t.createElementBlock("div",$a,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.colunasInvisiveis,(l,f)=>(t.openBlock(),t.createElementBlock("div",{key:`det-${f}-${l.rotulo}`,class:"eli-tabela__detalhe"},[t.createElementVNode("div",ka,t.toDisplayString(l.rotulo),1),t.createElementVNode("div",Ea,[t.createVNode(o,{celula:l.celula(e.linha)},null,8,["celula"])])]))),128))])}const Ca=O(ya,[["render",Ba],["__scopeId","data-v-f1ee8d20"]]),Va=t.defineComponent({name:"EliTabelaBody",components:{EliTabelaCelula:De,EliTabelaDetalhesLinha:Ca,MoreVertical:Et,ChevronRight:_e,ChevronDown:Se},props:{colunas:{type:Array,required:!0},colunasInvisiveis:{type:Array,required:!0},temColunasInvisiveis:{type:Boolean,required:!0},linhasExpandidas:{type:Object,required:!0},linhas:{type:Array,required:!0},temAcoes:{type:Boolean,required:!0},menuAberto:{type:Number,required:!0},possuiAcoes:{type:Function,required:!0},toggleMenu:{type:Function,required:!0},alternarLinhaExpandida:{type:Function,required:!0}},setup(){return{ChevronRight:_e,ChevronDown:Se}}}),va={class:"eli-tabela__tbody"},Sa=["aria-expanded","aria-label","title","onClick"],_a=["id","disabled","aria-expanded","aria-controls","aria-label","title","onClick"],Da=["colspan"];function wa(e,a,n,r,s,b){const o=t.resolveComponent("EliTabelaCelula"),l=t.resolveComponent("MoreVertical"),f=t.resolveComponent("EliTabelaDetalhesLinha");return t.openBlock(),t.createElementBlock("tbody",va,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.linhas,(i,m)=>{var k,D,B,$,d,S;return t.openBlock(),t.createElementBlock(t.Fragment,{key:`grp-${m}`},[t.createElementVNode("tr",{class:t.normalizeClass(["eli-tabela__tr",[m%2===1?"eli-tabela__tr--zebra":void 0]])},[e.temColunasInvisiveis?(t.openBlock(),t.createElementBlock("td",{class:"eli-tabela__td eli-tabela__td--expander",key:`td-${m}-exp`},[t.createElementVNode("button",{type:"button",class:t.normalizeClass(["eli-tabela__expander-botao",[(k=e.linhasExpandidas)!=null&&k[m]?"eli-tabela__expander-botao--ativo":void 0]]),"aria-expanded":(D=e.linhasExpandidas)!=null&&D[m]?"true":"false","aria-label":(B=e.linhasExpandidas)!=null&&B[m]?"Ocultar colunas ocultas":"Mostrar colunas ocultas",title:($=e.linhasExpandidas)!=null&&$[m]?"Ocultar detalhes":"Mostrar detalhes",onClick:t.withModifiers(y=>e.alternarLinhaExpandida(m),["stop"])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent((d=e.linhasExpandidas)!=null&&d[m]?e.ChevronDown:e.ChevronRight),{class:"eli-tabela__expander-icone",size:16,"stroke-width":2,"aria-hidden":"true"}))],10,Sa)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.colunas,(y,C)=>(t.openBlock(),t.createElementBlock("td",{key:`td-${m}-${C}`,class:"eli-tabela__td"},[t.createVNode(o,{celula:y.celula(i)},null,8,["celula"])]))),128)),e.temAcoes?(t.openBlock(),t.createElementBlock("td",{class:"eli-tabela__td eli-tabela__td--acoes",key:`td-${m}-acoes`},[t.createElementVNode("div",{class:t.normalizeClass(["eli-tabela__acoes-container",[e.menuAberto===m?"eli-tabela__acoes-container--aberto":void 0]])},[t.createElementVNode("button",{class:"eli-tabela__acoes-toggle",type:"button",id:`eli-tabela-acoes-toggle-${m}`,disabled:!e.possuiAcoes(m),"aria-haspopup":"menu","aria-expanded":e.menuAberto===m?"true":"false","aria-controls":e.possuiAcoes(m)?`eli-tabela-acoes-menu-${m}`:void 0,"aria-label":e.possuiAcoes(m)?"Ações da linha":"Nenhuma ação disponível",title:e.possuiAcoes(m)?"Ações":"Nenhuma ação disponível",onClick:t.withModifiers(y=>e.toggleMenu(m,y),["stop"])},[t.createVNode(l,{class:"eli-tabela__acoes-toggle-icone",size:18,"stroke-width":2})],8,_a)],2)])):t.createCommentVNode("",!0)],2),e.temColunasInvisiveis&&((S=e.linhasExpandidas)!=null&&S[m])?(t.openBlock(),t.createElementBlock("tr",{key:0,class:t.normalizeClass(["eli-tabela__tr eli-tabela__tr--detalhes",[m%2===1?"eli-tabela__tr--zebra":void 0]])},[t.createElementVNode("td",{class:"eli-tabela__td eli-tabela__td--detalhes",colspan:(e.temColunasInvisiveis?1:0)+e.colunas.length+(e.temAcoes?1:0)},[t.createVNode(f,{linha:i,colunasInvisiveis:e.colunasInvisiveis},null,8,["linha","colunasInvisiveis"])],8,Da)],2)):t.createCommentVNode("",!0)],64)}),128))])}const Na=O(Va,[["render",wa]]),Ma=t.defineComponent({name:"EliTabelaMenuAcoes",props:{menuAberto:{type:Number,required:!0},posicao:{type:Object,required:!0},acoes:{type:Array,required:!0},linha:{type:null,required:!0}},emits:{executar(e){return e!==null&&typeof e=="object"}},setup(e,{emit:a,expose:n}){const r=t.ref(null);n({menuEl:r});const s=t.computed(()=>e.acoes.length>0);function b(o){e.linha&&a("executar",{acao:o.acao,linha:e.linha})}return{menuEl:r,possuiAcoes:s,emitExecutar:b}}}),Aa=["id","aria-labelledby"],Ta=["aria-label","title","onClick"],Pa={class:"eli-tabela__acoes-item-texto"};function Ia(e,a,n,r,s,b){return t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[e.menuAberto!==null&&e.possuiAcoes?(t.openBlock(),t.createElementBlock("ul",{key:0,id:`eli-tabela-acoes-menu-${e.menuAberto}`,ref:"menuEl",class:"eli-tabela__acoes-menu",role:"menu","aria-labelledby":`eli-tabela-acoes-toggle-${e.menuAberto}`,style:t.normalizeStyle({position:"fixed",top:`${e.posicao.top}px`,left:`${e.posicao.left}px`,zIndex:999999})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.acoes,o=>(t.openBlock(),t.createElementBlock("li",{key:`acao-${e.menuAberto}-${o.indice}`,class:"eli-tabela__acoes-item",role:"none"},[t.createElementVNode("button",{type:"button",class:"eli-tabela__acoes-item-botao",style:t.normalizeStyle({color:o.acao.cor}),role:"menuitem","aria-label":o.acao.rotulo,title:o.acao.rotulo,onClick:t.withModifiers(l=>e.emitExecutar(o),["stop"])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.acao.icone),{class:"eli-tabela__acoes-item-icone",size:16,"stroke-width":2})),t.createElementVNode("span",Pa,t.toDisplayString(o.acao.rotulo),1)],12,Ta)]))),128))],12,Aa)):t.createCommentVNode("",!0)])}const Oa=O(Ma,[["render",Ia]]),qa=t.defineComponent({name:"EliTabelaPaginacao",props:{pagina:{type:Number,required:!0},totalPaginas:{type:Number,required:!0},maximoBotoes:{type:Number,required:!1}},emits:{alterar(e){return Number.isFinite(e)}},setup(e,{emit:a}){const n=t.computed(()=>{const i=e.maximoBotoes;return typeof i=="number"&&i>=5?Math.floor(i):7}),r=t.computed(()=>{const i=e.totalPaginas,m=e.pagina,k=n.value,D=[],B=C=>{D.push({label:String(C),pagina:C,ativo:C===m})},$=()=>{D.push({label:"…",ehEllipsis:!0})};if(i<=k){for(let C=1;C<=i;C+=1)B(C);return D}const d=Math.max(3,k-2);let S=Math.max(2,m-Math.floor(d/2)),y=S+d-1;y>=i&&(y=i-1,S=y-d+1),B(1),S>2&&$();for(let C=S;C<=y;C+=1)B(C);return ye.pagina<=1),o=t.computed(()=>e.pagina>=e.totalPaginas),l=t.computed(()=>e.pagina),f=t.computed(()=>e.totalPaginas);return{botoes:r,irParaPagina:s,anteriorDesabilitado:b,proximaDesabilitada:o,paginaAtual:l,totalPaginasExibidas:f}}}),Fa={key:0,class:"eli-tabela__paginacao",role:"navigation","aria-label":"Paginação de resultados"},La=["disabled"],za={key:0,class:"eli-tabela__pagina-ellipsis","aria-hidden":"true"},ja=["disabled","aria-current","aria-label","onClick"],Ua=["disabled"];function Ha(e,a,n,r,s,b){return e.totalPaginasExibidas>1?(t.openBlock(),t.createElementBlock("nav",Fa,[t.createElementVNode("button",{type:"button",class:"eli-tabela__pagina-botao",disabled:e.anteriorDesabilitado,"aria-label":"Página anterior",onClick:a[0]||(a[0]=o=>e.irParaPagina(e.paginaAtual-1))}," << ",8,La),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.botoes,(o,l)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`${o.label}-${l}`},[o.ehEllipsis?(t.openBlock(),t.createElementBlock("span",za,t.toDisplayString(o.label),1)):(t.openBlock(),t.createElementBlock("button",{key:1,type:"button",class:t.normalizeClass(["eli-tabela__pagina-botao",o.ativo?"eli-tabela__pagina-botao--ativo":void 0]),disabled:o.ativo,"aria-current":o.ativo?"page":void 0,"aria-label":`Ir para página ${o.label}`,onClick:f=>e.irParaPagina(o.pagina)},t.toDisplayString(o.label),11,ja))],64))),128)),t.createElementVNode("button",{type:"button",class:"eli-tabela__pagina-botao",disabled:e.proximaDesabilitada,"aria-label":"Próxima página",onClick:a[1]||(a[1]=o=>e.irParaPagina(e.paginaAtual+1))}," >> ",8,Ua)])):t.createCommentVNode("",!0)}const Ra=O(qa,[["render",Ha],["__scopeId","data-v-5ca7a362"]]),we="application/x-eli-tabela-coluna",Ya=t.defineComponent({name:"EliTabelaModalColunas",props:{aberto:{type:Boolean,required:!0},rotulosColunas:{type:Array,required:!0},configInicial:{type:Object,required:!0},colunas:{type:Array,required:!0}},emits:{fechar(){return!0},salvar(e){return!0}},setup(e,{emit:a}){const n=t.ref([]),r=t.ref([]);function s(){var X,te;const $=e.rotulosColunas,d=(((X=e.configInicial.visiveis)==null?void 0:X.length)??0)>0||(((te=e.configInicial.invisiveis)==null?void 0:te.length)??0)>0,S=new Set(e.colunas.filter(H=>H.visivel===!1).map(H=>H.rotulo)),y=d?new Set(e.configInicial.invisiveis??[]):S,C=$.filter(H=>!y.has(H)),G=e.configInicial.visiveis??[],K=new Set(C),Z=[];for(const H of G)K.has(H)&&Z.push(H);for(const H of C)Z.includes(H)||Z.push(H);n.value=Z,r.value=$.filter(H=>y.has(H))}t.watch(()=>[e.aberto,e.rotulosColunas,e.configInicial,e.colunas],()=>{e.aberto&&s()},{deep:!0,immediate:!0});function b(){a("fechar")}function o(){a("salvar",{visiveis:[...n.value],invisiveis:[...r.value]})}function l($,d){var S,y;try{(S=$.dataTransfer)==null||S.setData(we,JSON.stringify(d)),(y=$.dataTransfer)==null||y.setData("text/plain",d.rotulo),$.dataTransfer.effectAllowed="move"}catch{}}function f($){var d;try{const S=(d=$.dataTransfer)==null?void 0:d.getData(we);if(!S)return null;const y=JSON.parse(S);return!y||typeof y.rotulo!="string"||y.origem!=="visiveis"&&y.origem!=="invisiveis"?null:y}catch{return null}}function i($){const d=$.origem==="visiveis"?n.value:r.value,S=d.indexOf($.rotulo);S>=0&&d.splice(S,1)}function m($,d,S){const y=$==="visiveis"?n.value:r.value,C=y.indexOf(d);C>=0&&y.splice(C,1),S===null||S<0||S>y.length?y.push(d):y.splice(S,0,d)}function k($,d,S,y){l($,{rotulo:d,origem:S,index:y})}function D($,d,S){const y=f($);if(y)if(i(y),m(d,y.rotulo,S),d==="visiveis"){const C=r.value.indexOf(y.rotulo);C>=0&&r.value.splice(C,1)}else{const C=n.value.indexOf(y.rotulo);C>=0&&n.value.splice(C,1)}}function B($,d,S){const y=f($);if(y)if(i(y),m(d,y.rotulo,null),d==="visiveis"){const C=r.value.indexOf(y.rotulo);C>=0&&r.value.splice(C,1)}else{const C=n.value.indexOf(y.rotulo);C>=0&&n.value.splice(C,1)}}return{visiveisLocal:n,invisiveisLocal:r,emitFechar:b,emitSalvar:o,onDragStart:k,onDropItem:D,onDropLista:B}}}),Ja={class:"eli-tabela-modal-colunas__modal",role:"dialog","aria-modal":"true","aria-label":"Configurar colunas"},Ga={class:"eli-tabela-modal-colunas__header"},Wa={class:"eli-tabela-modal-colunas__conteudo"},Za={class:"eli-tabela-modal-colunas__coluna"},Xa=["onDragstart","onDrop"],Ka={class:"eli-tabela-modal-colunas__item-texto"},Qa={class:"eli-tabela-modal-colunas__coluna"},xa=["onDragstart","onDrop"],eo={class:"eli-tabela-modal-colunas__item-texto"},to={class:"eli-tabela-modal-colunas__footer"};function ao(e,a,n,r,s,b){return e.aberto?(t.openBlock(),t.createElementBlock("div",{key:0,class:"eli-tabela-modal-colunas__overlay",role:"presentation",onClick:a[9]||(a[9]=t.withModifiers((...o)=>e.emitFechar&&e.emitFechar(...o),["self"]))},[t.createElementVNode("div",Ja,[t.createElementVNode("header",Ga,[a[10]||(a[10]=t.createElementVNode("h3",{class:"eli-tabela-modal-colunas__titulo"},"Colunas",-1)),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-colunas__fechar","aria-label":"Fechar",onClick:a[0]||(a[0]=(...o)=>e.emitFechar&&e.emitFechar(...o))}," × ")]),t.createElementVNode("div",Wa,[t.createElementVNode("div",Za,[a[12]||(a[12]=t.createElementVNode("div",{class:"eli-tabela-modal-colunas__coluna-titulo"},"Visíveis",-1)),t.createElementVNode("div",{class:"eli-tabela-modal-colunas__lista",onDragover:a[2]||(a[2]=t.withModifiers(()=>{},["prevent"])),onDrop:a[3]||(a[3]=o=>e.onDropLista(o,"visiveis",null))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.visiveisLocal,(o,l)=>(t.openBlock(),t.createElementBlock("div",{key:`vis-${o}`,class:"eli-tabela-modal-colunas__item",draggable:"true",onDragstart:f=>e.onDragStart(f,o,"visiveis",l),onDragover:a[1]||(a[1]=t.withModifiers(()=>{},["prevent"])),onDrop:f=>e.onDropItem(f,"visiveis",l)},[a[11]||(a[11]=t.createElementVNode("span",{class:"eli-tabela-modal-colunas__item-handle","aria-hidden":"true"},"⋮⋮",-1)),t.createElementVNode("span",Ka,t.toDisplayString(o),1)],40,Xa))),128))],32)]),t.createElementVNode("div",Qa,[a[14]||(a[14]=t.createElementVNode("div",{class:"eli-tabela-modal-colunas__coluna-titulo"},"Invisíveis",-1)),t.createElementVNode("div",{class:"eli-tabela-modal-colunas__lista",onDragover:a[5]||(a[5]=t.withModifiers(()=>{},["prevent"])),onDrop:a[6]||(a[6]=o=>e.onDropLista(o,"invisiveis",null))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.invisiveisLocal,(o,l)=>(t.openBlock(),t.createElementBlock("div",{key:`inv-${o}`,class:"eli-tabela-modal-colunas__item",draggable:"true",onDragstart:f=>e.onDragStart(f,o,"invisiveis",l),onDragover:a[4]||(a[4]=t.withModifiers(()=>{},["prevent"])),onDrop:f=>e.onDropItem(f,"invisiveis",l)},[a[13]||(a[13]=t.createElementVNode("span",{class:"eli-tabela-modal-colunas__item-handle","aria-hidden":"true"},"⋮⋮",-1)),t.createElementVNode("span",eo,t.toDisplayString(o),1)],40,xa))),128))],32)])]),t.createElementVNode("footer",to,[t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-colunas__botao eli-tabela-modal-colunas__botao--sec",onClick:a[7]||(a[7]=(...o)=>e.emitFechar&&e.emitFechar(...o))}," Cancelar "),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-colunas__botao eli-tabela-modal-colunas__botao--prim",onClick:a[8]||(a[8]=(...o)=>e.emitSalvar&&e.emitSalvar(...o))}," Salvar ")])])])):t.createCommentVNode("",!0)}const oo=O(Ya,[["render",ao],["__scopeId","data-v-b8f693ef"]]),no="eli:tabela";function Ne(e){return`${no}:${e}:colunas`}function Me(e){if(!e||typeof e!="object")return{visiveis:[],invisiveis:[]};const a=e,n=Array.isArray(a.visiveis)?a.visiveis.filter(s=>typeof s=="string"):[],r=Array.isArray(a.invisiveis)?a.invisiveis.filter(s=>typeof s=="string"):[];return{visiveis:n,invisiveis:r}}function Ae(e){try{const a=window.localStorage.getItem(Ne(e));return a?Me(JSON.parse(a)):{visiveis:[],invisiveis:[]}}catch{return{visiveis:[],invisiveis:[]}}}function lo(e,a){try{window.localStorage.setItem(Ne(e),JSON.stringify(Me(a)))}catch{}}const ro=t.defineComponent({name:"EliTabela",inheritAttrs:!1,components:{EliTabelaCabecalho:It,EliTabelaEstados:Ut,EliTabelaDebug:Jt,EliTabelaHead:aa,EliTabelaBody:Na,EliTabelaMenuAcoes:Oa,EliTabelaPaginacao:Ra,EliTabelaModalColunas:oo},props:{tabela:{type:Object,required:!0}},setup(e){const n=t.ref(!1),r=t.ref(null),s=t.ref([]),b=t.ref(0),o=t.ref([]),l=t.ref(null),f=t.ref(null),i=t.ref({top:0,left:0}),m=t.ref(""),k=t.ref(1),D=t.ref(null),B=t.ref("asc"),$=t.computed(()=>e.tabela),d=t.computed(()=>!!e.tabela.mostrarCaixaDeBusca),S=t.computed(()=>e.tabela.acoesTabela??[]),y=t.computed(()=>S.value.length>0),C=t.ref(!1),G=t.ref(Ae(e.tabela.nome)),K=t.ref({}),Z=t.computed(()=>e.tabela.colunas.map(h=>h.rotulo)),X=t.computed(()=>{var W,Q;const h=e.tabela.colunas,T=(((W=G.value.visiveis)==null?void 0:W.length)??0)>0||(((Q=G.value.invisiveis)==null?void 0:Q.length)??0)>0?G.value.invisiveis??[]:h.filter(q=>q.visivel===!1).map(q=>q.rotulo),N=new Set(T),P=h.filter(q=>N.has(q.rotulo)),F=T,R=new Map;for(const q of P)R.has(q.rotulo)||R.set(q.rotulo,q);const Y=[];for(const q of F){const x=R.get(q);x&&Y.push(x)}for(const q of P)Y.includes(q)||Y.push(q);return Y}),te=t.computed(()=>X.value.length>0),H=t.computed(()=>{var q,x;const h=e.tabela.colunas,_=Z.value,T=(((q=G.value.visiveis)==null?void 0:q.length)??0)>0||(((x=G.value.invisiveis)==null?void 0:x.length)??0)>0,N=T?G.value.invisiveis??[]:e.tabela.colunas.filter(L=>L.visivel===!1).map(L=>L.rotulo),P=new Set(N),F=_.filter(L=>!P.has(L)),R=new Set(F),Y=T?G.value.visiveis??[]:[],W=[];for(const L of Y)R.has(L)&&W.push(L);for(const L of F)W.includes(L)||W.push(L);const Q=new Map;for(const L of h)Q.has(L.rotulo)||Q.set(L.rotulo,L);return W.map(L=>Q.get(L)).filter(Boolean)});function oe(){C.value=!0}function U(){C.value=!1}function w(h){G.value=h,lo(e.tabela.nome,h),C.value=!1,K.value={}}function ne(h){const _=!!K.value[h];K.value={...K.value,[h]:!_}}const re=t.computed(()=>{const h=e.tabela.registros_por_consulta;return typeof h=="number"&&h>0?Math.floor(h):10}),E=t.computed(()=>{const h=re.value;if(!h||h<=0)return 1;const _=b.value;return _?Math.max(1,Math.ceil(_/h)):1}),p=t.computed(()=>(e.tabela.acoesLinha??[]).length>0);let c=0;function g(h){var Y,W,Q,q,x,L;const _=h.getBoundingClientRect(),T=8,N=((Q=(W=(Y=f.value)==null?void 0:Y.menuEl)==null?void 0:W.value)==null?void 0:Q.offsetHeight)??0,P=((L=(x=(q=f.value)==null?void 0:q.menuEl)==null?void 0:x.value)==null?void 0:L.offsetWidth)??180;let F=_.bottom+T;const R=_.right-P;N&&F+N>window.innerHeight-T&&(F=_.top-T-N),i.value={top:Math.max(T,Math.round(F)),left:Math.max(T,Math.round(R))}}function u(h){var T,N;if(l.value===null)return;const _=h.target;(N=(T=f.value)==null?void 0:T.menuEl)!=null&&N.value&&f.value.menuEl.value.contains(_)||(l.value=null)}function V(h){if(h){if(D.value===h){B.value=B.value==="asc"?"desc":"asc",j();return}D.value=h,B.value="asc",k.value!==1?k.value=1:j()}}function v(h){m.value!==h&&(m.value=h,k.value!==1?k.value=1:j())}function M(h){const _=Math.min(Math.max(1,h),E.value);_!==k.value&&(k.value=_)}function I(h){const _=e.tabela.acoesLinha??[],T=o.value[h]??[];return _.map((N,P)=>{const F=N.exibir===void 0?!0:typeof N.exibir=="boolean"?N.exibir:!1;return{acao:N,indice:P,visivel:T[P]??F}}).filter(N=>N.visivel)}function z(h){return I(h).length>0}function J(h,_){if(!z(h))return;if(l.value===h){l.value=null;return}l.value=h;const T=(_==null?void 0:_.currentTarget)??null;T&&(g(T),requestAnimationFrame(()=>g(T)))}async function j(){var P,F;const h=++c;n.value=!0,r.value=null,o.value=[],l.value=null,K.value={};const _=Math.max(1,re.value),N={offSet:(k.value-1)*_,limit:_};m.value&&(N.texto_busca=m.value),D.value&&(N.coluna_ordem=D.value,N.direcao_ordem=B.value);try{const R=e.tabela,Y=await R.consulta(N);if(h!==c)return;if(Y.cod!==Ee.sucesso){s.value=[],b.value=0,r.value=Y.mensagem;return}const W=((P=Y.valor)==null?void 0:P.valores)??[],Q=((F=Y.valor)==null?void 0:F.quantidade)??W.length;s.value=W,b.value=Q;const q=Math.max(1,Math.ceil((Q||0)/_));if(k.value>q){k.value=q;return}const x=R.acoesLinha??[];if(!x.length){o.value=[];return}const L=W.map(()=>x.map(ie=>ie.exibir===void 0?!0:typeof ie.exibir=="boolean"?ie.exibir:!1));o.value=L;const No=await Promise.all(W.map(async ie=>Promise.all(x.map(async me=>{if(me.exibir===void 0)return!0;if(typeof me.exibir=="boolean")return me.exibir;try{const Mo=me.exibir(ie);return!!await Promise.resolve(Mo)}catch{return!1}}))));h===c&&(o.value=No)}catch(R){if(h!==c)return;s.value=[],b.value=0,r.value=R instanceof Error?R.message:"Erro ao carregar dados."}finally{h===c&&(n.value=!1)}}return t.onMounted(()=>{document.addEventListener("click",u),j()}),t.onBeforeUnmount(()=>{document.removeEventListener("click",u)}),t.watch(()=>e.tabela.mostrarCaixaDeBusca,h=>{!h&&m.value&&(m.value="",k.value!==1?k.value=1:j())}),t.watch(k,(h,_)=>{h!==_&&j()}),t.watch(()=>e.tabela,()=>{l.value=null,D.value=null,B.value="asc",m.value="",C.value=!1,G.value=Ae(e.tabela.nome),K.value={},k.value!==1?k.value=1:j()}),t.watch(()=>e.tabela.registros_por_consulta,()=>{k.value!==1?k.value=1:j()}),t.watch(s,()=>{l.value=null,K.value={}}),{isDev:!1,tabela:$,carregando:n,erro:r,linhas:s,quantidade:b,menuAberto:l,valorBusca:m,paginaAtual:k,colunaOrdenacao:D,direcaoOrdenacao:B,totalPaginas:E,exibirBusca:d,acoesCabecalho:S,temAcoesCabecalho:y,temAcoes:p,colunasEfetivas:H,rotulosColunas:Z,modalColunasAberto:C,configColunas:G,temColunasInvisiveis:te,colunasInvisiveisEfetivas:X,linhasExpandidas:K,abrirModalColunas:oe,fecharModalColunas:U,salvarModalColunas:w,alternarLinhaExpandida:ne,alternarOrdenacao:V,atualizarBusca:v,irParaPagina:M,acoesDisponiveisPorLinha:I,possuiAcoes:z,toggleMenu:J,menuPopup:f,menuPopupPos:i}}}),io={class:"eli-tabela"},so={class:"eli-tabela__table"};function co(e,a,n,r,s,b){const o=t.resolveComponent("EliTabelaDebug"),l=t.resolveComponent("EliTabelaEstados"),f=t.resolveComponent("EliTabelaCabecalho"),i=t.resolveComponent("EliTabelaModalColunas"),m=t.resolveComponent("EliTabelaHead"),k=t.resolveComponent("EliTabelaBody"),D=t.resolveComponent("EliTabelaMenuAcoes"),B=t.resolveComponent("EliTabelaPaginacao");return t.openBlock(),t.createElementBlock("div",io,[t.createVNode(o,{isDev:e.isDev,menuAberto:e.menuAberto,menuPopupPos:e.menuPopupPos},null,8,["isDev","menuAberto","menuPopupPos"]),e.carregando||e.erro||!e.linhas.length?(t.openBlock(),t.createBlock(l,{key:0,carregando:e.carregando,erro:e.erro,mensagemVazio:e.tabela.mensagemVazio},null,8,["carregando","erro","mensagemVazio"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.exibirBusca||e.temAcoesCabecalho?(t.openBlock(),t.createBlock(f,{key:0,exibirBusca:e.exibirBusca,valorBusca:e.valorBusca,acoesCabecalho:e.acoesCabecalho,onBuscar:e.atualizarBusca,onColunas:e.abrirModalColunas},null,8,["exibirBusca","valorBusca","acoesCabecalho","onBuscar","onColunas"])):t.createCommentVNode("",!0),t.createVNode(i,{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"]),t.createElementVNode("table",so,[t.createVNode(m,{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"]),t.createVNode(k,{colunas:e.colunasEfetivas,colunasInvisiveis:e.colunasInvisiveisEfetivas,temColunasInvisiveis:e.temColunasInvisiveis,linhasExpandidas:e.linhasExpandidas,linhas:e.linhas,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"])]),t.createVNode(D,{ref:"menuPopup",menuAberto:e.menuAberto,posicao:e.menuPopupPos,acoes:e.menuAberto===null?[]:e.acoesDisponiveisPorLinha(e.menuAberto),linha:e.menuAberto===null?null:e.linhas[e.menuAberto],onExecutar:a[0]||(a[0]=({acao:$,linha:d})=>{e.menuAberto=null,$.acao(d)})},null,8,["menuAberto","posicao","acoes","linha"]),e.totalPaginas>1&&e.quantidade>0?(t.openBlock(),t.createBlock(B,{key:1,pagina:e.paginaAtual,totalPaginas:e.totalPaginas,maximoBotoes:e.tabela.maximo_botoes_paginacao,onAlterar:e.irParaPagina},null,8,["pagina","totalPaginas","maximoBotoes","onAlterar"])):t.createCommentVNode("",!0)],64))])}const Te=O(ro,[["render",co]]),uo=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({get:()=>e.value,set:s=>{n("update:value",s),n("input",s),n("change",s)}});return{attrs:a,emit:n,localValue:r}}});function mo(e,a,n,r,s,b){var o,l,f,i;return t.openBlock(),t.createBlock(se.VTextField,t.mergeProps({modelValue:e.localValue,"onUpdate:modelValue":a[0]||(a[0]=m=>e.localValue=m),label:(o=e.opcoes)==null?void 0:o.rotulo,placeholder:(l=e.opcoes)==null?void 0:l.placeholder,counter:(f=e.opcoes)==null?void 0:f.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"))}),null,16,["modelValue","label","placeholder","counter","maxlength"])}const Pe=O(uo,[["render",mo]]);function po(e){if(!Number.isFinite(e)||e<=0||e>=1)return 0;const a=e.toString();if(a.includes("e-")){const[,s]=a.split("e-"),b=Number(s);return Number.isFinite(b)?b:0}const n=a.indexOf(".");return n===-1?0:a.slice(n+1).replace(/0+$/,"").length}function fo(e){const a=(e??"").trim().replace(/,/g,".");if(!a)return null;const n=Number(a);return Number.isNaN(n)?null:n}function he(e,a){return e==null?"":a===null?String(e):Number(e).toFixed(Math.max(0,a)).replace(/\./g,",")}function Ie(e){return(e??"").replace(/\D+/g,"")}function bo(e){const a=(e??"").replace(/[^0-9.,]+/g,""),n=a.match(/[.,]/);if(!n)return a;const r=n[0],s=a.indexOf(r),b=a.slice(0,s).replace(/[.,]/g,""),o=a.slice(s+1).replace(/[.,]/g,"");return`${b.length?b:"0"}${r}${o}`}function ho(e,a){if(a===null)return e;if(a<=0)return e.replace(/[.,]/g,"");const n=e.match(/[.,]/);if(!n)return e;const r=n[0],s=e.indexOf(r),b=e.slice(0,s),o=e.slice(s+1);return`${b}${r}${o.slice(0,a)}`}function go(e){const a=e.match(/^(\d+)[.,]$/);if(!a)return null;const n=Number(a[1]);return Number.isNaN(n)?null:n}const yo=t.defineComponent({name:"EliEntradaNumero",inheritAttrs:!1,props:{value:{type:[Number,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 m;const i=(m=e.opcoes)==null?void 0:m.precisao;return i==null?null:po(i)}),s=t.computed(()=>r.value===0),b=t.computed(()=>{const i=r.value;return i!==null&&i>0}),o=t.ref(""),l=t.ref(void 0);t.watch(()=>e.value,i=>{i!==l.value&&(o.value=he(i,r.value),l.value=i)},{immediate:!0});function f(i){if(b.value){const B=r.value??0,$=Ie(i),d=$?Number($):0,S=Math.pow(10,B),y=$?d/S:null,C=y===null?null:y;l.value=C,n("update:value",C),n("input",C),n("change",C),o.value=he(C,B);return}const m=s.value?Ie(i):bo(i),k=s.value?m:ho(m,r.value);let D=null;if(k){const $=(s.value?null:go(k))??fo(k);D=$===null?null:$}l.value=D,n("update:value",D),n("input",D),n("change",D),o.value=he(D,r.value)}return{attrs:a,emit:n,displayValue:o,isInteiro:s,onUpdateModelValue:f}}}),$o={class:"eli-entrada__prefixo"},ko={class:"eli-entrada__sufixo"};function Eo(e,a,n,r,s,b){var o,l,f,i;return t.openBlock(),t.createBlock(se.VTextField,t.mergeProps({"model-value":e.displayValue,label:(o=e.opcoes)==null?void 0:o.rotulo,placeholder:(l=e.opcoes)==null?void 0:l.placeholder,type:e.isInteiro?"number":"text",inputmode:e.isInteiro?"numeric":"decimal",pattern:e.isInteiro?"[0-9]*":"[0-9.,]*"},e.attrs,{"onUpdate:modelValue":e.onUpdateModelValue,onFocus:a[0]||(a[0]=()=>e.emit("focus")),onBlur:a[1]||(a[1]=()=>e.emit("blur"))}),t.createSlots({_:2},[(f=e.opcoes)!=null&&f.prefixo?{name:"prepend-inner",fn:t.withCtx(()=>[t.createElementVNode("span",$o,t.toDisplayString(e.opcoes.prefixo),1)]),key:"0"}:void 0,(i=e.opcoes)!=null&&i.sufixo?{name:"append-inner",fn:t.withCtx(()=>[t.createElementVNode("span",ko,t.toDisplayString(e.opcoes.sufixo),1)]),key:"1"}:void 0]),1040,["model-value","label","placeholder","type","inputmode","pattern","onUpdate:modelValue"])}const Oe=O(yo,[["render",Eo],["__scopeId","data-v-77cbf216"]]);function Bo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var de={exports:{}},Co=de.exports,qe;function Vo(){return qe||(qe=1,(function(e,a){(function(n,r){e.exports=r()})(Co,(function(){var n=1e3,r=6e4,s=36e5,b="millisecond",o="second",l="minute",f="hour",i="day",m="week",k="month",D="quarter",B="year",$="date",d="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|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,C={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(E){var p=["th","st","nd","rd"],c=E%100;return"["+E+(p[(c-20)%10]||p[c]||p[0])+"]"}},G=function(E,p,c){var g=String(E);return!g||g.length>=p?E:""+Array(p+1-g.length).join(c)+E},K={s:G,z:function(E){var p=-E.utcOffset(),c=Math.abs(p),g=Math.floor(c/60),u=c%60;return(p<=0?"+":"-")+G(g,2,"0")+":"+G(u,2,"0")},m:function E(p,c){if(p.date()1)return E(v[0])}else{var M=p.name;X[M]=p,u=M}return!g&&u&&(Z=u),u||!g&&Z},U=function(E,p){if(H(E))return E.clone();var c=typeof p=="object"?p:{};return c.date=E,c.args=arguments,new ne(c)},w=K;w.l=oe,w.i=H,w.w=function(E,p){return U(E,{locale:p.$L,utc:p.$u,x:p.$x,$offset:p.$offset})};var ne=(function(){function E(c){this.$L=oe(c.locale,null,!0),this.parse(c),this.$x=this.$x||c.x||{},this[te]=!0}var p=E.prototype;return p.parse=function(c){this.$d=(function(g){var u=g.date,V=g.utc;if(u===null)return new Date(NaN);if(w.u(u))return new Date;if(u instanceof Date)return new Date(u);if(typeof u=="string"&&!/Z$/i.test(u)){var v=u.match(S);if(v){var M=v[2]-1||0,I=(v[7]||"0").substring(0,3);return V?new Date(Date.UTC(v[1],M,v[3]||1,v[4]||0,v[5]||0,v[6]||0,I)):new Date(v[1],M,v[3]||1,v[4]||0,v[5]||0,v[6]||0,I)}}return new Date(u)})(c),this.init()},p.init=function(){var c=this.$d;this.$y=c.getFullYear(),this.$M=c.getMonth(),this.$D=c.getDate(),this.$W=c.getDay(),this.$H=c.getHours(),this.$m=c.getMinutes(),this.$s=c.getSeconds(),this.$ms=c.getMilliseconds()},p.$utils=function(){return w},p.isValid=function(){return this.$d.toString()!==d},p.isSame=function(c,g){var u=U(c);return this.startOf(g)<=u&&u<=this.endOf(g)},p.isAfter=function(c,g){return U(c)!0,input:e=>!0,change:e=>!0,"update:modelValue":e=>!0,alterar:e=>!0,foco:()=>!0,desfoco:()=>!0,focus:()=>!0,blur:()=>!0},setup(e,{emit:a,attrs:n}){const r=t.computed(()=>e.opcoes?e.opcoes:{rotulo:e.rotulo??"Data e hora",placeholder:e.placeholder??"",modo:e.modo??"dataHora",limpavel:e.limpavel,erro:e.erro,mensagensErro:e.mensagensErro,dica:e.dica,dicaPersistente:e.dicaPersistente,densidade:e.densidade,variante:e.variante,min:e.min,max:e.max}),s=t.computed(()=>r.value.modo??"dataHora"),b=t.computed(()=>!!e.desabilitado),o=t.computed(()=>s.value==="data"?"date":"datetime-local");function l(d){return s.value==="data"?ue(d).format("YYYY-MM-DD"):ue(d).format("YYYY-MM-DDTHH:mm")}function f(d){return s.value==="data"?ue(`${d}T00:00`).format():ue(d).format()}const i=t.computed(()=>e.value!==void 0?e.value??null:e.modelValue),m=t.computed({get:()=>i.value?l(i.value):"",set:d=>{const S=d&&d.length>0?d:null;if(!S){a("update:value",null),a("input",null),a("change",null),a("update:modelValue",null),a("alterar",null);return}const y=f(S);a("update:value",y),a("input",y),a("change",y),a("update:modelValue",y),a("alterar",y)}}),k=t.computed(()=>{const d=r.value.min;if(d)return l(d)}),D=t.computed(()=>{const d=r.value.max;if(d)return l(d)});function B(){a("foco"),a("focus")}function $(){a("desfoco"),a("blur")}return{attrs:n,valor:m,tipoInput:o,minLocal:k,maxLocal:D,opcoesEfetivas:r,desabilitadoEfetivo:b,emitCompatFocus:B,emitCompatBlur:$}}}),_o={class:"eli-data-hora"};function Do(e,a,n,r,s,b){return t.openBlock(),t.createElementBlock("div",_o,[t.createVNode(se.VTextField,t.mergeProps({modelValue:e.valor,"onUpdate:modelValue":a[0]||(a[0]=o=>e.valor=o),type:e.tipoInput,label:e.opcoesEfetivas.rotulo,placeholder:e.opcoesEfetivas.placeholder,disabled:e.desabilitadoEfetivo,clearable:!!e.opcoesEfetivas.limpavel,error:!!e.opcoesEfetivas.erro,"error-messages":e.opcoesEfetivas.mensagensErro,hint:e.opcoesEfetivas.dica,"persistent-hint":!!e.opcoesEfetivas.dicaPersistente,density:e.opcoesEfetivas.densidade??"comfortable",variant:e.opcoesEfetivas.variante??"outlined",min:e.minLocal,max:e.maxLocal},e.attrs,{onFocus:e.emitCompatFocus,onBlur:e.emitCompatBlur}),null,16,["modelValue","type","label","placeholder","disabled","clearable","error","error-messages","hint","persistent-hint","density","variant","min","max","onFocus","onBlur"])])}const Fe=O(So,[["render",Do],["__scopeId","data-v-1bfd1be8"]]),wo={install(e){e.component("EliOlaMundo",$e),e.component("EliBotao",pe),e.component("EliBadge",ce),e.component("EliInput",be),e.component("EliCartao",ke),e.component("EliTabela",Te),e.component("EliEntradaTexto",Pe),e.component("EliEntradaNumero",Oe),e.component("EliEntradaDataHora",Fe)}};A.EliBadge=ce,A.EliBotao=pe,A.EliCartao=ke,A.EliEntradaDataHora=Fe,A.EliEntradaNumero=Oe,A.EliEntradaTexto=Pe,A.EliInput=be,A.EliOlaMundo=$e,A.EliTabela=Te,A.default=wo,Object.defineProperties(A,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})})); diff --git a/dist/types/componentes/EliEntrada/EliEntradaDataHora.vue.d.ts b/dist/types/componentes/EliEntrada/EliEntradaDataHora.vue.d.ts new file mode 100644 index 0000000..6ce886d --- /dev/null +++ b/dist/types/componentes/EliEntrada/EliEntradaDataHora.vue.d.ts @@ -0,0 +1,231 @@ +import { PropType } from "vue"; +import type { CampoDensidade, CampoVariante } from "../../tipos"; +import type { PadroesEntradas } from "./tiposEntradas"; +type EntradaDataHora = PadroesEntradas["dataHora"]; +type PropsAntigas = { + modo?: "data" | "dataHora"; + rotulo?: string; + placeholder?: string; + desabilitado?: boolean; + limpavel?: boolean; + erro?: boolean; + mensagensErro?: string | string[]; + dica?: string; + dicaPersistente?: boolean; + densidade?: CampoDensidade; + variante?: CampoVariante; + min?: string; + max?: string; +}; +declare const __VLS_export: import("vue").DefineComponent; + default: undefined; + }; + opcoes: { + type: PropType; + required: false; + default: undefined; + }; + modelValue: { + type: PropType; + default: null; + }; + modo: { + type: PropType; + default: undefined; + }; + rotulo: { + type: StringConstructor; + default: undefined; + }; + placeholder: { + type: StringConstructor; + default: undefined; + }; + desabilitado: { + type: BooleanConstructor; + default: undefined; + }; + limpavel: { + type: BooleanConstructor; + default: undefined; + }; + erro: { + type: BooleanConstructor; + default: undefined; + }; + mensagensErro: { + type: PropType; + default: undefined; + }; + dica: { + type: StringConstructor; + default: undefined; + }; + dicaPersistente: { + type: BooleanConstructor; + default: undefined; + }; + densidade: { + type: PropType; + default: undefined; + }; + variante: { + type: PropType; + default: undefined; + }; + min: { + type: PropType; + default: undefined; + }; + max: { + type: PropType; + default: undefined; + }; +}>, { + attrs: { + [x: string]: unknown; + }; + valor: import("vue").WritableComputedRef; + tipoInput: import("vue").ComputedRef<"date" | "datetime-local">; + minLocal: import("vue").ComputedRef; + maxLocal: import("vue").ComputedRef; + opcoesEfetivas: import("vue").ComputedRef<{ + rotulo: string; + placeholder?: string; + } & { + modo?: "data" | "dataHora"; + limpavel?: boolean; + erro?: boolean; + mensagensErro?: string | string[]; + dica?: string; + dicaPersistente?: boolean; + min?: string; + max?: string; + densidade?: import("../../tipos").CampoDensidade; + variante?: import("../../tipos").CampoVariante; + }>; + desabilitadoEfetivo: import("vue").ComputedRef; + emitCompatFocus: () => void; + emitCompatBlur: () => void; +}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { + "update:value": (_v: string | null) => true; + input: (_v: string | null) => true; + change: (_v: string | null) => true; + "update:modelValue": (_v: string | null) => true; + alterar: (_v: string | null) => true; + foco: () => true; + desfoco: () => true; + focus: () => true; + blur: () => true; +}, string, import("vue").PublicProps, Readonly; + default: undefined; + }; + opcoes: { + type: PropType; + required: false; + default: undefined; + }; + modelValue: { + type: PropType; + default: null; + }; + modo: { + type: PropType; + default: undefined; + }; + rotulo: { + type: StringConstructor; + default: undefined; + }; + placeholder: { + type: StringConstructor; + default: undefined; + }; + desabilitado: { + type: BooleanConstructor; + default: undefined; + }; + limpavel: { + type: BooleanConstructor; + default: undefined; + }; + erro: { + type: BooleanConstructor; + default: undefined; + }; + mensagensErro: { + type: PropType; + default: undefined; + }; + dica: { + type: StringConstructor; + default: undefined; + }; + dicaPersistente: { + type: BooleanConstructor; + default: undefined; + }; + densidade: { + type: PropType; + default: undefined; + }; + variante: { + type: PropType; + default: undefined; + }; + min: { + type: PropType; + default: undefined; + }; + max: { + type: PropType; + default: undefined; + }; +}>> & Readonly<{ + "onUpdate:modelValue"?: ((_v: string | null) => any) | undefined; + onChange?: ((_v: string | null) => any) | undefined; + onFocus?: (() => any) | undefined; + onBlur?: (() => any) | undefined; + onInput?: ((_v: string | null) => any) | undefined; + onAlterar?: ((_v: string | null) => any) | undefined; + "onUpdate:value"?: ((_v: string | null) => any) | undefined; + onFoco?: (() => any) | undefined; + onDesfoco?: (() => any) | undefined; +}>, { + placeholder: string; + modelValue: string | null; + value: string | null | undefined; + max: string | undefined; + min: string | undefined; + erro: boolean; + rotulo: string; + modo: "data" | "dataHora" | undefined; + limpavel: boolean; + mensagensErro: string | string[]; + dica: string; + dicaPersistente: boolean; + densidade: CampoDensidade; + variante: CampoVariante; + opcoes: { + rotulo: string; + placeholder?: string; + } & { + modo?: "data" | "dataHora"; + limpavel?: boolean; + erro?: boolean; + mensagensErro?: string | string[]; + dica?: string; + dicaPersistente?: boolean; + min?: string; + max?: string; + densidade?: import("../../tipos").CampoDensidade; + variante?: import("../../tipos").CampoVariante; + }; + desabilitado: boolean; +}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>; +declare const _default: typeof __VLS_export; +export default _default; diff --git a/dist/types/componentes/EliEntrada/index.d.ts b/dist/types/componentes/EliEntrada/index.d.ts index f376631..dc5693f 100644 --- a/dist/types/componentes/EliEntrada/index.d.ts +++ b/dist/types/componentes/EliEntrada/index.d.ts @@ -1,4 +1,5 @@ import EliEntradaTexto from "./EliEntradaTexto.vue"; import EliEntradaNumero from "./EliEntradaNumero.vue"; -export { EliEntradaTexto, EliEntradaNumero }; +import EliEntradaDataHora from "./EliEntradaDataHora.vue"; +export { EliEntradaTexto, EliEntradaNumero, EliEntradaDataHora }; export type { PadroesEntradas, TipoEntrada } from "./tiposEntradas"; diff --git a/dist/types/componentes/EliEntrada/registryEliEntradas.d.ts b/dist/types/componentes/EliEntrada/registryEliEntradas.d.ts index 202ad73..f2ae029 100644 --- a/dist/types/componentes/EliEntrada/registryEliEntradas.d.ts +++ b/dist/types/componentes/EliEntrada/registryEliEntradas.d.ts @@ -103,4 +103,242 @@ export declare const registryTabelaCelulas: { }>, { value: number | null | undefined; }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>; + readonly dataHora: import("vue").DefineComponent; + default: undefined; + }; + opcoes: { + type: import("vue").PropType<{ + rotulo: string; + placeholder?: string; + } & { + modo?: "data" | "dataHora"; + limpavel?: boolean; + erro?: boolean; + mensagensErro?: string | string[]; + dica?: string; + dicaPersistente?: boolean; + min?: string; + max?: string; + densidade?: import("../../tipos/campo.js").CampoDensidade; + variante?: import("../../tipos/campo.js").CampoVariante; + }>; + required: false; + default: undefined; + }; + modelValue: { + type: import("vue").PropType; + default: null; + }; + modo: { + type: import("vue").PropType<"data" | "dataHora" | undefined>; + default: undefined; + }; + rotulo: { + type: StringConstructor; + default: undefined; + }; + placeholder: { + type: StringConstructor; + default: undefined; + }; + desabilitado: { + type: BooleanConstructor; + default: undefined; + }; + limpavel: { + type: BooleanConstructor; + default: undefined; + }; + erro: { + type: BooleanConstructor; + default: undefined; + }; + mensagensErro: { + type: import("vue").PropType; + default: undefined; + }; + dica: { + type: StringConstructor; + default: undefined; + }; + dicaPersistente: { + type: BooleanConstructor; + default: undefined; + }; + densidade: { + type: import("vue").PropType; + default: undefined; + }; + variante: { + type: import("vue").PropType; + default: undefined; + }; + min: { + type: import("vue").PropType; + default: undefined; + }; + max: { + type: import("vue").PropType; + default: undefined; + }; + }>, { + attrs: { + [x: string]: unknown; + }; + valor: import("vue").WritableComputedRef; + tipoInput: import("vue").ComputedRef<"date" | "datetime-local">; + minLocal: import("vue").ComputedRef; + maxLocal: import("vue").ComputedRef; + opcoesEfetivas: import("vue").ComputedRef<{ + rotulo: string; + placeholder?: string; + } & { + modo?: "data" | "dataHora"; + limpavel?: boolean; + erro?: boolean; + mensagensErro?: string | string[]; + dica?: string; + dicaPersistente?: boolean; + min?: string; + max?: string; + densidade?: import("../../tipos/campo.js").CampoDensidade; + variante?: import("../../tipos/campo.js").CampoVariante; + }>; + desabilitadoEfetivo: import("vue").ComputedRef; + emitCompatFocus: () => void; + emitCompatBlur: () => void; + }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { + "update:value": (_v: string | null) => true; + input: (_v: string | null) => true; + change: (_v: string | null) => true; + "update:modelValue": (_v: string | null) => true; + alterar: (_v: string | null) => true; + foco: () => true; + desfoco: () => true; + focus: () => true; + blur: () => true; + }, string, import("vue").PublicProps, Readonly; + default: undefined; + }; + opcoes: { + type: import("vue").PropType<{ + rotulo: string; + placeholder?: string; + } & { + modo?: "data" | "dataHora"; + limpavel?: boolean; + erro?: boolean; + mensagensErro?: string | string[]; + dica?: string; + dicaPersistente?: boolean; + min?: string; + max?: string; + densidade?: import("../../tipos/campo.js").CampoDensidade; + variante?: import("../../tipos/campo.js").CampoVariante; + }>; + required: false; + default: undefined; + }; + modelValue: { + type: import("vue").PropType; + default: null; + }; + modo: { + type: import("vue").PropType<"data" | "dataHora" | undefined>; + default: undefined; + }; + rotulo: { + type: StringConstructor; + default: undefined; + }; + placeholder: { + type: StringConstructor; + default: undefined; + }; + desabilitado: { + type: BooleanConstructor; + default: undefined; + }; + limpavel: { + type: BooleanConstructor; + default: undefined; + }; + erro: { + type: BooleanConstructor; + default: undefined; + }; + mensagensErro: { + type: import("vue").PropType; + default: undefined; + }; + dica: { + type: StringConstructor; + default: undefined; + }; + dicaPersistente: { + type: BooleanConstructor; + default: undefined; + }; + densidade: { + type: import("vue").PropType; + default: undefined; + }; + variante: { + type: import("vue").PropType; + default: undefined; + }; + min: { + type: import("vue").PropType; + default: undefined; + }; + max: { + type: import("vue").PropType; + default: undefined; + }; + }>> & Readonly<{ + "onUpdate:modelValue"?: ((_v: string | null) => any) | undefined; + onChange?: ((_v: string | null) => any) | undefined; + onFocus?: (() => any) | undefined; + onBlur?: (() => any) | undefined; + onInput?: ((_v: string | null) => any) | undefined; + onAlterar?: ((_v: string | null) => any) | undefined; + "onUpdate:value"?: ((_v: string | null) => any) | undefined; + onFoco?: (() => any) | undefined; + onDesfoco?: (() => any) | undefined; + }>, { + placeholder: string; + modelValue: string | null; + value: string | null | undefined; + max: string | undefined; + min: string | undefined; + erro: boolean; + rotulo: string; + modo: "data" | "dataHora" | undefined; + limpavel: boolean; + mensagensErro: string | string[]; + dica: string; + dicaPersistente: boolean; + densidade: import("../../tipos/campo.js").CampoDensidade; + variante: import("../../tipos/campo.js").CampoVariante; + opcoes: { + rotulo: string; + placeholder?: string; + } & { + modo?: "data" | "dataHora"; + limpavel?: boolean; + erro?: boolean; + mensagensErro?: string | string[]; + dica?: string; + dicaPersistente?: boolean; + min?: string; + max?: string; + densidade?: import("../../tipos/campo.js").CampoDensidade; + variante?: import("../../tipos/campo.js").CampoVariante; + }; + desabilitado: boolean; + }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>; }; diff --git a/dist/types/componentes/EliEntrada/tiposEntradas.d.ts b/dist/types/componentes/EliEntrada/tiposEntradas.d.ts index acec971..4bc9ff7 100644 --- a/dist/types/componentes/EliEntrada/tiposEntradas.d.ts +++ b/dist/types/componentes/EliEntrada/tiposEntradas.d.ts @@ -57,6 +57,28 @@ export type PadroesEntradas = { */ precisao?: number; }>; + dataHora: tipoPadraoEntrada; }; /** * União dos tipos de entrada suportados. diff --git a/dist/types/componentes/data_hora/EliDataHora.vue.d.ts b/dist/types/componentes/data_hora/EliDataHora.vue.d.ts deleted file mode 100644 index ec69afb..0000000 --- a/dist/types/componentes/data_hora/EliDataHora.vue.d.ts +++ /dev/null @@ -1,221 +0,0 @@ -import { PropType } from "vue"; -import type { CampoDensidade, CampoVariante } from "../../tipos"; -declare const __VLS_export: import("vue").DefineComponent; - default: null; - }; - /** - * Define o tipo de entrada. - * - `dataHora`: usa `datetime-local` - * - `data`: usa `date` - */ - modo: { - type: PropType<"data" | "dataHora">; - default: string; - }; - /** Rótulo exibido no v-text-field (Vuetify). */ - rotulo: { - type: StringConstructor; - default: string; - }; - /** Placeholder do input. */ - placeholder: { - type: StringConstructor; - default: string; - }; - /** Desabilita a interação. */ - desabilitado: { - type: BooleanConstructor; - default: boolean; - }; - /** Se true, mostra ícone para limpar o valor (Vuetify clearable). */ - limpavel: { - type: BooleanConstructor; - default: boolean; - }; - /** Estado de erro (visual). */ - erro: { - type: BooleanConstructor; - default: boolean; - }; - /** Mensagens de erro. */ - mensagensErro: { - type: PropType; - default: () => never[]; - }; - /** Texto de apoio. */ - dica: { - type: StringConstructor; - default: string; - }; - /** Mantém a dica sempre visível. */ - dicaPersistente: { - type: BooleanConstructor; - default: boolean; - }; - /** Densidade do campo (Vuetify). */ - densidade: { - type: PropType; - default: string; - }; - /** Variante do v-text-field (Vuetify). */ - variante: { - type: PropType; - default: string; - }; - /** - * Valor mínimo permitido. - * ISO 8601 (offset ou `Z`). - */ - min: { - type: PropType; - default: undefined; - }; - /** - * Valor máximo permitido. - * ISO 8601 (offset ou `Z`). - */ - max: { - type: PropType; - default: undefined; - }; -}>, { - attrs: { - [x: string]: unknown; - }; - valor: import("vue").WritableComputedRef; - emit: ((event: "update:modelValue", _valor: string | null) => void) & ((event: "alterar", _valor: string | null) => void) & ((event: "foco") => void) & ((event: "desfoco") => void); - minLocal: import("vue").ComputedRef; - maxLocal: import("vue").ComputedRef; - tipoInput: import("vue").ComputedRef<"date" | "datetime-local">; -}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { - /** v-model padrão. */ - "update:modelValue": (_valor: string | null) => true; - /** Alias para consumidores que querem um evento semântico. */ - alterar: (_valor: string | null) => true; - foco: () => true; - desfoco: () => true; -}, string, import("vue").PublicProps, Readonly; - default: null; - }; - /** - * Define o tipo de entrada. - * - `dataHora`: usa `datetime-local` - * - `data`: usa `date` - */ - modo: { - type: PropType<"data" | "dataHora">; - default: string; - }; - /** Rótulo exibido no v-text-field (Vuetify). */ - rotulo: { - type: StringConstructor; - default: string; - }; - /** Placeholder do input. */ - placeholder: { - type: StringConstructor; - default: string; - }; - /** Desabilita a interação. */ - desabilitado: { - type: BooleanConstructor; - default: boolean; - }; - /** Se true, mostra ícone para limpar o valor (Vuetify clearable). */ - limpavel: { - type: BooleanConstructor; - default: boolean; - }; - /** Estado de erro (visual). */ - erro: { - type: BooleanConstructor; - default: boolean; - }; - /** Mensagens de erro. */ - mensagensErro: { - type: PropType; - default: () => never[]; - }; - /** Texto de apoio. */ - dica: { - type: StringConstructor; - default: string; - }; - /** Mantém a dica sempre visível. */ - dicaPersistente: { - type: BooleanConstructor; - default: boolean; - }; - /** Densidade do campo (Vuetify). */ - densidade: { - type: PropType; - default: string; - }; - /** Variante do v-text-field (Vuetify). */ - variante: { - type: PropType; - default: string; - }; - /** - * Valor mínimo permitido. - * ISO 8601 (offset ou `Z`). - */ - min: { - type: PropType; - default: undefined; - }; - /** - * Valor máximo permitido. - * ISO 8601 (offset ou `Z`). - */ - max: { - type: PropType; - default: undefined; - }; -}>> & Readonly<{ - "onUpdate:modelValue"?: ((_valor: string | null) => any) | undefined; - onAlterar?: ((_valor: string | null) => any) | undefined; - onFoco?: (() => any) | undefined; - onDesfoco?: (() => any) | undefined; -}>, { - placeholder: string; - modelValue: string | null; - modo: "data" | "dataHora"; - rotulo: string; - desabilitado: boolean; - limpavel: boolean; - erro: boolean; - mensagensErro: string | string[]; - dica: string; - dicaPersistente: boolean; - densidade: CampoDensidade; - variante: CampoVariante; - min: string | undefined; - max: string | undefined; -}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>; -/** - * EliDataHora - * - * Campo para entrada de data + hora. - * - * Modelo: - * - O componente **recebe** `modelValue` em ISO 8601 (UTC `Z` ou com offset) - * - Converte para horário local para exibir (`date` ou `datetime-local`) - * - Ao editar, **emite** ISO 8601 com o **offset local** - */ -declare const _default: typeof __VLS_export; -export default _default; diff --git a/dist/types/componentes/data_hora/index.d.ts b/dist/types/componentes/data_hora/index.d.ts index 65a3e65..aa5dde0 100644 --- a/dist/types/componentes/data_hora/index.d.ts +++ b/dist/types/componentes/data_hora/index.d.ts @@ -1 +1 @@ -export { default as EliDataHora } from "./EliDataHora.vue"; +export { default as EliEntradaDataHora } from "../EliEntrada/EliEntradaDataHora.vue"; diff --git a/dist/types/index.d.ts b/dist/types/index.d.ts index c2cb64f..362f068 100644 --- a/dist/types/index.d.ts +++ b/dist/types/index.d.ts @@ -5,16 +5,14 @@ import { EliBotao } from "./componentes/botao"; import { EliBadge } from "./componentes/indicador"; import { EliInput } from "./componentes/campo"; import { EliCartao } from "./componentes/cartao"; -import { EliDataHora } from "./componentes/data_hora"; import { EliTabela } from "./componentes/EliTabela"; -import { EliEntradaTexto, EliEntradaNumero } from "./componentes/EliEntrada"; +import { EliEntradaTexto, EliEntradaNumero, EliEntradaDataHora } from "./componentes/EliEntrada"; export { EliOlaMundo }; export { EliBotao }; export { EliBadge }; export { EliInput }; export { EliCartao }; -export { EliDataHora }; export { EliTabela }; -export { EliEntradaTexto, EliEntradaNumero }; +export { EliEntradaTexto, EliEntradaNumero, EliEntradaDataHora }; declare const EliVue: Plugin; export default EliVue; diff --git a/package.json b/package.json index fc3fc60..8ea93a6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eli-vue", - "version": "0.1.58", + "version": "0.1.60", "private": false, "main": "./dist/eli-vue.umd.js", "module": "./dist/eli-vue.es.js", diff --git a/src/componentes/EliEntrada/EliEntradaDataHora.vue b/src/componentes/EliEntrada/EliEntradaDataHora.vue new file mode 100644 index 0000000..ccd12cc --- /dev/null +++ b/src/componentes/EliEntrada/EliEntradaDataHora.vue @@ -0,0 +1,220 @@ + + + + + diff --git a/src/componentes/EliEntrada/README.md b/src/componentes/EliEntrada/README.md new file mode 100644 index 0000000..2d2ee12 --- /dev/null +++ b/src/componentes/EliEntrada/README.md @@ -0,0 +1,176 @@ +# EliEntrada (Padrão de Entradas) + +Esta pasta define o **padrão EliEntrada**: um conjunto de componentes de entrada (inputs) com uma **API uniforme**. + +> TL;DR +> - Toda entrada recebe **`value`** (estado) e **`opcoes`** (configuração). +> - O padrão de uso é **`v-model:value`**. +> - Mantemos compatibilidade com Vue 2 via evento **`input`**. + +--- + +## Para humanos (uso no dia-a-dia) + +### Conceito + +Um componente **EliEntrada** recebe **duas propriedades**: + +- `value`: o valor atual do campo (entrada e saída) +- `opcoes`: um objeto que configura o componente (rótulo, placeholder e opções específicas do tipo) + +Essa padronização facilita: +- gerar formulários dinamicamente +- trocar tipos de entrada com o mínimo de refactor +- documentar e tipar de forma previsível + +### Tipos e contratos + +Os contratos ficam em: [`tiposEntradas.ts`](./tiposEntradas.ts) + +- `PadroesEntradas`: mapa de tipos suportados (ex.: `texto`, `numero`, `dataHora`) +- `TipoEntrada`: união das chaves do mapa (ex.: `"texto" | "numero" | "dataHora"`) + +### Componentes disponíveis + +#### 1) `EliEntradaTexto` + +**Value**: `string | null | undefined` + +**Opções** (além de `rotulo`/`placeholder`): +- `limiteCaracteres?: number` + +Exemplo: + +```vue + + + +``` + +--- + +#### 2) `EliEntradaNumero` + +**Value**: `number | null | undefined` + +**Opções**: +- `precisao?: number` + - `1` => inteiro + - `0.1` => 1 casa decimal + - `0.01` => 2 casas decimais +- `prefixo?: string` (ex.: `"R$"`) +- `sufixo?: string` (ex.: `"kg"`) + +Comportamento: +- Quando `precisao < 1` o componente entra em modo **fixed-point**: você digita números continuamente e ele insere a vírgula automaticamente. +- O que é exibido sempre corresponde ao `value` emitido. + +Exemplos: + +```vue + + + +``` + +--- + +#### 3) `EliEntradaDataHora` + +**Value**: `string | null | undefined` (ISO 8601 com offset ou `Z`) + +**Opções**: +- `modo?: "data" | "dataHora"` (default: `dataHora`) +- `min?: string` (ISO) +- `max?: string` (ISO) +- `limpavel?: boolean` +- `erro?: boolean` +- `mensagensErro?: string | string[]` +- `dica?: string` +- `dicaPersistente?: boolean` +- `densidade?: CampoDensidade` +- `variante?: CampoVariante` + +Importante: +- O input nativo `datetime-local` não carrega timezone. +- O componente converte ISO (Z/offset) para **local** para exibir. +- Ao alterar, emite ISO 8601 com o **offset local**. + +Exemplo: + +```vue + +``` + +### Compatibilidade Vue 2 / Vue 3 + +Padrão recomendado (Vue 3): +- `v-model:value` + +Compat Vue 2: +- todos os EliEntradas também emitem `input`. +- isso permite consumir com o padrão `value + input` quando necessário. + +### Playground + +- Entradas: `src/playground/entradas.playground.vue` +- Data/hora: `src/playground/data_hora.playground.vue` + +--- + +## Para IA (contratos, invariantes e padrões de evolução) + +### Contratos (não quebrar) + +1) **Todo EliEntrada tem**: + - prop `value` + - prop `opcoes` + - evento `update:value` + +2) **Compatibilidade**: + - emitir `input` (compat Vue 2) é obrigatório + +3) **Tipagem**: + - `PadroesEntradas` é a fonte única do contrato (value/opcoes) + - `TipoEntrada = keyof PadroesEntradas` + +4) **Sanitização/Normalização**: + - `EliEntradaNumero` deve bloquear caracteres inválidos e manter display coerente com `value` + - `EliEntradaDataHora` deve receber/emitir ISO e converter para local apenas para exibição + +### Como adicionar uma nova entrada (checklist) + +1) Adicionar chave em `PadroesEntradas` em `tiposEntradas.ts` +2) Criar `EliEntradaX.vue` seguindo o padrão: + - `value` + `opcoes` + - emite `update:value`, `input`, `change` +3) Exportar no `src/componentes/EliEntrada/index.ts` +4) Registrar no `src/componentes/EliEntrada/registryEliEntradas.ts` +5) Criar/atualizar playground (`src/playground/*.playground.vue`) +6) Validar `pnpm -s run build:types` e `pnpm -s run build` + +### Padrões de mudança (refactors seguros) + +- Se precisar mudar o contrato, faça **migração incremental**: + - manter props/eventos antigos como fallback temporário + - atualizar playground e exemplos + - rodar `build:types` para garantir geração de `.d.ts` diff --git a/src/componentes/EliEntrada/index.ts b/src/componentes/EliEntrada/index.ts index bfab287..55ac506 100644 --- a/src/componentes/EliEntrada/index.ts +++ b/src/componentes/EliEntrada/index.ts @@ -1,5 +1,6 @@ import EliEntradaTexto from "./EliEntradaTexto.vue"; import EliEntradaNumero from "./EliEntradaNumero.vue"; +import EliEntradaDataHora from "./EliEntradaDataHora.vue"; -export { EliEntradaTexto, EliEntradaNumero }; +export { EliEntradaTexto, EliEntradaNumero, EliEntradaDataHora }; export type { PadroesEntradas, TipoEntrada } from "./tiposEntradas"; diff --git a/src/componentes/EliEntrada/registryEliEntradas.ts b/src/componentes/EliEntrada/registryEliEntradas.ts index f207047..99e21c6 100644 --- a/src/componentes/EliEntrada/registryEliEntradas.ts +++ b/src/componentes/EliEntrada/registryEliEntradas.ts @@ -2,10 +2,12 @@ import type { Component } from "vue"; import EliEntradaTexto from "./EliEntradaTexto.vue"; import EliEntradaNumero from "./EliEntradaNumero.vue"; +import EliEntradaDataHora from "./EliEntradaDataHora.vue"; import type { TipoEntrada } from "./tiposEntradas"; export const registryTabelaCelulas = { texto: EliEntradaTexto, numero: EliEntradaNumero, + dataHora: EliEntradaDataHora, } as const satisfies Record; diff --git a/src/componentes/EliEntrada/tiposEntradas.ts b/src/componentes/EliEntrada/tiposEntradas.ts index cdcb71e..66abe9e 100644 --- a/src/componentes/EliEntrada/tiposEntradas.ts +++ b/src/componentes/EliEntrada/tiposEntradas.ts @@ -72,6 +72,41 @@ export type PadroesEntradas = { precisao?: number } > + + dataHora: tipoPadraoEntrada< + string | null | undefined, + { + /** Define o tipo de entrada. - `dataHora`: datetime-local - `data`: date */ + modo?: "data" | "dataHora" + + /** Se true, mostra ícone para limpar o valor (Vuetify clearable). */ + limpavel?: boolean + + /** Estado de erro (visual). */ + erro?: boolean + + /** Mensagens de erro. */ + mensagensErro?: string | string[] + + /** Texto de apoio. */ + dica?: string + + /** Mantém a dica sempre visível. */ + dicaPersistente?: boolean + + /** Valor mínimo permitido (ISO 8601 - offset ou Z). */ + min?: string + + /** Valor máximo permitido (ISO 8601 - offset ou Z). */ + max?: string + + /** Densidade do campo (Vuetify). */ + densidade?: import("../../tipos").CampoDensidade + + /** Variante do v-text-field (Vuetify). */ + variante?: import("../../tipos").CampoVariante + } + > } /** diff --git a/src/componentes/data_hora/EliDataHora.vue b/src/componentes/data_hora/EliDataHora.vue deleted file mode 100644 index ab6ec70..0000000 --- a/src/componentes/data_hora/EliDataHora.vue +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - diff --git a/src/componentes/data_hora/index.ts b/src/componentes/data_hora/index.ts index 002d336..1243467 100644 --- a/src/componentes/data_hora/index.ts +++ b/src/componentes/data_hora/index.ts @@ -1 +1 @@ -export { default as EliDataHora } from "./EliDataHora.vue"; \ No newline at end of file +export { default as EliEntradaDataHora } from "../EliEntrada/EliEntradaDataHora.vue"; \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 2cb9a2a..9ff27ed 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,18 +5,16 @@ import { EliBotao } from "./componentes/botao"; import { EliBadge } from "./componentes/indicador"; import { EliInput } from "./componentes/campo"; import { EliCartao } from "./componentes/cartao"; -import { EliDataHora } from "./componentes/data_hora"; import { EliTabela } from "./componentes/EliTabela"; -import { EliEntradaTexto, EliEntradaNumero } from "./componentes/EliEntrada"; +import { EliEntradaTexto, EliEntradaNumero, EliEntradaDataHora } from "./componentes/EliEntrada"; export { EliOlaMundo }; export { EliBotao }; export { EliBadge }; export { EliInput }; export { EliCartao }; -export { EliDataHora }; export { EliTabela }; -export { EliEntradaTexto, EliEntradaNumero }; +export { EliEntradaTexto, EliEntradaNumero, EliEntradaDataHora }; const EliVue: Plugin = { install(app: App) { @@ -25,10 +23,10 @@ const EliVue: Plugin = { app.component("EliBadge", EliBadge); app.component("EliInput", EliInput); app.component("EliCartao", EliCartao); - app.component("EliDataHora", EliDataHora); app.component("EliTabela", EliTabela); app.component("EliEntradaTexto", EliEntradaTexto); app.component("EliEntradaNumero", EliEntradaNumero); + app.component("EliEntradaDataHora", EliEntradaDataHora); }, }; diff --git a/src/playground/data_hora.playground.vue b/src/playground/data_hora.playground.vue index f3cbbc5..aa76e5f 100644 --- a/src/playground/data_hora.playground.vue +++ b/src/playground/data_hora.playground.vue @@ -2,12 +2,52 @@

EliDataHora (entrada de data e hora)

+

Novo padrão (EliEntradaDataHora: value + opcoes)

+
- - + + + + + +
+ + + +

Compat (API antiga usando o mesmo componente)

+ +
+ + - - - - - + - import { computed, defineComponent, ref } from "vue"; -import { EliDataHora } from "@/componentes/data_hora"; +import { EliEntradaDataHora } from "@/componentes/EliEntrada"; +import { VDivider } from "vuetify/components"; export default defineComponent({ name: "DataHoraPlayground", - components: { EliDataHora }, + components: { EliEntradaDataHora, VDivider }, setup() { const dataHora = ref("2026-01-09T13:15:00-03:00");