@eternalcodestudio/primeng-table 19.0.0 → 20.0.0
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/fesm2022/eternalcodestudio-primeng-table.mjs +39 -48
- package/fesm2022/eternalcodestudio-primeng-table.mjs.map +1 -1
- package/index.d.ts +451 -3
- package/package.json +5 -5
- package/fesm2022/ecs-primeng-table.mjs +0 -1745
- package/fesm2022/ecs-primeng-table.mjs.map +0 -1
- package/lib/components/column-selector/column-selector.d.ts +0 -36
- package/lib/components/ecs-primeng-table/ecs-primeng-table.d.ts +0 -203
- package/lib/components/ecs-primeng-table/ecs-primeng-table.service.d.ts +0 -48
- package/lib/components/export-excel/export-excel.d.ts +0 -39
- package/lib/components/export-excel/export-excel.service.d.ts +0 -6
- package/lib/components/table-button/table-button.d.ts +0 -16
- package/lib/components/table-cell/table-cell.d.ts +0 -52
- package/lib/components/table-predifined-filters/table-predifined-filters.d.ts +0 -30
- package/lib/components/views-management/views-management.d.ts +0 -32
- package/lib/enums/cell-overflow-behaviour.enum.d.ts +0 -4
- package/lib/enums/data-align-horizontal.enum.d.ts +0 -5
- package/lib/enums/data-align-vertical.enum.d.ts +0 -5
- package/lib/enums/data-type.enum.enum.d.ts +0 -6
- package/lib/enums/frozen-column-align.enum.d.ts +0 -5
- package/lib/enums/index.d.ts +0 -6
- package/lib/enums/table-view-save-mode.enum.d.ts +0 -6
- package/lib/interfaces/columns-metadata.interface.d.ts +0 -25
- package/lib/interfaces/excel-export-request.interface.d.ts +0 -7
- package/lib/interfaces/index.d.ts +0 -9
- package/lib/interfaces/predifined-filter.interface.d.ts +0 -34
- package/lib/interfaces/table-button.interface.d.ts +0 -29
- package/lib/interfaces/table-configuration.interface.d.ts +0 -8
- package/lib/interfaces/table-paged-response.interface.d.ts +0 -13
- package/lib/interfaces/table-query-request.interface.d.ts +0 -20
- package/lib/interfaces/table-view-data.interface.d.ts +0 -12
- package/lib/interfaces/table-view.interface.d.ts +0 -6
- package/lib/services/http.service.d.ts +0 -9
- package/lib/services/index.d.ts +0 -2
- package/lib/services/notification.service.d.ts +0 -7
- package/lib/utils/data-align-horizontal-as-text.d.ts +0 -2
- package/lib/utils/data-align-vertical-as-text.d.ts +0 -2
- package/lib/utils/data-type-as-text.d.ts +0 -2
- package/lib/utils/frozen-column-align-as-text.d.ts +0 -2
- package/lib/utils/highlight-text.d.ts +0 -24
- package/lib/utils/index.d.ts +0 -5
- package/public-api.d.ts +0 -5
package/index.d.ts
CHANGED
|
@@ -1,5 +1,453 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OnInit, AfterViewInit, OnDestroy, EventEmitter, ElementRef } from '@angular/core';
|
|
3
|
+
import { Table, TableLazyLoadEvent, TableRowSelectEvent, TableRowUnSelectEvent, TablePageEvent } from 'primeng/table';
|
|
4
|
+
import { SortMeta, MenuItem } from 'primeng/api';
|
|
5
|
+
import { Observable } from 'rxjs';
|
|
6
|
+
import { HttpHeaders, HttpResponse } from '@angular/common/http';
|
|
7
|
+
|
|
8
|
+
declare abstract class ECSPrimengTableHttpService {
|
|
9
|
+
abstract handleHttpGetRequest<T>(servicePoint: string, httpOptions?: HttpHeaders | null, showSpinner?: boolean, customErrorHandler?: ((error: any) => Observable<any>) | null, showAPIError?: boolean, responseType?: 'json' | 'blob'): Observable<HttpResponse<T>>;
|
|
10
|
+
abstract handleHttpPostRequest<T>(servicePoint: string, data: any, httpOptions?: HttpHeaders | null, showSpinner?: boolean, customErrorHandler?: ((error: any) => Observable<any>) | null, showAPIError?: boolean, responseType?: 'json' | 'blob'): Observable<HttpResponse<T>>;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ECSPrimengTableHttpService, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ECSPrimengTableHttpService>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare abstract class ECSPrimengTableNotificationService {
|
|
16
|
+
abstract showToast(severity: string, title: string, message: string, duration?: number, keepToast?: boolean, closable?: boolean, clearPrevious?: boolean): void;
|
|
17
|
+
abstract clearToasts(): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ECSPrimengTableNotificationService, never>;
|
|
19
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ECSPrimengTableNotificationService>;
|
|
20
|
+
}
|
|
21
|
+
|
|
1
22
|
/**
|
|
2
|
-
*
|
|
23
|
+
* Interface representing the configuration for action buttons in a PrimeNG table.
|
|
3
24
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
25
|
+
interface ITableButton {
|
|
26
|
+
/**
|
|
27
|
+
* Gets or sets the icon to be displayed on the button.
|
|
28
|
+
* The value should be a string representing the PrimeIcons class name.
|
|
29
|
+
*/
|
|
30
|
+
icon?: string;
|
|
31
|
+
label?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Gets or sets the color style class to be applied to the button.
|
|
34
|
+
* The value should be a string representing a CSS class for styling the button.
|
|
35
|
+
*/
|
|
36
|
+
color?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Gets or sets the condition for displaying the button.
|
|
39
|
+
* It is a function that takes row data as input and returns a boolean indicating
|
|
40
|
+
* whether the button should be displayed for that row.
|
|
41
|
+
*/
|
|
42
|
+
condition?: (rowData: any) => boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Represents the action to be executed when the button is clicked.
|
|
45
|
+
* This function takes the row data of the clicked row as input and performs
|
|
46
|
+
* specific actions based on that data.
|
|
47
|
+
*/
|
|
48
|
+
action?: (rowData: any) => void;
|
|
49
|
+
tooltip?: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Interface representing the request structure for PrimeNG post requests.
|
|
54
|
+
*/
|
|
55
|
+
interface ITableQueryRequest {
|
|
56
|
+
/** Gets or sets the current page number.*/
|
|
57
|
+
page: number;
|
|
58
|
+
/** Gets or sets the number of items to display per page.*/
|
|
59
|
+
pageSize: number;
|
|
60
|
+
/** Gets or sets a list of sorting configurations for the table.*/
|
|
61
|
+
sort?: any;
|
|
62
|
+
/** Gets or sets a dictionary containing filter configurations for each column.*/
|
|
63
|
+
filter: any;
|
|
64
|
+
/** Gets or sets a global filter string applied to all columns.*/
|
|
65
|
+
globalFilter?: string | null;
|
|
66
|
+
/** Gets or sets a list of columns to be included in the response.*/
|
|
67
|
+
columns?: string[];
|
|
68
|
+
dateFormat: string;
|
|
69
|
+
dateTimezone: string;
|
|
70
|
+
dateCulture: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
interface IExcelExportRequest extends ITableQueryRequest {
|
|
74
|
+
filename: string;
|
|
75
|
+
allColumns: boolean;
|
|
76
|
+
applyFilters: boolean;
|
|
77
|
+
applySorts: boolean;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
declare enum CellOverflowBehaviour {
|
|
81
|
+
Hidden = 0,
|
|
82
|
+
Wrap = 1
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
declare enum DataAlignHorizontal {
|
|
86
|
+
Left = 0,
|
|
87
|
+
Center = 1,
|
|
88
|
+
Right = 2
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
declare enum DataAlignVertical {
|
|
92
|
+
Top = 0,
|
|
93
|
+
Middle = 1,
|
|
94
|
+
Bottom = 2
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
declare enum DataType {
|
|
98
|
+
Text = 0,
|
|
99
|
+
Numeric = 1,
|
|
100
|
+
Boolean = 2,
|
|
101
|
+
Date = 3
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
declare enum FrozenColumnAlign {
|
|
105
|
+
Noone = 0,
|
|
106
|
+
Left = 1,
|
|
107
|
+
Right = 2
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
declare enum TableViewSaveMode {
|
|
111
|
+
noone = 0,
|
|
112
|
+
sessionStorage = 1,
|
|
113
|
+
localStorage = 2,
|
|
114
|
+
databaseStorage = 3
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
interface IColumnMetadata {
|
|
118
|
+
field: string;
|
|
119
|
+
header: string;
|
|
120
|
+
dataType: DataType;
|
|
121
|
+
dataAlignHorizontal: DataAlignHorizontal;
|
|
122
|
+
dataAlignHorizontalAllowUserEdit: boolean;
|
|
123
|
+
dataAlignVertical: DataAlignVertical;
|
|
124
|
+
dataAlignVerticalAllowUserEdit: boolean;
|
|
125
|
+
canBeHidden: boolean;
|
|
126
|
+
startHidden: boolean;
|
|
127
|
+
canBeResized: boolean;
|
|
128
|
+
canBeReordered: boolean;
|
|
129
|
+
canBeSorted: boolean;
|
|
130
|
+
canBeFiltered: boolean;
|
|
131
|
+
filterPredifinedValuesName: string;
|
|
132
|
+
canBeGlobalFiltered: boolean;
|
|
133
|
+
columnDescription: string;
|
|
134
|
+
dataTooltipShow: boolean;
|
|
135
|
+
dataTooltipCustomColumnSource: string;
|
|
136
|
+
frozenColumnAlign: FrozenColumnAlign;
|
|
137
|
+
cellOverflowBehaviour: CellOverflowBehaviour;
|
|
138
|
+
cellOverflowBehaviourAllowUserEdit: boolean;
|
|
139
|
+
initialWidth: number;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
interface IPredifinedFilter {
|
|
143
|
+
/**
|
|
144
|
+
* The value of the PrimeNG icon.
|
|
145
|
+
*/
|
|
146
|
+
icon?: string;
|
|
147
|
+
iconURL?: string;
|
|
148
|
+
iconBlobSourceEndpoint?: string;
|
|
149
|
+
iconBlobSourceEndpointResponseError?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* The icon as a blob.
|
|
152
|
+
*/
|
|
153
|
+
iconBlob?: Blob;
|
|
154
|
+
/**
|
|
155
|
+
* A string representing the name to be shown in the UI.
|
|
156
|
+
*/
|
|
157
|
+
name?: string;
|
|
158
|
+
/**
|
|
159
|
+
* If the name needs to be shown in the UI
|
|
160
|
+
*/
|
|
161
|
+
displayName?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* The underlying value of the option. The value can be of any type and represents the data managed behind the scenes.
|
|
164
|
+
*/
|
|
165
|
+
value: any;
|
|
166
|
+
/**
|
|
167
|
+
* If the value needs to be displayed with a tag
|
|
168
|
+
*/
|
|
169
|
+
displayTag?: boolean;
|
|
170
|
+
tagStyle?: {
|
|
171
|
+
[key: string]: string;
|
|
172
|
+
};
|
|
173
|
+
iconColor?: string;
|
|
174
|
+
iconStyle?: string;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
interface ITableConfiguration {
|
|
178
|
+
columnsInfo: IColumnMetadata[];
|
|
179
|
+
allowedItemsPerPage: number[];
|
|
180
|
+
dateFormat: string;
|
|
181
|
+
dateTimezone: string;
|
|
182
|
+
dateCulture: string;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Interface representing the return structure for PrimeNG post requests when gathering data to represent in a table.
|
|
187
|
+
*/
|
|
188
|
+
interface ITablePagedResponse {
|
|
189
|
+
/** The current page number.*/
|
|
190
|
+
page: number;
|
|
191
|
+
/** Total number of records available from filter.*/
|
|
192
|
+
totalRecords: number;
|
|
193
|
+
/** Total number of records available (without filters).*/
|
|
194
|
+
totalRecordsNotFiltered: number;
|
|
195
|
+
/** Dynamic data representing the response content of data for the table.*/
|
|
196
|
+
data: any;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
interface ITableViewData {
|
|
200
|
+
columnsShown: IColumnMetadata[];
|
|
201
|
+
tableWidth: any;
|
|
202
|
+
columnsWidth: string;
|
|
203
|
+
multiSortMeta: SortMeta[] | null | undefined;
|
|
204
|
+
filters: any;
|
|
205
|
+
globalSearchText: string | null;
|
|
206
|
+
currentPage: number;
|
|
207
|
+
currentRowsPerPage: number;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
interface ITableView {
|
|
211
|
+
lastActive: boolean;
|
|
212
|
+
viewAlias: string;
|
|
213
|
+
viewData: ITableViewData;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
declare class ECSPrimengTableService {
|
|
217
|
+
private http;
|
|
218
|
+
private notification;
|
|
219
|
+
constructor(http: ECSPrimengTableHttpService, notification: ECSPrimengTableNotificationService);
|
|
220
|
+
fetchTableConfiguration(url: string): Observable<HttpResponse<ITableConfiguration>>;
|
|
221
|
+
fetchTableData(url: string, postData: ITableQueryRequest): Observable<HttpResponse<ITablePagedResponse>>;
|
|
222
|
+
fetchExcelReport(url: string, postData: IExcelExportRequest): Observable<HttpResponse<Blob>>;
|
|
223
|
+
downloadFile(data: Blob, fileName: string, contentType: string): void;
|
|
224
|
+
handleTableError(error: any, customTitle?: string): void;
|
|
225
|
+
orderColumnsWithFrozens(colsToOrder: IColumnMetadata[]): IColumnMetadata[];
|
|
226
|
+
/**
|
|
227
|
+
* Handles click events on action buttons in a row of data.
|
|
228
|
+
*
|
|
229
|
+
* @param {function} action - The action function to be executed when the button is clicked. It should accept one parameter, which is the row data.
|
|
230
|
+
* @param {any} [rowData=null] - The data of the row corresponding to the clicked button. Defaults to null.
|
|
231
|
+
*
|
|
232
|
+
* @returns {void}
|
|
233
|
+
*
|
|
234
|
+
* @example
|
|
235
|
+
* // Define an action for a button
|
|
236
|
+
* const deleteAction = (rowData) => {
|
|
237
|
+
* console.log(`Delete row with id: ${rowData.rowID}`);
|
|
238
|
+
* };
|
|
239
|
+
*
|
|
240
|
+
* // Use handleButtonsClick with row data
|
|
241
|
+
* handleButtonsClick(deleteAction, { rowID: 1, name: 'John Doe' });
|
|
242
|
+
*/
|
|
243
|
+
handleButtonsClick(action: (rowData: any) => void, rowData?: any): void;
|
|
244
|
+
getColumnStyle(col: any, headerCols?: boolean): Record<string, string>;
|
|
245
|
+
fetchTableViews(tableViewSaveAs: TableViewSaveMode, recoverListEndpoint: string, tableViewSaveKey: string): ITableView[] | Observable<HttpResponse<ITableView[]>>;
|
|
246
|
+
sortViews(tableSaveViewList: ITableView[]): void;
|
|
247
|
+
updateViewsMenuItems(tableSaveViewList: ITableView[]): MenuItem[];
|
|
248
|
+
viewsSaveToDatabase(tableSaveViewList: ITableView[], setListEndpoint: string, tableViewSaveKey: string): Observable<HttpResponse<any>>;
|
|
249
|
+
viewGenerateData(dt: Table, globalSearchText: string | null, currentPage: number, currentRowsPerPage: number, modifyFiltersFn: (filters: any) => any): ITableViewData;
|
|
250
|
+
computeColumnWidths(dt: Table): any;
|
|
251
|
+
computeTableWidth(dt: Table): any;
|
|
252
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ECSPrimengTableService, never>;
|
|
253
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ECSPrimengTableService>;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
declare class ECSPrimengTable implements OnInit, AfterViewInit, OnDestroy {
|
|
257
|
+
private tableService;
|
|
258
|
+
private notification;
|
|
259
|
+
private resizeObserver;
|
|
260
|
+
constructor(tableService: ECSPrimengTableService, notification: ECSPrimengTableNotificationService);
|
|
261
|
+
isActive: boolean;
|
|
262
|
+
data: any[];
|
|
263
|
+
columnsToShow: IColumnMetadata[];
|
|
264
|
+
computeScrollHeight: boolean;
|
|
265
|
+
globalSearchEnabled: boolean;
|
|
266
|
+
globalSearchMaxLength: number;
|
|
267
|
+
globalSearchPlaceholder: string;
|
|
268
|
+
columnEditorEnabled: boolean;
|
|
269
|
+
urlColumnsSource: string;
|
|
270
|
+
urlDataSource: string;
|
|
271
|
+
urlExcelReport: string | null;
|
|
272
|
+
predifinedFiltersCollection: {
|
|
273
|
+
[key: string]: IPredifinedFilter[];
|
|
274
|
+
};
|
|
275
|
+
predifinedFiltersNoSelectionPlaceholder: string;
|
|
276
|
+
predifinedFiltersCollectionSelectedValuesText: string;
|
|
277
|
+
rowActionButtons: ITableButton[];
|
|
278
|
+
headerActionButtons: ITableButton[];
|
|
279
|
+
copyCellDataToClipboardTimeSecs: number;
|
|
280
|
+
actionsColumnAligmentRight: boolean;
|
|
281
|
+
actionsColumnWidth: number;
|
|
282
|
+
actionsColumnFrozen: boolean;
|
|
283
|
+
rowSelectorColumnActive: boolean;
|
|
284
|
+
rowSelectorColumName: string;
|
|
285
|
+
rowSelectorColumnAligmentRight: boolean;
|
|
286
|
+
rowSelectorColumnWidth: number;
|
|
287
|
+
rowSelectorColumnFrozen: boolean;
|
|
288
|
+
actionsColumnResizable: boolean;
|
|
289
|
+
actionColumnName: string;
|
|
290
|
+
rowselectorColumnResizable: boolean;
|
|
291
|
+
noDataFoundText: string;
|
|
292
|
+
showClearSortAndFilters: boolean;
|
|
293
|
+
excelReportTitleDefault: string;
|
|
294
|
+
excelReportTitleAllowUserEdit: boolean;
|
|
295
|
+
tableViewSaveAs: TableViewSaveMode;
|
|
296
|
+
tableViewSaveKey: string;
|
|
297
|
+
viewsGetSourceURL: string;
|
|
298
|
+
viewsSaveSourceURL: string;
|
|
299
|
+
maxTableViews: number;
|
|
300
|
+
onRowCheckboxChange: EventEmitter<{
|
|
301
|
+
rowID: any;
|
|
302
|
+
selected: boolean;
|
|
303
|
+
}>;
|
|
304
|
+
onRowSelect: EventEmitter<{
|
|
305
|
+
rowID: any;
|
|
306
|
+
rowData: any;
|
|
307
|
+
}>;
|
|
308
|
+
onRowUnselect: EventEmitter<{
|
|
309
|
+
rowID: any;
|
|
310
|
+
rowData: any;
|
|
311
|
+
}>;
|
|
312
|
+
viewsModalShow: boolean;
|
|
313
|
+
tableViewCurrentSelectedAlias: string | null;
|
|
314
|
+
tableViewsFirstFetchDone: boolean;
|
|
315
|
+
excelReportTitle: string;
|
|
316
|
+
showExportModal: boolean;
|
|
317
|
+
showColumnSelector: boolean;
|
|
318
|
+
selectedRowsCheckbox: any[];
|
|
319
|
+
dt: Table;
|
|
320
|
+
showRefreshData: boolean;
|
|
321
|
+
scrollHeight: string;
|
|
322
|
+
globalSearchText: string | null;
|
|
323
|
+
tableViewsList: ITableView[];
|
|
324
|
+
tableViews_menuItems: MenuItem[];
|
|
325
|
+
DataType: typeof DataType;
|
|
326
|
+
CellOverflowBehaviour: typeof CellOverflowBehaviour;
|
|
327
|
+
DataAlignHorizontal: typeof DataAlignHorizontal;
|
|
328
|
+
DataAlignVertical: typeof DataAlignVertical;
|
|
329
|
+
FrozenColumnAlign: typeof FrozenColumnAlign;
|
|
330
|
+
TableViewSaveMode: typeof TableViewSaveMode;
|
|
331
|
+
rowSelection: any;
|
|
332
|
+
currentPage: number;
|
|
333
|
+
currentRowsPerPage: number;
|
|
334
|
+
allowedRowsPerPage: number[];
|
|
335
|
+
totalRecords: number;
|
|
336
|
+
totalRecordsNotFiltered: number;
|
|
337
|
+
dateFormat: string;
|
|
338
|
+
dateTimezone: string;
|
|
339
|
+
dateCulture: string;
|
|
340
|
+
columns: IColumnMetadata[];
|
|
341
|
+
columnsCantBeHidden: IColumnMetadata[];
|
|
342
|
+
columnsSelected: IColumnMetadata[];
|
|
343
|
+
columnModalData: any[];
|
|
344
|
+
filteredColumnData: any[];
|
|
345
|
+
predifinedFiltersSelectedValuesCollection: {
|
|
346
|
+
[key: string]: any[];
|
|
347
|
+
};
|
|
348
|
+
private copyCellDataTimer;
|
|
349
|
+
tableLazyLoadEventInformation: TableLazyLoadEvent;
|
|
350
|
+
private initialConfigurationFetched;
|
|
351
|
+
ngOnInit(): void;
|
|
352
|
+
tableContainer: ElementRef;
|
|
353
|
+
headerContainer: ElementRef;
|
|
354
|
+
paginatorContainer: ElementRef;
|
|
355
|
+
ngAfterViewInit(): void;
|
|
356
|
+
onWindowResize: () => void;
|
|
357
|
+
calculateScrollHeight(): void;
|
|
358
|
+
ngOnDestroy(): void;
|
|
359
|
+
/**
|
|
360
|
+
* 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
|
|
361
|
+
*
|
|
362
|
+
* @param {(optionalData?: any) => void} [continueAction] - Optional action to execute after data retrieval if it succeeded.
|
|
363
|
+
* @param {boolean} [uponContinueActionEndModalHttp=false] - Optional flag to set the loading indicator to inactive after data retrieval.
|
|
364
|
+
*/
|
|
365
|
+
updateData(continueAction?: (optionalData?: any) => void, uponContinueActionEndModalHttp?: boolean): void;
|
|
366
|
+
fetchTableConfiguration(): void;
|
|
367
|
+
private handleTableConfigurationResponse;
|
|
368
|
+
refreshData(event: any): void;
|
|
369
|
+
tableViewsEnabled(): boolean;
|
|
370
|
+
fetchTableViews(): void;
|
|
371
|
+
private tableViewListProcess;
|
|
372
|
+
viewLoad(tableViewAlias: string): void;
|
|
373
|
+
viewCreate(viewAlias: string): void;
|
|
374
|
+
viewDelete(viewAlias: string): void;
|
|
375
|
+
viewEditAlias(event: {
|
|
376
|
+
viewAliasOld: string;
|
|
377
|
+
viewAliasNew: string;
|
|
378
|
+
}): void;
|
|
379
|
+
viewUpdateData(viewAlias: string): void;
|
|
380
|
+
viewsSave(endMessage: number): void;
|
|
381
|
+
viewsSaveEnd(endMessage: number): void;
|
|
382
|
+
fetchTableData(event: TableLazyLoadEvent): void;
|
|
383
|
+
private modifyFiltersWithoutGlobalAndSelectedRows;
|
|
384
|
+
private selectorRowFilterBuilder;
|
|
385
|
+
revertDateTimeZoneFilters(inputFilter: any): any;
|
|
386
|
+
handleTableDataResponse(body: ITablePagedResponse): void;
|
|
387
|
+
clearFilters(dt: Table, force?: boolean, onlyGlobalFilter?: boolean): void;
|
|
388
|
+
clearSorts(dt: Table, force?: boolean): void;
|
|
389
|
+
hasToClearSorts(dt: Table, force?: boolean): boolean;
|
|
390
|
+
hasToClearFilters(dt: Table, globalSearchText: string | null, force?: boolean): boolean;
|
|
391
|
+
/**
|
|
392
|
+
* Determines whether there are active filters based on the provided filter rules.
|
|
393
|
+
*
|
|
394
|
+
* @param {any} filterRules An object representing filter rules for each column.
|
|
395
|
+
* The keys are column names, and the values are arrays of filter rules.
|
|
396
|
+
* Each filter rule has the following properties:
|
|
397
|
+
* - `field`: The field or property name of the column.
|
|
398
|
+
* - `value`: The filter value entered by the user.
|
|
399
|
+
* - Other properties depending on the type of filter (e.g., `matchMode` for string filters).
|
|
400
|
+
* @returns {boolean} `true` if at least one active filter is found, otherwise `false`.
|
|
401
|
+
*/
|
|
402
|
+
private hasFilters;
|
|
403
|
+
getColumnStyle(col: any, headerCols?: boolean): Record<string, string>;
|
|
404
|
+
getPredifinedFilterValues(columnKeyName: string): IPredifinedFilter[];
|
|
405
|
+
getFrozenColumnAlignAsText(frozenColumnAlign: FrozenColumnAlign): string;
|
|
406
|
+
getDataTypeAsText(dataType: DataType): string;
|
|
407
|
+
/**
|
|
408
|
+
* Updates the filters of a PrimeNG data table based on predefined filter changes.
|
|
409
|
+
*
|
|
410
|
+
* @param {string} filterName - The name of the filter to be updated.
|
|
411
|
+
* @param {IPrimengPredifinedFilter[]} selectedValues - An array of selected predefined filter values.
|
|
412
|
+
*/
|
|
413
|
+
onPredifinedFilterChange(filterName: string, selectedValues: IPredifinedFilter[]): void;
|
|
414
|
+
/**
|
|
415
|
+
* Retrieves the number of values selected for a predefined filter.
|
|
416
|
+
*
|
|
417
|
+
* This function checks the collection of selected values for a specified column key name and returns a string
|
|
418
|
+
* indicating the number of selected items along with a predefined text.
|
|
419
|
+
*
|
|
420
|
+
* @param {string} columnKeyName - The key name of the column for which to retrieve the number of selected values.
|
|
421
|
+
* @returns {string} A string indicating the number of selected values for the specified column.
|
|
422
|
+
*/
|
|
423
|
+
predifinedFiltersSelectedValuesText(columnKeyName: string): string;
|
|
424
|
+
handleButtonsClick(action: (rowData: any) => void, rowData?: any): void;
|
|
425
|
+
/**
|
|
426
|
+
* Checks if the provided column metadata matches a specific style of the predefined filters
|
|
427
|
+
* that need to be applied to an item on a row.
|
|
428
|
+
*
|
|
429
|
+
* @param {IprimengColumnsMetadata} colMetadata - The metadata of the column being checked.
|
|
430
|
+
* @param {any} value - The value to be matched against the predefined filter values.
|
|
431
|
+
* @returns {any} The matching predefined filter value if found, otherwise null.
|
|
432
|
+
*/
|
|
433
|
+
getPredfinedFilterMatch(colMetadata: IColumnMetadata, value: any): any;
|
|
434
|
+
copyToClipboardStart(event: MouseEvent): void;
|
|
435
|
+
copyToClipboardCancel(): void;
|
|
436
|
+
getDataAlignHorizontalAsText(dataAlignHorizontal: DataAlignHorizontal): string;
|
|
437
|
+
getDataAlignVerticalAsText(dataAlignVertical: DataAlignVertical): string;
|
|
438
|
+
isRowCheckboxSelected(rowID: any): boolean;
|
|
439
|
+
onRowChekboxChange(event: any, rowID: any): void;
|
|
440
|
+
rowSelect(event: TableRowSelectEvent<any>): void;
|
|
441
|
+
rowUnselect(event: TableRowUnSelectEvent<any>): void;
|
|
442
|
+
pageChange(event: TablePageEvent): void;
|
|
443
|
+
columnSelectorShow(): void;
|
|
444
|
+
applyColumnModalChanges(selectedColumns: IColumnMetadata[]): void;
|
|
445
|
+
private updateColumnsSpecialProperties;
|
|
446
|
+
openExcelExport(): void;
|
|
447
|
+
generateExcelReport(event: any): void;
|
|
448
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ECSPrimengTable, never>;
|
|
449
|
+
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>;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
export { CellOverflowBehaviour, DataAlignHorizontal, DataAlignVertical, DataType, ECSPrimengTable, ECSPrimengTableHttpService, ECSPrimengTableNotificationService, ECSPrimengTableService, FrozenColumnAlign, TableViewSaveMode };
|
|
453
|
+
export type { IColumnMetadata, IExcelExportRequest, IPredifinedFilter, ITableButton, ITableConfiguration, ITablePagedResponse, ITableQueryRequest, ITableView, ITableViewData };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eternalcodestudio/primeng-table",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.0",
|
|
4
4
|
"description": "ECS reusable Angular PrimeNG table component with advanced server-side filters. Designed to offload filtering logic to any backend API.",
|
|
5
5
|
"author": "ECS (Eternal CODE Studio)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"ui"
|
|
15
15
|
],
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@angular/common": ">=
|
|
18
|
-
"@angular/core": ">=
|
|
19
|
-
"primeng": ">=
|
|
20
|
-
"primeicons": ">=
|
|
17
|
+
"@angular/common": ">=20.0.0",
|
|
18
|
+
"@angular/core": ">=20.0.0",
|
|
19
|
+
"primeng": ">=20.0.0",
|
|
20
|
+
"primeicons": ">=7.0.0"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"tslib": "^2.3.0"
|