@eternalcodestudio/primeng-table 19.0.0 → 19.0.1
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/README.md +7 -0
- package/fesm2022/eternalcodestudio-primeng-table.mjs +651 -420
- package/fesm2022/eternalcodestudio-primeng-table.mjs.map +1 -1
- package/lib/components/column-selector/column-selector.d.ts +3 -0
- package/lib/components/ecs-primeng-table/ecs-primeng-table.d.ts +24 -60
- package/lib/components/ecs-primeng-table/ecs-primeng-table.service.d.ts +3 -1
- package/lib/components/table-button/table-button.d.ts +1 -4
- package/lib/components/table-cell/table-cell.d.ts +7 -5
- package/lib/components/{table-predifined-filters/table-predifined-filters.d.ts → table-predefined-filters/table-predefined-filters.d.ts} +10 -5
- package/lib/components/views-management/views-management.d.ts +4 -3
- package/lib/enums/cell-overflow-behaviour.enum.d.ts +11 -1
- package/lib/enums/data-align-horizontal.enum.d.ts +9 -0
- package/lib/enums/data-align-vertical.enum.d.ts +9 -0
- package/lib/enums/data-type.enum.enum.d.ts +14 -1
- package/lib/enums/frozen-column-align.enum.d.ts +10 -0
- package/lib/enums/table-view-save-mode.enum.d.ts +15 -4
- package/lib/interfaces/columns-metadata.interface.d.ts +1 -1
- package/lib/interfaces/index.d.ts +2 -1
- package/lib/interfaces/predefined-filter.interface.d.ts +80 -0
- package/lib/interfaces/table-button.interface.d.ts +49 -12
- package/lib/interfaces/table-configuration.interface.d.ts +1 -0
- package/lib/interfaces/table-options.interface.d.ts +433 -0
- package/lib/interfaces/table-paged-response.interface.d.ts +0 -7
- package/lib/interfaces/table-query-request.interface.d.ts +0 -9
- package/lib/services/http.service.d.ts +27 -2
- package/lib/services/notification.service.d.ts +17 -1
- package/lib/utils/create-table-options.d.ts +5 -0
- package/lib/utils/index.d.ts +1 -0
- package/package.json +5 -4
- package/public-api.d.ts +1 -0
- package/fesm2022/ecs-primeng-table.mjs +0 -1745
- package/fesm2022/ecs-primeng-table.mjs.map +0 -1
- 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,
|
|
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 {
|
|
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
|
|
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
|
-
|
|
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:
|
|
37
|
+
tableViews_menuItems: any[];
|
|
78
38
|
DataType: typeof DataType;
|
|
79
39
|
CellOverflowBehaviour: typeof CellOverflowBehaviour;
|
|
80
40
|
DataAlignHorizontal: typeof DataAlignHorizontal;
|
|
@@ -95,28 +55,30 @@ export declare class ECSPrimengTable implements OnInit, AfterViewInit, OnDestroy
|
|
|
95
55
|
columnsSelected: IColumnMetadata[];
|
|
96
56
|
columnModalData: any[];
|
|
97
57
|
filteredColumnData: any[];
|
|
98
|
-
|
|
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
|
-
|
|
72
|
+
onResize(): void;
|
|
110
73
|
calculateScrollHeight(): void;
|
|
111
|
-
|
|
74
|
+
get scrollHeightValue(): string;
|
|
112
75
|
/**
|
|
113
|
-
* Used to update the data of a table externally outside the component.
|
|
76
|
+
* Used to update the data of a table externally outside the component.
|
|
114
77
|
*
|
|
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.
|
|
117
78
|
*/
|
|
118
|
-
updateData(
|
|
119
|
-
|
|
79
|
+
updateData(): void;
|
|
80
|
+
canFetchData(): boolean;
|
|
81
|
+
fetchTableConfiguration(resetTableView?: boolean): void;
|
|
120
82
|
private handleTableConfigurationResponse;
|
|
121
83
|
refreshData(event: any): void;
|
|
122
84
|
tableViewsEnabled(): boolean;
|
|
@@ -130,10 +92,12 @@ export declare class ECSPrimengTable implements OnInit, AfterViewInit, OnDestroy
|
|
|
130
92
|
viewAliasNew: string;
|
|
131
93
|
}): void;
|
|
132
94
|
viewUpdateData(viewAlias: string): void;
|
|
95
|
+
viewUpdateActiveStartup(viewAlias: string): void;
|
|
133
96
|
viewsSave(endMessage: number): void;
|
|
134
97
|
viewsSaveEnd(endMessage: number): void;
|
|
135
98
|
fetchTableData(event: TableLazyLoadEvent): void;
|
|
136
99
|
private modifyFiltersWithoutGlobalAndSelectedRows;
|
|
100
|
+
resetTableView(): void;
|
|
137
101
|
private selectorRowFilterBuilder;
|
|
138
102
|
revertDateTimeZoneFilters(inputFilter: any): any;
|
|
139
103
|
handleTableDataResponse(body: ITablePagedResponse): void;
|
|
@@ -154,16 +118,16 @@ export declare class ECSPrimengTable implements OnInit, AfterViewInit, OnDestroy
|
|
|
154
118
|
*/
|
|
155
119
|
private hasFilters;
|
|
156
120
|
getColumnStyle(col: any, headerCols?: boolean): Record<string, string>;
|
|
157
|
-
|
|
121
|
+
getPredefinedFilterValues(columnKeyName: string): IPredefinedFilter[];
|
|
158
122
|
getFrozenColumnAlignAsText(frozenColumnAlign: FrozenColumnAlign): string;
|
|
159
123
|
getDataTypeAsText(dataType: DataType): string;
|
|
160
124
|
/**
|
|
161
125
|
* Updates the filters of a PrimeNG data table based on predefined filter changes.
|
|
162
126
|
*
|
|
163
127
|
* @param {string} filterName - The name of the filter to be updated.
|
|
164
|
-
* @param {
|
|
128
|
+
* @param {IPrimengPredefinedFilter[]} selectedValues - An array of selected predefined filter values.
|
|
165
129
|
*/
|
|
166
|
-
|
|
130
|
+
onPredefinedFilterChange(filterName: string, selectedValues: IPredefinedFilter[]): void;
|
|
167
131
|
/**
|
|
168
132
|
* Retrieves the number of values selected for a predefined filter.
|
|
169
133
|
*
|
|
@@ -173,8 +137,7 @@ export declare class ECSPrimengTable implements OnInit, AfterViewInit, OnDestroy
|
|
|
173
137
|
* @param {string} columnKeyName - The key name of the column for which to retrieve the number of selected values.
|
|
174
138
|
* @returns {string} A string indicating the number of selected values for the specified column.
|
|
175
139
|
*/
|
|
176
|
-
|
|
177
|
-
handleButtonsClick(action: (rowData: any) => void, rowData?: any): void;
|
|
140
|
+
predefinedFiltersSelectedValuesText(columnKeyName: string): string;
|
|
178
141
|
/**
|
|
179
142
|
* Checks if the provided column metadata matches a specific style of the predefined filters
|
|
180
143
|
* that need to be applied to an item on a row.
|
|
@@ -198,6 +161,7 @@ export declare class ECSPrimengTable implements OnInit, AfterViewInit, OnDestroy
|
|
|
198
161
|
private updateColumnsSpecialProperties;
|
|
199
162
|
openExcelExport(): void;
|
|
200
163
|
generateExcelReport(event: any): void;
|
|
164
|
+
updateIconBlobsForCollections(): void;
|
|
201
165
|
static ɵfac: i0.ɵɵFactoryDeclaration<ECSPrimengTable, never>;
|
|
202
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ECSPrimengTable, "ecs-primeng-table", never, { "
|
|
166
|
+
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
167
|
}
|
|
@@ -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; }; }, {
|
|
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,
|
|
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
|
-
|
|
13
|
-
[key: string]:
|
|
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
|
-
|
|
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; }; "
|
|
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
|
|
4
|
+
export declare class TablePredefinedFilters {
|
|
4
5
|
private sanitizer;
|
|
5
|
-
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
static
|
|
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:
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
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 "./
|
|
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
|
+
}
|
|
@@ -1,29 +1,66 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Interface representing
|
|
2
|
+
* Interface representing a table action button, applicable for both header and row buttons.
|
|
3
3
|
*/
|
|
4
4
|
export interface ITableButton {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* Optional. The icon to display on the button.
|
|
7
|
+
* Should be a valid icon name from PrimeNG, Material Icons, Font Awesome, or similar libraries.
|
|
8
8
|
*/
|
|
9
9
|
icon?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Optional. The position of the icon relative to the button label.
|
|
12
|
+
* Defaults to "left". Possible values are:
|
|
13
|
+
* - "left"
|
|
14
|
+
* - "right"
|
|
15
|
+
* - "top"
|
|
16
|
+
* - "bottom"
|
|
17
|
+
*/
|
|
18
|
+
iconPos?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Optional. The text label displayed on the button.
|
|
21
|
+
*/
|
|
10
22
|
label?: string;
|
|
11
23
|
/**
|
|
12
|
-
*
|
|
13
|
-
|
|
24
|
+
* Optional. If true, the button will be round. Defaults to false.
|
|
25
|
+
*/
|
|
26
|
+
rounded?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Optional. If true, adds a shadow to indicate elevation. Defaults to false.
|
|
29
|
+
*/
|
|
30
|
+
raised?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Optional. Specifies the variant of the button.
|
|
33
|
+
* Can be null (default), "text", or "outlined".
|
|
34
|
+
*/
|
|
35
|
+
variant?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Optional. The CSS class to apply for button styling.
|
|
38
|
+
* Example: "p-button-success" or "custom-class".
|
|
14
39
|
*/
|
|
15
40
|
color?: string;
|
|
16
41
|
/**
|
|
17
|
-
*
|
|
18
|
-
|
|
19
|
-
|
|
42
|
+
* Optional. Additional inline CSS styles for the button.
|
|
43
|
+
*/
|
|
44
|
+
style?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Optional. Function that determines whether the button should be displayed for a given row.
|
|
47
|
+
* @param rowData The row data object. Null for header buttons.
|
|
48
|
+
* @returns True if the button should be visible; false otherwise.
|
|
20
49
|
*/
|
|
21
|
-
|
|
50
|
+
enabledCondition?: (rowData: any) => boolean;
|
|
22
51
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
52
|
+
* Optional. Controls behavior when `condition` returns false.
|
|
53
|
+
* - If `true`, the button will be hidden when the condition is not met.
|
|
54
|
+
* - If `false` or `undefined`, the button will remain visible but disabled.
|
|
55
|
+
*/
|
|
56
|
+
conditionFailHide?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Optional. The action to execute when the button is clicked.
|
|
59
|
+
* @param rowData The row data object of the clicked row. Null for header buttons.
|
|
26
60
|
*/
|
|
27
61
|
action?: (rowData: any) => void;
|
|
62
|
+
/**
|
|
63
|
+
* Optional. Tooltip text to display when the user hovers over the button.
|
|
64
|
+
*/
|
|
28
65
|
tooltip?: string;
|
|
29
66
|
}
|