@masterkeymaterial/ui 0.2.18 → 0.2.20
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.
|
@@ -302,6 +302,11 @@ class LibUtil {
|
|
|
302
302
|
LOG(1, "⚠️ JSON Inválido: Não foi possível formatar o JSON.");
|
|
303
303
|
return texto;
|
|
304
304
|
}
|
|
305
|
+
if (!retorno) {
|
|
306
|
+
console.log("⚠️ JSON Vazio: O JSON é vazio ou nulo.", texto);
|
|
307
|
+
return texto;
|
|
308
|
+
}
|
|
309
|
+
;
|
|
305
310
|
if (colorir) {
|
|
306
311
|
let keyNameStart = '<span class="json-key">';
|
|
307
312
|
let nullStart = '<span class="json-null">';
|
|
@@ -2348,9 +2353,8 @@ class Formulario {
|
|
|
2348
2353
|
const campos = this.campos();
|
|
2349
2354
|
const valoresAtuais = this.values();
|
|
2350
2355
|
const novosValores = {};
|
|
2351
|
-
const tiposSemValor = [IField.Display, IField.Button];
|
|
2352
2356
|
for (const key of Object.keys(campos)) {
|
|
2353
|
-
if (key in valoresAtuais &&
|
|
2357
|
+
if (key in valoresAtuais && campos[key].sanitizeOnSubmit) {
|
|
2354
2358
|
novosValores[key] = valoresAtuais[key];
|
|
2355
2359
|
}
|
|
2356
2360
|
}
|
|
@@ -2425,6 +2429,7 @@ class CampoDe {
|
|
|
2425
2429
|
tipo: IField.Button,
|
|
2426
2430
|
prop,
|
|
2427
2431
|
tituloClicavel,
|
|
2432
|
+
sanitizeOnSubmit: true, // Button é padrão true.
|
|
2428
2433
|
onClick: click,
|
|
2429
2434
|
...config,
|
|
2430
2435
|
};
|