@eternalcodestudio/primeng-table 19.0.4 → 19.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/eternalcodestudio-primeng-table.mjs +46 -22
- package/fesm2022/eternalcodestudio-primeng-table.mjs.map +1 -1
- package/lib/components/export-excel/export-excel.d.ts +2 -0
- package/lib/components/table-cell/table-cell.d.ts +14 -9
- package/lib/components/table-predefined-filters/table-predefined-filters.d.ts +5 -2
- package/lib/interfaces/columns-metadata.interface.d.ts +6 -0
- package/lib/interfaces/excel-export-request.interface.d.ts +2 -0
- package/lib/interfaces/predefined-filter.interface.d.ts +8 -0
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ export declare class ExportExcel implements OnChanges {
|
|
|
10
10
|
rowCheckboxSelectorActive: boolean;
|
|
11
11
|
excelReportTitle: string;
|
|
12
12
|
includeTimeInTitle: boolean;
|
|
13
|
+
exportUseIconsInBools: boolean;
|
|
13
14
|
allowTitleUserEdit: boolean;
|
|
14
15
|
exportToExcel: EventEmitter<{
|
|
15
16
|
allColumns: boolean;
|
|
@@ -17,6 +18,7 @@ export declare class ExportExcel implements OnChanges {
|
|
|
17
18
|
applySorts: boolean;
|
|
18
19
|
selectedRows: number;
|
|
19
20
|
filename: string;
|
|
21
|
+
useIconInBools: boolean;
|
|
20
22
|
}>;
|
|
21
23
|
visibleChange: EventEmitter<boolean>;
|
|
22
24
|
constructor(notificationSerivce: ECSPrimengTableNotificationService, exportExcelService: ExportExcelService);
|
|
@@ -23,21 +23,26 @@ export declare class TableCell {
|
|
|
23
23
|
getDataAlignHorizontalAsText(dataAlignHorizontal: DataAlignHorizontal): void;
|
|
24
24
|
getDataAlignVerticalAsText(dataAlignVertical: DataAlignVertical): void;
|
|
25
25
|
/**
|
|
26
|
-
* Formats a date value
|
|
26
|
+
* Formats a date value using either column-level overrides or global settings.
|
|
27
|
+
* The incoming value is assumed to represent a UTC date.
|
|
27
28
|
*
|
|
28
29
|
* @param {any} value - The date value to be formatted.
|
|
29
|
-
* @
|
|
30
|
+
* @param {string | null} dateFormat - Optional column-level override for the date format.
|
|
31
|
+
* @param {string | null} dateTimezone - Optional column-level override for the timezone used in formatting.
|
|
32
|
+
* @param {string | null} dateCulture - Optional column-level override for the culture used in formatting.
|
|
30
33
|
*
|
|
31
|
-
* @
|
|
32
|
-
*
|
|
33
|
-
* const dateValue: Date = new Date();
|
|
34
|
+
* @returns {string} - The formatted date string using the effective (column or global) settings,
|
|
35
|
+
* or an empty string if the value is invalid or undefined.
|
|
34
36
|
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
+
* @example
|
|
38
|
+
* // Example using only global settings:
|
|
39
|
+
* const result = formatDate(dateValue, null, null, null);
|
|
37
40
|
*
|
|
38
|
-
*
|
|
41
|
+
* @example
|
|
42
|
+
* // Example using column-level overrides:
|
|
43
|
+
* const result = formatDate(dateValue, 'dd/MM/yyyy', 'UTC', 'en-GB');
|
|
39
44
|
*/
|
|
40
|
-
formatDate(value: any): string;
|
|
45
|
+
formatDate(value: any, dateFormat: string | null, dateTimezone: string | null, dateCulture: string | null): string;
|
|
41
46
|
getPredefinedFilterTooltip(colMetadata: IColumnMetadata, value: any): any;
|
|
42
47
|
/**
|
|
43
48
|
* Checks if the provided column metadata matches a specific style of the predefined filters
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { DomSanitizer, SafeUrl } from '@angular/platform-browser';
|
|
1
|
+
import { DomSanitizer, SafeHtml, SafeUrl } from '@angular/platform-browser';
|
|
2
2
|
import { ECSPrimengTableService } from '../ecs-primeng-table/ecs-primeng-table.service';
|
|
3
|
+
import { IColumnMetadata } from '../../interfaces';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class TablePredefinedFilters {
|
|
5
6
|
private sanitizer;
|
|
@@ -9,6 +10,7 @@ export declare class TablePredefinedFilters {
|
|
|
9
10
|
col: any;
|
|
10
11
|
selectable: boolean;
|
|
11
12
|
rowData: any;
|
|
13
|
+
globalSearchText?: any;
|
|
12
14
|
/**
|
|
13
15
|
* Converts a blob from the database to a safe URL that can be used to display an image.
|
|
14
16
|
*
|
|
@@ -30,6 +32,7 @@ export declare class TablePredefinedFilters {
|
|
|
30
32
|
getBlobIconAsUrl(blob: Blob): SafeUrl;
|
|
31
33
|
handleClick(): void;
|
|
32
34
|
getTagStyle(option: any): any;
|
|
35
|
+
highlightText(cellValue: any, colMetadata: IColumnMetadata, globalSearchText: string | null | undefined): SafeHtml;
|
|
33
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<TablePredefinedFilters, never>;
|
|
34
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TablePredefinedFilters, "ecs-table-predefined-filters", never, { "option": { "alias": "option"; "required": false; }; "col": { "alias": "col"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "rowData": { "alias": "rowData"; "required": false; }; }, {}, never, never, true, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TablePredefinedFilters, "ecs-table-predefined-filters", never, { "option": { "alias": "option"; "required": false; }; "col": { "alias": "col"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "rowData": { "alias": "rowData"; "required": false; }; "globalSearchText": { "alias": "globalSearchText"; "required": false; }; }, {}, never, never, true, never>;
|
|
35
38
|
}
|
|
@@ -50,4 +50,10 @@ export interface IColumnMetadata {
|
|
|
50
50
|
cellOverflowBehaviourAllowUserEdit: boolean;
|
|
51
51
|
/** Initial width of the column in pixels. */
|
|
52
52
|
initialWidth: number;
|
|
53
|
+
/** Optional date format override for this column. */
|
|
54
|
+
dateFormat: string | null;
|
|
55
|
+
/** Optional timezone override. */
|
|
56
|
+
dateTimezone: string | null;
|
|
57
|
+
/** Optional culture override. */
|
|
58
|
+
dateCulture: string | null;
|
|
53
59
|
}
|
|
@@ -15,4 +15,6 @@ export interface IExcelExportRequest extends ITableQueryRequest {
|
|
|
15
15
|
applyFilters: boolean;
|
|
16
16
|
/** Determines whether the current table sorting should be applied in the export. */
|
|
17
17
|
applySorts: boolean;
|
|
18
|
+
/** If in bools we need to use icons or the underlying boolean value. */
|
|
19
|
+
useIconInBools: boolean;
|
|
18
20
|
}
|
|
@@ -22,6 +22,14 @@ export interface IPredefinedFilter {
|
|
|
22
22
|
* Set to `true` to display the `name` as text in the cell.
|
|
23
23
|
*/
|
|
24
24
|
displayName?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Optional CSS style object to apply to the text when `displayName` is `true`.
|
|
27
|
+
*
|
|
28
|
+
* Example: { color: 'blue', fontWeight: 'bold', fontStyle: 'italic' }
|
|
29
|
+
*/
|
|
30
|
+
nameStyle?: {
|
|
31
|
+
[key: string]: string;
|
|
32
|
+
};
|
|
25
33
|
/**
|
|
26
34
|
* Set to `true` to display the `name` as a tag in the cell.
|
|
27
35
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eternalcodestudio/primeng-table",
|
|
3
|
-
"version": "19.0.
|
|
3
|
+
"version": "19.0.5",
|
|
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",
|