@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.
Files changed (42) hide show
  1. package/fesm2022/eternalcodestudio-primeng-table.mjs +39 -48
  2. package/fesm2022/eternalcodestudio-primeng-table.mjs.map +1 -1
  3. package/index.d.ts +451 -3
  4. package/package.json +5 -5
  5. package/fesm2022/ecs-primeng-table.mjs +0 -1745
  6. package/fesm2022/ecs-primeng-table.mjs.map +0 -1
  7. package/lib/components/column-selector/column-selector.d.ts +0 -36
  8. package/lib/components/ecs-primeng-table/ecs-primeng-table.d.ts +0 -203
  9. package/lib/components/ecs-primeng-table/ecs-primeng-table.service.d.ts +0 -48
  10. package/lib/components/export-excel/export-excel.d.ts +0 -39
  11. package/lib/components/export-excel/export-excel.service.d.ts +0 -6
  12. package/lib/components/table-button/table-button.d.ts +0 -16
  13. package/lib/components/table-cell/table-cell.d.ts +0 -52
  14. package/lib/components/table-predifined-filters/table-predifined-filters.d.ts +0 -30
  15. package/lib/components/views-management/views-management.d.ts +0 -32
  16. package/lib/enums/cell-overflow-behaviour.enum.d.ts +0 -4
  17. package/lib/enums/data-align-horizontal.enum.d.ts +0 -5
  18. package/lib/enums/data-align-vertical.enum.d.ts +0 -5
  19. package/lib/enums/data-type.enum.enum.d.ts +0 -6
  20. package/lib/enums/frozen-column-align.enum.d.ts +0 -5
  21. package/lib/enums/index.d.ts +0 -6
  22. package/lib/enums/table-view-save-mode.enum.d.ts +0 -6
  23. package/lib/interfaces/columns-metadata.interface.d.ts +0 -25
  24. package/lib/interfaces/excel-export-request.interface.d.ts +0 -7
  25. package/lib/interfaces/index.d.ts +0 -9
  26. package/lib/interfaces/predifined-filter.interface.d.ts +0 -34
  27. package/lib/interfaces/table-button.interface.d.ts +0 -29
  28. package/lib/interfaces/table-configuration.interface.d.ts +0 -8
  29. package/lib/interfaces/table-paged-response.interface.d.ts +0 -13
  30. package/lib/interfaces/table-query-request.interface.d.ts +0 -20
  31. package/lib/interfaces/table-view-data.interface.d.ts +0 -12
  32. package/lib/interfaces/table-view.interface.d.ts +0 -6
  33. package/lib/services/http.service.d.ts +0 -9
  34. package/lib/services/index.d.ts +0 -2
  35. package/lib/services/notification.service.d.ts +0 -7
  36. package/lib/utils/data-align-horizontal-as-text.d.ts +0 -2
  37. package/lib/utils/data-align-vertical-as-text.d.ts +0 -2
  38. package/lib/utils/data-type-as-text.d.ts +0 -2
  39. package/lib/utils/frozen-column-align-as-text.d.ts +0 -2
  40. package/lib/utils/highlight-text.d.ts +0 -24
  41. package/lib/utils/index.d.ts +0 -5
  42. package/public-api.d.ts +0 -5
@@ -1,203 +0,0 @@
1
- import { AfterViewInit, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
- import { Table, TableLazyLoadEvent, TablePageEvent, TableRowSelectEvent, TableRowUnSelectEvent } from 'primeng/table';
3
- import { MenuItem } from 'primeng/api';
4
- import { ECSPrimengTableService } from './ecs-primeng-table.service';
5
- import { CellOverflowBehaviour, DataAlignHorizontal, DataAlignVertical, DataType, FrozenColumnAlign, TableViewSaveMode } from '../../enums';
6
- import { ITableButton, IColumnMetadata, IPredifinedFilter, ITablePagedResponse, ITableView } from '../../interfaces';
7
- import { ECSPrimengTableNotificationService } from '../../services';
8
- import * as i0 from "@angular/core";
9
- export declare class ECSPrimengTable implements OnInit, AfterViewInit, OnDestroy {
10
- private tableService;
11
- private notification;
12
- private resizeObserver;
13
- constructor(tableService: ECSPrimengTableService, notification: ECSPrimengTableNotificationService);
14
- isActive: boolean;
15
- data: any[];
16
- columnsToShow: IColumnMetadata[];
17
- computeScrollHeight: boolean;
18
- globalSearchEnabled: boolean;
19
- globalSearchMaxLength: number;
20
- globalSearchPlaceholder: string;
21
- columnEditorEnabled: boolean;
22
- urlColumnsSource: string;
23
- urlDataSource: string;
24
- urlExcelReport: string | null;
25
- predifinedFiltersCollection: {
26
- [key: string]: IPredifinedFilter[];
27
- };
28
- predifinedFiltersNoSelectionPlaceholder: string;
29
- predifinedFiltersCollectionSelectedValuesText: string;
30
- rowActionButtons: ITableButton[];
31
- headerActionButtons: ITableButton[];
32
- copyCellDataToClipboardTimeSecs: number;
33
- actionsColumnAligmentRight: boolean;
34
- actionsColumnWidth: number;
35
- actionsColumnFrozen: boolean;
36
- rowSelectorColumnActive: boolean;
37
- rowSelectorColumName: string;
38
- rowSelectorColumnAligmentRight: boolean;
39
- rowSelectorColumnWidth: number;
40
- rowSelectorColumnFrozen: boolean;
41
- actionsColumnResizable: boolean;
42
- actionColumnName: string;
43
- rowselectorColumnResizable: boolean;
44
- noDataFoundText: string;
45
- showClearSortAndFilters: boolean;
46
- excelReportTitleDefault: string;
47
- excelReportTitleAllowUserEdit: boolean;
48
- tableViewSaveAs: TableViewSaveMode;
49
- tableViewSaveKey: string;
50
- viewsGetSourceURL: string;
51
- viewsSaveSourceURL: string;
52
- maxTableViews: number;
53
- onRowCheckboxChange: EventEmitter<{
54
- rowID: any;
55
- selected: boolean;
56
- }>;
57
- onRowSelect: EventEmitter<{
58
- rowID: any;
59
- rowData: any;
60
- }>;
61
- onRowUnselect: EventEmitter<{
62
- rowID: any;
63
- rowData: any;
64
- }>;
65
- viewsModalShow: boolean;
66
- tableViewCurrentSelectedAlias: string | null;
67
- tableViewsFirstFetchDone: boolean;
68
- excelReportTitle: string;
69
- showExportModal: boolean;
70
- showColumnSelector: boolean;
71
- selectedRowsCheckbox: any[];
72
- dt: Table;
73
- showRefreshData: boolean;
74
- scrollHeight: string;
75
- globalSearchText: string | null;
76
- tableViewsList: ITableView[];
77
- tableViews_menuItems: MenuItem[];
78
- DataType: typeof DataType;
79
- CellOverflowBehaviour: typeof CellOverflowBehaviour;
80
- DataAlignHorizontal: typeof DataAlignHorizontal;
81
- DataAlignVertical: typeof DataAlignVertical;
82
- FrozenColumnAlign: typeof FrozenColumnAlign;
83
- TableViewSaveMode: typeof TableViewSaveMode;
84
- rowSelection: any;
85
- currentPage: number;
86
- currentRowsPerPage: number;
87
- allowedRowsPerPage: number[];
88
- totalRecords: number;
89
- totalRecordsNotFiltered: number;
90
- dateFormat: string;
91
- dateTimezone: string;
92
- dateCulture: string;
93
- columns: IColumnMetadata[];
94
- columnsCantBeHidden: IColumnMetadata[];
95
- columnsSelected: IColumnMetadata[];
96
- columnModalData: any[];
97
- filteredColumnData: any[];
98
- predifinedFiltersSelectedValuesCollection: {
99
- [key: string]: any[];
100
- };
101
- private copyCellDataTimer;
102
- tableLazyLoadEventInformation: TableLazyLoadEvent;
103
- private initialConfigurationFetched;
104
- ngOnInit(): void;
105
- tableContainer: ElementRef;
106
- headerContainer: ElementRef;
107
- paginatorContainer: ElementRef;
108
- ngAfterViewInit(): void;
109
- onWindowResize: () => void;
110
- calculateScrollHeight(): void;
111
- ngOnDestroy(): void;
112
- /**
113
- * Used to update the data of a table externally outside the component. Use this method instead of 'updateData' to force the data updata of a table
114
- *
115
- * @param {(optionalData?: any) => void} [continueAction] - Optional action to execute after data retrieval if it succeeded.
116
- * @param {boolean} [uponContinueActionEndModalHttp=false] - Optional flag to set the loading indicator to inactive after data retrieval.
117
- */
118
- updateData(continueAction?: (optionalData?: any) => void, uponContinueActionEndModalHttp?: boolean): void;
119
- fetchTableConfiguration(): void;
120
- private handleTableConfigurationResponse;
121
- refreshData(event: any): void;
122
- tableViewsEnabled(): boolean;
123
- fetchTableViews(): void;
124
- private tableViewListProcess;
125
- viewLoad(tableViewAlias: string): void;
126
- viewCreate(viewAlias: string): void;
127
- viewDelete(viewAlias: string): void;
128
- viewEditAlias(event: {
129
- viewAliasOld: string;
130
- viewAliasNew: string;
131
- }): void;
132
- viewUpdateData(viewAlias: string): void;
133
- viewsSave(endMessage: number): void;
134
- viewsSaveEnd(endMessage: number): void;
135
- fetchTableData(event: TableLazyLoadEvent): void;
136
- private modifyFiltersWithoutGlobalAndSelectedRows;
137
- private selectorRowFilterBuilder;
138
- revertDateTimeZoneFilters(inputFilter: any): any;
139
- handleTableDataResponse(body: ITablePagedResponse): void;
140
- clearFilters(dt: Table, force?: boolean, onlyGlobalFilter?: boolean): void;
141
- clearSorts(dt: Table, force?: boolean): void;
142
- hasToClearSorts(dt: Table, force?: boolean): boolean;
143
- hasToClearFilters(dt: Table, globalSearchText: string | null, force?: boolean): boolean;
144
- /**
145
- * Determines whether there are active filters based on the provided filter rules.
146
- *
147
- * @param {any} filterRules An object representing filter rules for each column.
148
- * The keys are column names, and the values are arrays of filter rules.
149
- * Each filter rule has the following properties:
150
- * - `field`: The field or property name of the column.
151
- * - `value`: The filter value entered by the user.
152
- * - Other properties depending on the type of filter (e.g., `matchMode` for string filters).
153
- * @returns {boolean} `true` if at least one active filter is found, otherwise `false`.
154
- */
155
- private hasFilters;
156
- getColumnStyle(col: any, headerCols?: boolean): Record<string, string>;
157
- getPredifinedFilterValues(columnKeyName: string): IPredifinedFilter[];
158
- getFrozenColumnAlignAsText(frozenColumnAlign: FrozenColumnAlign): string;
159
- getDataTypeAsText(dataType: DataType): string;
160
- /**
161
- * Updates the filters of a PrimeNG data table based on predefined filter changes.
162
- *
163
- * @param {string} filterName - The name of the filter to be updated.
164
- * @param {IPrimengPredifinedFilter[]} selectedValues - An array of selected predefined filter values.
165
- */
166
- onPredifinedFilterChange(filterName: string, selectedValues: IPredifinedFilter[]): void;
167
- /**
168
- * Retrieves the number of values selected for a predefined filter.
169
- *
170
- * This function checks the collection of selected values for a specified column key name and returns a string
171
- * indicating the number of selected items along with a predefined text.
172
- *
173
- * @param {string} columnKeyName - The key name of the column for which to retrieve the number of selected values.
174
- * @returns {string} A string indicating the number of selected values for the specified column.
175
- */
176
- predifinedFiltersSelectedValuesText(columnKeyName: string): string;
177
- handleButtonsClick(action: (rowData: any) => void, rowData?: any): void;
178
- /**
179
- * Checks if the provided column metadata matches a specific style of the predefined filters
180
- * that need to be applied to an item on a row.
181
- *
182
- * @param {IprimengColumnsMetadata} colMetadata - The metadata of the column being checked.
183
- * @param {any} value - The value to be matched against the predefined filter values.
184
- * @returns {any} The matching predefined filter value if found, otherwise null.
185
- */
186
- getPredfinedFilterMatch(colMetadata: IColumnMetadata, value: any): any;
187
- copyToClipboardStart(event: MouseEvent): void;
188
- copyToClipboardCancel(): void;
189
- getDataAlignHorizontalAsText(dataAlignHorizontal: DataAlignHorizontal): string;
190
- getDataAlignVerticalAsText(dataAlignVertical: DataAlignVertical): string;
191
- isRowCheckboxSelected(rowID: any): boolean;
192
- onRowChekboxChange(event: any, rowID: any): void;
193
- rowSelect(event: TableRowSelectEvent<any>): void;
194
- rowUnselect(event: TableRowUnSelectEvent<any>): void;
195
- pageChange(event: TablePageEvent): void;
196
- columnSelectorShow(): void;
197
- applyColumnModalChanges(selectedColumns: IColumnMetadata[]): void;
198
- private updateColumnsSpecialProperties;
199
- openExcelExport(): void;
200
- generateExcelReport(event: any): void;
201
- static ɵfac: i0.ɵɵFactoryDeclaration<ECSPrimengTable, never>;
202
- static ɵcmp: i0.ɵɵComponentDeclaration<ECSPrimengTable, "ecs-primeng-table", never, { "isActive": { "alias": "isActive"; "required": false; }; "data": { "alias": "data"; "required": false; }; "columnsToShow": { "alias": "columnsToShow"; "required": false; }; "computeScrollHeight": { "alias": "computeScrollHeight"; "required": false; }; "globalSearchEnabled": { "alias": "globalSearchEnabled"; "required": false; }; "globalSearchMaxLength": { "alias": "globalSearchMaxLength"; "required": false; }; "globalSearchPlaceholder": { "alias": "globalSearchPlaceholder"; "required": false; }; "columnEditorEnabled": { "alias": "columnEditorEnabled"; "required": false; }; "urlColumnsSource": { "alias": "urlColumnsSource"; "required": false; }; "urlDataSource": { "alias": "urlDataSource"; "required": false; }; "urlExcelReport": { "alias": "urlExcelReport"; "required": false; }; "predifinedFiltersCollection": { "alias": "predifinedFiltersCollection"; "required": false; }; "predifinedFiltersNoSelectionPlaceholder": { "alias": "predifinedFiltersNoSelectionPlaceholder"; "required": false; }; "predifinedFiltersCollectionSelectedValuesText": { "alias": "predifinedFiltersCollectionSelectedValuesText"; "required": false; }; "rowActionButtons": { "alias": "rowActionButtons"; "required": false; }; "headerActionButtons": { "alias": "headerActionButtons"; "required": false; }; "copyCellDataToClipboardTimeSecs": { "alias": "copyCellDataToClipboardTimeSecs"; "required": false; }; "actionsColumnAligmentRight": { "alias": "actionsColumnAligmentRight"; "required": false; }; "actionsColumnWidth": { "alias": "actionsColumnWidth"; "required": false; }; "actionsColumnFrozen": { "alias": "actionsColumnFrozen"; "required": false; }; "rowSelectorColumnActive": { "alias": "rowSelectorColumnActive"; "required": false; }; "rowSelectorColumName": { "alias": "rowSelectorColumName"; "required": false; }; "rowSelectorColumnAligmentRight": { "alias": "rowSelectorColumnAligmentRight"; "required": false; }; "rowSelectorColumnWidth": { "alias": "rowSelectorColumnWidth"; "required": false; }; "rowSelectorColumnFrozen": { "alias": "rowSelectorColumnFrozen"; "required": false; }; "actionsColumnResizable": { "alias": "actionsColumnResizable"; "required": false; }; "actionColumnName": { "alias": "actionColumnName"; "required": false; }; "rowselectorColumnResizable": { "alias": "rowselectorColumnResizable"; "required": false; }; "noDataFoundText": { "alias": "noDataFoundText"; "required": false; }; "showClearSortAndFilters": { "alias": "showClearSortAndFilters"; "required": false; }; "excelReportTitleDefault": { "alias": "excelReportTitleDefault"; "required": false; }; "excelReportTitleAllowUserEdit": { "alias": "excelReportTitleAllowUserEdit"; "required": false; }; "tableViewSaveAs": { "alias": "tableViewSaveAs"; "required": false; }; "tableViewSaveKey": { "alias": "tableViewSaveKey"; "required": false; }; "viewsGetSourceURL": { "alias": "viewsGetSourceURL"; "required": false; }; "viewsSaveSourceURL": { "alias": "viewsSaveSourceURL"; "required": false; }; "maxTableViews": { "alias": "maxTableViews"; "required": false; }; }, { "onRowCheckboxChange": "onRowCheckboxChange"; "onRowSelect": "onRowSelect"; "onRowUnselect": "onRowUnselect"; }, never, never, true, never>;
203
- }
@@ -1,48 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { HttpResponse } from '@angular/common/http';
3
- import { ECSPrimengTableHttpService, ECSPrimengTableNotificationService } from '../../services';
4
- import { IColumnMetadata, IExcelExportRequest, 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
- constructor(http: ECSPrimengTableHttpService, notification: ECSPrimengTableNotificationService);
14
- fetchTableConfiguration(url: string): Observable<HttpResponse<ITableConfiguration>>;
15
- fetchTableData(url: string, postData: ITableQueryRequest): Observable<HttpResponse<ITablePagedResponse>>;
16
- fetchExcelReport(url: string, postData: IExcelExportRequest): Observable<HttpResponse<Blob>>;
17
- downloadFile(data: Blob, fileName: string, contentType: string): void;
18
- handleTableError(error: any, customTitle?: string): void;
19
- orderColumnsWithFrozens(colsToOrder: IColumnMetadata[]): IColumnMetadata[];
20
- /**
21
- * Handles click events on action buttons in a row of data.
22
- *
23
- * @param {function} action - The action function to be executed when the button is clicked. It should accept one parameter, which is the row data.
24
- * @param {any} [rowData=null] - The data of the row corresponding to the clicked button. Defaults to null.
25
- *
26
- * @returns {void}
27
- *
28
- * @example
29
- * // Define an action for a button
30
- * const deleteAction = (rowData) => {
31
- * console.log(`Delete row with id: ${rowData.rowID}`);
32
- * };
33
- *
34
- * // Use handleButtonsClick with row data
35
- * handleButtonsClick(deleteAction, { rowID: 1, name: 'John Doe' });
36
- */
37
- handleButtonsClick(action: (rowData: any) => void, rowData?: any): void;
38
- getColumnStyle(col: any, headerCols?: boolean): Record<string, string>;
39
- fetchTableViews(tableViewSaveAs: TableViewSaveMode, recoverListEndpoint: string, tableViewSaveKey: string): ITableView[] | Observable<HttpResponse<ITableView[]>>;
40
- sortViews(tableSaveViewList: ITableView[]): void;
41
- updateViewsMenuItems(tableSaveViewList: ITableView[]): MenuItem[];
42
- viewsSaveToDatabase(tableSaveViewList: ITableView[], setListEndpoint: string, tableViewSaveKey: string): Observable<HttpResponse<any>>;
43
- viewGenerateData(dt: Table, globalSearchText: string | null, currentPage: number, currentRowsPerPage: number, modifyFiltersFn: (filters: any) => any): ITableViewData;
44
- computeColumnWidths(dt: Table): any;
45
- computeTableWidth(dt: Table): any;
46
- static ɵfac: i0.ɵɵFactoryDeclaration<ECSPrimengTableService, never>;
47
- static ɵprov: i0.ɵɵInjectableDeclaration<ECSPrimengTableService>;
48
- }
@@ -1,39 +0,0 @@
1
- import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
- import { SelectButtonChangeEvent } from 'primeng/selectbutton';
3
- import { ECSPrimengTableNotificationService } from '../../services';
4
- import { ExportExcelService } from './export-excel.service';
5
- import * as i0 from "@angular/core";
6
- export declare class ExportExcel implements OnChanges {
7
- private notificationSerivce;
8
- private exportExcelService;
9
- visible: boolean;
10
- rowCheckboxSelectorActive: boolean;
11
- excelReportTitle: string;
12
- includeTimeInTitle: boolean;
13
- allowTitleUserEdit: boolean;
14
- exportToExcel: EventEmitter<{
15
- allColumns: boolean;
16
- applyFilters: boolean;
17
- applySorts: boolean;
18
- selectedRows: number;
19
- filename: string;
20
- }>;
21
- visibleChange: EventEmitter<boolean>;
22
- constructor(notificationSerivce: ECSPrimengTableNotificationService, exportExcelService: ExportExcelService);
23
- option_exportColumns_selected: boolean;
24
- option_exportColumns: any[];
25
- option_applyCurrentFilters_selected: boolean;
26
- option_applyCurrentFilters: any[];
27
- option_applyCurrentSorts_selected: boolean;
28
- option_applyCurrentSorts: any[];
29
- option_selectedRowsExport_selected: number;
30
- option_selectedRowsExport: any[];
31
- ngOnChanges(changes: SimpleChanges): void;
32
- private resetValues;
33
- getExcelReport(): void;
34
- filterSelectorDisabled(): boolean;
35
- onChangeExportRows(event: SelectButtonChangeEvent): void;
36
- closeModal(): void;
37
- static ɵfac: i0.ɵɵFactoryDeclaration<ExportExcel, never>;
38
- static ɵcmp: i0.ɵɵComponentDeclaration<ExportExcel, "ecs-export-excel", never, { "visible": { "alias": "visible"; "required": false; }; "rowCheckboxSelectorActive": { "alias": "rowCheckboxSelectorActive"; "required": false; }; "excelReportTitle": { "alias": "excelReportTitle"; "required": false; }; "allowTitleUserEdit": { "alias": "allowTitleUserEdit"; "required": false; }; }, { "exportToExcel": "exportToExcel"; "visibleChange": "visibleChange"; }, never, never, true, never>;
39
- }
@@ -1,6 +0,0 @@
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
- }
@@ -1,16 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import { ECSPrimengTableService } from '../ecs-primeng-table/ecs-primeng-table.service';
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
- clicked: EventEmitter<any>;
12
- isDisabled(): boolean;
13
- handleClick(): void;
14
- static ɵfac: i0.ɵɵFactoryDeclaration<TableButton, never>;
15
- static ɵcmp: i0.ɵɵComponentDeclaration<TableButton, "ecs-table-button", never, { "button": { "alias": "button"; "required": false; }; "rowData": { "alias": "rowData"; "required": false; }; "isActionButton": { "alias": "isActionButton"; "required": false; }; "isLastActionButton": { "alias": "isLastActionButton"; "required": false; }; }, { "clicked": "clicked"; }, never, never, true, never>;
16
- }
@@ -1,52 +0,0 @@
1
- import { DataAlignHorizontal, DataAlignVertical, DataType } from '../../enums';
2
- import { DatePipe } from '@angular/common';
3
- import { IColumnMetadata, IPredifinedFilter } from '../../interfaces';
4
- import { SafeHtml } from '@angular/platform-browser';
5
- import * as i0 from "@angular/core";
6
- export declare class TableCell {
7
- private datePipe;
8
- constructor(datePipe: DatePipe);
9
- col: any;
10
- rowData: any;
11
- globalSearchText: string | null;
12
- predifinedFiltersCollection: {
13
- [key: string]: IPredifinedFilter[];
14
- };
15
- dateFormat: string;
16
- dateTimezone: string;
17
- dateCulture: string;
18
- DataType: typeof DataType;
19
- get value(): any;
20
- get tooltipText(): any;
21
- getDataAlignHorizontalAsText(dataAlignHorizontal: DataAlignHorizontal): void;
22
- getDataAlignVerticalAsText(dataAlignVertical: DataAlignVertical): void;
23
- /**
24
- * Formats a date value to a specific string format. Provided date will be assumed to be in UTC
25
- *
26
- * @param {any} value - The date value to be formatted.
27
- * @returns {string} - The formatted date string in 'dd-MMM-yyyy HH:mm:ss' format followed by the timezone, or empty string if the provided value is invalid or undefined.
28
- *
29
- * @example
30
- * // Example date value
31
- * const dateValue: Date = new Date();
32
- *
33
- * // Use formatDate to get the formatted date string
34
- * const formattedDate: string = formatDate(dateValue);
35
- *
36
- * // Output might be: '18-Jun-2024 14:30:00 GMT+0000'
37
- */
38
- formatDate(value: any): string;
39
- /**
40
- * Checks if the provided column metadata matches a specific style of the predefined filters
41
- * that need to be applied to an item on a row.
42
- *
43
- * @param {IprimengColumnsMetadata} colMetadata - The metadata of the column being checked.
44
- * @param {any} value - The value to be matched against the predefined filter values.
45
- * @returns {any} The matching predefined filter value if found, otherwise null.
46
- */
47
- getPredfinedFilterMatch(colMetadata: IColumnMetadata, value: any): any;
48
- getPredifinedFilterValues(columnKeyName: string): IPredifinedFilter[];
49
- highlightText(cellValue: any, colMetadata: IColumnMetadata, globalSearchText: string | null): SafeHtml;
50
- static ɵfac: i0.ɵɵFactoryDeclaration<TableCell, never>;
51
- static ɵcmp: i0.ɵɵComponentDeclaration<TableCell, "ecs-table-cell", never, { "col": { "alias": "col"; "required": false; }; "rowData": { "alias": "rowData"; "required": false; }; "globalSearchText": { "alias": "globalSearchText"; "required": false; }; "predifinedFiltersCollection": { "alias": "predifinedFiltersCollection"; "required": false; }; "dateFormat": { "alias": "dateFormat"; "required": false; }; "dateTimezone": { "alias": "dateTimezone"; "required": false; }; "dateCulture": { "alias": "dateCulture"; "required": false; }; }, {}, never, never, true, never>;
52
- }
@@ -1,30 +0,0 @@
1
- import { DomSanitizer, SafeUrl } from '@angular/platform-browser';
2
- import * as i0 from "@angular/core";
3
- export declare class TablePredifinedFilters {
4
- private sanitizer;
5
- constructor(sanitizer: DomSanitizer);
6
- option: any;
7
- col: any;
8
- /**
9
- * Converts a blob from the database to a safe URL that can be used to display an image.
10
- *
11
- * This function takes a `Blob` object, converts it to a base64 encoded string, and returns a `SafeUrl`
12
- * that can be used in an HTML template to display the image securely. The `SafeUrl` ensures that
13
- * Angular's security mechanisms are bypassed correctly, preventing potential security risks.
14
- *
15
- * @param {Blob} blob - The blob object representing the image data from the database.
16
- * @returns {SafeUrl} A safe URL that can be used to display the image in an HTML template.
17
- *
18
- * @example
19
- * // Example usage in a component
20
- * const imageBlob = new Blob([binaryData], { type: 'image/jpeg' });
21
- * const imageUrl = this.getBlobIconAsUrl(imageBlob);
22
- *
23
- * // In your HTML template
24
- * <img [src]="imageUrl" alt="Image">
25
- */
26
- getBlobIconAsUrl(blob: Blob): SafeUrl;
27
- getIconStyles(option: any): any;
28
- static ɵfac: i0.ɵɵFactoryDeclaration<TablePredifinedFilters, never>;
29
- static ɵcmp: i0.ɵɵComponentDeclaration<TablePredifinedFilters, "ecs-table-predifined-filters", never, { "option": { "alias": "option"; "required": false; }; "col": { "alias": "col"; "required": false; }; }, {}, never, never, true, never>;
30
- }
@@ -1,32 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import { MenuItem } from 'primeng/api';
3
- import { ECSPrimengTableNotificationService } from '../../services';
4
- import * as i0 from "@angular/core";
5
- export declare class ViewsManagement {
6
- private notification;
7
- constructor(notification: ECSPrimengTableNotificationService);
8
- visible: boolean;
9
- tableViews_menuItems: MenuItem[];
10
- onViewSelect: EventEmitter<string>;
11
- onViewDelete: EventEmitter<string>;
12
- onViewUpdateData: EventEmitter<string>;
13
- onViewEditAlias: EventEmitter<{
14
- viewAliasOld: string;
15
- viewAliasNew: string;
16
- }>;
17
- onViewCreate: EventEmitter<string>;
18
- visibleChange: EventEmitter<boolean>;
19
- viewEditorShow: boolean;
20
- editingViewAlias: string;
21
- newViewAlias: string;
22
- loadView(viewAlias: string): void;
23
- deleteView(viewAlias: string): void;
24
- updateView(viewAlias: string): void;
25
- createView(viewAlias: string): void;
26
- editViewAlias(viewAliasOld: string, viewAliasNew: string): void;
27
- showViewEditor(editingViewAlias?: string): void;
28
- closeModal(): void;
29
- createOrUpdateTableView(): void;
30
- static ɵfac: i0.ɵɵFactoryDeclaration<ViewsManagement, never>;
31
- static ɵcmp: i0.ɵɵComponentDeclaration<ViewsManagement, "ecs-views-management", never, { "visible": { "alias": "visible"; "required": false; }; "tableViews_menuItems": { "alias": "tableViews_menuItems"; "required": false; }; }, { "onViewSelect": "onViewSelect"; "onViewDelete": "onViewDelete"; "onViewUpdateData": "onViewUpdateData"; "onViewEditAlias": "onViewEditAlias"; "onViewCreate": "onViewCreate"; "visibleChange": "visibleChange"; }, never, never, true, never>;
32
- }
@@ -1,4 +0,0 @@
1
- export declare enum CellOverflowBehaviour {
2
- Hidden = 0,
3
- Wrap = 1
4
- }
@@ -1,5 +0,0 @@
1
- export declare enum DataAlignHorizontal {
2
- Left = 0,
3
- Center = 1,
4
- Right = 2
5
- }
@@ -1,5 +0,0 @@
1
- export declare enum DataAlignVertical {
2
- Top = 0,
3
- Middle = 1,
4
- Bottom = 2
5
- }
@@ -1,6 +0,0 @@
1
- export declare enum DataType {
2
- Text = 0,
3
- Numeric = 1,
4
- Boolean = 2,
5
- Date = 3
6
- }
@@ -1,5 +0,0 @@
1
- export declare enum FrozenColumnAlign {
2
- Noone = 0,
3
- Left = 1,
4
- Right = 2
5
- }
@@ -1,6 +0,0 @@
1
- export * from "./cell-overflow-behaviour.enum";
2
- export * from "./data-align-horizontal.enum";
3
- export * from "./data-align-vertical.enum";
4
- export * from "./data-type.enum.enum";
5
- export * from "./frozen-column-align.enum";
6
- export * from "./table-view-save-mode.enum";
@@ -1,6 +0,0 @@
1
- export declare enum TableViewSaveMode {
2
- noone = 0,
3
- sessionStorage = 1,
4
- localStorage = 2,
5
- databaseStorage = 3
6
- }
@@ -1,25 +0,0 @@
1
- import { CellOverflowBehaviour, DataAlignHorizontal, DataAlignVertical, DataType, FrozenColumnAlign } from "../enums";
2
- export interface IColumnMetadata {
3
- field: string;
4
- header: string;
5
- dataType: DataType;
6
- dataAlignHorizontal: DataAlignHorizontal;
7
- dataAlignHorizontalAllowUserEdit: boolean;
8
- dataAlignVertical: DataAlignVertical;
9
- dataAlignVerticalAllowUserEdit: boolean;
10
- canBeHidden: boolean;
11
- startHidden: boolean;
12
- canBeResized: boolean;
13
- canBeReordered: boolean;
14
- canBeSorted: boolean;
15
- canBeFiltered: boolean;
16
- filterPredifinedValuesName: string;
17
- canBeGlobalFiltered: boolean;
18
- columnDescription: string;
19
- dataTooltipShow: boolean;
20
- dataTooltipCustomColumnSource: string;
21
- frozenColumnAlign: FrozenColumnAlign;
22
- cellOverflowBehaviour: CellOverflowBehaviour;
23
- cellOverflowBehaviourAllowUserEdit: boolean;
24
- initialWidth: number;
25
- }
@@ -1,7 +0,0 @@
1
- import { ITableQueryRequest } from "./table-query-request.interface";
2
- export interface IExcelExportRequest extends ITableQueryRequest {
3
- filename: string;
4
- allColumns: boolean;
5
- applyFilters: boolean;
6
- applySorts: boolean;
7
- }
@@ -1,9 +0,0 @@
1
- export * from "./table-button.interface";
2
- export * from "./excel-export-request.interface";
3
- export * from "./columns-metadata.interface";
4
- export * from "./predifined-filter.interface";
5
- export * from "./table-configuration.interface";
6
- export * from "./table-paged-response.interface";
7
- export * from "./table-query-request.interface";
8
- export * from "./table-view-data.interface";
9
- export * from "./table-view.interface";
@@ -1,34 +0,0 @@
1
- export interface IPredifinedFilter {
2
- /**
3
- * The value of the PrimeNG icon.
4
- */
5
- icon?: string;
6
- iconURL?: string;
7
- iconBlobSourceEndpoint?: string;
8
- iconBlobSourceEndpointResponseError?: boolean;
9
- /**
10
- * The icon as a blob.
11
- */
12
- iconBlob?: Blob;
13
- /**
14
- * A string representing the name to be shown in the UI.
15
- */
16
- name?: string;
17
- /**
18
- * If the name needs to be shown in the UI
19
- */
20
- displayName?: boolean;
21
- /**
22
- * The underlying value of the option. The value can be of any type and represents the data managed behind the scenes.
23
- */
24
- value: any;
25
- /**
26
- * If the value needs to be displayed with a tag
27
- */
28
- displayTag?: boolean;
29
- tagStyle?: {
30
- [key: string]: string;
31
- };
32
- iconColor?: string;
33
- iconStyle?: string;
34
- }
@@ -1,29 +0,0 @@
1
- /**
2
- * Interface representing the configuration for action buttons in a PrimeNG table.
3
- */
4
- export interface ITableButton {
5
- /**
6
- * Gets or sets the icon to be displayed on the button.
7
- * The value should be a string representing the PrimeIcons class name.
8
- */
9
- icon?: string;
10
- label?: string;
11
- /**
12
- * Gets or sets the color style class to be applied to the button.
13
- * The value should be a string representing a CSS class for styling the button.
14
- */
15
- color?: string;
16
- /**
17
- * Gets or sets the condition for displaying the button.
18
- * It is a function that takes row data as input and returns a boolean indicating
19
- * whether the button should be displayed for that row.
20
- */
21
- condition?: (rowData: any) => boolean;
22
- /**
23
- * Represents the action to be executed when the button is clicked.
24
- * This function takes the row data of the clicked row as input and performs
25
- * specific actions based on that data.
26
- */
27
- action?: (rowData: any) => void;
28
- tooltip?: string;
29
- }
@@ -1,8 +0,0 @@
1
- import { IColumnMetadata } from "../interfaces";
2
- export interface ITableConfiguration {
3
- columnsInfo: IColumnMetadata[];
4
- allowedItemsPerPage: number[];
5
- dateFormat: string;
6
- dateTimezone: string;
7
- dateCulture: string;
8
- }
@@ -1,13 +0,0 @@
1
- /**
2
- * Interface representing the return structure for PrimeNG post requests when gathering data to represent in a table.
3
- */
4
- export interface ITablePagedResponse {
5
- /** The current page number.*/
6
- page: number;
7
- /** Total number of records available from filter.*/
8
- totalRecords: number;
9
- /** Total number of records available (without filters).*/
10
- totalRecordsNotFiltered: number;
11
- /** Dynamic data representing the response content of data for the table.*/
12
- data: any;
13
- }
@@ -1,20 +0,0 @@
1
- /**
2
- * Interface representing the request structure for PrimeNG post requests.
3
- */
4
- export interface ITableQueryRequest {
5
- /** Gets or sets the current page number.*/
6
- page: number;
7
- /** Gets or sets the number of items to display per page.*/
8
- pageSize: number;
9
- /** Gets or sets a list of sorting configurations for the table.*/
10
- sort?: any;
11
- /** Gets or sets a dictionary containing filter configurations for each column.*/
12
- filter: any;
13
- /** Gets or sets a global filter string applied to all columns.*/
14
- globalFilter?: string | null;
15
- /** Gets or sets a list of columns to be included in the response.*/
16
- columns?: string[];
17
- dateFormat: string;
18
- dateTimezone: string;
19
- dateCulture: string;
20
- }