@eternalcodestudio/primeng-table 19.0.0 → 19.0.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.
Files changed (33) hide show
  1. package/README.md +7 -0
  2. package/fesm2022/eternalcodestudio-primeng-table.mjs +671 -424
  3. package/fesm2022/eternalcodestudio-primeng-table.mjs.map +1 -1
  4. package/lib/components/column-selector/column-selector.d.ts +3 -0
  5. package/lib/components/ecs-primeng-table/ecs-primeng-table.d.ts +37 -62
  6. package/lib/components/ecs-primeng-table/ecs-primeng-table.service.d.ts +3 -1
  7. package/lib/components/table-button/table-button.d.ts +1 -4
  8. package/lib/components/table-cell/table-cell.d.ts +7 -5
  9. package/lib/components/{table-predifined-filters/table-predifined-filters.d.ts → table-predefined-filters/table-predefined-filters.d.ts} +10 -5
  10. package/lib/components/views-management/views-management.d.ts +4 -3
  11. package/lib/enums/cell-overflow-behaviour.enum.d.ts +11 -1
  12. package/lib/enums/data-align-horizontal.enum.d.ts +9 -0
  13. package/lib/enums/data-align-vertical.enum.d.ts +9 -0
  14. package/lib/enums/data-type.enum.enum.d.ts +14 -1
  15. package/lib/enums/frozen-column-align.enum.d.ts +10 -0
  16. package/lib/enums/table-view-save-mode.enum.d.ts +15 -4
  17. package/lib/interfaces/columns-metadata.interface.d.ts +1 -1
  18. package/lib/interfaces/index.d.ts +2 -1
  19. package/lib/interfaces/predefined-filter.interface.d.ts +80 -0
  20. package/lib/interfaces/table-button.interface.d.ts +59 -12
  21. package/lib/interfaces/table-configuration.interface.d.ts +1 -0
  22. package/lib/interfaces/table-options.interface.d.ts +433 -0
  23. package/lib/interfaces/table-paged-response.interface.d.ts +0 -7
  24. package/lib/interfaces/table-query-request.interface.d.ts +0 -9
  25. package/lib/services/http.service.d.ts +27 -2
  26. package/lib/services/notification.service.d.ts +17 -1
  27. package/lib/utils/create-table-options.d.ts +5 -0
  28. package/lib/utils/index.d.ts +1 -0
  29. package/package.json +5 -4
  30. package/public-api.d.ts +1 -0
  31. package/fesm2022/ecs-primeng-table.mjs +0 -1745
  32. package/fesm2022/ecs-primeng-table.mjs.map +0 -1
  33. package/lib/interfaces/predifined-filter.interface.d.ts +0 -34
@@ -13,14 +13,17 @@ export declare class ColumnSelector {
13
13
  cellOverflowBehaviourOptions: {
14
14
  icon: string;
15
15
  val: CellOverflowBehaviour;
16
+ name: string;
16
17
  }[];
17
18
  dataAlignHorizontalOptions: {
18
19
  icon: string;
19
20
  val: DataAlignHorizontal;
21
+ name: string;
20
22
  }[];
21
23
  dataAlignVerticalOptions: {
22
24
  icon: string;
23
25
  val: DataAlignVertical;
26
+ name: string;
24
27
  }[];
25
28
  globalSearchText: string | null;
26
29
  globalSearchMaxLength: number;
@@ -1,55 +1,15 @@
1
- import { AfterViewInit, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
1
+ import { AfterViewInit, ElementRef, EventEmitter, OnInit } from '@angular/core';
2
2
  import { Table, TableLazyLoadEvent, TablePageEvent, TableRowSelectEvent, TableRowUnSelectEvent } from 'primeng/table';
3
- import { MenuItem } from 'primeng/api';
4
3
  import { ECSPrimengTableService } from './ecs-primeng-table.service';
5
4
  import { CellOverflowBehaviour, DataAlignHorizontal, DataAlignVertical, DataType, FrozenColumnAlign, TableViewSaveMode } from '../../enums';
6
- import { ITableButton, IColumnMetadata, IPredifinedFilter, ITablePagedResponse, ITableView } from '../../interfaces';
5
+ import { IColumnMetadata, IPredefinedFilter, ITablePagedResponse, ITableView, ITableOptions } from '../../interfaces';
7
6
  import { ECSPrimengTableNotificationService } from '../../services';
8
7
  import * as i0 from "@angular/core";
9
- export declare class ECSPrimengTable implements OnInit, AfterViewInit, OnDestroy {
8
+ export declare class ECSPrimengTable implements OnInit, AfterViewInit {
10
9
  private tableService;
11
10
  private notification;
12
- private resizeObserver;
13
11
  constructor(tableService: ECSPrimengTableService, notification: ECSPrimengTableNotificationService);
14
- isActive: boolean;
15
- data: any[];
16
- columnsToShow: IColumnMetadata[];
17
- computeScrollHeight: boolean;
18
- globalSearchEnabled: boolean;
19
- globalSearchMaxLength: number;
20
- globalSearchPlaceholder: string;
21
- columnEditorEnabled: boolean;
22
- urlColumnsSource: string;
23
- urlDataSource: string;
24
- urlExcelReport: string | null;
25
- predifinedFiltersCollection: {
26
- [key: string]: IPredifinedFilter[];
27
- };
28
- predifinedFiltersNoSelectionPlaceholder: string;
29
- predifinedFiltersCollectionSelectedValuesText: string;
30
- rowActionButtons: ITableButton[];
31
- headerActionButtons: ITableButton[];
32
- copyCellDataToClipboardTimeSecs: number;
33
- actionsColumnAligmentRight: boolean;
34
- actionsColumnWidth: number;
35
- actionsColumnFrozen: boolean;
36
- rowSelectorColumnActive: boolean;
37
- rowSelectorColumName: string;
38
- rowSelectorColumnAligmentRight: boolean;
39
- rowSelectorColumnWidth: number;
40
- rowSelectorColumnFrozen: boolean;
41
- actionsColumnResizable: boolean;
42
- actionColumnName: string;
43
- rowselectorColumnResizable: boolean;
44
- noDataFoundText: string;
45
- showClearSortAndFilters: boolean;
46
- excelReportTitleDefault: string;
47
- excelReportTitleAllowUserEdit: boolean;
48
- tableViewSaveAs: TableViewSaveMode;
49
- tableViewSaveKey: string;
50
- viewsGetSourceURL: string;
51
- viewsSaveSourceURL: string;
52
- maxTableViews: number;
12
+ tableOptions: ITableOptions;
53
13
  onRowCheckboxChange: EventEmitter<{
54
14
  rowID: any;
55
15
  selected: boolean;
@@ -62,6 +22,7 @@ export declare class ECSPrimengTable implements OnInit, AfterViewInit, OnDestroy
62
22
  rowID: any;
63
23
  rowData: any;
64
24
  }>;
25
+ onDataEndUpdate: EventEmitter<void>;
65
26
  viewsModalShow: boolean;
66
27
  tableViewCurrentSelectedAlias: string | null;
67
28
  tableViewsFirstFetchDone: boolean;
@@ -71,10 +32,9 @@ export declare class ECSPrimengTable implements OnInit, AfterViewInit, OnDestroy
71
32
  selectedRowsCheckbox: any[];
72
33
  dt: Table;
73
34
  showRefreshData: boolean;
74
- scrollHeight: string;
75
35
  globalSearchText: string | null;
76
36
  tableViewsList: ITableView[];
77
- tableViews_menuItems: MenuItem[];
37
+ tableViews_menuItems: any[];
78
38
  DataType: typeof DataType;
79
39
  CellOverflowBehaviour: typeof CellOverflowBehaviour;
80
40
  DataAlignHorizontal: typeof DataAlignHorizontal;
@@ -95,32 +55,45 @@ export declare class ECSPrimengTable implements OnInit, AfterViewInit, OnDestroy
95
55
  columnsSelected: IColumnMetadata[];
96
56
  columnModalData: any[];
97
57
  filteredColumnData: any[];
98
- predifinedFiltersSelectedValuesCollection: {
58
+ private initialColumnWidths;
59
+ private initialTableWidth;
60
+ predefinedFiltersSelectedValuesCollection: {
99
61
  [key: string]: any[];
100
62
  };
101
63
  private copyCellDataTimer;
102
64
  tableLazyLoadEventInformation: TableLazyLoadEvent;
103
65
  private initialConfigurationFetched;
66
+ private maxViews;
104
67
  ngOnInit(): void;
105
68
  tableContainer: ElementRef;
106
69
  headerContainer: ElementRef;
107
70
  paginatorContainer: ElementRef;
108
71
  ngAfterViewInit(): void;
109
- onWindowResize: () => void;
110
- calculateScrollHeight(): void;
111
- ngOnDestroy(): void;
72
+ onResize(): void;
73
+ private calculateScrollHeight;
74
+ get scrollHeightValue(): string;
112
75
  /**
113
- * Used to update the data of a table externally outside the component. Use this method instead of 'updateData' to force the data updata of a table
76
+ * Updates the table data and, if needed, retrieves the initial table configuration from an external source.
77
+ *
78
+ * Also allows resetting the table to its original state before any user manipulations.
79
+ *
80
+ * @param {boolean} [resetTableView=false] Optional.
81
+ * - `true`: resets the table state before loading data.
82
+ * - `false`: refreshes data using the current configuration (and retrieves initial configuration if necessary).
114
83
  *
115
- * @param {(optionalData?: any) => void} [continueAction] - Optional action to execute after data retrieval if it succeeded.
116
- * @param {boolean} [uponContinueActionEndModalHttp=false] - Optional flag to set the loading indicator to inactive after data retrieval.
84
+ * **_Behavior_**
85
+ * - The table is automatically set to `isActive = true`.
86
+ * - If the initial configuration has not been fetched, it will fetch it and then update the data.
87
+ * - If the initial configuration is already fetched, it will just update the data.
88
+ * - If `resetTableView` is true and the configuration is already initialized, the table will be reset to its original state before updating the data.
117
89
  */
118
- updateData(continueAction?: (optionalData?: any) => void, uponContinueActionEndModalHttp?: boolean): void;
119
- fetchTableConfiguration(): void;
90
+ updateData(resetTableView?: boolean): void;
91
+ private canFetchData;
92
+ private fetchTableConfiguration;
120
93
  private handleTableConfigurationResponse;
121
94
  refreshData(event: any): void;
122
95
  tableViewsEnabled(): boolean;
123
- fetchTableViews(): void;
96
+ private fetchTableViews;
124
97
  private tableViewListProcess;
125
98
  viewLoad(tableViewAlias: string): void;
126
99
  viewCreate(viewAlias: string): void;
@@ -130,10 +103,12 @@ export declare class ECSPrimengTable implements OnInit, AfterViewInit, OnDestroy
130
103
  viewAliasNew: string;
131
104
  }): void;
132
105
  viewUpdateData(viewAlias: string): void;
106
+ viewUpdateActiveStartup(viewAlias: string): void;
133
107
  viewsSave(endMessage: number): void;
134
108
  viewsSaveEnd(endMessage: number): void;
135
109
  fetchTableData(event: TableLazyLoadEvent): void;
136
110
  private modifyFiltersWithoutGlobalAndSelectedRows;
111
+ resetTableView(): void;
137
112
  private selectorRowFilterBuilder;
138
113
  revertDateTimeZoneFilters(inputFilter: any): any;
139
114
  handleTableDataResponse(body: ITablePagedResponse): void;
@@ -154,16 +129,16 @@ export declare class ECSPrimengTable implements OnInit, AfterViewInit, OnDestroy
154
129
  */
155
130
  private hasFilters;
156
131
  getColumnStyle(col: any, headerCols?: boolean): Record<string, string>;
157
- getPredifinedFilterValues(columnKeyName: string): IPredifinedFilter[];
132
+ getPredefinedFilterValues(columnKeyName: string): IPredefinedFilter[];
158
133
  getFrozenColumnAlignAsText(frozenColumnAlign: FrozenColumnAlign): string;
159
134
  getDataTypeAsText(dataType: DataType): string;
160
135
  /**
161
136
  * Updates the filters of a PrimeNG data table based on predefined filter changes.
162
137
  *
163
138
  * @param {string} filterName - The name of the filter to be updated.
164
- * @param {IPrimengPredifinedFilter[]} selectedValues - An array of selected predefined filter values.
139
+ * @param {IPrimengPredefinedFilter[]} selectedValues - An array of selected predefined filter values.
165
140
  */
166
- onPredifinedFilterChange(filterName: string, selectedValues: IPredifinedFilter[]): void;
141
+ onPredefinedFilterChange(filterName: string, selectedValues: IPredefinedFilter[]): void;
167
142
  /**
168
143
  * Retrieves the number of values selected for a predefined filter.
169
144
  *
@@ -173,8 +148,7 @@ export declare class ECSPrimengTable implements OnInit, AfterViewInit, OnDestroy
173
148
  * @param {string} columnKeyName - The key name of the column for which to retrieve the number of selected values.
174
149
  * @returns {string} A string indicating the number of selected values for the specified column.
175
150
  */
176
- predifinedFiltersSelectedValuesText(columnKeyName: string): string;
177
- handleButtonsClick(action: (rowData: any) => void, rowData?: any): void;
151
+ predefinedFiltersSelectedValuesText(columnKeyName: string): string;
178
152
  /**
179
153
  * Checks if the provided column metadata matches a specific style of the predefined filters
180
154
  * that need to be applied to an item on a row.
@@ -198,6 +172,7 @@ export declare class ECSPrimengTable implements OnInit, AfterViewInit, OnDestroy
198
172
  private updateColumnsSpecialProperties;
199
173
  openExcelExport(): void;
200
174
  generateExcelReport(event: any): void;
175
+ updateIconBlobsForCollections(): void;
201
176
  static ɵfac: i0.ɵɵFactoryDeclaration<ECSPrimengTable, never>;
202
- static ɵcmp: i0.ɵɵComponentDeclaration<ECSPrimengTable, "ecs-primeng-table", never, { "isActive": { "alias": "isActive"; "required": false; }; "data": { "alias": "data"; "required": false; }; "columnsToShow": { "alias": "columnsToShow"; "required": false; }; "computeScrollHeight": { "alias": "computeScrollHeight"; "required": false; }; "globalSearchEnabled": { "alias": "globalSearchEnabled"; "required": false; }; "globalSearchMaxLength": { "alias": "globalSearchMaxLength"; "required": false; }; "globalSearchPlaceholder": { "alias": "globalSearchPlaceholder"; "required": false; }; "columnEditorEnabled": { "alias": "columnEditorEnabled"; "required": false; }; "urlColumnsSource": { "alias": "urlColumnsSource"; "required": false; }; "urlDataSource": { "alias": "urlDataSource"; "required": false; }; "urlExcelReport": { "alias": "urlExcelReport"; "required": false; }; "predifinedFiltersCollection": { "alias": "predifinedFiltersCollection"; "required": false; }; "predifinedFiltersNoSelectionPlaceholder": { "alias": "predifinedFiltersNoSelectionPlaceholder"; "required": false; }; "predifinedFiltersCollectionSelectedValuesText": { "alias": "predifinedFiltersCollectionSelectedValuesText"; "required": false; }; "rowActionButtons": { "alias": "rowActionButtons"; "required": false; }; "headerActionButtons": { "alias": "headerActionButtons"; "required": false; }; "copyCellDataToClipboardTimeSecs": { "alias": "copyCellDataToClipboardTimeSecs"; "required": false; }; "actionsColumnAligmentRight": { "alias": "actionsColumnAligmentRight"; "required": false; }; "actionsColumnWidth": { "alias": "actionsColumnWidth"; "required": false; }; "actionsColumnFrozen": { "alias": "actionsColumnFrozen"; "required": false; }; "rowSelectorColumnActive": { "alias": "rowSelectorColumnActive"; "required": false; }; "rowSelectorColumName": { "alias": "rowSelectorColumName"; "required": false; }; "rowSelectorColumnAligmentRight": { "alias": "rowSelectorColumnAligmentRight"; "required": false; }; "rowSelectorColumnWidth": { "alias": "rowSelectorColumnWidth"; "required": false; }; "rowSelectorColumnFrozen": { "alias": "rowSelectorColumnFrozen"; "required": false; }; "actionsColumnResizable": { "alias": "actionsColumnResizable"; "required": false; }; "actionColumnName": { "alias": "actionColumnName"; "required": false; }; "rowselectorColumnResizable": { "alias": "rowselectorColumnResizable"; "required": false; }; "noDataFoundText": { "alias": "noDataFoundText"; "required": false; }; "showClearSortAndFilters": { "alias": "showClearSortAndFilters"; "required": false; }; "excelReportTitleDefault": { "alias": "excelReportTitleDefault"; "required": false; }; "excelReportTitleAllowUserEdit": { "alias": "excelReportTitleAllowUserEdit"; "required": false; }; "tableViewSaveAs": { "alias": "tableViewSaveAs"; "required": false; }; "tableViewSaveKey": { "alias": "tableViewSaveKey"; "required": false; }; "viewsGetSourceURL": { "alias": "viewsGetSourceURL"; "required": false; }; "viewsSaveSourceURL": { "alias": "viewsSaveSourceURL"; "required": false; }; "maxTableViews": { "alias": "maxTableViews"; "required": false; }; }, { "onRowCheckboxChange": "onRowCheckboxChange"; "onRowSelect": "onRowSelect"; "onRowUnselect": "onRowUnselect"; }, never, never, true, never>;
177
+ static ɵcmp: i0.ɵɵComponentDeclaration<ECSPrimengTable, "ecs-primeng-table", never, { "tableOptions": { "alias": "tableOptions"; "required": false; }; }, { "onRowCheckboxChange": "onRowCheckboxChange"; "onRowSelect": "onRowSelect"; "onRowUnselect": "onRowUnselect"; "onDataEndUpdate": "onDataEndUpdate"; }, never, never, true, never>;
203
178
  }
@@ -1,7 +1,7 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { HttpResponse } from '@angular/common/http';
3
3
  import { ECSPrimengTableHttpService, ECSPrimengTableNotificationService } from '../../services';
4
- import { IColumnMetadata, IExcelExportRequest, ITableConfiguration, ITablePagedResponse, ITableView, ITableViewData } from '../../interfaces';
4
+ import { IColumnMetadata, IExcelExportRequest, IPredefinedFilter, ITableConfiguration, ITablePagedResponse, ITableView, ITableViewData } from '../../interfaces';
5
5
  import { TableViewSaveMode } from '../../enums';
6
6
  import { ITableQueryRequest } from '../../interfaces/table-query-request.interface';
7
7
  import { MenuItem } from 'primeng/api';
@@ -14,6 +14,7 @@ export declare class ECSPrimengTableService {
14
14
  fetchTableConfiguration(url: string): Observable<HttpResponse<ITableConfiguration>>;
15
15
  fetchTableData(url: string, postData: ITableQueryRequest): Observable<HttpResponse<ITablePagedResponse>>;
16
16
  fetchExcelReport(url: string, postData: IExcelExportRequest): Observable<HttpResponse<Blob>>;
17
+ getIconBlob(url: string): Observable<HttpResponse<Blob>>;
17
18
  downloadFile(data: Blob, fileName: string, contentType: string): void;
18
19
  handleTableError(error: any, customTitle?: string): void;
19
20
  orderColumnsWithFrozens(colsToOrder: IColumnMetadata[]): IColumnMetadata[];
@@ -35,6 +36,7 @@ export declare class ECSPrimengTableService {
35
36
  * handleButtonsClick(deleteAction, { rowID: 1, name: 'John Doe' });
36
37
  */
37
38
  handleButtonsClick(action: (rowData: any) => void, rowData?: any): void;
39
+ handlePredefinedFilterClick(action: (rowData: any, option: IPredefinedFilter) => void, rowData: any | undefined, option: IPredefinedFilter): void;
38
40
  getColumnStyle(col: any, headerCols?: boolean): Record<string, string>;
39
41
  fetchTableViews(tableViewSaveAs: TableViewSaveMode, recoverListEndpoint: string, tableViewSaveKey: string): ITableView[] | Observable<HttpResponse<ITableView[]>>;
40
42
  sortViews(tableSaveViewList: ITableView[]): void;
@@ -1,4 +1,3 @@
1
- import { EventEmitter } from '@angular/core';
2
1
  import { ECSPrimengTableService } from '../ecs-primeng-table/ecs-primeng-table.service';
3
2
  import * as i0 from "@angular/core";
4
3
  export declare class TableButton {
@@ -8,9 +7,7 @@ export declare class TableButton {
8
7
  rowData: any;
9
8
  isActionButton: boolean;
10
9
  isLastActionButton: boolean;
11
- clicked: EventEmitter<any>;
12
- isDisabled(): boolean;
13
10
  handleClick(): void;
14
11
  static ɵfac: i0.ɵɵFactoryDeclaration<TableButton, never>;
15
- static ɵcmp: i0.ɵɵComponentDeclaration<TableButton, "ecs-table-button", never, { "button": { "alias": "button"; "required": false; }; "rowData": { "alias": "rowData"; "required": false; }; "isActionButton": { "alias": "isActionButton"; "required": false; }; "isLastActionButton": { "alias": "isLastActionButton"; "required": false; }; }, { "clicked": "clicked"; }, never, never, true, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableButton, "ecs-table-button", never, { "button": { "alias": "button"; "required": false; }; "rowData": { "alias": "rowData"; "required": false; }; "isActionButton": { "alias": "isActionButton"; "required": false; }; "isLastActionButton": { "alias": "isLastActionButton"; "required": false; }; }, {}, never, never, true, never>;
16
13
  }
@@ -1,6 +1,6 @@
1
1
  import { DataAlignHorizontal, DataAlignVertical, DataType } from '../../enums';
2
2
  import { DatePipe } from '@angular/common';
3
- import { IColumnMetadata, IPredifinedFilter } from '../../interfaces';
3
+ import { IColumnMetadata, IPredefinedFilter } from '../../interfaces';
4
4
  import { SafeHtml } from '@angular/platform-browser';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class TableCell {
@@ -9,8 +9,8 @@ export declare class TableCell {
9
9
  col: any;
10
10
  rowData: any;
11
11
  globalSearchText: string | null;
12
- predifinedFiltersCollection: {
13
- [key: string]: IPredifinedFilter[];
12
+ predefinedFiltersCollection?: {
13
+ [key: string]: IPredefinedFilter[];
14
14
  };
15
15
  dateFormat: string;
16
16
  dateTimezone: string;
@@ -18,6 +18,7 @@ export declare class TableCell {
18
18
  DataType: typeof DataType;
19
19
  get value(): any;
20
20
  get tooltipText(): any;
21
+ getListValues(col: any, rowData: any): string[];
21
22
  getDataAlignHorizontalAsText(dataAlignHorizontal: DataAlignHorizontal): void;
22
23
  getDataAlignVerticalAsText(dataAlignVertical: DataAlignVertical): void;
23
24
  /**
@@ -36,6 +37,7 @@ export declare class TableCell {
36
37
  * // Output might be: '18-Jun-2024 14:30:00 GMT+0000'
37
38
  */
38
39
  formatDate(value: any): string;
40
+ getPredefinedFilterTooltip(colMetadata: IColumnMetadata, value: any): any;
39
41
  /**
40
42
  * Checks if the provided column metadata matches a specific style of the predefined filters
41
43
  * that need to be applied to an item on a row.
@@ -45,8 +47,8 @@ export declare class TableCell {
45
47
  * @returns {any} The matching predefined filter value if found, otherwise null.
46
48
  */
47
49
  getPredfinedFilterMatch(colMetadata: IColumnMetadata, value: any): any;
48
- getPredifinedFilterValues(columnKeyName: string): IPredifinedFilter[];
50
+ getPredefinedFilterValues(columnKeyName: string): IPredefinedFilter[];
49
51
  highlightText(cellValue: any, colMetadata: IColumnMetadata, globalSearchText: string | null): SafeHtml;
50
52
  static ɵfac: i0.ɵɵFactoryDeclaration<TableCell, never>;
51
- static ɵcmp: i0.ɵɵComponentDeclaration<TableCell, "ecs-table-cell", never, { "col": { "alias": "col"; "required": false; }; "rowData": { "alias": "rowData"; "required": false; }; "globalSearchText": { "alias": "globalSearchText"; "required": false; }; "predifinedFiltersCollection": { "alias": "predifinedFiltersCollection"; "required": false; }; "dateFormat": { "alias": "dateFormat"; "required": false; }; "dateTimezone": { "alias": "dateTimezone"; "required": false; }; "dateCulture": { "alias": "dateCulture"; "required": false; }; }, {}, never, never, true, never>;
53
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableCell, "ecs-table-cell", never, { "col": { "alias": "col"; "required": false; }; "rowData": { "alias": "rowData"; "required": false; }; "globalSearchText": { "alias": "globalSearchText"; "required": false; }; "predefinedFiltersCollection": { "alias": "predefinedFiltersCollection"; "required": false; }; "dateFormat": { "alias": "dateFormat"; "required": false; }; "dateTimezone": { "alias": "dateTimezone"; "required": false; }; "dateCulture": { "alias": "dateCulture"; "required": false; }; }, {}, never, never, true, never>;
52
54
  }
@@ -1,10 +1,14 @@
1
1
  import { DomSanitizer, SafeUrl } from '@angular/platform-browser';
2
+ import { ECSPrimengTableService } from '../ecs-primeng-table/ecs-primeng-table.service';
2
3
  import * as i0 from "@angular/core";
3
- export declare class TablePredifinedFilters {
4
+ export declare class TablePredefinedFilters {
4
5
  private sanitizer;
5
- constructor(sanitizer: DomSanitizer);
6
+ private tableService;
7
+ constructor(sanitizer: DomSanitizer, tableService: ECSPrimengTableService);
6
8
  option: any;
7
9
  col: any;
10
+ selectable: boolean;
11
+ rowData: any;
8
12
  /**
9
13
  * Converts a blob from the database to a safe URL that can be used to display an image.
10
14
  *
@@ -24,7 +28,8 @@ export declare class TablePredifinedFilters {
24
28
  * <img [src]="imageUrl" alt="Image">
25
29
  */
26
30
  getBlobIconAsUrl(blob: Blob): SafeUrl;
27
- getIconStyles(option: any): any;
28
- static ɵfac: i0.ɵɵFactoryDeclaration<TablePredifinedFilters, never>;
29
- static ɵcmp: i0.ɵɵComponentDeclaration<TablePredifinedFilters, "ecs-table-predifined-filters", never, { "option": { "alias": "option"; "required": false; }; "col": { "alias": "col"; "required": false; }; }, {}, never, never, true, never>;
31
+ handleClick(): void;
32
+ getTagStyle(option: any): any;
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<TablePredefinedFilters, never>;
34
+ static ɵcmp: i0.ɵɵComponentDeclaration<TablePredefinedFilters, "ecs-table-predefined-filters", never, { "option": { "alias": "option"; "required": false; }; "col": { "alias": "col"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "rowData": { "alias": "rowData"; "required": false; }; }, {}, never, never, true, never>;
30
35
  }
@@ -1,15 +1,15 @@
1
1
  import { EventEmitter } from '@angular/core';
2
- import { MenuItem } from 'primeng/api';
3
2
  import { ECSPrimengTableNotificationService } from '../../services';
4
3
  import * as i0 from "@angular/core";
5
4
  export declare class ViewsManagement {
6
5
  private notification;
7
6
  constructor(notification: ECSPrimengTableNotificationService);
8
7
  visible: boolean;
9
- tableViews_menuItems: MenuItem[];
8
+ tableViews_menuItems: any[];
10
9
  onViewSelect: EventEmitter<string>;
11
10
  onViewDelete: EventEmitter<string>;
12
11
  onViewUpdateData: EventEmitter<string>;
12
+ onViewUpdateActiveStartup: EventEmitter<string>;
13
13
  onViewEditAlias: EventEmitter<{
14
14
  viewAliasOld: string;
15
15
  viewAliasNew: string;
@@ -22,11 +22,12 @@ export declare class ViewsManagement {
22
22
  loadView(viewAlias: string): void;
23
23
  deleteView(viewAlias: string): void;
24
24
  updateView(viewAlias: string): void;
25
+ updateViewActiveStartup(viewAlias: string): void;
25
26
  createView(viewAlias: string): void;
26
27
  editViewAlias(viewAliasOld: string, viewAliasNew: string): void;
27
28
  showViewEditor(editingViewAlias?: string): void;
28
29
  closeModal(): void;
29
30
  createOrUpdateTableView(): void;
30
31
  static ɵfac: i0.ɵɵFactoryDeclaration<ViewsManagement, never>;
31
- static ɵcmp: i0.ɵɵComponentDeclaration<ViewsManagement, "ecs-views-management", never, { "visible": { "alias": "visible"; "required": false; }; "tableViews_menuItems": { "alias": "tableViews_menuItems"; "required": false; }; }, { "onViewSelect": "onViewSelect"; "onViewDelete": "onViewDelete"; "onViewUpdateData": "onViewUpdateData"; "onViewEditAlias": "onViewEditAlias"; "onViewCreate": "onViewCreate"; "visibleChange": "visibleChange"; }, never, never, true, never>;
32
+ static ɵcmp: i0.ɵɵComponentDeclaration<ViewsManagement, "ecs-views-management", never, { "visible": { "alias": "visible"; "required": false; }; "tableViews_menuItems": { "alias": "tableViews_menuItems"; "required": false; }; }, { "onViewSelect": "onViewSelect"; "onViewDelete": "onViewDelete"; "onViewUpdateData": "onViewUpdateData"; "onViewUpdateActiveStartup": "onViewUpdateActiveStartup"; "onViewEditAlias": "onViewEditAlias"; "onViewCreate": "onViewCreate"; "visibleChange": "visibleChange"; }, never, never, true, never>;
32
33
  }
@@ -1,4 +1,14 @@
1
+ /**
2
+ * Enum representing how content that overflows a table cell should be handled.
3
+ *
4
+ * @remarks
5
+ * Determines the visual behavior of cell content when it exceeds the cell's width.
6
+ */
1
7
  export declare enum CellOverflowBehaviour {
8
+ /** Content that exceeds the cell's width is clipped and not visible. */
2
9
  Hidden = 0,
3
- Wrap = 1
10
+ /** Content wraps onto multiple lines to fit within the cell. */
11
+ Wrap = 1,
12
+ /** Content is truncated and an ellipsis (...) is shown at the end. */
13
+ Ellipsis = 2
4
14
  }
@@ -1,5 +1,14 @@
1
+ /**
2
+ * Enum representing the horizontal alignment of content within a table cell.
3
+ *
4
+ * @remarks
5
+ * Determines how the content inside a cell is positioned horizontally relative to the cell's width.
6
+ */
1
7
  export declare enum DataAlignHorizontal {
8
+ /** Align content to the left of the cell. */
2
9
  Left = 0,
10
+ /** Align content to the center of the cell. */
3
11
  Center = 1,
12
+ /** Align content to the right of the cell. */
4
13
  Right = 2
5
14
  }
@@ -1,5 +1,14 @@
1
+ /**
2
+ * Enum representing the vertical alignment of content within a table cell.
3
+ *
4
+ * @remarks
5
+ * Determines how the content inside a cell is positioned vertically relative to the cell's height.
6
+ */
1
7
  export declare enum DataAlignVertical {
8
+ /** Align content to the top of the cell. */
2
9
  Top = 0,
10
+ /** Align content to the vertical middle of the cell. */
3
11
  Middle = 1,
12
+ /** Align content to the bottom of the cell. */
4
13
  Bottom = 2
5
14
  }
@@ -1,6 +1,19 @@
1
+ /**
2
+ * Enum representing the different types of data a table column can hold.
3
+ *
4
+ * @remarks
5
+ * This is used to determine how values should be rendered, formatted, and
6
+ * filtered in the table component.
7
+ */
1
8
  export declare enum DataType {
9
+ /** Plain text string values. */
2
10
  Text = 0,
11
+ /** Numeric values, e.g., integers or decimals. */
3
12
  Numeric = 1,
13
+ /** Boolean values (true/false). */
4
14
  Boolean = 2,
5
- Date = 3
15
+ /** Date or datetime values. */
16
+ Date = 3,
17
+ /** List of values, stored as a string separated by a delimiter (";"). */
18
+ List = 4
6
19
  }
@@ -1,5 +1,15 @@
1
+ /**
2
+ * Enum representing the alignment of frozen columns in a table.
3
+ *
4
+ * @remarks
5
+ * Used to determine if a column should be frozen, and if so, on which side
6
+ * of the table it should appear.
7
+ */
1
8
  export declare enum FrozenColumnAlign {
9
+ /** The column is not frozen. */
2
10
  Noone = 0,
11
+ /** The column is frozen on the left side of the table. */
3
12
  Left = 1,
13
+ /** The column is frozen on the right side of the table. */
4
14
  Right = 2
5
15
  }
@@ -1,6 +1,17 @@
1
+ /**
2
+ * Enum representing the mode used to save the state or configuration of a table view.
3
+ *
4
+ * @remarks
5
+ * Determines where and how the table's view settings (e.g., column order, filters,
6
+ * sorting) are persisted.
7
+ */
1
8
  export declare enum TableViewSaveMode {
2
- noone = 0,
3
- sessionStorage = 1,
4
- localStorage = 2,
5
- databaseStorage = 3
9
+ /** Do not save the table view state. */
10
+ None = 0,
11
+ /** Save the table view state in the browser's sessionStorage (cleared on tab close). */
12
+ SessionStorage = 1,
13
+ /** Save the table view state in the browser's localStorage (persists across sessions). */
14
+ LocalStorage = 2,
15
+ /** Save the table view state in a backend database (requires server support). */
16
+ DatabaseStorage = 3
6
17
  }
@@ -13,7 +13,7 @@ export interface IColumnMetadata {
13
13
  canBeReordered: boolean;
14
14
  canBeSorted: boolean;
15
15
  canBeFiltered: boolean;
16
- filterPredifinedValuesName: string;
16
+ filterPredefinedValuesName: string;
17
17
  canBeGlobalFiltered: boolean;
18
18
  columnDescription: string;
19
19
  dataTooltipShow: boolean;
@@ -1,8 +1,9 @@
1
1
  export * from "./table-button.interface";
2
2
  export * from "./excel-export-request.interface";
3
3
  export * from "./columns-metadata.interface";
4
- export * from "./predifined-filter.interface";
4
+ export * from "./predefined-filter.interface";
5
5
  export * from "./table-configuration.interface";
6
+ export * from "./table-options.interface";
6
7
  export * from "./table-paged-response.interface";
7
8
  export * from "./table-query-request.interface";
8
9
  export * from "./table-view-data.interface";
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Represents a predefined filter value for a column in **ECS PrimeNG tables**.
3
+ *
4
+ * Allows displaying a value as text, tag, icon or image (from URL or blob) with optional styles and colors.
5
+ */
6
+ export interface IPredefinedFilter {
7
+ /**
8
+ * The underlying value of the cell. Must match the data returned from the backend for proper filtering and mapping.
9
+ *
10
+ * This is also used by the global filter internally.
11
+ *
12
+ * **IMPORTANT**: For text and tag representations, it is recommended that `value` matches `name`.
13
+ */
14
+ value: string | number;
15
+ /**
16
+ * The text displayed in the frontend for this filter value.
17
+ *
18
+ * Used when `displayName` is `true` or when displaying a tag.
19
+ */
20
+ name?: string;
21
+ /**
22
+ * Set to `true` to display the `name` as text in the cell.
23
+ */
24
+ displayName?: boolean;
25
+ /**
26
+ * Set to `true` to display the `name` as a tag in the cell.
27
+ */
28
+ displayTag?: boolean;
29
+ /**
30
+ * Optional CSS style object to apply to the tag.
31
+ *
32
+ * Example: { background: 'rgb(255,0,0)', color: 'white' }
33
+ */
34
+ tagStyle?: {
35
+ [key: string]: string;
36
+ };
37
+ /**
38
+ * The icon to display for this value.
39
+ *
40
+ * Can use icons from PrimeNG, Font Awesome, Material Icons, etc...
41
+ */
42
+ icon?: string;
43
+ /**
44
+ * Optional color to apply to the icon.
45
+ *
46
+ * Example: "red", "#00ff00"
47
+ */
48
+ iconColor?: string;
49
+ /**
50
+ * Optional CSS style string to apply to the icon.
51
+ *
52
+ * Example: "font-size: 1.5rem" "margin-right: 0.5rem"
53
+ */
54
+ iconStyle?: string;
55
+ /**
56
+ * The image to display directly from a URL.
57
+ */
58
+ imageURL?: string;
59
+ /**
60
+ * The image to display from a Blob object.
61
+ */
62
+ imageBlob?: Blob;
63
+ /**
64
+ * If using a Blob and it is not provided directly, the backend endpoint to fetch the Blob from.
65
+ */
66
+ imageBlobSourceEndpoint?: string;
67
+ /**
68
+ * @internal
69
+ * Indicates that fetching the Blob from `imageBlobSourceEndpoint` failed.
70
+ *
71
+ * **_Do not modify this property manually._**
72
+ */
73
+ imageBlobFetchError?: boolean;
74
+ /**
75
+ * Optional. The action to execute when the predefined filter is clicked.
76
+ * @param rowData The row data object of the clicked row.
77
+ * @param option The IPredefinedFilter data of the predefined element clicked.
78
+ */
79
+ action?: (rowData: any, option: IPredefinedFilter) => void;
80
+ }