orbiq-neural-ui-kit 1.0.22 → 1.0.23
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.
|
@@ -12474,7 +12474,7 @@ class NeuralFilterBuilderComponent {
|
|
|
12474
12474
|
// Evento que se emite cuando el usuario hace clic en "Aplicar filtros"
|
|
12475
12475
|
apply = output();
|
|
12476
12476
|
// Estado interno de las reglas
|
|
12477
|
-
rules = signal([], /* @ts-ignore */
|
|
12477
|
+
rules = signal([{ field: '', operator: 'equals', value: '' }], /* @ts-ignore */
|
|
12478
12478
|
...(ngDevMode ? [{ debugName: "rules" }] : /* istanbul ignore next */ []));
|
|
12479
12479
|
// Operadores disponibles (se podrían dinamizar según el tipo de campo en el futuro)
|
|
12480
12480
|
operators = [
|
|
@@ -12491,10 +12491,13 @@ class NeuralFilterBuilderComponent {
|
|
|
12491
12491
|
]);
|
|
12492
12492
|
}
|
|
12493
12493
|
removeRule(index) {
|
|
12494
|
-
this.rules.update(current =>
|
|
12494
|
+
this.rules.update(current => {
|
|
12495
|
+
const filtered = current.filter((_, i) => i !== index);
|
|
12496
|
+
return filtered.length > 0 ? filtered : [{ field: '', operator: 'equals', value: '' }];
|
|
12497
|
+
});
|
|
12495
12498
|
}
|
|
12496
12499
|
clearRules() {
|
|
12497
|
-
this.rules.set([]);
|
|
12500
|
+
this.rules.set([{ field: '', operator: 'equals', value: '' }]);
|
|
12498
12501
|
}
|
|
12499
12502
|
applyFilters() {
|
|
12500
12503
|
// Solo emitir reglas que tengan un campo seleccionado
|