@competer/primeng-table 0.0.0-stage → 14.2.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.
Files changed (96) hide show
  1. package/README.md +279 -3
  2. package/esm2020/competer-primeng-table.mjs +5 -0
  3. package/esm2020/lib/components/column-selector/column-selector.mjs +147 -0
  4. package/esm2020/lib/components/ecs-primeng-table/ecs-primeng-table.mjs +1411 -0
  5. package/esm2020/lib/components/ecs-primeng-table/ecs-primeng-table.service.mjs +222 -0
  6. package/esm2020/lib/components/export-excel/export-excel.mjs +153 -0
  7. package/esm2020/lib/components/export-excel/export-excel.service.mjs +23 -0
  8. package/esm2020/lib/components/table-button/table-button.mjs +63 -0
  9. package/esm2020/lib/components/table-cell/table-cell.mjs +159 -0
  10. package/esm2020/lib/components/table-predefined-filters/table-predefined-filters.mjs +94 -0
  11. package/esm2020/lib/components/views-management/views-management.mjs +117 -0
  12. package/esm2020/lib/enums/cell-display.enum.mjs +7 -0
  13. package/esm2020/lib/enums/cell-overflow-behaviour.enum.mjs +14 -0
  14. package/esm2020/lib/enums/data-align-horizontal.enum.mjs +16 -0
  15. package/esm2020/lib/enums/data-align-vertical.enum.mjs +16 -0
  16. package/esm2020/lib/enums/data-type.enum.enum.mjs +21 -0
  17. package/esm2020/lib/enums/device-type.enum.mjs +8 -0
  18. package/esm2020/lib/enums/frozen-column-align.enum.mjs +17 -0
  19. package/esm2020/lib/enums/index.mjs +9 -0
  20. package/esm2020/lib/enums/table-view-save-mode.enum.mjs +19 -0
  21. package/esm2020/lib/interfaces/columns-metadata.interface.mjs +2 -0
  22. package/esm2020/lib/interfaces/excel-export-request.interface.mjs +2 -0
  23. package/esm2020/lib/interfaces/index.mjs +11 -0
  24. package/esm2020/lib/interfaces/predefined-filter.interface.mjs +2 -0
  25. package/esm2020/lib/interfaces/table-button.interface.mjs +2 -0
  26. package/esm2020/lib/interfaces/table-configuration.interface.mjs +2 -0
  27. package/esm2020/lib/interfaces/table-options.interface.mjs +107 -0
  28. package/esm2020/lib/interfaces/table-paged-response.interface.mjs +2 -0
  29. package/esm2020/lib/interfaces/table-query-request.interface.mjs +2 -0
  30. package/esm2020/lib/interfaces/table-view-data.interface.mjs +2 -0
  31. package/esm2020/lib/interfaces/table-view.interface.mjs +2 -0
  32. package/esm2020/lib/pipes/ui-translate.pipe.mjs +21 -0
  33. package/esm2020/lib/services/http.service.mjs +18 -0
  34. package/esm2020/lib/services/i18n.service.mjs +61 -0
  35. package/esm2020/lib/services/index.mjs +5 -0
  36. package/esm2020/lib/services/notification.service.mjs +17 -0
  37. package/esm2020/lib/services/table-state.service.mjs +38 -0
  38. package/esm2020/lib/utils/create-table-options.mjs +37 -0
  39. package/esm2020/lib/utils/data-align-horizontal-as-text.mjs +23 -0
  40. package/esm2020/lib/utils/data-align-vertical-as-text.mjs +23 -0
  41. package/esm2020/lib/utils/data-type-as-text.mjs +25 -0
  42. package/esm2020/lib/utils/frozen-column-align-as-text.mjs +21 -0
  43. package/esm2020/lib/utils/highlight-text.mjs +36 -0
  44. package/esm2020/lib/utils/index.mjs +7 -0
  45. package/esm2020/lib/utils/tree-table-state.mjs +239 -0
  46. package/esm2020/public-api.mjs +19 -0
  47. package/fesm2015/competer-primeng-table.mjs +3119 -0
  48. package/fesm2015/competer-primeng-table.mjs.map +1 -0
  49. package/fesm2020/competer-primeng-table.mjs +3049 -0
  50. package/fesm2020/competer-primeng-table.mjs.map +1 -0
  51. package/index.d.ts +5 -0
  52. package/lib/components/column-selector/column-selector.d.ts +55 -0
  53. package/lib/components/ecs-primeng-table/ecs-primeng-table.d.ts +256 -0
  54. package/lib/components/ecs-primeng-table/ecs-primeng-table.service.d.ts +52 -0
  55. package/lib/components/export-excel/export-excel.d.ts +51 -0
  56. package/lib/components/export-excel/export-excel.service.d.ts +6 -0
  57. package/lib/components/table-button/table-button.d.ts +16 -0
  58. package/lib/components/table-cell/table-cell.d.ts +69 -0
  59. package/lib/components/table-predefined-filters/table-predefined-filters.d.ts +39 -0
  60. package/lib/components/views-management/views-management.d.ts +34 -0
  61. package/lib/enums/cell-display.enum.d.ts +5 -0
  62. package/lib/enums/cell-overflow-behaviour.enum.d.ts +12 -0
  63. package/lib/enums/data-align-horizontal.enum.d.ts +14 -0
  64. package/lib/enums/data-align-vertical.enum.d.ts +14 -0
  65. package/lib/enums/data-type.enum.enum.d.ts +19 -0
  66. package/lib/enums/device-type.enum.d.ts +6 -0
  67. package/lib/enums/frozen-column-align.enum.d.ts +15 -0
  68. package/lib/enums/index.d.ts +8 -0
  69. package/lib/enums/table-view-save-mode.enum.d.ts +17 -0
  70. package/lib/interfaces/columns-metadata.interface.d.ts +66 -0
  71. package/lib/interfaces/excel-export-request.interface.d.ts +20 -0
  72. package/lib/interfaces/index.d.ts +10 -0
  73. package/lib/interfaces/predefined-filter.interface.d.ts +101 -0
  74. package/lib/interfaces/table-button.interface.d.ts +75 -0
  75. package/lib/interfaces/table-configuration.interface.d.ts +23 -0
  76. package/lib/interfaces/table-options.interface.d.ts +604 -0
  77. package/lib/interfaces/table-paged-response.interface.d.ts +16 -0
  78. package/lib/interfaces/table-query-request.interface.d.ts +28 -0
  79. package/lib/interfaces/table-view-data.interface.d.ts +28 -0
  80. package/lib/interfaces/table-view.interface.d.ts +15 -0
  81. package/lib/pipes/ui-translate.pipe.d.ts +13 -0
  82. package/lib/services/http.service.d.ts +34 -0
  83. package/lib/services/i18n.service.d.ts +20 -0
  84. package/lib/services/index.d.ts +4 -0
  85. package/lib/services/notification.service.d.ts +23 -0
  86. package/lib/services/table-state.service.d.ts +31 -0
  87. package/lib/utils/create-table-options.d.ts +5 -0
  88. package/lib/utils/data-align-horizontal-as-text.d.ts +11 -0
  89. package/lib/utils/data-align-vertical-as-text.d.ts +11 -0
  90. package/lib/utils/data-type-as-text.d.ts +11 -0
  91. package/lib/utils/frozen-column-align-as-text.d.ts +11 -0
  92. package/lib/utils/highlight-text.d.ts +17 -0
  93. package/lib/utils/index.d.ts +6 -0
  94. package/lib/utils/tree-table-state.d.ts +66 -0
  95. package/package.json +58 -3
  96. package/public-api.d.ts +10 -0
package/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@competer/primeng-table" />
5
+ export * from './public-api';
@@ -0,0 +1,55 @@
1
+ import { ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy } from '@angular/core';
2
+ import { TranslateService } from '@ngx-translate/core';
3
+ import { Table } from 'primeng/table';
4
+ import { CellOverflowBehaviour, DataAlignHorizontal, DataAlignVertical } from '../../enums';
5
+ import { IColumnMetadata } from '../../interfaces';
6
+ import * as i0 from "@angular/core";
7
+ export declare class ColumnSelector implements OnChanges, OnDestroy {
8
+ private translate;
9
+ private readonly destroy$;
10
+ orderByHeader: boolean;
11
+ constructor(translate: TranslateService, changeDetector: ChangeDetectorRef);
12
+ ngOnChanges(): void;
13
+ ngOnDestroy(): void;
14
+ private updateVisibleColumns;
15
+ dt_columnDialog: Table;
16
+ visible: boolean;
17
+ columnModalData: any[];
18
+ filteredColumnData: any[];
19
+ visibleChange: EventEmitter<boolean>;
20
+ applyChanges: EventEmitter<IColumnMetadata[]>;
21
+ cellOverflowBehaviourOptions: {
22
+ icon: string;
23
+ val: CellOverflowBehaviour;
24
+ name: string;
25
+ }[];
26
+ dataAlignHorizontalOptions: {
27
+ icon: string;
28
+ val: DataAlignHorizontal;
29
+ name: string;
30
+ }[];
31
+ dataAlignVerticalOptions: {
32
+ icon: string;
33
+ val: DataAlignVertical;
34
+ name: string;
35
+ }[];
36
+ translatedOptions(options: {
37
+ name: string;
38
+ icon: string;
39
+ val: number;
40
+ }[]): {
41
+ name: any;
42
+ icon: string;
43
+ val: number;
44
+ }[];
45
+ globalSearchText: string | null;
46
+ globalSearchMaxLength: number;
47
+ allColumnsCheckboxActive(): boolean;
48
+ allColumnsCheckboxClick(event: any): void;
49
+ filterColumnModal(event: any): void;
50
+ applyColumnModalChanges(): void;
51
+ clearGlobalFilter(dt: Table): void;
52
+ closeModal(): void;
53
+ static ɵfac: i0.ɵɵFactoryDeclaration<ColumnSelector, never>;
54
+ static ɵcmp: i0.ɵɵComponentDeclaration<ColumnSelector, "ecs-column-selector", never, { "orderByHeader": "orderByHeader"; "visible": "visible"; "columnModalData": "columnModalData"; "filteredColumnData": "filteredColumnData"; }, { "visibleChange": "visibleChange"; "applyChanges": "applyChanges"; }, never, never, true>;
55
+ }
@@ -0,0 +1,256 @@
1
+ import { AfterViewInit, ElementRef, EventEmitter, OnInit, OnDestroy } from '@angular/core';
2
+ import { Table } from 'primeng/table';
3
+ import { LazyLoadEvent } from 'primeng/api';
4
+ import { FilterMetadata, MenuItem } from 'primeng/api';
5
+ import { Menu } from 'primeng/menu';
6
+ import { ECSPrimengTableService } from './ecs-primeng-table.service';
7
+ import { DeviceType, CellOverflowBehaviour, DataAlignHorizontal, DataAlignVertical, DataType, FrozenColumnAlign, TableViewSaveMode } from '../../enums';
8
+ import { IColumnMetadata, IPredefinedFilter, ITablePagedResponse, ITableView, ITableOptions } from '../../interfaces';
9
+ import { ECSPrimengTableNotificationService } from '../../services';
10
+ import { TreeRow, TreeTableState } from '../../utils/tree-table-state';
11
+ import * as i0 from "@angular/core";
12
+ declare type TableLazyLoadEvent = Omit<LazyLoadEvent, 'filters'> & {
13
+ filters?: Record<string, FilterMetadata | FilterMetadata[]>;
14
+ };
15
+ interface TablePageEvent {
16
+ first: number;
17
+ rows: number;
18
+ }
19
+ interface TableRowSelectEvent<T> {
20
+ data: T;
21
+ }
22
+ interface TableRowUnSelectEvent<T> {
23
+ data: T;
24
+ }
25
+ export declare class ECSPrimengTable implements OnInit, AfterViewInit, OnDestroy {
26
+ private tableService;
27
+ private notification;
28
+ private readonly i18n;
29
+ private readonly changeDetector;
30
+ private readonly stateScope;
31
+ private readonly destroy$;
32
+ private initialStateApplied;
33
+ private destroyed;
34
+ constructor(tableService: ECSPrimengTableService, notification: ECSPrimengTableNotificationService);
35
+ tableOptions: ITableOptions;
36
+ treeState?: TreeTableState;
37
+ private treeQuery?;
38
+ private treeStateRestored;
39
+ onRowCheckboxChange: EventEmitter<{
40
+ rowID: any;
41
+ selected: boolean;
42
+ }>;
43
+ onRowSelect: EventEmitter<{
44
+ rowID: any;
45
+ rowData: any;
46
+ }>;
47
+ onRowUnselect: EventEmitter<{
48
+ rowID: any;
49
+ rowData: any;
50
+ }>;
51
+ onDataEndUpdate: EventEmitter<void>;
52
+ viewsModalShow: boolean;
53
+ tableViewCurrentSelectedAlias: string | null;
54
+ tableViewsFirstFetchDone: boolean;
55
+ excelReportTitle: string;
56
+ showExportModal: boolean;
57
+ showColumnSelector: boolean;
58
+ selectedRowsCheckbox: any[];
59
+ selectAllLoading: boolean;
60
+ private selectionQuery?;
61
+ private selectionQueryKey;
62
+ private matchingSelectionKeys?;
63
+ dt: Table;
64
+ globalSearchText: string | null;
65
+ private appliedGlobalSearchText;
66
+ private globalSearchManaged;
67
+ private globalSearchTimer?;
68
+ /** The applied query stays separate from text being typed during the debounce. */
69
+ get effectiveGlobalSearchText(): string | null;
70
+ private cancelGlobalSearch;
71
+ private restoreGlobalSearch;
72
+ private globalSearchOption;
73
+ onGlobalSearchInput(value: string): void;
74
+ tableViewsList: ITableView[];
75
+ tableViews_menuItems: any[];
76
+ DataType: typeof DataType;
77
+ CellOverflowBehaviour: typeof CellOverflowBehaviour;
78
+ DataAlignHorizontal: typeof DataAlignHorizontal;
79
+ DataAlignVertical: typeof DataAlignVertical;
80
+ FrozenColumnAlign: typeof FrozenColumnAlign;
81
+ TableViewSaveMode: typeof TableViewSaveMode;
82
+ rowSelection: any;
83
+ currentPage: number;
84
+ currentRowsPerPage: number;
85
+ allowedRowsPerPage: number[];
86
+ totalRecords: number;
87
+ totalRecordsNotFiltered: number;
88
+ dateFormat: string;
89
+ dateTimezone: string;
90
+ dateCulture: string;
91
+ exportDateFormat: string;
92
+ columns: IColumnMetadata[];
93
+ columnsCantBeHidden: IColumnMetadata[];
94
+ columnsSelected: IColumnMetadata[];
95
+ columnModalData: any[];
96
+ filteredColumnData: any[];
97
+ private initialColumnWidths;
98
+ private initialTableWidth;
99
+ predefinedFiltersSelectedValuesCollection: {
100
+ [key: string]: any[];
101
+ };
102
+ private copyCellDataTimer;
103
+ tableLazyLoadEventInformation: TableLazyLoadEvent;
104
+ private initialConfigurationFetched;
105
+ private maxViews;
106
+ ngOnInit(): void;
107
+ tableContainer: ElementRef;
108
+ headerContainer: ElementRef;
109
+ paginatorContainer: ElementRef;
110
+ ngAfterViewInit(): void;
111
+ deviceType: DeviceType;
112
+ private columnSelectionCustomized;
113
+ headerMenuItems: MenuItem[];
114
+ rowMenuItems: MenuItem[];
115
+ rowMenuRow: any;
116
+ responsiveHeaderMenu?: Menu;
117
+ responsiveRowMenu?: Menu;
118
+ get compactHeader(): boolean;
119
+ get compactRows(): boolean;
120
+ get actionColumnWidth(): number;
121
+ getColumnHeaderGroups(columns: IColumnMetadata[]): {
122
+ field: string;
123
+ label: string;
124
+ colspan: number;
125
+ frozenColumnAlign: FrozenColumnAlign;
126
+ }[];
127
+ private isInitiallyVisible;
128
+ private updateResponsiveViewport;
129
+ private buttonVisible;
130
+ hasRowMenuActions(row: any): boolean;
131
+ private buttonMenuItems;
132
+ closeResponsiveMenus(): void;
133
+ openRowMenu(event: Event, row: any): void;
134
+ private translateMenuItems;
135
+ openHeaderMenu(event: Event): void;
136
+ private validateStatePersistence;
137
+ ngOnDestroy(): void;
138
+ private restoreNavigationState;
139
+ private restorePredefinedSelections;
140
+ onResize(): void;
141
+ private calculateScrollHeight;
142
+ get scrollHeightValue(): string;
143
+ /**
144
+ * Updates the table data and, if needed, retrieves the initial table configuration from an external source.
145
+ *
146
+ * Also allows resetting the table to its original state before any user manipulations.
147
+ *
148
+ * @param {boolean} [resetTableView=false] Optional.
149
+ * - `true`: resets the table state before loading data.
150
+ * - `false`: refreshes data using the current configuration (and retrieves initial configuration if necessary).
151
+ *
152
+ * **_Behavior_**
153
+ * - The table is automatically set to `isActive = true`.
154
+ * - If the initial configuration has not been fetched, it will fetch it and then update the data.
155
+ * - If the initial configuration is already fetched, it will just update the data.
156
+ * - If `resetTableView` is true and the configuration is already initialized, the table will be reset to its original state before updating the data.
157
+ */
158
+ updateData(resetTableView?: boolean): void;
159
+ private canFetchData;
160
+ private fetchTableConfiguration;
161
+ private handleTableConfigurationResponse;
162
+ refreshData(event: any): void;
163
+ tableViewsEnabled(): boolean;
164
+ private fetchTableViews;
165
+ private tableViewListProcess;
166
+ private startInitialDataLoad;
167
+ viewLoad(tableViewAlias: string): void;
168
+ viewCreate(viewAlias: string): void;
169
+ viewDelete(viewAlias: string): void;
170
+ viewEditAlias(event: {
171
+ viewAliasOld: string;
172
+ viewAliasNew: string;
173
+ }): void;
174
+ viewUpdateData(viewAlias: string): void;
175
+ viewUpdateActiveStartup(viewAlias: string): void;
176
+ viewsSave(endMessage: number): void;
177
+ viewsSaveEnd(endMessage: number): void;
178
+ fetchTableData(event: TableLazyLoadEvent): void;
179
+ modifyFiltersWithoutGlobalAndSelectedRows(filters: any, overrideOption?: number): any;
180
+ resetTableView(): void;
181
+ private selectorRowFilterBuilder;
182
+ revertDateTimeZoneFilters(inputFilter: any): any;
183
+ handleTableDataResponse(body: ITablePagedResponse): void;
184
+ private generateViewData;
185
+ private treeFetcher;
186
+ private syncTreeRows;
187
+ toggleTreeRow(event: Event, row: TreeRow): Promise<void>;
188
+ loadMoreTreeRows(event: Event, row: TreeRow): Promise<void>;
189
+ get treeColumn(): string | undefined;
190
+ treePageChange(event: {
191
+ first?: number;
192
+ rows?: number;
193
+ }): void;
194
+ clearFilters(dt: Table, force?: boolean, onlyGlobalFilter?: boolean): void;
195
+ clearSorts(dt: Table, force?: boolean): void;
196
+ hasToClearSorts(dt: Table, force?: boolean): boolean;
197
+ hasToClearFilters(dt: Table, globalSearchText: string | null, force?: boolean): boolean;
198
+ /**
199
+ * Determines whether there are active filters based on the provided filter rules.
200
+ *
201
+ * @param {any} filterRules An object representing filter rules for each column.
202
+ * The keys are column names, and the values are arrays of filter rules.
203
+ * Each filter rule has the following properties:
204
+ * - `field`: The field or property name of the column.
205
+ * - `value`: The filter value entered by the user.
206
+ * - Other properties depending on the type of filter (e.g., `matchMode` for string filters).
207
+ * @returns {boolean} `true` if at least one active filter is found, otherwise `false`.
208
+ */
209
+ private hasFilters;
210
+ getColumnStyle(col: any, headerCols?: boolean): Record<string, string>;
211
+ getPredefinedFilterValues(columnKeyName: string): IPredefinedFilter[];
212
+ getFrozenColumnAlignAsText(frozenColumnAlign: FrozenColumnAlign): string;
213
+ getDataTypeAsText(dataType: DataType): string;
214
+ /**
215
+ * Updates the filters of a PrimeNG data table based on predefined filter changes.
216
+ *
217
+ * @param {string} filterName - The name of the filter to be updated.
218
+ * @param {IPrimengPredefinedFilter[]} selectedValues - An array of selected predefined filter values.
219
+ */
220
+ onPredefinedFilterChange(filterName: string, selectedValues: IPredefinedFilter[]): void;
221
+ /**
222
+ * Checks if the provided column metadata matches a specific style of the predefined filters
223
+ * that need to be applied to an item on a row.
224
+ *
225
+ * @param {IprimengColumnsMetadata} colMetadata - The metadata of the column being checked.
226
+ * @param {any} value - The value to be matched against the predefined filter values.
227
+ * @returns {any} The matching predefined filter value if found, otherwise null.
228
+ */
229
+ getPredfinedFilterMatch(colMetadata: IColumnMetadata, value: any): any;
230
+ copyToClipboardStart(event: MouseEvent): void;
231
+ copyToClipboardCancel(): void;
232
+ getDataAlignHorizontalAsText(dataAlignHorizontal: DataAlignHorizontal): string;
233
+ getDataAlignVerticalAsText(dataAlignVertical: DataAlignVertical): string;
234
+ isRowCheckboxSelected(rowID: any): boolean;
235
+ get allMatchingRowsSelected(): boolean;
236
+ get matchingRowsPartiallySelected(): boolean;
237
+ toggleAllMatchingRows(checked: boolean): Promise<void>;
238
+ onRowChekboxChange(event: any, rowID: any): void;
239
+ rowSelect(event: TableRowSelectEvent<any>): void;
240
+ rowUnselect(event: TableRowUnSelectEvent<any>): void;
241
+ pageChange(event: TablePageEvent): void;
242
+ columnSelectorShow(): void;
243
+ applyColumnModalChanges(selectedColumns: IColumnMetadata[]): void;
244
+ private updateColumnsSpecialProperties;
245
+ openExcelExport(): void;
246
+ generateExcelReport(event: any): void;
247
+ updateIconBlobsForCollections(): void;
248
+ ecsTrack1(index: number, button: any): any;
249
+ ecsTrack2(index: number, button: any): any;
250
+ ecsTrack3(index: number, group: any): any;
251
+ ecsTrack4(index: number, col: any): any;
252
+ ecsTrack5(index: number, col: any): any;
253
+ static ɵfac: i0.ɵɵFactoryDeclaration<ECSPrimengTable, never>;
254
+ static ɵcmp: i0.ɵɵComponentDeclaration<ECSPrimengTable, "ecs-primeng-table", never, { "tableOptions": "tableOptions"; }, { "onRowCheckboxChange": "onRowCheckboxChange"; "onRowSelect": "onRowSelect"; "onRowUnselect": "onRowUnselect"; "onDataEndUpdate": "onDataEndUpdate"; }, never, never, true>;
255
+ }
256
+ export {};
@@ -0,0 +1,52 @@
1
+ import { Observable } from 'rxjs';
2
+ import { HttpResponse } from '@angular/common/http';
3
+ import { ECSPrimengTableHttpService, ECSPrimengTableNotificationService } from '../../services';
4
+ import { IColumnMetadata, IExcelExportRequest, IPredefinedFilter, ITableConfiguration, ITablePagedResponse, ITableView, ITableViewData } from '../../interfaces';
5
+ import { TableViewSaveMode } from '../../enums';
6
+ import { ITableQueryRequest } from '../../interfaces/table-query-request.interface';
7
+ import { MenuItem } from 'primeng/api';
8
+ import { Table } from 'primeng/table';
9
+ import * as i0 from "@angular/core";
10
+ export declare class ECSPrimengTableService {
11
+ private http;
12
+ private notification;
13
+ private readonly i18n;
14
+ constructor(http: ECSPrimengTableHttpService, notification: ECSPrimengTableNotificationService);
15
+ fetchTableConfiguration(url: string): Observable<HttpResponse<ITableConfiguration>>;
16
+ fetchTableData(url: string, postData: ITableQueryRequest): Observable<HttpResponse<ITablePagedResponse>>;
17
+ fetchExcelReport(url: string, postData: IExcelExportRequest): Observable<HttpResponse<Blob>>;
18
+ getIconBlob(url: string): Observable<HttpResponse<Blob>>;
19
+ downloadFile(data: Blob, fileName: string, contentType: string): void;
20
+ handleTableError(error: any, customTitle?: string): void;
21
+ orderColumnsWithFrozens(colsToOrder: IColumnMetadata[]): IColumnMetadata[];
22
+ /**
23
+ * Handles click events on action buttons in a row of data.
24
+ *
25
+ * @param {function} action - The action function to be executed when the button is clicked. It should accept one parameter, which is the row data.
26
+ * @param {any} [rowData=null] - The data of the row corresponding to the clicked button. Defaults to null.
27
+ *
28
+ * @returns {void}
29
+ *
30
+ * @example
31
+ * // Define an action for a button
32
+ * const deleteAction = (rowData) => {
33
+ * console.log(`Delete row with id: ${rowData.rowID}`);
34
+ * };
35
+ *
36
+ * // Use handleButtonsClick with row data
37
+ * handleButtonsClick(deleteAction, { rowID: 1, name: 'John Doe' });
38
+ */
39
+ handleButtonsClick(action: (rowData: any) => void, rowData?: any): void;
40
+ handlePredefinedFilterClick(action: (rowData: any, option: IPredefinedFilter) => void, rowData: any, option: IPredefinedFilter): void;
41
+ getColumnStyle(col: any, headerCols?: boolean): Record<string, string>;
42
+ fetchTableViews(tableViewSaveAs: TableViewSaveMode, recoverListEndpoint: string, tableViewSaveKey: string): ITableView[] | Observable<HttpResponse<ITableView[]>>;
43
+ sortViews(tableSaveViewList: ITableView[]): void;
44
+ updateViewsMenuItems(tableSaveViewList: ITableView[]): MenuItem[];
45
+ viewsSaveToDatabase(tableSaveViewList: ITableView[], setListEndpoint: string, tableViewSaveKey: string): Observable<HttpResponse<any>>;
46
+ fetchSelectionKeys(endpoint: string, request: ITableQueryRequest): Observable<HttpResponse<any[]>>;
47
+ viewGenerateData(dt: Table, globalSearchText: string | null, currentPage: number, currentRowsPerPage: number, modifyFiltersFn: (filters: any) => any): ITableViewData;
48
+ computeColumnWidths(dt: Table): any;
49
+ computeTableWidth(dt: Table): any;
50
+ static ɵfac: i0.ɵɵFactoryDeclaration<ECSPrimengTableService, never>;
51
+ static ɵprov: i0.ɵɵInjectableDeclaration<ECSPrimengTableService>;
52
+ }
@@ -0,0 +1,51 @@
1
+ import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { ECSPrimengTableNotificationService } from '../../services';
3
+ import { ExportExcelService } from './export-excel.service';
4
+ import * as i0 from "@angular/core";
5
+ export declare class ExportExcel implements OnChanges {
6
+ private notificationSerivce;
7
+ private exportExcelService;
8
+ private readonly i18n;
9
+ private readonly translatedOptionSets;
10
+ visible: boolean;
11
+ rowCheckboxSelectorActive: boolean;
12
+ excelReportTitle: string;
13
+ includeTimeInTitle: boolean;
14
+ exportUseIconsInBools: boolean;
15
+ allowTitleUserEdit: boolean;
16
+ exportToExcel: EventEmitter<{
17
+ allColumns: boolean;
18
+ applyFilters: boolean;
19
+ applySorts: boolean;
20
+ selectedRows: number;
21
+ filename: string;
22
+ useIconInBools: boolean;
23
+ }>;
24
+ visibleChange: EventEmitter<boolean>;
25
+ constructor(notificationSerivce: ECSPrimengTableNotificationService, exportExcelService: ExportExcelService);
26
+ option_exportColumns_selected: boolean;
27
+ option_exportColumns: any[];
28
+ option_applyCurrentFilters_selected: boolean;
29
+ option_applyCurrentFilters: any[];
30
+ option_applyCurrentSorts_selected: boolean;
31
+ option_applyCurrentSorts: any[];
32
+ option_selectedRowsExport_selected: number;
33
+ option_selectedRowsExport: any[];
34
+ ngOnChanges(changes: SimpleChanges): void;
35
+ private resetValues;
36
+ getExcelReport(): void;
37
+ translatedOptions(options: {
38
+ label: string;
39
+ value: boolean | number;
40
+ }[]): {
41
+ label: string;
42
+ value: number | boolean;
43
+ }[];
44
+ filterSelectorDisabled(): boolean;
45
+ onChangeExportRows(event: {
46
+ value: number;
47
+ }): void;
48
+ closeModal(): void;
49
+ static ɵfac: i0.ɵɵFactoryDeclaration<ExportExcel, never>;
50
+ static ɵcmp: i0.ɵɵComponentDeclaration<ExportExcel, "ecs-export-excel", never, { "visible": "visible"; "rowCheckboxSelectorActive": "rowCheckboxSelectorActive"; "excelReportTitle": "excelReportTitle"; "allowTitleUserEdit": "allowTitleUserEdit"; }, { "exportToExcel": "exportToExcel"; "visibleChange": "visibleChange"; }, never, never, true>;
51
+ }
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class ExportExcelService {
3
+ getCurrentTimeString(): string;
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<ExportExcelService, never>;
5
+ static ɵprov: i0.ɵɵInjectableDeclaration<ExportExcelService>;
6
+ }
@@ -0,0 +1,16 @@
1
+ import { ECSPrimengTableService } from '../ecs-primeng-table/ecs-primeng-table.service';
2
+ import { ITableButton } from '../../interfaces';
3
+ import * as i0 from "@angular/core";
4
+ export declare class TableButton {
5
+ private tableService;
6
+ constructor(tableService: ECSPrimengTableService);
7
+ button: any;
8
+ rowData: any;
9
+ isActionButton: boolean;
10
+ isLastActionButton: boolean;
11
+ overrideAction?: ((event: Event) => void);
12
+ handleClick(event: Event): void;
13
+ getButtonStyle(button: ITableButton, isActionButton: boolean, isLastActionButton: boolean): any;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableButton, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableButton, "ecs-table-button", never, { "button": "button"; "rowData": "rowData"; "isActionButton": "isActionButton"; "isLastActionButton": "isLastActionButton"; "overrideAction": "overrideAction"; }, {}, never, never, true>;
16
+ }
@@ -0,0 +1,69 @@
1
+ import { CellDisplay, DataAlignHorizontal, DataAlignVertical, DataType } from '../../enums';
2
+ import { DatePipe } from '@angular/common';
3
+ import { IColumnMetadata, IPredefinedFilter } from '../../interfaces';
4
+ import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
5
+ import * as i0 from "@angular/core";
6
+ export declare class TableCell {
7
+ private datePipe;
8
+ private sanitizer;
9
+ constructor(datePipe: DatePipe, sanitizer: DomSanitizer);
10
+ col: any;
11
+ rowData: any;
12
+ globalSearchText: string | null;
13
+ predefinedFiltersCollection?: {
14
+ [key: string]: IPredefinedFilter[];
15
+ };
16
+ dateFormat: string;
17
+ dateTimezone: string;
18
+ dateCulture: string;
19
+ DataType: typeof DataType;
20
+ CellDisplay: typeof CellDisplay;
21
+ /** Only finite numbers are valid; do not turn empty strings or booleans into progress. */
22
+ get hasProgressValue(): boolean;
23
+ get progressValue(): number;
24
+ get progressTooltip(): any;
25
+ get value(): any;
26
+ get tooltipText(): any;
27
+ getListValues(col: any, rowData: any): string[];
28
+ /** List tooltips use the same semicolon-separated positions as the displayed list. */
29
+ getListTooltip(item: string, index: number): string;
30
+ getDataAlignHorizontalAsText(dataAlignHorizontal: DataAlignHorizontal): void;
31
+ getDataAlignVerticalAsText(dataAlignVertical: DataAlignVertical): void;
32
+ /**
33
+ * Formats a date value using either column-level overrides or global settings.
34
+ * The incoming value is assumed to represent a UTC date.
35
+ *
36
+ * @param {any} value - The date value to be formatted.
37
+ * @param {string | null} dateFormat - Optional column-level override for the date format.
38
+ * @param {string | null} dateTimezone - Optional column-level override for the timezone used in formatting.
39
+ * @param {string | null} dateCulture - Optional column-level override for the culture used in formatting.
40
+ *
41
+ * @returns {string} - The formatted date string using the effective (column or global) settings,
42
+ * or an empty string if the value is invalid or undefined.
43
+ *
44
+ * @example
45
+ * // Example using only global settings:
46
+ * const result = formatDate(dateValue, null, null, null);
47
+ *
48
+ * @example
49
+ * // Example using column-level overrides:
50
+ * const result = formatDate(dateValue, 'dd/MM/yyyy', 'UTC', 'en-GB');
51
+ */
52
+ formatDate(value: any, dateFormat: string | null, dateTimezone: string | null, dateCulture: string | null): string;
53
+ getPredefinedFilterTooltip(colMetadata: IColumnMetadata, value: any): any;
54
+ /**
55
+ * Checks if the provided column metadata matches a specific style of the predefined filters
56
+ * that need to be applied to an item on a row.
57
+ *
58
+ * @param {IprimengColumnsMetadata} colMetadata - The metadata of the column being checked.
59
+ * @param {any} value - The value to be matched against the predefined filter values.
60
+ * @returns {any} The matching predefined filter value if found, otherwise null.
61
+ */
62
+ getPredfinedFilterMatch(colMetadata: IColumnMetadata, value: any): any;
63
+ getPredefinedFilterValues(columnKeyName: string): IPredefinedFilter[];
64
+ highlightText(cellValue: any, colMetadata: IColumnMetadata, globalSearchText: string | null): SafeHtml;
65
+ ecsTrack6(index: number, item: any): any;
66
+ ecsTrack7(index: number, item: any): any;
67
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableCell, never>;
68
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableCell, "ecs-table-cell", never, { "col": "col"; "rowData": "rowData"; "globalSearchText": "globalSearchText"; "predefinedFiltersCollection": "predefinedFiltersCollection"; "dateFormat": "dateFormat"; "dateTimezone": "dateTimezone"; "dateCulture": "dateCulture"; }, {}, never, never, true>;
69
+ }
@@ -0,0 +1,39 @@
1
+ import { DomSanitizer, SafeHtml, SafeUrl } from '@angular/platform-browser';
2
+ import { ECSPrimengTableService } from '../ecs-primeng-table/ecs-primeng-table.service';
3
+ import { IColumnMetadata } from '../../interfaces';
4
+ import * as i0 from "@angular/core";
5
+ export declare class TablePredefinedFilters {
6
+ private sanitizer;
7
+ private tableService;
8
+ constructor(sanitizer: DomSanitizer, tableService: ECSPrimengTableService);
9
+ option: any;
10
+ col: any;
11
+ selectable: boolean;
12
+ rowData: any;
13
+ globalSearchText?: any;
14
+ /**
15
+ * Converts a blob from the database to a safe URL that can be used to display an image.
16
+ *
17
+ * This function takes a `Blob` object, converts it to a base64 encoded string, and returns a `SafeUrl`
18
+ * that can be used in an HTML template to display the image securely. The `SafeUrl` ensures that
19
+ * Angular's security mechanisms are bypassed correctly, preventing potential security risks.
20
+ *
21
+ * @param {Blob} blob - The blob object representing the image data from the database.
22
+ * @returns {SafeUrl} A safe URL that can be used to display the image in an HTML template.
23
+ *
24
+ * @example
25
+ * // Example usage in a component
26
+ * const imageBlob = new Blob([binaryData], { type: 'image/jpeg' });
27
+ * const imageUrl = this.getBlobIconAsUrl(imageBlob);
28
+ *
29
+ * // In your HTML template
30
+ * <img [src]="imageUrl" alt="Image">
31
+ */
32
+ getBlobIconAsUrl(blob: Blob): SafeUrl;
33
+ handleClick(): void;
34
+ getTagStyle(option: any): any;
35
+ getImageSkeletonStyle(width?: number, height?: number, isSkeleton?: boolean): Record<string, string>;
36
+ highlightText(cellValue: any, colMetadata: IColumnMetadata, globalSearchText: string | null | undefined): SafeHtml;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<TablePredefinedFilters, never>;
38
+ static ɵcmp: i0.ɵɵComponentDeclaration<TablePredefinedFilters, "ecs-table-predefined-filters", never, { "option": "option"; "col": "col"; "selectable": "selectable"; "rowData": "rowData"; "globalSearchText": "globalSearchText"; }, {}, never, never, true>;
39
+ }
@@ -0,0 +1,34 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { ECSPrimengTableNotificationService } from '../../services';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ViewsManagement {
5
+ private notification;
6
+ private readonly i18n;
7
+ constructor(notification: ECSPrimengTableNotificationService);
8
+ visible: boolean;
9
+ tableViews_menuItems: any[];
10
+ onViewSelect: EventEmitter<string>;
11
+ onViewDelete: EventEmitter<string>;
12
+ onViewUpdateData: EventEmitter<string>;
13
+ onViewUpdateActiveStartup: EventEmitter<string>;
14
+ onViewEditAlias: EventEmitter<{
15
+ viewAliasOld: string;
16
+ viewAliasNew: string;
17
+ }>;
18
+ onViewCreate: EventEmitter<string>;
19
+ visibleChange: EventEmitter<boolean>;
20
+ viewEditorShow: boolean;
21
+ editingViewAlias: string;
22
+ newViewAlias: string;
23
+ loadView(viewAlias: string): void;
24
+ deleteView(viewAlias: string): void;
25
+ updateView(viewAlias: string): void;
26
+ updateViewActiveStartup(viewAlias: string): void;
27
+ createView(viewAlias: string): void;
28
+ editViewAlias(viewAliasOld: string, viewAliasNew: string): void;
29
+ showViewEditor(editingViewAlias?: string): void;
30
+ closeModal(): void;
31
+ createOrUpdateTableView(): void;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<ViewsManagement, never>;
33
+ static ɵcmp: i0.ɵɵComponentDeclaration<ViewsManagement, "ecs-views-management", never, { "visible": "visible"; "tableViews_menuItems": "tableViews_menuItems"; }, { "onViewSelect": "onViewSelect"; "onViewDelete": "onViewDelete"; "onViewUpdateData": "onViewUpdateData"; "onViewUpdateActiveStartup": "onViewUpdateActiveStartup"; "onViewEditAlias": "onViewEditAlias"; "onViewCreate": "onViewCreate"; "visibleChange": "visibleChange"; }, never, never, true>;
34
+ }
@@ -0,0 +1,5 @@
1
+ /** Cell presentation. Filtering, sorting and export continue to use DataType. */
2
+ export declare enum CellDisplay {
3
+ Default = 0,
4
+ ProgressBar = 1
5
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Defines how content that overflows a table cell is displayed.
3
+ *
4
+ * @remarks
5
+ * This enumeration specifies the visual behavior of cell content when it exceeds the cell’s width.
6
+ */
7
+ export declare enum CellOverflowBehaviour {
8
+ /** The overflowing content is clipped and not visible. */
9
+ Hidden = 0,
10
+ /** The content wraps onto multiple lines to fit within the cell. */
11
+ Wrap = 1
12
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Defines the horizontal alignment of content within a table cell.
3
+ *
4
+ * @remarks
5
+ * Specifies how the content inside a cell is positioned horizontally relative to the cell's width.
6
+ */
7
+ export declare enum DataAlignHorizontal {
8
+ /** Content is aligned to the left side of the cell. */
9
+ Left = 0,
10
+ /** Content is aligned to the center of the cell. */
11
+ Center = 1,
12
+ /** Content is aligned to the right side of the cell. */
13
+ Right = 2
14
+ }
@@ -0,0 +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
+ */
7
+ export declare enum DataAlignVertical {
8
+ /** Align content to the top of the cell. */
9
+ Top = 0,
10
+ /** Align content to the vertical middle of the cell. */
11
+ Middle = 1,
12
+ /** Align content to the bottom of the cell. */
13
+ Bottom = 2
14
+ }
@@ -0,0 +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
+ */
8
+ export declare enum DataType {
9
+ /** Plain text string values. */
10
+ Text = 0,
11
+ /** Numeric values, e.g., integers or decimals. */
12
+ Numeric = 1,
13
+ /** Boolean values (true/false). */
14
+ Boolean = 2,
15
+ /** Date or datetime values. */
16
+ Date = 3,
17
+ /** List of values, stored as a string separated by a delimiter (";"). */
18
+ List = 4
19
+ }