@devjuliovilla/jv-ui 1.5.2 → 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.2",
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",
@@ -372,9 +372,13 @@ declare class JvIconComponent {
372
372
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<JvIconComponent, "jv-icon", never, { "name": { "alias": "name"; "required": true; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "strokeWidth": { "alias": "strokeWidth"; "required": false; "isSignal": true; }; "decorative": { "alias": "decorative"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
373
373
  }
374
374
 
375
+ interface JvIconElement {
376
+ tag: 'path' | 'circle' | 'line' | 'polyline' | 'rect' | 'ellipse' | 'polygon';
377
+ attrs: Record<string, string>;
378
+ }
375
379
  interface JvIconDefinition {
376
380
  viewBox: string;
377
- paths: string[];
381
+ elements: JvIconElement[];
378
382
  }
379
383
  declare const JV_FALLBACK_ICON_NAME = "circle-alert";
380
384
  declare const JV_LUCIDE_ICON_REGISTRY: Record<string, JvIconDefinition>;
@@ -591,13 +595,26 @@ interface JvGridColumn<T = any> {
591
595
  header: string;
592
596
  sortable?: boolean;
593
597
  searchable?: boolean;
598
+ filterable?: boolean;
594
599
  hidden?: boolean;
600
+ resizable?: boolean;
601
+ sticky?: 'left' | 'right' | null;
602
+ editable?: boolean;
595
603
  width?: string;
604
+ minWidth?: string;
605
+ maxWidth?: string;
596
606
  align?: 'start' | 'center' | 'end';
597
607
  type?: 'text' | 'number' | 'currency' | 'date' | 'datetime' | 'boolean';
598
608
  cellClass?: string;
599
609
  headerClass?: string;
600
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;
601
618
  }
602
619
  interface JvGridAction<T = any> {
603
620
  id: string;
@@ -606,6 +623,10 @@ interface JvGridAction<T = any> {
606
623
  variant?: 'default' | 'primary' | 'danger';
607
624
  disabled?: (row: T) => boolean;
608
625
  }
626
+ interface JvGridColumnWidth {
627
+ key: string;
628
+ width: string;
629
+ }
609
630
  interface JvGridOptions {
610
631
  searchable?: boolean;
611
632
  sortable?: boolean;
@@ -620,11 +641,41 @@ interface JvGridOptions {
620
641
  searchPlaceholder?: string;
621
642
  ariaLabel?: string;
622
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;
623
655
  }
624
656
  interface JvGridPageEvent {
625
657
  pageIndex: number;
626
658
  pageSize: number;
627
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
+ }
628
679
  declare const JV_GRID_DEFAULT_OPTIONS: JvGridOptions;
629
680
 
630
681
  declare class JvGridComponent<T = any> {
@@ -637,6 +688,7 @@ declare class JvGridComponent<T = any> {
637
688
  readonly trackBy: _angular_core.InputSignal<keyof T | ((row: T, index: number) => JvGridRowId) | null>;
638
689
  readonly selectedIds: _angular_core.InputSignal<JvGridRowId[]>;
639
690
  readonly rowClick: _angular_core.OutputEmitterRef<T>;
691
+ readonly rowDoubleClick: _angular_core.OutputEmitterRef<T>;
640
692
  readonly actionClick: _angular_core.OutputEmitterRef<{
641
693
  actionId: string;
642
694
  row: T;
@@ -645,6 +697,13 @@ declare class JvGridComponent<T = any> {
645
697
  readonly pageChange: _angular_core.OutputEmitterRef<JvGridPageEvent>;
646
698
  readonly searchChange: _angular_core.OutputEmitterRef<string>;
647
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>>;
648
707
  private readonly effectiveOptions;
649
708
  private readonly idKey;
650
709
  protected readonly resolvedOptions: _angular_core.Signal<{
@@ -661,9 +720,24 @@ declare class JvGridComponent<T = any> {
661
720
  searchPlaceholder?: string;
662
721
  ariaLabel?: string;
663
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;
664
734
  }>;
665
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>>;
666
739
  protected readonly visibleColumns: _angular_core.Signal<JvGridColumn<T>[]>;
740
+ protected readonly groupedHeaders: _angular_core.Signal<JvGridColumn<T>[]>;
667
741
  private readonly internalSelectedIds;
668
742
  readonly searchTerm: _angular_core.WritableSignal<string>;
669
743
  readonly sortState: _angular_core.WritableSignal<JvGridSortState>;
@@ -671,11 +745,18 @@ declare class JvGridComponent<T = any> {
671
745
  protected readonly pageSize: _angular_core.Signal<number>;
672
746
  private readonly searchPageResetter;
673
747
  private readonly selectedIdSet;
748
+ protected readonly hasActiveFilters: _angular_core.Signal<boolean>;
674
749
  protected readonly filteredData: _angular_core.Signal<T[]>;
675
750
  protected readonly sortedData: _angular_core.Signal<T[]>;
676
- protected readonly totalItems: _angular_core.Signal<number>;
677
- protected readonly totalPages: _angular_core.Signal<number>;
678
- 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>;
679
760
  protected readonly pageStart: _angular_core.Signal<number>;
680
761
  protected readonly pageEnd: _angular_core.Signal<number>;
681
762
  protected readonly pageRange: _angular_core.Signal<number[]>;
@@ -683,14 +764,28 @@ declare class JvGridComponent<T = any> {
683
764
  protected readonly someSelected: _angular_core.Signal<boolean>;
684
765
  protected readonly colspan: _angular_core.Signal<number>;
685
766
  protected readonly densityClass: _angular_core.Signal<string>;
767
+ protected editState: _angular_core.WritableSignal<{
768
+ rowId: JvGridRowId;
769
+ colKey: string;
770
+ } | null>;
686
771
  protected readonly t: (key: string, params?: Record<string, string | number>) => string;
687
772
  protected getRowId(row: T, index?: number): JvGridRowId;
688
773
  protected colKey(col: JvGridColumn<T>): string;
689
774
  protected getRawCellValue(row: T, col: JvGridColumn<T>): unknown;
690
775
  protected getCellValue(row: T, col: JvGridColumn<T>): unknown;
776
+ protected getEditValue(row: T, col: JvGridColumn<T>): string;
691
777
  protected formatValue(value: unknown, col: JvGridColumn<T>): string;
692
778
  protected getAriaSort(col: JvGridColumn<T>): 'ascending' | 'descending' | 'none' | null;
693
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>[];
694
789
  private findColumn;
695
790
  protected toggleSort(col: JvGridColumn<T>, event?: Event): void;
696
791
  protected readonly actionVariant: (v?: "default" | "primary" | "danger") => JvIntent;
@@ -700,11 +795,54 @@ declare class JvGridComponent<T = any> {
700
795
  protected toggleRow(row: T): void;
701
796
  protected toggleSelectAll(checked: boolean): void;
702
797
  protected onRowClick(event: Event | T, row?: T): void;
798
+ protected onRowDblClick(row: T): void;
703
799
  protected onActionClick(action: JvGridAction<T>, row: T): void;
800
+ protected onColumnFilterChange(col: JvGridColumn<T>, value: string): void;
704
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;
705
818
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<JvGridComponent<any>, never>;
706
- 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>;
820
+ }
821
+
822
+ interface JvPaginationEvent {
823
+ pageIndex: number;
824
+ pageSize: number;
825
+ }
826
+ declare class JvPaginationComponent {
827
+ private readonly translationService;
828
+ readonly totalItems: _angular_core.InputSignal<number>;
829
+ readonly pageSize: _angular_core.InputSignal<number>;
830
+ readonly pageSizeOptions: _angular_core.InputSignal<number[]>;
831
+ readonly pageIndex: _angular_core.InputSignal<number>;
832
+ readonly maxVisiblePages: _angular_core.InputSignal<number>;
833
+ readonly pageChange: _angular_core.OutputEmitterRef<JvPaginationEvent>;
834
+ protected readonly totalPages: _angular_core.Signal<number>;
835
+ protected readonly pageStart: _angular_core.Signal<number>;
836
+ protected readonly pageEnd: _angular_core.Signal<number>;
837
+ protected readonly pageRange: _angular_core.Signal<number[]>;
838
+ protected readonly pageSizeStr: _angular_core.Signal<string>;
839
+ protected readonly pageSizeOptionsList: _angular_core.Signal<JvSelectOption<string>[]>;
840
+ protected readonly t: (key: string, params?: Record<string, string | number>) => string;
841
+ protected goToPage(page: number): void;
842
+ protected onPageSizeChange(value: string): void;
843
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<JvPaginationComponent, never>;
844
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<JvPaginationComponent, "jv-pagination", never, { "totalItems": { "alias": "totalItems"; "required": true; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; "isSignal": true; }; "pageIndex": { "alias": "pageIndex"; "required": false; "isSignal": true; }; "maxVisiblePages": { "alias": "maxVisiblePages"; "required": false; "isSignal": true; }; }, { "pageChange": "pageChange"; }, never, never, true, never>;
707
845
  }
708
846
 
709
- 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, JvRadioComponent, JvSectionComponent, JvSelectComponent, JvSidebarComponent, JvSwitchComponent, JvThemeService, JvToastComponent, JvToastService, JvTopbarComponent, JvTranslationService, provideJvUi };
710
- export type { JvActiveConfirmDialog, JvBreadcrumbItem, JvChangePasswordSubmitEvent, JvConfirmOptions, JvDensity, JvForgotPasswordSubmitEvent, JvGridAction, JvGridColumn, JvGridOptions, JvGridPageEvent, JvGridRowId, JvGridSortDirection, JvGridSortState, JvGridTrackBy, JvIconDefinition, JvIntent, JvLoaderState, JvLocale, JvLoginSubmitEvent, JvNavItem, JvSelectOption, JvTheme, JvThemeOption, JvToastItem, JvToastPosition, JvToastViewport, JvTone, JvTopbarAction, JvUiConfig };
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 };
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 };