orbiq-neural-ui-kit 1.0.9 → 1.0.11
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/README.md
CHANGED
|
@@ -25,6 +25,7 @@ Elementos de UI básicos e indivisibles. No dependen de otros componentes.
|
|
|
25
25
|
- **Checkbox (`<neural-checkbox>`)**: Selector booleano simple.
|
|
26
26
|
- **Divider (`<neural-divider>`)**: Línea separadora estructural.
|
|
27
27
|
- **Error Message (`<neural-error-message>`)**: Texto estandarizado para feedback de validación.
|
|
28
|
+
- **FilterBuilder (`<neural-filter-builder>`)**: Organismo interactivo para construir filtros dinámicos y pasárselos a tablas o listas.
|
|
28
29
|
- **Form Label (`<neural-form-label>`)**: Etiqueta tipográfica para campos de entrada.
|
|
29
30
|
- **Icon (`<neural-icon>`)**: Componente envoltorio para renderizar vectores de Lucide.
|
|
30
31
|
- **Loading Indicator & Text**: Elementos visuales de carga y estados de espera.
|
|
@@ -1918,6 +1918,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
1918
1918
|
}]
|
|
1919
1919
|
}], propDecorators: { message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }] } });
|
|
1920
1920
|
|
|
1921
|
+
class NeuralFooterComponent {
|
|
1922
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1923
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: NeuralFooterComponent, isStandalone: true, selector: "neural-footer", ngImport: i0, template: `
|
|
1924
|
+
<footer class="border-t border-gray-200 p-4 text-center text-sm text-gray-500 w-full">
|
|
1925
|
+
<ng-content></ng-content>
|
|
1926
|
+
</footer>
|
|
1927
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
1928
|
+
}
|
|
1929
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralFooterComponent, decorators: [{
|
|
1930
|
+
type: Component,
|
|
1931
|
+
args: [{
|
|
1932
|
+
selector: 'neural-footer',
|
|
1933
|
+
standalone: true,
|
|
1934
|
+
imports: [CommonModule],
|
|
1935
|
+
template: `
|
|
1936
|
+
<footer class="border-t border-gray-200 p-4 text-center text-sm text-gray-500 w-full">
|
|
1937
|
+
<ng-content></ng-content>
|
|
1938
|
+
</footer>
|
|
1939
|
+
`
|
|
1940
|
+
}]
|
|
1941
|
+
}] });
|
|
1942
|
+
|
|
1921
1943
|
class NeuralFormLabelComponent {
|
|
1922
1944
|
label = input('', /* @ts-ignore */
|
|
1923
1945
|
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
@@ -12141,6 +12163,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
12141
12163
|
type: Output
|
|
12142
12164
|
}] } });
|
|
12143
12165
|
|
|
12166
|
+
class NeuralFilterBuilderComponent {
|
|
12167
|
+
// Configuración de los campos disponibles para filtrar
|
|
12168
|
+
fields = input.required(/* @ts-ignore */
|
|
12169
|
+
...(ngDevMode ? [{ debugName: "fields" }] : /* istanbul ignore next */ []));
|
|
12170
|
+
// Template opcional para inyectar un input de valor personalizado desde el componente padre
|
|
12171
|
+
valueInputTemplate = input(/* @ts-ignore */
|
|
12172
|
+
...(ngDevMode ? [undefined, { debugName: "valueInputTemplate" }] : /* istanbul ignore next */ []));
|
|
12173
|
+
// Evento que se emite cuando el usuario hace clic en "Aplicar filtros"
|
|
12174
|
+
apply = output();
|
|
12175
|
+
// Estado interno de las reglas
|
|
12176
|
+
rules = signal([], /* @ts-ignore */
|
|
12177
|
+
...(ngDevMode ? [{ debugName: "rules" }] : /* istanbul ignore next */ []));
|
|
12178
|
+
// Operadores disponibles (se podrían dinamizar según el tipo de campo en el futuro)
|
|
12179
|
+
operators = [
|
|
12180
|
+
{ value: 'equals', label: 'Iguales' },
|
|
12181
|
+
{ value: 'not_equals', label: 'Diferentes' },
|
|
12182
|
+
{ value: 'contains', label: 'Contiene' },
|
|
12183
|
+
{ value: 'greater_than', label: 'Mayor que' },
|
|
12184
|
+
{ value: 'less_than', label: 'Menor que' }
|
|
12185
|
+
];
|
|
12186
|
+
addRule() {
|
|
12187
|
+
this.rules.update(current => [
|
|
12188
|
+
...current,
|
|
12189
|
+
{ field: '', operator: 'equals', value: '' }
|
|
12190
|
+
]);
|
|
12191
|
+
}
|
|
12192
|
+
removeRule(index) {
|
|
12193
|
+
this.rules.update(current => current.filter((_, i) => i !== index));
|
|
12194
|
+
}
|
|
12195
|
+
clearRules() {
|
|
12196
|
+
this.rules.set([]);
|
|
12197
|
+
}
|
|
12198
|
+
applyFilters() {
|
|
12199
|
+
// Solo emitir reglas que tengan un campo seleccionado
|
|
12200
|
+
const validRules = this.rules().filter(r => r.field);
|
|
12201
|
+
this.apply.emit(validRules);
|
|
12202
|
+
}
|
|
12203
|
+
updateRule(index, key, value) {
|
|
12204
|
+
this.rules.update(current => {
|
|
12205
|
+
const newRules = [...current];
|
|
12206
|
+
newRules[index] = { ...newRules[index], [key]: value };
|
|
12207
|
+
return newRules;
|
|
12208
|
+
});
|
|
12209
|
+
}
|
|
12210
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralFilterBuilderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12211
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NeuralFilterBuilderComponent, isStandalone: true, selector: "neural-filter-builder", inputs: { fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: true, transformFunction: null }, valueInputTemplate: { classPropertyName: "valueInputTemplate", publicName: "valueInputTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { apply: "apply" }, ngImport: i0, template: "<div class=\"bg-white border border-gray-200 rounded-lg shadow-lg w-full max-w-2xl text-sm flex flex-col overflow-hidden\">\n \n <!-- Lista de Filtros -->\n <div class=\"p-4 flex flex-col gap-3\">\n @for (rule of rules(); track $index) {\n <div class=\"flex items-center gap-2 w-full\">\n \n <!-- Seleccionar Campo -->\n <select \n class=\"flex-1 bg-gray-50 border border-transparent focus:border-gray-300 focus:bg-white focus:ring-0 rounded-md p-2 outline-none transition-colors\"\n [ngModel]=\"rule.field\" \n (ngModelChange)=\"updateRule($index, 'field', $event)\">\n <option value=\"\" disabled>Seleccione un campo...</option>\n @for (field of fields(); track field.key) {\n <option [value]=\"field.key\">{{ field.label }}</option>\n }\n </select>\n\n <!-- Seleccionar Operador -->\n <select \n class=\"flex-1 bg-gray-50 border border-transparent focus:border-gray-300 focus:bg-white focus:ring-0 rounded-md p-2 outline-none transition-colors\"\n [ngModel]=\"rule.operator\" \n (ngModelChange)=\"updateRule($index, 'operator', $event)\">\n @for (op of operators; track op.value) {\n <option [value]=\"op.value\">{{ op.label }}</option>\n }\n </select>\n\n <!-- Valor: Template personalizado o input por defecto -->\n <div class=\"flex-[1.5] relative\">\n @if (valueInputTemplate()) {\n <ng-container *ngTemplateOutlet=\"valueInputTemplate()!; context: { $implicit: rule, index: $index, updateRule: updateRule.bind(this) }\"></ng-container>\n } @else {\n <input \n type=\"text\" \n class=\"w-full bg-gray-50 border border-transparent focus:border-gray-300 focus:bg-white focus:ring-0 rounded-md p-2 outline-none transition-colors\"\n placeholder=\"Valor...\"\n [ngModel]=\"rule.value\" \n (ngModelChange)=\"updateRule($index, 'value', $event)\">\n }\n </div>\n\n <!-- Bot\u00F3n para eliminar regla -->\n <button \n (click)=\"removeRule($index)\"\n class=\"p-2 text-gray-400 hover:text-red-500 rounded-md hover:bg-red-50 transition-colors ml-1\"\n aria-label=\"Eliminar filtro\">\n <neural-icon name=\"x\" size=\"16\"></neural-icon>\n </button>\n </div>\n }\n\n <!-- Fila vac\u00EDa inicial si no hay filtros -->\n @if (rules().length === 0) {\n <div class=\"text-gray-400 italic text-center py-4 text-xs\">\n No hay filtros activos. Haz clic en \"+ A\u00F1adir Filtro\".\n </div>\n }\n </div>\n\n <hr class=\"border-gray-100 m-0\">\n\n <!-- Acciones -->\n <div class=\"p-4 bg-gray-50 flex items-center justify-between\">\n <button \n (click)=\"addRule()\"\n class=\"text-gray-600 font-medium hover:text-gray-900 transition-colors flex items-center gap-1\">\n <span class=\"text-lg leading-none\">+</span> A\u00F1adir Filtro\n </button>\n\n <div class=\"flex items-center gap-2\">\n <neural-button \n variant=\"ghost\" \n theme=\"gray\" \n (click)=\"clearRules()\">\n Borrar Filtros\n </neural-button>\n \n <neural-button \n variant=\"solid\" \n theme=\"gray\" \n (click)=\"applyFilters()\">\n Aplicar filtros\n </neural-button>\n </div>\n </div>\n\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple]):not([ngNoCva])[formControlName],select:not([multiple]):not([ngNoCva])[formControl],select:not([multiple]):not([ngNoCva])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: NeuralButtonComponent, selector: "neural-button", inputs: ["variant", "theme", "size", "type", "disabled", "loading", "icon", "iconLeft", "iconRight", "iconOnly"], outputs: ["clicked"] }, { kind: "component", type: NeuralIconComponent, selector: "neural-icon", inputs: ["name"] }] });
|
|
12212
|
+
}
|
|
12213
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralFilterBuilderComponent, decorators: [{
|
|
12214
|
+
type: Component,
|
|
12215
|
+
args: [{ selector: 'neural-filter-builder', standalone: true, imports: [CommonModule, FormsModule, NeuralButtonComponent, NeuralIconComponent], template: "<div class=\"bg-white border border-gray-200 rounded-lg shadow-lg w-full max-w-2xl text-sm flex flex-col overflow-hidden\">\n \n <!-- Lista de Filtros -->\n <div class=\"p-4 flex flex-col gap-3\">\n @for (rule of rules(); track $index) {\n <div class=\"flex items-center gap-2 w-full\">\n \n <!-- Seleccionar Campo -->\n <select \n class=\"flex-1 bg-gray-50 border border-transparent focus:border-gray-300 focus:bg-white focus:ring-0 rounded-md p-2 outline-none transition-colors\"\n [ngModel]=\"rule.field\" \n (ngModelChange)=\"updateRule($index, 'field', $event)\">\n <option value=\"\" disabled>Seleccione un campo...</option>\n @for (field of fields(); track field.key) {\n <option [value]=\"field.key\">{{ field.label }}</option>\n }\n </select>\n\n <!-- Seleccionar Operador -->\n <select \n class=\"flex-1 bg-gray-50 border border-transparent focus:border-gray-300 focus:bg-white focus:ring-0 rounded-md p-2 outline-none transition-colors\"\n [ngModel]=\"rule.operator\" \n (ngModelChange)=\"updateRule($index, 'operator', $event)\">\n @for (op of operators; track op.value) {\n <option [value]=\"op.value\">{{ op.label }}</option>\n }\n </select>\n\n <!-- Valor: Template personalizado o input por defecto -->\n <div class=\"flex-[1.5] relative\">\n @if (valueInputTemplate()) {\n <ng-container *ngTemplateOutlet=\"valueInputTemplate()!; context: { $implicit: rule, index: $index, updateRule: updateRule.bind(this) }\"></ng-container>\n } @else {\n <input \n type=\"text\" \n class=\"w-full bg-gray-50 border border-transparent focus:border-gray-300 focus:bg-white focus:ring-0 rounded-md p-2 outline-none transition-colors\"\n placeholder=\"Valor...\"\n [ngModel]=\"rule.value\" \n (ngModelChange)=\"updateRule($index, 'value', $event)\">\n }\n </div>\n\n <!-- Bot\u00F3n para eliminar regla -->\n <button \n (click)=\"removeRule($index)\"\n class=\"p-2 text-gray-400 hover:text-red-500 rounded-md hover:bg-red-50 transition-colors ml-1\"\n aria-label=\"Eliminar filtro\">\n <neural-icon name=\"x\" size=\"16\"></neural-icon>\n </button>\n </div>\n }\n\n <!-- Fila vac\u00EDa inicial si no hay filtros -->\n @if (rules().length === 0) {\n <div class=\"text-gray-400 italic text-center py-4 text-xs\">\n No hay filtros activos. Haz clic en \"+ A\u00F1adir Filtro\".\n </div>\n }\n </div>\n\n <hr class=\"border-gray-100 m-0\">\n\n <!-- Acciones -->\n <div class=\"p-4 bg-gray-50 flex items-center justify-between\">\n <button \n (click)=\"addRule()\"\n class=\"text-gray-600 font-medium hover:text-gray-900 transition-colors flex items-center gap-1\">\n <span class=\"text-lg leading-none\">+</span> A\u00F1adir Filtro\n </button>\n\n <div class=\"flex items-center gap-2\">\n <neural-button \n variant=\"ghost\" \n theme=\"gray\" \n (click)=\"clearRules()\">\n Borrar Filtros\n </neural-button>\n \n <neural-button \n variant=\"solid\" \n theme=\"gray\" \n (click)=\"applyFilters()\">\n Aplicar filtros\n </neural-button>\n </div>\n </div>\n\n</div>\n" }]
|
|
12216
|
+
}], propDecorators: { fields: [{ type: i0.Input, args: [{ isSignal: true, alias: "fields", required: true }] }], valueInputTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueInputTemplate", required: false }] }], apply: [{ type: i0.Output, args: ["apply"] }] } });
|
|
12217
|
+
|
|
12144
12218
|
class NeuralPageHeaderComponent {
|
|
12145
12219
|
title = input('', /* @ts-ignore */
|
|
12146
12220
|
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
@@ -13692,5 +13766,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
13692
13766
|
* Generated bundle index. Do not edit.
|
|
13693
13767
|
*/
|
|
13694
13768
|
|
|
13695
|
-
export { NeuralAccordionComponent, NeuralAlertComponent, NeuralAvatarComponent, NeuralAxisChartComponent, NeuralBadgeComponent, NeuralBottomSheetComponent, NeuralBreadcrumbsComponent, NeuralButtonComponent, NeuralCalendarComponent, NeuralCheckboxComponent, NeuralCodeEditorComponent, NeuralCodePreviewComponent, NeuralComboboxComponent, NeuralCommandPaletteComponent, NeuralContextMenuComponent, NeuralDatePickerComponent, NeuralDesktopShellComponent, NeuralDialogComponent, NeuralDividerComponent, NeuralDonutChartComponent, NeuralDropdownComponent, NeuralDurationComponent, NeuralEChartsComponent, NeuralErrorMessageComponent, NeuralFileUploaderComponent, NeuralFloatingWindowComponent, NeuralFormControlComponent, NeuralFormLabelComponent, NeuralFunnelChartComponent, NeuralHoverCardComponent, NeuralIconComponent, NeuralInputDescriptionComponent, NeuralInputErrorComponent, NeuralInputLabelComponent, NeuralItemListRowComponent, NeuralKeyboardShortcutComponent, NeuralLabelingWrapperComponent, NeuralListViewComponent, NeuralLoadingIndicatorComponent, NeuralLoadingTextComponent, NeuralMenuComponent, NeuralMobileNavComponent, NeuralMobileNavItemComponent, NeuralMobileShellComponent, NeuralMultiEmailInputComponent, NeuralMultiSelectComponent, NeuralNumberChartComponent, NeuralPageHeaderComponent, NeuralPasswordComponent, NeuralPopoverComponent, NeuralPopoverContentDirective, NeuralPopoverPanelComponent, NeuralPopoverTriggerDirective, NeuralProgressComponent, NeuralRadioComponent, NeuralRadioGroupComponent, NeuralRailComponent, NeuralRailItemComponent, NeuralRatingComponent, NeuralRequiredIndicatorComponent, NeuralScrollAreaComponent, NeuralSelectComponent, NeuralSettingsContentComponent, NeuralSettingsDialogComponent, NeuralSettingsNavItemComponent, NeuralSettingsPanelComponent, NeuralSettingsSidebarComponent, NeuralSidebarComponent, NeuralSidebarItemComponent, NeuralSkeletonComponent, NeuralSliderComponent, NeuralSpinnerComponent, NeuralSwitchComponent, NeuralTabComponent, NeuralTabPanelComponent, NeuralTabsComponent, NeuralTextEditorComponent, NeuralTextInputComponent, NeuralTextareaComponent, NeuralThemeSwitcherComponent, NeuralTimePickerComponent, NeuralToastComponent, NeuralTooltipComponent, NeuralTreeComponent, NeuralTreeItemComponent, RADIO_GROUP, TABS_ROOT, ToastService, formatDuration, parseDuration };
|
|
13769
|
+
export { NeuralAccordionComponent, NeuralAlertComponent, NeuralAvatarComponent, NeuralAxisChartComponent, NeuralBadgeComponent, NeuralBottomSheetComponent, NeuralBreadcrumbsComponent, NeuralButtonComponent, NeuralCalendarComponent, NeuralCheckboxComponent, NeuralCodeEditorComponent, NeuralCodePreviewComponent, NeuralComboboxComponent, NeuralCommandPaletteComponent, NeuralContextMenuComponent, NeuralDatePickerComponent, NeuralDesktopShellComponent, NeuralDialogComponent, NeuralDividerComponent, NeuralDonutChartComponent, NeuralDropdownComponent, NeuralDurationComponent, NeuralEChartsComponent, NeuralErrorMessageComponent, NeuralFileUploaderComponent, NeuralFilterBuilderComponent, NeuralFloatingWindowComponent, NeuralFooterComponent, NeuralFormControlComponent, NeuralFormLabelComponent, NeuralFunnelChartComponent, NeuralHoverCardComponent, NeuralIconComponent, NeuralInputDescriptionComponent, NeuralInputErrorComponent, NeuralInputLabelComponent, NeuralItemListRowComponent, NeuralKeyboardShortcutComponent, NeuralLabelingWrapperComponent, NeuralListViewComponent, NeuralLoadingIndicatorComponent, NeuralLoadingTextComponent, NeuralMenuComponent, NeuralMobileNavComponent, NeuralMobileNavItemComponent, NeuralMobileShellComponent, NeuralMultiEmailInputComponent, NeuralMultiSelectComponent, NeuralNumberChartComponent, NeuralPageHeaderComponent, NeuralPasswordComponent, NeuralPopoverComponent, NeuralPopoverContentDirective, NeuralPopoverPanelComponent, NeuralPopoverTriggerDirective, NeuralProgressComponent, NeuralRadioComponent, NeuralRadioGroupComponent, NeuralRailComponent, NeuralRailItemComponent, NeuralRatingComponent, NeuralRequiredIndicatorComponent, NeuralScrollAreaComponent, NeuralSelectComponent, NeuralSettingsContentComponent, NeuralSettingsDialogComponent, NeuralSettingsNavItemComponent, NeuralSettingsPanelComponent, NeuralSettingsSidebarComponent, NeuralSidebarComponent, NeuralSidebarItemComponent, NeuralSkeletonComponent, NeuralSliderComponent, NeuralSpinnerComponent, NeuralSwitchComponent, NeuralTabComponent, NeuralTabPanelComponent, NeuralTabsComponent, NeuralTextEditorComponent, NeuralTextInputComponent, NeuralTextareaComponent, NeuralThemeSwitcherComponent, NeuralTimePickerComponent, NeuralToastComponent, NeuralTooltipComponent, NeuralTreeComponent, NeuralTreeItemComponent, RADIO_GROUP, TABS_ROOT, ToastService, formatDuration, parseDuration };
|
|
13696
13770
|
//# sourceMappingURL=orbiq-neural-ui-kit.mjs.map
|