ngx-lite-form 1.4.1 → 1.4.2

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/index.d.ts CHANGED
@@ -51,7 +51,7 @@ interface TableColumn {
51
51
  label: string;
52
52
  flex?: string;
53
53
  sortable?: boolean;
54
- cellTemplate?: (value: any, row: any) => string;
54
+ cellTemplate?: (_value: any, _row: any) => string;
55
55
  type?: 'text' | 'menu';
56
56
  menuItems?: Array<{
57
57
  label: string;
@@ -59,12 +59,18 @@ interface TableColumn {
59
59
  variant?: 'danger' | 'default';
60
60
  }>;
61
61
  }
62
+ type SortDirection = 'asc' | 'desc' | null;
63
+ interface SortState {
64
+ column: string;
65
+ direction: SortDirection;
66
+ }
62
67
  declare class TableFieldDto<T = any> {
63
68
  columns: TableColumn[];
64
69
  data: T[];
65
70
  showPaginator?: boolean;
66
71
  paginatorConfig: PaginatorFieldDto;
67
- constructor(columns: TableColumn[], data: T[], showPaginator?: boolean, paginatorConfig?: PaginatorFieldDto);
72
+ sortState?: SortState;
73
+ constructor(columns: TableColumn[], data: T[], showPaginator?: boolean, paginatorConfig?: PaginatorFieldDto, sortState?: SortState);
68
74
  }
69
75
 
70
76
  /**
@@ -461,8 +467,15 @@ declare class LiteTable<T = any> {
461
467
  action: string;
462
468
  row: T;
463
469
  }>;
470
+ sortChange: _angular_core.OutputEmitterRef<{
471
+ column: string;
472
+ direction: SortDirection;
473
+ }>;
474
+ private internalSortState;
464
475
  openMenuIndex: number | null;
465
476
  menuOpenUpward: boolean;
477
+ constructor();
478
+ private sortRows;
466
479
  paginatedData: _angular_core.Signal<T[]>;
467
480
  getCellValue(row: any, column: TableColumn): string;
468
481
  private getValue;
@@ -471,8 +484,10 @@ declare class LiteTable<T = any> {
471
484
  toggleMenu(rowIndex: number, event?: MouseEvent): void;
472
485
  onMenuItemClick(action: string, row: T, event?: MouseEvent): void;
473
486
  onDocumentClick(): void;
487
+ onSort(column: TableColumn): void;
488
+ getSortDirection(columnKey: string): SortDirection;
474
489
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<LiteTable<any>, never>;
475
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<LiteTable<any>, "lite-table", never, { "table": { "alias": "table"; "required": true; "isSignal": true; }; }, { "pageChange": "pageChange"; "itemsPerPageChange": "itemsPerPageChange"; "menuAction": "menuAction"; }, never, never, true, never>;
490
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<LiteTable<any>, "lite-table", never, { "table": { "alias": "table"; "required": true; "isSignal": true; }; }, { "pageChange": "pageChange"; "itemsPerPageChange": "itemsPerPageChange"; "menuAction": "menuAction"; "sortChange": "sortChange"; }, never, never, true, never>;
476
491
  }
477
492
 
478
493
  interface LitePanelAction {
@@ -511,7 +526,7 @@ declare class LitePanel implements AfterViewInit, OnDestroy {
511
526
  readonly contentComponent: _angular_core.Signal<Type<any> | null>;
512
527
  readonly templateContext: {
513
528
  panel: LitePanel;
514
- close: (value?: unknown) => void;
529
+ close: (_value?: unknown) => void;
515
530
  };
516
531
  readonly panelStyles: _angular_core.Signal<Record<string, string>>;
517
532
  close(value?: unknown | null): void;
@@ -572,4 +587,4 @@ declare class LiteLoading {
572
587
  }
573
588
 
574
589
  export { BaseSelectFieldDto, FieldDto, FileFieldDto, FormUtils, LiteCheckbox, LiteDate, LiteDateTime, LiteFile, LiteInput, LiteLoading, LiteMultiSelect, LitePaginator, LitePanel, LitePassword, LiteRadio, LiteSelect, LiteSnackbarService, LiteTable, LiteTextarea, MultiSelectFieldDto, PaginatorFieldDto, RadioFieldDto, SelectFieldDto, TableFieldDto };
575
- export type { DateRangeFieldDto, FileItem, LitePanelAction, LoadingView, SnackbarType, TableColumn };
590
+ export type { DateRangeFieldDto, FileItem, LitePanelAction, LoadingView, SnackbarType, SortDirection, SortState, TableColumn };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-lite-form",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Lightweight Angular 20+ form library with 15+ standalone components: input, textarea, select, multi-select, radio, checkbox, password, date picker, datetime picker, file upload, data table, pagination, modal panel, loading indicators, and toast notifications",
5
5
  "keywords": [
6
6
  "angular",