@thibezer/ui-components-kit 2.8.2 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +233 -0
- package/README.md +37 -10
- package/dist/acessibilidade-CSzX-DkG.cjs +1 -0
- package/dist/acessibilidade-CUlSXc2X.js +38 -0
- package/dist/altura-controle-ukMRPckR.cjs +1 -0
- package/dist/altura-controle-vxQiXG4q.js +62 -0
- package/dist/botao.cjs +1 -1
- package/dist/botao.js +1 -1
- package/dist/camadas.cjs +111 -109
- package/dist/camadas.js +1360 -1182
- package/dist/campo-texto.cjs +1 -1
- package/dist/campo-texto.js +1 -1
- package/dist/canvas.cjs +88 -86
- package/dist/canvas.js +4695 -3395
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/components/ui-area-texto/area-texto-altura.d.ts +16 -0
- package/dist/components/ui-area-texto/area-texto-contador.d.ts +6 -0
- package/dist/components/ui-area-texto/area-texto-template.d.ts +2 -0
- package/dist/components/ui-area-texto/index.d.ts +3 -0
- package/dist/components/ui-area-texto/tipos.d.ts +19 -0
- package/dist/components/ui-area-texto/ui-area-texto.d.ts +100 -0
- package/dist/components/ui-avatar/ui-avatar.d.ts +11 -0
- package/dist/components/ui-badge/ui-badge.d.ts +2 -0
- package/dist/components/ui-barra-ferramentas/ferramentas-comum.d.ts +3 -1
- package/dist/components/ui-barra-ferramentas/paleta-atalhos.d.ts +23 -0
- package/dist/components/ui-barra-ferramentas/paleta-pressao-longa.d.ts +24 -0
- package/dist/components/ui-barra-ferramentas/ribbon-render.d.ts +22 -0
- package/dist/components/ui-barra-ferramentas/ribbon-teclado.d.ts +24 -0
- package/dist/components/ui-barra-ferramentas/ui-paleta-ferramentas.d.ts +3 -7
- package/dist/components/ui-barra-ferramentas/ui-ribbon.d.ts +0 -1
- package/dist/components/ui-camadas/camadas-arraste-controles.d.ts +2 -0
- package/dist/components/ui-camadas/camadas-arvore-renderer.d.ts +4 -11
- package/dist/components/ui-camadas/camadas-colecao.d.ts +27 -0
- package/dist/components/ui-camadas/camadas-drag-drop.d.ts +13 -1
- package/dist/components/ui-camadas/camadas-drop-ops.d.ts +31 -0
- package/dist/components/ui-camadas/camadas-hierarquia.d.ts +10 -0
- package/dist/components/ui-camadas/camadas-host.d.ts +1 -0
- package/dist/components/ui-camadas/camadas-lembranca.d.ts +34 -0
- package/dist/components/ui-camadas/camadas-mapas-base.d.ts +3 -1
- package/dist/components/ui-camadas/camadas-render.d.ts +15 -0
- package/dist/components/ui-camadas/camadas-renomear.d.ts +12 -0
- package/dist/components/ui-camadas/camadas-selecao-api.d.ts +17 -0
- package/dist/components/ui-camadas/camadas-selecao.d.ts +12 -0
- package/dist/components/ui-camadas/camadas-thumb.d.ts +1 -0
- package/dist/components/ui-camadas/ui-camadas.d.ts +8 -5
- package/dist/components/ui-campo-texto/campo-texto-estados.d.ts +5 -1
- package/dist/components/ui-campo-texto/ui-campo-texto.d.ts +1 -0
- package/dist/components/ui-canvas-cad/cad-acessibilidade.d.ts +21 -0
- package/dist/components/ui-canvas-cad/cad-atributos-sync.d.ts +2 -1
- package/dist/components/ui-canvas-cad/cad-broadcast.d.ts +1 -1
- package/dist/components/ui-canvas-cad/cad-evento-coordenadas.d.ts +22 -0
- package/dist/components/ui-canvas-cad/cad-eventos-canvas.d.ts +3 -8
- package/dist/components/ui-canvas-cad/cad-feicoes-camera.d.ts +26 -0
- package/dist/components/ui-canvas-cad/cad-feicoes-consulta.d.ts +21 -0
- package/dist/components/ui-canvas-cad/cad-feicoes-dados.d.ts +39 -0
- package/dist/components/ui-canvas-cad/cad-feicoes-desenho.d.ts +68 -0
- package/dist/components/ui-canvas-cad/cad-feicoes-edicao.d.ts +37 -0
- package/dist/components/ui-canvas-cad/cad-feicoes-operacoes.d.ts +48 -0
- package/dist/components/ui-canvas-cad/cad-feicoes-ponteiro.d.ts +28 -0
- package/dist/components/ui-canvas-cad/cad-feicoes-selecao-regiao.d.ts +22 -0
- package/dist/components/ui-canvas-cad/cad-feicoes-tipos.d.ts +53 -0
- package/dist/components/ui-canvas-cad/cad-feicoes-versoes.d.ts +33 -0
- package/dist/components/ui-canvas-cad/cad-feicoes.d.ts +39 -106
- package/dist/components/ui-canvas-cad/cad-inicializador.d.ts +3 -1
- package/dist/components/ui-canvas-cad/cad-leaflet-adaptador.d.ts +5 -0
- package/dist/components/ui-canvas-cad/cad-recusas.d.ts +6 -0
- package/dist/components/ui-canvas-cad/cad-selecao-pontos.d.ts +5 -0
- package/dist/components/ui-canvas-cad/tipos.d.ts +37 -0
- package/dist/components/ui-canvas-cad/ui-canvas-cad.d.ts +30 -1
- package/dist/components/ui-card/card-interacao.d.ts +17 -0
- package/dist/components/ui-card/card-secoes.d.ts +10 -0
- package/dist/components/ui-card/ui-card.d.ts +23 -0
- package/dist/components/ui-checkbox/ui-checkbox.d.ts +4 -1
- package/dist/components/ui-cores/tipos.d.ts +2 -0
- package/dist/components/ui-cores/ui-controle-cores.d.ts +8 -3
- package/dist/components/ui-cores/ui-seletor-cor.d.ts +3 -1
- package/dist/components/ui-linha/index.d.ts +1 -0
- package/dist/components/ui-linha/ui-linha.d.ts +48 -0
- package/dist/components/ui-mapa/mapa-atributos.d.ts +14 -0
- package/dist/components/ui-mapa/mapa-basemaps.d.ts +7 -0
- package/dist/components/ui-mapa/mapa-icones.d.ts +4 -0
- package/dist/components/ui-mapa/mapa-leaflet.d.ts +5 -0
- package/dist/components/ui-mapa/mapa-vinculo-pai.d.ts +22 -0
- package/dist/components/ui-mapa/tipos.d.ts +13 -0
- package/dist/components/ui-mapa/ui-mapa-linha.d.ts +12 -5
- package/dist/components/ui-mapa/ui-mapa-marcador.d.ts +15 -6
- package/dist/components/ui-mapa/ui-mapa.d.ts +14 -1
- package/dist/components/ui-modal/modal-acessibilidade.d.ts +5 -5
- package/dist/components/ui-modal/modal-foco.d.ts +28 -0
- package/dist/components/ui-modal/ui-modal.d.ts +1 -11
- package/dist/components/ui-radio/radio-grupo-registry.d.ts +10 -0
- package/dist/components/ui-radio/ui-radio.d.ts +9 -2
- package/dist/components/ui-skeleton/ui-skeleton.d.ts +9 -0
- package/dist/components/ui-switch/ui-switch.d.ts +3 -1
- package/dist/components/ui-tabela/tabela-estados.d.ts +16 -0
- package/dist/components/ui-tabela/tabela-rolagem.d.ts +44 -0
- package/dist/components/ui-tabela/tabela-teclado.d.ts +16 -0
- package/dist/components/ui-tabela/ui-tabela.d.ts +1 -19
- package/dist/components/ui-texto/ui-texto.d.ts +16 -0
- package/dist/components/ui-tooltip/tooltip-popover.d.ts +7 -0
- package/dist/components/ui-tooltip/tooltip-posicionamento.d.ts +29 -0
- package/dist/components/ui-tooltip/ui-tooltip.d.ts +24 -1
- package/dist/core/altura-controle.d.ts +34 -0
- package/dist/core/alvo-digitavel.d.ts +5 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/opcoes.d.ts +16 -0
- package/dist/core/rotulo-controle.d.ts +13 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +28 -18
- package/dist/cores.cjs +1 -1
- package/dist/cores.js +9 -8
- package/dist/custom-elements.json +28294 -20127
- package/dist/data.cjs +1 -1
- package/dist/data.js +2 -2
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.js +2 -2
- package/dist/form-validacao-BlQFxUVj.js +104 -0
- package/dist/form-validacao-DIeyQVH5.cjs +1 -0
- package/dist/forms.cjs +1 -1
- package/dist/forms.d.ts +4 -0
- package/dist/forms.js +15 -12
- package/dist/gerencigeo-canvas/canvas_interacao.d.ts +2 -1
- package/dist/gerencigeo-canvas/curva_leaflet.d.ts +2 -2
- package/dist/gerencigeo-canvas/feature_curvas.d.ts +3 -1
- package/dist/gerencigeo-canvas/feature_desenho.d.ts +13 -1
- package/dist/gerencigeo-canvas/feature_desenho_controle.d.ts +3 -0
- package/dist/gerencigeo-canvas/feature_edicao_ops.d.ts +9 -0
- package/dist/gerencigeo-canvas/feature_editor_vertices.d.ts +13 -2
- package/dist/gerencigeo-canvas/feature_lod.d.ts +38 -0
- package/dist/gerencigeo-canvas/feature_popup.d.ts +2 -0
- package/dist/gerencigeo-canvas/feature_simplificacao.d.ts +16 -8
- package/dist/gerencigeo-canvas/index.d.ts +7 -0
- package/dist/gerencigeo-canvas/layer_hit_test.d.ts +22 -0
- package/dist/gerencigeo-canvas/layer_manager.d.ts +5 -0
- package/dist/gerencigeo-canvas/mapa_core.d.ts +10 -0
- package/dist/gerencigeo-canvas/motor/dados-camada.d.ts +39 -0
- package/dist/gerencigeo-canvas/motor/estilo.d.ts +28 -0
- package/dist/gerencigeo-canvas/motor/geometria-px.d.ts +27 -0
- package/dist/gerencigeo-canvas/motor/index.d.ts +5 -0
- package/dist/gerencigeo-canvas/motor/motor-formas.d.ts +107 -0
- package/dist/gerencigeo-canvas/motor/tipos.d.ts +100 -0
- package/dist/gerencigeo-canvas/popup_gate.d.ts +30 -0
- package/dist/gerencigeo-canvas/popup_residual.d.ts +5 -0
- package/dist/gerencigeo-canvas/renderers/canvas_formas_leaflet.d.ts +87 -0
- package/dist/gerencigeo-canvas/renderers/feicoes_canvas_renderer.d.ts +58 -0
- package/dist/gerencigeo-canvas/renderers/feicoes_despachante.d.ts +31 -0
- package/dist/gerencigeo-canvas/renderers/feicoes_renderer.d.ts +48 -9
- package/dist/gerencigeo-canvas/renderers/marcadores_feicoes.d.ts +11 -0
- package/dist/gerencigeo-canvas/renderers/marcas_lod_layer.d.ts +19 -0
- package/dist/gerencigeo-canvas/renderers/renderizador_feicoes_tipos.d.ts +44 -0
- package/dist/gerencigeo-canvas/renderers/renderizador_formas.d.ts +95 -0
- package/dist/gerencigeo-canvas/renderers/selecao_visual.d.ts +6 -0
- package/dist/gerencigeo-canvas/types.d.ts +2 -0
- package/dist/gerencigeo-canvas/zoom_opcoes.d.ts +10 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.js +196 -189
- package/dist/mapa.cjs +11 -16
- package/dist/mapa.js +242 -170
- package/dist/modal.cjs +1 -1
- package/dist/modal.js +1 -1
- package/dist/motor-BB6tB6U-.cjs +1 -0
- package/dist/motor-CFI84lM2.js +1301 -0
- package/dist/motor.cjs +1 -0
- package/dist/motor.d.ts +7 -0
- package/dist/motor.js +52 -0
- package/dist/opcoes-CupvWVIm.js +24 -0
- package/dist/opcoes-vdAUY5OI.cjs +1 -0
- package/dist/register.cjs +1 -1
- package/dist/register.js +14 -13
- package/dist/tabela.cjs +1 -1
- package/dist/tabela.js +1 -1
- package/dist/tipos-elementos.d.ts +123 -8
- package/dist/tipos-react.d.ts +6 -0
- package/dist/tipos-vue.d.ts +119 -8
- package/dist/tools.cjs +1 -1
- package/dist/tools.js +1 -1
- package/dist/ui-badge-B5J_c5P5.js +197 -0
- package/dist/ui-badge-DC4y6Dik.cjs +28 -0
- package/dist/ui-botao-D24oXySA.cjs +12 -0
- package/dist/ui-botao-Dsj08jjw.js +165 -0
- package/dist/ui-campo-texto-19tIrmBK.js +377 -0
- package/dist/ui-campo-texto-CH8mzX61.cjs +16 -0
- package/dist/ui-card-0wu4rjEX.cjs +20 -0
- package/dist/ui-card-DRtpOo3l.js +143 -0
- package/dist/ui-controle-cores-BEUKOq4n.js +275 -0
- package/dist/ui-controle-cores-BLhrZHMh.cjs +32 -0
- package/dist/ui-kit.css +1 -1
- package/dist/ui-linha-C306zxWG.cjs +19 -0
- package/dist/ui-linha-C_azWkcG.js +517 -0
- package/dist/{ui-modal-DBOtSTbR.js → ui-modal-BkYvNP0G.js} +116 -140
- package/dist/ui-modal-CUNbpbZ1.cjs +18 -0
- package/dist/{ui-paleta-ferramentas-DbwdWVtT.js → ui-paleta-ferramentas-BXXrI1Y7.js} +491 -431
- package/dist/ui-paleta-ferramentas-CsPMTY0G.cjs +21 -0
- package/dist/ui-seletor-cor-2yGryC_Z.cjs +86 -0
- package/dist/ui-seletor-cor-BuyhoDZz.js +345 -0
- package/dist/{ui-skeleton-W9uwIceA.js → ui-skeleton-B2Rgrv8o.js} +254 -191
- package/dist/{ui-skeleton-SPYqku8P.cjs → ui-skeleton-DiOxTBZK.cjs} +10 -10
- package/dist/ui-switch-BL-x_-SM.js +1202 -0
- package/dist/ui-switch-C0i_3QXu.cjs +66 -0
- package/dist/{ui-tabela-propriedades-C-PeuW1i.cjs → ui-tabela-propriedades-CjK2gG14.cjs} +10 -10
- package/dist/{ui-tabela-propriedades-BokvDD3b.js → ui-tabela-propriedades-DoL4SE0r.js} +845 -826
- package/package.json +8 -3
- package/dist/form-validacao-BIOXxt-1.js +0 -140
- package/dist/form-validacao-ytRYSF3E.cjs +0 -1
- package/dist/svg-seguro-BsbNQqpd.js +0 -50
- package/dist/svg-seguro-C76iLlAZ.cjs +0 -1
- package/dist/ui-badge-BxT-sDmV.cjs +0 -28
- package/dist/ui-badge-C0eKBI8E.js +0 -183
- package/dist/ui-botao-BOOnP8ds.cjs +0 -12
- package/dist/ui-botao-DfqSivHl.js +0 -165
- package/dist/ui-botao-OGJV6Vfk.js +0 -165
- package/dist/ui-botao-psS1juof.cjs +0 -12
- package/dist/ui-campo-texto-Cnn2UAkS.cjs +0 -16
- package/dist/ui-campo-texto-Uu2dJE_0.js +0 -379
- package/dist/ui-card-B86lJXTP.cjs +0 -20
- package/dist/ui-card-C_o5_0cB.js +0 -111
- package/dist/ui-controle-cores-BS0WYPdi.js +0 -572
- package/dist/ui-controle-cores-Er6ZcQ7U.cjs +0 -111
- package/dist/ui-modal-CvGFGh1h.cjs +0 -18
- package/dist/ui-paleta-ferramentas-CEZYcN4J.js +0 -624
- package/dist/ui-paleta-ferramentas-CU4icLl0.js +0 -1171
- package/dist/ui-paleta-ferramentas-Ccmo-rB5.cjs +0 -21
- package/dist/ui-paleta-ferramentas-DLwZHIDv.cjs +0 -21
- package/dist/ui-paleta-ferramentas-DNN5i6nL.js +0 -860
- package/dist/ui-paleta-ferramentas-Dbj1kBS9.cjs +0 -18
- package/dist/ui-paleta-ferramentas-bvqxj1Yd.cjs +0 -21
- package/dist/ui-segmented-D6b6zxVs.cjs +0 -19
- package/dist/ui-segmented-DyF5YLsV.js +0 -418
- package/dist/ui-segmented-rn9RxRGM.cjs +0 -19
- package/dist/ui-segmented-wUraId2e.js +0 -412
- package/dist/ui-skeleton-DI4_9WOX.js +0 -428
- package/dist/ui-skeleton-elhKIh2B.cjs +0 -33
- package/dist/ui-switch-BcOqOkiV.js +0 -856
- package/dist/ui-switch-D7iPKDj-.cjs +0 -53
- package/dist/ui-tabela-propriedades-BBr5sqki.cjs +0 -145
- package/dist/ui-tabela-propriedades-BecPqC-e.cjs +0 -141
- package/dist/ui-tabela-propriedades-Boy7I5yW.js +0 -2412
- package/dist/ui-tabela-propriedades-Df9ajC6M.js +0 -2648
- package/dist/ui-toast-Bp_NlM5G.js +0 -156
- package/dist/ui-toast-DGTZKne5.cjs +0 -20
- package/dist/zero-js-triggers-C_KrvFOQ.js +0 -244
- package/dist/zero-js-triggers-C_gtaojZ.cjs +0 -1
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var b = (
|
|
4
|
-
import { L as
|
|
5
|
-
import { a as
|
|
6
|
-
import { d as
|
|
7
|
-
import { h as
|
|
8
|
-
class
|
|
9
|
-
constructor(
|
|
1
|
+
var he = Object.defineProperty;
|
|
2
|
+
var me = (r, t, e) => t in r ? he(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
|
3
|
+
var b = (r, t, e) => me(r, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { L as I } from "./listener-bag-DQgv7OON.js";
|
|
5
|
+
import { a as be } from "./parts-CaoQiCfI.js";
|
|
6
|
+
import { d as ie, S as oe } from "./ssr-safe-5cWfJP-s.js";
|
|
7
|
+
import { h as fe } from "./svg-seguro-ChVJ2L2z.js";
|
|
8
|
+
class ge {
|
|
9
|
+
constructor(t) {
|
|
10
10
|
b(this, "autoFetchController", null);
|
|
11
11
|
b(this, "emVoo", null);
|
|
12
|
-
this.ctx =
|
|
12
|
+
this.ctx = t;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Busca os dados. Resolve `true` em sucesso e `false` em falha, cancelamento ou requisição
|
|
16
16
|
* substituída (nunca rejeita; o motivo da falha vai no evento `ui-fetch-erro`).
|
|
17
17
|
* Uma chamada com a mesma URL de uma requisição em andamento reaproveita essa requisição.
|
|
18
18
|
*/
|
|
19
|
-
carregar(
|
|
20
|
-
if (!
|
|
21
|
-
if (this.emVoo && this.emVoo.url ===
|
|
19
|
+
carregar(t) {
|
|
20
|
+
if (!t) return Promise.resolve(!1);
|
|
21
|
+
if (this.emVoo && this.emVoo.url === t && this.autoFetchController) return this.emVoo.promessa;
|
|
22
22
|
this.cancelarEmVoo();
|
|
23
23
|
const e = new AbortController();
|
|
24
24
|
this.autoFetchController = e;
|
|
25
|
-
const i = this.executar(
|
|
26
|
-
return this.emVoo = { url:
|
|
25
|
+
const i = this.executar(t, e);
|
|
26
|
+
return this.emVoo = { url: t, promessa: i }, i;
|
|
27
27
|
}
|
|
28
|
-
emitir(
|
|
29
|
-
this.ctx.host.dispatchEvent(new CustomEvent(
|
|
28
|
+
emitir(t, e) {
|
|
29
|
+
this.ctx.host.dispatchEvent(new CustomEvent(t, { bubbles: !0, composed: !0, detail: e }));
|
|
30
30
|
}
|
|
31
|
-
erro(
|
|
31
|
+
erro(t, e, i, o) {
|
|
32
32
|
const a = e instanceof Error ? e.message : String(e);
|
|
33
33
|
console.error("[ui-tabela] Erro ao carregar dados remotos:", e);
|
|
34
|
-
const n = { url:
|
|
34
|
+
const n = { url: t, erro: a, origem: i };
|
|
35
35
|
o !== void 0 && (n.status = o), this.emitir("ui-fetch-erro", n);
|
|
36
36
|
}
|
|
37
|
-
async executar(
|
|
37
|
+
async executar(t, e) {
|
|
38
38
|
var s, d, c, l;
|
|
39
39
|
const i = () => this.autoFetchController === e, o = () => {
|
|
40
40
|
this.autoFetchController === e && (this.autoFetchController = null, this.emVoo = null);
|
|
41
41
|
};
|
|
42
|
-
this.ctx.onCarregandoAlterado(!0), this.emitir("ui-fetch-start", { url:
|
|
42
|
+
this.ctx.onCarregandoAlterado(!0), this.emitir("ui-fetch-start", { url: t });
|
|
43
43
|
let a = "rede", n;
|
|
44
44
|
try {
|
|
45
|
-
const u = { ...((d = (s = this.ctx).getOpcoes) == null ? void 0 : d.call(s)) ?? {}, signal: e.signal }, h = await (((l = (c = this.ctx).getFetcher) == null ? void 0 : l.call(c)) ?? ((
|
|
45
|
+
const u = { ...((d = (s = this.ctx).getOpcoes) == null ? void 0 : d.call(s)) ?? {}, signal: e.signal }, h = await (((l = (c = this.ctx).getFetcher) == null ? void 0 : l.call(c)) ?? ((g, _) => fetch(g, _)))(t, u);
|
|
46
46
|
if (!h.ok)
|
|
47
47
|
throw a = "http", n = h.status, new Error(`HTTP ${h.status}: ${h.statusText}`);
|
|
48
48
|
a = "json";
|
|
49
|
-
const m = await h.json(), x = Array.isArray(m) ? m : (m == null ? void 0 : m.dados) || (m == null ? void 0 : m.items) || (m == null ? void 0 : m.data) || (m == null ? void 0 : m.rows) || [],
|
|
50
|
-
return i() ? (a = "render", this.ctx.onDadosRecebidos(
|
|
49
|
+
const m = await h.json(), x = Array.isArray(m) ? m : (m == null ? void 0 : m.dados) || (m == null ? void 0 : m.items) || (m == null ? void 0 : m.data) || (m == null ? void 0 : m.rows) || [], f = Array.isArray(x) ? x : [];
|
|
50
|
+
return i() ? (a = "render", this.ctx.onDadosRecebidos(f), o(), this.ctx.onCarregandoAlterado(!1), this.emitir("ui-fetch-sucesso", { url: t, total: f.length, dados: f }), !0) : !1;
|
|
51
51
|
} catch (u) {
|
|
52
|
-
return (u == null ? void 0 : u.name) === "AbortError" ? (i() && (o(), this.ctx.onCarregandoAlterado(!1)), this.emitir("ui-fetch-cancelado", { url:
|
|
52
|
+
return (u == null ? void 0 : u.name) === "AbortError" ? (i() && (o(), this.ctx.onCarregandoAlterado(!1)), this.emitir("ui-fetch-cancelado", { url: t }), !1) : (i() && (o(), this.ctx.onCarregandoAlterado(!1), this.erro(t, u, a, n)), !1);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
/** Cancela a requisição em andamento (se houver) e libera o indicador de carregamento. */
|
|
@@ -58,56 +58,56 @@ class be {
|
|
|
58
58
|
}
|
|
59
59
|
cancelarEmVoo() {
|
|
60
60
|
if (this.autoFetchController) {
|
|
61
|
-
const
|
|
62
|
-
this.autoFetchController = null, this.emVoo = null,
|
|
61
|
+
const t = this.autoFetchController;
|
|
62
|
+
this.autoFetchController = null, this.emVoo = null, t.abort();
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
const
|
|
67
|
-
function
|
|
68
|
-
return
|
|
66
|
+
const xe = ["id", "_id", "codigo", "key"];
|
|
67
|
+
function ve(r, t) {
|
|
68
|
+
return r != null && (r === t || String(r) === String(t));
|
|
69
69
|
}
|
|
70
|
-
function Y(
|
|
70
|
+
function Y(r, t) {
|
|
71
71
|
let e = -1;
|
|
72
|
-
return typeof
|
|
73
|
-
}
|
|
74
|
-
function
|
|
75
|
-
if (!
|
|
76
|
-
if (typeof
|
|
77
|
-
return
|
|
78
|
-
if (i) return Y(
|
|
79
|
-
const o = [e, ...
|
|
72
|
+
return typeof r == "number" && Number.isInteger(r) ? e = r : typeof r == "string" && /^\d+$/.test(r.trim()) && (e = parseInt(r.trim(), 10)), e >= 0 && e < t ? e : -1;
|
|
73
|
+
}
|
|
74
|
+
function _e(r, t, e = "id", i = !1) {
|
|
75
|
+
if (!r || r.length === 0) return -1;
|
|
76
|
+
if (typeof t == "function")
|
|
77
|
+
return r.findIndex(t);
|
|
78
|
+
if (i) return Y(t, r.length);
|
|
79
|
+
const o = [e, ...xe.filter((a) => a !== e)];
|
|
80
80
|
for (const a of o) {
|
|
81
|
-
const n =
|
|
81
|
+
const n = r.findIndex((s) => !!s && typeof s == "object" && ve(s[a], t));
|
|
82
82
|
if (n !== -1) return n;
|
|
83
83
|
}
|
|
84
|
-
return Y(
|
|
84
|
+
return Y(t, r.length);
|
|
85
85
|
}
|
|
86
|
-
class
|
|
87
|
-
constructor(
|
|
86
|
+
class Ee {
|
|
87
|
+
constructor(t) {
|
|
88
88
|
b(this, "itemSelecionado", null);
|
|
89
89
|
b(this, "indiceSelecionado", null);
|
|
90
|
-
this.ctx =
|
|
90
|
+
this.ctx = t;
|
|
91
91
|
}
|
|
92
92
|
/** Mesmo objeto ou mesmo valor na chave configurada. */
|
|
93
|
-
indiceDoItem(
|
|
94
|
-
const i = this.ctx.getChaveId(), o =
|
|
95
|
-
return o >= 0 ? o : e[i] == null ? -1 :
|
|
93
|
+
indiceDoItem(t, e) {
|
|
94
|
+
const i = this.ctx.getChaveId(), o = t.indexOf(e);
|
|
95
|
+
return o >= 0 ? o : e[i] == null ? -1 : t.findIndex((a) => (a == null ? void 0 : a[i]) != null && String(a[i]) === String(e[i]));
|
|
96
96
|
}
|
|
97
97
|
getItemSelecionado() {
|
|
98
98
|
return this.itemSelecionado;
|
|
99
99
|
}
|
|
100
|
-
setItemSelecionado(
|
|
101
|
-
this.itemSelecionado =
|
|
102
|
-
const e =
|
|
100
|
+
setItemSelecionado(t) {
|
|
101
|
+
this.itemSelecionado = t;
|
|
102
|
+
const e = t ? this.indiceDoItem(this.ctx.getDadosExibicao(), t) : -1;
|
|
103
103
|
this.indiceSelecionado = e >= 0 ? e : null, this.atualizarLinhasSelecionadas();
|
|
104
104
|
}
|
|
105
105
|
getIndiceSelecionado() {
|
|
106
106
|
return this.indiceSelecionado;
|
|
107
107
|
}
|
|
108
|
-
setIndiceSelecionado(
|
|
109
|
-
const e = this.ctx.getDadosExibicao(), i =
|
|
110
|
-
this.indiceSelecionado = i ?
|
|
108
|
+
setIndiceSelecionado(t) {
|
|
109
|
+
const e = this.ctx.getDadosExibicao(), i = t !== null && t >= 0 && t < e.length;
|
|
110
|
+
this.indiceSelecionado = i ? t : null, this.itemSelecionado = i ? e[t] : null, this.atualizarLinhasSelecionadas();
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
113
|
* Reaplica a seleção após ordenar, filtrar ou trocar os dados.
|
|
@@ -116,57 +116,57 @@ class ve {
|
|
|
116
116
|
* - Item removido dos dados: limpa a seleção e emite `ui-selecao-removida`.
|
|
117
117
|
*/
|
|
118
118
|
reconciliar() {
|
|
119
|
-
const
|
|
120
|
-
if (!
|
|
119
|
+
const t = this.itemSelecionado;
|
|
120
|
+
if (!t) {
|
|
121
121
|
this.indiceSelecionado = null;
|
|
122
122
|
return;
|
|
123
123
|
}
|
|
124
|
-
const e = this.ctx.getDadosExibicao(), i = this.indiceDoItem(e,
|
|
124
|
+
const e = this.ctx.getDadosExibicao(), i = this.indiceDoItem(e, t);
|
|
125
125
|
if (i >= 0) {
|
|
126
|
-
this.indiceSelecionado = i, this.substituirReferencia(
|
|
126
|
+
this.indiceSelecionado = i, this.substituirReferencia(t, e[i]);
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
129
129
|
this.indiceSelecionado = null;
|
|
130
|
-
const o = this.ctx.getDadosOriginais(), a = this.indiceDoItem(o,
|
|
130
|
+
const o = this.ctx.getDadosOriginais(), a = this.indiceDoItem(o, t);
|
|
131
131
|
if (a >= 0) {
|
|
132
|
-
this.substituirReferencia(
|
|
132
|
+
this.substituirReferencia(t, o[a]);
|
|
133
133
|
return;
|
|
134
134
|
}
|
|
135
135
|
this.itemSelecionado = null, this.ctx.host.dispatchEvent(
|
|
136
|
-
new CustomEvent("ui-selecao-removida", { bubbles: !0, composed: !0, detail: { item:
|
|
136
|
+
new CustomEvent("ui-selecao-removida", { bubbles: !0, composed: !0, detail: { item: t } })
|
|
137
137
|
);
|
|
138
138
|
}
|
|
139
139
|
/** Mesmo registro com outro objeto (dados recarregados): atualiza a referência e avisa. */
|
|
140
|
-
substituirReferencia(
|
|
141
|
-
this.itemSelecionado = e,
|
|
142
|
-
new CustomEvent("ui-selecao-atualizada", { bubbles: !0, composed: !0, detail: { item: e, anterior:
|
|
140
|
+
substituirReferencia(t, e) {
|
|
141
|
+
this.itemSelecionado = e, t !== e && this.ctx.host.dispatchEvent(
|
|
142
|
+
new CustomEvent("ui-selecao-atualizada", { bubbles: !0, composed: !0, detail: { item: e, anterior: t } })
|
|
143
143
|
);
|
|
144
144
|
}
|
|
145
145
|
limparSelecao() {
|
|
146
146
|
this.itemSelecionado = null, this.indiceSelecionado = null, this.atualizarLinhasSelecionadas();
|
|
147
147
|
}
|
|
148
|
-
isItemSelecionado(
|
|
148
|
+
isItemSelecionado(t, e) {
|
|
149
149
|
if (this.itemSelecionado) {
|
|
150
|
-
if (this.itemSelecionado ===
|
|
150
|
+
if (this.itemSelecionado === t) return !0;
|
|
151
151
|
const i = this.ctx.getChaveId();
|
|
152
|
-
if (
|
|
153
|
-
return String(
|
|
154
|
-
if (
|
|
155
|
-
return String(
|
|
152
|
+
if (t[i] != null && this.itemSelecionado[i] != null)
|
|
153
|
+
return String(t[i]) === String(this.itemSelecionado[i]);
|
|
154
|
+
if (t.id != null && this.itemSelecionado.id != null)
|
|
155
|
+
return String(t.id) === String(this.itemSelecionado.id);
|
|
156
156
|
}
|
|
157
157
|
return this.indiceSelecionado !== null && this.indiceSelecionado === e;
|
|
158
158
|
}
|
|
159
159
|
atualizarLinhasSelecionadas() {
|
|
160
|
-
const
|
|
161
|
-
if (!
|
|
160
|
+
const t = this.ctx.getTbody();
|
|
161
|
+
if (!t) return;
|
|
162
162
|
const e = this.ctx.getDadosExibicao();
|
|
163
|
-
|
|
163
|
+
t.querySelectorAll("tr:not(.ui-tabela__virtual-spacer)").forEach((o) => {
|
|
164
164
|
const a = o.getAttribute("data-index"), n = a !== null ? parseInt(a, 10) : -1, s = n >= 0 ? e[n] : null, d = s ? this.isItemSelecionado(s, n) : !1;
|
|
165
|
-
o.classList.toggle("ui-tabela__tr--selecionada", d),
|
|
165
|
+
o.classList.toggle("ui-tabela__tr--selecionada", d), be(o, "linha-selecionada", d), d ? (o.setAttribute("data-selecionada", "true"), o.setAttribute("aria-current", "true"), o.setAttribute("aria-selected", "true")) : (o.removeAttribute("data-selecionada"), o.removeAttribute("aria-current"), o.setAttribute("aria-selected", "false"));
|
|
166
166
|
});
|
|
167
167
|
}
|
|
168
|
-
rolarPara(
|
|
169
|
-
const i = this.ctx.getDadosExibicao(), o =
|
|
168
|
+
rolarPara(t, e) {
|
|
169
|
+
const i = this.ctx.getDadosExibicao(), o = _e(i, t, this.ctx.getChaveId(), (e == null ? void 0 : e.porIndice) === !0);
|
|
170
170
|
if (o === -1)
|
|
171
171
|
return !1;
|
|
172
172
|
if (e != null && e.selecionar) {
|
|
@@ -182,14 +182,14 @@ class ve {
|
|
|
182
182
|
return this.ctx.onRolarParaIndice(o, (e == null ? void 0 : e.comportamento) || "smooth");
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
function
|
|
186
|
-
return
|
|
185
|
+
function ye(r, t, e) {
|
|
186
|
+
return r !== e ? {
|
|
187
187
|
idColuna: e,
|
|
188
188
|
direcao: "asc"
|
|
189
|
-
} :
|
|
189
|
+
} : t === "asc" ? {
|
|
190
190
|
idColuna: e,
|
|
191
191
|
direcao: "desc"
|
|
192
|
-
} :
|
|
192
|
+
} : t === "desc" ? {
|
|
193
193
|
idColuna: null,
|
|
194
194
|
direcao: "original"
|
|
195
195
|
} : {
|
|
@@ -197,37 +197,37 @@ function _e(t, r, e) {
|
|
|
197
197
|
direcao: "asc"
|
|
198
198
|
};
|
|
199
199
|
}
|
|
200
|
-
const
|
|
201
|
-
function G(
|
|
202
|
-
if (
|
|
203
|
-
if (typeof
|
|
204
|
-
const
|
|
205
|
-
return e ? new Date(+e[3], +e[2] - 1, +e[1], +(e[4] ?? 0), +(e[5] ?? 0)).getTime() : Date.parse(
|
|
200
|
+
const we = new Intl.Collator("pt-BR", { numeric: !0, sensitivity: "base" });
|
|
201
|
+
function G(r) {
|
|
202
|
+
if (r instanceof Date) return r.getTime();
|
|
203
|
+
if (typeof r == "number") return r;
|
|
204
|
+
const t = String(r).trim(), e = /^(\d{1,2})\/(\d{1,2})\/(\d{4})(?:[ T](\d{1,2}):(\d{2}))?$/.exec(t);
|
|
205
|
+
return e ? new Date(+e[3], +e[2] - 1, +e[1], +(e[4] ?? 0), +(e[5] ?? 0)).getTime() : Date.parse(t);
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
if (e === "data" || !e && (
|
|
209
|
-
const i = G(
|
|
207
|
+
function Ce(r, t, e) {
|
|
208
|
+
if (e === "data" || !e && (r instanceof Date || t instanceof Date)) {
|
|
209
|
+
const i = G(r), o = G(t);
|
|
210
210
|
if (!Number.isNaN(i) && !Number.isNaN(o)) return i - o;
|
|
211
|
-
} else if (e === "numero" || !e && typeof
|
|
212
|
-
const i = Number(
|
|
211
|
+
} else if (e === "numero" || !e && typeof r == "number" && typeof t == "number") {
|
|
212
|
+
const i = Number(r), o = Number(t);
|
|
213
213
|
if (!Number.isNaN(i) && !Number.isNaN(o)) return i - o;
|
|
214
|
-
} else if (e === "booleano" || !e && typeof
|
|
215
|
-
return +!!
|
|
216
|
-
return
|
|
214
|
+
} else if (e === "booleano" || !e && typeof r == "boolean" && typeof t == "boolean")
|
|
215
|
+
return +!!r - +!!t;
|
|
216
|
+
return we.compare(String(r), String(t));
|
|
217
217
|
}
|
|
218
|
-
function
|
|
219
|
-
if (!
|
|
220
|
-
return [...
|
|
218
|
+
function Ae(r, t, e, i) {
|
|
219
|
+
if (!t || e === "original")
|
|
220
|
+
return [...r];
|
|
221
221
|
const o = e === "desc" ? -1 : 1;
|
|
222
|
-
return [...
|
|
223
|
-
const s = a[
|
|
224
|
-
return c || l ? c === l ? 0 : c ? 1 : -1 : i != null && i.comparador ? i.comparador(s, d, a, n) * o : s === d ? 0 :
|
|
222
|
+
return [...r].sort((a, n) => {
|
|
223
|
+
const s = a[t], d = n[t], c = s == null, l = d == null;
|
|
224
|
+
return c || l ? c === l ? 0 : c ? 1 : -1 : i != null && i.comparador ? i.comparador(s, d, a, n) * o : s === d ? 0 : Ce(s, d, i == null ? void 0 : i.tipo) * o;
|
|
225
225
|
});
|
|
226
226
|
}
|
|
227
|
-
function V(
|
|
228
|
-
return
|
|
227
|
+
function V(r) {
|
|
228
|
+
return r.normalize("NFD").replace(/[̀-ͯ]/g, "").toLowerCase();
|
|
229
229
|
}
|
|
230
|
-
class
|
|
230
|
+
class ke {
|
|
231
231
|
constructor() {
|
|
232
232
|
b(this, "dadosOriginais", []);
|
|
233
233
|
b(this, "dadosExibicao", []);
|
|
@@ -240,24 +240,24 @@ class Ce {
|
|
|
240
240
|
/** Ordenação feita pelo servidor: a tabela guarda coluna/direção (indicador) mas não reordena os dados. */
|
|
241
241
|
b(this, "ordenacaoRemota", !1);
|
|
242
242
|
}
|
|
243
|
-
setColunas(
|
|
244
|
-
this.colunas =
|
|
243
|
+
setColunas(t) {
|
|
244
|
+
this.colunas = t, this.colunaOrdenada && this.aplicarOrdenacao();
|
|
245
245
|
}
|
|
246
|
-
setOrdenacaoRemota(
|
|
247
|
-
this.ordenacaoRemota !==
|
|
246
|
+
setOrdenacaoRemota(t) {
|
|
247
|
+
this.ordenacaoRemota !== t && (this.ordenacaoRemota = t, this.aplicarOrdenacao());
|
|
248
248
|
}
|
|
249
249
|
/** Restaura coluna/direção (ex.: `ui-sort` cancelado) e recalcula. */
|
|
250
|
-
restaurarOrdenacao(
|
|
251
|
-
this.colunaOrdenada =
|
|
250
|
+
restaurarOrdenacao(t, e) {
|
|
251
|
+
this.colunaOrdenada = t, this.direcaoOrdenacao = e, this.aplicarOrdenacao();
|
|
252
252
|
}
|
|
253
|
-
setColunasFiltro(
|
|
254
|
-
this.colunasFiltro =
|
|
253
|
+
setColunasFiltro(t) {
|
|
254
|
+
this.colunasFiltro = t, this.ultimoFiltro && this.aplicarOrdenacao();
|
|
255
255
|
}
|
|
256
256
|
getDadosOriginais() {
|
|
257
257
|
return this.dadosOriginais;
|
|
258
258
|
}
|
|
259
|
-
setDadosOriginais(
|
|
260
|
-
this.dadosOriginais = Array.isArray(
|
|
259
|
+
setDadosOriginais(t) {
|
|
260
|
+
this.dadosOriginais = Array.isArray(t) ? t.filter((e) => e != null) : [], this.aplicarOrdenacao();
|
|
261
261
|
}
|
|
262
262
|
getDadosExibicao() {
|
|
263
263
|
return this.dadosExibicao;
|
|
@@ -265,31 +265,31 @@ class Ce {
|
|
|
265
265
|
getColunaOrdenada() {
|
|
266
266
|
return this.colunaOrdenada;
|
|
267
267
|
}
|
|
268
|
-
setColunaOrdenada(
|
|
269
|
-
this.colunaOrdenada =
|
|
268
|
+
setColunaOrdenada(t) {
|
|
269
|
+
this.colunaOrdenada = t, t ? this.direcaoOrdenacao === "original" && (this.direcaoOrdenacao = "asc") : this.direcaoOrdenacao = "original", this.aplicarOrdenacao();
|
|
270
270
|
}
|
|
271
271
|
getDirecaoOrdenacao() {
|
|
272
272
|
return this.direcaoOrdenacao;
|
|
273
273
|
}
|
|
274
|
-
setDirecaoOrdenacao(
|
|
275
|
-
this.direcaoOrdenacao =
|
|
274
|
+
setDirecaoOrdenacao(t) {
|
|
275
|
+
this.direcaoOrdenacao = t || "original", this.direcaoOrdenacao === "original" && (this.colunaOrdenada = null), this.aplicarOrdenacao();
|
|
276
276
|
}
|
|
277
|
-
alternarOrdenacaoColuna(
|
|
278
|
-
if (!
|
|
279
|
-
const e =
|
|
277
|
+
alternarOrdenacaoColuna(t) {
|
|
278
|
+
if (!t.ordenavel) return null;
|
|
279
|
+
const e = ye(this.colunaOrdenada, this.direcaoOrdenacao, t.id);
|
|
280
280
|
return this.colunaOrdenada = e.idColuna, this.direcaoOrdenacao = e.direcao, this.aplicarOrdenacao(), e;
|
|
281
281
|
}
|
|
282
282
|
/** Recalcula a lista exibida: filtro vigente e, sobre o resultado, a ordenação da coluna (valem juntos). */
|
|
283
283
|
aplicarOrdenacao() {
|
|
284
|
-
const
|
|
285
|
-
this.dadosExibicao = this.ordenacaoRemota ? [...e] :
|
|
284
|
+
const t = this.ultimoFiltro, e = t ? this.dadosOriginais.filter((o) => this.casaFiltro(o, t)) : this.dadosOriginais, i = this.colunaOrdenada ? this.colunas.find((o) => o.id === this.colunaOrdenada) : null;
|
|
285
|
+
this.dadosExibicao = this.ordenacaoRemota ? [...e] : Ae(e, this.colunaOrdenada, this.direcaoOrdenacao, i);
|
|
286
286
|
}
|
|
287
|
-
casaFiltro(
|
|
288
|
-
return (this.colunasFiltro.length > 0 ? this.colunasFiltro : Object.keys(
|
|
289
|
-
const a =
|
|
287
|
+
casaFiltro(t, e) {
|
|
288
|
+
return (this.colunasFiltro.length > 0 ? this.colunasFiltro : Object.keys(t)).some((o) => {
|
|
289
|
+
const a = t[o], n = this.colunas.find((d) => d.id === o);
|
|
290
290
|
if (n != null && n.textoFiltro)
|
|
291
291
|
try {
|
|
292
|
-
if (V(String(n.textoFiltro(a,
|
|
292
|
+
if (V(String(n.textoFiltro(a, t) ?? "")).includes(e)) return !0;
|
|
293
293
|
} catch {
|
|
294
294
|
}
|
|
295
295
|
if (a == null || typeof a == "object" && !(a instanceof Date)) return !1;
|
|
@@ -301,25 +301,25 @@ class Ce {
|
|
|
301
301
|
temFiltro() {
|
|
302
302
|
return this.ultimoFiltro !== "";
|
|
303
303
|
}
|
|
304
|
-
filtrar(
|
|
305
|
-
this.ultimoFiltro = V((
|
|
304
|
+
filtrar(t) {
|
|
305
|
+
this.ultimoFiltro = V((t || "").trim()), this.aplicarOrdenacao();
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
|
-
const Ae = ':host{display:block;width:100%;box-sizing:border-box;font-family:inherit;color:var(--ui-cor-texto, #e1e1e6);position:relative}.ui-tabela-container{width:100%;max-width:100%;max-height:var(--ui-tabela-max-height, 500px);overflow-x:auto;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 6px);background-color:var(--ui-cor-superficie, #141417);box-sizing:border-box;position:relative}.ui-tabela{width:100%;border-collapse:separate;border-spacing:0;text-align:left;font-size:14px;font-family:var(--ui-fonte-base, inherit);font-variant-numeric:tabular-nums}.ui-tabela thead{background-color:var(--ui-cor-fundo-elevado, #1a1a1e)}.ui-tabela th{position:sticky;top:0;z-index:10;padding:10px 16px;background-color:var(--ui-cor-fundo-elevado, #1a1a1e);color:var(--ui-cor-texto-secundario, #9696a6);font-size:13px;font-weight:600;letter-spacing:.02em;border-bottom:2px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));white-space:nowrap;-webkit-user-select:none;user-select:none;box-sizing:border-box}.ui-tabela th[aria-sort=ascending],.ui-tabela th[aria-sort=descending]{color:var(--ui-cor-texto, #e1e1e6)}.ui-tabela__resizer{position:absolute;top:0;right:0;width:8px;height:100%;cursor:col-resize;-webkit-user-select:none;user-select:none;touch-action:none;z-index:20;background:linear-gradient(var(--ui-cor-borda, rgba(255, 255, 255, .12)),var(--ui-cor-borda, rgba(255, 255, 255, .12))) center / 1px 60% no-repeat;transition:background-color .15s ease}.ui-tabela__resizer:hover,.ui-tabela__resizer:focus-visible,.ui-tabela__resizer--ativo{background:var(--ui-cor-primaria, #00E08A);outline:none}:host([densidade="compacta"]) th,:host([densidade="compacta"]) td,:host([density="compact"]) th,:host([density="compact"]) td{padding:4px 8px}:host([densidade="normal"]) th,:host([densidade="normal"]) td,:host([density="normal"]) th,:host([density="normal"]) td{padding:10px 16px}:host([densidade="relaxada"]) th,:host([densidade="relaxada"]) td,:host([density="relaxed"]) th,:host([density="relaxed"]) td{padding:16px 20px}:host([altura-linha]) td,:host([row-height]) td{height:var(--ui-tabela-altura-linha);box-sizing:border-box;padding-top:0;padding-bottom:0;overflow:hidden;white-space:nowrap}.ui-tabela__header-content{display:inline-flex;align-items:center;vertical-align:middle;width:100%;box-sizing:border-box}.ui-tabela__header-text{margin-right:var(--ui-tabela-th-gap, 6px);display:inline-block;min-width:0;overflow:hidden;text-overflow:ellipsis}.ui-tabela__sort-icon{width:var(--ui-tabela-th-icone, 16px);min-width:var(--ui-tabela-th-icone, 16px);flex:none;display:inline-flex;justify-content:center;align-items:center}.ui-tabela th.ui-tabela__th--ordenavel{cursor:pointer}@media (hover: hover){.ui-tabela th.ui-tabela__th--ordenavel:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,var(--ui-cor-fundo-elevado, #1a1a1e));color:var(--ui-cor-texto, #e1e1e6)}}.ui-tabela__ordenar{all:unset;display:flex;width:100%;box-sizing:border-box;cursor:pointer;font:inherit;color:inherit;text-align:inherit}.ui-tabela__ordenar:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:2px;border-radius:var(--ui-raio-sm, 4px)}.ui-tabela tbody tr:focus{outline:none}.ui-tabela tbody tr:focus-visible{outline:2px solid var(--ui-tabela-cor-foco, var(--ui-cor-texto, #e1e1e6));outline-offset:-2px;background-color:var(--ui-tabela-hover, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 8%, transparent))}.ui-tabela__sort-arrow{display:inline-block;width:14px;height:14px;vertical-align:middle;shape-rendering:geometricPrecision;fill:var(--ui-cor-primaria, #00E08A)}.ui-tabela__sort-arrow path{transition:opacity .15s ease;opacity:.35}.ui-tabela__sort-arrow--asc .seta-cima,.ui-tabela__sort-arrow--desc .seta-baixo{opacity:1}.ui-tabela__sort-arrow--inativo{fill:var(--ui-cor-texto-secundario, #9696a6)}.ui-tabela__sort-arrow--inativo path{opacity:.6}.ui-tabela td{padding:10px 16px;border-bottom:1px solid color-mix(in srgb,var(--ui-cor-borda, rgba(255, 255, 255, .12)) 60%,transparent);white-space:nowrap;vertical-align:middle;color:var(--ui-cor-texto, #e1e1e6);box-sizing:border-box}.ui-tabela__cell-content{display:inline-flex;align-items:center;vertical-align:middle}.ui-tabela__cell-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.ui-tabela--alinhar-esquerda{text-align:left}.ui-tabela--alinhar-esquerda .ui-tabela__header-content,.ui-tabela--alinhar-esquerda .ui-tabela__cell-content{justify-content:flex-start}.ui-tabela--alinhar-centro{text-align:center}.ui-tabela--alinhar-centro .ui-tabela__header-content,.ui-tabela--alinhar-centro .ui-tabela__cell-content{justify-content:center}.ui-tabela--alinhar-direita{text-align:right}.ui-tabela--alinhar-direita .ui-tabela__header-content,.ui-tabela--alinhar-direita .ui-tabela__cell-content{justify-content:flex-end}.ui-tabela tbody tr[data-index]{cursor:pointer}.ui-tabela tbody tr.ui-tabela__tr--par{background-color:var(--ui-tabela-zebra, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 4%, transparent))}@media (hover: hover){.ui-tabela tbody tr[data-index]:hover{background-color:var(--ui-tabela-hover, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 8%, transparent))}}.ui-tabela tbody tr[data-index]:active{background-color:var(--ui-tabela-hover, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 12%, transparent))}:host(:not([selecionar-texto])) .ui-tabela tbody td{-webkit-user-select:none;user-select:none}.ui-tabela tbody tr.ui-tabela__tr--selecionada,.ui-tabela tbody tr[data-selecionada=true]{background-color:var(--ui-tabela-selecionada, var(--ui-cor-linha-selecionada, color-mix(in srgb, var(--ui-cor-primaria, #00E08A) 14%, transparent)))}.ui-tabela tbody tr.ui-tabela__tr--selecionada td:first-child,.ui-tabela tbody tr[data-selecionada=true] td:first-child{box-shadow:inset 3px 0 0 var(--ui-cor-primaria, #00E08A)}@media (hover: hover){.ui-tabela tbody tr.ui-tabela__tr--selecionada:hover,.ui-tabela tbody tr[data-selecionada=true]:hover{background-color:var(--ui-tabela-selecionada-hover, var(--ui-cor-linha-selecionada-hover, color-mix(in srgb, var(--ui-cor-primaria, #00E08A) 22%, transparent)))}}.ui-tabela__virtual-spacer td{padding:0!important;border:none!important;height:inherit;background:transparent!important}.ui-tabela__empty{padding:40px 24px;text-align:center;color:var(--ui-cor-texto-secundario, #9696a6);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;box-sizing:border-box}.ui-tabela__empty-icon{width:32px;height:32px;opacity:.5;fill:currentColor}.ui-tabela__empty-text{font-size:14px;font-weight:500;color:var(--ui-cor-texto-secundario, #9696a6)}.ui-tabela__erro{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px;padding:10px 14px;border:1px solid var(--ui-cor-texto-erro, #ff5555);border-left-width:4px;border-radius:var(--ui-raio-borda, 6px);background:color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 10%,transparent);color:var(--ui-cor-texto, #e1e1e6);font-size:14px;box-sizing:border-box}.ui-tabela__erro-texto{flex:1 1 200px;min-width:0}.ui-tabela__erro-detalhe{display:block;margin-top:2px;font-size:12px;color:var(--ui-cor-texto-secundario, #9696a6);overflow-wrap:anywhere}.ui-tabela__erro-acao,.ui-tabela__prompt-actions button{background:var(--ui-cor-botao-secundario-fundo, rgba(255, 255, 255, .12));color:var(--ui-cor-texto, #e1e1e6);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));padding:6px 12px;border-radius:var(--ui-raio-sm, 4px);font:inherit;cursor:pointer}.ui-tabela__erro-acao:hover,.ui-tabela__prompt-actions button:hover{background:var(--ui-cor-botao-secundario-hover, rgba(255, 255, 255, .2))}.ui-tabela__erro-acao:focus-visible,.ui-tabela__prompt-actions button:focus-visible,.ui-tabela__prompt-dialog input:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:2px}.ui-tabela__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.ui-tabela__loading{position:absolute;top:0;left:0;right:0;bottom:0;background-color:color-mix(in srgb,var(--ui-cor-superficie, #141417) 72%,transparent);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;z-index:50;color:var(--ui-cor-texto, #e1e1e6);font-size:14px}.ui-tabela__spinner{width:32px;height:32px;border:3px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 15%,transparent);border-top-color:var(--ui-cor-primaria, #00E08A);border-radius:50%;animation:ui-tabela-spin .8s linear infinite}@keyframes ui-tabela-spin{to{transform:rotate(360deg)}}.ui-tabela__prompt-dialog{margin:0;max-width:calc(100vw - 16px);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .2));border-radius:var(--ui-raio-borda, 6px);background-color:var(--ui-cor-fundo-elevado, #1a1a1e);color:var(--ui-cor-texto, #e1e1e6);padding:12px;box-shadow:var(--ui-sombra-lg, 0 8px 32px rgba(0, 0, 0, .8));font-family:inherit;font-size:14px}.ui-tabela__prompt-dialog::backdrop{background:#0000004d}.ui-tabela__prompt-title{display:block;margin-bottom:8px;font-weight:500}.ui-tabela__prompt-dialog input{width:100%;padding:6px 8px;border-radius:var(--ui-raio-sm, 4px);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .2));background:var(--ui-cor-superficie, #141417);color:var(--ui-cor-texto, #e1e1e6);margin-bottom:8px;box-sizing:border-box;font:inherit}.ui-tabela__prompt-dialog input[aria-invalid=true]{border-color:var(--ui-cor-texto-erro, #ff5555)}.ui-tabela__prompt-erro{min-height:1.2em;margin-bottom:8px;font-size:12px;color:var(--ui-cor-texto-erro, #ff5555)}.ui-tabela__prompt-actions{display:flex;justify-content:flex-end;gap:8px}.ui-tabela__prompt-actions button:last-child{background:var(--ui-cor-primaria, #00E08A);border-color:transparent;color:var(--ui-cor-texto-sobre-primaria, #000000);font-weight:600}.ui-tabela__prompt-actions button:last-child:hover{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 85%,var(--ui-cor-texto, #e1e1e6))}@media (pointer: coarse){.ui-tabela__resizer{width:16px}:host(:not([altura-linha]):not([row-height])) .ui-tabela tbody tr[data-index]{height:44px}}@media (max-width: 640px){.ui-tabela th{padding:8px 10px;font-size:12px}.ui-tabela td{padding:8px 10px;font-size:13px}}@media (prefers-reduced-motion: reduce){.ui-tabela__resizer,.ui-tabela__sort-arrow path{transition:none}.ui-tabela__spinner{animation-duration:2.4s}}';
|
|
309
|
-
function
|
|
310
|
-
return
|
|
308
|
+
const ze = ':host{display:block;width:100%;box-sizing:border-box;font-family:inherit;color:var(--ui-cor-texto, #e1e1e6);position:relative}.ui-tabela-container{width:100%;max-width:100%;max-height:var(--ui-tabela-max-height, 500px);overflow-x:auto;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 6px);background-color:var(--ui-cor-superficie, #141417);box-sizing:border-box;position:relative}.ui-tabela{width:100%;border-collapse:separate;border-spacing:0;text-align:left;font-size:14px;font-family:var(--ui-fonte-base, inherit);font-variant-numeric:tabular-nums}.ui-tabela thead{background-color:var(--ui-cor-fundo-elevado, #1a1a1e)}.ui-tabela th{position:sticky;top:0;z-index:10;padding:10px 16px;background-color:var(--ui-cor-fundo-elevado, #1a1a1e);color:var(--ui-cor-texto-secundario, #9696a6);font-size:13px;font-weight:600;letter-spacing:.02em;border-bottom:2px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));white-space:nowrap;-webkit-user-select:none;user-select:none;box-sizing:border-box}.ui-tabela th[aria-sort=ascending],.ui-tabela th[aria-sort=descending]{color:var(--ui-cor-texto, #e1e1e6)}.ui-tabela__resizer{position:absolute;top:0;right:0;width:8px;height:100%;cursor:col-resize;-webkit-user-select:none;user-select:none;touch-action:none;z-index:20;background:linear-gradient(var(--ui-cor-borda, rgba(255, 255, 255, .12)),var(--ui-cor-borda, rgba(255, 255, 255, .12))) center / 1px 60% no-repeat;transition:background-color .15s ease}.ui-tabela__resizer:hover,.ui-tabela__resizer:focus-visible,.ui-tabela__resizer--ativo{background:var(--ui-cor-primaria, #00E08A);outline:none}:host([densidade="compacta"]) th,:host([densidade="compacta"]) td,:host([density="compact"]) th,:host([density="compact"]) td{padding:4px 8px}:host([densidade="normal"]) th,:host([densidade="normal"]) td,:host([density="normal"]) th,:host([density="normal"]) td{padding:10px 16px}:host([densidade="relaxada"]) th,:host([densidade="relaxada"]) td,:host([density="relaxed"]) th,:host([density="relaxed"]) td{padding:16px 20px}:host([altura-linha]) td,:host([row-height]) td{height:var(--ui-tabela-altura-linha);box-sizing:border-box;padding-top:0;padding-bottom:0;overflow:hidden;white-space:nowrap}.ui-tabela__header-content{display:inline-flex;align-items:center;vertical-align:middle;width:100%;box-sizing:border-box}.ui-tabela__header-text{margin-right:var(--ui-tabela-th-gap, 6px);display:inline-block;min-width:0;overflow:hidden;text-overflow:ellipsis}.ui-tabela__sort-icon{width:var(--ui-tabela-th-icone, 16px);min-width:var(--ui-tabela-th-icone, 16px);flex:none;display:inline-flex;justify-content:center;align-items:center}.ui-tabela th.ui-tabela__th--ordenavel{cursor:pointer}@media (hover: hover){.ui-tabela th.ui-tabela__th--ordenavel:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,var(--ui-cor-fundo-elevado, #1a1a1e));color:var(--ui-cor-texto, #e1e1e6)}}.ui-tabela__ordenar{all:unset;display:flex;width:100%;box-sizing:border-box;cursor:pointer;font:inherit;color:inherit;text-align:inherit}.ui-tabela__ordenar:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:2px;border-radius:var(--ui-raio-sm, 4px)}.ui-tabela tbody tr:focus{outline:none}.ui-tabela tbody tr:focus-visible{outline:2px solid var(--ui-tabela-cor-foco, var(--ui-cor-texto, #e1e1e6));outline-offset:-2px;background-color:var(--ui-tabela-hover, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 8%, transparent))}.ui-tabela__sort-arrow{display:inline-block;width:14px;height:14px;vertical-align:middle;shape-rendering:geometricPrecision;fill:var(--ui-cor-primaria, #00E08A)}.ui-tabela__sort-arrow path{transition:opacity .15s ease;opacity:.35}.ui-tabela__sort-arrow--asc .seta-cima,.ui-tabela__sort-arrow--desc .seta-baixo{opacity:1}.ui-tabela__sort-arrow--inativo{fill:var(--ui-cor-texto-secundario, #9696a6)}.ui-tabela__sort-arrow--inativo path{opacity:.6}.ui-tabela td{padding:10px 16px;border-bottom:1px solid color-mix(in srgb,var(--ui-cor-borda, rgba(255, 255, 255, .12)) 60%,transparent);white-space:nowrap;vertical-align:middle;color:var(--ui-cor-texto, #e1e1e6);box-sizing:border-box}.ui-tabela__cell-content{display:inline-flex;align-items:center;vertical-align:middle}.ui-tabela__cell-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.ui-tabela--alinhar-esquerda{text-align:left}.ui-tabela--alinhar-esquerda .ui-tabela__header-content,.ui-tabela--alinhar-esquerda .ui-tabela__cell-content{justify-content:flex-start}.ui-tabela--alinhar-centro{text-align:center}.ui-tabela--alinhar-centro .ui-tabela__header-content,.ui-tabela--alinhar-centro .ui-tabela__cell-content{justify-content:center}.ui-tabela--alinhar-direita{text-align:right}.ui-tabela--alinhar-direita .ui-tabela__header-content,.ui-tabela--alinhar-direita .ui-tabela__cell-content{justify-content:flex-end}.ui-tabela tbody tr[data-index]{cursor:pointer}.ui-tabela tbody tr.ui-tabela__tr--par{background-color:var(--ui-tabela-zebra, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 4%, transparent))}@media (hover: hover){.ui-tabela tbody tr[data-index]:hover{background-color:var(--ui-tabela-hover, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 8%, transparent))}}.ui-tabela tbody tr[data-index]:active{background-color:var(--ui-tabela-hover, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 12%, transparent))}:host(:not([selecionar-texto])) .ui-tabela tbody td{-webkit-user-select:none;user-select:none}.ui-tabela tbody tr.ui-tabela__tr--selecionada,.ui-tabela tbody tr[data-selecionada=true]{background-color:var(--ui-tabela-selecionada, var(--ui-cor-linha-selecionada, color-mix(in srgb, var(--ui-cor-primaria, #00E08A) 14%, transparent)))}.ui-tabela tbody tr.ui-tabela__tr--selecionada td:first-child,.ui-tabela tbody tr[data-selecionada=true] td:first-child{box-shadow:inset 3px 0 0 var(--ui-cor-primaria, #00E08A)}@media (hover: hover){.ui-tabela tbody tr.ui-tabela__tr--selecionada:hover,.ui-tabela tbody tr[data-selecionada=true]:hover{background-color:var(--ui-tabela-selecionada-hover, var(--ui-cor-linha-selecionada-hover, color-mix(in srgb, var(--ui-cor-primaria, #00E08A) 22%, transparent)))}}.ui-tabela__virtual-spacer td{padding:0!important;border:none!important;height:inherit;background:transparent!important}.ui-tabela__empty{padding:40px 24px;text-align:center;color:var(--ui-cor-texto-secundario, #9696a6);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;box-sizing:border-box}.ui-tabela__empty-icon{width:32px;height:32px;opacity:.5;fill:currentColor}.ui-tabela__empty-text{font-size:14px;font-weight:500;color:var(--ui-cor-texto-secundario, #9696a6)}.ui-tabela__erro{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px;padding:10px 14px;border:1px solid var(--ui-cor-texto-erro, #ff5555);border-left-width:4px;border-radius:var(--ui-raio-borda, 6px);background:color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 10%,transparent);color:var(--ui-cor-texto, #e1e1e6);font-size:14px;box-sizing:border-box}.ui-tabela__erro-texto{flex:1 1 200px;min-width:0}.ui-tabela__erro-detalhe{display:block;margin-top:2px;font-size:12px;color:var(--ui-cor-texto-secundario, #9696a6);overflow-wrap:anywhere}.ui-tabela__erro-acao,.ui-tabela__prompt-actions button{background:var(--ui-cor-botao-secundario-fundo, rgba(255, 255, 255, .12));color:var(--ui-cor-texto, #e1e1e6);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));padding:6px 12px;border-radius:var(--ui-raio-sm, 4px);font:inherit;cursor:pointer}.ui-tabela__erro-acao:hover,.ui-tabela__prompt-actions button:hover{background:var(--ui-cor-botao-secundario-hover, rgba(255, 255, 255, .2))}.ui-tabela__erro-acao:focus-visible,.ui-tabela__prompt-actions button:focus-visible,.ui-tabela__prompt-dialog input:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:2px}.ui-tabela__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.ui-tabela__loading{position:absolute;top:0;left:0;right:0;bottom:0;background-color:color-mix(in srgb,var(--ui-cor-superficie, #141417) 72%,transparent);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;z-index:50;color:var(--ui-cor-texto, #e1e1e6);font-size:14px}.ui-tabela__spinner{width:32px;height:32px;border:3px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 15%,transparent);border-top-color:var(--ui-cor-primaria, #00E08A);border-radius:50%;animation:ui-tabela-spin .8s linear infinite}@keyframes ui-tabela-spin{to{transform:rotate(360deg)}}.ui-tabela__prompt-dialog{margin:0;max-width:calc(100vw - 16px);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .2));border-radius:var(--ui-raio-borda, 6px);background-color:var(--ui-cor-fundo-elevado, #1a1a1e);color:var(--ui-cor-texto, #e1e1e6);padding:12px;box-shadow:var(--ui-sombra-lg, 0 8px 32px rgba(0, 0, 0, .8));font-family:inherit;font-size:14px}.ui-tabela__prompt-dialog::backdrop{background:#0000004d}.ui-tabela__prompt-title{display:block;margin-bottom:8px;font-weight:500}.ui-tabela__prompt-dialog input{width:100%;padding:6px 8px;border-radius:var(--ui-raio-sm, 4px);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .2));background:var(--ui-cor-superficie, #141417);color:var(--ui-cor-texto, #e1e1e6);margin-bottom:8px;box-sizing:border-box;font:inherit}.ui-tabela__prompt-dialog input[aria-invalid=true]{border-color:var(--ui-cor-texto-erro, #ff5555)}.ui-tabela__prompt-erro{min-height:1.2em;margin-bottom:8px;font-size:12px;color:var(--ui-cor-texto-erro, #ff5555)}.ui-tabela__prompt-actions{display:flex;justify-content:flex-end;gap:8px}.ui-tabela__prompt-actions button:last-child{background:var(--ui-cor-primaria, #00E08A);border-color:transparent;color:var(--ui-cor-texto-sobre-primaria, #000000);font-weight:600}.ui-tabela__prompt-actions button:last-child:hover{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 85%,var(--ui-cor-texto, #e1e1e6))}@media (pointer: coarse){.ui-tabela__resizer{width:16px}:host(:not([altura-linha]):not([row-height])) .ui-tabela tbody tr[data-index]{height:44px}}@media (max-width: 640px){.ui-tabela th{padding:8px 10px;font-size:12px}.ui-tabela td{padding:8px 10px;font-size:13px}}@media (prefers-reduced-motion: reduce){.ui-tabela__resizer,.ui-tabela__sort-arrow path{transition:none}.ui-tabela__spinner{animation-duration:2.4s}}';
|
|
309
|
+
function ae(r) {
|
|
310
|
+
return r == null || r === "" ? "" : typeof r == "number" ? `${r}px` : r;
|
|
311
311
|
}
|
|
312
|
-
function
|
|
313
|
-
return
|
|
312
|
+
function ne(r) {
|
|
313
|
+
return r === "centro" || r === "center" ? "ui-tabela--alinhar-centro" : r === "direita" || r === "right" ? "ui-tabela--alinhar-direita" : "ui-tabela--alinhar-esquerda";
|
|
314
314
|
}
|
|
315
|
-
function
|
|
316
|
-
return
|
|
315
|
+
function se(r) {
|
|
316
|
+
return r === "centro" || r === "center" ? "center" : r === "direita" || r === "right" ? "right" : "left";
|
|
317
317
|
}
|
|
318
|
-
function K(
|
|
319
|
-
return
|
|
318
|
+
function K(r) {
|
|
319
|
+
return r === "compacta" ? 30 : r === "relaxada" ? 56 : 42;
|
|
320
320
|
}
|
|
321
|
-
function
|
|
322
|
-
|
|
321
|
+
function Se(r, t, e, i) {
|
|
322
|
+
r.innerHTML = `<style>${ze}</style>`;
|
|
323
323
|
const o = document.createElement("div");
|
|
324
324
|
o.className = "ui-tabela-container", o.setAttribute("part", "base"), e && (o.style.maxHeight = e);
|
|
325
325
|
const a = document.createElement("div");
|
|
@@ -330,7 +330,7 @@ function ke(t, r, e, i) {
|
|
|
330
330
|
<path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM7 10h2v7H7zm4-3h2v10h-2zm4 6h2v4h-2z"/>
|
|
331
331
|
</svg>`;
|
|
332
332
|
const s = document.createElement("span");
|
|
333
|
-
s.className = "ui-tabela__empty-text", s.textContent =
|
|
333
|
+
s.className = "ui-tabela__empty-text", s.textContent = t, a.appendChild(n), a.appendChild(s);
|
|
334
334
|
const d = document.createElement("table");
|
|
335
335
|
d.className = "ui-tabela", d.setAttribute("part", "tabela"), d.setAttribute("role", "grid");
|
|
336
336
|
const c = document.createElement("colgroup"), l = document.createElement("thead"), u = document.createElement("tbody");
|
|
@@ -343,15 +343,15 @@ function ke(t, r, e, i) {
|
|
|
343
343
|
m.className = "ui-tabela__erro-mensagem";
|
|
344
344
|
const x = document.createElement("span");
|
|
345
345
|
x.className = "ui-tabela__erro-detalhe", h.appendChild(m), h.appendChild(x);
|
|
346
|
-
const
|
|
347
|
-
|
|
348
|
-
const
|
|
349
|
-
|
|
346
|
+
const f = document.createElement("button");
|
|
347
|
+
f.type = "button", f.className = "ui-tabela__erro-acao", f.setAttribute("part", "erro-acao"), f.textContent = "Tentar novamente", p.appendChild(h), p.appendChild(f);
|
|
348
|
+
const g = document.createElement("div");
|
|
349
|
+
g.className = "ui-tabela__sr", g.setAttribute("role", "status"), g.setAttribute("aria-live", "polite"), o.appendChild(p), o.appendChild(d), o.appendChild(a), o.appendChild(g);
|
|
350
350
|
const _ = document.createElement("div");
|
|
351
351
|
return _.className = "ui-tabela__loading", _.setAttribute("part", "carregando"), _.setAttribute("role", "status"), _.setAttribute("aria-live", "polite"), _.style.display = i ? "flex" : "none", _.innerHTML = `
|
|
352
352
|
<div class="ui-tabela__spinner" aria-hidden="true"></div>
|
|
353
353
|
<span class="ui-tabela__loading-texto">Carregando dados...</span>
|
|
354
|
-
`, o.appendChild(_),
|
|
354
|
+
`, o.appendChild(_), r.appendChild(o), {
|
|
355
355
|
containerElement: o,
|
|
356
356
|
tableElement: d,
|
|
357
357
|
theadElement: l,
|
|
@@ -360,37 +360,37 @@ function ke(t, r, e, i) {
|
|
|
360
360
|
emptyElement: a,
|
|
361
361
|
loadingElement: _,
|
|
362
362
|
erroElement: p,
|
|
363
|
-
anuncioElement:
|
|
363
|
+
anuncioElement: g
|
|
364
364
|
};
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function Le(r) {
|
|
367
367
|
var a, n;
|
|
368
|
-
if (!
|
|
369
|
-
|
|
370
|
-
const e =
|
|
371
|
-
|
|
368
|
+
if (!r.theadElement || !r.colgroupElement) return;
|
|
369
|
+
r.headerListeners.cleanup();
|
|
370
|
+
const e = r.theadElement.getRootNode().activeElement, i = e && r.theadElement.contains(e) ? ((a = e.closest("th")) == null ? void 0 : a.getAttribute("data-coluna")) ?? null : null;
|
|
371
|
+
r.theadElement.innerHTML = "", r.colgroupElement.innerHTML = "";
|
|
372
372
|
const o = document.createElement("tr");
|
|
373
|
-
if (o.setAttribute("aria-rowindex", "1"),
|
|
373
|
+
if (o.setAttribute("aria-rowindex", "1"), r.colunas.forEach((s, d) => {
|
|
374
374
|
const c = document.createElement("col");
|
|
375
|
-
s.largura !== void 0 && (c.style.width =
|
|
376
|
-
const l = document.createElement("th"), u =
|
|
377
|
-
if (l.className = u, l.setAttribute("part", "celula-cabecalho"), l.scope = "col", l.setAttribute("data-coluna", s.id), l.style.textAlign =
|
|
378
|
-
const v =
|
|
375
|
+
s.largura !== void 0 && (c.style.width = r.formatWidth(s.largura)), r.colgroupElement.appendChild(c);
|
|
376
|
+
const l = document.createElement("th"), u = r.getAlignmentClass(s.alinhamento);
|
|
377
|
+
if (l.className = u, l.setAttribute("part", "celula-cabecalho"), l.scope = "col", l.setAttribute("data-coluna", s.id), l.style.textAlign = r.getTextAlign(s.alinhamento), s.largura !== void 0 && (l.style.width = r.formatWidth(s.largura)), s.larguraMinima !== void 0 && (l.style.minWidth = r.formatWidth(s.larguraMinima)), s.larguraMaxima !== void 0) {
|
|
378
|
+
const v = r.formatWidth(s.larguraMaxima);
|
|
379
379
|
l.style.maxWidth = v, l.style.overflow = "hidden", l.style.textOverflow = "ellipsis", l.style.whiteSpace = "nowrap";
|
|
380
380
|
}
|
|
381
381
|
s.tooltip && (l.title = s.tooltip);
|
|
382
|
-
const p = !!s.ordenavel &&
|
|
382
|
+
const p = !!s.ordenavel && r.colunaOrdenada === s.id && r.direcaoOrdenacao !== "original", h = p && r.direcaoOrdenacao === "desc";
|
|
383
383
|
if (s.ordenavel) {
|
|
384
384
|
l.classList.add("ui-tabela__th--ordenavel");
|
|
385
|
-
const v = () =>
|
|
386
|
-
|
|
385
|
+
const v = () => r.onHeaderClick(s);
|
|
386
|
+
r.headerListeners.add(l, "click", v), l.setAttribute("aria-sort", p ? h ? "descending" : "ascending" : "none");
|
|
387
387
|
}
|
|
388
|
-
const m = (v) =>
|
|
389
|
-
|
|
388
|
+
const m = (v) => r.onHeaderContextMenu(v, s, d, l);
|
|
389
|
+
r.headerListeners.add(l, "contextmenu", m);
|
|
390
390
|
const x = document.createElement("div");
|
|
391
391
|
x.className = "ui-tabela__header-content";
|
|
392
|
-
const
|
|
393
|
-
if (
|
|
392
|
+
const f = document.createElement("span");
|
|
393
|
+
if (f.className = "ui-tabela__header-text", f.textContent = s.rotulo, x.appendChild(f), s.ordenavel) {
|
|
394
394
|
const v = document.createElement("span");
|
|
395
395
|
v.className = "ui-tabela__sort-icon";
|
|
396
396
|
const E = p ? h ? "ui-tabela__sort-arrow--desc" : "ui-tabela__sort-arrow--asc" : "ui-tabela__sort-arrow--inativo";
|
|
@@ -401,130 +401,130 @@ function ze(t) {
|
|
|
401
401
|
v.type = "button", v.className = "ui-tabela__ordenar", v.setAttribute("part", "ordenar"), v.appendChild(x), l.appendChild(v);
|
|
402
402
|
} else
|
|
403
403
|
l.appendChild(x);
|
|
404
|
-
const
|
|
405
|
-
|
|
406
|
-
const _ = (v) =>
|
|
407
|
-
|
|
404
|
+
const g = document.createElement("div");
|
|
405
|
+
g.className = "ui-tabela__resizer", g.setAttribute("part", "redimensionador"), g.title = "Arrastar para redimensionar largura (duplo-clique para auto-ajuste)", g.tabIndex = 0, g.setAttribute("role", "separator"), g.setAttribute("aria-orientation", "vertical"), g.setAttribute("aria-label", `Redimensionar coluna ${s.rotulo}`);
|
|
406
|
+
const _ = (v) => r.onInitColumnResize(v, s, d, l, g);
|
|
407
|
+
r.headerListeners.add(g, "mousedown", _);
|
|
408
408
|
const y = (v) => {
|
|
409
409
|
const E = v;
|
|
410
|
-
E.pointerType === "mouse" || !E.pointerType ||
|
|
410
|
+
E.pointerType === "mouse" || !E.pointerType || r.onInitColumnResize(E, s, d, l, g);
|
|
411
411
|
};
|
|
412
|
-
|
|
412
|
+
r.headerListeners.add(g, "pointerdown", y);
|
|
413
413
|
const A = (v) => {
|
|
414
|
-
var N,
|
|
415
|
-
const E = v,
|
|
414
|
+
var N, T;
|
|
415
|
+
const E = v, D = E.shiftKey ? 50 : 10;
|
|
416
416
|
if (E.key === "ArrowRight")
|
|
417
|
-
E.preventDefault(), (N =
|
|
417
|
+
E.preventDefault(), (N = r.onResizeTeclado) == null || N.call(r, D, s, d, l, c);
|
|
418
418
|
else if (E.key === "ArrowLeft")
|
|
419
|
-
E.preventDefault(), (
|
|
419
|
+
E.preventDefault(), (T = r.onResizeTeclado) == null || T.call(r, -D, s, d, l, c);
|
|
420
420
|
else if (E.key === "Enter" || E.key === "F2") {
|
|
421
421
|
E.preventDefault();
|
|
422
422
|
const C = l.getBoundingClientRect();
|
|
423
|
-
|
|
423
|
+
r.onHeaderContextMenu(new MouseEvent("contextmenu", { clientX: C.left, clientY: C.bottom }), s, d, l);
|
|
424
424
|
}
|
|
425
425
|
};
|
|
426
|
-
|
|
426
|
+
r.headerListeners.add(g, "keydown", A);
|
|
427
427
|
const w = (v) => {
|
|
428
|
-
v.stopPropagation(),
|
|
428
|
+
v.stopPropagation(), r.onColumnAutoFit(s, l, c);
|
|
429
429
|
};
|
|
430
|
-
|
|
431
|
-
}),
|
|
430
|
+
r.headerListeners.add(g, "dblclick", w), r.headerListeners.add(g, "click", (v) => v.stopPropagation()), l.appendChild(g), o.appendChild(l);
|
|
431
|
+
}), r.theadElement.appendChild(o), i !== null) {
|
|
432
432
|
const s = Array.from(o.children).find((d) => d.getAttribute("data-coluna") === i);
|
|
433
433
|
(n = s == null ? void 0 : s.querySelector(".ui-tabela__ordenar")) == null || n.focus();
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
const
|
|
437
|
-
function
|
|
438
|
-
for (const e of
|
|
439
|
-
if (e ===
|
|
440
|
-
if (e instanceof Element && e.matches(
|
|
436
|
+
const Me = 'button, input, select, textarea, a, summary, [role="button"], [data-prevent-select]';
|
|
437
|
+
function Ne(r, t) {
|
|
438
|
+
for (const e of r.composedPath()) {
|
|
439
|
+
if (e === t) return !1;
|
|
440
|
+
if (e instanceof Element && e.matches(Me)) return !0;
|
|
441
441
|
}
|
|
442
442
|
return !1;
|
|
443
443
|
}
|
|
444
|
-
function
|
|
445
|
-
if (!
|
|
446
|
-
if (
|
|
447
|
-
|
|
448
|
-
const p =
|
|
444
|
+
function Te(r) {
|
|
445
|
+
if (!r.tbodyElement || !r.tableElement || !r.emptyElement || !r.containerElement) return;
|
|
446
|
+
if (r.tableElement.setAttribute("aria-colcount", String(r.colunas.length)), !r.dadosExibicao || r.dadosExibicao.length === 0) {
|
|
447
|
+
r.tbodyElement.innerHTML = "", r.tableElement.setAttribute("aria-rowcount", "1"), r.tableElement.style.display = r.colunas.length > 0 ? "table" : "none", r.emptyElement.style.display = "flex";
|
|
448
|
+
const p = r.emptyElement.querySelector(".ui-tabela__empty-text"), h = r.filtroAtivo ? r.textoSemResultados : r.textoVazio;
|
|
449
449
|
p && h !== void 0 && (p.textContent = h);
|
|
450
450
|
return;
|
|
451
451
|
}
|
|
452
|
-
|
|
453
|
-
const
|
|
454
|
-
let o = 0, a =
|
|
452
|
+
r.emptyElement.style.display = "none", r.tableElement.style.display = "table", r.tableElement.setAttribute("aria-rowcount", String(r.dadosExibicao.length + 1));
|
|
453
|
+
const t = r.dadosExibicao.length, e = r.rowHeight, i = r.virtualizar && t > 30;
|
|
454
|
+
let o = 0, a = t;
|
|
455
455
|
if (i) {
|
|
456
|
-
const p =
|
|
457
|
-
o = Math.max(0, Math.floor(p / e) - m), a = Math.min(
|
|
456
|
+
const p = r.containerElement.scrollTop, h = r.containerElement.clientHeight || 400, m = 5;
|
|
457
|
+
o = Math.max(0, Math.floor(p / e) - m), a = Math.min(t, Math.ceil((p + h) / e) + m);
|
|
458
458
|
}
|
|
459
|
-
const s =
|
|
460
|
-
|
|
459
|
+
const s = r.tbodyElement.getRootNode().activeElement, d = s && s.parentElement === r.tbodyElement ? s.getAttribute("data-index") : null, c = r.indiceAtivo ?? null, l = c !== null && c >= o && c < a ? c : o;
|
|
460
|
+
r.tbodyElement.innerHTML = "";
|
|
461
461
|
const u = document.createDocumentFragment();
|
|
462
462
|
if (i && o > 0) {
|
|
463
463
|
const p = document.createElement("tr");
|
|
464
464
|
p.className = "ui-tabela__virtual-spacer", p.setAttribute("aria-hidden", "true"), p.style.height = `${o * e}px`;
|
|
465
465
|
const h = document.createElement("td");
|
|
466
|
-
h.colSpan =
|
|
466
|
+
h.colSpan = r.colunas.length || 1, p.appendChild(h), u.appendChild(p);
|
|
467
467
|
}
|
|
468
468
|
for (let p = o; p < a; p++) {
|
|
469
|
-
const h =
|
|
469
|
+
const h = r.dadosExibicao[p], m = document.createElement("tr");
|
|
470
470
|
m.setAttribute("data-index", String(p)), m.setAttribute("part", "linha"), m.setAttribute("aria-rowindex", String(p + 2)), m.setAttribute("aria-selected", "false"), m.tabIndex = p === l ? 0 : -1, p % 2 === 1 && m.classList.add("ui-tabela__tr--par");
|
|
471
|
-
const x =
|
|
472
|
-
h[x] !== void 0 ? m.setAttribute("data-id", String(h[x])) : h.id !== void 0 ? m.setAttribute("data-id", String(h.id)) : h._id !== void 0 && m.setAttribute("data-id", String(h._id)),
|
|
473
|
-
|
|
474
|
-
}),
|
|
475
|
-
const
|
|
476
|
-
if (
|
|
477
|
-
const w =
|
|
478
|
-
|
|
471
|
+
const x = r.chaveId;
|
|
472
|
+
h[x] !== void 0 ? m.setAttribute("data-id", String(h[x])) : h.id !== void 0 ? m.setAttribute("data-id", String(h.id)) : h._id !== void 0 && m.setAttribute("data-id", String(h._id)), r.isItemSelecionado(h, p) && (m.classList.add("ui-tabela__tr--selecionada"), m.setAttribute("part", "linha linha-selecionada"), m.setAttribute("aria-current", "true"), m.setAttribute("aria-selected", "true"), m.setAttribute("data-selecionada", "true")), m.addEventListener("click", (f) => {
|
|
473
|
+
Ne(f, m) || r.onLinhaClique(h, p);
|
|
474
|
+
}), r.colunas.forEach((f) => {
|
|
475
|
+
const g = document.createElement("td"), _ = r.getAlignmentClass(f.alinhamento);
|
|
476
|
+
if (g.className = _, g.setAttribute("part", "celula"), g.style.textAlign = r.getTextAlign(f.alinhamento), f.larguraMaxima !== void 0) {
|
|
477
|
+
const w = r.formatWidth(f.larguraMaxima);
|
|
478
|
+
g.style.maxWidth = w, g.style.overflow = "hidden", g.style.textOverflow = "ellipsis", g.style.whiteSpace = "nowrap";
|
|
479
479
|
}
|
|
480
480
|
const y = document.createElement("div");
|
|
481
|
-
y.className = "ui-tabela__cell-content",
|
|
482
|
-
const A = h[
|
|
483
|
-
if (typeof
|
|
481
|
+
y.className = "ui-tabela__cell-content", f.larguraMaxima !== void 0 && y.classList.add("ui-tabela__cell-truncate");
|
|
482
|
+
const A = h[f.id];
|
|
483
|
+
if (typeof f.render == "function")
|
|
484
484
|
try {
|
|
485
|
-
const w =
|
|
485
|
+
const w = f.render(A, h, p);
|
|
486
486
|
w instanceof Node ? y.appendChild(w) : y.textContent = String(w ?? "");
|
|
487
487
|
} catch (w) {
|
|
488
|
-
console.error(`[ui-tabela] Erro no render da coluna "${
|
|
488
|
+
console.error(`[ui-tabela] Erro no render da coluna "${f.id}" (linha ${p}):`, w), y.textContent = "";
|
|
489
489
|
}
|
|
490
490
|
else if (A instanceof Node)
|
|
491
491
|
y.appendChild(A);
|
|
492
492
|
else {
|
|
493
493
|
const w = A != null ? String(A) : "";
|
|
494
|
-
y.textContent = w,
|
|
494
|
+
y.textContent = w, f.larguraMaxima !== void 0 && !f.tooltip && (g.title = w);
|
|
495
495
|
}
|
|
496
|
-
|
|
496
|
+
g.appendChild(y), m.appendChild(g);
|
|
497
497
|
}), u.appendChild(m);
|
|
498
498
|
}
|
|
499
|
-
if (i && a <
|
|
499
|
+
if (i && a < t) {
|
|
500
500
|
const p = document.createElement("tr");
|
|
501
|
-
p.className = "ui-tabela__virtual-spacer", p.setAttribute("aria-hidden", "true"), p.style.height = `${(
|
|
501
|
+
p.className = "ui-tabela__virtual-spacer", p.setAttribute("aria-hidden", "true"), p.style.height = `${(t - a) * e}px`;
|
|
502
502
|
const h = document.createElement("td");
|
|
503
|
-
h.colSpan =
|
|
503
|
+
h.colSpan = r.colunas.length || 1, p.appendChild(h), u.appendChild(p);
|
|
504
504
|
}
|
|
505
|
-
if (
|
|
506
|
-
const p =
|
|
505
|
+
if (r.tbodyElement.appendChild(u), d !== null) {
|
|
506
|
+
const p = r.tbodyElement.querySelector(`tr[data-index="${d}"]`);
|
|
507
507
|
p == null || p.focus({ preventScroll: !0 });
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
|
-
function Q(
|
|
511
|
-
if (
|
|
512
|
-
const
|
|
513
|
-
return isNaN(
|
|
510
|
+
function Q(r) {
|
|
511
|
+
if (r === void 0) return null;
|
|
512
|
+
const t = typeof r == "number" ? r : parseInt(r, 10);
|
|
513
|
+
return isNaN(t) ? null : t;
|
|
514
514
|
}
|
|
515
|
-
function $(
|
|
516
|
-
const e = Q(
|
|
517
|
-
let i = Math.max(e ?? 60,
|
|
518
|
-
const o = Q(
|
|
515
|
+
function $(r, t) {
|
|
516
|
+
const e = Q(r.larguraMinima);
|
|
517
|
+
let i = Math.max(e ?? 60, t);
|
|
518
|
+
const o = Q(r.larguraMaxima);
|
|
519
519
|
return o !== null && (i = Math.min(o, i)), i;
|
|
520
520
|
}
|
|
521
|
-
function
|
|
522
|
-
const o = $(
|
|
523
|
-
return
|
|
521
|
+
function De(r, t, e, i) {
|
|
522
|
+
const o = $(r, t.offsetWidth + i);
|
|
523
|
+
return r.largura = `${o}px`, t.style.width = `${o}px`, e && (e.style.width = `${o}px`), `${o}px`;
|
|
524
524
|
}
|
|
525
|
-
function
|
|
525
|
+
function Re(r) {
|
|
526
526
|
const {
|
|
527
|
-
evento:
|
|
527
|
+
evento: t,
|
|
528
528
|
coluna: e,
|
|
529
529
|
colIndex: i,
|
|
530
530
|
thElement: o,
|
|
@@ -533,41 +533,41 @@ function De(t) {
|
|
|
533
533
|
onResizeStart: s,
|
|
534
534
|
onResizeEnd: d,
|
|
535
535
|
onResizeCancel: c
|
|
536
|
-
} =
|
|
537
|
-
|
|
538
|
-
const l =
|
|
539
|
-
let
|
|
536
|
+
} = r;
|
|
537
|
+
t.stopPropagation(), t.preventDefault(), s(), a.classList.add("ui-tabela__resizer--ativo");
|
|
538
|
+
const l = t.pageX, u = o.offsetWidth, p = n == null ? void 0 : n.children[i], h = t.type === "pointerdown", m = h ? t.pointerId : null, x = h ? "pointermove" : "mousemove", f = h ? "pointerup" : "mouseup";
|
|
539
|
+
let g = !1;
|
|
540
540
|
const _ = (w) => {
|
|
541
541
|
const v = w;
|
|
542
542
|
if (m !== null && v.pointerId !== m) return;
|
|
543
|
-
|
|
543
|
+
g = !0;
|
|
544
544
|
const E = $(e, u + (v.pageX - l));
|
|
545
545
|
e.largura = `${E}px`, o.style.width = `${E}px`, p && (p.style.width = `${E}px`);
|
|
546
546
|
}, y = () => {
|
|
547
|
-
A(),
|
|
547
|
+
A(), g ? d(String(e.largura)) : c == null || c();
|
|
548
548
|
}, A = () => {
|
|
549
|
-
a.classList.remove("ui-tabela__resizer--ativo"), window.removeEventListener(x, _), window.removeEventListener(
|
|
549
|
+
a.classList.remove("ui-tabela__resizer--ativo"), window.removeEventListener(x, _), window.removeEventListener(f, y), h && window.removeEventListener("pointercancel", y);
|
|
550
550
|
};
|
|
551
|
-
return window.addEventListener(x, _), window.addEventListener(
|
|
551
|
+
return window.addEventListener(x, _), window.addEventListener(f, y), h && window.addEventListener("pointercancel", y), A;
|
|
552
552
|
}
|
|
553
|
-
const
|
|
554
|
-
let
|
|
555
|
-
function
|
|
556
|
-
var
|
|
553
|
+
const R = 20;
|
|
554
|
+
let Be = 0;
|
|
555
|
+
function Oe(r) {
|
|
556
|
+
var T;
|
|
557
557
|
const {
|
|
558
|
-
evento:
|
|
558
|
+
evento: t,
|
|
559
559
|
coluna: e,
|
|
560
560
|
colIndex: i,
|
|
561
561
|
thElement: o,
|
|
562
562
|
colgroupElement: a,
|
|
563
563
|
shadow: n,
|
|
564
564
|
onResizeEnd: s
|
|
565
|
-
} =
|
|
565
|
+
} = r, d = `ui-tabela-dlg-${++Be}`, c = document.createElement("dialog");
|
|
566
566
|
c.className = "ui-tabela__prompt-dialog", c.setAttribute("part", "dialogo"), c.setAttribute("aria-labelledby", `${d}-titulo`);
|
|
567
567
|
const l = document.createElement("label");
|
|
568
568
|
l.className = "ui-tabela__prompt-title", l.id = `${d}-titulo`, l.htmlFor = `${d}-campo`, l.textContent = `Largura de "${e.rotulo}" (px; vazio = automática)`;
|
|
569
569
|
const u = document.createElement("input");
|
|
570
|
-
u.id = `${d}-campo`, u.type = "number", u.min = String(
|
|
570
|
+
u.id = `${d}-campo`, u.type = "number", u.min = String(R), u.step = "1", u.setAttribute("inputmode", "numeric"), u.placeholder = "auto";
|
|
571
571
|
const p = e.largura ? parseInt(String(e.largura), 10) : NaN;
|
|
572
572
|
u.value = Number.isFinite(p) ? String(p) : "";
|
|
573
573
|
const h = document.createElement("div");
|
|
@@ -576,15 +576,15 @@ function Be(t) {
|
|
|
576
576
|
m.className = "ui-tabela__prompt-actions";
|
|
577
577
|
const x = document.createElement("button");
|
|
578
578
|
x.type = "button", x.textContent = "Aplicar";
|
|
579
|
-
const
|
|
580
|
-
|
|
581
|
-
const
|
|
579
|
+
const f = document.createElement("button");
|
|
580
|
+
f.type = "button", f.textContent = "Cancelar", m.appendChild(f), m.appendChild(x), c.appendChild(l), c.appendChild(u), c.appendChild(h), c.appendChild(m), n.appendChild(c), typeof c.showModal == "function" ? c.showModal() : c.setAttribute("open", ""), c.style.position = "fixed";
|
|
581
|
+
const g = c.getBoundingClientRect(), _ = g.width || 240, y = g.height || 140, A = Math.max(8, Math.min(t.clientX || 0, window.innerWidth - _ - 8)), w = Math.max(8, Math.min(t.clientY || 0, window.innerHeight - y - 8));
|
|
582
582
|
c.style.left = `${A}px`, c.style.top = `${w}px`;
|
|
583
583
|
let v = !1;
|
|
584
584
|
const E = () => {
|
|
585
585
|
var C;
|
|
586
586
|
v || (v = !0, c.open && typeof c.close == "function" && c.close(), c.remove(), (C = o.querySelector(".ui-tabela__ordenar, .ui-tabela__resizer")) == null || C.focus());
|
|
587
|
-
},
|
|
587
|
+
}, D = (C) => {
|
|
588
588
|
h.textContent = C, u.setAttribute("aria-invalid", "true"), u.setAttribute("aria-describedby", h.id), u.focus();
|
|
589
589
|
}, N = () => {
|
|
590
590
|
const C = e.largura, X = u.value.trim();
|
|
@@ -592,29 +592,29 @@ function Be(t) {
|
|
|
592
592
|
e.largura = void 0, o.style.width = "", a != null && a.children[i] && (a.children[i].style.width = "");
|
|
593
593
|
else {
|
|
594
594
|
const F = Number(X);
|
|
595
|
-
if (!Number.isFinite(F) || F <
|
|
596
|
-
|
|
595
|
+
if (!Number.isFinite(F) || F < R) {
|
|
596
|
+
D(`Informe um valor de pelo menos ${R} px, ou deixe vazio para automática.`);
|
|
597
597
|
return;
|
|
598
598
|
}
|
|
599
|
-
const H = Math.round($({ ...e, larguraMinima: e.larguraMinima ??
|
|
599
|
+
const H = Math.round($({ ...e, larguraMinima: e.larguraMinima ?? R }, F));
|
|
600
600
|
e.largura = `${H}px`, o.style.width = `${H}px`, a != null && a.children[i] && (a.children[i].style.width = `${H}px`);
|
|
601
601
|
}
|
|
602
602
|
E(), e.largura !== C && s(e.largura ? String(e.largura) : "auto");
|
|
603
603
|
};
|
|
604
604
|
x.addEventListener("click", (C) => {
|
|
605
605
|
C.stopPropagation(), N();
|
|
606
|
-
}),
|
|
606
|
+
}), f.addEventListener("click", (C) => {
|
|
607
607
|
C.stopPropagation(), E();
|
|
608
608
|
}), c.addEventListener("close", E), u.addEventListener("input", () => {
|
|
609
609
|
h.textContent = "", u.removeAttribute("aria-invalid"), u.removeAttribute("aria-describedby");
|
|
610
610
|
}), u.addEventListener("keydown", (C) => {
|
|
611
611
|
C.key === "Enter" ? (C.preventDefault(), N()) : C.key === "Escape" && (C.preventDefault(), E());
|
|
612
|
-
}), u.focus(), (
|
|
612
|
+
}), u.focus(), (T = u.select) == null || T.call(u);
|
|
613
613
|
}
|
|
614
|
-
function
|
|
615
|
-
return
|
|
616
|
-
evento:
|
|
617
|
-
coluna:
|
|
614
|
+
function Ie(r, t, e, i, o, a) {
|
|
615
|
+
return Re({
|
|
616
|
+
evento: r,
|
|
617
|
+
coluna: t,
|
|
618
618
|
colIndex: e,
|
|
619
619
|
thElement: i,
|
|
620
620
|
resizer: o,
|
|
@@ -626,7 +626,7 @@ function Te(t, r, e, i, o, a) {
|
|
|
626
626
|
onResizeEnd: (n) => {
|
|
627
627
|
setTimeout(() => a.onSetIsResizing(!1), 50), a.host.dispatchEvent(
|
|
628
628
|
new CustomEvent("ui-column-resize", {
|
|
629
|
-
detail: { idColuna:
|
|
629
|
+
detail: { idColuna: t.id, largura: n },
|
|
630
630
|
bubbles: !0,
|
|
631
631
|
composed: !0
|
|
632
632
|
})
|
|
@@ -634,10 +634,10 @@ function Te(t, r, e, i, o, a) {
|
|
|
634
634
|
}
|
|
635
635
|
});
|
|
636
636
|
}
|
|
637
|
-
function
|
|
638
|
-
|
|
639
|
-
evento:
|
|
640
|
-
coluna:
|
|
637
|
+
function Pe(r, t, e, i, o) {
|
|
638
|
+
r.preventDefault(), r.stopPropagation(), Oe({
|
|
639
|
+
evento: r,
|
|
640
|
+
coluna: t,
|
|
641
641
|
colIndex: e,
|
|
642
642
|
thElement: i,
|
|
643
643
|
colgroupElement: o.colgroupElement,
|
|
@@ -645,7 +645,7 @@ function Ie(t, r, e, i, o) {
|
|
|
645
645
|
onResizeEnd: (a) => {
|
|
646
646
|
o.host.dispatchEvent(
|
|
647
647
|
new CustomEvent("ui-column-resize", {
|
|
648
|
-
detail: { idColuna:
|
|
648
|
+
detail: { idColuna: t.id, largura: a },
|
|
649
649
|
bubbles: !0,
|
|
650
650
|
composed: !0
|
|
651
651
|
})
|
|
@@ -653,143 +653,255 @@ function Ie(t, r, e, i, o) {
|
|
|
653
653
|
}
|
|
654
654
|
});
|
|
655
655
|
}
|
|
656
|
-
function
|
|
657
|
-
const a =
|
|
656
|
+
function Fe(r, t, e, i, o) {
|
|
657
|
+
const a = De(t, e, i, r);
|
|
658
658
|
o.host.dispatchEvent(
|
|
659
659
|
new CustomEvent("ui-column-resize", {
|
|
660
|
-
detail: { idColuna:
|
|
660
|
+
detail: { idColuna: t.id, largura: a },
|
|
661
661
|
bubbles: !0,
|
|
662
662
|
composed: !0
|
|
663
663
|
})
|
|
664
664
|
);
|
|
665
665
|
}
|
|
666
|
-
function
|
|
667
|
-
|
|
668
|
-
theadElement:
|
|
669
|
-
colgroupElement:
|
|
670
|
-
colunas:
|
|
671
|
-
colunaOrdenada:
|
|
672
|
-
direcaoOrdenacao:
|
|
673
|
-
headerListeners:
|
|
674
|
-
formatWidth:
|
|
675
|
-
getAlignmentClass:
|
|
676
|
-
getTextAlign:
|
|
677
|
-
onHeaderClick: (
|
|
678
|
-
onHeaderContextMenu: (
|
|
679
|
-
|
|
680
|
-
host:
|
|
681
|
-
colgroupElement:
|
|
682
|
-
shadow:
|
|
683
|
-
onSetIsResizing:
|
|
666
|
+
function He(r) {
|
|
667
|
+
Le({
|
|
668
|
+
theadElement: r.theadElement,
|
|
669
|
+
colgroupElement: r.colgroupElement,
|
|
670
|
+
colunas: r.colunas,
|
|
671
|
+
colunaOrdenada: r.dadosController.getColunaOrdenada(),
|
|
672
|
+
direcaoOrdenacao: r.dadosController.getDirecaoOrdenacao(),
|
|
673
|
+
headerListeners: r.headerListeners,
|
|
674
|
+
formatWidth: ae,
|
|
675
|
+
getAlignmentClass: ne,
|
|
676
|
+
getTextAlign: se,
|
|
677
|
+
onHeaderClick: (t) => r.onHeaderClick(t),
|
|
678
|
+
onHeaderContextMenu: (t, e, i, o) => {
|
|
679
|
+
Pe(t, e, i, o, {
|
|
680
|
+
host: r.host,
|
|
681
|
+
colgroupElement: r.colgroupElement,
|
|
682
|
+
shadow: r.shadow,
|
|
683
|
+
onSetIsResizing: r.onSetIsResizing
|
|
684
684
|
});
|
|
685
685
|
},
|
|
686
|
-
onInitColumnResize: (
|
|
687
|
-
const n =
|
|
688
|
-
host:
|
|
689
|
-
colgroupElement:
|
|
690
|
-
shadow:
|
|
691
|
-
onSetIsResizing:
|
|
686
|
+
onInitColumnResize: (t, e, i, o, a) => {
|
|
687
|
+
const n = Ie(t, e, i, o, a, {
|
|
688
|
+
host: r.host,
|
|
689
|
+
colgroupElement: r.colgroupElement,
|
|
690
|
+
shadow: r.shadow,
|
|
691
|
+
onSetIsResizing: r.onSetIsResizing
|
|
692
692
|
});
|
|
693
|
-
|
|
693
|
+
r.onActiveResizeCleanup(n);
|
|
694
694
|
},
|
|
695
|
-
onResizeTeclado: (
|
|
696
|
-
|
|
697
|
-
host:
|
|
698
|
-
colgroupElement:
|
|
699
|
-
shadow:
|
|
700
|
-
onSetIsResizing:
|
|
695
|
+
onResizeTeclado: (t, e, i, o, a) => {
|
|
696
|
+
Fe(t, e, o, a, {
|
|
697
|
+
host: r.host,
|
|
698
|
+
colgroupElement: r.colgroupElement,
|
|
699
|
+
shadow: r.shadow,
|
|
700
|
+
onSetIsResizing: r.onSetIsResizing
|
|
701
701
|
});
|
|
702
702
|
},
|
|
703
|
-
onColumnAutoFit: (
|
|
704
|
-
|
|
703
|
+
onColumnAutoFit: (t, e, i) => {
|
|
704
|
+
t.largura = void 0, e.style.width = "", i.style.width = "", r.host.dispatchEvent(
|
|
705
705
|
new CustomEvent("ui-column-resize", {
|
|
706
706
|
bubbles: !0,
|
|
707
707
|
composed: !0,
|
|
708
|
-
detail: { idColuna:
|
|
708
|
+
detail: { idColuna: t.id, largura: "auto" }
|
|
709
709
|
})
|
|
710
710
|
);
|
|
711
711
|
}
|
|
712
712
|
});
|
|
713
713
|
}
|
|
714
|
-
function
|
|
715
|
-
|
|
716
|
-
tbodyElement:
|
|
717
|
-
tableElement:
|
|
718
|
-
emptyElement:
|
|
719
|
-
containerElement:
|
|
720
|
-
dadosExibicao:
|
|
721
|
-
colunas:
|
|
722
|
-
chaveId:
|
|
723
|
-
virtualizar:
|
|
724
|
-
rowHeight:
|
|
725
|
-
indiceAtivo:
|
|
726
|
-
filtroAtivo:
|
|
727
|
-
textoVazio:
|
|
728
|
-
textoSemResultados:
|
|
729
|
-
isItemSelecionado: (
|
|
730
|
-
onLinhaClique: (
|
|
731
|
-
|
|
714
|
+
function Ve(r) {
|
|
715
|
+
Te({
|
|
716
|
+
tbodyElement: r.tbodyElement,
|
|
717
|
+
tableElement: r.tableElement,
|
|
718
|
+
emptyElement: r.emptyElement,
|
|
719
|
+
containerElement: r.containerElement,
|
|
720
|
+
dadosExibicao: r.dadosController.getDadosExibicao(),
|
|
721
|
+
colunas: r.colunas,
|
|
722
|
+
chaveId: r.chaveId,
|
|
723
|
+
virtualizar: r.virtualizar,
|
|
724
|
+
rowHeight: r.rowHeight,
|
|
725
|
+
indiceAtivo: r.indiceAtivo,
|
|
726
|
+
filtroAtivo: r.dadosController.temFiltro(),
|
|
727
|
+
textoVazio: r.textoVazio,
|
|
728
|
+
textoSemResultados: r.textoSemResultados,
|
|
729
|
+
isItemSelecionado: (t, e) => r.selecaoController.isItemSelecionado(t, e),
|
|
730
|
+
onLinhaClique: (t, e) => {
|
|
731
|
+
r.selecaoController.setItemSelecionado(t), r.host.dispatchEvent(
|
|
732
732
|
new CustomEvent("ui-linha-clique", {
|
|
733
733
|
bubbles: !0,
|
|
734
734
|
composed: !0,
|
|
735
|
-
detail: { item:
|
|
735
|
+
detail: { item: t, indice: e }
|
|
736
736
|
})
|
|
737
737
|
);
|
|
738
738
|
},
|
|
739
|
-
formatWidth:
|
|
740
|
-
getAlignmentClass:
|
|
741
|
-
getTextAlign:
|
|
739
|
+
formatWidth: ae,
|
|
740
|
+
getAlignmentClass: ne,
|
|
741
|
+
getTextAlign: se
|
|
742
742
|
});
|
|
743
743
|
}
|
|
744
|
-
function
|
|
744
|
+
function qe(r, t) {
|
|
745
745
|
let e = !1;
|
|
746
746
|
const i = () => {
|
|
747
747
|
e || (window.requestAnimationFrame(() => {
|
|
748
748
|
try {
|
|
749
|
-
|
|
749
|
+
t();
|
|
750
750
|
} finally {
|
|
751
751
|
e = !1;
|
|
752
752
|
}
|
|
753
753
|
}), e = !0);
|
|
754
754
|
};
|
|
755
|
-
return
|
|
756
|
-
}
|
|
757
|
-
function
|
|
758
|
-
return
|
|
759
|
-
}
|
|
760
|
-
function
|
|
761
|
-
const
|
|
762
|
-
|
|
763
|
-
const e =
|
|
764
|
-
e !== null &&
|
|
765
|
-
const i =
|
|
766
|
-
|
|
767
|
-
}
|
|
768
|
-
function
|
|
769
|
-
if (
|
|
770
|
-
|
|
755
|
+
return r.addEventListener("scroll", i), i;
|
|
756
|
+
}
|
|
757
|
+
function $e(r, t, e, i) {
|
|
758
|
+
return Se(r, t, e, i);
|
|
759
|
+
}
|
|
760
|
+
function le(r) {
|
|
761
|
+
const t = r.host.getAttribute("texto-vazio") || r.host.getAttribute("empty-text");
|
|
762
|
+
t && r.onTextoVazioAlterado(t);
|
|
763
|
+
const e = r.host.getAttribute("virtualizar") || r.host.getAttribute("virtualize");
|
|
764
|
+
e !== null && r.onVirtualizarAlterado(e !== "false"), r.onSrcLido(r.host.getAttribute("src"));
|
|
765
|
+
const i = r.host.hasAttribute("carregando") || r.host.hasAttribute("loading");
|
|
766
|
+
r.onCarregandoAlterado(i), r.loadingElement && (r.loadingElement.style.display = i ? "flex" : "none");
|
|
767
|
+
}
|
|
768
|
+
function je(r, t, e) {
|
|
769
|
+
if (le(e), r === "src") {
|
|
770
|
+
t && e.host.isConnected && e.onCarregarSrc(t);
|
|
771
771
|
return;
|
|
772
772
|
}
|
|
773
|
-
if (
|
|
774
|
-
e.containerElement.style.maxHeight =
|
|
773
|
+
if (r === "max-height" && e.containerElement) {
|
|
774
|
+
e.containerElement.style.maxHeight = t || "";
|
|
775
775
|
return;
|
|
776
776
|
}
|
|
777
|
-
if ((
|
|
777
|
+
if ((r === "texto-vazio" || r === "empty-text") && e.emptyElement) {
|
|
778
778
|
const i = e.emptyElement.querySelector(".ui-tabela__empty-text");
|
|
779
|
-
i &&
|
|
779
|
+
i && t && (i.textContent = t), e.onRenderBody();
|
|
780
780
|
return;
|
|
781
781
|
}
|
|
782
|
-
if (
|
|
783
|
-
e.loadingElement && (e.loadingElement.style.display =
|
|
782
|
+
if (r === "carregando" || r === "loading") {
|
|
783
|
+
e.loadingElement && (e.loadingElement.style.display = t !== null ? "flex" : "none");
|
|
784
784
|
return;
|
|
785
785
|
}
|
|
786
|
-
if (
|
|
786
|
+
if (r === "densidade" || r === "density") {
|
|
787
787
|
e.onRenderBody();
|
|
788
788
|
return;
|
|
789
789
|
}
|
|
790
790
|
e.onRenderTotal();
|
|
791
791
|
}
|
|
792
|
-
|
|
792
|
+
function Ue(r, t, e, i) {
|
|
793
|
+
if (r === "Enter" || r === " ") return { tipo: "ativar" };
|
|
794
|
+
if (!Number.isInteger(t) || !Number.isInteger(e) || e < 0) return null;
|
|
795
|
+
const o = Math.max(1, Math.floor(Number.isFinite(i) ? i : 1)), a = (n) => Math.min(e, Math.max(0, n));
|
|
796
|
+
switch (r) {
|
|
797
|
+
case "ArrowDown":
|
|
798
|
+
return { tipo: "mover", indice: a(t + 1) };
|
|
799
|
+
case "ArrowUp":
|
|
800
|
+
return { tipo: "mover", indice: a(t - 1) };
|
|
801
|
+
case "Home":
|
|
802
|
+
return { tipo: "mover", indice: 0 };
|
|
803
|
+
case "End":
|
|
804
|
+
return { tipo: "mover", indice: e };
|
|
805
|
+
case "PageDown":
|
|
806
|
+
return { tipo: "mover", indice: a(t + o) };
|
|
807
|
+
case "PageUp":
|
|
808
|
+
return { tipo: "mover", indice: a(t - o) };
|
|
809
|
+
default:
|
|
810
|
+
return null;
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
const We = "Não foi possível carregar os dados.", Xe = "Nenhum resultado para o filtro";
|
|
814
|
+
function Ye(r, t, e, i) {
|
|
815
|
+
if (!r) return;
|
|
816
|
+
if (!t) {
|
|
817
|
+
r.style.display = "none";
|
|
818
|
+
return;
|
|
819
|
+
}
|
|
820
|
+
const o = r.querySelector(".ui-tabela__erro-mensagem"), a = r.querySelector(".ui-tabela__erro-detalhe");
|
|
821
|
+
o && (o.textContent = e || We), a && (a.textContent = t.erro || "");
|
|
822
|
+
const n = r.querySelector(".ui-tabela__erro-acao");
|
|
823
|
+
n && (n.style.display = i ? "" : "none"), r.style.display = "flex";
|
|
824
|
+
}
|
|
825
|
+
function Ge(r, t, e, i) {
|
|
826
|
+
r && (r.textContent = e ? t === 0 ? i : `${t} ${t === 1 ? "registro encontrado" : "registros encontrados"}` : "");
|
|
827
|
+
}
|
|
828
|
+
function Ke({ tabela: r, container: t }, e, i) {
|
|
829
|
+
r && (e ? r.setAttribute("aria-label", e) : r.removeAttribute("aria-label"), r.setAttribute("aria-busy", String(i)), t && (e ? (t.setAttribute("role", "region"), t.setAttribute("aria-label", e)) : (t.removeAttribute("role"), t.removeAttribute("aria-label"))));
|
|
830
|
+
}
|
|
831
|
+
const Qe = 800;
|
|
832
|
+
function Z(r, t, e) {
|
|
833
|
+
const i = r.getBoundingClientRect(), o = t.getBoundingClientRect(), a = i.top + r.clientTop + e, n = i.top + r.clientTop + r.clientHeight;
|
|
834
|
+
return o.top < a ? o.top - a : o.bottom > n ? Math.min(o.bottom - n, o.top - a) : 0;
|
|
835
|
+
}
|
|
836
|
+
function J(r, t, e) {
|
|
837
|
+
e === "smooth" && typeof r.scrollTo == "function" ? r.scrollTo({ top: t, behavior: "smooth" }) : r.scrollTop = t;
|
|
838
|
+
}
|
|
839
|
+
class Ze {
|
|
840
|
+
constructor(t) {
|
|
841
|
+
b(this, "cancelarCorrecao", null);
|
|
842
|
+
this.p = t;
|
|
843
|
+
}
|
|
844
|
+
alturaCabecalho() {
|
|
845
|
+
var t;
|
|
846
|
+
return ((t = this.p.cabecalho()) == null ? void 0 : t.offsetHeight) ?? 0;
|
|
847
|
+
}
|
|
848
|
+
/** Linhas inteiras que cabem na área visível (mínimo 1). */
|
|
849
|
+
linhasPorPagina() {
|
|
850
|
+
var e;
|
|
851
|
+
const t = (((e = this.p.container()) == null ? void 0 : e.clientHeight) ?? 0) - this.alturaCabecalho();
|
|
852
|
+
return Math.max(1, Math.floor(t / this.p.alturaLinha()));
|
|
853
|
+
}
|
|
854
|
+
/** Foca a linha, renderizando a janela virtual se necessário, e a mantém visível abaixo do cabeçalho fixo. */
|
|
855
|
+
focar(t) {
|
|
856
|
+
const e = this.p.container(), i = this.p.tbody();
|
|
857
|
+
if (!e || !i) return;
|
|
858
|
+
this.p.aoLinhaAtiva(t);
|
|
859
|
+
const o = `tr[data-index="${t}"]`;
|
|
860
|
+
let a = i.querySelector(o);
|
|
861
|
+
if (a || (e.scrollTop = Math.max(0, t * this.p.alturaLinha() - e.clientHeight / 2), this.p.renderizarCorpo(), a = i.querySelector(o)), !a) return;
|
|
862
|
+
a.focus({ preventScroll: !0 });
|
|
863
|
+
const n = Z(e, a, this.alturaCabecalho());
|
|
864
|
+
n && (e.scrollTop += n);
|
|
865
|
+
}
|
|
866
|
+
/**
|
|
867
|
+
* Posiciona a linha exibida `indice` na área visível.
|
|
868
|
+
* Fora da janela virtual, rola até a posição estimada, renderiza a janela e corrige pela posição
|
|
869
|
+
* real da linha. No modo suave a correção ocorre ao fim da animação (`scrollend`, com timeout de
|
|
870
|
+
* segurança para navegadores sem o evento ou quando não há rolagem a fazer).
|
|
871
|
+
*/
|
|
872
|
+
posicionar(t, e) {
|
|
873
|
+
const i = this.p.container(), o = this.p.tbody();
|
|
874
|
+
if (!i || !o) return !1;
|
|
875
|
+
this.cancelar();
|
|
876
|
+
const a = () => o.querySelector(`tr[data-index="${t}"]`), n = (u) => {
|
|
877
|
+
const p = a();
|
|
878
|
+
if (!p) return;
|
|
879
|
+
const h = Z(i, p, this.alturaCabecalho());
|
|
880
|
+
h && J(i, i.scrollTop + h, u);
|
|
881
|
+
};
|
|
882
|
+
if (a())
|
|
883
|
+
return n(e), !0;
|
|
884
|
+
const s = () => {
|
|
885
|
+
i.scrollTop = Math.max(0, t * this.p.alturaLinha()), this.p.renderizarCorpo(), n("auto"), this.p.renderizarCorpo();
|
|
886
|
+
};
|
|
887
|
+
if (e === "auto")
|
|
888
|
+
return s(), !0;
|
|
889
|
+
J(i, Math.max(0, t * this.p.alturaLinha()), "smooth");
|
|
890
|
+
let d = !0;
|
|
891
|
+
const c = () => {
|
|
892
|
+
d && (this.cancelar(), this.p.renderizarCorpo(), a() ? n("smooth") : s());
|
|
893
|
+
}, l = window.setTimeout(c, Qe);
|
|
894
|
+
return i.addEventListener("scrollend", c, { once: !0 }), this.cancelarCorrecao = () => {
|
|
895
|
+
d = !1, window.clearTimeout(l), i.removeEventListener("scrollend", c), this.cancelarCorrecao = null;
|
|
896
|
+
}, !0;
|
|
897
|
+
}
|
|
898
|
+
/** Cancela a correção pendente de uma rolagem suave (nova rolagem, desconexão). */
|
|
899
|
+
cancelar() {
|
|
900
|
+
var t;
|
|
901
|
+
(t = this.cancelarCorrecao) == null || t.call(this);
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
class Je extends oe {
|
|
793
905
|
constructor() {
|
|
794
906
|
super();
|
|
795
907
|
b(this, "shadow");
|
|
@@ -814,17 +926,25 @@ class $e extends re {
|
|
|
814
926
|
b(this, "_erro", null);
|
|
815
927
|
b(this, "_scrollHandler", null);
|
|
816
928
|
b(this, "_activeResizeCleanup", null);
|
|
817
|
-
b(this, "_headerListeners", new
|
|
818
|
-
b(this, "_corpoListeners", new
|
|
929
|
+
b(this, "_headerListeners", new I());
|
|
930
|
+
b(this, "_corpoListeners", new I());
|
|
819
931
|
/** Linha com o foco móvel (navegação por teclado); null = primeira linha visível. */
|
|
820
932
|
b(this, "_indiceAtivo", null);
|
|
821
933
|
/** Altura real das linhas medida no DOM; null = usa a estimativa da densidade. */
|
|
822
934
|
b(this, "_alturaLinhaMedida", null);
|
|
823
|
-
|
|
824
|
-
|
|
935
|
+
b(this, "rolagem", new Ze({
|
|
936
|
+
container: () => this._containerElement,
|
|
937
|
+
tbody: () => this._tbodyElement,
|
|
938
|
+
cabecalho: () => this._theadElement,
|
|
939
|
+
alturaLinha: () => this.getRowHeight(),
|
|
940
|
+
renderizarCorpo: () => this.renderBody(),
|
|
941
|
+
aoLinhaAtiva: (e) => {
|
|
942
|
+
this._indiceAtivo = e;
|
|
943
|
+
}
|
|
944
|
+
}));
|
|
825
945
|
b(this, "remotaController");
|
|
826
946
|
b(this, "selecaoController");
|
|
827
|
-
b(this, "dadosController", new
|
|
947
|
+
b(this, "dadosController", new ke());
|
|
828
948
|
/** Mantém um único tabindex=0 (foco móvel): Tab entra na tabela pela última linha ativa. */
|
|
829
949
|
b(this, "handleFocoLinha", (e) => {
|
|
830
950
|
const i = e.target;
|
|
@@ -837,37 +957,10 @@ class $e extends re {
|
|
|
837
957
|
b(this, "handleTecladoCorpo", (e) => {
|
|
838
958
|
const i = e.target;
|
|
839
959
|
if (i.parentElement !== this._tbodyElement || !i.hasAttribute("data-index")) return;
|
|
840
|
-
const o = Number(i.getAttribute("data-index")),
|
|
841
|
-
|
|
842
|
-
switch (e.key) {
|
|
843
|
-
case "ArrowDown":
|
|
844
|
-
n = Math.min(a, o + 1);
|
|
845
|
-
break;
|
|
846
|
-
case "ArrowUp":
|
|
847
|
-
n = Math.max(0, o - 1);
|
|
848
|
-
break;
|
|
849
|
-
case "Home":
|
|
850
|
-
n = 0;
|
|
851
|
-
break;
|
|
852
|
-
case "End":
|
|
853
|
-
n = a;
|
|
854
|
-
break;
|
|
855
|
-
case "PageDown":
|
|
856
|
-
n = Math.min(a, o + this.linhasPorPagina());
|
|
857
|
-
break;
|
|
858
|
-
case "PageUp":
|
|
859
|
-
n = Math.max(0, o - this.linhasPorPagina());
|
|
860
|
-
break;
|
|
861
|
-
case "Enter":
|
|
862
|
-
case " ":
|
|
863
|
-
e.preventDefault(), i.click();
|
|
864
|
-
return;
|
|
865
|
-
default:
|
|
866
|
-
return;
|
|
867
|
-
}
|
|
868
|
-
e.preventDefault(), this.focarLinha(n);
|
|
960
|
+
const o = this.dadosController.getDadosExibicao().length - 1, a = Ue(e.key, Number(i.getAttribute("data-index")), o, this.rolagem.linhasPorPagina());
|
|
961
|
+
a && (e.preventDefault(), a.tipo === "ativar" ? i.click() : this.rolagem.focar(a.indice));
|
|
869
962
|
});
|
|
870
|
-
this.shadow = this.attachShadow({ mode: "open" }), this.remotaController = new
|
|
963
|
+
this.shadow = this.attachShadow({ mode: "open" }), this.remotaController = new ge({
|
|
871
964
|
host: this,
|
|
872
965
|
onCarregandoAlterado: (e) => {
|
|
873
966
|
this.carregando = e;
|
|
@@ -877,13 +970,13 @@ class $e extends re {
|
|
|
877
970
|
},
|
|
878
971
|
getOpcoes: () => this._fetchOpcoes,
|
|
879
972
|
getFetcher: () => this._fetcher
|
|
880
|
-
}), this.selecaoController = new
|
|
973
|
+
}), this.selecaoController = new Ee({
|
|
881
974
|
host: this,
|
|
882
975
|
getTbody: () => this._tbodyElement,
|
|
883
976
|
getDadosExibicao: () => this.dadosController.getDadosExibicao(),
|
|
884
977
|
getDadosOriginais: () => this.dadosController.getDadosOriginais(),
|
|
885
978
|
getChaveId: () => this.chaveId,
|
|
886
|
-
onRolarParaIndice: (e, i) => this.
|
|
979
|
+
onRolarParaIndice: (e, i) => this.rolagem.posicionar(e, i),
|
|
887
980
|
onLinhaAtiva: (e) => this.definirLinhaAtiva(e)
|
|
888
981
|
}), this.addEventListener("ui-fetch-erro", (e) => this.mostrarErro(e.detail)), this.addEventListener("ui-fetch-start", () => this.mostrarErro(null)), this.addEventListener("ui-fetch-sucesso", () => this.mostrarErro(null));
|
|
889
982
|
}
|
|
@@ -897,13 +990,11 @@ class $e extends re {
|
|
|
897
990
|
this.cleanupEventListeners();
|
|
898
991
|
}
|
|
899
992
|
attributeChangedCallback(e, i, o) {
|
|
900
|
-
e === "ordenacao-remota" && (this.dadosController.setOrdenacaoRemota(o !== null), this.atualizarContextoSelecao()), (e === "densidade" || e === "density" || e === "altura-linha" || e === "row-height") && (this._alturaLinhaMedida = null), (e === "altura-linha" || e === "row-height") && this.aplicarAlturaLinha(), (e === "chave-id" || e === "id-key") && this.atualizarContextoSelecao(),
|
|
993
|
+
e === "ordenacao-remota" && (this.dadosController.setOrdenacaoRemota(o !== null), this.atualizarContextoSelecao()), (e === "densidade" || e === "density" || e === "altura-linha" || e === "row-height") && (this._alturaLinhaMedida = null), (e === "altura-linha" || e === "row-height") && this.aplicarAlturaLinha(), (e === "chave-id" || e === "id-key") && this.atualizarContextoSelecao(), je(e, o, this.obterContextoAtributos()), this.sincronizarAria();
|
|
901
994
|
}
|
|
902
995
|
/** Nome acessível vem do host (`aria-label`); `aria-busy` acompanha o carregamento remoto. */
|
|
903
996
|
sincronizarAria() {
|
|
904
|
-
|
|
905
|
-
const e = this.getAttribute("aria-label");
|
|
906
|
-
e ? this._tableElement.setAttribute("aria-label", e) : this._tableElement.removeAttribute("aria-label"), this._tableElement.setAttribute("aria-busy", String(this._carregando)), this._containerElement && (e ? (this._containerElement.setAttribute("role", "region"), this._containerElement.setAttribute("aria-label", e)) : (this._containerElement.removeAttribute("role"), this._containerElement.removeAttribute("aria-label"))), this.atualizarTextosEstado();
|
|
997
|
+
this._tableElement && (Ke({ tabela: this._tableElement, container: this._containerElement }, this.getAttribute("aria-label"), this._carregando), this.atualizarTextosEstado());
|
|
907
998
|
}
|
|
908
999
|
/** Textos de estado configuráveis por atributo (carregando, sem resultados, erro). */
|
|
909
1000
|
atualizarTextosEstado() {
|
|
@@ -916,28 +1007,22 @@ class $e extends re {
|
|
|
916
1007
|
this._erro = e, this.renderizarErro();
|
|
917
1008
|
}
|
|
918
1009
|
renderizarErro() {
|
|
919
|
-
|
|
920
|
-
if (!e) return;
|
|
921
|
-
if (!this._erro) {
|
|
922
|
-
e.style.display = "none";
|
|
923
|
-
return;
|
|
924
|
-
}
|
|
925
|
-
const i = this.getAttribute("texto-erro") || "Não foi possível carregar os dados.", o = e.querySelector(".ui-tabela__erro-mensagem"), a = e.querySelector(".ui-tabela__erro-detalhe");
|
|
926
|
-
o && (o.textContent = i), a && (a.textContent = this._erro.erro || "");
|
|
927
|
-
const n = e.querySelector(".ui-tabela__erro-acao");
|
|
928
|
-
n && (n.style.display = this._src ? "" : "none"), e.style.display = "flex";
|
|
1010
|
+
Ye(this._erroElement, this._erro, this.getAttribute("texto-erro"), !!this._src);
|
|
929
1011
|
}
|
|
930
1012
|
/** Anuncia ao leitor de tela o resultado do filtro (a região é limpa sem filtro ativo). */
|
|
931
1013
|
anunciarResultado() {
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
1014
|
+
Ge(
|
|
1015
|
+
this._anuncioElement,
|
|
1016
|
+
this.dadosController.getDadosExibicao().length,
|
|
1017
|
+
this.dadosController.temFiltro(),
|
|
1018
|
+
this._textoSemResultados()
|
|
1019
|
+
);
|
|
935
1020
|
}
|
|
936
1021
|
_textoSemResultados() {
|
|
937
|
-
return this.getAttribute("texto-sem-resultados") ||
|
|
1022
|
+
return this.getAttribute("texto-sem-resultados") || Xe;
|
|
938
1023
|
}
|
|
939
1024
|
syncAttributes() {
|
|
940
|
-
|
|
1025
|
+
le(this.obterContextoAtributos());
|
|
941
1026
|
}
|
|
942
1027
|
obterContextoAtributos() {
|
|
943
1028
|
return {
|
|
@@ -1008,8 +1093,7 @@ class $e extends re {
|
|
|
1008
1093
|
this.dadosController.filtrar(e), this.atualizarContextoSelecao(), this.renderBody();
|
|
1009
1094
|
}
|
|
1010
1095
|
cleanupEventListeners() {
|
|
1011
|
-
|
|
1012
|
-
this._containerElement && this._scrollHandler && (this._containerElement.removeEventListener("scroll", this._scrollHandler), this._scrollHandler = null), this._activeResizeCleanup && (this._activeResizeCleanup(), this._activeResizeCleanup = null, this._isResizing = !1), (e = this._cancelarCorrecaoRolagem) == null || e.call(this), this.remotaController.abortar(), this._headerListeners.cleanup(), this._corpoListeners.cleanup();
|
|
1096
|
+
this._containerElement && this._scrollHandler && (this._containerElement.removeEventListener("scroll", this._scrollHandler), this._scrollHandler = null), this._activeResizeCleanup && (this._activeResizeCleanup(), this._activeResizeCleanup = null, this._isResizing = !1), this.rolagem.cancelar(), this.remotaController.abortar(), this._headerListeners.cleanup(), this._corpoListeners.cleanup();
|
|
1013
1097
|
}
|
|
1014
1098
|
get colunas() {
|
|
1015
1099
|
return this._colunas;
|
|
@@ -1136,12 +1220,12 @@ class $e extends re {
|
|
|
1136
1220
|
}
|
|
1137
1221
|
} else {
|
|
1138
1222
|
this.cleanupEventListeners();
|
|
1139
|
-
const i =
|
|
1223
|
+
const i = $e(this.shadow, this._textoVazio, this.getAttribute("max-height"), this._carregando);
|
|
1140
1224
|
this._containerElement = i.containerElement, this._tableElement = i.tableElement, this._colgroupElement = i.colgroupElement, this._theadElement = i.theadElement, this._tbodyElement = i.tbodyElement, this._emptyElement = i.emptyElement, this._loadingElement = i.loadingElement, this._erroElement = i.erroElement, this._anuncioElement = i.anuncioElement, (e = i.erroElement.querySelector(".ui-tabela__erro-acao")) == null || e.addEventListener("click", () => {
|
|
1141
1225
|
this.recarregar();
|
|
1142
1226
|
});
|
|
1143
1227
|
}
|
|
1144
|
-
this.renderHeader(), this.renderBody(), this._virtualizar && this._containerElement && !this._scrollHandler && (this._scrollHandler =
|
|
1228
|
+
this.renderHeader(), this.renderBody(), this._virtualizar && this._containerElement && !this._scrollHandler && (this._scrollHandler = qe(this._containerElement, () => this.renderBody())), this._tbodyElement && this._corpoListeners.size === 0 && (this._corpoListeners.add(this._tbodyElement, "keydown", this.handleTecladoCorpo), this._corpoListeners.add(this._tbodyElement, "focusin", this.handleFocoLinha)), this.sincronizarAria();
|
|
1145
1229
|
}
|
|
1146
1230
|
}
|
|
1147
1231
|
definirLinhaAtiva(e) {
|
|
@@ -1151,71 +1235,6 @@ class $e extends re {
|
|
|
1151
1235
|
a !== o && (a.tabIndex = -1);
|
|
1152
1236
|
}), o.tabIndex = 0);
|
|
1153
1237
|
}
|
|
1154
|
-
linhasPorPagina() {
|
|
1155
|
-
var i, o;
|
|
1156
|
-
const e = (((i = this._containerElement) == null ? void 0 : i.clientHeight) ?? 0) - (((o = this._theadElement) == null ? void 0 : o.offsetHeight) ?? 0);
|
|
1157
|
-
return Math.max(1, Math.floor(e / this.getRowHeight()));
|
|
1158
|
-
}
|
|
1159
|
-
/** Foca a linha, renderizando a janela virtual se necessário, e a mantém visível abaixo do cabeçalho fixo. */
|
|
1160
|
-
focarLinha(e) {
|
|
1161
|
-
const i = this._containerElement, o = this._tbodyElement;
|
|
1162
|
-
if (!i || !o) return;
|
|
1163
|
-
this._indiceAtivo = e;
|
|
1164
|
-
const a = `tr[data-index="${e}"]`;
|
|
1165
|
-
let n = o.querySelector(a);
|
|
1166
|
-
if (n || (i.scrollTop = Math.max(0, e * this.getRowHeight() - i.clientHeight / 2), this.renderBody(), n = o.querySelector(a)), !n) return;
|
|
1167
|
-
n.focus({ preventScroll: !0 });
|
|
1168
|
-
const s = this.deslocamentoAteLinha(n);
|
|
1169
|
-
s && (i.scrollTop += s);
|
|
1170
|
-
}
|
|
1171
|
-
/**
|
|
1172
|
-
* Quanto o container precisa rolar para a linha ficar inteira na área útil: abaixo do cabeçalho
|
|
1173
|
-
* fixo e acima da barra de rolagem horizontal. 0 = já visível. Linha maior que a área alinha pelo topo.
|
|
1174
|
-
*/
|
|
1175
|
-
deslocamentoAteLinha(e) {
|
|
1176
|
-
var d;
|
|
1177
|
-
const i = this._containerElement, o = i.getBoundingClientRect(), a = e.getBoundingClientRect(), n = o.top + i.clientTop + (((d = this._theadElement) == null ? void 0 : d.offsetHeight) ?? 0), s = o.top + i.clientTop + i.clientHeight;
|
|
1178
|
-
return a.top < n ? a.top - n : a.bottom > s ? Math.min(a.bottom - s, a.top - n) : 0;
|
|
1179
|
-
}
|
|
1180
|
-
/** Rola só o container da tabela (nunca a página, ao contrário de `scrollIntoView`). */
|
|
1181
|
-
rolarContainer(e, i) {
|
|
1182
|
-
const o = this._containerElement;
|
|
1183
|
-
i === "smooth" && typeof o.scrollTo == "function" ? o.scrollTo({ top: e, behavior: "smooth" }) : o.scrollTop = e;
|
|
1184
|
-
}
|
|
1185
|
-
/**
|
|
1186
|
-
* Posiciona a linha exibida `indice` na área visível.
|
|
1187
|
-
* Fora da janela virtual, rola até a posição estimada, renderiza a janela e corrige pela posição
|
|
1188
|
-
* real da linha. No modo suave a correção ocorre ao fim da animação (`scrollend`, com timeout de
|
|
1189
|
-
* segurança para navegadores sem o evento ou quando não há rolagem a fazer).
|
|
1190
|
-
*/
|
|
1191
|
-
posicionarLinha(e, i) {
|
|
1192
|
-
var p;
|
|
1193
|
-
const o = this._containerElement, a = this._tbodyElement;
|
|
1194
|
-
if (!o || !a) return !1;
|
|
1195
|
-
(p = this._cancelarCorrecaoRolagem) == null || p.call(this);
|
|
1196
|
-
const n = () => a.querySelector(`tr[data-index="${e}"]`), s = (h) => {
|
|
1197
|
-
const m = n();
|
|
1198
|
-
if (!m) return;
|
|
1199
|
-
const x = this.deslocamentoAteLinha(m);
|
|
1200
|
-
x && this.rolarContainer(o.scrollTop + x, h);
|
|
1201
|
-
};
|
|
1202
|
-
if (n())
|
|
1203
|
-
return s(i), !0;
|
|
1204
|
-
const d = () => {
|
|
1205
|
-
o.scrollTop = Math.max(0, e * this.getRowHeight()), this.renderBody(), s("auto"), this.renderBody();
|
|
1206
|
-
};
|
|
1207
|
-
if (i === "auto")
|
|
1208
|
-
return d(), !0;
|
|
1209
|
-
this.rolarContainer(Math.max(0, e * this.getRowHeight()), "smooth");
|
|
1210
|
-
let c = !0;
|
|
1211
|
-
const l = () => {
|
|
1212
|
-
var h;
|
|
1213
|
-
c && ((h = this._cancelarCorrecaoRolagem) == null || h.call(this), this.renderBody(), n() ? s("smooth") : d());
|
|
1214
|
-
}, u = window.setTimeout(l, 800);
|
|
1215
|
-
return o.addEventListener("scrollend", l, { once: !0 }), this._cancelarCorrecaoRolagem = () => {
|
|
1216
|
-
c = !1, window.clearTimeout(u), o.removeEventListener("scrollend", l), this._cancelarCorrecaoRolagem = null;
|
|
1217
|
-
}, !0;
|
|
1218
|
-
}
|
|
1219
1238
|
obterContextoRenderizador() {
|
|
1220
1239
|
return {
|
|
1221
1240
|
host: this,
|
|
@@ -1246,10 +1265,10 @@ class $e extends re {
|
|
|
1246
1265
|
};
|
|
1247
1266
|
}
|
|
1248
1267
|
renderHeader() {
|
|
1249
|
-
|
|
1268
|
+
He(this.obterContextoRenderizador());
|
|
1250
1269
|
}
|
|
1251
1270
|
renderBody() {
|
|
1252
|
-
|
|
1271
|
+
Ve(this.obterContextoRenderizador()), this.anunciarResultado(), this.medirAlturaLinha();
|
|
1253
1272
|
}
|
|
1254
1273
|
/**
|
|
1255
1274
|
* Rola até um item e opcionalmente o seleciona. Aceita ID (pela `chave-id`, depois `id`, `_id`,
|
|
@@ -1264,49 +1283,49 @@ class $e extends re {
|
|
|
1264
1283
|
return this.selecaoController.rolarPara(e, { ...i, porIndice: !0 });
|
|
1265
1284
|
}
|
|
1266
1285
|
}
|
|
1267
|
-
|
|
1286
|
+
ie("ui-tabela", Je);
|
|
1268
1287
|
const S = Math.PI / 180;
|
|
1269
|
-
function L(
|
|
1270
|
-
return Math.abs(
|
|
1288
|
+
function L(r) {
|
|
1289
|
+
return Math.abs(r) < 1e-12 ? 0 : Number(r.toPrecision(15));
|
|
1271
1290
|
}
|
|
1272
|
-
const
|
|
1291
|
+
const et = {
|
|
1273
1292
|
sqrt: Math.sqrt,
|
|
1274
1293
|
abs: Math.abs,
|
|
1275
1294
|
round: Math.round,
|
|
1276
1295
|
floor: Math.floor,
|
|
1277
1296
|
ceil: Math.ceil,
|
|
1278
|
-
sin: (
|
|
1279
|
-
cos: (
|
|
1280
|
-
tan: (
|
|
1281
|
-
asin: (
|
|
1282
|
-
acos: (
|
|
1283
|
-
atan: (
|
|
1297
|
+
sin: (r) => L(Math.sin(r * S)),
|
|
1298
|
+
cos: (r) => L(Math.cos(r * S)),
|
|
1299
|
+
tan: (r) => L(Math.tan(r * S)),
|
|
1300
|
+
asin: (r) => L(Math.asin(r) / S),
|
|
1301
|
+
acos: (r) => L(Math.acos(r) / S),
|
|
1302
|
+
atan: (r) => L(Math.atan(r) / S)
|
|
1284
1303
|
};
|
|
1285
|
-
function
|
|
1286
|
-
if (!
|
|
1287
|
-
let
|
|
1288
|
-
if (!
|
|
1289
|
-
|
|
1304
|
+
function ee(r) {
|
|
1305
|
+
if (!r || typeof r != "string") return null;
|
|
1306
|
+
let t = r.trim();
|
|
1307
|
+
if (!t) return null;
|
|
1308
|
+
t = t.replace(/(\d),(\d)/g, "$1.$2").replace(/,/g, "."), t = t.replace(/\bpi\b/gi, String(Math.PI)), t = t.replace(/\be\b/gi, String(Math.E));
|
|
1290
1309
|
let e = 0;
|
|
1291
1310
|
function i() {
|
|
1292
|
-
return
|
|
1311
|
+
return t[e] || "";
|
|
1293
1312
|
}
|
|
1294
1313
|
function o() {
|
|
1295
|
-
return
|
|
1314
|
+
return t[e++] || "";
|
|
1296
1315
|
}
|
|
1297
1316
|
function a() {
|
|
1298
|
-
for (; e <
|
|
1317
|
+
for (; e < t.length && /\s/.test(t[e]); )
|
|
1299
1318
|
e++;
|
|
1300
1319
|
}
|
|
1301
1320
|
function n() {
|
|
1302
1321
|
a();
|
|
1303
1322
|
let l = s();
|
|
1304
|
-
for (a(); e <
|
|
1323
|
+
for (a(); e < t.length; ) {
|
|
1305
1324
|
const u = i();
|
|
1306
1325
|
if (u === "+" || u === "-") {
|
|
1307
1326
|
o(), a();
|
|
1308
1327
|
const p = e, h = s();
|
|
1309
|
-
a(),
|
|
1328
|
+
a(), t.slice(p, e).includes("%") ? l = u === "+" ? l + l * h : l - l * h : l = u === "+" ? l + h : l - h;
|
|
1310
1329
|
} else
|
|
1311
1330
|
break;
|
|
1312
1331
|
}
|
|
@@ -1315,7 +1334,7 @@ function Z(t) {
|
|
|
1315
1334
|
function s() {
|
|
1316
1335
|
a();
|
|
1317
1336
|
let l = d();
|
|
1318
|
-
for (a(); e <
|
|
1337
|
+
for (a(); e < t.length; ) {
|
|
1319
1338
|
const u = i();
|
|
1320
1339
|
if (u === "*" || u === "/" || u === "x" || u === "X") {
|
|
1321
1340
|
o(), a();
|
|
@@ -1341,7 +1360,7 @@ function Z(t) {
|
|
|
1341
1360
|
o();
|
|
1342
1361
|
const p = d();
|
|
1343
1362
|
u = Math.pow(u, p);
|
|
1344
|
-
} else if (
|
|
1363
|
+
} else if (t.slice(e, e + 2) === "**") {
|
|
1345
1364
|
e += 2;
|
|
1346
1365
|
const p = d();
|
|
1347
1366
|
u = Math.pow(u, p);
|
|
@@ -1362,9 +1381,9 @@ function Z(t) {
|
|
|
1362
1381
|
if (a(), o() !== ")") throw new Error("Parêntese sem fechamento");
|
|
1363
1382
|
return a(), i() === "%" ? (o(), h / 100) : h;
|
|
1364
1383
|
}
|
|
1365
|
-
const u =
|
|
1384
|
+
const u = t.slice(e).match(/^([a-zA-Z_]\w*)\s*\(/);
|
|
1366
1385
|
if (u) {
|
|
1367
|
-
const h =
|
|
1386
|
+
const h = et[u[1].toLowerCase()];
|
|
1368
1387
|
if (!h) throw new Error("Função desconhecida: " + u[1]);
|
|
1369
1388
|
e += u[0].length;
|
|
1370
1389
|
const m = n();
|
|
@@ -1372,7 +1391,7 @@ function Z(t) {
|
|
|
1372
1391
|
const x = h(m);
|
|
1373
1392
|
return a(), i() === "%" ? (o(), x / 100) : x;
|
|
1374
1393
|
}
|
|
1375
|
-
const p =
|
|
1394
|
+
const p = t.slice(e).match(/^([0-9]+(?:\.[0-9]+)?|\.[0-9]+)/);
|
|
1376
1395
|
if (p) {
|
|
1377
1396
|
e += p[0].length;
|
|
1378
1397
|
let h = parseFloat(p[0]);
|
|
@@ -1382,60 +1401,60 @@ function Z(t) {
|
|
|
1382
1401
|
}
|
|
1383
1402
|
try {
|
|
1384
1403
|
const l = n();
|
|
1385
|
-
return a(), e <
|
|
1404
|
+
return a(), e < t.length ? null : isFinite(l) ? l : null;
|
|
1386
1405
|
} catch {
|
|
1387
1406
|
return null;
|
|
1388
1407
|
}
|
|
1389
1408
|
}
|
|
1390
|
-
const
|
|
1391
|
-
function
|
|
1392
|
-
if (!
|
|
1393
|
-
const e = String(
|
|
1394
|
-
return Array.from(
|
|
1409
|
+
const tt = '.ui-prop__linha input:not([disabled]):not([type="color"]):not(.ui-prop__cor-picker-oculto), .ui-prop__linha select:not([disabled]), .ui-prop__linha .ui-prop__btn-acao-inline:not([disabled]), .ui-prop__linha .ui-prop__editor-booleano, .ui-prop__linha .ui-prop__editor-cor-container';
|
|
1410
|
+
function de(r, t) {
|
|
1411
|
+
if (!r) return null;
|
|
1412
|
+
const e = String(t);
|
|
1413
|
+
return Array.from(r.querySelectorAll("[data-prop-id]")).find((i) => i.getAttribute("data-prop-id") === e) ?? null;
|
|
1395
1414
|
}
|
|
1396
|
-
const
|
|
1397
|
-
function k(
|
|
1398
|
-
|
|
1415
|
+
const ce = /* @__PURE__ */ new WeakMap();
|
|
1416
|
+
function k(r, t) {
|
|
1417
|
+
ce.set(r, t);
|
|
1399
1418
|
}
|
|
1400
|
-
function
|
|
1419
|
+
function te(r, t, e) {
|
|
1401
1420
|
var a, n;
|
|
1402
|
-
const i =
|
|
1403
|
-
o && ((n =
|
|
1421
|
+
const i = de(r, t), o = (a = i == null ? void 0 : i.querySelector(".ui-prop__col-valor")) == null ? void 0 : a.firstElementChild;
|
|
1422
|
+
o && ((n = ce.get(o)) == null || n(e));
|
|
1404
1423
|
}
|
|
1405
|
-
function z(
|
|
1424
|
+
function z(r, t, e = (o, a) => o === String(a), i = (o) => o == null || o === "" ? "—" : String(o)) {
|
|
1406
1425
|
var n;
|
|
1407
|
-
(n =
|
|
1408
|
-
const o = Array.from(
|
|
1426
|
+
(n = r.querySelector("option[data-externa]")) == null || n.remove();
|
|
1427
|
+
const o = Array.from(r.options).find((s) => !s.hasAttribute("data-acao") && e(s.value, t));
|
|
1409
1428
|
if (o) {
|
|
1410
1429
|
o.selected = !0;
|
|
1411
1430
|
return;
|
|
1412
1431
|
}
|
|
1413
1432
|
const a = document.createElement("option");
|
|
1414
|
-
a.value =
|
|
1433
|
+
a.value = t == null ? "" : String(t), a.textContent = i(t), a.setAttribute("data-externa", ""), a.hidden = !0, r.insertBefore(a, r.firstChild), a.selected = !0;
|
|
1415
1434
|
}
|
|
1416
|
-
function
|
|
1417
|
-
const e = Array.from(
|
|
1435
|
+
function rt(r, t) {
|
|
1436
|
+
const e = Array.from(r.querySelectorAll(tt)), i = e.indexOf(t);
|
|
1418
1437
|
if (i !== -1 && i + 1 < e.length) {
|
|
1419
1438
|
const o = e[i + 1];
|
|
1420
1439
|
o.focus(), o instanceof HTMLInputElement && o.select();
|
|
1421
1440
|
}
|
|
1422
1441
|
}
|
|
1423
|
-
function j(
|
|
1442
|
+
function j(r, t) {
|
|
1424
1443
|
var e;
|
|
1425
|
-
|
|
1444
|
+
r.classList.toggle("ui-prop__categoria--aberta", t), (e = r.querySelector(".ui-prop__categoria-header")) == null || e.setAttribute("aria-expanded", String(t));
|
|
1426
1445
|
}
|
|
1427
|
-
function
|
|
1428
|
-
|
|
1446
|
+
function it(r, t) {
|
|
1447
|
+
t.forEach((e) => e.aberto = !0), r.querySelectorAll(".ui-prop__categoria").forEach((e) => j(e, !0));
|
|
1429
1448
|
}
|
|
1430
|
-
function
|
|
1431
|
-
|
|
1449
|
+
function ot(r, t) {
|
|
1450
|
+
t.forEach((e) => e.aberto = !1), r.querySelectorAll(".ui-prop__categoria").forEach((e) => j(e, !1));
|
|
1432
1451
|
}
|
|
1433
|
-
function
|
|
1452
|
+
function at(r, t, e, i) {
|
|
1434
1453
|
const o = e.find((a) => a.id === i);
|
|
1435
1454
|
if (o) {
|
|
1436
1455
|
o.aberto = o.aberto === !1;
|
|
1437
|
-
const a = Array.from(
|
|
1438
|
-
a && j(a, !!o.aberto),
|
|
1456
|
+
const a = Array.from(r.querySelectorAll("[data-cat-id]")).find((n) => n.getAttribute("data-cat-id") === i);
|
|
1457
|
+
a && j(a, !!o.aberto), t.dispatchEvent(
|
|
1439
1458
|
new CustomEvent("ui-categoria-toggle", {
|
|
1440
1459
|
bubbles: !0,
|
|
1441
1460
|
composed: !0,
|
|
@@ -1444,16 +1463,16 @@ function Ge(t, r, e, i) {
|
|
|
1444
1463
|
);
|
|
1445
1464
|
}
|
|
1446
1465
|
}
|
|
1447
|
-
function
|
|
1448
|
-
const
|
|
1466
|
+
function nt(r) {
|
|
1467
|
+
const t = document.createElement("span"), e = (i) => {
|
|
1449
1468
|
const o = typeof i == "number" || typeof i == "string" && /^-?\d+(\.\d+)?$/.test(i.trim());
|
|
1450
|
-
|
|
1469
|
+
t.className = `ui-prop__valor-readonly ${o ? "ui-prop__valor-readonly--numero" : ""}`.trim(), t.textContent = i != null ? String(i) : "—";
|
|
1451
1470
|
};
|
|
1452
|
-
return e(
|
|
1471
|
+
return e(r), k(t, e), t;
|
|
1453
1472
|
}
|
|
1454
|
-
function
|
|
1473
|
+
function st(r, t, e, i) {
|
|
1455
1474
|
const o = document.createElement("label");
|
|
1456
|
-
o.className = "ui-prop__editor-booleano", o.setAttribute("role", "checkbox"), o.tabIndex = 0, o.setAttribute("aria-label",
|
|
1475
|
+
o.className = "ui-prop__editor-booleano", o.setAttribute("role", "checkbox"), o.tabIndex = 0, o.setAttribute("aria-label", t.rotulo);
|
|
1457
1476
|
const a = document.createElement("div");
|
|
1458
1477
|
a.className = "ui-prop__checkbox-custom";
|
|
1459
1478
|
const n = document.createElement("span");
|
|
@@ -1464,8 +1483,8 @@ function Qe(t, r, e, i) {
|
|
|
1464
1483
|
};
|
|
1465
1484
|
s(e), k(o, s), o.appendChild(a), o.appendChild(n);
|
|
1466
1485
|
const d = () => {
|
|
1467
|
-
const c = !i.obterValorAtual(
|
|
1468
|
-
i.registrarAlteracao(
|
|
1486
|
+
const c = !i.obterValorAtual(t.id);
|
|
1487
|
+
i.registrarAlteracao(r, t.id, c), s(c);
|
|
1469
1488
|
};
|
|
1470
1489
|
return o.addEventListener("click", (c) => {
|
|
1471
1490
|
c.preventDefault(), d();
|
|
@@ -1473,31 +1492,31 @@ function Qe(t, r, e, i) {
|
|
|
1473
1492
|
c.key === " " ? (c.preventDefault(), d()) : c.key === "Enter" && (c.preventDefault(), i.focarProximoEditor(o));
|
|
1474
1493
|
}), o;
|
|
1475
1494
|
}
|
|
1476
|
-
function
|
|
1495
|
+
function lt(r, t, e, i) {
|
|
1477
1496
|
const o = document.createElement("select");
|
|
1478
|
-
return o.className = "ui-prop__editor-select", o.setAttribute("aria-label",
|
|
1497
|
+
return o.className = "ui-prop__editor-select", o.setAttribute("aria-label", t.rotulo), (t.opcoes || []).forEach((a) => {
|
|
1479
1498
|
const n = document.createElement("option");
|
|
1480
1499
|
n.value = String(a.id), n.textContent = a.rotulo, o.appendChild(n);
|
|
1481
1500
|
}), z(o, e), k(o, (a) => z(o, a)), o.addEventListener("change", () => {
|
|
1482
|
-
const a = (
|
|
1483
|
-
i.registrarAlteracao(
|
|
1501
|
+
const a = (t.opcoes || []).find((n) => String(n.id) === o.value);
|
|
1502
|
+
i.registrarAlteracao(r, t.id, a ? a.id : o.value), z(o, i.obterValorAtual(t.id));
|
|
1484
1503
|
}), o.addEventListener("keydown", (a) => {
|
|
1485
1504
|
a.key === "Enter" && i.focarProximoEditor(o);
|
|
1486
1505
|
}), o;
|
|
1487
1506
|
}
|
|
1488
|
-
function
|
|
1507
|
+
function dt(r, t, e) {
|
|
1489
1508
|
const i = document.createElement("button");
|
|
1490
|
-
return i.type = "button", i.className = "ui-prop__btn-acao-inline", i.textContent =
|
|
1491
|
-
typeof
|
|
1509
|
+
return i.type = "button", i.className = "ui-prop__btn-acao-inline", i.textContent = t.rotuloAcao || "Editar...", i.addEventListener("click", () => {
|
|
1510
|
+
typeof t.onClickAcao == "function" && t.onClickAcao(t), e.despacharEventoAcao(t, r);
|
|
1492
1511
|
}), i;
|
|
1493
1512
|
}
|
|
1494
|
-
function
|
|
1513
|
+
function ct(r, t, e, i) {
|
|
1495
1514
|
const o = document.createElement("input");
|
|
1496
|
-
o.type = "text", o.inputMode = "decimal", o.autocomplete = "off", o.spellcheck = !1, o.className = "ui-prop__editor-input ui-prop__editor-input--numero", o.setAttribute("aria-label",
|
|
1515
|
+
o.type = "text", o.inputMode = "decimal", o.autocomplete = "off", o.spellcheck = !1, o.className = "ui-prop__editor-input ui-prop__editor-input--numero", o.setAttribute("aria-label", t.rotulo), t.placeholder && (o.placeholder = t.placeholder);
|
|
1497
1516
|
const a = (s) => {
|
|
1498
1517
|
if (s == null || s === "") return "";
|
|
1499
1518
|
const d = Number(s);
|
|
1500
|
-
return isNaN(d) ? String(s) :
|
|
1519
|
+
return isNaN(d) ? String(s) : t.casasDecimais !== void 0 ? d.toFixed(t.casasDecimais) : String(d);
|
|
1501
1520
|
};
|
|
1502
1521
|
o.value = a(e), k(o, (s) => {
|
|
1503
1522
|
o.value = a(s);
|
|
@@ -1511,53 +1530,53 @@ function et(t, r, e, i) {
|
|
|
1511
1530
|
o.classList.remove("ui-prop__editor-input--calculando");
|
|
1512
1531
|
const s = o.value.trim();
|
|
1513
1532
|
if (s === "") {
|
|
1514
|
-
i.registrarAlteracao(
|
|
1533
|
+
i.registrarAlteracao(r, t.id, null);
|
|
1515
1534
|
return;
|
|
1516
1535
|
}
|
|
1517
|
-
const d =
|
|
1536
|
+
const d = ee(s);
|
|
1518
1537
|
if (d !== null && !isNaN(d)) {
|
|
1519
1538
|
let c = d;
|
|
1520
|
-
|
|
1539
|
+
t.casasDecimais !== void 0 && (c = Number(d.toFixed(t.casasDecimais))), o.value = a(c), i.registrarAlteracao(r, t.id, c);
|
|
1521
1540
|
} else
|
|
1522
|
-
o.value = a(i.obterValorAtual(
|
|
1541
|
+
o.value = a(i.obterValorAtual(t.id));
|
|
1523
1542
|
};
|
|
1524
1543
|
return o.addEventListener("change", n), o.addEventListener("blur", n), o.addEventListener("keydown", (s) => {
|
|
1525
1544
|
if (s.key === "Enter")
|
|
1526
1545
|
n(), i.focarProximoEditor(o);
|
|
1527
1546
|
else if (s.key === "Escape")
|
|
1528
|
-
o.classList.remove("ui-prop__editor-input--calculando"), o.value = a(i.obterValorAtual(
|
|
1547
|
+
o.classList.remove("ui-prop__editor-input--calculando"), o.value = a(i.obterValorAtual(t.id)), o.blur();
|
|
1529
1548
|
else if (s.key === "ArrowUp" || s.key === "ArrowDown") {
|
|
1530
1549
|
s.preventDefault();
|
|
1531
|
-
const c =
|
|
1532
|
-
let l =
|
|
1533
|
-
s.shiftKey ? l *= 10 : s.altKey &&
|
|
1550
|
+
const c = ee(o.value) ?? (Number(i.obterValorAtual(t.id)) || 0);
|
|
1551
|
+
let l = t.casasDecimais !== void 0 ? Math.pow(10, -t.casasDecimais) : 1;
|
|
1552
|
+
s.shiftKey ? l *= 10 : s.altKey && t.casasDecimais === void 0 && (l *= 0.1);
|
|
1534
1553
|
let u = s.key === "ArrowUp" ? c + l : c - l;
|
|
1535
|
-
|
|
1554
|
+
t.casasDecimais !== void 0 ? u = Number(u.toFixed(t.casasDecimais)) : u = Math.round(u * 100) / 100, o.value = a(u), i.registrarAlteracao(r, t.id, u);
|
|
1536
1555
|
}
|
|
1537
1556
|
}), o;
|
|
1538
1557
|
}
|
|
1539
|
-
function
|
|
1558
|
+
function ut(r, t, e, i) {
|
|
1540
1559
|
const o = document.createElement("input");
|
|
1541
|
-
o.type = "text", o.className = "ui-prop__editor-input", o.setAttribute("aria-label",
|
|
1560
|
+
o.type = "text", o.className = "ui-prop__editor-input", o.setAttribute("aria-label", t.rotulo), t.placeholder && (o.placeholder = t.placeholder), o.value = e != null ? String(e) : "", k(o, (n) => {
|
|
1542
1561
|
o.value = n != null ? String(n) : "";
|
|
1543
1562
|
}), o.addEventListener("focus", () => {
|
|
1544
1563
|
o.select();
|
|
1545
1564
|
});
|
|
1546
1565
|
const a = () => {
|
|
1547
|
-
i.registrarAlteracao(
|
|
1566
|
+
i.registrarAlteracao(r, t.id, o.value);
|
|
1548
1567
|
};
|
|
1549
1568
|
return o.addEventListener("change", a), o.addEventListener("keydown", (n) => {
|
|
1550
|
-
n.key === "Enter" ? (a(), i.focarProximoEditor(o)) : n.key === "Escape" && (o.value = String(i.obterValorAtual(
|
|
1569
|
+
n.key === "Enter" ? (a(), i.focarProximoEditor(o)) : n.key === "Escape" && (o.value = String(i.obterValorAtual(t.id) ?? ""), o.blur());
|
|
1551
1570
|
}), o;
|
|
1552
1571
|
}
|
|
1553
|
-
const P = (
|
|
1554
|
-
function U(
|
|
1555
|
-
|
|
1572
|
+
const P = (r, t) => r.toLowerCase() === String(t ?? "").toLowerCase();
|
|
1573
|
+
function U(r, t) {
|
|
1574
|
+
t.forEach((e) => {
|
|
1556
1575
|
const i = document.createElement("option");
|
|
1557
|
-
i.value = String(e.id), i.textContent = e.rotulo,
|
|
1576
|
+
i.value = String(e.id), i.textContent = e.rotulo, r.appendChild(i);
|
|
1558
1577
|
});
|
|
1559
1578
|
}
|
|
1560
|
-
function
|
|
1579
|
+
function pt(r, t, e, i) {
|
|
1561
1580
|
const o = document.createElement("div");
|
|
1562
1581
|
o.className = "ui-prop__editor-linha-container";
|
|
1563
1582
|
const a = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
@@ -1570,7 +1589,7 @@ function rt(t, r, e, i) {
|
|
|
1570
1589
|
};
|
|
1571
1590
|
a.appendChild(n);
|
|
1572
1591
|
const d = document.createElement("select");
|
|
1573
|
-
d.className = "ui-prop__linha-select", d.setAttribute("aria-label",
|
|
1592
|
+
d.className = "ui-prop__linha-select", d.setAttribute("aria-label", t.rotulo), U(d, t.opcoes && t.opcoes.length > 0 ? t.opcoes : [
|
|
1574
1593
|
{ id: "ByLayer", rotulo: "ByLayer" },
|
|
1575
1594
|
{ id: "ByBlock", rotulo: "ByBlock" },
|
|
1576
1595
|
{ id: "Continuous", rotulo: "Continuous" },
|
|
@@ -1583,12 +1602,12 @@ function rt(t, r, e, i) {
|
|
|
1583
1602
|
s(l), z(d, l, P);
|
|
1584
1603
|
};
|
|
1585
1604
|
return c(e), k(o, c), d.addEventListener("change", () => {
|
|
1586
|
-
s(d.value), i.registrarAlteracao(
|
|
1605
|
+
s(d.value), i.registrarAlteracao(r, t.id, d.value), z(d, d.value, P);
|
|
1587
1606
|
}), d.addEventListener("keydown", (l) => {
|
|
1588
1607
|
l.key === "Enter" && i.focarProximoEditor(d);
|
|
1589
1608
|
}), o.appendChild(a), o.appendChild(d), o;
|
|
1590
1609
|
}
|
|
1591
|
-
function
|
|
1610
|
+
function ht(r, t, e, i) {
|
|
1592
1611
|
const o = document.createElement("div");
|
|
1593
1612
|
o.className = "ui-prop__editor-espessura-container";
|
|
1594
1613
|
const a = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
@@ -1601,7 +1620,7 @@ function ot(t, r, e, i) {
|
|
|
1601
1620
|
};
|
|
1602
1621
|
a.appendChild(n);
|
|
1603
1622
|
const d = document.createElement("select");
|
|
1604
|
-
d.className = "ui-prop__espessura-select", d.setAttribute("aria-label",
|
|
1623
|
+
d.className = "ui-prop__espessura-select", d.setAttribute("aria-label", t.rotulo), U(d, t.opcoes && t.opcoes.length > 0 ? t.opcoes : [
|
|
1605
1624
|
{ id: "ByLayer", rotulo: "ByLayer" },
|
|
1606
1625
|
{ id: "ByBlock", rotulo: "ByBlock" },
|
|
1607
1626
|
{ id: "0.00 mm", rotulo: "0.00 mm" },
|
|
@@ -1626,7 +1645,7 @@ function ot(t, r, e, i) {
|
|
|
1626
1645
|
n.setAttribute("stroke-width", String(s(l))), z(d, l, P);
|
|
1627
1646
|
};
|
|
1628
1647
|
return c(e), k(o, c), d.addEventListener("change", () => {
|
|
1629
|
-
n.setAttribute("stroke-width", String(s(d.value))), i.registrarAlteracao(
|
|
1648
|
+
n.setAttribute("stroke-width", String(s(d.value))), i.registrarAlteracao(r, t.id, d.value), z(d, d.value, P);
|
|
1630
1649
|
}), d.addEventListener("keydown", (l) => {
|
|
1631
1650
|
l.key === "Enter" && i.focarProximoEditor(d);
|
|
1632
1651
|
}), o.appendChild(a), o.appendChild(d), o;
|
|
@@ -1639,25 +1658,25 @@ const W = [
|
|
|
1639
1658
|
{ nome: "Blue", indice: 5, hex: "#0000ff" },
|
|
1640
1659
|
{ nome: "Magenta", indice: 6, hex: "#ff00ff" },
|
|
1641
1660
|
{ nome: "White", indice: 7, hex: "#ffffff" }
|
|
1642
|
-
],
|
|
1643
|
-
function q(
|
|
1644
|
-
const
|
|
1645
|
-
return e ? e.nome.toLowerCase() :
|
|
1661
|
+
], ue = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
1662
|
+
function q(r) {
|
|
1663
|
+
const t = String(r ?? "").trim().toLowerCase(), e = W.find((i) => String(i.indice) === t || i.nome.toLowerCase() === t);
|
|
1664
|
+
return e ? e.nome.toLowerCase() : t;
|
|
1646
1665
|
}
|
|
1647
|
-
function
|
|
1648
|
-
const
|
|
1649
|
-
return e ? e.hex :
|
|
1666
|
+
function mt(r) {
|
|
1667
|
+
const t = q(r), e = W.find((i) => i.nome.toLowerCase() === t);
|
|
1668
|
+
return e ? e.hex : ue.test(t) ? t : "#ffffff";
|
|
1650
1669
|
}
|
|
1651
|
-
function
|
|
1652
|
-
return
|
|
1670
|
+
function pe(r) {
|
|
1671
|
+
return r.length === 4 ? "#" + r.slice(1).split("").map((t) => t + t).join("") : r;
|
|
1653
1672
|
}
|
|
1654
|
-
function
|
|
1673
|
+
function bt(r, t, e, i) {
|
|
1655
1674
|
const o = document.createElement("div");
|
|
1656
1675
|
o.className = "ui-prop__editor-cor-cad-container";
|
|
1657
1676
|
const a = document.createElement("div");
|
|
1658
1677
|
a.className = "ui-prop__cor-amostra";
|
|
1659
1678
|
const n = document.createElement("select");
|
|
1660
|
-
n.className = "ui-prop__cor-cad-select", n.setAttribute("aria-label",
|
|
1679
|
+
n.className = "ui-prop__cor-cad-select", n.setAttribute("aria-label", t.rotulo), U(n, [
|
|
1661
1680
|
{ id: "ByLayer", rotulo: "ByLayer" },
|
|
1662
1681
|
{ id: "ByBlock", rotulo: "ByBlock" },
|
|
1663
1682
|
...W.map((l) => ({ id: l.nome, rotulo: `${l.nome} (${l.indice})` }))
|
|
@@ -1667,8 +1686,8 @@ function at(t, r, e, i) {
|
|
|
1667
1686
|
const d = document.createElement("input");
|
|
1668
1687
|
d.type = "color", d.className = "ui-prop__cor-picker-oculto", d.tabIndex = -1;
|
|
1669
1688
|
const c = (l) => {
|
|
1670
|
-
const u =
|
|
1671
|
-
a.style.backgroundColor = u, d.value =
|
|
1689
|
+
const u = mt(l);
|
|
1690
|
+
a.style.backgroundColor = u, d.value = pe(u), z(
|
|
1672
1691
|
n,
|
|
1673
1692
|
l,
|
|
1674
1693
|
(p, h) => q(p) === q(h),
|
|
@@ -1678,18 +1697,18 @@ function at(t, r, e, i) {
|
|
|
1678
1697
|
return c(e), k(o, c), d.addEventListener("input", () => {
|
|
1679
1698
|
a.style.backgroundColor = d.value;
|
|
1680
1699
|
}), d.addEventListener("change", () => {
|
|
1681
|
-
i.registrarAlteracao(
|
|
1700
|
+
i.registrarAlteracao(r, t.id, d.value), c(i.obterValorAtual(t.id));
|
|
1682
1701
|
}), n.addEventListener("change", () => {
|
|
1683
1702
|
if (n.value === "__escolher") {
|
|
1684
|
-
c(i.obterValorAtual(
|
|
1703
|
+
c(i.obterValorAtual(t.id)), d.click();
|
|
1685
1704
|
return;
|
|
1686
1705
|
}
|
|
1687
|
-
i.registrarAlteracao(
|
|
1706
|
+
i.registrarAlteracao(r, t.id, n.value), c(i.obterValorAtual(t.id));
|
|
1688
1707
|
}), n.addEventListener("keydown", (l) => {
|
|
1689
1708
|
l.key === "Enter" && i.focarProximoEditor(n);
|
|
1690
1709
|
}), o.appendChild(a), o.appendChild(n), o.appendChild(d), o;
|
|
1691
1710
|
}
|
|
1692
|
-
function
|
|
1711
|
+
function ft(r, t, e, i) {
|
|
1693
1712
|
const o = document.createElement("div");
|
|
1694
1713
|
o.className = "ui-prop__editor-cor-container", o.setAttribute("role", "button"), o.tabIndex = 0;
|
|
1695
1714
|
const a = document.createElement("div");
|
|
@@ -1699,36 +1718,36 @@ function nt(t, r, e, i) {
|
|
|
1699
1718
|
const s = document.createElement("input");
|
|
1700
1719
|
s.type = "color", s.className = "ui-prop__cor-picker-oculto", s.tabIndex = -1;
|
|
1701
1720
|
const d = (c) => {
|
|
1702
|
-
const l = typeof c == "string" &&
|
|
1703
|
-
a.style.backgroundColor = c || "#ffffff", n.textContent =
|
|
1721
|
+
const l = typeof c == "string" && ue.test(c) ? pe(c) : null;
|
|
1722
|
+
a.style.backgroundColor = c || "#ffffff", n.textContent = t.textoAmostra || String(c || "ByLayer"), s.value = l ?? "#ffffff", o.setAttribute("aria-label", `${t.rotulo}: ${c || "ByLayer"}`);
|
|
1704
1723
|
};
|
|
1705
1724
|
return d(e), k(o, d), s.addEventListener("input", () => {
|
|
1706
|
-
a.style.backgroundColor = s.value, n.textContent =
|
|
1725
|
+
a.style.backgroundColor = s.value, n.textContent = t.textoAmostra || s.value;
|
|
1707
1726
|
}), s.addEventListener("change", () => {
|
|
1708
|
-
i.registrarAlteracao(
|
|
1727
|
+
i.registrarAlteracao(r, t.id, s.value), d(i.obterValorAtual(t.id));
|
|
1709
1728
|
}), o.addEventListener("click", (c) => {
|
|
1710
1729
|
c.target !== s && s.click();
|
|
1711
1730
|
}), o.addEventListener("keydown", (c) => {
|
|
1712
1731
|
(c.key === " " || c.key === "Enter") && (c.preventDefault(), s.click());
|
|
1713
1732
|
}), o.appendChild(a), o.appendChild(n), o.appendChild(s), o;
|
|
1714
1733
|
}
|
|
1715
|
-
function
|
|
1716
|
-
return
|
|
1734
|
+
function gt(r, t, e, i) {
|
|
1735
|
+
return t.somenteLeitura || t.tipo === "readonly" ? nt(e) : t.tipo === "booleano" ? st(r, t, e, i) : t.tipo === "linha" || t.tipo === "linetype" ? pt(r, t, e, i) : t.tipo === "espessura" || t.tipo === "lineweight" ? ht(r, t, e, i) : t.tipo === "cor-cad" ? bt(r, t, e, i) : t.tipo === "selecao" ? lt(r, t, e, i) : t.tipo === "cor" ? ft(r, t, e, i) : t.tipo === "acao" ? dt(r, t, i) : t.tipo === "numero" ? ct(r, t, e, i) : ut(r, t, e, i);
|
|
1717
1736
|
}
|
|
1718
|
-
function
|
|
1719
|
-
if (!
|
|
1720
|
-
if (!
|
|
1721
|
-
|
|
1737
|
+
function xt(r) {
|
|
1738
|
+
if (!r.tipoContainerElement) return;
|
|
1739
|
+
if (!r.tipos || r.tipos.length === 0) {
|
|
1740
|
+
r.tipoContainerElement.style.display = "none";
|
|
1722
1741
|
return;
|
|
1723
1742
|
}
|
|
1724
|
-
|
|
1725
|
-
const
|
|
1726
|
-
if (
|
|
1743
|
+
r.tipoContainerElement.style.display = "flex", r.tipoContainerElement.innerHTML = "";
|
|
1744
|
+
const t = r.tipos.find((e) => String(e.id) === String(r.tipoSelecionadoId)) || r.tipos[0];
|
|
1745
|
+
if (r.estiloVisual === "revit") {
|
|
1727
1746
|
const e = document.createElement("div");
|
|
1728
1747
|
e.className = "ui-prop__tipo-revit-card";
|
|
1729
1748
|
const i = document.createElement("div");
|
|
1730
1749
|
i.className = "ui-prop__tipo-miniatura";
|
|
1731
|
-
const o =
|
|
1750
|
+
const o = t.iconeSvg ? fe(t.iconeSvg) : null;
|
|
1732
1751
|
o ? i.appendChild(o) : i.innerHTML = `
|
|
1733
1752
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
1734
1753
|
<rect x="3" y="3" width="18" height="18" rx="2"></rect>
|
|
@@ -1738,17 +1757,17 @@ function lt(t) {
|
|
|
1738
1757
|
const a = document.createElement("div");
|
|
1739
1758
|
a.className = "ui-prop__tipo-info";
|
|
1740
1759
|
const n = document.createElement("div");
|
|
1741
|
-
n.className = "ui-prop__tipo-nome", n.textContent =
|
|
1760
|
+
n.className = "ui-prop__tipo-nome", n.textContent = t.rotulo;
|
|
1742
1761
|
const s = document.createElement("div");
|
|
1743
|
-
s.className = "ui-prop__tipo-subtexto", s.textContent =
|
|
1762
|
+
s.className = "ui-prop__tipo-subtexto", s.textContent = t.subtipo || "Tipo de Família", a.appendChild(n), a.appendChild(s), e.appendChild(i), e.appendChild(a);
|
|
1744
1763
|
const d = document.createElement("div");
|
|
1745
1764
|
d.className = "ui-prop__tipo-revit-subbarra";
|
|
1746
1765
|
const c = document.createElement("select");
|
|
1747
|
-
c.className = "ui-prop__tipo-select",
|
|
1766
|
+
c.className = "ui-prop__tipo-select", r.tipos.forEach((u) => {
|
|
1748
1767
|
const p = document.createElement("option");
|
|
1749
|
-
p.value = u.id, p.textContent = `${u.rotulo}${u.subtipo ? ` : ${u.subtipo}` : ""}`, String(u.id) === String(
|
|
1768
|
+
p.value = u.id, p.textContent = `${u.rotulo}${u.subtipo ? ` : ${u.subtipo}` : ""}`, String(u.id) === String(r.tipoSelecionadoId) && (p.selected = !0), c.appendChild(p);
|
|
1750
1769
|
}), c.addEventListener("change", () => {
|
|
1751
|
-
|
|
1770
|
+
r.onSelecionarTipo(c.value);
|
|
1752
1771
|
});
|
|
1753
1772
|
const l = document.createElement("button");
|
|
1754
1773
|
l.type = "button", l.className = "ui-prop__btn-editar-tipo", l.innerHTML = `
|
|
@@ -1758,17 +1777,17 @@ function lt(t) {
|
|
|
1758
1777
|
</svg>
|
|
1759
1778
|
<span>Editar tipo</span>
|
|
1760
1779
|
`, l.addEventListener("click", () => {
|
|
1761
|
-
|
|
1762
|
-
}), d.appendChild(c), d.appendChild(l),
|
|
1780
|
+
r.onEditarTipo(t);
|
|
1781
|
+
}), d.appendChild(c), d.appendChild(l), r.tipoContainerElement.appendChild(e), r.tipoContainerElement.appendChild(d);
|
|
1763
1782
|
} else {
|
|
1764
1783
|
const e = document.createElement("div");
|
|
1765
1784
|
e.className = "ui-prop__tipo-autocad-bar";
|
|
1766
1785
|
const i = document.createElement("select");
|
|
1767
|
-
i.className = "ui-prop__tipo-select",
|
|
1786
|
+
i.className = "ui-prop__tipo-select", r.tipos.forEach((d) => {
|
|
1768
1787
|
const c = document.createElement("option");
|
|
1769
|
-
c.value = d.id, c.textContent = d.rotulo, String(d.id) === String(
|
|
1788
|
+
c.value = d.id, c.textContent = d.rotulo, String(d.id) === String(r.tipoSelecionadoId) && (c.selected = !0), i.appendChild(c);
|
|
1770
1789
|
}), i.addEventListener("change", () => {
|
|
1771
|
-
|
|
1790
|
+
r.onSelecionarTipo(i.value);
|
|
1772
1791
|
});
|
|
1773
1792
|
const o = document.createElement("div");
|
|
1774
1793
|
o.className = "ui-prop__tipo-autocad-acoes";
|
|
@@ -1778,7 +1797,7 @@ function lt(t) {
|
|
|
1778
1797
|
<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon>
|
|
1779
1798
|
</svg>
|
|
1780
1799
|
`, a.addEventListener("click", () => {
|
|
1781
|
-
|
|
1800
|
+
r.onQuickSelect(t);
|
|
1782
1801
|
});
|
|
1783
1802
|
const n = document.createElement("button");
|
|
1784
1803
|
n.type = "button", n.className = "ui-prop__btn-autocad", n.title = "Selecionar objetos", n.setAttribute("aria-label", "Selecionar objetos"), n.innerHTML = `
|
|
@@ -1792,7 +1811,7 @@ function lt(t) {
|
|
|
1792
1811
|
<line x1="9" y1="12" x2="15" y2="12" stroke-width="2.5"></line>
|
|
1793
1812
|
</svg>
|
|
1794
1813
|
`, n.addEventListener("click", () => {
|
|
1795
|
-
|
|
1814
|
+
r.onSelectObjects(t);
|
|
1796
1815
|
});
|
|
1797
1816
|
const s = document.createElement("button");
|
|
1798
1817
|
s.type = "button", s.className = "ui-prop__btn-autocad", s.title = "Calculadora rápida", s.setAttribute("aria-label", "Calculadora rápida"), s.innerHTML = `
|
|
@@ -1807,54 +1826,54 @@ function lt(t) {
|
|
|
1807
1826
|
<circle cx="16" cy="15" r="1" fill="currentColor"></circle>
|
|
1808
1827
|
</svg>
|
|
1809
1828
|
`, s.addEventListener("click", () => {
|
|
1810
|
-
|
|
1811
|
-
}), o.appendChild(a), o.appendChild(n), o.appendChild(s), e.appendChild(i), e.appendChild(o),
|
|
1829
|
+
r.onCalculadora(t);
|
|
1830
|
+
}), o.appendChild(a), o.appendChild(n), o.appendChild(s), e.appendChild(i), e.appendChild(o), r.tipoContainerElement.appendChild(e);
|
|
1812
1831
|
}
|
|
1813
1832
|
}
|
|
1814
|
-
function
|
|
1815
|
-
let
|
|
1833
|
+
function vt(r) {
|
|
1834
|
+
let t = 45;
|
|
1816
1835
|
function e(o) {
|
|
1817
1836
|
const a = Math.max(20, Math.min(65, o));
|
|
1818
|
-
return
|
|
1837
|
+
return t = a, r.hostElement.style.setProperty("--ui-prop-rotulo-largura", `${a}%`), r.splitterElement && (r.splitterElement.style.left = `calc(${a}% - 4px)`), a;
|
|
1819
1838
|
}
|
|
1820
1839
|
function i() {
|
|
1821
|
-
if (!
|
|
1822
|
-
|
|
1840
|
+
if (!r.splitterElement || !r.corpoElement) return;
|
|
1841
|
+
r.splitterListeners.cleanup();
|
|
1823
1842
|
let o = !1;
|
|
1824
1843
|
const a = (n) => {
|
|
1825
1844
|
if (n.button !== 0) return;
|
|
1826
|
-
n.preventDefault(), n.stopPropagation(), o = !0,
|
|
1845
|
+
n.preventDefault(), n.stopPropagation(), o = !0, r.splitterElement.classList.add("ui-prop__splitter--ativo");
|
|
1827
1846
|
try {
|
|
1828
|
-
|
|
1847
|
+
r.splitterElement.setPointerCapture(n.pointerId);
|
|
1829
1848
|
} catch {
|
|
1830
1849
|
}
|
|
1831
|
-
const s =
|
|
1850
|
+
const s = r.corpoElement.getBoundingClientRect(), d = (l) => {
|
|
1832
1851
|
if (!o) return;
|
|
1833
1852
|
const u = s.width;
|
|
1834
1853
|
if (u <= 0) return;
|
|
1835
1854
|
const p = l.clientX - s.left;
|
|
1836
|
-
let
|
|
1837
|
-
|
|
1855
|
+
let f = Math.max(80, Math.min(u - 130, p)) / u * 100;
|
|
1856
|
+
f = Math.max(20, Math.min(65, f)), e(f);
|
|
1838
1857
|
}, c = (l) => {
|
|
1839
1858
|
if (o) {
|
|
1840
|
-
o = !1,
|
|
1859
|
+
o = !1, r.splitterElement.classList.remove("ui-prop__splitter--ativo");
|
|
1841
1860
|
try {
|
|
1842
|
-
|
|
1861
|
+
r.splitterElement.hasPointerCapture(l.pointerId) && r.splitterElement.releasePointerCapture(l.pointerId);
|
|
1843
1862
|
} catch {
|
|
1844
1863
|
}
|
|
1845
|
-
|
|
1864
|
+
r.splitterElement.removeEventListener("pointermove", d), r.splitterElement.removeEventListener("pointerup", c), r.splitterElement.removeEventListener("pointercancel", c), r.onLarguraAlterada(t), r.hostElement.dispatchEvent(
|
|
1846
1865
|
new CustomEvent("ui-splitter-resize", {
|
|
1847
1866
|
bubbles: !0,
|
|
1848
1867
|
composed: !0,
|
|
1849
|
-
detail: { larguraPorcentagem:
|
|
1868
|
+
detail: { larguraPorcentagem: t }
|
|
1850
1869
|
})
|
|
1851
1870
|
);
|
|
1852
1871
|
}
|
|
1853
1872
|
};
|
|
1854
|
-
|
|
1873
|
+
r.splitterElement.addEventListener("pointermove", d), r.splitterElement.addEventListener("pointerup", c), r.splitterElement.addEventListener("pointercancel", c);
|
|
1855
1874
|
};
|
|
1856
|
-
|
|
1857
|
-
e(45),
|
|
1875
|
+
r.splitterListeners.add(r.splitterElement, "pointerdown", a), r.splitterListeners.add(r.splitterElement, "dblclick", () => {
|
|
1876
|
+
e(45), r.onLarguraAlterada(45), r.hostElement.dispatchEvent(
|
|
1858
1877
|
new CustomEvent("ui-splitter-resize", {
|
|
1859
1878
|
bubbles: !0,
|
|
1860
1879
|
composed: !0,
|
|
@@ -1868,10 +1887,10 @@ function dt(t) {
|
|
|
1868
1887
|
definirLarguraRotulo: e
|
|
1869
1888
|
};
|
|
1870
1889
|
}
|
|
1871
|
-
const ct = `:host{display:flex;flex-direction:column;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif);font-size:var(--ui-tamanho-corpo-sm, 12px);color:var(--ui-cor-texto, #e1e1e6);background-color:var(--ui-cor-superficie, #141417);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 4px);overflow:hidden;width:100%;max-width:100%;height:100%;min-height:200px;-webkit-user-select:none;user-select:none;--ui-prop-altura-linha: 22px;--ui-prop-rotulo-largura: 45%}:host([densidade="compacta"]){--ui-prop-altura-linha: 19px;font-size:10.5px}:host([densidade="ultracompacta"]){--ui-prop-altura-linha: 17px;font-size:10px}:host([densidade="relaxada"]){--ui-prop-altura-linha: 28px;font-size:12px}:host([colapsado]){width:32px!important;min-width:32px!important;max-width:32px!important;height:100%!important;cursor:pointer;transition:width .2s cubic-bezier(.4,0,.2,1)}:host([colapsado]) .ui-prop__header,:host([colapsado]) .ui-prop__tipo-seletor-container,:host([colapsado]) .ui-prop__filtro-container,:host([colapsado]) .ui-prop__corpo-wrapper,:host([colapsado]) .ui-prop__footer,:host([colapsado]) .ui-prop__resizer-canto{display:none!important}:host([colapsado]) .ui-prop__faixa-estreita{display:flex!important;flex-direction:column;align-items:center;width:100%;height:100%;padding:8px 0;gap:10px;box-sizing:border-box;background-color:var(--ui-cor-fundo-elevado, #18181d);-webkit-user-select:none;user-select:none;cursor:pointer}.ui-prop__faixa-estreita{display:none}.ui-prop__faixa-icone{display:flex;align-items:center;justify-content:center;color:var(--ui-cor-destaque, #00E08A);flex-shrink:0}.ui-prop__faixa-btn-expandir{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 5%,transparent);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:3px;color:var(--ui-cor-texto, #e1e1e6);cursor:pointer;padding:0;transition:all .15s ease;flex-shrink:0}.ui-prop__faixa-btn-expandir:hover{background-color:var(--ui-cor-destaque, #00E08A);color:#000;border-color:var(--ui-cor-destaque, #00E08A)}.ui-prop__faixa-texto{writing-mode:vertical-rl;text-orientation:mixed;transform:rotate(180deg);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:2px;color:var(--ui-cor-texto-secundario, #888899);margin-top:8px;flex:1;pointer-events:none}:host([colapsado]):hover .ui-prop__faixa-texto{color:var(--ui-cor-texto, #ffffff)}:host([flutuante]){position:fixed!important;z-index:var(--ui-z-docked-bar, 600)!important;box-shadow:var(--ui-sombra-lg, 0 16px 48px rgba(0, 0, 0, .75)),0 0 0 1px color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 14%,transparent),0 6px 14px #00000080!important;border-radius:6px!important;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);resize:both;overflow:hidden;max-width:95vw;max-height:95vh;min-width:220px;min-height:200px}:host([flutuante]) .ui-prop__header{cursor:grab;-webkit-user-select:none;user-select:none}:host([flutuante].arrastando) .ui-prop__header{cursor:grabbing!important}.ui-prop__resizer-canto{display:none}:host([flutuante]) .ui-prop__resizer-canto{display:block;position:absolute;bottom:0;right:0;width:14px;height:14px;cursor:nwse-resize;z-index:50;background:linear-gradient(135deg,transparent 50%,color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 25%,transparent) 50%,color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 25%,transparent) 65%,transparent 65%,transparent 80%,color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 25%,transparent) 80%);pointer-events:auto}.ui-prop__btn-icone--ativo{background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 18%,transparent)!important;color:var(--ui-cor-destaque, #00E08A)!important}.ui-prop__container{display:flex;flex-direction:column;width:100%;height:100%;min-height:0;flex:1;overflow:hidden;box-sizing:border-box}.ui-prop__header{display:flex;align-items:center;justify-content:space-between;height:22px;min-height:22px;padding:0 8px;background-color:var(--ui-cor-fundo-elevado, #1a1a1e);border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));flex-shrink:0;box-sizing:border-box}:host([densidade="compacta"]) .ui-prop__header{height:20px;min-height:20px;padding:0 6px}:host([densidade="ultracompacta"]) .ui-prop__header{height:18px;min-height:18px;padding:0 5px}.ui-prop__header-titulo{display:flex;align-items:center;gap:5px;font-size:10.5px;font-weight:600;color:var(--ui-cor-texto, #ffffff);text-transform:uppercase;letter-spacing:.4px}:host([densidade="compacta"]) .ui-prop__header-titulo{font-size:10px;gap:4px}:host([densidade="ultracompacta"]) .ui-prop__header-titulo{font-size:9.5px;gap:3px}.ui-prop__header-icone{display:flex;align-items:center;color:var(--ui-cor-destaque, #00E08A)}.ui-prop__header-icone svg{width:12px;height:12px}:host([densidade="ultracompacta"]) .ui-prop__header-icone svg{width:10px;height:10px}.ui-prop__header-acoes{display:flex;align-items:center;gap:2px}.ui-prop__btn-icone{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;background:transparent;border:none;border-radius:2px;color:var(--ui-cor-texto-secundario, #888899);cursor:pointer;transition:all .15s ease;padding:0}.ui-prop__btn-icone:hover{background-color:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08));color:var(--ui-cor-texto, #ffffff)}:host([densidade="compacta"]) .ui-prop__btn-icone{width:17px;height:17px}:host([densidade="ultracompacta"]) .ui-prop__btn-icone{width:16px;height:16px}.ui-prop__tipo-seletor-container{padding:3px 6px;background-color:var(--ui-cor-superficie, #141417);border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));display:flex;flex-direction:column;gap:3px;flex-shrink:0;box-sizing:border-box}:host([densidade="compacta"]) .ui-prop__tipo-seletor-container{padding:2px 5px;gap:2px}:host([densidade="ultracompacta"]) .ui-prop__tipo-seletor-container{padding:1px 4px;gap:1px}.ui-prop__tipo-revit-card{display:flex;align-items:center;gap:10px;background-color:var(--ui-cor-fundo-card, #18181c);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-sm, 4px);padding:6px 8px;cursor:pointer;transition:border-color .15s ease}.ui-prop__tipo-revit-card:hover{border-color:var(--ui-cor-destaque, #00E08A)}.ui-prop__tipo-miniatura{width:32px;height:32px;border-radius:3px;background-color:var(--ui-cor-fundo-elevado, #24242a);display:flex;align-items:center;justify-content:center;color:var(--ui-cor-destaque, #00E08A);flex-shrink:0}.ui-prop__tipo-info{display:flex;flex-direction:column;flex:1;min-width:0}.ui-prop__tipo-nome{font-weight:600;font-size:12px;color:var(--ui-cor-texto, #ffffff);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ui-prop__tipo-subtexto{font-size:11px;color:var(--ui-cor-texto-secundario, #888899);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ui-prop__tipo-revit-subbarra{display:flex;align-items:center;gap:6px}.ui-prop__tipo-select{flex:1;min-width:0;width:0;height:20px;background-color:transparent;color:var(--ui-cor-texto, #ffffff);border:none;border-radius:2px;padding:0 16px 0 2px;font-size:10.5px;font-weight:500;cursor:pointer;outline:none;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg width='8' height='5' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888899' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 4px center;background-size:8px 5px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;box-sizing:border-box;transition:background-color .15s ease,color .15s ease}.ui-prop__tipo-select:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 5%,transparent);color:#fff}.ui-prop__tipo-select:focus{background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 8%,transparent);color:var(--ui-cor-destaque, #00E08A)}:host([densidade="compacta"]) .ui-prop__tipo-select{height:18px;font-size:10px;padding:0 14px 0 2px}:host([densidade="ultracompacta"]) .ui-prop__tipo-select{height:16px;font-size:9.5px;padding:0 12px 0 2px}.ui-prop__btn-editar-tipo{height:20px;padding:0 6px;background-color:transparent;border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:2px;color:var(--ui-cor-texto, #ffffff);font-size:10.5px;font-weight:500;cursor:pointer;white-space:nowrap;transition:all .15s ease}:host([densidade="compacta"]) .ui-prop__btn-editar-tipo{height:18px;font-size:10px}:host([densidade="ultracompacta"]) .ui-prop__btn-editar-tipo{height:16px;font-size:9.5px}.ui-prop__btn-editar-tipo:hover{background-color:var(--ui-cor-botao-secundario-hover, #2a2a34);border-color:var(--ui-cor-destaque, #00E08A)}.ui-prop__tipo-autocad-bar{display:flex;align-items:center;gap:2px;width:100%;min-width:0;box-sizing:border-box;background:transparent}.ui-prop__tipo-autocad-acoes{display:flex;align-items:center;gap:1px;flex-shrink:0;border-left:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));padding-left:3px;margin-left:1px}.ui-prop__btn-autocad{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;background:transparent;border:none;border-radius:2px;color:var(--ui-cor-texto-secundario, #888899);cursor:pointer;padding:0;transition:all .15s ease}:host([densidade="compacta"]) .ui-prop__btn-autocad{width:18px;height:18px}:host([densidade="ultracompacta"]) .ui-prop__btn-autocad{width:16px;height:16px}.ui-prop__btn-autocad:hover{background-color:var(--ui-cor-hover-menu, rgba(255, 255, 255, .1));color:var(--ui-cor-destaque, #00E08A)}.ui-prop__btn-autocad:active{transform:scale(.92);background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 15%,transparent)}.ui-prop__filtro-container{display:flex;align-items:center;padding:4px 8px;background-color:var(--ui-cor-fundo, #0b0b0d);border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));gap:6px;flex-shrink:0}.ui-prop__filtro-icone{color:var(--ui-cor-texto-secundario, #888899);flex-shrink:0}.ui-prop__filtro-input{flex:1;background:transparent;border:none;outline:none;font-size:11px;color:var(--ui-cor-texto, #e1e1e6);padding:3px 0}.ui-prop__filtro-input::placeholder{color:var(--ui-cor-texto-secundario, #666677)}.ui-prop__corpo-wrapper{position:relative;flex:1;min-height:0;width:100%;overflow:hidden;display:flex;flex-direction:column}.ui-prop__corpo{flex:1;min-height:0;width:100%;overflow-y:auto;overflow-x:hidden;background-color:var(--ui-cor-superficie, #141417);position:relative;scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 18%,transparent) var(--ui-cor-fundo, #0b0b0d)}.ui-prop__corpo::-webkit-scrollbar{width:8px}.ui-prop__corpo::-webkit-scrollbar-track{background:var(--ui-cor-fundo, #0b0b0d)}.ui-prop__corpo::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 18%,transparent);border-radius:var(--ui-raio-sm, 4px)}.ui-prop__corpo::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 30%,transparent)}.ui-prop__categoria{border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .1))}.ui-prop__categoria-header{position:relative;z-index:25;display:flex;align-items:center;justify-content:space-between;height:21px;padding:0 6px;background-color:var(--ui-cor-fundo-elevado, #18181d);cursor:pointer;-webkit-user-select:none;user-select:none;font-weight:600;font-size:10.5px;color:var(--ui-cor-texto, #ffffff);border-top:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .05));transition:background-color .15s ease;box-sizing:border-box}:host([densidade="compacta"]) .ui-prop__categoria-header{height:19px;font-size:10px;padding:0 5px}:host([densidade="ultracompacta"]) .ui-prop__categoria-header{height:17px;font-size:9.5px;padding:0 4px}.ui-prop__categoria-header:hover{background-color:var(--ui-cor-hover-menu, rgba(255, 255, 255, .06))}.ui-prop__categoria-titulo-bloco{display:flex;align-items:center;gap:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-prop__categoria-seta{display:inline-flex;align-items:center;justify-content:center;font-size:9px;width:12px;height:12px;color:var(--ui-cor-texto-secundario, #888899);transition:transform .15s ease}.ui-prop__categoria--aberta .ui-prop__categoria-seta{transform:rotate(90deg)}.ui-prop__categoria-contador{font-size:10px;font-weight:400;color:var(--ui-cor-texto-secundario, #888899)}.ui-prop__categoria-conteudo{display:none}.ui-prop__categoria--aberta .ui-prop__categoria-conteudo{display:block}.ui-prop__linha{display:flex;align-items:stretch;min-height:var(--ui-prop-altura-linha, 24px);border-bottom:1px dotted var(--ui-cor-borda, rgba(255, 255, 255, .08));box-sizing:border-box;position:relative;z-index:1;transition:background-color .1s ease}.ui-prop__linha:hover{background-color:var(--ui-cor-hover-menu, rgba(255, 255, 255, .04))}.ui-prop__linha:focus-within{background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 8%,transparent)}.ui-prop__linha:focus-within .ui-prop__col-rotulo{color:var(--ui-cor-texto, #ffffff);font-weight:500}.ui-prop__linha--modificada{background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 5%,transparent)}.ui-prop__col-rotulo{width:var(--ui-prop-rotulo-largura, 45%);padding:1px 4px 1px 8px;display:flex;align-items:center;color:var(--ui-cor-texto-secundario, #9999aa);border-right:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;position:relative;flex-shrink:0;box-sizing:border-box}:host([densidade="compacta"]) .ui-prop__col-rotulo{padding:0 4px 0 6px;font-size:10px}:host([densidade="ultracompacta"]) .ui-prop__col-rotulo{padding:0 3px 0 5px;font-size:9.5px}.ui-prop__col-rotulo span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-prop__col-rotulo--scrub{cursor:ew-resize;-webkit-user-select:none;user-select:none;transition:color .15s ease,background-color .15s ease}.ui-prop__col-rotulo--scrub:hover{color:var(--ui-cor-destaque, #00E08A);background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 5%,transparent)}.ui-prop__col-rotulo--arrastando{color:#000!important;background-color:var(--ui-cor-destaque, #00E08A)!important;font-weight:600;cursor:ew-resize!important}.ui-prop__col-rotulo--arrastando span{color:#000!important}.ui-prop__splitter{position:absolute;top:0;bottom:0;min-height:100%;left:calc(var(--ui-prop-rotulo-largura, 45%) - 4px);width:8px;cursor:col-resize;z-index:30;touch-action:none;-webkit-user-select:none;user-select:none;display:flex;align-items:center;justify-content:center}.ui-prop__splitter:after{content:"";position:absolute;top:0;bottom:0;left:3px;width:2px;background-color:transparent;pointer-events:none;transition:background-color .15s ease,box-shadow .15s ease}.ui-prop__splitter:hover:after,.ui-prop__splitter--ativo:after{background-color:var(--ui-cor-destaque, #00E08A);box-shadow:0 0 6px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 50%,transparent)}.ui-prop__splitter--ativo{background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 8%,transparent)}.ui-prop__col-valor{width:calc(100% - var(--ui-prop-rotulo-largura, 45%));flex:1 1 0px;min-width:0!important;display:flex;align-items:stretch;padding:0;overflow:hidden;box-sizing:border-box;position:relative;transition:background-color .1s ease,box-shadow .1s ease}.ui-prop__col-valor:focus-within{background-color:var(--ui-cor-fundo, #0b0b0d);box-shadow:inset 0 0 0 1px var(--ui-cor-destaque, #00E08A)}.ui-prop__editor-input{width:100%;min-width:0;height:100%;min-height:var(--ui-prop-altura-linha, 24px);background:transparent;border:none;border-radius:0;color:var(--ui-cor-texto, #ffffff);font-family:inherit;font-size:11px;padding:0 8px;outline:none;box-sizing:border-box;transition:background-color .1s ease}.ui-prop__editor-input:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.ui-prop__editor-input--numero{text-align:right;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums}.ui-prop__editor-input--calculando{color:var(--ui-cor-destaque, #00E08A)!important;font-weight:500}.ui-prop__col-valor:has(.ui-prop__editor-input--calculando){background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 8%,transparent)!important;box-shadow:inset 0 0 0 1.5px var(--ui-cor-destaque, #00E08A)!important}.ui-prop__editor-select{flex:1 1 0px;min-width:0!important;width:0!important;max-width:100%;height:100%;min-height:var(--ui-prop-altura-linha, 24px);background-color:transparent;color:var(--ui-cor-texto, #ffffff);border:none;border-radius:0;font-size:11px;padding:0 20px 0 8px;outline:none;cursor:pointer;box-sizing:border-box;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888899' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 6px center;background-size:8px 5px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;transition:background-color .1s ease}.ui-prop__editor-select:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.ui-prop__editor-select option{background-color:var(--ui-cor-fundo-elevado, #18181c);color:var(--ui-cor-texto, #ffffff)}.ui-prop__editor-cor-container{display:flex;align-items:center;gap:6px;width:100%;max-width:100%;min-width:0!important;height:100%;min-height:var(--ui-prop-altura-linha, 24px);cursor:pointer;padding:0 20px 0 8px;box-sizing:border-box;position:relative;border:none;border-radius:0;background-image:url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888899' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 6px center;background-size:8px 5px;transition:background-color .1s ease}.ui-prop__editor-cor-container:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 4%,transparent)}.ui-prop__cor-amostra{width:13px;height:13px;border-radius:2px;border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 30%,transparent);flex-shrink:0;box-sizing:border-box}.ui-prop__cor-texto{flex:1 1 0px;min-width:0!important;width:0!important;font-size:11px;color:var(--ui-cor-texto, #ffffff);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-prop__cor-picker-oculto{position:absolute;opacity:0;pointer-events:none;width:0;height:0}.ui-prop__editor-linha-container{display:flex;align-items:center;gap:6px;width:100%;max-width:100%;min-width:0!important;height:100%;min-height:var(--ui-prop-altura-linha, 24px);padding:0 0 0 8px;box-sizing:border-box;overflow:hidden;border:none;border-radius:0}.ui-prop__linha-amostra-svg{width:24px;height:10px;flex-shrink:0}.ui-prop__linha-amostra-svg line{stroke:var(--ui-cor-texto, #e1e1e6);stroke-width:1.5}.ui-prop__linha-select{flex:1 1 0px;min-width:0!important;width:0!important;max-width:100%;height:100%;background:transparent;color:var(--ui-cor-texto, #ffffff);border:none;border-radius:0;font-size:11px;padding:0 20px 0 4px;outline:none;cursor:pointer;box-sizing:border-box;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888899' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 6px center;background-size:8px 5px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-prop__linha-select:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.ui-prop__linha-select option{background-color:var(--ui-cor-fundo-elevado, #18181c);color:var(--ui-cor-texto, #ffffff)}.ui-prop__editor-espessura-container{display:flex;align-items:center;gap:6px;width:100%;max-width:100%;min-width:0!important;height:100%;min-height:var(--ui-prop-altura-linha, 24px);padding:0 0 0 8px;box-sizing:border-box;overflow:hidden;border:none;border-radius:0}.ui-prop__espessura-amostra-svg{width:20px;height:10px;flex-shrink:0}.ui-prop__espessura-amostra-svg line{stroke:var(--ui-cor-texto, #e1e1e6)}.ui-prop__espessura-select{flex:1 1 0px;min-width:0!important;width:0!important;max-width:100%;height:100%;background:transparent;color:var(--ui-cor-texto, #ffffff);border:none;border-radius:0;font-size:11px;padding:0 20px 0 4px;outline:none;cursor:pointer;box-sizing:border-box;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888899' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 6px center;background-size:8px 5px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-prop__espessura-select:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.ui-prop__espessura-select option{background-color:var(--ui-cor-fundo-elevado, #18181c);color:var(--ui-cor-texto, #ffffff)}.ui-prop__editor-cor-cad-container{display:flex;align-items:center;gap:6px;width:100%;max-width:100%;min-width:0!important;height:100%;min-height:var(--ui-prop-altura-linha, 24px);padding:0 0 0 8px;box-sizing:border-box;overflow:hidden;border:none;border-radius:0}.ui-prop__cor-cad-select{flex:1 1 0px;min-width:0!important;width:0!important;max-width:100%;height:100%;background:transparent;color:var(--ui-cor-texto, #ffffff);border:none;border-radius:0;font-size:11px;padding:0 20px 0 4px;outline:none;cursor:pointer;box-sizing:border-box;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888899' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 6px center;background-size:8px 5px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-prop__cor-cad-select:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.ui-prop__cor-cad-select option{background-color:var(--ui-cor-fundo-elevado, #18181c);color:var(--ui-cor-texto, #ffffff)}.ui-prop__editor-booleano{display:flex;align-items:center;gap:6px;width:100%;height:100%;min-height:var(--ui-prop-altura-linha, 24px);cursor:pointer;padding:0 8px;box-sizing:border-box;-webkit-user-select:none;user-select:none}.ui-prop__editor-booleano:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.ui-prop__checkbox-custom{width:13px;height:13px;border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .25));border-radius:2px;background-color:var(--ui-cor-fundo, #0b0b0d);display:flex;align-items:center;justify-content:center;transition:all .15s ease}.ui-prop__checkbox-custom--marcado{background-color:var(--ui-cor-destaque, #00E08A);border-color:var(--ui-cor-destaque, #00E08A);color:#000}.ui-prop__booleano-rotulo{font-size:11px;color:var(--ui-cor-texto, #ffffff)}.ui-prop__btn-acao-inline{width:100%;height:100%;min-height:var(--ui-prop-altura-linha, 24px);padding:0 8px;background-color:transparent;border:none;border-radius:0;color:var(--ui-cor-texto, #ffffff);font-size:11px;font-weight:500;cursor:pointer;white-space:nowrap;text-align:left;transition:all .15s ease;box-sizing:border-box}.ui-prop__btn-acao-inline:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 4%,transparent);color:var(--ui-cor-destaque, #00E08A)}.ui-prop__valor-readonly{display:flex;align-items:center;width:100%;height:100%;min-height:var(--ui-prop-altura-linha, 24px);font-size:11px;color:var(--ui-cor-texto-secundario, #777788);padding:0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box;-webkit-user-select:text;user-select:text}.ui-prop__valor-readonly--numero{justify-content:flex-end;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums}.ui-prop__unidade-sufixo{display:flex;align-items:center;font-size:10px;color:var(--ui-cor-texto-secundario, #777788);padding-right:8px;flex-shrink:0;-webkit-user-select:none;user-select:none}.ui-prop__vazio{padding:24px 16px;text-align:center;color:var(--ui-cor-texto-secundario, #888899);font-size:12px}.ui-prop__footer{display:flex;align-items:center;justify-content:space-between;padding:6px 10px;background-color:var(--ui-cor-fundo-elevado, #18181c);border-top:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .1));flex-shrink:0}.ui-prop__link-ajuda{font-size:11px;color:var(--ui-cor-destaque, #00E08A);text-decoration:none;cursor:pointer}.ui-prop__link-ajuda:hover{text-decoration:underline}.ui-prop__footer-botoes{display:flex;gap:6px}.ui-prop__btn-aplicar{height:24px;padding:0 12px;background-color:var(--ui-cor-destaque, #00E08A);color:#000;border:none;border-radius:3px;font-size:11px;font-weight:600;cursor:pointer;transition:all .15s ease}.ui-prop__btn-aplicar:disabled{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 10%,transparent);color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 30%,transparent);cursor:not-allowed}.ui-prop__btn-desfazer{height:24px;padding:0 8px;background:transparent;color:var(--ui-cor-texto-secundario, #888899);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:3px;font-size:11px;cursor:pointer;transition:all .15s ease}.ui-prop__btn-desfazer:hover:not(:disabled){background-color:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08));color:var(--ui-cor-texto, #ffffff)}.ui-prop__btn-desfazer:disabled{opacity:.4;cursor:not-allowed}@media (max-width: 640px){:host{--ui-prop-altura-linha: 28px;font-size:13px}.ui-prop__btn-icone{min-width:28px;min-height:28px}.ui-prop__footer-botoes{gap:8px}.ui-prop__btn-aplicar,.ui-prop__btn-desfazer{height:30px;font-size:12px;padding:0 12px;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.ui-prop__editor-input,.ui-prop__editor-select{touch-action:manipulation;font-size:14px}}`;
|
|
1872
|
-
function
|
|
1890
|
+
const _t = `:host{display:flex;flex-direction:column;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif);font-size:var(--ui-tamanho-corpo-sm, 12px);color:var(--ui-cor-texto, #e1e1e6);background-color:var(--ui-cor-superficie, #141417);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 4px);overflow:hidden;width:100%;max-width:100%;height:100%;min-height:200px;-webkit-user-select:none;user-select:none;--ui-prop-altura-linha: 22px;--ui-prop-rotulo-largura: 45%}:host([densidade="compacta"]){--ui-prop-altura-linha: 19px;font-size:10.5px}:host([densidade="ultracompacta"]){--ui-prop-altura-linha: 17px;font-size:10px}:host([densidade="relaxada"]){--ui-prop-altura-linha: 28px;font-size:12px}:host([colapsado]){width:32px!important;min-width:32px!important;max-width:32px!important;height:100%!important;cursor:pointer;transition:width .2s cubic-bezier(.4,0,.2,1)}:host([colapsado]) .ui-prop__header,:host([colapsado]) .ui-prop__tipo-seletor-container,:host([colapsado]) .ui-prop__filtro-container,:host([colapsado]) .ui-prop__corpo-wrapper,:host([colapsado]) .ui-prop__footer,:host([colapsado]) .ui-prop__resizer-canto{display:none!important}:host([colapsado]) .ui-prop__faixa-estreita{display:flex!important;flex-direction:column;align-items:center;width:100%;height:100%;padding:8px 0;gap:10px;box-sizing:border-box;background-color:var(--ui-cor-fundo-elevado, #18181d);-webkit-user-select:none;user-select:none;cursor:pointer}.ui-prop__faixa-estreita{display:none}.ui-prop__faixa-icone{display:flex;align-items:center;justify-content:center;color:var(--ui-cor-destaque, #00E08A);flex-shrink:0}.ui-prop__faixa-btn-expandir{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 5%,transparent);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:3px;color:var(--ui-cor-texto, #e1e1e6);cursor:pointer;padding:0;transition:all .15s ease;flex-shrink:0}.ui-prop__faixa-btn-expandir:hover{background-color:var(--ui-cor-destaque, #00E08A);color:#000;border-color:var(--ui-cor-destaque, #00E08A)}.ui-prop__faixa-texto{writing-mode:vertical-rl;text-orientation:mixed;transform:rotate(180deg);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:2px;color:var(--ui-cor-texto-secundario, #888899);margin-top:8px;flex:1;pointer-events:none}:host([colapsado]):hover .ui-prop__faixa-texto{color:var(--ui-cor-texto, #ffffff)}:host([flutuante]){position:fixed!important;z-index:var(--ui-z-docked-bar, 600)!important;box-shadow:var(--ui-sombra-lg, 0 16px 48px rgba(0, 0, 0, .75)),0 0 0 1px color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 14%,transparent),0 6px 14px #00000080!important;border-radius:6px!important;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);resize:both;overflow:hidden;max-width:95vw;max-height:95vh;min-width:220px;min-height:200px}:host([flutuante]) .ui-prop__header{cursor:grab;-webkit-user-select:none;user-select:none}:host([flutuante].arrastando) .ui-prop__header{cursor:grabbing!important}.ui-prop__resizer-canto{display:none}:host([flutuante]) .ui-prop__resizer-canto{display:block;position:absolute;bottom:0;right:0;width:14px;height:14px;cursor:nwse-resize;z-index:50;background:linear-gradient(135deg,transparent 50%,color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 25%,transparent) 50%,color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 25%,transparent) 65%,transparent 65%,transparent 80%,color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 25%,transparent) 80%);pointer-events:auto}.ui-prop__btn-icone--ativo{background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 18%,transparent)!important;color:var(--ui-cor-destaque, #00E08A)!important}.ui-prop__container{display:flex;flex-direction:column;width:100%;height:100%;min-height:0;flex:1;overflow:hidden;box-sizing:border-box}.ui-prop__header{display:flex;align-items:center;justify-content:space-between;height:22px;min-height:22px;padding:0 8px;background-color:var(--ui-cor-fundo-elevado, #1a1a1e);border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));flex-shrink:0;box-sizing:border-box}:host([densidade="compacta"]) .ui-prop__header{height:20px;min-height:20px;padding:0 6px}:host([densidade="ultracompacta"]) .ui-prop__header{height:18px;min-height:18px;padding:0 5px}.ui-prop__header-titulo{display:flex;align-items:center;gap:5px;font-size:10.5px;font-weight:600;color:var(--ui-cor-texto, #ffffff);text-transform:uppercase;letter-spacing:.4px}:host([densidade="compacta"]) .ui-prop__header-titulo{font-size:10px;gap:4px}:host([densidade="ultracompacta"]) .ui-prop__header-titulo{font-size:9.5px;gap:3px}.ui-prop__header-icone{display:flex;align-items:center;color:var(--ui-cor-destaque, #00E08A)}.ui-prop__header-icone svg{width:12px;height:12px}:host([densidade="ultracompacta"]) .ui-prop__header-icone svg{width:10px;height:10px}.ui-prop__header-acoes{display:flex;align-items:center;gap:2px}.ui-prop__btn-icone{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;background:transparent;border:none;border-radius:2px;color:var(--ui-cor-texto-secundario, #888899);cursor:pointer;transition:all .15s ease;padding:0}.ui-prop__btn-icone:hover{background-color:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08));color:var(--ui-cor-texto, #ffffff)}:host([densidade="compacta"]) .ui-prop__btn-icone{width:17px;height:17px}:host([densidade="ultracompacta"]) .ui-prop__btn-icone{width:16px;height:16px}.ui-prop__tipo-seletor-container{padding:3px 6px;background-color:var(--ui-cor-superficie, #141417);border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));display:flex;flex-direction:column;gap:3px;flex-shrink:0;box-sizing:border-box}:host([densidade="compacta"]) .ui-prop__tipo-seletor-container{padding:2px 5px;gap:2px}:host([densidade="ultracompacta"]) .ui-prop__tipo-seletor-container{padding:1px 4px;gap:1px}.ui-prop__tipo-revit-card{display:flex;align-items:center;gap:10px;background-color:var(--ui-cor-fundo-card, #18181c);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-sm, 4px);padding:6px 8px;cursor:pointer;transition:border-color .15s ease}.ui-prop__tipo-revit-card:hover{border-color:var(--ui-cor-destaque, #00E08A)}.ui-prop__tipo-miniatura{width:32px;height:32px;border-radius:3px;background-color:var(--ui-cor-fundo-elevado, #24242a);display:flex;align-items:center;justify-content:center;color:var(--ui-cor-destaque, #00E08A);flex-shrink:0}.ui-prop__tipo-info{display:flex;flex-direction:column;flex:1;min-width:0}.ui-prop__tipo-nome{font-weight:600;font-size:12px;color:var(--ui-cor-texto, #ffffff);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ui-prop__tipo-subtexto{font-size:11px;color:var(--ui-cor-texto-secundario, #888899);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ui-prop__tipo-revit-subbarra{display:flex;align-items:center;gap:6px}.ui-prop__tipo-select{flex:1;min-width:0;width:0;height:20px;background-color:transparent;color:var(--ui-cor-texto, #ffffff);border:none;border-radius:2px;padding:0 16px 0 2px;font-size:10.5px;font-weight:500;cursor:pointer;outline:none;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg width='8' height='5' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888899' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 4px center;background-size:8px 5px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;box-sizing:border-box;transition:background-color .15s ease,color .15s ease}.ui-prop__tipo-select:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 5%,transparent);color:#fff}.ui-prop__tipo-select:focus{background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 8%,transparent);color:var(--ui-cor-destaque, #00E08A)}:host([densidade="compacta"]) .ui-prop__tipo-select{height:18px;font-size:10px;padding:0 14px 0 2px}:host([densidade="ultracompacta"]) .ui-prop__tipo-select{height:16px;font-size:9.5px;padding:0 12px 0 2px}.ui-prop__btn-editar-tipo{height:20px;padding:0 6px;background-color:transparent;border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:2px;color:var(--ui-cor-texto, #ffffff);font-size:10.5px;font-weight:500;cursor:pointer;white-space:nowrap;transition:all .15s ease}:host([densidade="compacta"]) .ui-prop__btn-editar-tipo{height:18px;font-size:10px}:host([densidade="ultracompacta"]) .ui-prop__btn-editar-tipo{height:16px;font-size:9.5px}.ui-prop__btn-editar-tipo:hover{background-color:var(--ui-cor-botao-secundario-hover, #2a2a34);border-color:var(--ui-cor-destaque, #00E08A)}.ui-prop__tipo-autocad-bar{display:flex;align-items:center;gap:2px;width:100%;min-width:0;box-sizing:border-box;background:transparent}.ui-prop__tipo-autocad-acoes{display:flex;align-items:center;gap:1px;flex-shrink:0;border-left:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));padding-left:3px;margin-left:1px}.ui-prop__btn-autocad{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;background:transparent;border:none;border-radius:2px;color:var(--ui-cor-texto-secundario, #888899);cursor:pointer;padding:0;transition:all .15s ease}:host([densidade="compacta"]) .ui-prop__btn-autocad{width:18px;height:18px}:host([densidade="ultracompacta"]) .ui-prop__btn-autocad{width:16px;height:16px}.ui-prop__btn-autocad:hover{background-color:var(--ui-cor-hover-menu, rgba(255, 255, 255, .1));color:var(--ui-cor-destaque, #00E08A)}.ui-prop__btn-autocad:active{transform:scale(.92);background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 15%,transparent)}.ui-prop__filtro-container{display:flex;align-items:center;padding:4px 8px;background-color:var(--ui-cor-fundo, #0b0b0d);border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));gap:6px;flex-shrink:0}.ui-prop__filtro-icone{color:var(--ui-cor-texto-secundario, #888899);flex-shrink:0}.ui-prop__filtro-input{flex:1;background:transparent;border:none;outline:none;font-size:11px;color:var(--ui-cor-texto, #e1e1e6);padding:3px 0}.ui-prop__filtro-input::placeholder{color:var(--ui-cor-texto-secundario, #666677)}.ui-prop__corpo-wrapper{position:relative;flex:1;min-height:0;width:100%;overflow:hidden;display:flex;flex-direction:column}.ui-prop__corpo{flex:1;min-height:0;width:100%;overflow-y:auto;overflow-x:hidden;background-color:var(--ui-cor-superficie, #141417);position:relative;scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 18%,transparent) var(--ui-cor-fundo, #0b0b0d)}.ui-prop__corpo::-webkit-scrollbar{width:8px}.ui-prop__corpo::-webkit-scrollbar-track{background:var(--ui-cor-fundo, #0b0b0d)}.ui-prop__corpo::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 18%,transparent);border-radius:var(--ui-raio-sm, 4px)}.ui-prop__corpo::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 30%,transparent)}.ui-prop__categoria{border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .1))}.ui-prop__categoria-header{position:relative;z-index:25;display:flex;align-items:center;justify-content:space-between;height:21px;padding:0 6px;background-color:var(--ui-cor-fundo-elevado, #18181d);cursor:pointer;-webkit-user-select:none;user-select:none;font-weight:600;font-size:10.5px;color:var(--ui-cor-texto, #ffffff);border-top:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .05));transition:background-color .15s ease;box-sizing:border-box}:host([densidade="compacta"]) .ui-prop__categoria-header{height:19px;font-size:10px;padding:0 5px}:host([densidade="ultracompacta"]) .ui-prop__categoria-header{height:17px;font-size:9.5px;padding:0 4px}.ui-prop__categoria-header:hover{background-color:var(--ui-cor-hover-menu, rgba(255, 255, 255, .06))}.ui-prop__categoria-titulo-bloco{display:flex;align-items:center;gap:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-prop__categoria-seta{display:inline-flex;align-items:center;justify-content:center;font-size:9px;width:12px;height:12px;color:var(--ui-cor-texto-secundario, #888899);transition:transform .15s ease}.ui-prop__categoria--aberta .ui-prop__categoria-seta{transform:rotate(90deg)}.ui-prop__categoria-contador{font-size:10px;font-weight:400;color:var(--ui-cor-texto-secundario, #888899)}.ui-prop__categoria-conteudo{display:none}.ui-prop__categoria--aberta .ui-prop__categoria-conteudo{display:block}.ui-prop__linha{display:flex;align-items:stretch;min-height:var(--ui-prop-altura-linha, 24px);border-bottom:1px dotted var(--ui-cor-borda, rgba(255, 255, 255, .08));box-sizing:border-box;position:relative;z-index:1;transition:background-color .1s ease}.ui-prop__linha:hover{background-color:var(--ui-cor-hover-menu, rgba(255, 255, 255, .04))}.ui-prop__linha:focus-within{background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 8%,transparent)}.ui-prop__linha:focus-within .ui-prop__col-rotulo{color:var(--ui-cor-texto, #ffffff);font-weight:500}.ui-prop__linha--modificada{background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 5%,transparent)}.ui-prop__col-rotulo{width:var(--ui-prop-rotulo-largura, 45%);padding:1px 4px 1px 8px;display:flex;align-items:center;color:var(--ui-cor-texto-secundario, #9999aa);border-right:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;position:relative;flex-shrink:0;box-sizing:border-box}:host([densidade="compacta"]) .ui-prop__col-rotulo{padding:0 4px 0 6px;font-size:10px}:host([densidade="ultracompacta"]) .ui-prop__col-rotulo{padding:0 3px 0 5px;font-size:9.5px}.ui-prop__col-rotulo span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-prop__col-rotulo--scrub{cursor:ew-resize;-webkit-user-select:none;user-select:none;transition:color .15s ease,background-color .15s ease}.ui-prop__col-rotulo--scrub:hover{color:var(--ui-cor-destaque, #00E08A);background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 5%,transparent)}.ui-prop__col-rotulo--arrastando{color:#000!important;background-color:var(--ui-cor-destaque, #00E08A)!important;font-weight:600;cursor:ew-resize!important}.ui-prop__col-rotulo--arrastando span{color:#000!important}.ui-prop__splitter{position:absolute;top:0;bottom:0;min-height:100%;left:calc(var(--ui-prop-rotulo-largura, 45%) - 4px);width:8px;cursor:col-resize;z-index:30;touch-action:none;-webkit-user-select:none;user-select:none;display:flex;align-items:center;justify-content:center}.ui-prop__splitter:after{content:"";position:absolute;top:0;bottom:0;left:3px;width:2px;background-color:transparent;pointer-events:none;transition:background-color .15s ease,box-shadow .15s ease}.ui-prop__splitter:hover:after,.ui-prop__splitter--ativo:after{background-color:var(--ui-cor-destaque, #00E08A);box-shadow:0 0 6px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 50%,transparent)}.ui-prop__splitter--ativo{background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 8%,transparent)}.ui-prop__col-valor{width:calc(100% - var(--ui-prop-rotulo-largura, 45%));flex:1 1 0px;min-width:0!important;display:flex;align-items:stretch;padding:0;overflow:hidden;box-sizing:border-box;position:relative;transition:background-color .1s ease,box-shadow .1s ease}.ui-prop__col-valor:focus-within{background-color:var(--ui-cor-fundo, #0b0b0d);box-shadow:inset 0 0 0 1px var(--ui-cor-destaque, #00E08A)}.ui-prop__editor-input{width:100%;min-width:0;height:100%;min-height:var(--ui-prop-altura-linha, 24px);background:transparent;border:none;border-radius:0;color:var(--ui-cor-texto, #ffffff);font-family:inherit;font-size:11px;padding:0 8px;outline:none;box-sizing:border-box;transition:background-color .1s ease}.ui-prop__editor-input:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.ui-prop__editor-input--numero{text-align:right;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums}.ui-prop__editor-input--calculando{color:var(--ui-cor-destaque, #00E08A)!important;font-weight:500}.ui-prop__col-valor:has(.ui-prop__editor-input--calculando){background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 8%,transparent)!important;box-shadow:inset 0 0 0 1.5px var(--ui-cor-destaque, #00E08A)!important}.ui-prop__editor-select{flex:1 1 0px;min-width:0!important;width:0!important;max-width:100%;height:100%;min-height:var(--ui-prop-altura-linha, 24px);background-color:transparent;color:var(--ui-cor-texto, #ffffff);border:none;border-radius:0;font-size:11px;padding:0 20px 0 8px;outline:none;cursor:pointer;box-sizing:border-box;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888899' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 6px center;background-size:8px 5px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;transition:background-color .1s ease}.ui-prop__editor-select:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.ui-prop__editor-select option{background-color:var(--ui-cor-fundo-elevado, #18181c);color:var(--ui-cor-texto, #ffffff)}.ui-prop__editor-cor-container{display:flex;align-items:center;gap:6px;width:100%;max-width:100%;min-width:0!important;height:100%;min-height:var(--ui-prop-altura-linha, 24px);cursor:pointer;padding:0 20px 0 8px;box-sizing:border-box;position:relative;border:none;border-radius:0;background-image:url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888899' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 6px center;background-size:8px 5px;transition:background-color .1s ease}.ui-prop__editor-cor-container:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 4%,transparent)}.ui-prop__cor-amostra{width:13px;height:13px;border-radius:2px;border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 30%,transparent);flex-shrink:0;box-sizing:border-box}.ui-prop__cor-texto{flex:1 1 0px;min-width:0!important;width:0!important;font-size:11px;color:var(--ui-cor-texto, #ffffff);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-prop__cor-picker-oculto{position:absolute;opacity:0;pointer-events:none;width:0;height:0}.ui-prop__editor-linha-container{display:flex;align-items:center;gap:6px;width:100%;max-width:100%;min-width:0!important;height:100%;min-height:var(--ui-prop-altura-linha, 24px);padding:0 0 0 8px;box-sizing:border-box;overflow:hidden;border:none;border-radius:0}.ui-prop__linha-amostra-svg{width:24px;height:10px;flex-shrink:0}.ui-prop__linha-amostra-svg line{stroke:var(--ui-cor-texto, #e1e1e6);stroke-width:1.5}.ui-prop__linha-select{flex:1 1 0px;min-width:0!important;width:0!important;max-width:100%;height:100%;background:transparent;color:var(--ui-cor-texto, #ffffff);border:none;border-radius:0;font-size:11px;padding:0 20px 0 4px;outline:none;cursor:pointer;box-sizing:border-box;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888899' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 6px center;background-size:8px 5px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-prop__linha-select:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.ui-prop__linha-select option{background-color:var(--ui-cor-fundo-elevado, #18181c);color:var(--ui-cor-texto, #ffffff)}.ui-prop__editor-espessura-container{display:flex;align-items:center;gap:6px;width:100%;max-width:100%;min-width:0!important;height:100%;min-height:var(--ui-prop-altura-linha, 24px);padding:0 0 0 8px;box-sizing:border-box;overflow:hidden;border:none;border-radius:0}.ui-prop__espessura-amostra-svg{width:20px;height:10px;flex-shrink:0}.ui-prop__espessura-amostra-svg line{stroke:var(--ui-cor-texto, #e1e1e6)}.ui-prop__espessura-select{flex:1 1 0px;min-width:0!important;width:0!important;max-width:100%;height:100%;background:transparent;color:var(--ui-cor-texto, #ffffff);border:none;border-radius:0;font-size:11px;padding:0 20px 0 4px;outline:none;cursor:pointer;box-sizing:border-box;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888899' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 6px center;background-size:8px 5px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-prop__espessura-select:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.ui-prop__espessura-select option{background-color:var(--ui-cor-fundo-elevado, #18181c);color:var(--ui-cor-texto, #ffffff)}.ui-prop__editor-cor-cad-container{display:flex;align-items:center;gap:6px;width:100%;max-width:100%;min-width:0!important;height:100%;min-height:var(--ui-prop-altura-linha, 24px);padding:0 0 0 8px;box-sizing:border-box;overflow:hidden;border:none;border-radius:0}.ui-prop__cor-cad-select{flex:1 1 0px;min-width:0!important;width:0!important;max-width:100%;height:100%;background:transparent;color:var(--ui-cor-texto, #ffffff);border:none;border-radius:0;font-size:11px;padding:0 20px 0 4px;outline:none;cursor:pointer;box-sizing:border-box;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888899' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 6px center;background-size:8px 5px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-prop__cor-cad-select:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.ui-prop__cor-cad-select option{background-color:var(--ui-cor-fundo-elevado, #18181c);color:var(--ui-cor-texto, #ffffff)}.ui-prop__editor-booleano{display:flex;align-items:center;gap:6px;width:100%;height:100%;min-height:var(--ui-prop-altura-linha, 24px);cursor:pointer;padding:0 8px;box-sizing:border-box;-webkit-user-select:none;user-select:none}.ui-prop__editor-booleano:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.ui-prop__checkbox-custom{width:13px;height:13px;border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .25));border-radius:2px;background-color:var(--ui-cor-fundo, #0b0b0d);display:flex;align-items:center;justify-content:center;transition:all .15s ease}.ui-prop__checkbox-custom--marcado{background-color:var(--ui-cor-destaque, #00E08A);border-color:var(--ui-cor-destaque, #00E08A);color:#000}.ui-prop__booleano-rotulo{font-size:11px;color:var(--ui-cor-texto, #ffffff)}.ui-prop__btn-acao-inline{width:100%;height:100%;min-height:var(--ui-prop-altura-linha, 24px);padding:0 8px;background-color:transparent;border:none;border-radius:0;color:var(--ui-cor-texto, #ffffff);font-size:11px;font-weight:500;cursor:pointer;white-space:nowrap;text-align:left;transition:all .15s ease;box-sizing:border-box}.ui-prop__btn-acao-inline:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 4%,transparent);color:var(--ui-cor-destaque, #00E08A)}.ui-prop__valor-readonly{display:flex;align-items:center;width:100%;height:100%;min-height:var(--ui-prop-altura-linha, 24px);font-size:11px;color:var(--ui-cor-texto-secundario, #777788);padding:0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box;-webkit-user-select:text;user-select:text}.ui-prop__valor-readonly--numero{justify-content:flex-end;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums}.ui-prop__unidade-sufixo{display:flex;align-items:center;font-size:10px;color:var(--ui-cor-texto-secundario, #777788);padding-right:8px;flex-shrink:0;-webkit-user-select:none;user-select:none}.ui-prop__vazio{padding:24px 16px;text-align:center;color:var(--ui-cor-texto-secundario, #888899);font-size:12px}.ui-prop__footer{display:flex;align-items:center;justify-content:space-between;padding:6px 10px;background-color:var(--ui-cor-fundo-elevado, #18181c);border-top:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .1));flex-shrink:0}.ui-prop__link-ajuda{font-size:11px;color:var(--ui-cor-destaque, #00E08A);text-decoration:none;cursor:pointer}.ui-prop__link-ajuda:hover{text-decoration:underline}.ui-prop__footer-botoes{display:flex;gap:6px}.ui-prop__btn-aplicar{height:24px;padding:0 12px;background-color:var(--ui-cor-destaque, #00E08A);color:#000;border:none;border-radius:3px;font-size:11px;font-weight:600;cursor:pointer;transition:all .15s ease}.ui-prop__btn-aplicar:disabled{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 10%,transparent);color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 30%,transparent);cursor:not-allowed}.ui-prop__btn-desfazer{height:24px;padding:0 8px;background:transparent;color:var(--ui-cor-texto-secundario, #888899);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:3px;font-size:11px;cursor:pointer;transition:all .15s ease}.ui-prop__btn-desfazer:hover:not(:disabled){background-color:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08));color:var(--ui-cor-texto, #ffffff)}.ui-prop__btn-desfazer:disabled{opacity:.4;cursor:not-allowed}@media (max-width: 640px){:host{--ui-prop-altura-linha: 28px;font-size:13px}.ui-prop__btn-icone{min-width:28px;min-height:28px}.ui-prop__footer-botoes{gap:8px}.ui-prop__btn-aplicar,.ui-prop__btn-desfazer{height:30px;font-size:12px;padding:0 12px;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.ui-prop__editor-input,.ui-prop__editor-select{touch-action:manipulation;font-size:14px}}`;
|
|
1891
|
+
function Et() {
|
|
1873
1892
|
return `
|
|
1874
|
-
<style>${
|
|
1893
|
+
<style>${_t}</style>
|
|
1875
1894
|
<div class="ui-prop__container" id="container">
|
|
1876
1895
|
<!-- 0. Faixa Vertical da Coluna Estreita (visível quando colapsado) -->
|
|
1877
1896
|
<div class="ui-prop__faixa-estreita" id="faixa-estreita" title="Clique para expandir painel">
|
|
@@ -1970,19 +1989,19 @@ function ut() {
|
|
|
1970
1989
|
</div>
|
|
1971
1990
|
`;
|
|
1972
1991
|
}
|
|
1973
|
-
function
|
|
1974
|
-
return
|
|
1992
|
+
function O(r, t) {
|
|
1993
|
+
return r == null && t == null ? !0 : Object.is(r, t);
|
|
1975
1994
|
}
|
|
1976
|
-
class
|
|
1977
|
-
constructor(
|
|
1995
|
+
class yt {
|
|
1996
|
+
constructor(t) {
|
|
1978
1997
|
b(this, "valoresOriginais", {});
|
|
1979
1998
|
b(this, "valoresAtuais", {});
|
|
1980
|
-
this.ctx =
|
|
1999
|
+
this.ctx = t;
|
|
1981
2000
|
}
|
|
1982
|
-
inicializarCategorias(
|
|
2001
|
+
inicializarCategorias(t) {
|
|
1983
2002
|
this.valoresOriginais = {}, this.valoresAtuais = {};
|
|
1984
2003
|
const e = /* @__PURE__ */ new Set();
|
|
1985
|
-
|
|
2004
|
+
t.forEach((i) => {
|
|
1986
2005
|
(i.propriedades || []).forEach((o) => {
|
|
1987
2006
|
e.has(o.id) && typeof console < "u" && console.warn(`[ui-tabela-propriedades] id de propriedade repetido: "${o.id}". Os valores são indexados por id e serão compartilhados.`), e.add(o.id), this.valoresOriginais[o.id] = o.valor, this.valoresAtuais[o.id] = o.valor;
|
|
1988
2007
|
});
|
|
@@ -1990,10 +2009,10 @@ class pt {
|
|
|
1990
2009
|
}
|
|
1991
2010
|
/** Há alguma propriedade com valor diferente do original (último aplicar/carregar)? */
|
|
1992
2011
|
get isDirty() {
|
|
1993
|
-
return Object.keys(this.valoresAtuais).some((
|
|
2012
|
+
return Object.keys(this.valoresAtuais).some((t) => this.isModificada(t));
|
|
1994
2013
|
}
|
|
1995
|
-
isModificada(
|
|
1996
|
-
return !
|
|
2014
|
+
isModificada(t) {
|
|
2015
|
+
return !O(this.valoresAtuais[t], this.valoresOriginais[t]);
|
|
1997
2016
|
}
|
|
1998
2017
|
getValores() {
|
|
1999
2018
|
return { ...this.valoresAtuais };
|
|
@@ -2001,30 +2020,30 @@ class pt {
|
|
|
2001
2020
|
getValoresOriginais() {
|
|
2002
2021
|
return { ...this.valoresOriginais };
|
|
2003
2022
|
}
|
|
2004
|
-
setValores(
|
|
2005
|
-
!
|
|
2006
|
-
this.valoresAtuais[e] =
|
|
2023
|
+
setValores(t) {
|
|
2024
|
+
!t || typeof t != "object" || (Object.keys(t).forEach((e) => {
|
|
2025
|
+
this.valoresAtuais[e] = t[e], this.valoresOriginais[e] = t[e];
|
|
2007
2026
|
}), this.ctx.onAtualizarBotoesFooter(this.isDirty));
|
|
2008
2027
|
}
|
|
2009
|
-
obterValor(
|
|
2010
|
-
return this.valoresAtuais[
|
|
2028
|
+
obterValor(t) {
|
|
2029
|
+
return this.valoresAtuais[t];
|
|
2011
2030
|
}
|
|
2012
2031
|
/** Alteração programática: atualiza o editor na tela; não emite se o valor não mudou. */
|
|
2013
|
-
definirValor(
|
|
2014
|
-
const o = this.valoresAtuais[
|
|
2015
|
-
|
|
2032
|
+
definirValor(t, e, i = !0) {
|
|
2033
|
+
const o = this.valoresAtuais[t];
|
|
2034
|
+
O(o, e) || (this.valoresAtuais[t] = e, this.aposAlterar(t), this.ctx.onAtualizarCampoVisual(t, e), i && this.emitirAlteracao(t, e, o, this.categoriaDe(t)));
|
|
2016
2035
|
}
|
|
2017
2036
|
/** Alteração feita pelo usuário num editor. Em modo manual só emite no Aplicar. */
|
|
2018
|
-
registrarAlteracao(
|
|
2037
|
+
registrarAlteracao(t, e, i) {
|
|
2019
2038
|
const o = this.valoresAtuais[e];
|
|
2020
|
-
|
|
2039
|
+
O(o, i) || (this.valoresAtuais[e] = i, this.aposAlterar(e), this.ctx.isModoManual() || this.emitirAlteracao(e, i, o, t));
|
|
2021
2040
|
}
|
|
2022
2041
|
aplicar() {
|
|
2023
2042
|
var e;
|
|
2024
2043
|
if (!this.isDirty) return;
|
|
2025
2044
|
this.valoresOriginais = { ...this.valoresAtuais }, this.ctx.onAtualizarBotoesFooter(!1);
|
|
2026
|
-
const
|
|
2027
|
-
|
|
2045
|
+
const t = (e = this.ctx.hostElement.shadowRoot) == null ? void 0 : e.querySelectorAll(".ui-prop__linha--modificada");
|
|
2046
|
+
t == null || t.forEach((i) => i.classList.remove("ui-prop__linha--modificada")), this.ctx.hostElement.dispatchEvent(
|
|
2028
2047
|
new CustomEvent("ui-aplicar", {
|
|
2029
2048
|
bubbles: !0,
|
|
2030
2049
|
composed: !0,
|
|
@@ -2042,23 +2061,23 @@ class pt {
|
|
|
2042
2061
|
));
|
|
2043
2062
|
}
|
|
2044
2063
|
/** Marca/desmarca a linha e recalcula os botões do rodapé (voltar ao original limpa o estado). */
|
|
2045
|
-
aposAlterar(
|
|
2046
|
-
const e =
|
|
2047
|
-
e == null || e.classList.toggle("ui-prop__linha--modificada", this.isModificada(
|
|
2064
|
+
aposAlterar(t) {
|
|
2065
|
+
const e = de(this.ctx.hostElement.shadowRoot, t);
|
|
2066
|
+
e == null || e.classList.toggle("ui-prop__linha--modificada", this.isModificada(t)), this.ctx.onAtualizarBotoesFooter(this.isDirty);
|
|
2048
2067
|
}
|
|
2049
|
-
categoriaDe(
|
|
2068
|
+
categoriaDe(t) {
|
|
2050
2069
|
var e;
|
|
2051
2070
|
for (const i of this.ctx.getCategorias())
|
|
2052
|
-
if ((e = i.propriedades) != null && e.some((o) => o.id ===
|
|
2071
|
+
if ((e = i.propriedades) != null && e.some((o) => o.id === t)) return i.id;
|
|
2053
2072
|
return "";
|
|
2054
2073
|
}
|
|
2055
|
-
emitirAlteracao(
|
|
2074
|
+
emitirAlteracao(t, e, i, o = "") {
|
|
2056
2075
|
this.ctx.hostElement.dispatchEvent(
|
|
2057
2076
|
new CustomEvent("ui-propriedade-alterada", {
|
|
2058
2077
|
bubbles: !0,
|
|
2059
2078
|
composed: !0,
|
|
2060
2079
|
detail: {
|
|
2061
|
-
id:
|
|
2080
|
+
id: t,
|
|
2062
2081
|
categoriaId: o,
|
|
2063
2082
|
valor: e,
|
|
2064
2083
|
valorAnterior: i,
|
|
@@ -2068,16 +2087,16 @@ class pt {
|
|
|
2068
2087
|
);
|
|
2069
2088
|
}
|
|
2070
2089
|
}
|
|
2071
|
-
function
|
|
2072
|
-
const { listaContainer:
|
|
2073
|
-
if (
|
|
2090
|
+
function wt(r) {
|
|
2091
|
+
const { listaContainer: t, categorias: e, termoBusca: i, onToggleCategoria: o, linhaCtx: a } = r;
|
|
2092
|
+
if (t.innerHTML = "", !e || e.length === 0) {
|
|
2074
2093
|
const s = document.createElement("div");
|
|
2075
|
-
s.className = "ui-prop__vazio", s.textContent = "Nenhuma propriedade disponível.",
|
|
2094
|
+
s.className = "ui-prop__vazio", s.textContent = "Nenhuma propriedade disponível.", t.appendChild(s);
|
|
2076
2095
|
return;
|
|
2077
2096
|
}
|
|
2078
2097
|
const n = document.createDocumentFragment();
|
|
2079
2098
|
e.forEach((s) => {
|
|
2080
|
-
const d = (s.propriedades || []).filter((
|
|
2099
|
+
const d = (s.propriedades || []).filter((g) => i ? g.rotulo.toLowerCase().includes(i) || String(g.id).toLowerCase().includes(i) : !0);
|
|
2081
2100
|
if (i && d.length === 0)
|
|
2082
2101
|
return;
|
|
2083
2102
|
const c = !!i || s.aberto !== !1, l = document.createElement("div");
|
|
@@ -2091,124 +2110,124 @@ function ht(t) {
|
|
|
2091
2110
|
const m = document.createElement("span");
|
|
2092
2111
|
m.textContent = s.titulo, p.appendChild(h), p.appendChild(m);
|
|
2093
2112
|
const x = document.createElement("span");
|
|
2094
|
-
x.className = "ui-prop__categoria-contador", x.textContent = String(d.length), u.appendChild(p), u.appendChild(x), u.addEventListener("click", () => o(s.id)), u.addEventListener("keydown", (
|
|
2095
|
-
(
|
|
2113
|
+
x.className = "ui-prop__categoria-contador", x.textContent = String(d.length), u.appendChild(p), u.appendChild(x), u.addEventListener("click", () => o(s.id)), u.addEventListener("keydown", (g) => {
|
|
2114
|
+
(g.key === "Enter" || g.key === " ") && (g.preventDefault(), o(s.id));
|
|
2096
2115
|
});
|
|
2097
|
-
const
|
|
2098
|
-
|
|
2099
|
-
const _ =
|
|
2100
|
-
|
|
2101
|
-
}), l.appendChild(u), l.appendChild(
|
|
2102
|
-
}),
|
|
2116
|
+
const f = document.createElement("div");
|
|
2117
|
+
f.className = "ui-prop__categoria-conteudo", d.forEach((g) => {
|
|
2118
|
+
const _ = Ct(s.id, g, a);
|
|
2119
|
+
f.appendChild(_);
|
|
2120
|
+
}), l.appendChild(u), l.appendChild(f), n.appendChild(l);
|
|
2121
|
+
}), t.appendChild(n);
|
|
2103
2122
|
}
|
|
2104
|
-
function
|
|
2123
|
+
function Ct(r, t, e) {
|
|
2105
2124
|
const i = document.createElement("div");
|
|
2106
|
-
i.className = "ui-prop__linha", i.setAttribute("data-prop-id",
|
|
2107
|
-
const o = e.valoresAtuais[
|
|
2108
|
-
|
|
2125
|
+
i.className = "ui-prop__linha", i.setAttribute("data-prop-id", t.id);
|
|
2126
|
+
const o = e.valoresAtuais[t.id] !== void 0 ? e.valoresAtuais[t.id] : t.valor, a = t.id in e.valoresOriginais ? e.valoresOriginais[t.id] : t.valor;
|
|
2127
|
+
O(o, a) || i.classList.add("ui-prop__linha--modificada"), i.addEventListener("dblclick", () => {
|
|
2109
2128
|
const l = i.querySelector(
|
|
2110
2129
|
'input:not([type="color"]):not(.ui-prop__cor-picker-oculto), select, .ui-prop__btn-acao-inline'
|
|
2111
2130
|
);
|
|
2112
2131
|
l && (l.focus(), l instanceof HTMLInputElement && l.select());
|
|
2113
2132
|
});
|
|
2114
2133
|
const n = document.createElement("div");
|
|
2115
|
-
n.className = "ui-prop__col-rotulo", n.title =
|
|
2134
|
+
n.className = "ui-prop__col-rotulo", n.title = t.rotulo;
|
|
2116
2135
|
const s = document.createElement("span");
|
|
2117
|
-
s.textContent =
|
|
2136
|
+
s.textContent = t.rotulo, n.appendChild(s), t.tipo === "numero" && !t.somenteLeitura && At(n, r, t, e);
|
|
2118
2137
|
const d = document.createElement("div");
|
|
2119
2138
|
d.className = "ui-prop__col-valor";
|
|
2120
|
-
const c =
|
|
2121
|
-
if (d.appendChild(c),
|
|
2139
|
+
const c = gt(r, t, o, e.editorCtx);
|
|
2140
|
+
if (d.appendChild(c), t.unidade) {
|
|
2122
2141
|
const l = document.createElement("span");
|
|
2123
|
-
l.className = "ui-prop__unidade-sufixo", l.textContent =
|
|
2142
|
+
l.className = "ui-prop__unidade-sufixo", l.textContent = t.unidade, d.appendChild(l);
|
|
2124
2143
|
}
|
|
2125
2144
|
return i.appendChild(n), i.appendChild(d), i;
|
|
2126
2145
|
}
|
|
2127
|
-
function
|
|
2128
|
-
|
|
2146
|
+
function At(r, t, e, i) {
|
|
2147
|
+
r.classList.add("ui-prop__col-rotulo--scrub"), r.title = `${e.rotulo} (Arraste para ajustar, duplo-clique para editar)`;
|
|
2129
2148
|
let o = 0, a = 0, n = !1;
|
|
2130
|
-
|
|
2149
|
+
r.addEventListener("pointerdown", (s) => {
|
|
2131
2150
|
if (s.button !== 0) return;
|
|
2132
2151
|
o = s.clientX;
|
|
2133
2152
|
const d = i.editorCtx.obterValorAtual(e.id);
|
|
2134
2153
|
a = typeof d == "number" ? d : parseFloat(String(d || 0)) || 0, n = !1;
|
|
2135
2154
|
try {
|
|
2136
|
-
|
|
2155
|
+
r.setPointerCapture(s.pointerId);
|
|
2137
2156
|
} catch {
|
|
2138
2157
|
}
|
|
2139
|
-
|
|
2158
|
+
r.classList.add("ui-prop__col-rotulo--arrastando");
|
|
2140
2159
|
const c = (u) => {
|
|
2141
2160
|
const p = u.clientX - o;
|
|
2142
2161
|
if (Math.abs(p) > 2 && (n = !0), n) {
|
|
2143
2162
|
let h = 1;
|
|
2144
2163
|
u.shiftKey ? h = 0.1 : (u.ctrlKey || u.metaKey) && (h = 10);
|
|
2145
2164
|
const m = e.casasDecimais !== void 0 ? e.casasDecimais : 2, x = Math.pow(10, -Math.min(m, 2));
|
|
2146
|
-
let
|
|
2147
|
-
e.casasDecimais !== void 0 ?
|
|
2165
|
+
let f = a + p * x * h;
|
|
2166
|
+
e.casasDecimais !== void 0 ? f = Number(f.toFixed(e.casasDecimais)) : f = Math.round(f * 100) / 100, i.editorCtx.registrarAlteracao(t, e.id, f), i.onAtualizarCampoVisual(e.id, f);
|
|
2148
2167
|
}
|
|
2149
2168
|
}, l = (u) => {
|
|
2150
|
-
|
|
2169
|
+
r.classList.remove("ui-prop__col-rotulo--arrastando");
|
|
2151
2170
|
try {
|
|
2152
|
-
|
|
2171
|
+
r.hasPointerCapture(u.pointerId) && r.releasePointerCapture(u.pointerId);
|
|
2153
2172
|
} catch {
|
|
2154
2173
|
}
|
|
2155
|
-
|
|
2174
|
+
r.removeEventListener("pointermove", c), r.removeEventListener("pointerup", l), r.removeEventListener("pointercancel", l);
|
|
2156
2175
|
};
|
|
2157
|
-
|
|
2176
|
+
r.addEventListener("pointermove", c), r.addEventListener("pointerup", l), r.addEventListener("pointercancel", l);
|
|
2158
2177
|
});
|
|
2159
2178
|
}
|
|
2160
|
-
const
|
|
2161
|
-
function
|
|
2179
|
+
const re = 300, kt = 480, B = /* @__PURE__ */ new WeakMap();
|
|
2180
|
+
function zt(r) {
|
|
2162
2181
|
var i, o, a;
|
|
2163
|
-
const
|
|
2164
|
-
if (
|
|
2165
|
-
const n =
|
|
2166
|
-
n.flutuante = { left: e.left, top: e.top, width: e.width, height: e.height },
|
|
2182
|
+
const t = r.hasAttribute("flutuante"), e = r.style;
|
|
2183
|
+
if (t) {
|
|
2184
|
+
const n = B.get(r) ?? { acoplado: { width: "", height: "" } };
|
|
2185
|
+
n.flutuante = { left: e.left, top: e.top, width: e.width, height: e.height }, B.set(r, n), r.removeAttribute("flutuante"), e.left = "", e.top = "", e.right = "", e.bottom = "", e.position = "", e.zIndex = "", e.width = n.acoplado.width, e.height = n.acoplado.height;
|
|
2167
2186
|
} else {
|
|
2168
2187
|
const n = {
|
|
2169
2188
|
acoplado: { width: e.width, height: e.height },
|
|
2170
|
-
flutuante: (i =
|
|
2189
|
+
flutuante: (i = B.get(r)) == null ? void 0 : i.flutuante
|
|
2171
2190
|
};
|
|
2172
|
-
if (
|
|
2191
|
+
if (B.set(r, n), r.setAttribute("flutuante", ""), e.position = "fixed", (o = n.flutuante) != null && o.left || (a = n.flutuante) != null && a.top)
|
|
2173
2192
|
e.left = n.flutuante.left, e.top = n.flutuante.top, e.width = n.flutuante.width, e.height = n.flutuante.height;
|
|
2174
2193
|
else if (!e.left && !e.top) {
|
|
2175
2194
|
const s = Math.max(
|
|
2176
2195
|
20,
|
|
2177
|
-
(typeof window < "u" ? window.innerWidth : 1024) -
|
|
2196
|
+
(typeof window < "u" ? window.innerWidth : 1024) - re - 30
|
|
2178
2197
|
);
|
|
2179
|
-
e.left = `${s}px`, e.top = "70px", e.width = `${
|
|
2198
|
+
e.left = `${s}px`, e.top = "70px", e.width = `${re}px`, e.height = `${kt}px`;
|
|
2180
2199
|
}
|
|
2181
2200
|
}
|
|
2182
|
-
return !
|
|
2201
|
+
return !t;
|
|
2183
2202
|
}
|
|
2184
|
-
function
|
|
2185
|
-
const i =
|
|
2203
|
+
function St(r, t, e) {
|
|
2204
|
+
const i = t.getElementById("header");
|
|
2186
2205
|
if (i) {
|
|
2187
2206
|
let a = null, n = 0, s = 0, d = 0, c = 0;
|
|
2188
2207
|
const l = (p) => {
|
|
2189
2208
|
if (a === null) return;
|
|
2190
2209
|
const h = p.clientX - n, m = p.clientY - s;
|
|
2191
|
-
let x = d + h,
|
|
2192
|
-
const
|
|
2193
|
-
x = Math.max(0, Math.min(
|
|
2210
|
+
let x = d + h, f = c + m;
|
|
2211
|
+
const g = Math.max(0, (typeof window < "u" ? window.innerWidth : 1024) - r.offsetWidth), _ = Math.max(0, (typeof window < "u" ? window.innerHeight : 768) - 30);
|
|
2212
|
+
x = Math.max(0, Math.min(g, x)), f = Math.max(0, Math.min(_, f)), r.style.left = `${x}px`, r.style.top = `${f}px`, r.style.right = "auto", r.style.bottom = "auto";
|
|
2194
2213
|
}, u = (p) => {
|
|
2195
2214
|
if (a !== null) {
|
|
2196
2215
|
try {
|
|
2197
2216
|
i.releasePointerCapture(p.pointerId);
|
|
2198
2217
|
} catch {
|
|
2199
2218
|
}
|
|
2200
|
-
i.removeEventListener("pointermove", l), i.removeEventListener("pointerup", u), i.removeEventListener("pointercancel", u), a = null,
|
|
2219
|
+
i.removeEventListener("pointermove", l), i.removeEventListener("pointerup", u), i.removeEventListener("pointercancel", u), a = null, r.classList.remove("arrastando"), r.dispatchEvent(new CustomEvent("ui-mover", {
|
|
2201
2220
|
bubbles: !0,
|
|
2202
2221
|
composed: !0,
|
|
2203
|
-
detail: { left:
|
|
2222
|
+
detail: { left: r.style.left, top: r.style.top }
|
|
2204
2223
|
}));
|
|
2205
2224
|
}
|
|
2206
2225
|
};
|
|
2207
2226
|
e.add(i, "pointerdown", (p) => {
|
|
2208
|
-
if (!
|
|
2227
|
+
if (!r.hasAttribute("flutuante") || p.target.closest("button, input, select, a") || p.button !== 0) return;
|
|
2209
2228
|
p.preventDefault(), a = p.pointerId, n = p.clientX, s = p.clientY;
|
|
2210
|
-
const m =
|
|
2211
|
-
d = m.left, c = m.top,
|
|
2229
|
+
const m = r.getBoundingClientRect();
|
|
2230
|
+
d = m.left, c = m.top, r.classList.add("arrastando");
|
|
2212
2231
|
try {
|
|
2213
2232
|
i.setPointerCapture(p.pointerId);
|
|
2214
2233
|
} catch {
|
|
@@ -2216,30 +2235,30 @@ function xt(t, r, e) {
|
|
|
2216
2235
|
i.addEventListener("pointermove", l), i.addEventListener("pointerup", u), i.addEventListener("pointercancel", u);
|
|
2217
2236
|
});
|
|
2218
2237
|
}
|
|
2219
|
-
const o =
|
|
2238
|
+
const o = t.getElementById("resizer-canto");
|
|
2220
2239
|
if (o) {
|
|
2221
2240
|
let a = null, n = 0, s = 0, d = 0, c = 0;
|
|
2222
2241
|
const l = (p) => {
|
|
2223
2242
|
if (a === null) return;
|
|
2224
2243
|
const h = Math.max(200, n + (p.clientX - d)), m = Math.max(180, s + (p.clientY - c));
|
|
2225
|
-
|
|
2244
|
+
r.style.width = `${h}px`, r.style.height = `${m}px`;
|
|
2226
2245
|
}, u = (p) => {
|
|
2227
2246
|
if (a !== null) {
|
|
2228
2247
|
try {
|
|
2229
2248
|
o.releasePointerCapture(p.pointerId);
|
|
2230
2249
|
} catch {
|
|
2231
2250
|
}
|
|
2232
|
-
o.removeEventListener("pointermove", l), o.removeEventListener("pointerup", u), o.removeEventListener("pointercancel", u), a = null,
|
|
2251
|
+
o.removeEventListener("pointermove", l), o.removeEventListener("pointerup", u), o.removeEventListener("pointercancel", u), a = null, r.dispatchEvent(new CustomEvent("ui-redimensionar", {
|
|
2233
2252
|
bubbles: !0,
|
|
2234
2253
|
composed: !0,
|
|
2235
|
-
detail: { width:
|
|
2254
|
+
detail: { width: r.style.width, height: r.style.height }
|
|
2236
2255
|
}));
|
|
2237
2256
|
}
|
|
2238
2257
|
};
|
|
2239
2258
|
e.add(o, "pointerdown", (p) => {
|
|
2240
|
-
if (!
|
|
2259
|
+
if (!r.hasAttribute("flutuante") || p.button !== 0) return;
|
|
2241
2260
|
p.preventDefault(), p.stopPropagation(), a = p.pointerId, d = p.clientX, c = p.clientY;
|
|
2242
|
-
const h =
|
|
2261
|
+
const h = r.getBoundingClientRect();
|
|
2243
2262
|
n = h.width, s = h.height;
|
|
2244
2263
|
try {
|
|
2245
2264
|
o.setPointerCapture(p.pointerId);
|
|
@@ -2249,12 +2268,12 @@ function xt(t, r, e) {
|
|
|
2249
2268
|
});
|
|
2250
2269
|
}
|
|
2251
2270
|
}
|
|
2252
|
-
function
|
|
2253
|
-
return
|
|
2271
|
+
function Lt(r) {
|
|
2272
|
+
return r === "compacta" ? "ultracompacta" : r === "ultracompacta" ? "padrao" : "compacta";
|
|
2254
2273
|
}
|
|
2255
|
-
function
|
|
2274
|
+
function Mt(r) {
|
|
2256
2275
|
const {
|
|
2257
|
-
shadow:
|
|
2276
|
+
shadow: t,
|
|
2258
2277
|
listeners: e,
|
|
2259
2278
|
host: i,
|
|
2260
2279
|
onToggleExpandirTodas: o,
|
|
@@ -2264,69 +2283,69 @@ function _t(t) {
|
|
|
2264
2283
|
onAlternarDensidade: d,
|
|
2265
2284
|
onAlternarFlutuante: c,
|
|
2266
2285
|
onAlternarColapsoHorizontal: l
|
|
2267
|
-
} =
|
|
2286
|
+
} = r, u = t.getElementById("btn-flutuante");
|
|
2268
2287
|
u && c && e.add(u, "click", c);
|
|
2269
|
-
const p =
|
|
2288
|
+
const p = t.getElementById("btn-colapsar-horizontal");
|
|
2270
2289
|
p && l && e.add(p, "click", l);
|
|
2271
|
-
const h =
|
|
2290
|
+
const h = t.getElementById("faixa-estreita");
|
|
2272
2291
|
h && l && e.add(h, "click", l);
|
|
2273
|
-
const m =
|
|
2292
|
+
const m = t.getElementById("btn-expandir-faixa");
|
|
2274
2293
|
m && l && e.add(m, "click", (v) => {
|
|
2275
2294
|
v.stopPropagation(), l();
|
|
2276
2295
|
});
|
|
2277
|
-
const x =
|
|
2296
|
+
const x = t.getElementById("btn-densidade");
|
|
2278
2297
|
x && d && e.add(x, "click", d);
|
|
2279
|
-
const
|
|
2280
|
-
|
|
2281
|
-
const
|
|
2282
|
-
|
|
2298
|
+
const f = t.getElementById("btn-expandir-tudo");
|
|
2299
|
+
f && e.add(f, "click", o);
|
|
2300
|
+
const g = t.getElementById("btn-fechar");
|
|
2301
|
+
g && e.add(g, "click", () => {
|
|
2283
2302
|
i.dispatchEvent(new CustomEvent("ui-fechar", { bubbles: !0, composed: !0 }));
|
|
2284
2303
|
});
|
|
2285
|
-
const _ =
|
|
2304
|
+
const _ = t.getElementById("filtro-input");
|
|
2286
2305
|
_ && e.add(_, "input", () => {
|
|
2287
2306
|
const v = (_.value || "").trim().toLowerCase();
|
|
2288
2307
|
a(v);
|
|
2289
2308
|
});
|
|
2290
|
-
const y =
|
|
2309
|
+
const y = t.getElementById("btn-aplicar");
|
|
2291
2310
|
y && e.add(y, "click", n);
|
|
2292
|
-
const A =
|
|
2311
|
+
const A = t.getElementById("btn-desfazer");
|
|
2293
2312
|
A && e.add(A, "click", s);
|
|
2294
|
-
const w =
|
|
2313
|
+
const w = t.getElementById("link-ajuda");
|
|
2295
2314
|
w && e.add(w, "click", (v) => {
|
|
2296
2315
|
v.preventDefault(), i.dispatchEvent(new CustomEvent("ui-ajuda", { bubbles: !0, composed: !0 }));
|
|
2297
2316
|
});
|
|
2298
2317
|
}
|
|
2299
|
-
function M(
|
|
2300
|
-
const e =
|
|
2301
|
-
e && (e.textContent =
|
|
2302
|
-
const i =
|
|
2303
|
-
i && (i.style.display =
|
|
2304
|
-
const o =
|
|
2318
|
+
function M(r, t) {
|
|
2319
|
+
const e = r.getElementById("header-titulo-texto");
|
|
2320
|
+
e && (e.textContent = t.getAttribute("titulo") || "Propriedades");
|
|
2321
|
+
const i = r.getElementById("btn-fechar");
|
|
2322
|
+
i && (i.style.display = t.hasAttribute("fechavel") ? "inline-flex" : "none");
|
|
2323
|
+
const o = r.getElementById("btn-flutuante");
|
|
2305
2324
|
if (o) {
|
|
2306
|
-
const c =
|
|
2325
|
+
const c = t.hasAttribute("flutuante");
|
|
2307
2326
|
o.title = c ? "Acoplar painel (Dock)" : "Desacoplar / Modo flutuante (CAD)", o.classList.toggle("ui-prop__btn-icone--ativo", c);
|
|
2308
2327
|
}
|
|
2309
|
-
const a =
|
|
2328
|
+
const a = r.getElementById("btn-colapsar-horizontal");
|
|
2310
2329
|
if (a) {
|
|
2311
|
-
const c =
|
|
2330
|
+
const c = t.hasAttribute("colapsado");
|
|
2312
2331
|
a.title = c ? "Expandir painel" : "Recolher para coluna estreita", a.classList.toggle("ui-prop__btn-icone--ativo", c);
|
|
2313
2332
|
}
|
|
2314
|
-
const n =
|
|
2333
|
+
const n = r.getElementById("btn-densidade");
|
|
2315
2334
|
if (n) {
|
|
2316
|
-
const c =
|
|
2335
|
+
const c = t.getAttribute("densidade") || "padrão";
|
|
2317
2336
|
n.title = `Compressão vertical: ${c} (clique para alternar)`;
|
|
2318
2337
|
}
|
|
2319
|
-
const s =
|
|
2320
|
-
s && (s.style.display =
|
|
2321
|
-
const d =
|
|
2322
|
-
d && (d.style.display =
|
|
2338
|
+
const s = r.getElementById("filtro-container");
|
|
2339
|
+
s && (s.style.display = t.hasAttribute("filtro") ? "flex" : "none");
|
|
2340
|
+
const d = r.getElementById("footer");
|
|
2341
|
+
d && (d.style.display = t.getAttribute("modo-aplicar") === "manual" ? "flex" : "none");
|
|
2323
2342
|
}
|
|
2324
|
-
class
|
|
2343
|
+
class Nt extends oe {
|
|
2325
2344
|
constructor() {
|
|
2326
2345
|
super();
|
|
2327
2346
|
b(this, "shadow");
|
|
2328
|
-
b(this, "listeners", new
|
|
2329
|
-
b(this, "splitterListeners", new
|
|
2347
|
+
b(this, "listeners", new I());
|
|
2348
|
+
b(this, "splitterListeners", new I());
|
|
2330
2349
|
b(this, "controladorSplitter");
|
|
2331
2350
|
b(this, "gerenciadorValores");
|
|
2332
2351
|
b(this, "_categorias", []);
|
|
@@ -2339,16 +2358,16 @@ class Et extends re {
|
|
|
2339
2358
|
b(this, "btnAplicarElement");
|
|
2340
2359
|
b(this, "btnDesfazerElement");
|
|
2341
2360
|
b(this, "splitterElement");
|
|
2342
|
-
this.shadow = this.attachShadow({ mode: "open" }), this.shadow.innerHTML =
|
|
2361
|
+
this.shadow = this.attachShadow({ mode: "open" }), this.shadow.innerHTML = Et(), this.tipoContainerElement = this.shadow.getElementById("tipo-container"), this.corpoElement = this.shadow.getElementById("corpo"), this.btnAplicarElement = this.shadow.getElementById("btn-aplicar"), this.btnDesfazerElement = this.shadow.getElementById("btn-desfazer"), this.splitterElement = this.shadow.getElementById("splitter"), this.gerenciadorValores = new yt({
|
|
2343
2362
|
hostElement: this,
|
|
2344
2363
|
getCategorias: () => this._categorias,
|
|
2345
2364
|
onAtualizarBotoesFooter: (e) => {
|
|
2346
2365
|
this.btnAplicarElement.disabled = !e, this.btnDesfazerElement.disabled = !e;
|
|
2347
2366
|
},
|
|
2348
|
-
onAtualizarCampoVisual: (e, i) =>
|
|
2367
|
+
onAtualizarCampoVisual: (e, i) => te(this.shadow, e, i),
|
|
2349
2368
|
onRenderCategorias: () => this.renderCategorias(),
|
|
2350
2369
|
isModoManual: () => this.getAttribute("modo-aplicar") === "manual"
|
|
2351
|
-
}), this.controladorSplitter =
|
|
2370
|
+
}), this.controladorSplitter = vt({
|
|
2352
2371
|
hostElement: this,
|
|
2353
2372
|
corpoElement: this.corpoElement,
|
|
2354
2373
|
splitterElement: this.splitterElement,
|
|
@@ -2375,7 +2394,7 @@ class Et extends re {
|
|
|
2375
2394
|
return this._larguraRotuloPorcentagem;
|
|
2376
2395
|
}
|
|
2377
2396
|
connectedCallback() {
|
|
2378
|
-
this.listeners.cleanup(),
|
|
2397
|
+
this.listeners.cleanup(), Mt({
|
|
2379
2398
|
shadow: this.shadow,
|
|
2380
2399
|
listeners: this.listeners,
|
|
2381
2400
|
host: this,
|
|
@@ -2388,7 +2407,7 @@ class Et extends re {
|
|
|
2388
2407
|
onAlternarDensidade: () => this.alternarDensidade(),
|
|
2389
2408
|
onAlternarFlutuante: () => this.alternarFlutuante(),
|
|
2390
2409
|
onAlternarColapsoHorizontal: () => this.alternarColapsoHorizontal()
|
|
2391
|
-
}),
|
|
2410
|
+
}), St(this, this.shadow, this.listeners), this.controladorSplitter.init(), this.syncState();
|
|
2392
2411
|
}
|
|
2393
2412
|
disconnectedCallback() {
|
|
2394
2413
|
this.listeners.cleanup(), this.splitterListeners.cleanup();
|
|
@@ -2462,13 +2481,13 @@ class Et extends re {
|
|
|
2462
2481
|
this.gerenciadorValores.desfazer();
|
|
2463
2482
|
}
|
|
2464
2483
|
expandirTudo() {
|
|
2465
|
-
|
|
2484
|
+
it(this.shadow, this._categorias);
|
|
2466
2485
|
}
|
|
2467
2486
|
colapsarTudo() {
|
|
2468
|
-
|
|
2487
|
+
ot(this.shadow, this._categorias);
|
|
2469
2488
|
}
|
|
2470
2489
|
toggleCategoria(e) {
|
|
2471
|
-
|
|
2490
|
+
at(this.shadow, this, this._categorias, e);
|
|
2472
2491
|
}
|
|
2473
2492
|
get densidade() {
|
|
2474
2493
|
return this.getAttribute("densidade") || "padrao";
|
|
@@ -2477,7 +2496,7 @@ class Et extends re {
|
|
|
2477
2496
|
!e || e === "padrao" ? this.removeAttribute("densidade") : this.setAttribute("densidade", e);
|
|
2478
2497
|
}
|
|
2479
2498
|
alternarDensidade() {
|
|
2480
|
-
const e =
|
|
2499
|
+
const e = Lt(this.getAttribute("densidade") || "padrao");
|
|
2481
2500
|
return e === "padrao" ? this.removeAttribute("densidade") : this.setAttribute("densidade", e), this.dispatchEvent(
|
|
2482
2501
|
new CustomEvent("ui-densidade-alterada", {
|
|
2483
2502
|
bubbles: !0,
|
|
@@ -2499,7 +2518,7 @@ class Et extends re {
|
|
|
2499
2518
|
!!e !== this.hasAttribute("colapsado") && this.alternarColapsoHorizontal();
|
|
2500
2519
|
}
|
|
2501
2520
|
alternarFlutuante() {
|
|
2502
|
-
const e =
|
|
2521
|
+
const e = zt(this);
|
|
2503
2522
|
return M(this.shadow, this), this.dispatchEvent(new CustomEvent("ui-flutuante-alterado", {
|
|
2504
2523
|
bubbles: !0,
|
|
2505
2524
|
composed: !0,
|
|
@@ -2535,7 +2554,7 @@ class Et extends re {
|
|
|
2535
2554
|
this._categorias.some((i) => i.aberto === !1) ? this.expandirTudo() : this.colapsarTudo();
|
|
2536
2555
|
}
|
|
2537
2556
|
renderSeletorTipos() {
|
|
2538
|
-
|
|
2557
|
+
xt({
|
|
2539
2558
|
tipoContainerElement: this.tipoContainerElement,
|
|
2540
2559
|
tipos: this._tipos,
|
|
2541
2560
|
tipoSelecionadoId: this._tipoSelecionadoId,
|
|
@@ -2553,7 +2572,7 @@ class Et extends re {
|
|
|
2553
2572
|
}
|
|
2554
2573
|
renderCategorias() {
|
|
2555
2574
|
const e = this.shadow.getElementById("lista-categorias");
|
|
2556
|
-
e &&
|
|
2575
|
+
e && wt({
|
|
2557
2576
|
listaContainer: e,
|
|
2558
2577
|
categorias: this._categorias,
|
|
2559
2578
|
termoBusca: this._termoBusca,
|
|
@@ -2561,13 +2580,13 @@ class Et extends re {
|
|
|
2561
2580
|
linhaCtx: {
|
|
2562
2581
|
valoresAtuais: this.gerenciadorValores.getValores(),
|
|
2563
2582
|
valoresOriginais: this.gerenciadorValores.getValoresOriginais(),
|
|
2564
|
-
onAtualizarCampoVisual: (i, o) =>
|
|
2583
|
+
onAtualizarCampoVisual: (i, o) => te(this.shadow, i, o),
|
|
2565
2584
|
editorCtx: {
|
|
2566
2585
|
obterValorAtual: (i) => this.gerenciadorValores.obterValor(i),
|
|
2567
2586
|
registrarAlteracao: (i, o, a) => {
|
|
2568
2587
|
this.gerenciadorValores.registrarAlteracao(i, o, a);
|
|
2569
2588
|
},
|
|
2570
|
-
focarProximoEditor: (i) =>
|
|
2589
|
+
focarProximoEditor: (i) => rt(this.shadow, i),
|
|
2571
2590
|
despacharEventoAcao: (i, o) => {
|
|
2572
2591
|
this.dispatchEvent(
|
|
2573
2592
|
new CustomEvent("ui-acao-clique", {
|
|
@@ -2582,67 +2601,67 @@ class Et extends re {
|
|
|
2582
2601
|
});
|
|
2583
2602
|
}
|
|
2584
2603
|
}
|
|
2585
|
-
|
|
2604
|
+
ie("ui-tabela-propriedades", Nt);
|
|
2586
2605
|
export {
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2606
|
+
Te as $,
|
|
2607
|
+
Ct as A,
|
|
2608
|
+
Ve as B,
|
|
2609
|
+
He as C,
|
|
2610
|
+
Ie as D,
|
|
2611
|
+
Fe as E,
|
|
2612
|
+
Oe as F,
|
|
2613
|
+
yt as G,
|
|
2614
|
+
it as H,
|
|
2615
|
+
rt as I,
|
|
2616
|
+
ae as J,
|
|
2617
|
+
ne as K,
|
|
2599
2618
|
K as L,
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2619
|
+
se as M,
|
|
2620
|
+
qe as N,
|
|
2621
|
+
Re as O,
|
|
2603
2622
|
Y as P,
|
|
2604
2623
|
$ as Q,
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2624
|
+
_e as R,
|
|
2625
|
+
Se as S,
|
|
2626
|
+
ke as T,
|
|
2627
|
+
Je as U,
|
|
2609
2628
|
V,
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2629
|
+
$e as W,
|
|
2630
|
+
Lt as X,
|
|
2631
|
+
De as Y,
|
|
2613
2632
|
k as Z,
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2633
|
+
wt as _,
|
|
2634
|
+
ge as a,
|
|
2635
|
+
Le as a0,
|
|
2636
|
+
xt as a1,
|
|
2637
|
+
le as a2,
|
|
2619
2638
|
M as a3,
|
|
2620
2639
|
z as a4,
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2640
|
+
je as a5,
|
|
2641
|
+
O as a6,
|
|
2642
|
+
Ee as b,
|
|
2643
|
+
Nt as c,
|
|
2644
|
+
Pe as d,
|
|
2645
|
+
at as e,
|
|
2646
|
+
ye as f,
|
|
2647
|
+
zt as g,
|
|
2648
|
+
Ae as h,
|
|
2649
|
+
te as i,
|
|
2650
|
+
ee as j,
|
|
2651
|
+
de as k,
|
|
2652
|
+
ot as l,
|
|
2653
|
+
St as m,
|
|
2654
|
+
Mt as n,
|
|
2655
|
+
vt as o,
|
|
2656
|
+
dt as p,
|
|
2657
|
+
st as q,
|
|
2658
|
+
bt as r,
|
|
2659
|
+
ft as s,
|
|
2660
|
+
pt as t,
|
|
2661
|
+
ht as u,
|
|
2662
|
+
ct as v,
|
|
2663
|
+
nt as w,
|
|
2664
|
+
lt as x,
|
|
2665
|
+
ut as y,
|
|
2666
|
+
gt as z
|
|
2648
2667
|
};
|