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