@thibezer/ui-components-kit 1.0.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/LICENSE +21 -0
- package/README.md +624 -0
- package/dist/botao.cjs +1 -0
- package/dist/botao.d.ts +8 -0
- package/dist/botao.js +6 -0
- package/dist/camadas.cjs +296 -0
- package/dist/camadas.d.ts +14 -0
- package/dist/camadas.js +1857 -0
- package/dist/campo-texto.cjs +1 -0
- package/dist/campo-texto.d.ts +8 -0
- package/dist/campo-texto.js +11 -0
- package/dist/canvas.cjs +254 -0
- package/dist/canvas.d.ts +8 -0
- package/dist/canvas.js +3082 -0
- package/dist/card.cjs +1 -0
- package/dist/card.d.ts +7 -0
- package/dist/card.js +5 -0
- package/dist/components/ui-alerta/index.d.ts +2 -0
- package/dist/components/ui-alerta/ui-alerta-base.d.ts +23 -0
- package/dist/components/ui-alerta/ui-alerta.d.ts +2 -0
- package/dist/components/ui-alerta/ui-toast.d.ts +34 -0
- package/dist/components/ui-avatar/index.d.ts +1 -0
- package/dist/components/ui-avatar/ui-avatar.d.ts +12 -0
- package/dist/components/ui-badge/index.d.ts +1 -0
- package/dist/components/ui-badge/ui-badge.d.ts +20 -0
- package/dist/components/ui-barra-ferramentas/ferramentas-comum.d.ts +22 -0
- package/dist/components/ui-barra-ferramentas/ferramentas-icones.d.ts +24 -0
- package/dist/components/ui-barra-ferramentas/index.d.ts +4 -0
- package/dist/components/ui-barra-ferramentas/tipos.d.ts +55 -0
- package/dist/components/ui-barra-ferramentas/ui-paleta-ferramentas.d.ts +54 -0
- package/dist/components/ui-barra-ferramentas/ui-ribbon.d.ts +52 -0
- package/dist/components/ui-botao/index.d.ts +1 -0
- package/dist/components/ui-botao/ui-botao.d.ts +26 -0
- package/dist/components/ui-camadas/camadas-arvore-renderer.d.ts +18 -0
- package/dist/components/ui-camadas/camadas-drag-drop.d.ts +18 -0
- package/dist/components/ui-camadas/camadas-eventos-arvore.d.ts +2 -0
- package/dist/components/ui-camadas/camadas-eventos-camadas.d.ts +2 -0
- package/dist/components/ui-camadas/camadas-eventos-rodape.d.ts +2 -0
- package/dist/components/ui-camadas/camadas-host.d.ts +23 -0
- package/dist/components/ui-camadas/camadas-icones.d.ts +23 -0
- package/dist/components/ui-camadas/camadas-mapas-base.d.ts +3 -0
- package/dist/components/ui-camadas/camadas-metricas.d.ts +17 -0
- package/dist/components/ui-camadas/camadas-persistencia.d.ts +65 -0
- package/dist/components/ui-camadas/camadas-resizer.d.ts +16 -0
- package/dist/components/ui-camadas/camadas-rodape.d.ts +2 -0
- package/dist/components/ui-camadas/camadas-selecao.d.ts +24 -0
- package/dist/components/ui-camadas/camadas-sincronizacao-dom.d.ts +3 -0
- package/dist/components/ui-camadas/camadas-teclado.d.ts +3 -0
- package/dist/components/ui-camadas/camadas-utils.d.ts +26 -0
- package/dist/components/ui-camadas/index.d.ts +11 -0
- package/dist/components/ui-camadas/tipos.d.ts +116 -0
- package/dist/components/ui-camadas/ui-camadas.d.ts +112 -0
- package/dist/components/ui-campo-texto/campo-texto-estados.d.ts +12 -0
- package/dist/components/ui-campo-texto/campo-texto-template.d.ts +2 -0
- package/dist/components/ui-campo-texto/index.d.ts +1 -0
- package/dist/components/ui-campo-texto/ui-campo-texto.d.ts +57 -0
- package/dist/components/ui-canvas-cad/cad-atributos-sync.d.ts +13 -0
- package/dist/components/ui-canvas-cad/cad-broadcast.d.ts +19 -0
- package/dist/components/ui-canvas-cad/cad-colecoes-dados.d.ts +46 -0
- package/dist/components/ui-canvas-cad/cad-eventos-canvas.d.ts +26 -0
- package/dist/components/ui-canvas-cad/cad-inicializador.d.ts +19 -0
- package/dist/components/ui-canvas-cad/cad-painel-camadas.d.ts +9 -0
- package/dist/components/ui-canvas-cad/cad-tamanho-observer.d.ts +7 -0
- package/dist/components/ui-canvas-cad/cad-template.d.ts +1 -0
- package/dist/components/ui-canvas-cad/cad-toolbar-painel.d.ts +29 -0
- package/dist/components/ui-canvas-cad/index.d.ts +8 -0
- package/dist/components/ui-canvas-cad/ui-canvas-cad.d.ts +91 -0
- package/dist/components/ui-card/index.d.ts +1 -0
- package/dist/components/ui-card/ui-card.d.ts +18 -0
- package/dist/components/ui-checkbox/index.d.ts +1 -0
- package/dist/components/ui-checkbox/ui-checkbox.d.ts +36 -0
- package/dist/components/ui-drawer/drawer-acessibilidade.d.ts +16 -0
- package/dist/components/ui-drawer/index.d.ts +1 -0
- package/dist/components/ui-drawer/ui-drawer.d.ts +37 -0
- package/dist/components/ui-icone/index.d.ts +1 -0
- package/dist/components/ui-icone/ui-icone.d.ts +15 -0
- package/dist/components/ui-lista-flutuante/index.d.ts +1 -0
- package/dist/components/ui-lista-flutuante/lista-flutuante-posicionamento.d.ts +15 -0
- package/dist/components/ui-lista-flutuante/lista-flutuante-render.d.ts +9 -0
- package/dist/components/ui-lista-flutuante/lista-flutuante-teclado.d.ts +13 -0
- package/dist/components/ui-lista-flutuante/lista-flutuante-template.d.ts +2 -0
- package/dist/components/ui-lista-flutuante/tipos.d.ts +4 -0
- package/dist/components/ui-lista-flutuante/ui-lista-flutuante.d.ts +63 -0
- package/dist/components/ui-mapa/index.d.ts +3 -0
- package/dist/components/ui-mapa/ui-mapa-linha.d.ts +12 -0
- package/dist/components/ui-mapa/ui-mapa-marcador.d.ts +15 -0
- package/dist/components/ui-mapa/ui-mapa.d.ts +16 -0
- package/dist/components/ui-modal/index.d.ts +2 -0
- package/dist/components/ui-modal/modal-acessibilidade.d.ts +12 -0
- package/dist/components/ui-modal/ui-modal.d.ts +30 -0
- package/dist/components/ui-radio/index.d.ts +1 -0
- package/dist/components/ui-radio/radio-grupo-registry.d.ts +10 -0
- package/dist/components/ui-radio/ui-radio.d.ts +29 -0
- package/dist/components/ui-segmented/index.d.ts +1 -0
- package/dist/components/ui-segmented/segmented-indicador.d.ts +13 -0
- package/dist/components/ui-segmented/segmented-teclado.d.ts +4 -0
- package/dist/components/ui-segmented/segmented-template.d.ts +4 -0
- package/dist/components/ui-segmented/ui-segmented.d.ts +48 -0
- package/dist/components/ui-seletor-mapa-base/index.d.ts +2 -0
- package/dist/components/ui-seletor-mapa-base/tipos.d.ts +22 -0
- package/dist/components/ui-seletor-mapa-base/ui-seletor-mapa-base.d.ts +43 -0
- package/dist/components/ui-skeleton/index.d.ts +1 -0
- package/dist/components/ui-skeleton/ui-skeleton.d.ts +19 -0
- package/dist/components/ui-stat/index.d.ts +1 -0
- package/dist/components/ui-stat/ui-stat.d.ts +30 -0
- package/dist/components/ui-switch/index.d.ts +1 -0
- package/dist/components/ui-switch/ui-switch.d.ts +36 -0
- package/dist/components/ui-tabela/index.d.ts +7 -0
- package/dist/components/ui-tabela/tabela-atributos-sync.d.ts +14 -0
- package/dist/components/ui-tabela/tabela-corpo.d.ts +18 -0
- package/dist/components/ui-tabela/tabela-dom.d.ts +15 -0
- package/dist/components/ui-tabela/tabela-header.d.ts +18 -0
- package/dist/components/ui-tabela/tabela-interacao.d.ts +9 -0
- package/dist/components/ui-tabela/tabela-localizador.d.ts +4 -0
- package/dist/components/ui-tabela/tabela-ordenacao.d.ts +12 -0
- package/dist/components/ui-tabela/tabela-orquestrador-dados.d.ts +18 -0
- package/dist/components/ui-tabela/tabela-redimensionamento.d.ts +28 -0
- package/dist/components/ui-tabela/tabela-remota.d.ts +15 -0
- package/dist/components/ui-tabela/tabela-renderizador.d.ts +29 -0
- package/dist/components/ui-tabela/tabela-selecao.d.ts +24 -0
- package/dist/components/ui-tabela/tipos.d.ts +27 -0
- package/dist/components/ui-tabela/ui-tabela.d.ts +83 -0
- package/dist/components/ui-tabela-propriedades/avaliador-expressao.d.ts +6 -0
- package/dist/components/ui-tabela-propriedades/editores-basicos.d.ts +7 -0
- package/dist/components/ui-tabela-propriedades/editores-cad.d.ts +17 -0
- package/dist/components/ui-tabela-propriedades/index.d.ts +6 -0
- package/dist/components/ui-tabela-propriedades/propriedades-densidade.d.ts +5 -0
- package/dist/components/ui-tabela-propriedades/propriedades-dom-utils.d.ts +6 -0
- package/dist/components/ui-tabela-propriedades/propriedades-editores.d.ts +5 -0
- package/dist/components/ui-tabela-propriedades/propriedades-flutuante.d.ts +7 -0
- package/dist/components/ui-tabela-propriedades/propriedades-gerenciador-valores.d.ts +26 -0
- package/dist/components/ui-tabela-propriedades/propriedades-painel-controles.d.ts +15 -0
- package/dist/components/ui-tabela-propriedades/propriedades-render-arvore.d.ts +24 -0
- package/dist/components/ui-tabela-propriedades/propriedades-seletor-tipo.d.ts +13 -0
- package/dist/components/ui-tabela-propriedades/propriedades-splitter.d.ts +13 -0
- package/dist/components/ui-tabela-propriedades/propriedades-template.d.ts +1 -0
- package/dist/components/ui-tabela-propriedades/tipos.d.ts +48 -0
- package/dist/components/ui-tabela-propriedades/ui-tabela-propriedades.d.ts +66 -0
- package/dist/components/ui-texto/index.d.ts +1 -0
- package/dist/components/ui-texto/ui-texto.d.ts +15 -0
- package/dist/components/ui-tooltip/index.d.ts +1 -0
- package/dist/components/ui-tooltip/ui-tooltip.d.ts +25 -0
- package/dist/core/acessibilidade.d.ts +21 -0
- package/dist/core/form-associated-element.d.ts +33 -0
- package/dist/core/form-validacao.d.ts +34 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/leaflet-loader.d.ts +7 -0
- package/dist/core/leaflet-style.d.ts +7 -0
- package/dist/core/listener-bag.d.ts +21 -0
- package/dist/core/ssr-safe.d.ts +20 -0
- package/dist/core/ui-bus.d.ts +85 -0
- package/dist/core/zero-js-triggers.d.ts +1 -0
- package/dist/core.cjs +1 -0
- package/dist/core.js +22 -0
- package/dist/data.cjs +1 -0
- package/dist/data.d.ts +22 -0
- package/dist/data.js +63 -0
- package/dist/feedback.cjs +1 -0
- package/dist/feedback.d.ts +26 -0
- package/dist/feedback.js +25 -0
- package/dist/form-validacao-BIOXxt-1.js +140 -0
- package/dist/form-validacao-ytRYSF3E.cjs +1 -0
- package/dist/forms.cjs +1 -0
- package/dist/forms.d.ts +22 -0
- package/dist/forms.js +25 -0
- package/dist/gerencigeo-canvas/canvas_destaque.d.ts +13 -0
- package/dist/gerencigeo-canvas/canvas_destaque_marcadores.d.ts +8 -0
- package/dist/gerencigeo-canvas/canvas_interacao.d.ts +56 -0
- package/dist/gerencigeo-canvas/canvas_selecao_box.d.ts +23 -0
- package/dist/gerencigeo-canvas/controller_dados_ops.d.ts +15 -0
- package/dist/gerencigeo-canvas/index.d.ts +17 -0
- package/dist/gerencigeo-canvas/layer_defaults.d.ts +3 -0
- package/dist/gerencigeo-canvas/layer_instance_ops.d.ts +6 -0
- package/dist/gerencigeo-canvas/layer_manager.d.ts +37 -0
- package/dist/gerencigeo-canvas/layer_pane_ops.d.ts +8 -0
- package/dist/gerencigeo-canvas/layer_renderer_factory.d.ts +14 -0
- package/dist/gerencigeo-canvas/layer_state_ops.d.ts +6 -0
- package/dist/gerencigeo-canvas/mapa_config.d.ts +11 -0
- package/dist/gerencigeo-canvas/mapa_controller.d.ts +53 -0
- package/dist/gerencigeo-canvas/mapa_core.d.ts +30 -0
- package/dist/gerencigeo-canvas/mapa_linhas.d.ts +14 -0
- package/dist/gerencigeo-canvas/mapa_marcadores.d.ts +18 -0
- package/dist/gerencigeo-canvas/mapa_pontos_shapes.d.ts +8 -0
- package/dist/gerencigeo-canvas/renderers/grid_renderer.d.ts +9 -0
- package/dist/gerencigeo-canvas/renderers/tile_renderer.d.ts +8 -0
- package/dist/gerencigeo-canvas/renderers/vector_lines_builder.d.ts +4 -0
- package/dist/gerencigeo-canvas/renderers/vector_lines_renderer.d.ts +9 -0
- package/dist/gerencigeo-canvas/renderers/vector_points_renderer.d.ts +11 -0
- package/dist/gerencigeo-canvas/renderers/vector_polygons_renderer.d.ts +9 -0
- package/dist/gerencigeo-canvas/renderers/wms_renderer.d.ts +8 -0
- package/dist/gerencigeo-canvas/sigef_consultor.d.ts +9 -0
- package/dist/gerencigeo-canvas/tile_preloader.d.ts +2 -0
- package/dist/gerencigeo-canvas/types.d.ts +169 -0
- package/dist/gerencigeo-canvas/utils.d.ts +46 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +116 -0
- package/dist/index.js +186 -0
- package/dist/leaflet-Cw6tqYFh.cjs +1 -0
- package/dist/leaflet-DkaFZYc5.js +69 -0
- package/dist/leaflet-loader-94z5VsdY.cjs +2 -0
- package/dist/leaflet-loader-Cjcdgj5R.js +21 -0
- package/dist/listener-bag-D5omxZ9h.cjs +1 -0
- package/dist/listener-bag-DQgv7OON.js +34 -0
- package/dist/mapa.cjs +19 -0
- package/dist/mapa.d.ts +11 -0
- package/dist/mapa.js +264 -0
- package/dist/modal.cjs +1 -0
- package/dist/modal.d.ts +8 -0
- package/dist/modal.js +8 -0
- package/dist/register.cjs +1 -0
- package/dist/register.d.ts +7 -0
- package/dist/register.js +21 -0
- package/dist/seletor-mapa-base.cjs +53 -0
- package/dist/seletor-mapa-base.d.ts +8 -0
- package/dist/seletor-mapa-base.js +275 -0
- package/dist/ssr-safe-5cWfJP-s.js +10 -0
- package/dist/ssr-safe-CiHD1adl.cjs +1 -0
- package/dist/tabela.cjs +1 -0
- package/dist/tabela.d.ts +12 -0
- package/dist/tabela.js +56 -0
- package/dist/tools.cjs +1 -0
- package/dist/tools.d.ts +8 -0
- package/dist/tools.js +30 -0
- package/dist/ui-badge-92yelKls.js +183 -0
- package/dist/ui-badge-B95jSECC.cjs +28 -0
- package/dist/ui-botao-BShEouvi.js +124 -0
- package/dist/ui-botao-DF1yuUUD.cjs +12 -0
- package/dist/ui-campo-texto-BCh5HyCM.cjs +16 -0
- package/dist/ui-campo-texto-B_JF6POq.js +361 -0
- package/dist/ui-card-BJ8SmvVf.js +111 -0
- package/dist/ui-card-Bhm6k91e.cjs +20 -0
- package/dist/ui-kit.css +1 -0
- package/dist/ui-modal-Bi4isGYh.cjs +18 -0
- package/dist/ui-modal-DV-pw2x1.js +194 -0
- package/dist/ui-paleta-ferramentas-B6dJ0O6K.cjs +18 -0
- package/dist/ui-paleta-ferramentas-Bpp4XBVg.js +633 -0
- package/dist/ui-segmented-C8wuycjJ.js +411 -0
- package/dist/ui-segmented-NC5cBXLh.cjs +19 -0
- package/dist/ui-skeleton-B3xQyn0Z.js +396 -0
- package/dist/ui-skeleton-D42oQufF.cjs +33 -0
- package/dist/ui-switch-C6o4yZUF.cjs +53 -0
- package/dist/ui-switch-CO9MoS8x.js +826 -0
- package/dist/ui-tabela-propriedades-7yJ9g7ti.cjs +145 -0
- package/dist/ui-tabela-propriedades-D-XKNVwK.js +2078 -0
- package/dist/ui-toast-CQBqvUm3.cjs +20 -0
- package/dist/ui-toast-CwUmiqyG.js +156 -0
- package/dist/zero-js-triggers-DdESy0tk.js +205 -0
- package/dist/zero-js-triggers-QGD7FOTv.cjs +1 -0
- package/package.json +149 -0
|
@@ -0,0 +1,2078 @@
|
|
|
1
|
+
var R = Object.defineProperty;
|
|
2
|
+
var I = (t, o, e) => o in t ? R(t, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[o] = e;
|
|
3
|
+
var f = (t, o, e) => I(t, typeof o != "symbol" ? o + "" : o, e);
|
|
4
|
+
import { L as y } from "./listener-bag-DQgv7OON.js";
|
|
5
|
+
import { d as L, S as M } from "./ssr-safe-5cWfJP-s.js";
|
|
6
|
+
class H {
|
|
7
|
+
constructor(o) {
|
|
8
|
+
f(this, "autoFetchController", null);
|
|
9
|
+
this.ctx = o;
|
|
10
|
+
}
|
|
11
|
+
async carregar(o) {
|
|
12
|
+
if (!o) return;
|
|
13
|
+
this.autoFetchController && (this.autoFetchController.abort(), this.autoFetchController = null);
|
|
14
|
+
const e = new AbortController();
|
|
15
|
+
this.autoFetchController = e, this.ctx.onCarregandoAlterado(!0), this.ctx.host.dispatchEvent(
|
|
16
|
+
new CustomEvent("ui-fetch-start", {
|
|
17
|
+
bubbles: !0,
|
|
18
|
+
composed: !0,
|
|
19
|
+
detail: { url: o }
|
|
20
|
+
})
|
|
21
|
+
);
|
|
22
|
+
try {
|
|
23
|
+
const i = await fetch(o, { signal: e.signal });
|
|
24
|
+
if (!i.ok)
|
|
25
|
+
throw new Error(`HTTP ${i.status}: ${i.statusText}`);
|
|
26
|
+
const r = await i.json(), a = Array.isArray(r) ? r : r.dados || r.items || r.data || r.rows || [];
|
|
27
|
+
this.autoFetchController === e && (this.ctx.onDadosRecebidos(a), this.ctx.onCarregandoAlterado(!1), this.autoFetchController = null, this.ctx.host.dispatchEvent(
|
|
28
|
+
new CustomEvent("ui-fetch-sucesso", {
|
|
29
|
+
bubbles: !0,
|
|
30
|
+
composed: !0,
|
|
31
|
+
detail: { url: o, total: a.length, dados: a }
|
|
32
|
+
})
|
|
33
|
+
));
|
|
34
|
+
} catch (i) {
|
|
35
|
+
if (i.name === "AbortError")
|
|
36
|
+
return;
|
|
37
|
+
this.autoFetchController === e && (this.ctx.onCarregandoAlterado(!1), this.autoFetchController = null, console.error("[ui-tabela] Erro ao carregar dados remotos:", i), this.ctx.host.dispatchEvent(
|
|
38
|
+
new CustomEvent("ui-fetch-erro", {
|
|
39
|
+
bubbles: !0,
|
|
40
|
+
composed: !0,
|
|
41
|
+
detail: { url: o, erro: i.message || String(i) }
|
|
42
|
+
})
|
|
43
|
+
));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
abortar() {
|
|
47
|
+
this.autoFetchController && (this.autoFetchController.abort(), this.autoFetchController = null);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function P(t, o, e = "id") {
|
|
51
|
+
if (!t || t.length === 0) return -1;
|
|
52
|
+
if (typeof o == "function")
|
|
53
|
+
return t.findIndex(o);
|
|
54
|
+
const i = t.findIndex((r) => !r || typeof r != "object" ? !1 : r[e] !== void 0 && (r[e] === o || String(r[e]) === String(o)) || r.id !== void 0 && (r.id === o || String(r.id) === String(o)) || r._id !== void 0 && (r._id === o || String(r._id) === String(o)) || r.codigo !== void 0 && (r.codigo === o || String(r.codigo) === String(o)) || r.key !== void 0 && (r.key === o || String(r.key) === String(o)));
|
|
55
|
+
if (i !== -1)
|
|
56
|
+
return i;
|
|
57
|
+
if (typeof o == "number" && Number.isInteger(o)) {
|
|
58
|
+
if (o >= 0 && o < t.length)
|
|
59
|
+
return o;
|
|
60
|
+
} else if (typeof o == "string" && /^\d+$/.test(o.trim())) {
|
|
61
|
+
const r = parseInt(o.trim(), 10);
|
|
62
|
+
if (r >= 0 && r < t.length)
|
|
63
|
+
return r;
|
|
64
|
+
}
|
|
65
|
+
return -1;
|
|
66
|
+
}
|
|
67
|
+
class z {
|
|
68
|
+
constructor(o) {
|
|
69
|
+
f(this, "itemSelecionado", null);
|
|
70
|
+
f(this, "indiceSelecionado", null);
|
|
71
|
+
this.ctx = o;
|
|
72
|
+
}
|
|
73
|
+
getItemSelecionado() {
|
|
74
|
+
return this.itemSelecionado;
|
|
75
|
+
}
|
|
76
|
+
setItemSelecionado(o) {
|
|
77
|
+
this.itemSelecionado = o, this.indiceSelecionado = o ? this.ctx.dadosExibicao.indexOf(o) : null, this.atualizarLinhasSelecionadas();
|
|
78
|
+
}
|
|
79
|
+
getIndiceSelecionado() {
|
|
80
|
+
return this.indiceSelecionado;
|
|
81
|
+
}
|
|
82
|
+
setIndiceSelecionado(o) {
|
|
83
|
+
this.indiceSelecionado = o, this.itemSelecionado = o !== null && o >= 0 && o < this.ctx.dadosExibicao.length ? this.ctx.dadosExibicao[o] : null, this.atualizarLinhasSelecionadas();
|
|
84
|
+
}
|
|
85
|
+
limparSelecao() {
|
|
86
|
+
this.itemSelecionado = null, this.indiceSelecionado = null, this.atualizarLinhasSelecionadas();
|
|
87
|
+
}
|
|
88
|
+
isItemSelecionado(o, e) {
|
|
89
|
+
if (this.itemSelecionado) {
|
|
90
|
+
if (this.itemSelecionado === o) return !0;
|
|
91
|
+
const i = this.ctx.chaveId;
|
|
92
|
+
if (o[i] !== void 0 && this.itemSelecionado[i] !== void 0)
|
|
93
|
+
return String(o[i]) === String(this.itemSelecionado[i]);
|
|
94
|
+
if (o.id !== void 0 && this.itemSelecionado.id !== void 0)
|
|
95
|
+
return String(o.id) === String(this.itemSelecionado.id);
|
|
96
|
+
}
|
|
97
|
+
return this.indiceSelecionado !== null && this.indiceSelecionado === e;
|
|
98
|
+
}
|
|
99
|
+
atualizarLinhasSelecionadas() {
|
|
100
|
+
if (!this.ctx.tbodyElement) return;
|
|
101
|
+
this.ctx.tbodyElement.querySelectorAll("tr:not(.ui-tabela__virtual-spacer)").forEach((e) => {
|
|
102
|
+
const i = e.getAttribute("data-index"), r = i !== null ? parseInt(i, 10) : -1, a = r >= 0 ? this.ctx.dadosExibicao[r] : null, c = a ? this.isItemSelecionado(a, r) : !1;
|
|
103
|
+
e.classList.toggle("ui-tabela__tr--selecionada", c), c ? e.setAttribute("data-selecionada", "true") : e.removeAttribute("data-selecionada");
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
rolarPara(o, e) {
|
|
107
|
+
var l, u, d;
|
|
108
|
+
const i = P(this.ctx.dadosExibicao, o, this.ctx.chaveId);
|
|
109
|
+
if (i === -1)
|
|
110
|
+
return !1;
|
|
111
|
+
const r = this.ctx.dadosExibicao[i], a = (e == null ? void 0 : e.comportamento) || "smooth";
|
|
112
|
+
e != null && e.selecionar && (this.itemSelecionado = r, this.indiceSelecionado = i, this.atualizarLinhasSelecionadas(), this.ctx.host.dispatchEvent(
|
|
113
|
+
new CustomEvent("ui-linha-selecionada", {
|
|
114
|
+
bubbles: !0,
|
|
115
|
+
composed: !0,
|
|
116
|
+
detail: { item: r, indice: i }
|
|
117
|
+
})
|
|
118
|
+
));
|
|
119
|
+
const c = this.ctx.getRowHeight(), n = (l = this.ctx.tbodyElement) == null ? void 0 : l.querySelector(
|
|
120
|
+
`tr[data-index="${i}"]`
|
|
121
|
+
);
|
|
122
|
+
if (n && !n.classList.contains("ui-tabela__virtual-spacer"))
|
|
123
|
+
return this.ctx.containerElement && (typeof window.happyDOM < "u" || typeof process < "u" && ((u = process.env) == null ? void 0 : u.NODE_ENV) === "test") && (this.ctx.containerElement.scrollTop = i * c), typeof n.scrollIntoView == "function" && n.scrollIntoView({ behavior: a, block: "nearest" }), !0;
|
|
124
|
+
if (this.ctx.containerElement) {
|
|
125
|
+
const s = Math.max(0, i * c);
|
|
126
|
+
if (typeof this.ctx.containerElement.scrollTo == "function")
|
|
127
|
+
try {
|
|
128
|
+
this.ctx.containerElement.scrollTo({
|
|
129
|
+
top: s,
|
|
130
|
+
behavior: a
|
|
131
|
+
});
|
|
132
|
+
} catch {
|
|
133
|
+
this.ctx.containerElement.scrollTop = s;
|
|
134
|
+
}
|
|
135
|
+
else
|
|
136
|
+
this.ctx.containerElement.scrollTop = s;
|
|
137
|
+
return (a === "auto" || typeof window.happyDOM < "u" || typeof process < "u" && ((d = process.env) == null ? void 0 : d.NODE_ENV) === "test") && (this.ctx.containerElement.scrollTop = s, this.ctx.onRenderBody()), !0;
|
|
138
|
+
}
|
|
139
|
+
return !1;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function F(t, o, e) {
|
|
143
|
+
return t !== e ? {
|
|
144
|
+
idColuna: e,
|
|
145
|
+
direcao: "asc"
|
|
146
|
+
} : o === "asc" ? {
|
|
147
|
+
idColuna: e,
|
|
148
|
+
direcao: "desc"
|
|
149
|
+
} : o === "desc" ? {
|
|
150
|
+
idColuna: null,
|
|
151
|
+
direcao: "original"
|
|
152
|
+
} : {
|
|
153
|
+
idColuna: e,
|
|
154
|
+
direcao: "asc"
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
function O(t, o, e) {
|
|
158
|
+
if (!o || e === "original")
|
|
159
|
+
return [...t];
|
|
160
|
+
const i = e === "asc" ? 1 : -1;
|
|
161
|
+
return [...t].sort((r, a) => {
|
|
162
|
+
const c = r[o], n = a[o];
|
|
163
|
+
return c === n ? 0 : c == null ? 1 * i : n == null ? -1 * i : typeof c == "number" && typeof n == "number" ? (c - n) * i : String(c).localeCompare(String(n), "pt-BR", {
|
|
164
|
+
numeric: !0,
|
|
165
|
+
sensitivity: "base"
|
|
166
|
+
}) * i;
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
class V {
|
|
170
|
+
constructor() {
|
|
171
|
+
f(this, "dadosOriginais", []);
|
|
172
|
+
f(this, "dadosExibicao", []);
|
|
173
|
+
f(this, "colunaOrdenada", null);
|
|
174
|
+
f(this, "direcaoOrdenacao", "original");
|
|
175
|
+
f(this, "ultimoFiltro", "");
|
|
176
|
+
}
|
|
177
|
+
getDadosOriginais() {
|
|
178
|
+
return this.dadosOriginais;
|
|
179
|
+
}
|
|
180
|
+
setDadosOriginais(o) {
|
|
181
|
+
this.dadosOriginais = Array.isArray(o) ? [...o] : [], this.aplicarOrdenacao();
|
|
182
|
+
}
|
|
183
|
+
getDadosExibicao() {
|
|
184
|
+
return this.dadosExibicao;
|
|
185
|
+
}
|
|
186
|
+
getColunaOrdenada() {
|
|
187
|
+
return this.colunaOrdenada;
|
|
188
|
+
}
|
|
189
|
+
setColunaOrdenada(o) {
|
|
190
|
+
this.colunaOrdenada = o, o ? this.direcaoOrdenacao === "original" && (this.direcaoOrdenacao = "asc") : this.direcaoOrdenacao = "original", this.aplicarOrdenacao();
|
|
191
|
+
}
|
|
192
|
+
getDirecaoOrdenacao() {
|
|
193
|
+
return this.direcaoOrdenacao;
|
|
194
|
+
}
|
|
195
|
+
setDirecaoOrdenacao(o) {
|
|
196
|
+
this.direcaoOrdenacao = o || "original", this.direcaoOrdenacao === "original" && (this.colunaOrdenada = null), this.aplicarOrdenacao();
|
|
197
|
+
}
|
|
198
|
+
alternarOrdenacaoColuna(o) {
|
|
199
|
+
if (!o.ordenavel) return null;
|
|
200
|
+
const e = F(this.colunaOrdenada, this.direcaoOrdenacao, o.id);
|
|
201
|
+
return this.colunaOrdenada = e.idColuna, this.direcaoOrdenacao = e.direcao, this.aplicarOrdenacao(), e;
|
|
202
|
+
}
|
|
203
|
+
aplicarOrdenacao() {
|
|
204
|
+
this.dadosExibicao = O(
|
|
205
|
+
this.dadosOriginais,
|
|
206
|
+
this.colunaOrdenada,
|
|
207
|
+
this.direcaoOrdenacao
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
filtrar(o) {
|
|
211
|
+
if (this.ultimoFiltro = (o || "").trim().toLowerCase(), !this.ultimoFiltro) {
|
|
212
|
+
this.aplicarOrdenacao();
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
this.dadosExibicao = this.dadosOriginais.filter((e) => Object.values(e).some((i) => i == null ? !1 : String(i).toLowerCase().includes(this.ultimoFiltro)));
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
const q = ':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;touch-action:pan-x pan-y;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}.ui-tabela thead{position:sticky;top:0;z-index:10;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, #e1e1e6);font-weight:600;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__resizer{position:absolute;top:0;right:0;width:6px;height:100%;cursor:col-resize;-webkit-user-select:none;user-select:none;z-index:20;transition:background-color .15s ease}.ui-tabela__resizer:hover,.ui-tabela__resizer--ativo{background-color:var(--ui-cor-primaria, #00E08A)}: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}.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:90px;display:inline-flex;align-items:center}.ui-tabela__sort-icon,.ui-tabela__header-icon{width:70px;min-width:70px;max-width:70px;display:inline-flex;justify-content:center;align-items:center;transition:transform .2s ease,opacity .2s ease}.ui-tabela th.ui-tabela__th--ordenavel{cursor:pointer}.ui-tabela th.ui-tabela__th--ordenavel:hover{background-color:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08))}.ui-tabela__sort-arrow{display:inline-block;width:12px;height:12px;vertical-align:middle;shape-rendering:geometricPrecision;transition:transform .2s ease,fill .2s ease;fill:var(--ui-cor-primaria, #00E08A)}.ui-tabela__sort-arrow--desc{transform:rotate(180deg)}.ui-tabela__sort-arrow--inativo{opacity:.3;fill:var(--ui-cor-texto-secundario, #888899)}.ui-tabela td{padding:10px 16px;border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .06));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:nth-child(2n){background-color:var(--ui-cor-fundo-card, rgba(255, 255, 255, .02))}.ui-tabela tbody tr:hover{background-color:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08))}.ui-tabela tbody tr.ui-tabela__tr--selecionada,.ui-tabela tbody tr[data-selecionada=true]{background-color:#00e08a24!important;box-shadow:inset 3px 0 0 var(--ui-cor-primaria, #00E08A)}.ui-tabela tbody tr.ui-tabela__tr--selecionada:hover,.ui-tabela tbody tr[data-selecionada=true]:hover{background-color:#00e08a38!important}.ui-tabela__virtual-spacer td{padding:0!important;border:none!important;height:inherit;background:transparent!important}.ui-tabela__empty{padding:48px 24px;text-align:center;border:2px dashed var(--ui-cor-borda, rgba(255, 255, 255, .2));border-radius:var(--ui-raio-borda, 6px);margin:16px;color:var(--ui-cor-texto-secundario, #888899);background-color:var(--ui-cor-fundo, #0b0b0d);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, #888899)}.ui-tabela__loading{position:absolute;top:0;left:0;right:0;bottom:0;background-color:#0b0b0db3;-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-primaria, #00E08A);font-size:14px}.ui-tabela__spinner{width:32px;height:32px;border:3px solid rgba(255,255,255,.15);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__context-menu{position:absolute;z-index:var(--ui-z-popover, 1050);background-color:var(--ui-cor-fundo-elevado, #1a1a1e);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .2));border-radius:var(--ui-raio-borda, 6px);box-shadow:0 4px 20px #0009;padding:6px;display:flex;flex-direction:column;gap:4px;min-width:200px;font-size:13px;color:var(--ui-cor-texto, #e1e1e6)}.ui-tabela__context-item{padding:8px 12px;border-radius:4px;cursor:pointer;color:var(--ui-cor-texto, #e1e1e6);display:flex;align-items:center;justify-content:space-between;gap:8px;transition:background-color .15s ease}.ui-tabela__context-item:hover{background-color:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08));color:var(--ui-cor-primaria, #00E08A)}.ui-tabela__prompt-dialog{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:0 8px 32px #000c;font-family:inherit;font-size:14px}.ui-tabela__prompt-dialog::backdrop{background:#0000004d}.ui-tabela__prompt-title{margin-bottom:8px;font-weight:500}.ui-tabela__prompt-dialog input{width:100%;padding:6px 8px;border-radius: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:12px;box-sizing:border-box}.ui-tabela__prompt-actions{display:flex;justify-content:flex-end;gap:8px}.ui-tabela__prompt-actions button{background:var(--ui-cor-borda, rgba(255, 255, 255, .12));color:var(--ui-cor-texto, #e1e1e6);border:none;padding:6px 12px;border-radius:4px;cursor:pointer}.ui-tabela__prompt-actions button:last-child{background:var(--ui-cor-primaria, #00E08A);color:#000;font-weight:600}@media (max-width: 640px){.ui-tabela th{padding:8px 10px;font-size:12px}.ui-tabela td{padding:8px 10px;font-size:13px}.ui-tabela__header-text{margin-right:16px}.ui-tabela__sort-icon,.ui-tabela__header-icon{width:24px;min-width:24px;max-width:24px}.ui-tabela__resizer{width:14px}}';
|
|
219
|
+
function B(t) {
|
|
220
|
+
return t == null || t === "" ? "" : typeof t == "number" ? `${t}px` : t;
|
|
221
|
+
}
|
|
222
|
+
function N(t) {
|
|
223
|
+
return t === "centro" || t === "center" ? "ui-tabela--alinhar-centro" : t === "direita" || t === "right" ? "ui-tabela--alinhar-direita" : "ui-tabela--alinhar-esquerda";
|
|
224
|
+
}
|
|
225
|
+
function T(t) {
|
|
226
|
+
return t === "centro" || t === "center" ? "center" : t === "direita" || t === "right" ? "right" : "left";
|
|
227
|
+
}
|
|
228
|
+
function j(t) {
|
|
229
|
+
return t === "compacta" ? 30 : t === "relaxada" ? 56 : 42;
|
|
230
|
+
}
|
|
231
|
+
function $(t, o, e, i) {
|
|
232
|
+
t.innerHTML = `<style>${q}</style>`;
|
|
233
|
+
const r = document.createElement("div");
|
|
234
|
+
r.className = "ui-tabela-container", e && (r.style.maxHeight = e);
|
|
235
|
+
const a = document.createElement("div");
|
|
236
|
+
a.className = "ui-tabela__empty", a.style.display = "none";
|
|
237
|
+
const c = document.createElement("div");
|
|
238
|
+
c.innerHTML = `
|
|
239
|
+
<svg class="ui-tabela__empty-icon" viewBox="0 0 24 24">
|
|
240
|
+
<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"/>
|
|
241
|
+
</svg>`;
|
|
242
|
+
const n = document.createElement("span");
|
|
243
|
+
n.className = "ui-tabela__empty-text", n.textContent = o, a.appendChild(c), a.appendChild(n);
|
|
244
|
+
const l = document.createElement("table");
|
|
245
|
+
l.className = "ui-tabela";
|
|
246
|
+
const u = document.createElement("colgroup"), d = document.createElement("thead"), s = document.createElement("tbody");
|
|
247
|
+
l.appendChild(u), l.appendChild(d), l.appendChild(s), r.appendChild(a), r.appendChild(l);
|
|
248
|
+
const p = document.createElement("div");
|
|
249
|
+
return p.className = "ui-tabela__loading", p.style.display = i ? "flex" : "none", p.innerHTML = `
|
|
250
|
+
<div class="ui-tabela__spinner"></div>
|
|
251
|
+
<span>Carregando dados...</span>
|
|
252
|
+
`, r.appendChild(p), t.appendChild(r), {
|
|
253
|
+
containerElement: r,
|
|
254
|
+
tableElement: l,
|
|
255
|
+
theadElement: d,
|
|
256
|
+
tbodyElement: s,
|
|
257
|
+
colgroupElement: u,
|
|
258
|
+
emptyElement: a,
|
|
259
|
+
loadingElement: p
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
function W(t) {
|
|
263
|
+
if (!t.theadElement || !t.colgroupElement) return;
|
|
264
|
+
t.headerListeners.cleanup(), t.theadElement.innerHTML = "", t.colgroupElement.innerHTML = "";
|
|
265
|
+
const o = document.createElement("tr");
|
|
266
|
+
t.colunas.forEach((e, i) => {
|
|
267
|
+
const r = document.createElement("col");
|
|
268
|
+
e.largura !== void 0 && (r.style.width = t.formatWidth(e.largura)), t.colgroupElement.appendChild(r);
|
|
269
|
+
const a = document.createElement("th"), c = t.getAlignmentClass(e.alinhamento);
|
|
270
|
+
if (a.className = c, a.style.textAlign = t.getTextAlign(e.alinhamento), e.largura !== void 0 && (a.style.width = t.formatWidth(e.largura)), e.larguraMinima !== void 0 && (a.style.minWidth = t.formatWidth(e.larguraMinima)), e.larguraMaxima !== void 0) {
|
|
271
|
+
const h = t.formatWidth(e.larguraMaxima);
|
|
272
|
+
a.style.maxWidth = h, a.style.overflow = "hidden", a.style.textOverflow = "ellipsis", a.style.whiteSpace = "nowrap";
|
|
273
|
+
}
|
|
274
|
+
if (e.tooltip && (a.title = e.tooltip), e.ordenavel) {
|
|
275
|
+
a.classList.add("ui-tabela__th--ordenavel");
|
|
276
|
+
const h = () => t.onHeaderClick(e);
|
|
277
|
+
t.headerListeners.add(a, "click", h);
|
|
278
|
+
}
|
|
279
|
+
const n = (h) => t.onHeaderContextMenu(h, e, i, a);
|
|
280
|
+
t.headerListeners.add(a, "contextmenu", n);
|
|
281
|
+
const l = document.createElement("div");
|
|
282
|
+
l.className = "ui-tabela__header-content";
|
|
283
|
+
const u = document.createElement("span");
|
|
284
|
+
u.className = "ui-tabela__header-text", u.textContent = e.rotulo, l.appendChild(u);
|
|
285
|
+
const d = document.createElement("span");
|
|
286
|
+
if (d.className = "ui-tabela__sort-icon", e.ordenavel) {
|
|
287
|
+
const h = t.colunaOrdenada === e.id && t.direcaoOrdenacao !== "original", b = h && t.direcaoOrdenacao === "desc", g = h ? "" : "ui-tabela__sort-arrow--inativo", x = b ? "ui-tabela__sort-arrow--desc" : "";
|
|
288
|
+
d.innerHTML = `
|
|
289
|
+
<svg class="ui-tabela__sort-arrow ${g} ${x}" viewBox="0 0 24 24">
|
|
290
|
+
<path d="M7 14l5-5 5 5H7z"/>
|
|
291
|
+
</svg>
|
|
292
|
+
`;
|
|
293
|
+
}
|
|
294
|
+
l.appendChild(d), a.appendChild(l);
|
|
295
|
+
const s = document.createElement("div");
|
|
296
|
+
s.className = "ui-tabela__resizer", s.title = "Arrastar para redimensionar largura (duplo-clique para auto-ajuste)";
|
|
297
|
+
const p = (h) => t.onInitColumnResize(h, e, i, a, s);
|
|
298
|
+
t.headerListeners.add(s, "mousedown", p);
|
|
299
|
+
const m = (h) => {
|
|
300
|
+
h.stopPropagation(), t.onColumnAutoFit(e, a, r);
|
|
301
|
+
};
|
|
302
|
+
t.headerListeners.add(s, "dblclick", m), a.appendChild(s), o.appendChild(a);
|
|
303
|
+
}), t.theadElement.appendChild(o);
|
|
304
|
+
}
|
|
305
|
+
function X(t) {
|
|
306
|
+
if (!t.tbodyElement || !t.tableElement || !t.emptyElement || !t.containerElement) return;
|
|
307
|
+
if (!t.dadosExibicao || t.dadosExibicao.length === 0) {
|
|
308
|
+
t.emptyElement.style.display = "flex", t.tableElement.style.display = "none";
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
t.emptyElement.style.display = "none", t.tableElement.style.display = "table";
|
|
312
|
+
const o = t.dadosExibicao.length, e = t.rowHeight, i = t.virtualizar && o > 30;
|
|
313
|
+
let r = 0, a = o;
|
|
314
|
+
if (i) {
|
|
315
|
+
const n = t.containerElement.scrollTop, l = t.containerElement.clientHeight || 400, u = 5;
|
|
316
|
+
r = Math.max(0, Math.floor(n / e) - u), a = Math.min(o, Math.ceil((n + l) / e) + u);
|
|
317
|
+
}
|
|
318
|
+
t.tbodyElement.innerHTML = "";
|
|
319
|
+
const c = document.createDocumentFragment();
|
|
320
|
+
if (i && r > 0) {
|
|
321
|
+
const n = document.createElement("tr");
|
|
322
|
+
n.className = "ui-tabela__virtual-spacer", n.style.height = `${r * e}px`;
|
|
323
|
+
const l = document.createElement("td");
|
|
324
|
+
l.colSpan = t.colunas.length || 1, n.appendChild(l), c.appendChild(n);
|
|
325
|
+
}
|
|
326
|
+
for (let n = r; n < a; n++) {
|
|
327
|
+
const l = t.dadosExibicao[n], u = document.createElement("tr");
|
|
328
|
+
u.setAttribute("data-index", String(n));
|
|
329
|
+
const d = t.chaveId;
|
|
330
|
+
l[d] !== void 0 ? u.setAttribute("data-id", String(l[d])) : l.id !== void 0 ? u.setAttribute("data-id", String(l.id)) : l._id !== void 0 && u.setAttribute("data-id", String(l._id)), t.isItemSelecionado(l, n) && (u.classList.add("ui-tabela__tr--selecionada"), u.setAttribute("data-selecionada", "true")), u.addEventListener("click", (s) => {
|
|
331
|
+
const p = s.target;
|
|
332
|
+
p && p.closest("button, input, select, textarea, a, [data-prevent-select]") || t.onLinhaClique(l, n);
|
|
333
|
+
}), t.colunas.forEach((s) => {
|
|
334
|
+
const p = document.createElement("td"), m = t.getAlignmentClass(s.alinhamento);
|
|
335
|
+
if (p.className = m, p.style.textAlign = t.getTextAlign(s.alinhamento), s.larguraMaxima !== void 0) {
|
|
336
|
+
const g = t.formatWidth(s.larguraMaxima);
|
|
337
|
+
p.style.maxWidth = g, p.style.overflow = "hidden", p.style.textOverflow = "ellipsis", p.style.whiteSpace = "nowrap";
|
|
338
|
+
}
|
|
339
|
+
const h = document.createElement("div");
|
|
340
|
+
h.className = "ui-tabela__cell-content", s.larguraMaxima !== void 0 && h.classList.add("ui-tabela__cell-truncate");
|
|
341
|
+
const b = l[s.id];
|
|
342
|
+
if (typeof s.render == "function") {
|
|
343
|
+
const g = s.render(b, l, n);
|
|
344
|
+
g instanceof Node ? h.appendChild(g) : h.textContent = String(g ?? "");
|
|
345
|
+
} else if (b instanceof Node)
|
|
346
|
+
h.appendChild(b);
|
|
347
|
+
else {
|
|
348
|
+
const g = b != null ? String(b) : "";
|
|
349
|
+
h.textContent = g, s.larguraMaxima !== void 0 && !s.tooltip && (p.title = g);
|
|
350
|
+
}
|
|
351
|
+
p.appendChild(h), u.appendChild(p);
|
|
352
|
+
}), c.appendChild(u);
|
|
353
|
+
}
|
|
354
|
+
if (i && a < o) {
|
|
355
|
+
const n = document.createElement("tr");
|
|
356
|
+
n.className = "ui-tabela__virtual-spacer", n.style.height = `${(o - a) * e}px`;
|
|
357
|
+
const l = document.createElement("td");
|
|
358
|
+
l.colSpan = t.colunas.length || 1, n.appendChild(l), c.appendChild(n);
|
|
359
|
+
}
|
|
360
|
+
t.tbodyElement.appendChild(c);
|
|
361
|
+
}
|
|
362
|
+
function U(t) {
|
|
363
|
+
const {
|
|
364
|
+
evento: o,
|
|
365
|
+
coluna: e,
|
|
366
|
+
colIndex: i,
|
|
367
|
+
thElement: r,
|
|
368
|
+
resizer: a,
|
|
369
|
+
colgroupElement: c,
|
|
370
|
+
onResizeStart: n,
|
|
371
|
+
onResizeEnd: l
|
|
372
|
+
} = t;
|
|
373
|
+
o.stopPropagation(), o.preventDefault(), n(), a.classList.add("ui-tabela__resizer--ativo");
|
|
374
|
+
const u = o.pageX, d = r.offsetWidth, s = c == null ? void 0 : c.children[i], p = (b) => {
|
|
375
|
+
const g = b.pageX - u;
|
|
376
|
+
let x = d + g;
|
|
377
|
+
if (e.larguraMinima !== void 0) {
|
|
378
|
+
const v = typeof e.larguraMinima == "number" ? e.larguraMinima : parseInt(e.larguraMinima, 10);
|
|
379
|
+
isNaN(v) || (x = Math.max(v, x));
|
|
380
|
+
} else
|
|
381
|
+
x = Math.max(60, x);
|
|
382
|
+
if (e.larguraMaxima !== void 0) {
|
|
383
|
+
const v = typeof e.larguraMaxima == "number" ? e.larguraMaxima : parseInt(e.larguraMaxima, 10);
|
|
384
|
+
isNaN(v) || (x = Math.min(v, x));
|
|
385
|
+
}
|
|
386
|
+
e.largura = `${x}px`, r.style.width = `${x}px`, s && (s.style.width = `${x}px`);
|
|
387
|
+
}, m = () => {
|
|
388
|
+
h(), l(String(e.largura));
|
|
389
|
+
}, h = () => {
|
|
390
|
+
a.classList.remove("ui-tabela__resizer--ativo"), window.removeEventListener("mousemove", p), window.removeEventListener("mouseup", m);
|
|
391
|
+
};
|
|
392
|
+
return window.addEventListener("mousemove", p), window.addEventListener("mouseup", m), h;
|
|
393
|
+
}
|
|
394
|
+
function Y(t) {
|
|
395
|
+
const {
|
|
396
|
+
evento: o,
|
|
397
|
+
coluna: e,
|
|
398
|
+
colIndex: i,
|
|
399
|
+
thElement: r,
|
|
400
|
+
colgroupElement: a,
|
|
401
|
+
shadow: c,
|
|
402
|
+
onResizeEnd: n
|
|
403
|
+
} = t, l = document.createElement("dialog");
|
|
404
|
+
l.className = "ui-tabela__prompt-dialog", l.style.position = "fixed", l.style.left = `${o.clientX}px`, l.style.top = `${o.clientY}px`;
|
|
405
|
+
const u = document.createElement("div");
|
|
406
|
+
u.className = "ui-tabela__prompt-title", u.textContent = `Largura para "${e.rotulo}" (px ou auto):`;
|
|
407
|
+
const d = document.createElement("input");
|
|
408
|
+
d.type = "text";
|
|
409
|
+
const s = e.largura ? String(e.largura).replace("px", "") : "auto";
|
|
410
|
+
d.value = s;
|
|
411
|
+
const p = document.createElement("div");
|
|
412
|
+
p.className = "ui-tabela__prompt-actions";
|
|
413
|
+
const m = document.createElement("button");
|
|
414
|
+
m.textContent = "Aplicar";
|
|
415
|
+
const h = document.createElement("button");
|
|
416
|
+
h.textContent = "Cancelar", p.appendChild(h), p.appendChild(m), l.appendChild(u), l.appendChild(d), l.appendChild(p), c.appendChild(l), l.showModal();
|
|
417
|
+
const b = () => {
|
|
418
|
+
const x = d.value.trim().toLowerCase();
|
|
419
|
+
if (x === "" || x === "auto")
|
|
420
|
+
e.largura = void 0, r.style.width = "", a != null && a.children[i] && (a.children[i].style.width = "");
|
|
421
|
+
else {
|
|
422
|
+
const v = parseInt(x, 10);
|
|
423
|
+
!isNaN(v) && v > 20 && (e.largura = `${v}px`, r.style.width = `${v}px`, a != null && a.children[i] && (a.children[i].style.width = `${v}px`));
|
|
424
|
+
}
|
|
425
|
+
l.close(), l.remove(), n(e.largura ? String(e.largura) : "auto");
|
|
426
|
+
};
|
|
427
|
+
m.addEventListener("click", (g) => {
|
|
428
|
+
g.stopPropagation(), b();
|
|
429
|
+
}), h.addEventListener("click", (g) => {
|
|
430
|
+
g.stopPropagation(), l.close(), l.remove();
|
|
431
|
+
}), d.addEventListener("keydown", (g) => {
|
|
432
|
+
g.key === "Enter" ? (g.preventDefault(), b()) : g.key === "Escape" && (g.preventDefault(), l.close(), l.remove());
|
|
433
|
+
}), setTimeout(() => d.focus(), 10);
|
|
434
|
+
}
|
|
435
|
+
function G(t, o, e, i, r, a) {
|
|
436
|
+
return U({
|
|
437
|
+
evento: t,
|
|
438
|
+
coluna: o,
|
|
439
|
+
colIndex: e,
|
|
440
|
+
thElement: i,
|
|
441
|
+
resizer: r,
|
|
442
|
+
colgroupElement: a.colgroupElement,
|
|
443
|
+
onResizeStart: () => a.onSetIsResizing(!0),
|
|
444
|
+
onResizeEnd: (c) => {
|
|
445
|
+
setTimeout(() => a.onSetIsResizing(!1), 50), a.host.dispatchEvent(
|
|
446
|
+
new CustomEvent("ui-column-resize", {
|
|
447
|
+
detail: { idColuna: o.id, largura: c },
|
|
448
|
+
bubbles: !0,
|
|
449
|
+
composed: !0
|
|
450
|
+
})
|
|
451
|
+
);
|
|
452
|
+
}
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
function K(t, o, e, i, r) {
|
|
456
|
+
t.preventDefault(), t.stopPropagation(), Y({
|
|
457
|
+
evento: t,
|
|
458
|
+
coluna: o,
|
|
459
|
+
colIndex: e,
|
|
460
|
+
thElement: i,
|
|
461
|
+
colgroupElement: r.colgroupElement,
|
|
462
|
+
shadow: r.shadow,
|
|
463
|
+
onResizeEnd: (a) => {
|
|
464
|
+
r.host.dispatchEvent(
|
|
465
|
+
new CustomEvent("ui-column-resize", {
|
|
466
|
+
detail: { idColuna: o.id, largura: a },
|
|
467
|
+
bubbles: !0,
|
|
468
|
+
composed: !0
|
|
469
|
+
})
|
|
470
|
+
);
|
|
471
|
+
}
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
function Q(t) {
|
|
475
|
+
W({
|
|
476
|
+
theadElement: t.theadElement,
|
|
477
|
+
colgroupElement: t.colgroupElement,
|
|
478
|
+
colunas: t.colunas,
|
|
479
|
+
colunaOrdenada: t.dadosController.getColunaOrdenada(),
|
|
480
|
+
direcaoOrdenacao: t.dadosController.getDirecaoOrdenacao(),
|
|
481
|
+
headerListeners: t.headerListeners,
|
|
482
|
+
formatWidth: B,
|
|
483
|
+
getAlignmentClass: N,
|
|
484
|
+
getTextAlign: T,
|
|
485
|
+
onHeaderClick: (o) => t.onHeaderClick(o),
|
|
486
|
+
onHeaderContextMenu: (o, e, i, r) => {
|
|
487
|
+
K(o, e, i, r, {
|
|
488
|
+
host: t.host,
|
|
489
|
+
colgroupElement: t.colgroupElement,
|
|
490
|
+
shadow: t.shadow,
|
|
491
|
+
onSetIsResizing: t.onSetIsResizing
|
|
492
|
+
});
|
|
493
|
+
},
|
|
494
|
+
onInitColumnResize: (o, e, i, r, a) => {
|
|
495
|
+
const c = G(o, e, i, r, a, {
|
|
496
|
+
host: t.host,
|
|
497
|
+
colgroupElement: t.colgroupElement,
|
|
498
|
+
shadow: t.shadow,
|
|
499
|
+
onSetIsResizing: t.onSetIsResizing
|
|
500
|
+
});
|
|
501
|
+
t.onActiveResizeCleanup(c);
|
|
502
|
+
},
|
|
503
|
+
onColumnAutoFit: (o, e, i) => {
|
|
504
|
+
o.largura = void 0, e.style.width = "", i.style.width = "", t.host.dispatchEvent(
|
|
505
|
+
new CustomEvent("ui-column-resize", {
|
|
506
|
+
bubbles: !0,
|
|
507
|
+
composed: !0,
|
|
508
|
+
detail: { idColuna: o.id, largura: "auto" }
|
|
509
|
+
})
|
|
510
|
+
);
|
|
511
|
+
}
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
function Z(t) {
|
|
515
|
+
X({
|
|
516
|
+
tbodyElement: t.tbodyElement,
|
|
517
|
+
tableElement: t.tableElement,
|
|
518
|
+
emptyElement: t.emptyElement,
|
|
519
|
+
containerElement: t.containerElement,
|
|
520
|
+
dadosExibicao: t.dadosController.getDadosExibicao(),
|
|
521
|
+
colunas: t.colunas,
|
|
522
|
+
chaveId: t.chaveId,
|
|
523
|
+
virtualizar: t.virtualizar,
|
|
524
|
+
rowHeight: t.rowHeight,
|
|
525
|
+
isItemSelecionado: (o, e) => t.selecaoController.isItemSelecionado(o, e),
|
|
526
|
+
onLinhaClique: (o, e) => {
|
|
527
|
+
t.selecaoController.setItemSelecionado(o), t.host.dispatchEvent(
|
|
528
|
+
new CustomEvent("ui-linha-clique", {
|
|
529
|
+
bubbles: !0,
|
|
530
|
+
composed: !0,
|
|
531
|
+
detail: { item: o, indice: e }
|
|
532
|
+
})
|
|
533
|
+
);
|
|
534
|
+
},
|
|
535
|
+
formatWidth: B,
|
|
536
|
+
getAlignmentClass: N,
|
|
537
|
+
getTextAlign: T
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
function J(t, o) {
|
|
541
|
+
let e = !1;
|
|
542
|
+
const i = () => {
|
|
543
|
+
e || (window.requestAnimationFrame(() => {
|
|
544
|
+
o(), e = !1;
|
|
545
|
+
}), e = !0);
|
|
546
|
+
};
|
|
547
|
+
return t.addEventListener("scroll", i), i;
|
|
548
|
+
}
|
|
549
|
+
function ee(t, o, e, i) {
|
|
550
|
+
return $(t, o, e, i);
|
|
551
|
+
}
|
|
552
|
+
function D(t) {
|
|
553
|
+
const o = t.host.getAttribute("texto-vazio") || t.host.getAttribute("empty-text");
|
|
554
|
+
o && t.onTextoVazioAlterado(o);
|
|
555
|
+
const e = t.host.getAttribute("virtualizar") || t.host.getAttribute("virtualize");
|
|
556
|
+
e !== null && t.onVirtualizarAlterado(e !== "false");
|
|
557
|
+
const i = t.host.getAttribute("src");
|
|
558
|
+
i && t.host.isConnected && t.onCarregarSrc(i);
|
|
559
|
+
const r = t.host.hasAttribute("carregando") || t.host.hasAttribute("loading");
|
|
560
|
+
t.onCarregandoAlterado(r), t.loadingElement && (t.loadingElement.style.display = r ? "flex" : "none");
|
|
561
|
+
}
|
|
562
|
+
function te(t, o, e) {
|
|
563
|
+
if (D(e), t === "max-height" && e.containerElement) {
|
|
564
|
+
e.containerElement.style.maxHeight = o || "";
|
|
565
|
+
return;
|
|
566
|
+
}
|
|
567
|
+
if ((t === "texto-vazio" || t === "empty-text") && e.emptyElement) {
|
|
568
|
+
const i = e.emptyElement.querySelector(".ui-tabela__empty-text");
|
|
569
|
+
i && o && (i.textContent = o), e.onRenderBody();
|
|
570
|
+
return;
|
|
571
|
+
}
|
|
572
|
+
if (t === "carregando" || t === "loading") {
|
|
573
|
+
e.loadingElement && (e.loadingElement.style.display = o !== null ? "flex" : "none");
|
|
574
|
+
return;
|
|
575
|
+
}
|
|
576
|
+
if (t === "densidade" || t === "density") {
|
|
577
|
+
e.onRenderBody();
|
|
578
|
+
return;
|
|
579
|
+
}
|
|
580
|
+
e.onRenderTotal();
|
|
581
|
+
}
|
|
582
|
+
class oe extends M {
|
|
583
|
+
constructor() {
|
|
584
|
+
super();
|
|
585
|
+
f(this, "shadow");
|
|
586
|
+
f(this, "_colunas", []);
|
|
587
|
+
f(this, "_textoVazio", "Nenhum registro encontrado");
|
|
588
|
+
f(this, "_virtualizar", !0);
|
|
589
|
+
f(this, "_isResizing", !1);
|
|
590
|
+
f(this, "_carregando", !1);
|
|
591
|
+
f(this, "_src", null);
|
|
592
|
+
f(this, "_containerElement", null);
|
|
593
|
+
f(this, "_tableElement", null);
|
|
594
|
+
f(this, "_theadElement", null);
|
|
595
|
+
f(this, "_tbodyElement", null);
|
|
596
|
+
f(this, "_colgroupElement", null);
|
|
597
|
+
f(this, "_emptyElement", null);
|
|
598
|
+
f(this, "_loadingElement", null);
|
|
599
|
+
f(this, "_scrollHandler", null);
|
|
600
|
+
f(this, "_activeResizeCleanup", null);
|
|
601
|
+
f(this, "_headerListeners", new y());
|
|
602
|
+
f(this, "remotaController");
|
|
603
|
+
f(this, "selecaoController");
|
|
604
|
+
f(this, "dadosController", new V());
|
|
605
|
+
this.shadow = this.attachShadow({ mode: "open" }), this.remotaController = new H({
|
|
606
|
+
host: this,
|
|
607
|
+
onCarregandoAlterado: (e) => {
|
|
608
|
+
this.carregando = e;
|
|
609
|
+
},
|
|
610
|
+
onDadosRecebidos: (e) => {
|
|
611
|
+
this.dados = e;
|
|
612
|
+
}
|
|
613
|
+
}), this.selecaoController = new z({
|
|
614
|
+
host: this,
|
|
615
|
+
tbodyElement: null,
|
|
616
|
+
containerElement: null,
|
|
617
|
+
dadosExibicao: this.dadosController.getDadosExibicao(),
|
|
618
|
+
chaveId: this.chaveId,
|
|
619
|
+
getRowHeight: () => this.getRowHeight(),
|
|
620
|
+
onRenderBody: () => this.renderBody()
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
static get observedAttributes() {
|
|
624
|
+
return ["texto-vazio", "empty-text", "max-height", "densidade", "density", "virtualizar", "virtualize", "src", "carregando", "loading", "chave-id", "id-key"];
|
|
625
|
+
}
|
|
626
|
+
connectedCallback() {
|
|
627
|
+
this.syncAttributes(), !this.hasAttribute("densidade") && !this.hasAttribute("density") && this.setAttribute("densidade", "normal"), this.renderTotal(), this._src && this.remotaController.carregar(this._src);
|
|
628
|
+
}
|
|
629
|
+
disconnectedCallback() {
|
|
630
|
+
this.cleanupEventListeners();
|
|
631
|
+
}
|
|
632
|
+
attributeChangedCallback(e, i, r) {
|
|
633
|
+
te(e, r, this.obterContextoAtributos());
|
|
634
|
+
}
|
|
635
|
+
syncAttributes() {
|
|
636
|
+
D(this.obterContextoAtributos());
|
|
637
|
+
}
|
|
638
|
+
obterContextoAtributos() {
|
|
639
|
+
return {
|
|
640
|
+
host: this,
|
|
641
|
+
containerElement: this._containerElement,
|
|
642
|
+
emptyElement: this._emptyElement,
|
|
643
|
+
loadingElement: this._loadingElement,
|
|
644
|
+
onTextoVazioAlterado: (e) => {
|
|
645
|
+
this._textoVazio = e;
|
|
646
|
+
},
|
|
647
|
+
onVirtualizarAlterado: (e) => {
|
|
648
|
+
this._virtualizar = e;
|
|
649
|
+
},
|
|
650
|
+
onCarregarSrc: (e) => {
|
|
651
|
+
this._src = e, this.remotaController.carregar(e);
|
|
652
|
+
},
|
|
653
|
+
onCarregandoAlterado: (e) => {
|
|
654
|
+
this._carregando = e;
|
|
655
|
+
},
|
|
656
|
+
onRenderBody: () => this.renderBody(),
|
|
657
|
+
onRenderTotal: () => this.renderTotal()
|
|
658
|
+
};
|
|
659
|
+
}
|
|
660
|
+
get src() {
|
|
661
|
+
return this._src;
|
|
662
|
+
}
|
|
663
|
+
set src(e) {
|
|
664
|
+
this._src = e, e ? (this.setAttribute("src", e), this.remotaController.carregar(e)) : this.removeAttribute("src");
|
|
665
|
+
}
|
|
666
|
+
get carregando() {
|
|
667
|
+
return this._carregando;
|
|
668
|
+
}
|
|
669
|
+
set carregando(e) {
|
|
670
|
+
this._carregando = !!e, this._carregando ? this.setAttribute("carregando", "") : (this.removeAttribute("carregando"), this.removeAttribute("loading")), this._loadingElement && (this._loadingElement.style.display = this._carregando ? "flex" : "none");
|
|
671
|
+
}
|
|
672
|
+
async carregarDoEndpoint(e) {
|
|
673
|
+
await this.remotaController.carregar(e || this._src || "");
|
|
674
|
+
}
|
|
675
|
+
async recarregar() {
|
|
676
|
+
this._src ? await this.remotaController.carregar(this._src) : (this.dadosController.aplicarOrdenacao(), this.renderBody());
|
|
677
|
+
}
|
|
678
|
+
filtrar(e) {
|
|
679
|
+
this.dadosController.filtrar(e), this.atualizarContextoSelecao(), this.renderBody();
|
|
680
|
+
}
|
|
681
|
+
cleanupEventListeners() {
|
|
682
|
+
this._containerElement && this._scrollHandler && (this._containerElement.removeEventListener("scroll", this._scrollHandler), this._scrollHandler = null), this._activeResizeCleanup && (this._activeResizeCleanup(), this._activeResizeCleanup = null), this.remotaController.abortar(), this._headerListeners.cleanup();
|
|
683
|
+
}
|
|
684
|
+
get colunas() {
|
|
685
|
+
return this._colunas;
|
|
686
|
+
}
|
|
687
|
+
set colunas(e) {
|
|
688
|
+
this._colunas = Array.isArray(e) ? e : [], this.renderTotal();
|
|
689
|
+
}
|
|
690
|
+
get dados() {
|
|
691
|
+
return this.dadosController.getDadosOriginais();
|
|
692
|
+
}
|
|
693
|
+
set dados(e) {
|
|
694
|
+
this.dadosController.setDadosOriginais(e), this.atualizarContextoSelecao(), this.renderBody();
|
|
695
|
+
}
|
|
696
|
+
get itens() {
|
|
697
|
+
return this.dados;
|
|
698
|
+
}
|
|
699
|
+
set itens(e) {
|
|
700
|
+
this.dados = e;
|
|
701
|
+
}
|
|
702
|
+
get chaveId() {
|
|
703
|
+
return this.getAttribute("chave-id") || this.getAttribute("id-key") || "id";
|
|
704
|
+
}
|
|
705
|
+
set chaveId(e) {
|
|
706
|
+
e ? this.setAttribute("chave-id", e) : (this.removeAttribute("chave-id"), this.removeAttribute("id-key")), this.atualizarContextoSelecao();
|
|
707
|
+
}
|
|
708
|
+
get itemSelecionado() {
|
|
709
|
+
return this.selecaoController.getItemSelecionado();
|
|
710
|
+
}
|
|
711
|
+
set itemSelecionado(e) {
|
|
712
|
+
this.selecaoController.setItemSelecionado(e);
|
|
713
|
+
}
|
|
714
|
+
get indiceSelecionado() {
|
|
715
|
+
return this.selecaoController.getIndiceSelecionado();
|
|
716
|
+
}
|
|
717
|
+
set indiceSelecionado(e) {
|
|
718
|
+
this.selecaoController.setIndiceSelecionado(e);
|
|
719
|
+
}
|
|
720
|
+
limparSelecao() {
|
|
721
|
+
this.selecaoController.limparSelecao();
|
|
722
|
+
}
|
|
723
|
+
get densidade() {
|
|
724
|
+
const e = this.getAttribute("densidade") || this.getAttribute("density");
|
|
725
|
+
return e === "compacta" || e === "compact" ? "compacta" : e === "relaxada" || e === "relaxed" ? "relaxada" : "normal";
|
|
726
|
+
}
|
|
727
|
+
set densidade(e) {
|
|
728
|
+
e ? this.setAttribute("densidade", e) : (this.removeAttribute("densidade"), this.removeAttribute("density")), this.renderBody();
|
|
729
|
+
}
|
|
730
|
+
get virtualizar() {
|
|
731
|
+
return this._virtualizar;
|
|
732
|
+
}
|
|
733
|
+
set virtualizar(e) {
|
|
734
|
+
this._virtualizar = !!e, e ? this.setAttribute("virtualizar", "true") : this.removeAttribute("virtualizar"), this.renderTotal();
|
|
735
|
+
}
|
|
736
|
+
get colunaOrdenada() {
|
|
737
|
+
return this.dadosController.getColunaOrdenada();
|
|
738
|
+
}
|
|
739
|
+
set colunaOrdenada(e) {
|
|
740
|
+
this.dadosController.setColunaOrdenada(e), this.renderHeader(), this.renderBody();
|
|
741
|
+
}
|
|
742
|
+
get direcaoOrdenacao() {
|
|
743
|
+
return this.dadosController.getDirecaoOrdenacao();
|
|
744
|
+
}
|
|
745
|
+
set direcaoOrdenacao(e) {
|
|
746
|
+
this.dadosController.setDirecaoOrdenacao(e), this.renderHeader(), this.renderBody();
|
|
747
|
+
}
|
|
748
|
+
get textoVazio() {
|
|
749
|
+
return this._textoVazio;
|
|
750
|
+
}
|
|
751
|
+
set textoVazio(e) {
|
|
752
|
+
this._textoVazio = e || "Nenhum registro encontrado", this.renderTotal();
|
|
753
|
+
}
|
|
754
|
+
handleHeaderClick(e) {
|
|
755
|
+
if (!e.ordenavel || this._isResizing) return;
|
|
756
|
+
const i = this.dadosController.alternarOrdenacaoColuna(e);
|
|
757
|
+
i && (this.atualizarContextoSelecao(), this.renderHeader(), this.renderBody(), this.dispatchEvent(new CustomEvent("ui-sort", { detail: i, bubbles: !0, composed: !0 })));
|
|
758
|
+
}
|
|
759
|
+
getRowHeight() {
|
|
760
|
+
return j(this.densidade);
|
|
761
|
+
}
|
|
762
|
+
atualizarContextoSelecao() {
|
|
763
|
+
this.selecaoController = new z({
|
|
764
|
+
host: this,
|
|
765
|
+
tbodyElement: this._tbodyElement,
|
|
766
|
+
containerElement: this._containerElement,
|
|
767
|
+
dadosExibicao: this.dadosController.getDadosExibicao(),
|
|
768
|
+
chaveId: this.chaveId,
|
|
769
|
+
getRowHeight: () => this.getRowHeight(),
|
|
770
|
+
onRenderBody: () => this.renderBody()
|
|
771
|
+
});
|
|
772
|
+
}
|
|
773
|
+
renderTotal() {
|
|
774
|
+
if (this.shadow) {
|
|
775
|
+
if (this._containerElement) {
|
|
776
|
+
if (this._containerElement.style.maxHeight = this.getAttribute("max-height") || "", this._emptyElement) {
|
|
777
|
+
const e = this._emptyElement.querySelector(".ui-tabela__empty-text");
|
|
778
|
+
e && (e.textContent = this._textoVazio);
|
|
779
|
+
}
|
|
780
|
+
} else {
|
|
781
|
+
this.cleanupEventListeners();
|
|
782
|
+
const e = ee(this.shadow, this._textoVazio, this.getAttribute("max-height"), this._carregando);
|
|
783
|
+
this._containerElement = e.containerElement, this._tableElement = e.tableElement, this._colgroupElement = e.colgroupElement, this._theadElement = e.theadElement, this._tbodyElement = e.tbodyElement, this._emptyElement = e.emptyElement, this._loadingElement = e.loadingElement, this.atualizarContextoSelecao();
|
|
784
|
+
}
|
|
785
|
+
this.renderHeader(), this.renderBody(), this._virtualizar && this._containerElement && !this._scrollHandler && (this._scrollHandler = J(this._containerElement, () => this.renderBody()));
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
obterContextoRenderizador() {
|
|
789
|
+
return {
|
|
790
|
+
host: this,
|
|
791
|
+
shadow: this.shadow,
|
|
792
|
+
theadElement: this._theadElement,
|
|
793
|
+
colgroupElement: this._colgroupElement,
|
|
794
|
+
tbodyElement: this._tbodyElement,
|
|
795
|
+
tableElement: this._tableElement,
|
|
796
|
+
emptyElement: this._emptyElement,
|
|
797
|
+
containerElement: this._containerElement,
|
|
798
|
+
colunas: this._colunas,
|
|
799
|
+
dadosController: this.dadosController,
|
|
800
|
+
selecaoController: this.selecaoController,
|
|
801
|
+
chaveId: this.chaveId,
|
|
802
|
+
virtualizar: this._virtualizar,
|
|
803
|
+
rowHeight: this.getRowHeight(),
|
|
804
|
+
headerListeners: this._headerListeners,
|
|
805
|
+
onSetIsResizing: (e) => {
|
|
806
|
+
this._isResizing = e;
|
|
807
|
+
},
|
|
808
|
+
onActiveResizeCleanup: (e) => {
|
|
809
|
+
this._activeResizeCleanup = e;
|
|
810
|
+
},
|
|
811
|
+
onHeaderClick: (e) => this.handleHeaderClick(e)
|
|
812
|
+
};
|
|
813
|
+
}
|
|
814
|
+
renderHeader() {
|
|
815
|
+
Q(this.obterContextoRenderizador());
|
|
816
|
+
}
|
|
817
|
+
renderBody() {
|
|
818
|
+
Z(this.obterContextoRenderizador());
|
|
819
|
+
}
|
|
820
|
+
rolarPara(e, i) {
|
|
821
|
+
return this.selecaoController.rolarPara(e, i);
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
L("ui-tabela", oe);
|
|
825
|
+
function ie(t) {
|
|
826
|
+
if (!t || typeof t != "string") return null;
|
|
827
|
+
let o = t.trim();
|
|
828
|
+
if (!o) return null;
|
|
829
|
+
o = o.replace(/(\d),(\d)/g, "$1.$2").replace(/,/g, "."), o = o.replace(/\bpi\b/gi, String(Math.PI)), o = o.replace(/\be\b/gi, String(Math.E));
|
|
830
|
+
let e = 0;
|
|
831
|
+
function i() {
|
|
832
|
+
return o[e] || "";
|
|
833
|
+
}
|
|
834
|
+
function r() {
|
|
835
|
+
return o[e++] || "";
|
|
836
|
+
}
|
|
837
|
+
function a() {
|
|
838
|
+
for (; e < o.length && /\s/.test(o[e]); )
|
|
839
|
+
e++;
|
|
840
|
+
}
|
|
841
|
+
function c() {
|
|
842
|
+
a();
|
|
843
|
+
let d = n();
|
|
844
|
+
for (a(); e < o.length; ) {
|
|
845
|
+
const s = i();
|
|
846
|
+
if (s === "+" || s === "-") {
|
|
847
|
+
r(), a();
|
|
848
|
+
const p = e, m = n();
|
|
849
|
+
a(), o.slice(p, e).includes("%") ? d = s === "+" ? d + d * m : d - d * m : d = s === "+" ? d + m : d - m;
|
|
850
|
+
} else
|
|
851
|
+
break;
|
|
852
|
+
}
|
|
853
|
+
return d;
|
|
854
|
+
}
|
|
855
|
+
function n() {
|
|
856
|
+
a();
|
|
857
|
+
let d = l();
|
|
858
|
+
for (a(); e < o.length; ) {
|
|
859
|
+
const s = i();
|
|
860
|
+
if (s === "*" || s === "/" || s === "x" || s === "X") {
|
|
861
|
+
r(), a();
|
|
862
|
+
const p = l();
|
|
863
|
+
if (s === "/" && p === 0)
|
|
864
|
+
throw new Error("Divisão por zero");
|
|
865
|
+
d = s === "/" ? d / p : d * p, a();
|
|
866
|
+
} else
|
|
867
|
+
break;
|
|
868
|
+
}
|
|
869
|
+
return d;
|
|
870
|
+
}
|
|
871
|
+
function l() {
|
|
872
|
+
a();
|
|
873
|
+
let d = u();
|
|
874
|
+
if (a(), i() === "^") {
|
|
875
|
+
r();
|
|
876
|
+
const s = l();
|
|
877
|
+
d = Math.pow(d, s);
|
|
878
|
+
} else if (o.slice(e, e + 2) === "**") {
|
|
879
|
+
e += 2;
|
|
880
|
+
const s = l();
|
|
881
|
+
d = Math.pow(d, s);
|
|
882
|
+
}
|
|
883
|
+
return d;
|
|
884
|
+
}
|
|
885
|
+
function u() {
|
|
886
|
+
a();
|
|
887
|
+
const d = i();
|
|
888
|
+
if (d === "+" || d === "-") {
|
|
889
|
+
r();
|
|
890
|
+
const m = u();
|
|
891
|
+
return d === "-" ? -m : m;
|
|
892
|
+
}
|
|
893
|
+
if (d === "(") {
|
|
894
|
+
r();
|
|
895
|
+
const m = c();
|
|
896
|
+
return a(), i() === ")" && r(), a(), i() === "%" ? (r(), m / 100) : m;
|
|
897
|
+
}
|
|
898
|
+
const s = o.slice(e).match(/^([a-zA-Z_]\w*)\s*\(/);
|
|
899
|
+
if (s) {
|
|
900
|
+
const m = s[1].toLowerCase();
|
|
901
|
+
e += s[0].length;
|
|
902
|
+
const h = c();
|
|
903
|
+
a(), i() === ")" && r();
|
|
904
|
+
let b = h;
|
|
905
|
+
switch (m) {
|
|
906
|
+
case "sqrt":
|
|
907
|
+
b = Math.sqrt(h);
|
|
908
|
+
break;
|
|
909
|
+
case "abs":
|
|
910
|
+
b = Math.abs(h);
|
|
911
|
+
break;
|
|
912
|
+
case "round":
|
|
913
|
+
b = Math.round(h);
|
|
914
|
+
break;
|
|
915
|
+
case "floor":
|
|
916
|
+
b = Math.floor(h);
|
|
917
|
+
break;
|
|
918
|
+
case "ceil":
|
|
919
|
+
b = Math.ceil(h);
|
|
920
|
+
break;
|
|
921
|
+
case "sin":
|
|
922
|
+
b = Math.sin(h);
|
|
923
|
+
break;
|
|
924
|
+
case "cos":
|
|
925
|
+
b = Math.cos(h);
|
|
926
|
+
break;
|
|
927
|
+
case "tan":
|
|
928
|
+
b = Math.tan(h);
|
|
929
|
+
break;
|
|
930
|
+
}
|
|
931
|
+
return a(), i() === "%" ? (r(), b / 100) : b;
|
|
932
|
+
}
|
|
933
|
+
const p = o.slice(e).match(/^([0-9]+(?:\.[0-9]+)?|\.[0-9]+)/);
|
|
934
|
+
if (p) {
|
|
935
|
+
e += p[0].length;
|
|
936
|
+
let m = parseFloat(p[0]);
|
|
937
|
+
return a(), i() === "%" && (r(), m = m / 100), m;
|
|
938
|
+
}
|
|
939
|
+
throw new Error("Caractere inválido: " + d);
|
|
940
|
+
}
|
|
941
|
+
try {
|
|
942
|
+
const d = c();
|
|
943
|
+
return a(), e < o.length ? null : isFinite(d) ? d : null;
|
|
944
|
+
} catch {
|
|
945
|
+
return null;
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
function re(t) {
|
|
949
|
+
const o = document.createElement("span"), e = typeof t == "number" || typeof t == "string" && /^-?\d+(\.\d+)?$/.test(t.trim());
|
|
950
|
+
return o.className = `ui-prop__valor-readonly ${e ? "ui-prop__valor-readonly--numero" : ""}`.trim(), o.textContent = t != null ? String(t) : "—", o;
|
|
951
|
+
}
|
|
952
|
+
function ae(t, o, e, i) {
|
|
953
|
+
const r = document.createElement("label");
|
|
954
|
+
r.className = "ui-prop__editor-booleano";
|
|
955
|
+
const a = !!e, c = document.createElement("div");
|
|
956
|
+
c.className = `ui-prop__checkbox-custom ${a ? "ui-prop__checkbox-custom--marcado" : ""}`, c.textContent = a ? "✓" : "";
|
|
957
|
+
const n = document.createElement("span");
|
|
958
|
+
return n.className = "ui-prop__booleano-rotulo", n.textContent = a ? "Sim" : "Não", r.appendChild(c), r.appendChild(n), r.addEventListener("click", (l) => {
|
|
959
|
+
l.preventDefault();
|
|
960
|
+
const u = !i.obterValorAtual(o.id);
|
|
961
|
+
i.registrarAlteracao(t, o.id, u), c.classList.toggle("ui-prop__checkbox-custom--marcado", u), c.textContent = u ? "✓" : "", n.textContent = u ? "Sim" : "Não";
|
|
962
|
+
}), r;
|
|
963
|
+
}
|
|
964
|
+
function ne(t, o, e, i) {
|
|
965
|
+
const r = document.createElement("select");
|
|
966
|
+
return r.className = "ui-prop__editor-select", (o.opcoes || []).forEach((a) => {
|
|
967
|
+
const c = document.createElement("option");
|
|
968
|
+
c.value = String(a.id), c.textContent = a.rotulo, String(a.id) === String(e) && (c.selected = !0), r.appendChild(c);
|
|
969
|
+
}), r.addEventListener("change", () => {
|
|
970
|
+
i.registrarAlteracao(t, o.id, r.value);
|
|
971
|
+
}), r.addEventListener("keydown", (a) => {
|
|
972
|
+
a.key === "Enter" && i.focarProximoEditor(r);
|
|
973
|
+
}), r;
|
|
974
|
+
}
|
|
975
|
+
function se(t, o, e) {
|
|
976
|
+
const i = document.createElement("button");
|
|
977
|
+
return i.type = "button", i.className = "ui-prop__btn-acao-inline", i.textContent = o.rotuloAcao || "Editar...", i.addEventListener("click", () => {
|
|
978
|
+
typeof o.onClickAcao == "function" && o.onClickAcao(o), e.despacharEventoAcao(o, t);
|
|
979
|
+
}), i.addEventListener("keydown", (r) => {
|
|
980
|
+
r.key === "Enter" && i.click();
|
|
981
|
+
}), i;
|
|
982
|
+
}
|
|
983
|
+
function le(t, o, e, i) {
|
|
984
|
+
const r = document.createElement("input");
|
|
985
|
+
r.type = "text", r.inputMode = "decimal", r.autocomplete = "off", r.spellcheck = !1, r.className = "ui-prop__editor-input ui-prop__editor-input--numero", o.placeholder && (r.placeholder = o.placeholder);
|
|
986
|
+
const a = (n) => {
|
|
987
|
+
if (n == null || n === "") return "";
|
|
988
|
+
const l = Number(n);
|
|
989
|
+
return isNaN(l) ? String(n) : o.casasDecimais !== void 0 ? l.toFixed(o.casasDecimais) : String(l);
|
|
990
|
+
};
|
|
991
|
+
r.value = a(e), r.addEventListener("focus", () => {
|
|
992
|
+
r.select();
|
|
993
|
+
}), r.addEventListener("input", () => {
|
|
994
|
+
const n = r.value, l = /[\+\-\*\/\^\%\(\)]/.test(n) && !/^[+-]?[0-9]*\.?[0-9]*$/.test(n.trim());
|
|
995
|
+
r.classList.toggle("ui-prop__editor-input--calculando", l);
|
|
996
|
+
});
|
|
997
|
+
const c = () => {
|
|
998
|
+
r.classList.remove("ui-prop__editor-input--calculando");
|
|
999
|
+
const n = r.value.trim();
|
|
1000
|
+
if (n === "") {
|
|
1001
|
+
i.registrarAlteracao(t, o.id, null);
|
|
1002
|
+
return;
|
|
1003
|
+
}
|
|
1004
|
+
const l = ie(n);
|
|
1005
|
+
if (l !== null && !isNaN(l)) {
|
|
1006
|
+
let u = l;
|
|
1007
|
+
o.casasDecimais !== void 0 && (u = Number(l.toFixed(o.casasDecimais))), r.value = a(u), u !== i.obterValorAtual(o.id) && i.registrarAlteracao(t, o.id, u);
|
|
1008
|
+
} else
|
|
1009
|
+
r.value = a(i.obterValorAtual(o.id));
|
|
1010
|
+
};
|
|
1011
|
+
return r.addEventListener("change", c), r.addEventListener("blur", c), r.addEventListener("keydown", (n) => {
|
|
1012
|
+
if (n.key === "Enter")
|
|
1013
|
+
c(), i.focarProximoEditor(r);
|
|
1014
|
+
else if (n.key === "Escape")
|
|
1015
|
+
r.classList.remove("ui-prop__editor-input--calculando"), r.value = a(i.obterValorAtual(o.id)), r.blur();
|
|
1016
|
+
else if (n.key === "ArrowUp" || n.key === "ArrowDown") {
|
|
1017
|
+
n.preventDefault();
|
|
1018
|
+
const l = parseFloat(r.value) || 0;
|
|
1019
|
+
let u = o.casasDecimais !== void 0 ? Math.pow(10, -o.casasDecimais) : 1;
|
|
1020
|
+
n.shiftKey ? u *= 10 : n.altKey && (u *= 0.1);
|
|
1021
|
+
let d = n.key === "ArrowUp" ? l + u : l - u;
|
|
1022
|
+
o.casasDecimais !== void 0 ? d = Number(d.toFixed(o.casasDecimais)) : d = Math.round(d * 100) / 100, r.value = a(d), i.registrarAlteracao(t, o.id, d);
|
|
1023
|
+
}
|
|
1024
|
+
}), r;
|
|
1025
|
+
}
|
|
1026
|
+
function de(t, o, e, i) {
|
|
1027
|
+
const r = document.createElement("input");
|
|
1028
|
+
r.type = "text", r.className = "ui-prop__editor-input", o.placeholder && (r.placeholder = o.placeholder), r.value = e != null ? String(e) : "", r.addEventListener("focus", () => {
|
|
1029
|
+
r.select();
|
|
1030
|
+
});
|
|
1031
|
+
const a = () => {
|
|
1032
|
+
r.value !== i.obterValorAtual(o.id) && i.registrarAlteracao(t, o.id, r.value);
|
|
1033
|
+
};
|
|
1034
|
+
return r.addEventListener("change", a), r.addEventListener("keydown", (c) => {
|
|
1035
|
+
c.key === "Enter" ? (a(), i.focarProximoEditor(r)) : c.key === "Escape" && (r.value = String(i.obterValorAtual(o.id) ?? ""), r.blur());
|
|
1036
|
+
}), r;
|
|
1037
|
+
}
|
|
1038
|
+
function ce(t, o, e, i) {
|
|
1039
|
+
const r = document.createElement("div");
|
|
1040
|
+
r.className = "ui-prop__editor-linha-container";
|
|
1041
|
+
const a = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
1042
|
+
a.setAttribute("class", "ui-prop__linha-amostra-svg"), a.setAttribute("viewBox", "0 0 44 12");
|
|
1043
|
+
const c = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
1044
|
+
c.setAttribute("x1", "0"), c.setAttribute("y1", "6"), c.setAttribute("x2", "44"), c.setAttribute("y2", "6");
|
|
1045
|
+
const n = (d) => {
|
|
1046
|
+
const s = String(d || "").toLowerCase();
|
|
1047
|
+
s.includes("dash") || s.includes("tracej") || s.includes("hidden") ? c.setAttribute("stroke-dasharray", "6,3") : s.includes("dot") || s.includes("ponto") || s.includes("pontilh") ? c.setAttribute("stroke-dasharray", "2,3") : s.includes("center") || s.includes("eixo") ? c.setAttribute("stroke-dasharray", "8,3,2,3") : c.setAttribute("stroke-dasharray", "none");
|
|
1048
|
+
};
|
|
1049
|
+
n(e), a.appendChild(c);
|
|
1050
|
+
const l = document.createElement("select");
|
|
1051
|
+
return l.className = "ui-prop__linha-select", (o.opcoes && o.opcoes.length > 0 ? o.opcoes : [
|
|
1052
|
+
{ id: "ByLayer", rotulo: "ByLayer" },
|
|
1053
|
+
{ id: "ByBlock", rotulo: "ByBlock" },
|
|
1054
|
+
{ id: "Continuous", rotulo: "Continuous" },
|
|
1055
|
+
{ id: "Dashed", rotulo: "Dashed" },
|
|
1056
|
+
{ id: "Hidden", rotulo: "Hidden" },
|
|
1057
|
+
{ id: "Center", rotulo: "Center" },
|
|
1058
|
+
{ id: "Dotted", rotulo: "Dotted" }
|
|
1059
|
+
]).forEach((d) => {
|
|
1060
|
+
const s = document.createElement("option");
|
|
1061
|
+
s.value = String(d.id), s.textContent = d.rotulo, String(d.id).toLowerCase() === String(e).toLowerCase() && (s.selected = !0), l.appendChild(s);
|
|
1062
|
+
}), l.addEventListener("change", () => {
|
|
1063
|
+
n(l.value), i.registrarAlteracao(t, o.id, l.value);
|
|
1064
|
+
}), l.addEventListener("keydown", (d) => {
|
|
1065
|
+
d.key === "Enter" && i.focarProximoEditor(l);
|
|
1066
|
+
}), r.appendChild(a), r.appendChild(l), r;
|
|
1067
|
+
}
|
|
1068
|
+
function ue(t, o, e, i) {
|
|
1069
|
+
const r = document.createElement("div");
|
|
1070
|
+
r.className = "ui-prop__editor-espessura-container";
|
|
1071
|
+
const a = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
1072
|
+
a.setAttribute("class", "ui-prop__espessura-amostra-svg"), a.setAttribute("viewBox", "0 0 38 12");
|
|
1073
|
+
const c = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
1074
|
+
c.setAttribute("x1", "0"), c.setAttribute("y1", "6"), c.setAttribute("x2", "38"), c.setAttribute("y2", "6");
|
|
1075
|
+
const n = (d) => {
|
|
1076
|
+
const s = parseFloat(String(d).replace(/[^0-9.]/g, ""));
|
|
1077
|
+
return isNaN(s) || s <= 0 ? 1.5 : Math.min(8, Math.max(1, s * 8));
|
|
1078
|
+
};
|
|
1079
|
+
c.setAttribute("stroke-width", String(n(e))), a.appendChild(c);
|
|
1080
|
+
const l = document.createElement("select");
|
|
1081
|
+
return l.className = "ui-prop__espessura-select", (o.opcoes && o.opcoes.length > 0 ? o.opcoes : [
|
|
1082
|
+
{ id: "ByLayer", rotulo: "ByLayer" },
|
|
1083
|
+
{ id: "ByBlock", rotulo: "ByBlock" },
|
|
1084
|
+
{ id: "0.00 mm", rotulo: "0.00 mm" },
|
|
1085
|
+
{ id: "0.05 mm", rotulo: "0.05 mm" },
|
|
1086
|
+
{ id: "0.09 mm", rotulo: "0.09 mm" },
|
|
1087
|
+
{ id: "0.13 mm", rotulo: "0.13 mm" },
|
|
1088
|
+
{ id: "0.15 mm", rotulo: "0.15 mm" },
|
|
1089
|
+
{ id: "0.18 mm", rotulo: "0.18 mm" },
|
|
1090
|
+
{ id: "0.20 mm", rotulo: "0.20 mm" },
|
|
1091
|
+
{ id: "0.25 mm", rotulo: "0.25 mm" },
|
|
1092
|
+
{ id: "0.30 mm", rotulo: "0.30 mm" },
|
|
1093
|
+
{ id: "0.35 mm", rotulo: "0.35 mm" },
|
|
1094
|
+
{ id: "0.40 mm", rotulo: "0.40 mm" },
|
|
1095
|
+
{ id: "0.50 mm", rotulo: "0.50 mm" },
|
|
1096
|
+
{ id: "0.60 mm", rotulo: "0.60 mm" },
|
|
1097
|
+
{ id: "0.70 mm", rotulo: "0.70 mm" },
|
|
1098
|
+
{ id: "1.00 mm", rotulo: "1.00 mm" },
|
|
1099
|
+
{ id: "1.40 mm", rotulo: "1.40 mm" },
|
|
1100
|
+
{ id: "2.00 mm", rotulo: "2.00 mm" }
|
|
1101
|
+
]).forEach((d) => {
|
|
1102
|
+
const s = document.createElement("option");
|
|
1103
|
+
s.value = String(d.id), s.textContent = d.rotulo, String(d.id).toLowerCase() === String(e).toLowerCase() && (s.selected = !0), l.appendChild(s);
|
|
1104
|
+
}), l.addEventListener("change", () => {
|
|
1105
|
+
c.setAttribute("stroke-width", String(n(l.value))), i.registrarAlteracao(t, o.id, l.value);
|
|
1106
|
+
}), l.addEventListener("keydown", (d) => {
|
|
1107
|
+
d.key === "Enter" && i.focarProximoEditor(l);
|
|
1108
|
+
}), r.appendChild(a), r.appendChild(l), r;
|
|
1109
|
+
}
|
|
1110
|
+
function pe(t, o, e, i) {
|
|
1111
|
+
const r = document.createElement("div");
|
|
1112
|
+
r.className = "ui-prop__editor-cor-cad-container";
|
|
1113
|
+
const a = document.createElement("div");
|
|
1114
|
+
a.className = "ui-prop__cor-amostra";
|
|
1115
|
+
const c = (d) => {
|
|
1116
|
+
const s = String(d).toLowerCase();
|
|
1117
|
+
return s === "red" || s === "1" ? "#ff0000" : s === "yellow" || s === "2" ? "#ffff00" : s === "green" || s === "3" ? "#00ff00" : s === "cyan" || s === "4" ? "#00ffff" : s === "blue" || s === "5" ? "#0000ff" : s === "magenta" || s === "6" ? "#ff00ff" : s === "white" || s === "7" || s === "bylayer" || s === "byblock" ? "#ffffff" : s.startsWith("#") ? s : "#ffffff";
|
|
1118
|
+
};
|
|
1119
|
+
a.style.backgroundColor = c(e);
|
|
1120
|
+
const n = document.createElement("select");
|
|
1121
|
+
n.className = "ui-prop__cor-cad-select", [
|
|
1122
|
+
{ id: "ByLayer", rotulo: "ByLayer" },
|
|
1123
|
+
{ id: "ByBlock", rotulo: "ByBlock" },
|
|
1124
|
+
{ id: "Red", rotulo: "Red (1)" },
|
|
1125
|
+
{ id: "Yellow", rotulo: "Yellow (2)" },
|
|
1126
|
+
{ id: "Green", rotulo: "Green (3)" },
|
|
1127
|
+
{ id: "Cyan", rotulo: "Cyan (4)" },
|
|
1128
|
+
{ id: "Blue", rotulo: "Blue (5)" },
|
|
1129
|
+
{ id: "Magenta", rotulo: "Magenta (6)" },
|
|
1130
|
+
{ id: "White", rotulo: "White (7)" },
|
|
1131
|
+
{ id: "custom", rotulo: "Selecionar cor..." }
|
|
1132
|
+
].forEach((d) => {
|
|
1133
|
+
const s = document.createElement("option");
|
|
1134
|
+
s.value = d.id, s.textContent = d.rotulo, String(d.id).toLowerCase() === String(e).toLowerCase() && (s.selected = !0), n.appendChild(s);
|
|
1135
|
+
});
|
|
1136
|
+
const u = document.createElement("input");
|
|
1137
|
+
return u.type = "color", u.className = "ui-prop__cor-picker-oculto", u.addEventListener("input", () => {
|
|
1138
|
+
const d = u.value;
|
|
1139
|
+
a.style.backgroundColor = d, i.registrarAlteracao(t, o.id, d);
|
|
1140
|
+
}), n.addEventListener("change", () => {
|
|
1141
|
+
n.value === "custom" ? u.click() : (a.style.backgroundColor = c(n.value), i.registrarAlteracao(t, o.id, n.value));
|
|
1142
|
+
}), n.addEventListener("keydown", (d) => {
|
|
1143
|
+
d.key === "Enter" && i.focarProximoEditor(n);
|
|
1144
|
+
}), r.appendChild(a), r.appendChild(n), r.appendChild(u), r;
|
|
1145
|
+
}
|
|
1146
|
+
function he(t, o, e, i) {
|
|
1147
|
+
const r = document.createElement("div");
|
|
1148
|
+
r.className = "ui-prop__editor-cor-container";
|
|
1149
|
+
const a = document.createElement("div");
|
|
1150
|
+
a.className = "ui-prop__cor-amostra", a.style.backgroundColor = e || "#ffffff";
|
|
1151
|
+
const c = document.createElement("span");
|
|
1152
|
+
c.className = "ui-prop__cor-texto", c.textContent = o.textoAmostra || String(e || "ByLayer");
|
|
1153
|
+
const n = document.createElement("input");
|
|
1154
|
+
return n.type = "color", n.className = "ui-prop__cor-picker-oculto", n.value = typeof e == "string" && e.startsWith("#") ? e : "#ffffff", n.addEventListener("input", () => {
|
|
1155
|
+
const l = n.value;
|
|
1156
|
+
a.style.backgroundColor = l, c.textContent = l, i.registrarAlteracao(t, o.id, l);
|
|
1157
|
+
}), r.addEventListener("click", () => {
|
|
1158
|
+
n.click();
|
|
1159
|
+
}), r.appendChild(a), r.appendChild(c), r.appendChild(n), r;
|
|
1160
|
+
}
|
|
1161
|
+
function me(t, o, e, i) {
|
|
1162
|
+
return o.somenteLeitura || o.tipo === "readonly" ? re(e) : o.tipo === "booleano" ? ae(t, o, e, i) : o.tipo === "linha" || o.tipo === "linetype" ? ce(t, o, e, i) : o.tipo === "espessura" || o.tipo === "lineweight" ? ue(t, o, e, i) : o.tipo === "cor-cad" ? pe(t, o, e, i) : o.tipo === "selecao" ? ne(t, o, e, i) : o.tipo === "cor" ? he(t, o, e, i) : o.tipo === "acao" ? se(t, o, i) : o.tipo === "numero" ? le(t, o, e, i) : de(t, o, e, i);
|
|
1163
|
+
}
|
|
1164
|
+
function fe(t) {
|
|
1165
|
+
if (!t.tipoContainerElement) return;
|
|
1166
|
+
if (!t.tipos || t.tipos.length === 0) {
|
|
1167
|
+
t.tipoContainerElement.style.display = "none";
|
|
1168
|
+
return;
|
|
1169
|
+
}
|
|
1170
|
+
t.tipoContainerElement.style.display = "flex", t.tipoContainerElement.innerHTML = "";
|
|
1171
|
+
const o = t.tipos.find((e) => String(e.id) === String(t.tipoSelecionadoId)) || t.tipos[0];
|
|
1172
|
+
if (t.estiloVisual === "revit") {
|
|
1173
|
+
const e = document.createElement("div");
|
|
1174
|
+
e.className = "ui-prop__tipo-revit-card";
|
|
1175
|
+
const i = document.createElement("div");
|
|
1176
|
+
i.className = "ui-prop__tipo-miniatura", o.iconeSvg ? i.innerHTML = o.iconeSvg : i.innerHTML = `
|
|
1177
|
+
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
1178
|
+
<rect x="3" y="3" width="18" height="18" rx="2"></rect>
|
|
1179
|
+
<path d="M3 9h18M9 21V9"></path>
|
|
1180
|
+
</svg>
|
|
1181
|
+
`;
|
|
1182
|
+
const r = document.createElement("div");
|
|
1183
|
+
r.className = "ui-prop__tipo-info";
|
|
1184
|
+
const a = document.createElement("div");
|
|
1185
|
+
a.className = "ui-prop__tipo-nome", a.textContent = o.rotulo;
|
|
1186
|
+
const c = document.createElement("div");
|
|
1187
|
+
c.className = "ui-prop__tipo-subtexto", c.textContent = o.subtipo || "Tipo de Família", r.appendChild(a), r.appendChild(c), e.appendChild(i), e.appendChild(r);
|
|
1188
|
+
const n = document.createElement("div");
|
|
1189
|
+
n.className = "ui-prop__tipo-revit-subbarra";
|
|
1190
|
+
const l = document.createElement("select");
|
|
1191
|
+
l.className = "ui-prop__tipo-select", t.tipos.forEach((d) => {
|
|
1192
|
+
const s = document.createElement("option");
|
|
1193
|
+
s.value = d.id, s.textContent = `${d.rotulo}${d.subtipo ? ` : ${d.subtipo}` : ""}`, String(d.id) === String(t.tipoSelecionadoId) && (s.selected = !0), l.appendChild(s);
|
|
1194
|
+
}), l.addEventListener("change", () => {
|
|
1195
|
+
t.onSelecionarTipo(l.value);
|
|
1196
|
+
});
|
|
1197
|
+
const u = document.createElement("button");
|
|
1198
|
+
u.type = "button", u.className = "ui-prop__btn-editar-tipo", u.innerHTML = `
|
|
1199
|
+
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="margin-right: 4px; vertical-align: -1px;">
|
|
1200
|
+
<rect x="3" y="3" width="12" height="12" rx="1"></rect>
|
|
1201
|
+
<rect x="9" y="9" width="12" height="12" rx="1"></rect>
|
|
1202
|
+
</svg>
|
|
1203
|
+
<span>Editar tipo</span>
|
|
1204
|
+
`, u.addEventListener("click", () => {
|
|
1205
|
+
t.onEditarTipo(o);
|
|
1206
|
+
}), n.appendChild(l), n.appendChild(u), t.tipoContainerElement.appendChild(e), t.tipoContainerElement.appendChild(n);
|
|
1207
|
+
} else {
|
|
1208
|
+
const e = document.createElement("div");
|
|
1209
|
+
e.className = "ui-prop__tipo-autocad-bar";
|
|
1210
|
+
const i = document.createElement("select");
|
|
1211
|
+
i.className = "ui-prop__tipo-select", t.tipos.forEach((l) => {
|
|
1212
|
+
const u = document.createElement("option");
|
|
1213
|
+
u.value = l.id, u.textContent = l.rotulo, String(l.id) === String(t.tipoSelecionadoId) && (u.selected = !0), i.appendChild(u);
|
|
1214
|
+
}), i.addEventListener("change", () => {
|
|
1215
|
+
t.onSelecionarTipo(i.value);
|
|
1216
|
+
});
|
|
1217
|
+
const r = document.createElement("div");
|
|
1218
|
+
r.className = "ui-prop__tipo-autocad-acoes";
|
|
1219
|
+
const a = document.createElement("button");
|
|
1220
|
+
a.type = "button", a.className = "ui-prop__btn-autocad", a.title = "Seleção rápida", a.setAttribute("aria-label", "Seleção rápida"), a.innerHTML = `
|
|
1221
|
+
<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
1222
|
+
<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>
|
|
1223
|
+
</svg>
|
|
1224
|
+
`, a.addEventListener("click", () => {
|
|
1225
|
+
t.onQuickSelect(o);
|
|
1226
|
+
});
|
|
1227
|
+
const c = document.createElement("button");
|
|
1228
|
+
c.type = "button", c.className = "ui-prop__btn-autocad", c.title = "Selecionar objetos", c.setAttribute("aria-label", "Selecionar objetos"), c.innerHTML = `
|
|
1229
|
+
<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
1230
|
+
<circle cx="12" cy="12" r="7"></circle>
|
|
1231
|
+
<line x1="12" y1="2" x2="12" y2="7"></line>
|
|
1232
|
+
<line x1="12" y1="17" x2="12" y2="22"></line>
|
|
1233
|
+
<line x1="2" y1="12" x2="7" y2="12"></line>
|
|
1234
|
+
<line x1="17" y1="12" x2="22" y2="12"></line>
|
|
1235
|
+
<line x1="12" y1="9" x2="12" y2="15" stroke-width="2.5"></line>
|
|
1236
|
+
<line x1="9" y1="12" x2="15" y2="12" stroke-width="2.5"></line>
|
|
1237
|
+
</svg>
|
|
1238
|
+
`, c.addEventListener("click", () => {
|
|
1239
|
+
t.onSelectObjects(o);
|
|
1240
|
+
});
|
|
1241
|
+
const n = document.createElement("button");
|
|
1242
|
+
n.type = "button", n.className = "ui-prop__btn-autocad", n.title = "Calculadora rápida", n.setAttribute("aria-label", "Calculadora rápida"), n.innerHTML = `
|
|
1243
|
+
<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
1244
|
+
<rect x="4" y="2" width="16" height="20" rx="2"></rect>
|
|
1245
|
+
<line x1="8" y1="6" x2="16" y2="6"></line>
|
|
1246
|
+
<circle cx="8" cy="11" r="1" fill="currentColor"></circle>
|
|
1247
|
+
<circle cx="12" cy="11" r="1" fill="currentColor"></circle>
|
|
1248
|
+
<circle cx="16" cy="11" r="1" fill="currentColor"></circle>
|
|
1249
|
+
<circle cx="8" cy="15" r="1" fill="currentColor"></circle>
|
|
1250
|
+
<circle cx="12" cy="15" r="1" fill="currentColor"></circle>
|
|
1251
|
+
<circle cx="16" cy="15" r="1" fill="currentColor"></circle>
|
|
1252
|
+
</svg>
|
|
1253
|
+
`, n.addEventListener("click", () => {
|
|
1254
|
+
t.onCalculadora(o);
|
|
1255
|
+
}), r.appendChild(a), r.appendChild(c), r.appendChild(n), e.appendChild(i), e.appendChild(r), t.tipoContainerElement.appendChild(e);
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
function ge(t) {
|
|
1259
|
+
let o = 45;
|
|
1260
|
+
function e(r) {
|
|
1261
|
+
const a = Math.max(20, Math.min(65, r));
|
|
1262
|
+
return o = a, t.hostElement.style.setProperty("--ui-prop-rotulo-largura", `${a}%`), t.splitterElement && (t.splitterElement.style.left = `calc(${a}% - 4px)`), a;
|
|
1263
|
+
}
|
|
1264
|
+
function i() {
|
|
1265
|
+
if (!t.splitterElement || !t.corpoElement) return;
|
|
1266
|
+
t.splitterListeners.cleanup();
|
|
1267
|
+
let r = !1;
|
|
1268
|
+
const a = (c) => {
|
|
1269
|
+
if (c.button !== 0) return;
|
|
1270
|
+
c.preventDefault(), c.stopPropagation(), r = !0, t.splitterElement.classList.add("ui-prop__splitter--ativo");
|
|
1271
|
+
try {
|
|
1272
|
+
t.splitterElement.setPointerCapture(c.pointerId);
|
|
1273
|
+
} catch {
|
|
1274
|
+
}
|
|
1275
|
+
const n = t.corpoElement.getBoundingClientRect(), l = (d) => {
|
|
1276
|
+
if (!r) return;
|
|
1277
|
+
const s = n.width;
|
|
1278
|
+
if (s <= 0) return;
|
|
1279
|
+
const p = d.clientX - n.left;
|
|
1280
|
+
let g = Math.max(80, Math.min(s - 130, p)) / s * 100;
|
|
1281
|
+
g = Math.max(20, Math.min(65, g)), e(g);
|
|
1282
|
+
}, u = (d) => {
|
|
1283
|
+
if (r) {
|
|
1284
|
+
r = !1, t.splitterElement.classList.remove("ui-prop__splitter--ativo");
|
|
1285
|
+
try {
|
|
1286
|
+
t.splitterElement.hasPointerCapture(d.pointerId) && t.splitterElement.releasePointerCapture(d.pointerId);
|
|
1287
|
+
} catch {
|
|
1288
|
+
}
|
|
1289
|
+
t.splitterElement.removeEventListener("pointermove", l), t.splitterElement.removeEventListener("pointerup", u), t.splitterElement.removeEventListener("pointercancel", u), t.onLarguraAlterada(o), t.hostElement.dispatchEvent(
|
|
1290
|
+
new CustomEvent("ui-splitter-resize", {
|
|
1291
|
+
bubbles: !0,
|
|
1292
|
+
composed: !0,
|
|
1293
|
+
detail: { larguraPorcentagem: o }
|
|
1294
|
+
})
|
|
1295
|
+
);
|
|
1296
|
+
}
|
|
1297
|
+
};
|
|
1298
|
+
t.splitterElement.addEventListener("pointermove", l), t.splitterElement.addEventListener("pointerup", u), t.splitterElement.addEventListener("pointercancel", u);
|
|
1299
|
+
};
|
|
1300
|
+
t.splitterListeners.add(t.splitterElement, "pointerdown", a), t.splitterListeners.add(t.splitterElement, "dblclick", () => {
|
|
1301
|
+
e(45), t.onLarguraAlterada(45), t.hostElement.dispatchEvent(
|
|
1302
|
+
new CustomEvent("ui-splitter-resize", {
|
|
1303
|
+
bubbles: !0,
|
|
1304
|
+
composed: !0,
|
|
1305
|
+
detail: { larguraPorcentagem: 45 }
|
|
1306
|
+
})
|
|
1307
|
+
);
|
|
1308
|
+
});
|
|
1309
|
+
}
|
|
1310
|
+
return {
|
|
1311
|
+
init: i,
|
|
1312
|
+
definirLarguraRotulo: e
|
|
1313
|
+
};
|
|
1314
|
+
}
|
|
1315
|
+
const be = `:host{display:flex;flex-direction:column;box-sizing:border-box;font-family:var(--ui-fonte-familia, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 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:#ffffff0d;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:0 16px 48px #000000bf,0 0 0 1px #ffffff24,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%,rgba(255,255,255,.25) 50%,rgba(255,255,255,.25) 65%,transparent 65%,transparent 80%,rgba(255,255,255,.25) 80%);pointer-events:auto}.ui-prop__btn-icone--ativo{background-color:#00e08a2e!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: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:#ffffff0d;color:#fff}.ui-prop__tipo-select:focus{background-color:#00e08a14;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:#00e08a26}.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:rgba(255,255,255,.18) 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:#ffffff2e;border-radius:4px}.ui-prop__corpo::-webkit-scrollbar-thumb:hover{background:#ffffff4d}.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:#00e08a14}.ui-prop__linha:focus-within .ui-prop__col-rotulo{color:var(--ui-cor-texto, #ffffff);font-weight:500}.ui-prop__linha--modificada{background-color:#00e08a0d}.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:#00e08a0d}.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 #00e08a80}.ui-prop__splitter--ativo{background-color:#00e08a14}.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:#ffffff08}.ui-prop__editor-input--numero{text-align:right;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,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:#00e08a14!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:#ffffff08}.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:#ffffff0a}.ui-prop__cor-amostra{width:13px;height:13px;border-radius:2px;border:1px solid rgba(255,255,255,.3);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:#ffffff08}.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:#ffffff08}.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:#ffffff08}.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:#ffffff08}.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:#ffffff0a;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:ui-monospace,SFMono-Regular,Menlo,Monaco,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:#ffffff1a;color:#ffffff4d;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}}`;
|
|
1316
|
+
function xe() {
|
|
1317
|
+
return `
|
|
1318
|
+
<style>${be}</style>
|
|
1319
|
+
<div class="ui-prop__container" id="container">
|
|
1320
|
+
<!-- 0. Faixa Vertical da Coluna Estreita (visível quando colapsado) -->
|
|
1321
|
+
<div class="ui-prop__faixa-estreita" id="faixa-estreita" title="Clique para expandir painel">
|
|
1322
|
+
<span class="ui-prop__faixa-icone">
|
|
1323
|
+
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
|
|
1324
|
+
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
|
|
1325
|
+
<line x1="3" y1="9" x2="21" y2="9"></line>
|
|
1326
|
+
<line x1="9" y1="21" x2="9" y2="9"></line>
|
|
1327
|
+
</svg>
|
|
1328
|
+
</span>
|
|
1329
|
+
<button type="button" class="ui-prop__faixa-btn-expandir" id="btn-expandir-faixa" title="Expandir painel de propriedades">
|
|
1330
|
+
<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2">
|
|
1331
|
+
<polyline points="9 18 15 12 9 6"></polyline>
|
|
1332
|
+
<line x1="5" y1="5" x2="5" y2="19"></line>
|
|
1333
|
+
</svg>
|
|
1334
|
+
</button>
|
|
1335
|
+
<span class="ui-prop__faixa-texto">PROPRIEDADES</span>
|
|
1336
|
+
</div>
|
|
1337
|
+
|
|
1338
|
+
<!-- 1. Header Superior -->
|
|
1339
|
+
<header class="ui-prop__header" id="header">
|
|
1340
|
+
<div class="ui-prop__header-titulo">
|
|
1341
|
+
<span class="ui-prop__header-icone">
|
|
1342
|
+
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
|
1343
|
+
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
|
|
1344
|
+
<line x1="3" y1="9" x2="21" y2="9"></line>
|
|
1345
|
+
<line x1="9" y1="21" x2="9" y2="9"></line>
|
|
1346
|
+
</svg>
|
|
1347
|
+
</span>
|
|
1348
|
+
<span id="header-titulo-texto">Propriedades</span>
|
|
1349
|
+
</div>
|
|
1350
|
+
<div class="ui-prop__header-acoes">
|
|
1351
|
+
<button type="button" class="ui-prop__btn-icone" id="btn-flutuante" title="Desacoplar / Modo flutuante (CAD)" aria-label="Modo flutuante">
|
|
1352
|
+
<svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
|
|
1353
|
+
<rect x="3" y="3" width="14" height="14" rx="2"></rect>
|
|
1354
|
+
<polyline points="15 3 21 3 21 9"></polyline>
|
|
1355
|
+
<line x1="10" y1="14" x2="21" y2="3"></line>
|
|
1356
|
+
</svg>
|
|
1357
|
+
</button>
|
|
1358
|
+
<button type="button" class="ui-prop__btn-icone" id="btn-colapsar-horizontal" title="Recolher para coluna estreita" aria-label="Recolher para coluna estreita">
|
|
1359
|
+
<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
|
|
1360
|
+
<polyline points="11 17 6 12 11 7"></polyline>
|
|
1361
|
+
<line x1="18" y1="5" x2="18" y2="19"></line>
|
|
1362
|
+
</svg>
|
|
1363
|
+
</button>
|
|
1364
|
+
<button type="button" class="ui-prop__btn-icone" id="btn-densidade" title="Alternar compressão vertical" aria-label="Alternar densidade vertical">
|
|
1365
|
+
<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
|
|
1366
|
+
<polyline points="4 7 12 11 20 7"></polyline>
|
|
1367
|
+
<polyline points="4 17 12 13 20 17"></polyline>
|
|
1368
|
+
<line x1="4" y1="12" x2="20" y2="12"></line>
|
|
1369
|
+
</svg>
|
|
1370
|
+
</button>
|
|
1371
|
+
<button type="button" class="ui-prop__btn-icone" id="btn-expandir-tudo" title="Expandir/Recolher Tudo" aria-label="Expandir ou recolher tudo">
|
|
1372
|
+
<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
1373
|
+
<polyline points="7 13 12 18 17 13"></polyline>
|
|
1374
|
+
<polyline points="7 6 12 11 17 6"></polyline>
|
|
1375
|
+
</svg>
|
|
1376
|
+
</button>
|
|
1377
|
+
<button type="button" class="ui-prop__btn-icone" id="btn-fechar" title="Fechar" aria-label="Fechar" style="display: none;">
|
|
1378
|
+
✕
|
|
1379
|
+
</button>
|
|
1380
|
+
</div>
|
|
1381
|
+
</header>
|
|
1382
|
+
|
|
1383
|
+
<!-- 2. Seletor de Tipo (AutoCAD / Revit) -->
|
|
1384
|
+
<div class="ui-prop__tipo-seletor-container" id="tipo-container" style="display: none;"></div>
|
|
1385
|
+
|
|
1386
|
+
<!-- 3. Busca Rápida de Propriedades -->
|
|
1387
|
+
<div class="ui-prop__filtro-container" id="filtro-container" style="display: none;">
|
|
1388
|
+
<svg class="ui-prop__filtro-icone" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
1389
|
+
<circle cx="11" cy="11" r="8"></circle>
|
|
1390
|
+
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
|
1391
|
+
</svg>
|
|
1392
|
+
<input type="text" class="ui-prop__filtro-input" id="filtro-input" placeholder="Filtrar propriedades..." />
|
|
1393
|
+
</div>
|
|
1394
|
+
|
|
1395
|
+
<!-- 4. Corpo Rolável com Grade de Categorias -->
|
|
1396
|
+
<div class="ui-prop__corpo-wrapper" id="corpo-wrapper">
|
|
1397
|
+
<div class="ui-prop__splitter" id="splitter"></div>
|
|
1398
|
+
<div class="ui-prop__corpo" id="corpo">
|
|
1399
|
+
<div class="ui-prop__lista-categorias" id="lista-categorias"></div>
|
|
1400
|
+
</div>
|
|
1401
|
+
</div>
|
|
1402
|
+
|
|
1403
|
+
<!-- 5. Rodapé com Ações (Aplicar / Desfazer) -->
|
|
1404
|
+
<footer class="ui-prop__footer" id="footer" style="display: none;">
|
|
1405
|
+
<a class="ui-prop__link-ajuda" id="link-ajuda">Ajuda de propriedades</a>
|
|
1406
|
+
<div class="ui-prop__footer-botoes">
|
|
1407
|
+
<button type="button" class="ui-prop__btn-desfazer" id="btn-desfazer" disabled>Desfazer</button>
|
|
1408
|
+
<button type="button" class="ui-prop__btn-aplicar" id="btn-aplicar" disabled>Aplicar</button>
|
|
1409
|
+
</div>
|
|
1410
|
+
</footer>
|
|
1411
|
+
|
|
1412
|
+
<!-- 6. Grip para redimensionar no modo flutuante -->
|
|
1413
|
+
<div class="ui-prop__resizer-canto" id="resizer-canto" title="Redimensionar"></div>
|
|
1414
|
+
</div>
|
|
1415
|
+
`;
|
|
1416
|
+
}
|
|
1417
|
+
function ve(t) {
|
|
1418
|
+
const { listaContainer: o, categorias: e, termoBusca: i, onToggleCategoria: r, linhaCtx: a } = t;
|
|
1419
|
+
if (o.innerHTML = "", !e || e.length === 0) {
|
|
1420
|
+
const n = document.createElement("div");
|
|
1421
|
+
n.className = "ui-prop__vazio", n.textContent = "Nenhuma propriedade disponível.", o.appendChild(n);
|
|
1422
|
+
return;
|
|
1423
|
+
}
|
|
1424
|
+
const c = document.createDocumentFragment();
|
|
1425
|
+
e.forEach((n) => {
|
|
1426
|
+
const l = (n.propriedades || []).filter((x) => i ? x.rotulo.toLowerCase().includes(i) || String(x.id).toLowerCase().includes(i) : !0);
|
|
1427
|
+
if (i && l.length === 0)
|
|
1428
|
+
return;
|
|
1429
|
+
const u = n.aberto !== !1, d = document.createElement("div");
|
|
1430
|
+
d.className = `ui-prop__categoria ${u ? "ui-prop__categoria--aberta" : ""}`, d.setAttribute("data-cat-id", n.id);
|
|
1431
|
+
const s = document.createElement("div");
|
|
1432
|
+
s.className = "ui-prop__categoria-header";
|
|
1433
|
+
const p = document.createElement("div");
|
|
1434
|
+
p.className = "ui-prop__categoria-titulo-bloco";
|
|
1435
|
+
const m = document.createElement("span");
|
|
1436
|
+
m.className = "ui-prop__categoria-seta", m.textContent = "▶";
|
|
1437
|
+
const h = document.createElement("span");
|
|
1438
|
+
h.textContent = n.titulo, p.appendChild(m), p.appendChild(h);
|
|
1439
|
+
const b = document.createElement("span");
|
|
1440
|
+
b.className = "ui-prop__categoria-contador", b.textContent = String(l.length), s.appendChild(p), s.appendChild(b), s.addEventListener("click", () => r(n.id)), s.addEventListener("dblclick", () => r(n.id));
|
|
1441
|
+
const g = document.createElement("div");
|
|
1442
|
+
g.className = "ui-prop__categoria-conteudo", l.forEach((x) => {
|
|
1443
|
+
const v = _e(n.id, x, a);
|
|
1444
|
+
g.appendChild(v);
|
|
1445
|
+
}), d.appendChild(s), d.appendChild(g), c.appendChild(d);
|
|
1446
|
+
}), o.appendChild(c);
|
|
1447
|
+
}
|
|
1448
|
+
function _e(t, o, e) {
|
|
1449
|
+
const i = document.createElement("div");
|
|
1450
|
+
i.className = "ui-prop__linha", i.setAttribute("data-prop-id", o.id);
|
|
1451
|
+
const r = e.valoresAtuais[o.id] !== void 0 ? e.valoresAtuais[o.id] : o.valor, a = e.valoresOriginais[o.id];
|
|
1452
|
+
e.isDirty && r !== a && i.classList.add("ui-prop__linha--modificada"), i.addEventListener("dblclick", () => {
|
|
1453
|
+
const d = i.querySelector(
|
|
1454
|
+
'input:not([type="color"]):not(.ui-prop__cor-picker-oculto), select, .ui-prop__btn-acao-inline'
|
|
1455
|
+
);
|
|
1456
|
+
d && (d.focus(), d instanceof HTMLInputElement && d.select());
|
|
1457
|
+
});
|
|
1458
|
+
const c = document.createElement("div");
|
|
1459
|
+
c.className = "ui-prop__col-rotulo", c.title = o.rotulo;
|
|
1460
|
+
const n = document.createElement("span");
|
|
1461
|
+
n.textContent = o.rotulo, c.appendChild(n), o.tipo === "numero" && !o.somenteLeitura && Ee(c, t, o, e);
|
|
1462
|
+
const l = document.createElement("div");
|
|
1463
|
+
l.className = "ui-prop__col-valor";
|
|
1464
|
+
const u = me(t, o, r, e.editorCtx);
|
|
1465
|
+
if (l.appendChild(u), o.unidade) {
|
|
1466
|
+
const d = document.createElement("span");
|
|
1467
|
+
d.className = "ui-prop__unidade-sufixo", d.textContent = o.unidade, l.appendChild(d);
|
|
1468
|
+
}
|
|
1469
|
+
return i.appendChild(c), i.appendChild(l), i;
|
|
1470
|
+
}
|
|
1471
|
+
function Ee(t, o, e, i) {
|
|
1472
|
+
t.classList.add("ui-prop__col-rotulo--scrub"), t.title = `${e.rotulo} (Arraste para ajustar, duplo-clique para editar)`;
|
|
1473
|
+
let r = 0, a = 0, c = !1;
|
|
1474
|
+
t.addEventListener("pointerdown", (n) => {
|
|
1475
|
+
if (n.button !== 0) return;
|
|
1476
|
+
r = n.clientX;
|
|
1477
|
+
const l = i.valoresAtuais[e.id];
|
|
1478
|
+
a = typeof l == "number" ? l : parseFloat(String(l || 0)) || 0, c = !1;
|
|
1479
|
+
try {
|
|
1480
|
+
t.setPointerCapture(n.pointerId);
|
|
1481
|
+
} catch {
|
|
1482
|
+
}
|
|
1483
|
+
t.classList.add("ui-prop__col-rotulo--arrastando");
|
|
1484
|
+
const u = (s) => {
|
|
1485
|
+
const p = s.clientX - r;
|
|
1486
|
+
if (Math.abs(p) > 2 && (c = !0), c) {
|
|
1487
|
+
let m = 1;
|
|
1488
|
+
s.shiftKey ? m = 0.1 : (s.ctrlKey || s.metaKey) && (m = 10);
|
|
1489
|
+
const h = e.casasDecimais !== void 0 ? e.casasDecimais : 2, b = Math.pow(10, -Math.min(h, 2));
|
|
1490
|
+
let g = a + p * b * m;
|
|
1491
|
+
e.casasDecimais !== void 0 ? g = Number(g.toFixed(e.casasDecimais)) : g = Math.round(g * 100) / 100, i.editorCtx.registrarAlteracao(o, e.id, g), i.onAtualizarCampoVisual(e.id, g);
|
|
1492
|
+
}
|
|
1493
|
+
}, d = (s) => {
|
|
1494
|
+
t.classList.remove("ui-prop__col-rotulo--arrastando");
|
|
1495
|
+
try {
|
|
1496
|
+
t.hasPointerCapture(s.pointerId) && t.releasePointerCapture(s.pointerId);
|
|
1497
|
+
} catch {
|
|
1498
|
+
}
|
|
1499
|
+
t.removeEventListener("pointermove", u), t.removeEventListener("pointerup", d), t.removeEventListener("pointercancel", d);
|
|
1500
|
+
};
|
|
1501
|
+
t.addEventListener("pointermove", u), t.addEventListener("pointerup", d), t.addEventListener("pointercancel", d);
|
|
1502
|
+
});
|
|
1503
|
+
}
|
|
1504
|
+
const A = 300, ye = 480;
|
|
1505
|
+
function we(t) {
|
|
1506
|
+
const o = t.hasAttribute("flutuante");
|
|
1507
|
+
if (o)
|
|
1508
|
+
t.removeAttribute("flutuante"), t.style.left = "", t.style.top = "", t.style.right = "", t.style.bottom = "", t.style.position = "", t.style.zIndex = "";
|
|
1509
|
+
else if (t.setAttribute("flutuante", ""), t.style.position = "fixed", !t.style.left && !t.style.top) {
|
|
1510
|
+
const e = Math.max(
|
|
1511
|
+
20,
|
|
1512
|
+
(typeof window < "u" ? window.innerWidth : 1024) - A - 30
|
|
1513
|
+
);
|
|
1514
|
+
t.style.left = `${e}px`, t.style.top = "70px", t.style.width = `${A}px`, t.style.height = `${ye}px`;
|
|
1515
|
+
}
|
|
1516
|
+
return !o;
|
|
1517
|
+
}
|
|
1518
|
+
function Ce(t, o, e) {
|
|
1519
|
+
const i = o.getElementById("header");
|
|
1520
|
+
if (i) {
|
|
1521
|
+
let a = null, c = 0, n = 0, l = 0, u = 0;
|
|
1522
|
+
const d = (p) => {
|
|
1523
|
+
if (a === null) return;
|
|
1524
|
+
const m = p.clientX - c, h = p.clientY - n;
|
|
1525
|
+
let b = l + m, g = u + h;
|
|
1526
|
+
const x = Math.max(0, (typeof window < "u" ? window.innerWidth : 1024) - t.offsetWidth), v = Math.max(0, (typeof window < "u" ? window.innerHeight : 768) - 30);
|
|
1527
|
+
b = Math.max(0, Math.min(x, b)), g = Math.max(0, Math.min(v, g)), t.style.left = `${b}px`, t.style.top = `${g}px`, t.style.right = "auto", t.style.bottom = "auto";
|
|
1528
|
+
}, s = (p) => {
|
|
1529
|
+
if (a !== null) {
|
|
1530
|
+
try {
|
|
1531
|
+
i.releasePointerCapture(p.pointerId);
|
|
1532
|
+
} catch {
|
|
1533
|
+
}
|
|
1534
|
+
i.removeEventListener("pointermove", d), i.removeEventListener("pointerup", s), i.removeEventListener("pointercancel", s), a = null, t.classList.remove("arrastando"), t.dispatchEvent(new CustomEvent("ui-mover", {
|
|
1535
|
+
bubbles: !0,
|
|
1536
|
+
composed: !0,
|
|
1537
|
+
detail: { left: t.style.left, top: t.style.top }
|
|
1538
|
+
}));
|
|
1539
|
+
}
|
|
1540
|
+
};
|
|
1541
|
+
e.add(i, "pointerdown", (p) => {
|
|
1542
|
+
if (!t.hasAttribute("flutuante") || p.target.closest("button, input, select, a") || p.button !== 0) return;
|
|
1543
|
+
p.preventDefault(), a = p.pointerId, c = p.clientX, n = p.clientY;
|
|
1544
|
+
const h = t.getBoundingClientRect();
|
|
1545
|
+
l = h.left, u = h.top, t.classList.add("arrastando");
|
|
1546
|
+
try {
|
|
1547
|
+
i.setPointerCapture(p.pointerId);
|
|
1548
|
+
} catch {
|
|
1549
|
+
}
|
|
1550
|
+
i.addEventListener("pointermove", d), i.addEventListener("pointerup", s), i.addEventListener("pointercancel", s);
|
|
1551
|
+
});
|
|
1552
|
+
}
|
|
1553
|
+
const r = o.getElementById("resizer-canto");
|
|
1554
|
+
if (r) {
|
|
1555
|
+
let a = null, c = 0, n = 0, l = 0, u = 0;
|
|
1556
|
+
const d = (p) => {
|
|
1557
|
+
if (a === null) return;
|
|
1558
|
+
const m = Math.max(200, c + (p.clientX - l)), h = Math.max(180, n + (p.clientY - u));
|
|
1559
|
+
t.style.width = `${m}px`, t.style.height = `${h}px`;
|
|
1560
|
+
}, s = (p) => {
|
|
1561
|
+
if (a !== null) {
|
|
1562
|
+
try {
|
|
1563
|
+
r.releasePointerCapture(p.pointerId);
|
|
1564
|
+
} catch {
|
|
1565
|
+
}
|
|
1566
|
+
r.removeEventListener("pointermove", d), r.removeEventListener("pointerup", s), r.removeEventListener("pointercancel", s), a = null, t.dispatchEvent(new CustomEvent("ui-redimensionar", {
|
|
1567
|
+
bubbles: !0,
|
|
1568
|
+
composed: !0,
|
|
1569
|
+
detail: { width: t.style.width, height: t.style.height }
|
|
1570
|
+
}));
|
|
1571
|
+
}
|
|
1572
|
+
};
|
|
1573
|
+
e.add(r, "pointerdown", (p) => {
|
|
1574
|
+
if (!t.hasAttribute("flutuante") || p.button !== 0) return;
|
|
1575
|
+
p.preventDefault(), p.stopPropagation(), a = p.pointerId, l = p.clientX, u = p.clientY;
|
|
1576
|
+
const m = t.getBoundingClientRect();
|
|
1577
|
+
c = m.width, n = m.height;
|
|
1578
|
+
try {
|
|
1579
|
+
r.setPointerCapture(p.pointerId);
|
|
1580
|
+
} catch {
|
|
1581
|
+
}
|
|
1582
|
+
r.addEventListener("pointermove", d), r.addEventListener("pointerup", s), r.addEventListener("pointercancel", s);
|
|
1583
|
+
});
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
function ke(t) {
|
|
1587
|
+
return t === "compacta" ? "ultracompacta" : t === "ultracompacta" ? "padrao" : "compacta";
|
|
1588
|
+
}
|
|
1589
|
+
class ze {
|
|
1590
|
+
constructor(o) {
|
|
1591
|
+
f(this, "valoresOriginais", {});
|
|
1592
|
+
f(this, "valoresAtuais", {});
|
|
1593
|
+
f(this, "dirty", !1);
|
|
1594
|
+
this.ctx = o;
|
|
1595
|
+
}
|
|
1596
|
+
inicializarCategorias(o) {
|
|
1597
|
+
this.valoresOriginais = {}, this.valoresAtuais = {}, this.dirty = !1, o.forEach((e) => {
|
|
1598
|
+
(e.propriedades || []).forEach((i) => {
|
|
1599
|
+
this.valoresOriginais[i.id] = i.valor, this.valoresAtuais[i.id] = i.valor;
|
|
1600
|
+
});
|
|
1601
|
+
}), this.ctx.onAtualizarBotoesFooter(this.dirty);
|
|
1602
|
+
}
|
|
1603
|
+
get isDirty() {
|
|
1604
|
+
return this.dirty;
|
|
1605
|
+
}
|
|
1606
|
+
getValores() {
|
|
1607
|
+
return { ...this.valoresAtuais };
|
|
1608
|
+
}
|
|
1609
|
+
setValores(o) {
|
|
1610
|
+
!o || typeof o != "object" || (Object.keys(o).forEach((e) => {
|
|
1611
|
+
this.valoresAtuais[e] = o[e], this.valoresOriginais[e] = o[e];
|
|
1612
|
+
}), this.dirty = !1, this.ctx.onAtualizarBotoesFooter(this.dirty));
|
|
1613
|
+
}
|
|
1614
|
+
obterValor(o) {
|
|
1615
|
+
return this.valoresAtuais[o];
|
|
1616
|
+
}
|
|
1617
|
+
definirValor(o, e, i = !0) {
|
|
1618
|
+
var a;
|
|
1619
|
+
const r = this.valoresAtuais[o];
|
|
1620
|
+
if (this.valoresAtuais[o] = e, this.dirty = !0, this.ctx.onAtualizarBotoesFooter(this.dirty), this.ctx.onAtualizarCampoVisual(o, e), i) {
|
|
1621
|
+
let c = "";
|
|
1622
|
+
for (const n of this.ctx.getCategorias())
|
|
1623
|
+
if ((a = n.propriedades) != null && a.some((l) => l.id === o)) {
|
|
1624
|
+
c = n.id;
|
|
1625
|
+
break;
|
|
1626
|
+
}
|
|
1627
|
+
this.emitirAlteracao(o, e, r, c);
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
registrarAlteracao(o, e, i) {
|
|
1631
|
+
var c;
|
|
1632
|
+
const r = this.valoresAtuais[e];
|
|
1633
|
+
this.valoresAtuais[e] = i, this.dirty = !0, this.ctx.onAtualizarBotoesFooter(this.dirty);
|
|
1634
|
+
const a = (c = this.ctx.hostElement.shadowRoot) == null ? void 0 : c.querySelector(`[data-prop-id="${e}"]`);
|
|
1635
|
+
a && a.classList.add("ui-prop__linha--modificada"), this.ctx.isModoManual() || this.emitirAlteracao(e, i, r, o);
|
|
1636
|
+
}
|
|
1637
|
+
aplicar() {
|
|
1638
|
+
var e;
|
|
1639
|
+
if (!this.dirty) return;
|
|
1640
|
+
this.valoresOriginais = { ...this.valoresAtuais }, this.dirty = !1, this.ctx.onAtualizarBotoesFooter(this.dirty);
|
|
1641
|
+
const o = (e = this.ctx.hostElement.shadowRoot) == null ? void 0 : e.querySelectorAll(".ui-prop__linha--modificada");
|
|
1642
|
+
o == null || o.forEach((i) => i.classList.remove("ui-prop__linha--modificada")), this.ctx.hostElement.dispatchEvent(
|
|
1643
|
+
new CustomEvent("ui-aplicar", {
|
|
1644
|
+
bubbles: !0,
|
|
1645
|
+
composed: !0,
|
|
1646
|
+
detail: { valores: { ...this.valoresAtuais } }
|
|
1647
|
+
})
|
|
1648
|
+
);
|
|
1649
|
+
}
|
|
1650
|
+
desfazer() {
|
|
1651
|
+
this.dirty && (this.valoresAtuais = { ...this.valoresOriginais }, this.dirty = !1, this.ctx.onAtualizarBotoesFooter(this.dirty), this.ctx.onRenderCategorias(), this.ctx.hostElement.dispatchEvent(
|
|
1652
|
+
new CustomEvent("ui-desfazer", {
|
|
1653
|
+
bubbles: !0,
|
|
1654
|
+
composed: !0,
|
|
1655
|
+
detail: { valores: { ...this.valoresAtuais } }
|
|
1656
|
+
})
|
|
1657
|
+
));
|
|
1658
|
+
}
|
|
1659
|
+
emitirAlteracao(o, e, i, r = "") {
|
|
1660
|
+
this.ctx.hostElement.dispatchEvent(
|
|
1661
|
+
new CustomEvent("ui-propriedade-alterada", {
|
|
1662
|
+
bubbles: !0,
|
|
1663
|
+
composed: !0,
|
|
1664
|
+
detail: {
|
|
1665
|
+
id: o,
|
|
1666
|
+
categoriaId: r,
|
|
1667
|
+
valor: e,
|
|
1668
|
+
valorAnterior: i,
|
|
1669
|
+
todosValores: { ...this.valoresAtuais }
|
|
1670
|
+
}
|
|
1671
|
+
})
|
|
1672
|
+
);
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
function Ae(t) {
|
|
1676
|
+
const {
|
|
1677
|
+
shadow: o,
|
|
1678
|
+
listeners: e,
|
|
1679
|
+
host: i,
|
|
1680
|
+
onToggleExpandirTodas: r,
|
|
1681
|
+
onFiltrar: a,
|
|
1682
|
+
onAplicar: c,
|
|
1683
|
+
onDesfazer: n,
|
|
1684
|
+
onAlternarDensidade: l,
|
|
1685
|
+
onAlternarFlutuante: u,
|
|
1686
|
+
onAlternarColapsoHorizontal: d
|
|
1687
|
+
} = t, s = o.getElementById("btn-flutuante");
|
|
1688
|
+
s && u && e.add(s, "click", u);
|
|
1689
|
+
const p = o.getElementById("btn-colapsar-horizontal");
|
|
1690
|
+
p && d && e.add(p, "click", d);
|
|
1691
|
+
const m = o.getElementById("faixa-estreita");
|
|
1692
|
+
m && d && e.add(m, "click", d);
|
|
1693
|
+
const h = o.getElementById("btn-expandir-faixa");
|
|
1694
|
+
h && d && e.add(h, "click", (E) => {
|
|
1695
|
+
E.stopPropagation(), d();
|
|
1696
|
+
});
|
|
1697
|
+
const b = o.getElementById("btn-densidade");
|
|
1698
|
+
b && l && e.add(b, "click", l);
|
|
1699
|
+
const g = o.getElementById("btn-expandir-tudo");
|
|
1700
|
+
g && e.add(g, "click", r);
|
|
1701
|
+
const x = o.getElementById("btn-fechar");
|
|
1702
|
+
x && e.add(x, "click", () => {
|
|
1703
|
+
i.dispatchEvent(new CustomEvent("ui-fechar", { bubbles: !0, composed: !0 }));
|
|
1704
|
+
});
|
|
1705
|
+
const v = o.getElementById("filtro-input");
|
|
1706
|
+
v && e.add(v, "input", () => {
|
|
1707
|
+
const E = (v.value || "").trim().toLowerCase();
|
|
1708
|
+
a(E);
|
|
1709
|
+
});
|
|
1710
|
+
const w = o.getElementById("btn-aplicar");
|
|
1711
|
+
w && e.add(w, "click", c);
|
|
1712
|
+
const C = o.getElementById("btn-desfazer");
|
|
1713
|
+
C && e.add(C, "click", n);
|
|
1714
|
+
const k = o.getElementById("link-ajuda");
|
|
1715
|
+
k && e.add(k, "click", () => {
|
|
1716
|
+
i.dispatchEvent(new CustomEvent("ui-ajuda", { bubbles: !0, composed: !0 }));
|
|
1717
|
+
});
|
|
1718
|
+
}
|
|
1719
|
+
function _(t, o) {
|
|
1720
|
+
const e = t.getElementById("header-titulo-texto");
|
|
1721
|
+
e && (e.textContent = o.getAttribute("titulo") || "Propriedades");
|
|
1722
|
+
const i = t.getElementById("btn-fechar");
|
|
1723
|
+
i && (i.style.display = o.hasAttribute("fechavel") ? "inline-flex" : "none");
|
|
1724
|
+
const r = t.getElementById("btn-flutuante");
|
|
1725
|
+
if (r) {
|
|
1726
|
+
const u = o.hasAttribute("flutuante");
|
|
1727
|
+
r.title = u ? "Acoplar painel (Dock)" : "Desacoplar / Modo flutuante (CAD)", r.classList.toggle("ui-prop__btn-icone--ativo", u);
|
|
1728
|
+
}
|
|
1729
|
+
const a = t.getElementById("btn-colapsar-horizontal");
|
|
1730
|
+
if (a) {
|
|
1731
|
+
const u = o.hasAttribute("colapsado");
|
|
1732
|
+
a.title = u ? "Expandir painel" : "Recolher para coluna estreita", a.classList.toggle("ui-prop__btn-icone--ativo", u);
|
|
1733
|
+
}
|
|
1734
|
+
const c = t.getElementById("btn-densidade");
|
|
1735
|
+
if (c) {
|
|
1736
|
+
const u = o.getAttribute("densidade") || "padrão";
|
|
1737
|
+
c.title = `Compressão vertical: ${u} (clique para alternar)`;
|
|
1738
|
+
}
|
|
1739
|
+
const n = t.getElementById("filtro-container");
|
|
1740
|
+
n && (n.style.display = o.hasAttribute("filtro") ? "flex" : "none");
|
|
1741
|
+
const l = t.getElementById("footer");
|
|
1742
|
+
l && (l.style.display = o.getAttribute("modo-aplicar") === "manual" ? "flex" : "none");
|
|
1743
|
+
}
|
|
1744
|
+
function Se(t, o) {
|
|
1745
|
+
const e = Array.from(
|
|
1746
|
+
t.querySelectorAll(
|
|
1747
|
+
'.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])'
|
|
1748
|
+
)
|
|
1749
|
+
), i = e.indexOf(o);
|
|
1750
|
+
if (i !== -1 && i + 1 < e.length) {
|
|
1751
|
+
const r = e[i + 1];
|
|
1752
|
+
r.focus(), r instanceof HTMLInputElement && r.select();
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
function S(t, o, e) {
|
|
1756
|
+
const i = t.querySelector(`[data-prop-id="${o}"]`);
|
|
1757
|
+
if (!i) return;
|
|
1758
|
+
const r = i.querySelector('input:not([type="color"]):not(.ui-prop__cor-picker-oculto)');
|
|
1759
|
+
r && (r.value = String(e ?? ""));
|
|
1760
|
+
}
|
|
1761
|
+
function Le(t, o) {
|
|
1762
|
+
o.forEach((i) => i.aberto = !0), t.querySelectorAll(".ui-prop__categoria").forEach((i) => i.classList.add("ui-prop__categoria--aberta"));
|
|
1763
|
+
}
|
|
1764
|
+
function Me(t, o) {
|
|
1765
|
+
o.forEach((i) => i.aberto = !1), t.querySelectorAll(".ui-prop__categoria").forEach((i) => i.classList.remove("ui-prop__categoria--aberta"));
|
|
1766
|
+
}
|
|
1767
|
+
function Be(t, o, e, i) {
|
|
1768
|
+
const r = e.find((a) => a.id === i);
|
|
1769
|
+
if (r) {
|
|
1770
|
+
r.aberto = r.aberto === !1;
|
|
1771
|
+
const a = t.querySelector(`[data-cat-id="${i}"]`);
|
|
1772
|
+
a && a.classList.toggle("ui-prop__categoria--aberta", !!r.aberto), o.dispatchEvent(
|
|
1773
|
+
new CustomEvent("ui-categoria-toggle", {
|
|
1774
|
+
bubbles: !0,
|
|
1775
|
+
composed: !0,
|
|
1776
|
+
detail: { id: i, aberto: r.aberto }
|
|
1777
|
+
})
|
|
1778
|
+
);
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
class Ne extends M {
|
|
1782
|
+
constructor() {
|
|
1783
|
+
super();
|
|
1784
|
+
f(this, "shadow");
|
|
1785
|
+
f(this, "listeners", new y());
|
|
1786
|
+
f(this, "splitterListeners", new y());
|
|
1787
|
+
f(this, "controladorSplitter");
|
|
1788
|
+
f(this, "gerenciadorValores");
|
|
1789
|
+
f(this, "_categorias", []);
|
|
1790
|
+
f(this, "_tipos", []);
|
|
1791
|
+
f(this, "_tipoSelecionadoId", "");
|
|
1792
|
+
f(this, "_termoBusca", "");
|
|
1793
|
+
f(this, "_larguraRotuloPorcentagem", 45);
|
|
1794
|
+
f(this, "tipoContainerElement");
|
|
1795
|
+
f(this, "corpoElement");
|
|
1796
|
+
f(this, "btnAplicarElement");
|
|
1797
|
+
f(this, "btnDesfazerElement");
|
|
1798
|
+
f(this, "splitterElement");
|
|
1799
|
+
this.shadow = this.attachShadow({ mode: "open" }), this.shadow.innerHTML = xe(), 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 ze({
|
|
1800
|
+
hostElement: this,
|
|
1801
|
+
getCategorias: () => this._categorias,
|
|
1802
|
+
onAtualizarBotoesFooter: (e) => {
|
|
1803
|
+
this.btnAplicarElement.disabled = !e, this.btnDesfazerElement.disabled = !e;
|
|
1804
|
+
},
|
|
1805
|
+
onAtualizarCampoVisual: (e, i) => S(this.shadow, e, i),
|
|
1806
|
+
onRenderCategorias: () => this.renderCategorias(),
|
|
1807
|
+
isModoManual: () => this.getAttribute("modo-aplicar") === "manual"
|
|
1808
|
+
}), this.controladorSplitter = ge({
|
|
1809
|
+
hostElement: this,
|
|
1810
|
+
corpoElement: this.corpoElement,
|
|
1811
|
+
splitterElement: this.splitterElement,
|
|
1812
|
+
splitterListeners: this.splitterListeners,
|
|
1813
|
+
onLarguraAlterada: (e) => {
|
|
1814
|
+
this._larguraRotuloPorcentagem = e;
|
|
1815
|
+
}
|
|
1816
|
+
});
|
|
1817
|
+
}
|
|
1818
|
+
static get observedAttributes() {
|
|
1819
|
+
return [
|
|
1820
|
+
"titulo",
|
|
1821
|
+
"estilo-visual",
|
|
1822
|
+
"modo-aplicar",
|
|
1823
|
+
"filtro",
|
|
1824
|
+
"densidade",
|
|
1825
|
+
"largura-rotulo",
|
|
1826
|
+
"fechavel",
|
|
1827
|
+
"colapsado",
|
|
1828
|
+
"flutuante"
|
|
1829
|
+
];
|
|
1830
|
+
}
|
|
1831
|
+
get larguraRotuloPorcentagem() {
|
|
1832
|
+
return this._larguraRotuloPorcentagem;
|
|
1833
|
+
}
|
|
1834
|
+
connectedCallback() {
|
|
1835
|
+
this.listeners.cleanup(), Ae({
|
|
1836
|
+
shadow: this.shadow,
|
|
1837
|
+
listeners: this.listeners,
|
|
1838
|
+
host: this,
|
|
1839
|
+
onToggleExpandirTodas: () => this.toggleExpandirTodas(),
|
|
1840
|
+
onFiltrar: (e) => {
|
|
1841
|
+
this._termoBusca = e, this.renderCategorias();
|
|
1842
|
+
},
|
|
1843
|
+
onAplicar: () => this.aplicar(),
|
|
1844
|
+
onDesfazer: () => this.desfazer(),
|
|
1845
|
+
onAlternarDensidade: () => this.alternarDensidade(),
|
|
1846
|
+
onAlternarFlutuante: () => this.alternarFlutuante(),
|
|
1847
|
+
onAlternarColapsoHorizontal: () => this.alternarColapsoHorizontal()
|
|
1848
|
+
}), Ce(this, this.shadow, this.listeners), this.controladorSplitter.init(), this.syncState();
|
|
1849
|
+
}
|
|
1850
|
+
disconnectedCallback() {
|
|
1851
|
+
this.listeners.cleanup(), this.splitterListeners.cleanup();
|
|
1852
|
+
}
|
|
1853
|
+
attributeChangedCallback(e, i, r) {
|
|
1854
|
+
if (e === "largura-rotulo" && r) {
|
|
1855
|
+
const a = parseFloat(r);
|
|
1856
|
+
isNaN(a) || (this._larguraRotuloPorcentagem = this.controladorSplitter.definirLarguraRotulo(a));
|
|
1857
|
+
}
|
|
1858
|
+
this.syncState();
|
|
1859
|
+
}
|
|
1860
|
+
get categorias() {
|
|
1861
|
+
return this._categorias;
|
|
1862
|
+
}
|
|
1863
|
+
set categorias(e) {
|
|
1864
|
+
this._categorias = Array.isArray(e) ? e : [], this.gerenciadorValores.inicializarCategorias(this._categorias), this.renderCategorias();
|
|
1865
|
+
}
|
|
1866
|
+
get tipos() {
|
|
1867
|
+
return this._tipos;
|
|
1868
|
+
}
|
|
1869
|
+
set tipos(e) {
|
|
1870
|
+
this._tipos = Array.isArray(e) ? e : [], this.renderSeletorTipos();
|
|
1871
|
+
}
|
|
1872
|
+
get tipoSelecionado() {
|
|
1873
|
+
return this._tipoSelecionadoId;
|
|
1874
|
+
}
|
|
1875
|
+
set tipoSelecionado(e) {
|
|
1876
|
+
this._tipoSelecionadoId = e, this.renderSeletorTipos();
|
|
1877
|
+
}
|
|
1878
|
+
get valores() {
|
|
1879
|
+
return this.gerenciadorValores.getValores();
|
|
1880
|
+
}
|
|
1881
|
+
set valores(e) {
|
|
1882
|
+
this.gerenciadorValores.setValores(e), this.renderCategorias();
|
|
1883
|
+
}
|
|
1884
|
+
get isDirty() {
|
|
1885
|
+
return this.gerenciadorValores.isDirty;
|
|
1886
|
+
}
|
|
1887
|
+
get dirty() {
|
|
1888
|
+
return this.gerenciadorValores.isDirty;
|
|
1889
|
+
}
|
|
1890
|
+
obterValor(e) {
|
|
1891
|
+
return this.gerenciadorValores.obterValor(e);
|
|
1892
|
+
}
|
|
1893
|
+
definirValor(e, i, r = !0) {
|
|
1894
|
+
this.gerenciadorValores.definirValor(e, i, r);
|
|
1895
|
+
}
|
|
1896
|
+
aplicar() {
|
|
1897
|
+
this.gerenciadorValores.aplicar();
|
|
1898
|
+
}
|
|
1899
|
+
desfazer() {
|
|
1900
|
+
this.gerenciadorValores.desfazer();
|
|
1901
|
+
}
|
|
1902
|
+
expandirTudo() {
|
|
1903
|
+
Le(this.shadow, this._categorias);
|
|
1904
|
+
}
|
|
1905
|
+
colapsarTudo() {
|
|
1906
|
+
Me(this.shadow, this._categorias);
|
|
1907
|
+
}
|
|
1908
|
+
toggleCategoria(e) {
|
|
1909
|
+
Be(this.shadow, this, this._categorias, e);
|
|
1910
|
+
}
|
|
1911
|
+
get densidade() {
|
|
1912
|
+
return this.getAttribute("densidade") || "padrao";
|
|
1913
|
+
}
|
|
1914
|
+
set densidade(e) {
|
|
1915
|
+
!e || e === "padrao" ? this.removeAttribute("densidade") : this.setAttribute("densidade", e);
|
|
1916
|
+
}
|
|
1917
|
+
alternarDensidade() {
|
|
1918
|
+
const e = ke(this.getAttribute("densidade") || "padrao");
|
|
1919
|
+
return e === "padrao" ? this.removeAttribute("densidade") : this.setAttribute("densidade", e), this.dispatchEvent(
|
|
1920
|
+
new CustomEvent("ui-densidade-alterada", {
|
|
1921
|
+
bubbles: !0,
|
|
1922
|
+
composed: !0,
|
|
1923
|
+
detail: { densidade: e }
|
|
1924
|
+
})
|
|
1925
|
+
), _(this.shadow, this), e;
|
|
1926
|
+
}
|
|
1927
|
+
get flutuante() {
|
|
1928
|
+
return this.hasAttribute("flutuante");
|
|
1929
|
+
}
|
|
1930
|
+
set flutuante(e) {
|
|
1931
|
+
!!e !== this.hasAttribute("flutuante") && this.alternarFlutuante();
|
|
1932
|
+
}
|
|
1933
|
+
get colapsado() {
|
|
1934
|
+
return this.hasAttribute("colapsado");
|
|
1935
|
+
}
|
|
1936
|
+
set colapsado(e) {
|
|
1937
|
+
!!e !== this.hasAttribute("colapsado") && this.alternarColapsoHorizontal();
|
|
1938
|
+
}
|
|
1939
|
+
alternarFlutuante() {
|
|
1940
|
+
const e = we(this);
|
|
1941
|
+
return _(this.shadow, this), this.dispatchEvent(new CustomEvent("ui-flutuante-alterado", {
|
|
1942
|
+
bubbles: !0,
|
|
1943
|
+
composed: !0,
|
|
1944
|
+
detail: {
|
|
1945
|
+
flutuante: e,
|
|
1946
|
+
left: this.style.left,
|
|
1947
|
+
top: this.style.top,
|
|
1948
|
+
width: this.style.width,
|
|
1949
|
+
height: this.style.height
|
|
1950
|
+
}
|
|
1951
|
+
})), e;
|
|
1952
|
+
}
|
|
1953
|
+
alternarColapsoHorizontal() {
|
|
1954
|
+
const e = this.hasAttribute("colapsado");
|
|
1955
|
+
e ? this.removeAttribute("colapsado") : this.setAttribute("colapsado", "");
|
|
1956
|
+
const i = !e;
|
|
1957
|
+
return _(this.shadow, this), this.dispatchEvent(new CustomEvent("ui-colapso-horizontal", {
|
|
1958
|
+
bubbles: !0,
|
|
1959
|
+
composed: !0,
|
|
1960
|
+
detail: { colapsado: i }
|
|
1961
|
+
})), i;
|
|
1962
|
+
}
|
|
1963
|
+
syncState() {
|
|
1964
|
+
_(this.shadow, this);
|
|
1965
|
+
const e = this.getAttribute("largura-rotulo");
|
|
1966
|
+
if (e) {
|
|
1967
|
+
const i = parseFloat(e);
|
|
1968
|
+
isNaN(i) || (this._larguraRotuloPorcentagem = this.controladorSplitter.definirLarguraRotulo(i));
|
|
1969
|
+
}
|
|
1970
|
+
this.renderSeletorTipos(), this.renderCategorias();
|
|
1971
|
+
}
|
|
1972
|
+
toggleExpandirTodas() {
|
|
1973
|
+
this._categorias.some((i) => i.aberto === !1) ? this.expandirTudo() : this.colapsarTudo();
|
|
1974
|
+
}
|
|
1975
|
+
renderSeletorTipos() {
|
|
1976
|
+
fe({
|
|
1977
|
+
tipoContainerElement: this.tipoContainerElement,
|
|
1978
|
+
tipos: this._tipos,
|
|
1979
|
+
tipoSelecionadoId: this._tipoSelecionadoId,
|
|
1980
|
+
estiloVisual: this.getAttribute("estilo-visual") || "autocad",
|
|
1981
|
+
onSelecionarTipo: (e) => {
|
|
1982
|
+
this._tipoSelecionadoId = e, this.renderSeletorTipos();
|
|
1983
|
+
const i = this._tipos.find((r) => String(r.id) === String(e));
|
|
1984
|
+
this.dispatchEvent(new CustomEvent("ui-tipo-alterado", { bubbles: !0, composed: !0, detail: { id: e, tipo: i } }));
|
|
1985
|
+
},
|
|
1986
|
+
onEditarTipo: (e) => this.dispatchEvent(new CustomEvent("ui-editar-tipo-clique", { bubbles: !0, composed: !0, detail: { tipo: e } })),
|
|
1987
|
+
onQuickSelect: (e) => this.dispatchEvent(new CustomEvent("ui-quick-select", { bubbles: !0, composed: !0, detail: { tipo: e } })),
|
|
1988
|
+
onSelectObjects: (e) => this.dispatchEvent(new CustomEvent("ui-selecionar-objetos", { bubbles: !0, composed: !0, detail: { tipo: e } })),
|
|
1989
|
+
onCalculadora: (e) => this.dispatchEvent(new CustomEvent("ui-calculadora", { bubbles: !0, composed: !0, detail: { tipo: e } }))
|
|
1990
|
+
});
|
|
1991
|
+
}
|
|
1992
|
+
renderCategorias() {
|
|
1993
|
+
const e = this.shadow.getElementById("lista-categorias");
|
|
1994
|
+
e && ve({
|
|
1995
|
+
listaContainer: e,
|
|
1996
|
+
categorias: this._categorias,
|
|
1997
|
+
termoBusca: this._termoBusca,
|
|
1998
|
+
onToggleCategoria: (i) => this.toggleCategoria(i),
|
|
1999
|
+
linhaCtx: {
|
|
2000
|
+
valoresAtuais: this.gerenciadorValores.getValores(),
|
|
2001
|
+
valoresOriginais: {},
|
|
2002
|
+
isDirty: this.gerenciadorValores.isDirty,
|
|
2003
|
+
onAtualizarCampoVisual: (i, r) => S(this.shadow, i, r),
|
|
2004
|
+
editorCtx: {
|
|
2005
|
+
obterValorAtual: (i) => this.gerenciadorValores.obterValor(i),
|
|
2006
|
+
registrarAlteracao: (i, r, a) => {
|
|
2007
|
+
this.gerenciadorValores.registrarAlteracao(i, r, a);
|
|
2008
|
+
},
|
|
2009
|
+
focarProximoEditor: (i) => Se(this.shadow, i),
|
|
2010
|
+
despacharEventoAcao: (i, r) => {
|
|
2011
|
+
this.dispatchEvent(
|
|
2012
|
+
new CustomEvent("ui-acao-clique", {
|
|
2013
|
+
bubbles: !0,
|
|
2014
|
+
composed: !0,
|
|
2015
|
+
detail: { id: i.id, categoriaId: r, propriedade: i }
|
|
2016
|
+
})
|
|
2017
|
+
);
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
2020
|
+
}
|
|
2021
|
+
});
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
L("ui-tabela-propriedades", Ne);
|
|
2025
|
+
export {
|
|
2026
|
+
Z as A,
|
|
2027
|
+
Q as B,
|
|
2028
|
+
G as C,
|
|
2029
|
+
Y as D,
|
|
2030
|
+
Le as E,
|
|
2031
|
+
Se as F,
|
|
2032
|
+
ze as G,
|
|
2033
|
+
B as H,
|
|
2034
|
+
N as I,
|
|
2035
|
+
j as J,
|
|
2036
|
+
T as K,
|
|
2037
|
+
J as L,
|
|
2038
|
+
U as M,
|
|
2039
|
+
P as N,
|
|
2040
|
+
$ as O,
|
|
2041
|
+
ee as P,
|
|
2042
|
+
ke as Q,
|
|
2043
|
+
ve as R,
|
|
2044
|
+
X as S,
|
|
2045
|
+
V as T,
|
|
2046
|
+
oe as U,
|
|
2047
|
+
W as V,
|
|
2048
|
+
fe as W,
|
|
2049
|
+
D as X,
|
|
2050
|
+
_ as Y,
|
|
2051
|
+
te as Z,
|
|
2052
|
+
H as a,
|
|
2053
|
+
z as b,
|
|
2054
|
+
Ne as c,
|
|
2055
|
+
K as d,
|
|
2056
|
+
Be as e,
|
|
2057
|
+
F as f,
|
|
2058
|
+
we as g,
|
|
2059
|
+
O as h,
|
|
2060
|
+
S as i,
|
|
2061
|
+
ie as j,
|
|
2062
|
+
Me as k,
|
|
2063
|
+
Ce as l,
|
|
2064
|
+
Ae as m,
|
|
2065
|
+
ge as n,
|
|
2066
|
+
se as o,
|
|
2067
|
+
ae as p,
|
|
2068
|
+
pe as q,
|
|
2069
|
+
he as r,
|
|
2070
|
+
ce as s,
|
|
2071
|
+
ue as t,
|
|
2072
|
+
le as u,
|
|
2073
|
+
re as v,
|
|
2074
|
+
ne as w,
|
|
2075
|
+
de as x,
|
|
2076
|
+
me as y,
|
|
2077
|
+
_e as z
|
|
2078
|
+
};
|