@devjuliovilla/jv-ui 1.5.3 → 1.5.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devjuliovilla/jv-ui",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "description": "Accessibility-first Angular component library — components, forms, data grids, dialogs, layout, services, and i18n infrastructure built with signals and standalone APIs.",
5
5
  "author": "@devjuliovilla",
6
6
  "license": "MIT",
@@ -595,13 +595,26 @@ interface JvGridColumn<T = any> {
595
595
  header: string;
596
596
  sortable?: boolean;
597
597
  searchable?: boolean;
598
+ filterable?: boolean;
598
599
  hidden?: boolean;
600
+ resizable?: boolean;
601
+ sticky?: 'left' | 'right' | null;
602
+ editable?: boolean;
599
603
  width?: string;
604
+ minWidth?: string;
605
+ maxWidth?: string;
600
606
  align?: 'start' | 'center' | 'end';
601
607
  type?: 'text' | 'number' | 'currency' | 'date' | 'datetime' | 'boolean';
602
608
  cellClass?: string;
603
609
  headerClass?: string;
604
610
  format?: (value: unknown, row: T) => string;
611
+ editType?: 'text' | 'number' | 'select' | 'boolean';
612
+ editOptions?: {
613
+ label: string;
614
+ value: unknown;
615
+ }[];
616
+ children?: JvGridColumn<T>[];
617
+ filterValue?: string;
605
618
  }
606
619
  interface JvGridAction<T = any> {
607
620
  id: string;
@@ -610,6 +623,10 @@ interface JvGridAction<T = any> {
610
623
  variant?: 'default' | 'primary' | 'danger';
611
624
  disabled?: (row: T) => boolean;
612
625
  }
626
+ interface JvGridColumnWidth {
627
+ key: string;
628
+ width: string;
629
+ }
613
630
  interface JvGridOptions {
614
631
  searchable?: boolean;
615
632
  sortable?: boolean;
@@ -624,11 +641,41 @@ interface JvGridOptions {
624
641
  searchPlaceholder?: string;
625
642
  ariaLabel?: string;
626
643
  trackBy?: JvGridTrackBy<any>;
644
+ serverSide?: boolean;
645
+ totalItems?: number;
646
+ stickyColumns?: boolean;
647
+ resizableColumns?: boolean;
648
+ reorderableColumns?: boolean;
649
+ editable?: boolean;
650
+ virtualScroll?: boolean;
651
+ virtualScrollRowHeight?: number;
652
+ exportable?: boolean;
653
+ columnFilters?: boolean;
654
+ rowDoubleClick?: boolean;
627
655
  }
628
656
  interface JvGridPageEvent {
629
657
  pageIndex: number;
630
658
  pageSize: number;
631
659
  }
660
+ interface JvGridColumnReorderEvent {
661
+ columnKey: string;
662
+ newIndex: number;
663
+ }
664
+ interface JvGridColumnResizeEvent {
665
+ columnKey: string;
666
+ width: string;
667
+ }
668
+ interface JvGridRowEditEvent<T = any> {
669
+ row: T;
670
+ column: JvGridColumn<T>;
671
+ value: unknown;
672
+ }
673
+ type JvGridFilterOperator = 'contains' | 'equals' | 'startsWith' | 'endsWith' | 'gt' | 'gte' | 'lt' | 'lte' | 'between';
674
+ interface JvGridColumnFilter {
675
+ key: string;
676
+ value: string;
677
+ operator: JvGridFilterOperator;
678
+ }
632
679
  declare const JV_GRID_DEFAULT_OPTIONS: JvGridOptions;
633
680
 
634
681
  declare class JvGridComponent<T = any> {
@@ -641,6 +688,7 @@ declare class JvGridComponent<T = any> {
641
688
  readonly trackBy: _angular_core.InputSignal<keyof T | ((row: T, index: number) => JvGridRowId) | null>;
642
689
  readonly selectedIds: _angular_core.InputSignal<JvGridRowId[]>;
643
690
  readonly rowClick: _angular_core.OutputEmitterRef<T>;
691
+ readonly rowDoubleClick: _angular_core.OutputEmitterRef<T>;
644
692
  readonly actionClick: _angular_core.OutputEmitterRef<{
645
693
  actionId: string;
646
694
  row: T;
@@ -649,6 +697,13 @@ declare class JvGridComponent<T = any> {
649
697
  readonly pageChange: _angular_core.OutputEmitterRef<JvGridPageEvent>;
650
698
  readonly searchChange: _angular_core.OutputEmitterRef<string>;
651
699
  readonly sortChange: _angular_core.OutputEmitterRef<JvGridSortState>;
700
+ readonly columnFilter: _angular_core.OutputEmitterRef<{
701
+ columnKey: string;
702
+ value: string;
703
+ }>;
704
+ readonly columnResize: _angular_core.OutputEmitterRef<JvGridColumnResizeEvent>;
705
+ readonly columnReorder: _angular_core.OutputEmitterRef<JvGridColumnReorderEvent>;
706
+ readonly rowEdit: _angular_core.OutputEmitterRef<JvGridRowEditEvent<T>>;
652
707
  private readonly effectiveOptions;
653
708
  private readonly idKey;
654
709
  protected readonly resolvedOptions: _angular_core.Signal<{
@@ -665,9 +720,24 @@ declare class JvGridComponent<T = any> {
665
720
  searchPlaceholder?: string;
666
721
  ariaLabel?: string;
667
722
  trackBy?: _devjuliovilla_jv_ui.JvGridTrackBy<any>;
723
+ serverSide?: boolean;
724
+ totalItems?: number;
725
+ stickyColumns?: boolean;
726
+ resizableColumns?: boolean;
727
+ reorderableColumns?: boolean;
728
+ editable?: boolean;
729
+ virtualScroll?: boolean;
730
+ virtualScrollRowHeight?: number;
731
+ exportable?: boolean;
732
+ columnFilters?: boolean;
733
+ rowDoubleClick?: boolean;
668
734
  }>;
669
735
  protected readonly gridLabel: _angular_core.Signal<string>;
736
+ protected readonly columnOrder: _angular_core.WritableSignal<string[]>;
737
+ protected readonly colFilters: _angular_core.WritableSignal<Record<string, JvGridColumnFilter>>;
738
+ protected readonly columnWidths: _angular_core.WritableSignal<Record<string, string>>;
670
739
  protected readonly visibleColumns: _angular_core.Signal<JvGridColumn<T>[]>;
740
+ protected readonly groupedHeaders: _angular_core.Signal<JvGridColumn<T>[]>;
671
741
  private readonly internalSelectedIds;
672
742
  readonly searchTerm: _angular_core.WritableSignal<string>;
673
743
  readonly sortState: _angular_core.WritableSignal<JvGridSortState>;
@@ -675,11 +745,18 @@ declare class JvGridComponent<T = any> {
675
745
  protected readonly pageSize: _angular_core.Signal<number>;
676
746
  private readonly searchPageResetter;
677
747
  private readonly selectedIdSet;
748
+ protected readonly hasActiveFilters: _angular_core.Signal<boolean>;
678
749
  protected readonly filteredData: _angular_core.Signal<T[]>;
679
750
  protected readonly sortedData: _angular_core.Signal<T[]>;
680
- protected readonly totalItems: _angular_core.Signal<number>;
681
- protected readonly totalPages: _angular_core.Signal<number>;
682
- protected readonly pagedData: _angular_core.Signal<T[]>;
751
+ protected readonly effectiveTotalItems: _angular_core.Signal<number>;
752
+ protected readonly effectiveTotalPages: _angular_core.Signal<number>;
753
+ protected readonly displayData: _angular_core.Signal<T[]>;
754
+ protected readonly virtualScroll: _angular_core.Signal<number | false | undefined>;
755
+ protected readonly virtualStartIndex: _angular_core.WritableSignal<number>;
756
+ protected readonly virtualEndIndex: _angular_core.WritableSignal<number>;
757
+ protected readonly virtualDisplayData: _angular_core.Signal<T[]>;
758
+ protected readonly virtualTotalHeight: _angular_core.Signal<number>;
759
+ protected readonly virtualOffsetY: _angular_core.Signal<number>;
683
760
  protected readonly pageStart: _angular_core.Signal<number>;
684
761
  protected readonly pageEnd: _angular_core.Signal<number>;
685
762
  protected readonly pageRange: _angular_core.Signal<number[]>;
@@ -687,14 +764,28 @@ declare class JvGridComponent<T = any> {
687
764
  protected readonly someSelected: _angular_core.Signal<boolean>;
688
765
  protected readonly colspan: _angular_core.Signal<number>;
689
766
  protected readonly densityClass: _angular_core.Signal<string>;
767
+ protected editState: _angular_core.WritableSignal<{
768
+ rowId: JvGridRowId;
769
+ colKey: string;
770
+ } | null>;
690
771
  protected readonly t: (key: string, params?: Record<string, string | number>) => string;
691
772
  protected getRowId(row: T, index?: number): JvGridRowId;
692
773
  protected colKey(col: JvGridColumn<T>): string;
693
774
  protected getRawCellValue(row: T, col: JvGridColumn<T>): unknown;
694
775
  protected getCellValue(row: T, col: JvGridColumn<T>): unknown;
776
+ protected getEditValue(row: T, col: JvGridColumn<T>): string;
695
777
  protected formatValue(value: unknown, col: JvGridColumn<T>): string;
696
778
  protected getAriaSort(col: JvGridColumn<T>): 'ascending' | 'descending' | 'none' | null;
697
779
  protected getSortLabel(col: JvGridColumn<T>): string;
780
+ protected getColumnWidth(col: JvGridColumn<T>): string | undefined;
781
+ protected isStickyLeft(col: JvGridColumn<T>): boolean;
782
+ protected isStickyRight(col: JvGridColumn<T>): boolean;
783
+ protected isColumnResizable(col: JvGridColumn<T>): boolean;
784
+ protected isCellEditable(col: JvGridColumn<T>): boolean;
785
+ protected groupColspan(group: JvGridColumn<T>): number;
786
+ protected isEditingCell(row: T, col: JvGridColumn<T>): boolean;
787
+ protected isRowEditing(row: T): boolean;
788
+ protected getEditOptions(col: JvGridColumn<T>): JvSelectOption<string>[];
698
789
  private findColumn;
699
790
  protected toggleSort(col: JvGridColumn<T>, event?: Event): void;
700
791
  protected readonly actionVariant: (v?: "default" | "primary" | "danger") => JvIntent;
@@ -704,10 +795,28 @@ declare class JvGridComponent<T = any> {
704
795
  protected toggleRow(row: T): void;
705
796
  protected toggleSelectAll(checked: boolean): void;
706
797
  protected onRowClick(event: Event | T, row?: T): void;
798
+ protected onRowDblClick(row: T): void;
707
799
  protected onActionClick(action: JvGridAction<T>, row: T): void;
800
+ protected onColumnFilterChange(col: JvGridColumn<T>, value: string): void;
708
801
  protected getRowLabel(row: T, index: number): string;
802
+ protected startEdit(row: T, col: JvGridColumn<T>, event: MouseEvent): void;
803
+ protected commitEdit(row: T, col: JvGridColumn<T>, value: unknown): void;
804
+ protected cancelEdit(): void;
805
+ protected onEditValueChange(row: T, col: JvGridColumn<T>, value: string): void;
806
+ private resizeData;
807
+ protected onResizeStart(event: MouseEvent, col: JvGridColumn<T>, _colIdx: number): void;
808
+ private readonly onResizeMove;
809
+ private readonly onResizeEnd;
810
+ private dragIndex;
811
+ protected onDragStart(event: DragEvent, colIdx: number): void;
812
+ protected onDragOver(event: DragEvent, _colIdx: number): void;
813
+ protected onDrop(event: DragEvent, targetIdx: number): void;
814
+ protected onDragEnd(_event: DragEvent): void;
815
+ protected onVirtualScroll(target: HTMLElement): void;
816
+ protected exportCsv(): void;
817
+ protected exportExcel(): void;
709
818
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<JvGridComponent<any>, never>;
710
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<JvGridComponent<any>, "jv-grid", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "trackBy": { "alias": "trackBy"; "required": false; "isSignal": true; }; "selectedIds": { "alias": "selectedIds"; "required": false; "isSignal": true; }; }, { "rowClick": "rowClick"; "actionClick": "actionClick"; "selectionChange": "selectionChange"; "pageChange": "pageChange"; "searchChange": "searchChange"; "sortChange": "sortChange"; }, never, never, true, never>;
819
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<JvGridComponent<any>, "jv-grid", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "trackBy": { "alias": "trackBy"; "required": false; "isSignal": true; }; "selectedIds": { "alias": "selectedIds"; "required": false; "isSignal": true; }; }, { "rowClick": "rowClick"; "rowDoubleClick": "rowDoubleClick"; "actionClick": "actionClick"; "selectionChange": "selectionChange"; "pageChange": "pageChange"; "searchChange": "searchChange"; "sortChange": "sortChange"; "columnFilter": "columnFilter"; "columnResize": "columnResize"; "columnReorder": "columnReorder"; "rowEdit": "rowEdit"; }, never, never, true, never>;
711
820
  }
712
821
 
713
822
  interface JvPaginationEvent {
@@ -736,4 +845,4 @@ declare class JvPaginationComponent {
736
845
  }
737
846
 
738
847
  export { EN, ES, JV_DEFAULT_LOCALE, JV_FALLBACK_ICON_NAME, JV_GRID_DEFAULT_OPTIONS, JV_LOCALE_DICTIONARIES, JV_LUCIDE_ICON_REGISTRY, JV_UI_CONFIG, JV_UI_CONFIG_DEFAULTS, JV_UI_DEFAULT_CONFIG, JvAlertComponent, JvAnnouncementService, JvBadgeComponent, JvBreadcrumbComponent, JvButtonComponent, JvButtonGroupComponent, JvCardComponent, JvChangePasswordPageComponent, JvCheckboxComponent, JvConfirmDialogComponent, JvDashboardShellComponent, JvDialogComponent, JvDialogService, JvDividerComponent, JvForgotPasswordPageComponent, JvFormContainerComponent, JvGridComponent, JvIconButtonComponent, JvIconComponent, JvInputComponent, JvLoaderComponent, JvLoaderService, JvLoginPageComponent, JvPageComponent, JvPaginationComponent, JvRadioComponent, JvSectionComponent, JvSelectComponent, JvSidebarComponent, JvSwitchComponent, JvThemeService, JvToastComponent, JvToastService, JvTopbarComponent, JvTranslationService, provideJvUi };
739
- export type { JvActiveConfirmDialog, JvBreadcrumbItem, JvChangePasswordSubmitEvent, JvConfirmOptions, JvDensity, JvForgotPasswordSubmitEvent, JvGridAction, JvGridColumn, JvGridOptions, JvGridPageEvent, JvGridRowId, JvGridSortDirection, JvGridSortState, JvGridTrackBy, JvIconDefinition, JvIconElement, JvIntent, JvLoaderState, JvLocale, JvLoginSubmitEvent, JvNavItem, JvPaginationEvent, JvSelectOption, JvTheme, JvThemeOption, JvToastItem, JvToastPosition, JvToastViewport, JvTone, JvTopbarAction, JvUiConfig };
848
+ export type { JvActiveConfirmDialog, JvBreadcrumbItem, JvChangePasswordSubmitEvent, JvConfirmOptions, JvDensity, JvForgotPasswordSubmitEvent, JvGridAction, JvGridColumn, JvGridColumnFilter, JvGridColumnReorderEvent, JvGridColumnResizeEvent, JvGridColumnWidth, JvGridFilterOperator, JvGridOptions, JvGridPageEvent, JvGridRowEditEvent, JvGridRowId, JvGridSortDirection, JvGridSortState, JvGridTrackBy, JvIconDefinition, JvIconElement, JvIntent, JvLoaderState, JvLocale, JvLoginSubmitEvent, JvNavItem, JvPaginationEvent, JvSelectOption, JvTheme, JvThemeOption, JvToastItem, JvToastPosition, JvToastViewport, JvTone, JvTopbarAction, JvUiConfig };