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