ngx-lite-form 1.4.0 → 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
  /**
@@ -311,6 +317,7 @@ declare class LiteDateTime {
311
317
  selectedHour: number;
312
318
  selectedMinute: number;
313
319
  selectedDateTime: CalendarDateTime | null;
320
+ private selectionChangeSignal;
314
321
  calendarDays: _angular_core.Signal<CalendarDateTime[]>;
315
322
  private getMonthDays;
316
323
  readonly FormUtils: typeof FormUtils;
@@ -460,8 +467,15 @@ declare class LiteTable<T = any> {
460
467
  action: string;
461
468
  row: T;
462
469
  }>;
470
+ sortChange: _angular_core.OutputEmitterRef<{
471
+ column: string;
472
+ direction: SortDirection;
473
+ }>;
474
+ private internalSortState;
463
475
  openMenuIndex: number | null;
464
476
  menuOpenUpward: boolean;
477
+ constructor();
478
+ private sortRows;
465
479
  paginatedData: _angular_core.Signal<T[]>;
466
480
  getCellValue(row: any, column: TableColumn): string;
467
481
  private getValue;
@@ -470,8 +484,10 @@ declare class LiteTable<T = any> {
470
484
  toggleMenu(rowIndex: number, event?: MouseEvent): void;
471
485
  onMenuItemClick(action: string, row: T, event?: MouseEvent): void;
472
486
  onDocumentClick(): void;
487
+ onSort(column: TableColumn): void;
488
+ getSortDirection(columnKey: string): SortDirection;
473
489
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<LiteTable<any>, never>;
474
- 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>;
475
491
  }
476
492
 
477
493
  interface LitePanelAction {
@@ -510,7 +526,7 @@ declare class LitePanel implements AfterViewInit, OnDestroy {
510
526
  readonly contentComponent: _angular_core.Signal<Type<any> | null>;
511
527
  readonly templateContext: {
512
528
  panel: LitePanel;
513
- close: (value?: unknown) => void;
529
+ close: (_value?: unknown) => void;
514
530
  };
515
531
  readonly panelStyles: _angular_core.Signal<Record<string, string>>;
516
532
  close(value?: unknown | null): void;
@@ -571,4 +587,4 @@ declare class LiteLoading {
571
587
  }
572
588
 
573
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 };
574
- 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.0",
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",