@eternalcodestudio/primeng-table 20.0.2 → 20.0.4
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 +375 -247
- package/fesm2022/eternalcodestudio-primeng-table.mjs.map +1 -1
- package/index.d.ts +336 -62
- package/package.json +3 -4
package/index.d.ts
CHANGED
|
@@ -2,18 +2,18 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { OnInit, AfterViewInit, EventEmitter, ElementRef } from '@angular/core';
|
|
3
3
|
import { Table, TableLazyLoadEvent, TableRowSelectEvent, TableRowUnSelectEvent, TablePageEvent } from 'primeng/table';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
|
-
import {
|
|
5
|
+
import { HttpResponse, HttpHeaders } from '@angular/common/http';
|
|
6
6
|
import { SortMeta, MenuItem } from 'primeng/api';
|
|
7
7
|
|
|
8
8
|
declare abstract class ECSPrimengTableHttpService {
|
|
9
|
-
abstract handleHttpGetRequest<T>(servicePoint: string,
|
|
10
|
-
abstract handleHttpPostRequest<T>(servicePoint: string, data: any, httpOptions?: HttpHeaders | null,
|
|
9
|
+
abstract handleHttpGetRequest<T>(servicePoint: string, responseType?: 'json' | 'blob'): Observable<HttpResponse<T>>;
|
|
10
|
+
abstract handleHttpPostRequest<T>(servicePoint: string, data: any, httpOptions?: HttpHeaders | null, responseType?: 'json' | 'blob'): Observable<HttpResponse<T>>;
|
|
11
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<ECSPrimengTableHttpService, never>;
|
|
12
12
|
static ɵprov: i0.ɵɵInjectableDeclaration<ECSPrimengTableHttpService>;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
declare abstract class ECSPrimengTableNotificationService {
|
|
16
|
-
abstract showToast(severity: string, title: string, message: string
|
|
16
|
+
abstract showToast(severity: string, title: string, message: string): void;
|
|
17
17
|
abstract clearToasts(): void;
|
|
18
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<ECSPrimengTableNotificationService, never>;
|
|
19
19
|
static ɵprov: i0.ɵɵInjectableDeclaration<ECSPrimengTableNotificationService>;
|
|
@@ -77,42 +77,103 @@ interface IExcelExportRequest extends ITableQueryRequest {
|
|
|
77
77
|
applySorts: boolean;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
/**
|
|
81
|
+
* Enum representing how content that overflows a table cell should be handled.
|
|
82
|
+
*
|
|
83
|
+
* @remarks
|
|
84
|
+
* Determines the visual behavior of cell content when it exceeds the cell's width.
|
|
85
|
+
*/
|
|
80
86
|
declare enum CellOverflowBehaviour {
|
|
87
|
+
/** Content that exceeds the cell's width is clipped and not visible. */
|
|
81
88
|
Hidden = 0,
|
|
89
|
+
/** Content wraps onto multiple lines to fit within the cell. */
|
|
82
90
|
Wrap = 1,
|
|
91
|
+
/** Content is truncated and an ellipsis (...) is shown at the end. */
|
|
83
92
|
Ellipsis = 2
|
|
84
93
|
}
|
|
85
94
|
|
|
95
|
+
/**
|
|
96
|
+
* Enum representing the horizontal alignment of content within a table cell.
|
|
97
|
+
*
|
|
98
|
+
* @remarks
|
|
99
|
+
* Determines how the content inside a cell is positioned horizontally relative to the cell's width.
|
|
100
|
+
*/
|
|
86
101
|
declare enum DataAlignHorizontal {
|
|
102
|
+
/** Align content to the left of the cell. */
|
|
87
103
|
Left = 0,
|
|
104
|
+
/** Align content to the center of the cell. */
|
|
88
105
|
Center = 1,
|
|
106
|
+
/** Align content to the right of the cell. */
|
|
89
107
|
Right = 2
|
|
90
108
|
}
|
|
91
109
|
|
|
110
|
+
/**
|
|
111
|
+
* Enum representing the vertical alignment of content within a table cell.
|
|
112
|
+
*
|
|
113
|
+
* @remarks
|
|
114
|
+
* Determines how the content inside a cell is positioned vertically relative to the cell's height.
|
|
115
|
+
*/
|
|
92
116
|
declare enum DataAlignVertical {
|
|
117
|
+
/** Align content to the top of the cell. */
|
|
93
118
|
Top = 0,
|
|
119
|
+
/** Align content to the vertical middle of the cell. */
|
|
94
120
|
Middle = 1,
|
|
121
|
+
/** Align content to the bottom of the cell. */
|
|
95
122
|
Bottom = 2
|
|
96
123
|
}
|
|
97
124
|
|
|
125
|
+
/**
|
|
126
|
+
* Enum representing the different types of data a table column can hold.
|
|
127
|
+
*
|
|
128
|
+
* @remarks
|
|
129
|
+
* This is used to determine how values should be rendered, formatted, and
|
|
130
|
+
* filtered in the table component.
|
|
131
|
+
*/
|
|
98
132
|
declare enum DataType {
|
|
133
|
+
/** Plain text string values. */
|
|
99
134
|
Text = 0,
|
|
135
|
+
/** Numeric values, e.g., integers or decimals. */
|
|
100
136
|
Numeric = 1,
|
|
137
|
+
/** Boolean values (true/false). */
|
|
101
138
|
Boolean = 2,
|
|
102
|
-
Date
|
|
139
|
+
/** Date or datetime values. */
|
|
140
|
+
Date = 3,
|
|
141
|
+
/** List of values, stored as a string separated by a delimiter (";"). */
|
|
142
|
+
List = 4
|
|
103
143
|
}
|
|
104
144
|
|
|
145
|
+
/**
|
|
146
|
+
* Enum representing the alignment of frozen columns in a table.
|
|
147
|
+
*
|
|
148
|
+
* @remarks
|
|
149
|
+
* Used to determine if a column should be frozen, and if so, on which side
|
|
150
|
+
* of the table it should appear.
|
|
151
|
+
*/
|
|
105
152
|
declare enum FrozenColumnAlign {
|
|
153
|
+
/** The column is not frozen. */
|
|
106
154
|
Noone = 0,
|
|
155
|
+
/** The column is frozen on the left side of the table. */
|
|
107
156
|
Left = 1,
|
|
157
|
+
/** The column is frozen on the right side of the table. */
|
|
108
158
|
Right = 2
|
|
109
159
|
}
|
|
110
160
|
|
|
161
|
+
/**
|
|
162
|
+
* Enum representing the mode used to save the state or configuration of a table view.
|
|
163
|
+
*
|
|
164
|
+
* @remarks
|
|
165
|
+
* Determines where and how the table's view settings (e.g., column order, filters,
|
|
166
|
+
* sorting) are persisted.
|
|
167
|
+
*/
|
|
111
168
|
declare enum TableViewSaveMode {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
169
|
+
/** Do not save the table view state. */
|
|
170
|
+
None = 0,
|
|
171
|
+
/** Save the table view state in the browser's sessionStorage (cleared on tab close). */
|
|
172
|
+
SessionStorage = 1,
|
|
173
|
+
/** Save the table view state in the browser's localStorage (persists across sessions). */
|
|
174
|
+
LocalStorage = 2,
|
|
175
|
+
/** Save the table view state in a backend database (requires server support). */
|
|
176
|
+
DatabaseStorage = 3
|
|
116
177
|
}
|
|
117
178
|
|
|
118
179
|
interface IColumnMetadata {
|
|
@@ -129,7 +190,7 @@ interface IColumnMetadata {
|
|
|
129
190
|
canBeReordered: boolean;
|
|
130
191
|
canBeSorted: boolean;
|
|
131
192
|
canBeFiltered: boolean;
|
|
132
|
-
|
|
193
|
+
filterPredefinedValuesName: string;
|
|
133
194
|
canBeGlobalFiltered: boolean;
|
|
134
195
|
columnDescription: string;
|
|
135
196
|
dataTooltipShow: boolean;
|
|
@@ -140,7 +201,7 @@ interface IColumnMetadata {
|
|
|
140
201
|
initialWidth: number;
|
|
141
202
|
}
|
|
142
203
|
|
|
143
|
-
interface
|
|
204
|
+
interface IPredefinedFilter {
|
|
144
205
|
/**
|
|
145
206
|
* The value of the PrimeNG icon.
|
|
146
207
|
*/
|
|
@@ -181,7 +242,250 @@ interface ITableConfiguration {
|
|
|
181
242
|
dateFormat: string;
|
|
182
243
|
dateTimezone: string;
|
|
183
244
|
dateCulture: string;
|
|
245
|
+
maxViews: number;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/** Configuration options for ECS Primeng table */
|
|
249
|
+
interface ITableOptions {
|
|
250
|
+
/**
|
|
251
|
+
* Controls whether the table is active.
|
|
252
|
+
*
|
|
253
|
+
* - When `true`, the table will fetch configuration, columns, and data on init.
|
|
254
|
+
* - When `false`, the table will **not** automatically fetch or update data, even after initialization.
|
|
255
|
+
* Use this if you want to apply filters, column changes, or other manipulations
|
|
256
|
+
* without triggering automatic updates.
|
|
257
|
+
*
|
|
258
|
+
* @default true
|
|
259
|
+
*/
|
|
260
|
+
isActive: boolean;
|
|
261
|
+
/**
|
|
262
|
+
* Endpoint URL to fetch the table configuration.
|
|
263
|
+
*
|
|
264
|
+
* The configuration is fetched **once** when the table is initialized and is expected to return
|
|
265
|
+
* an `ITableConfiguration` object from the API. This includes data such as column definitions,
|
|
266
|
+
* the timezone to use, and other settings.
|
|
267
|
+
*
|
|
268
|
+
* If set to `null` or if `isActive` is `false`, the table will **not** fetch configuration automatically.
|
|
269
|
+
*
|
|
270
|
+
* @default null
|
|
271
|
+
*/
|
|
272
|
+
urlTableConfiguration: string | null;
|
|
273
|
+
/**
|
|
274
|
+
* Endpoint URL to fetch the table data.
|
|
275
|
+
*
|
|
276
|
+
* This endpoint is called **whenever the user filters, changes pages, or sorts** the table.
|
|
277
|
+
* It is expected to return an `ITablePagedResponse` object containing the paginated data.
|
|
278
|
+
*
|
|
279
|
+
* If set to `null` or if `isActive` is `false`, the table will **not** fetch or update data automatically.
|
|
280
|
+
*
|
|
281
|
+
* @default null
|
|
282
|
+
*/
|
|
283
|
+
urlTableData: string | null;
|
|
284
|
+
/**
|
|
285
|
+
* The array of data to be displayed in the table.
|
|
286
|
+
*
|
|
287
|
+
* Each item should represent a row and match the table's column structure.
|
|
288
|
+
*
|
|
289
|
+
* @default []
|
|
290
|
+
*/
|
|
291
|
+
data: any[];
|
|
292
|
+
header: {
|
|
293
|
+
buttons: ITableButton[];
|
|
294
|
+
clearSortsEnabled: boolean;
|
|
295
|
+
clearSortsIcon: string;
|
|
296
|
+
clearFiltersEnabled: boolean;
|
|
297
|
+
clearFiltersIcon: string;
|
|
298
|
+
};
|
|
299
|
+
/**
|
|
300
|
+
* Configurations related to the columns of the table.
|
|
301
|
+
*/
|
|
302
|
+
columns: {
|
|
303
|
+
/**
|
|
304
|
+
* Enables or disables the column selector feature.
|
|
305
|
+
*
|
|
306
|
+
* When `true`, a button is displayed in the top-left corner of the table.
|
|
307
|
+
* Clicking this button opens a modal that allows users to:
|
|
308
|
+
* - Show or hide columns.
|
|
309
|
+
* - Adjust the cell overflow behavior for each column.
|
|
310
|
+
* - Change the horizontal and vertical alignment of cells per column.
|
|
311
|
+
*
|
|
312
|
+
* When `false`, the button to open the column's selector modal will not be available.
|
|
313
|
+
*
|
|
314
|
+
* @default true
|
|
315
|
+
*/
|
|
316
|
+
selectorEnabled: boolean;
|
|
317
|
+
/**
|
|
318
|
+
* The combination of non-selectable columns and user-selected columns
|
|
319
|
+
* that must be displayed in the table.
|
|
320
|
+
*
|
|
321
|
+
* @default []
|
|
322
|
+
*/
|
|
323
|
+
shown: IColumnMetadata[];
|
|
324
|
+
};
|
|
325
|
+
/**
|
|
326
|
+
* Configurations related to the rows of the table.
|
|
327
|
+
*/
|
|
328
|
+
rows: {
|
|
329
|
+
class: (rowData: any) => string | string[] | Set<string> | {
|
|
330
|
+
[klass: string]: any;
|
|
331
|
+
};
|
|
332
|
+
style: (rowData: any) => {
|
|
333
|
+
[klass: string]: any;
|
|
334
|
+
};
|
|
335
|
+
action: {
|
|
336
|
+
buttons: ITableButton[];
|
|
337
|
+
header: string;
|
|
338
|
+
alignmentRight: boolean;
|
|
339
|
+
width: number;
|
|
340
|
+
frozen: boolean;
|
|
341
|
+
resizable: boolean;
|
|
342
|
+
};
|
|
343
|
+
checkboxSelector: {
|
|
344
|
+
enabled: boolean;
|
|
345
|
+
header: string;
|
|
346
|
+
alignmentRight: boolean;
|
|
347
|
+
width: number;
|
|
348
|
+
frozen: boolean;
|
|
349
|
+
resizable: boolean;
|
|
350
|
+
};
|
|
351
|
+
singleSelector: {
|
|
352
|
+
enabled: boolean;
|
|
353
|
+
metakey: boolean;
|
|
354
|
+
};
|
|
355
|
+
};
|
|
356
|
+
/** Configurations related to the vertical scroll of the table. */
|
|
357
|
+
verticalScroll: {
|
|
358
|
+
/**
|
|
359
|
+
* Automatically adjust the table's height to fit its container.
|
|
360
|
+
*
|
|
361
|
+
* When set to `true`, the table will calculate the maximum height dynamically
|
|
362
|
+
* so that it exactly fits its container. This takes precedence over the `height` property.
|
|
363
|
+
*
|
|
364
|
+
* @default true
|
|
365
|
+
*/
|
|
366
|
+
fitToContainer: boolean;
|
|
367
|
+
/**
|
|
368
|
+
* Fixed vertical height for the table when `fitToContainer` is `false`.
|
|
369
|
+
*
|
|
370
|
+
* - If `fitToContainer` from `verticalScroll` is `true`, this property is ignored.
|
|
371
|
+
* - If set to a value `<= 0`, this is ignored and there will be only verticall scroll enabled if `fitToContainer` from `verticalScroll` is `true`.
|
|
372
|
+
*
|
|
373
|
+
* Use this property to enable vertical scrolling with a fixed height when you do not want
|
|
374
|
+
* the table to dynamically fit its container.
|
|
375
|
+
*
|
|
376
|
+
* @default 0
|
|
377
|
+
*/
|
|
378
|
+
height: number;
|
|
379
|
+
};
|
|
380
|
+
/** Configurations related to the global search functionality of the table. */
|
|
381
|
+
globalSearch: {
|
|
382
|
+
/**
|
|
383
|
+
* Enables or disables the global search input.
|
|
384
|
+
*
|
|
385
|
+
* When set to `true`, users can search across all table columns using the global search bar.
|
|
386
|
+
* When `false`, the global search input will not be rendered.
|
|
387
|
+
*
|
|
388
|
+
* @default true
|
|
389
|
+
*/
|
|
390
|
+
enabled: boolean;
|
|
391
|
+
/**
|
|
392
|
+
* Maximum number of characters allowed in the global search input.
|
|
393
|
+
*
|
|
394
|
+
* Use this to limit the length of search queries and prevent excessively long input.
|
|
395
|
+
*
|
|
396
|
+
* @default 20
|
|
397
|
+
*/
|
|
398
|
+
maxLength: number;
|
|
399
|
+
};
|
|
400
|
+
predefinedFilters: {
|
|
401
|
+
[key: string]: IPredefinedFilter[];
|
|
402
|
+
};
|
|
403
|
+
/**
|
|
404
|
+
* Configurations related to saved table views.
|
|
405
|
+
*/
|
|
406
|
+
views: {
|
|
407
|
+
/**
|
|
408
|
+
* Determines how the table views are saved.
|
|
409
|
+
*
|
|
410
|
+
* - `TableViewSaveMode.None`: Do not save any views.
|
|
411
|
+
* - `TableViewSaveMode.SessionStorage`: Save views in the browser session storage (cleared when the tab/window closes).
|
|
412
|
+
* - `TableViewSaveMode.LocalStorage`: Save views in the browser local storage (persistent across sessions).
|
|
413
|
+
* - `TableViewSaveMode.DatabaseStorage`: Save views directly in the database via the backend API. If you are using this method you will need to specify also the `urlGet`and `urlSave`
|
|
414
|
+
*
|
|
415
|
+
* This allows users to keep their custom column orders, filters, sorting, and other table settings
|
|
416
|
+
* according to the selected storage option.
|
|
417
|
+
*
|
|
418
|
+
* @default TableViewSaveMode.None
|
|
419
|
+
*/
|
|
420
|
+
saveMode: TableViewSaveMode;
|
|
421
|
+
/**
|
|
422
|
+
* Key used to identify the table when saving and retrieving its views.
|
|
423
|
+
*
|
|
424
|
+
* Each table should have a unique `saveKey` so that its saved views (filters, column order, sorting, etc.)
|
|
425
|
+
* do not conflict with other tables.
|
|
426
|
+
*
|
|
427
|
+
* If set to `null`, the table will not save or load any views.
|
|
428
|
+
*
|
|
429
|
+
* @default null
|
|
430
|
+
*/
|
|
431
|
+
saveKey: string | null;
|
|
432
|
+
/**
|
|
433
|
+
* Endpoint URL to fetch saved views from the database.
|
|
434
|
+
*
|
|
435
|
+
* Only used if `saveMode` is `TableViewSaveMode.databaseStorage`.
|
|
436
|
+
* The `saveKey` is sent to identify the correct table views.
|
|
437
|
+
*
|
|
438
|
+
* @default null
|
|
439
|
+
*/
|
|
440
|
+
urlGet: string | null;
|
|
441
|
+
/**
|
|
442
|
+
* Endpoint URL to save table views to the database.
|
|
443
|
+
*
|
|
444
|
+
* Only used if `saveMode` is `TableViewSaveMode.databaseStorage`.
|
|
445
|
+
* The `saveKey` is sent to identify the correct table views.
|
|
446
|
+
*
|
|
447
|
+
* @default null
|
|
448
|
+
*/
|
|
449
|
+
urlSave: string | null;
|
|
450
|
+
};
|
|
451
|
+
/**
|
|
452
|
+
* Configurations for exporting the table data to Excel.
|
|
453
|
+
*/
|
|
454
|
+
excelReport: {
|
|
455
|
+
/**
|
|
456
|
+
* Endpoint URL of the API to perform the Excel export.
|
|
457
|
+
*
|
|
458
|
+
* When set, the table will send a request to this endpoint including the properties
|
|
459
|
+
* specified by the user, such as selected columns, filters, and sort order, to generate
|
|
460
|
+
* the export.
|
|
461
|
+
*
|
|
462
|
+
* If set to `null`, Excel export functionality will be disabled.
|
|
463
|
+
*
|
|
464
|
+
* @default null
|
|
465
|
+
*/
|
|
466
|
+
url: string | null;
|
|
467
|
+
/**
|
|
468
|
+
* Default title shown in the Excel export modal when preparing the export.
|
|
469
|
+
*
|
|
470
|
+
* If the string is empty (after trimming) **and** `titleAllowUserEdit` is `false`,
|
|
471
|
+
* the export button will be disabled.
|
|
472
|
+
*
|
|
473
|
+
* @default "Report"
|
|
474
|
+
*/
|
|
475
|
+
defaultTitle: string;
|
|
476
|
+
/**
|
|
477
|
+
* Determines whether the user can edit the title of the Excel file in the export modal.
|
|
478
|
+
*
|
|
479
|
+
* - If `true`, the user can modify the title before exporting.
|
|
480
|
+
* - If `false`, the title is fixed to `defaultTitle`.
|
|
481
|
+
*
|
|
482
|
+
* @default true
|
|
483
|
+
*/
|
|
484
|
+
titleAllowUserEdit: boolean;
|
|
485
|
+
};
|
|
486
|
+
copyToClipboardTime: number;
|
|
184
487
|
}
|
|
488
|
+
declare const DEFAULT_TABLE_OPTIONS: ITableOptions;
|
|
185
489
|
|
|
186
490
|
/**
|
|
187
491
|
* Interface representing the return structure for PrimeNG post requests when gathering data to represent in a table.
|
|
@@ -221,6 +525,7 @@ declare class ECSPrimengTableService {
|
|
|
221
525
|
fetchTableConfiguration(url: string): Observable<HttpResponse<ITableConfiguration>>;
|
|
222
526
|
fetchTableData(url: string, postData: ITableQueryRequest): Observable<HttpResponse<ITablePagedResponse>>;
|
|
223
527
|
fetchExcelReport(url: string, postData: IExcelExportRequest): Observable<HttpResponse<Blob>>;
|
|
528
|
+
getIconBlob(url: string): Observable<HttpResponse<Blob>>;
|
|
224
529
|
downloadFile(data: Blob, fileName: string, contentType: string): void;
|
|
225
530
|
handleTableError(error: any, customTitle?: string): void;
|
|
226
531
|
orderColumnsWithFrozens(colsToOrder: IColumnMetadata[]): IColumnMetadata[];
|
|
@@ -258,45 +563,7 @@ declare class ECSPrimengTable implements OnInit, AfterViewInit {
|
|
|
258
563
|
private tableService;
|
|
259
564
|
private notification;
|
|
260
565
|
constructor(tableService: ECSPrimengTableService, notification: ECSPrimengTableNotificationService);
|
|
261
|
-
|
|
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;
|
|
566
|
+
tableOptions: ITableOptions;
|
|
300
567
|
onRowCheckboxChange: EventEmitter<{
|
|
301
568
|
rowID: any;
|
|
302
569
|
selected: boolean;
|
|
@@ -309,6 +576,7 @@ declare class ECSPrimengTable implements OnInit, AfterViewInit {
|
|
|
309
576
|
rowID: any;
|
|
310
577
|
rowData: any;
|
|
311
578
|
}>;
|
|
579
|
+
onDataEndUpdate: EventEmitter<void>;
|
|
312
580
|
viewsModalShow: boolean;
|
|
313
581
|
tableViewCurrentSelectedAlias: string | null;
|
|
314
582
|
tableViewsFirstFetchDone: boolean;
|
|
@@ -318,7 +586,6 @@ declare class ECSPrimengTable implements OnInit, AfterViewInit {
|
|
|
318
586
|
selectedRowsCheckbox: any[];
|
|
319
587
|
dt: Table;
|
|
320
588
|
showRefreshData: boolean;
|
|
321
|
-
scrollHeight: string;
|
|
322
589
|
globalSearchText: string | null;
|
|
323
590
|
tableViewsList: ITableView[];
|
|
324
591
|
tableViews_menuItems: any[];
|
|
@@ -344,12 +611,13 @@ declare class ECSPrimengTable implements OnInit, AfterViewInit {
|
|
|
344
611
|
filteredColumnData: any[];
|
|
345
612
|
private initialColumnWidths;
|
|
346
613
|
private initialTableWidth;
|
|
347
|
-
|
|
614
|
+
predefinedFiltersSelectedValuesCollection: {
|
|
348
615
|
[key: string]: any[];
|
|
349
616
|
};
|
|
350
617
|
private copyCellDataTimer;
|
|
351
618
|
tableLazyLoadEventInformation: TableLazyLoadEvent;
|
|
352
619
|
private initialConfigurationFetched;
|
|
620
|
+
private maxViews;
|
|
353
621
|
ngOnInit(): void;
|
|
354
622
|
tableContainer: ElementRef;
|
|
355
623
|
headerContainer: ElementRef;
|
|
@@ -357,13 +625,13 @@ declare class ECSPrimengTable implements OnInit, AfterViewInit {
|
|
|
357
625
|
ngAfterViewInit(): void;
|
|
358
626
|
onResize(): void;
|
|
359
627
|
calculateScrollHeight(): void;
|
|
628
|
+
get scrollHeightValue(): string;
|
|
360
629
|
/**
|
|
361
630
|
* 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
|
|
362
631
|
*
|
|
363
|
-
* @param {(optionalData?: any) => void} [continueAction] - Optional action to execute after data retrieval if it succeeded.
|
|
364
|
-
* @param {boolean} [uponContinueActionEndModalHttp=false] - Optional flag to set the loading indicator to inactive after data retrieval.
|
|
365
632
|
*/
|
|
366
|
-
updateData(
|
|
633
|
+
updateData(): void;
|
|
634
|
+
canFetchData(): boolean;
|
|
367
635
|
fetchTableConfiguration(resetTableView?: boolean): void;
|
|
368
636
|
private handleTableConfigurationResponse;
|
|
369
637
|
refreshData(event: any): void;
|
|
@@ -404,16 +672,16 @@ declare class ECSPrimengTable implements OnInit, AfterViewInit {
|
|
|
404
672
|
*/
|
|
405
673
|
private hasFilters;
|
|
406
674
|
getColumnStyle(col: any, headerCols?: boolean): Record<string, string>;
|
|
407
|
-
|
|
675
|
+
getPredefinedFilterValues(columnKeyName: string): IPredefinedFilter[];
|
|
408
676
|
getFrozenColumnAlignAsText(frozenColumnAlign: FrozenColumnAlign): string;
|
|
409
677
|
getDataTypeAsText(dataType: DataType): string;
|
|
410
678
|
/**
|
|
411
679
|
* Updates the filters of a PrimeNG data table based on predefined filter changes.
|
|
412
680
|
*
|
|
413
681
|
* @param {string} filterName - The name of the filter to be updated.
|
|
414
|
-
* @param {
|
|
682
|
+
* @param {IPrimengPredefinedFilter[]} selectedValues - An array of selected predefined filter values.
|
|
415
683
|
*/
|
|
416
|
-
|
|
684
|
+
onPredefinedFilterChange(filterName: string, selectedValues: IPredefinedFilter[]): void;
|
|
417
685
|
/**
|
|
418
686
|
* Retrieves the number of values selected for a predefined filter.
|
|
419
687
|
*
|
|
@@ -423,7 +691,7 @@ declare class ECSPrimengTable implements OnInit, AfterViewInit {
|
|
|
423
691
|
* @param {string} columnKeyName - The key name of the column for which to retrieve the number of selected values.
|
|
424
692
|
* @returns {string} A string indicating the number of selected values for the specified column.
|
|
425
693
|
*/
|
|
426
|
-
|
|
694
|
+
predefinedFiltersSelectedValuesText(columnKeyName: string): string;
|
|
427
695
|
handleButtonsClick(action: (rowData: any) => void, rowData?: any): void;
|
|
428
696
|
/**
|
|
429
697
|
* Checks if the provided column metadata matches a specific style of the predefined filters
|
|
@@ -448,9 +716,15 @@ declare class ECSPrimengTable implements OnInit, AfterViewInit {
|
|
|
448
716
|
private updateColumnsSpecialProperties;
|
|
449
717
|
openExcelExport(): void;
|
|
450
718
|
generateExcelReport(event: any): void;
|
|
719
|
+
updateIconBlobsForCollections(): void;
|
|
451
720
|
static ɵfac: i0.ɵɵFactoryDeclaration<ECSPrimengTable, never>;
|
|
452
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ECSPrimengTable, "ecs-primeng-table", never, { "
|
|
721
|
+
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>;
|
|
453
722
|
}
|
|
454
723
|
|
|
455
|
-
|
|
456
|
-
|
|
724
|
+
/**
|
|
725
|
+
* Create table options based on defaults, with optional overrides.
|
|
726
|
+
*/
|
|
727
|
+
declare function createTableOptions(overrides?: Partial<ITableOptions>): ITableOptions;
|
|
728
|
+
|
|
729
|
+
export { CellOverflowBehaviour, DEFAULT_TABLE_OPTIONS, DataAlignHorizontal, DataAlignVertical, DataType, ECSPrimengTable, ECSPrimengTableHttpService, ECSPrimengTableNotificationService, ECSPrimengTableService, FrozenColumnAlign, TableViewSaveMode, createTableOptions };
|
|
730
|
+
export type { IColumnMetadata, IExcelExportRequest, IPredefinedFilter, ITableButton, ITableConfiguration, ITableOptions, ITablePagedResponse, ITableQueryRequest, ITableView, ITableViewData };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eternalcodestudio/primeng-table",
|
|
3
|
-
"version": "20.0.
|
|
3
|
+
"version": "20.0.4",
|
|
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",
|
|
@@ -28,12 +28,11 @@
|
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|
|
30
30
|
"type": "git",
|
|
31
|
-
"url": "https://github.com/AIO1/
|
|
31
|
+
"url": "git+https://github.com/AIO1/ECSPrimengTable"
|
|
32
32
|
},
|
|
33
33
|
"bugs": {
|
|
34
|
-
"url": "https://github.com/AIO1/
|
|
34
|
+
"url": "https://github.com/AIO1/ECSPrimengTable/issues"
|
|
35
35
|
},
|
|
36
|
-
"icon": "https://eternalcodestudio.com/others/ecsprimentable_icon.png",
|
|
37
36
|
"homepage": "https://eternalcodestudio.com/",
|
|
38
37
|
"sideEffects": false,
|
|
39
38
|
"module": "fesm2022/eternalcodestudio-primeng-table.mjs",
|