@eternalcodestudio/primeng-table 19.0.2 → 19.0.3
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 +159 -112
- package/fesm2022/eternalcodestudio-primeng-table.mjs.map +1 -1
- package/lib/components/ecs-primeng-table/ecs-primeng-table.d.ts +0 -10
- package/lib/components/table-cell/table-cell.d.ts +3 -2
- package/lib/enums/cell-overflow-behaviour.enum.d.ts +5 -7
- package/lib/enums/data-align-horizontal.enum.d.ts +5 -5
- package/lib/enums/table-view-save-mode.enum.d.ts +1 -1
- package/lib/interfaces/columns-metadata.interface.d.ts +28 -0
- package/lib/interfaces/excel-export-request.interface.d.ts +11 -0
- package/lib/interfaces/predefined-filter.interface.d.ts +1 -1
- package/lib/interfaces/table-configuration.interface.d.ts +12 -0
- package/lib/interfaces/table-options.interface.d.ts +61 -0
- package/lib/interfaces/table-paged-response.interface.d.ts +10 -0
- package/lib/interfaces/table-query-request.interface.d.ts +15 -0
- package/lib/interfaces/table-view-data.interface.d.ts +14 -0
- package/lib/interfaces/table-view.interface.d.ts +9 -0
- package/lib/utils/data-align-horizontal-as-text.d.ts +9 -0
- package/lib/utils/data-align-vertical-as-text.d.ts +9 -0
- package/lib/utils/data-type-as-text.d.ts +9 -0
- package/lib/utils/frozen-column-align-as-text.d.ts +9 -0
- package/lib/utils/highlight-text.d.ts +12 -19
- package/package.json +1 -1
- package/public-api.d.ts +7 -4
|
@@ -139,16 +139,6 @@ export declare class ECSPrimengTable implements OnInit, AfterViewInit {
|
|
|
139
139
|
* @param {IPrimengPredefinedFilter[]} selectedValues - An array of selected predefined filter values.
|
|
140
140
|
*/
|
|
141
141
|
onPredefinedFilterChange(filterName: string, selectedValues: IPredefinedFilter[]): void;
|
|
142
|
-
/**
|
|
143
|
-
* Retrieves the number of values selected for a predefined filter.
|
|
144
|
-
*
|
|
145
|
-
* This function checks the collection of selected values for a specified column key name and returns a string
|
|
146
|
-
* indicating the number of selected items along with a predefined text.
|
|
147
|
-
*
|
|
148
|
-
* @param {string} columnKeyName - The key name of the column for which to retrieve the number of selected values.
|
|
149
|
-
* @returns {string} A string indicating the number of selected values for the specified column.
|
|
150
|
-
*/
|
|
151
|
-
predefinedFiltersSelectedValuesText(columnKeyName: string): string;
|
|
152
142
|
/**
|
|
153
143
|
* Checks if the provided column metadata matches a specific style of the predefined filters
|
|
154
144
|
* that need to be applied to an item on a row.
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { DataAlignHorizontal, DataAlignVertical, DataType } from '../../enums';
|
|
2
2
|
import { DatePipe } from '@angular/common';
|
|
3
3
|
import { IColumnMetadata, IPredefinedFilter } from '../../interfaces';
|
|
4
|
-
import { SafeHtml } from '@angular/platform-browser';
|
|
4
|
+
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class TableCell {
|
|
7
7
|
private datePipe;
|
|
8
|
-
|
|
8
|
+
private sanitizer;
|
|
9
|
+
constructor(datePipe: DatePipe, sanitizer: DomSanitizer);
|
|
9
10
|
col: any;
|
|
10
11
|
rowData: any;
|
|
11
12
|
globalSearchText: string | null;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Defines how content that overflows a table cell is displayed.
|
|
3
3
|
*
|
|
4
4
|
* @remarks
|
|
5
|
-
*
|
|
5
|
+
* This enumeration specifies the visual behavior of cell content when it exceeds the cell’s width.
|
|
6
6
|
*/
|
|
7
7
|
export declare enum CellOverflowBehaviour {
|
|
8
|
-
/**
|
|
8
|
+
/** The overflowing content is clipped and not visible. */
|
|
9
9
|
Hidden = 0,
|
|
10
|
-
/**
|
|
11
|
-
Wrap = 1
|
|
12
|
-
/** Content is truncated and an ellipsis (...) is shown at the end. */
|
|
13
|
-
Ellipsis = 2
|
|
10
|
+
/** The content wraps onto multiple lines to fit within the cell. */
|
|
11
|
+
Wrap = 1
|
|
14
12
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Defines the horizontal alignment of content within a table cell.
|
|
3
3
|
*
|
|
4
4
|
* @remarks
|
|
5
|
-
*
|
|
5
|
+
* Specifies how the content inside a cell is positioned horizontally relative to the cell's width.
|
|
6
6
|
*/
|
|
7
7
|
export declare enum DataAlignHorizontal {
|
|
8
|
-
/**
|
|
8
|
+
/** Content is aligned to the left side of the cell. */
|
|
9
9
|
Left = 0,
|
|
10
|
-
/**
|
|
10
|
+
/** Content is aligned to the center of the cell. */
|
|
11
11
|
Center = 1,
|
|
12
|
-
/**
|
|
12
|
+
/** Content is aligned to the right side of the cell. */
|
|
13
13
|
Right = 2
|
|
14
14
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* sorting) are persisted.
|
|
7
7
|
*/
|
|
8
8
|
export declare enum TableViewSaveMode {
|
|
9
|
-
/**
|
|
9
|
+
/** Views are disabled. */
|
|
10
10
|
None = 0,
|
|
11
11
|
/** Save the table view state in the browser's sessionStorage (cleared on tab close). */
|
|
12
12
|
SessionStorage = 1,
|
|
@@ -1,25 +1,53 @@
|
|
|
1
1
|
import { CellOverflowBehaviour, DataAlignHorizontal, DataAlignVertical, DataType, FrozenColumnAlign } from "../enums";
|
|
2
|
+
/**
|
|
3
|
+
* Represents the metadata for a column in a table.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Provides configuration for column behavior, appearance, and user interactions.
|
|
7
|
+
*/
|
|
2
8
|
export interface IColumnMetadata {
|
|
9
|
+
/** The key or identifier for the column's data field. */
|
|
3
10
|
field: string;
|
|
11
|
+
/** The display name of the column header. */
|
|
4
12
|
header: string;
|
|
13
|
+
/** The type of data contained in the column. */
|
|
5
14
|
dataType: DataType;
|
|
15
|
+
/** The horizontal alignment of the column content. */
|
|
6
16
|
dataAlignHorizontal: DataAlignHorizontal;
|
|
17
|
+
/** Indicates whether the horizontal alignment can be modified by the user. */
|
|
7
18
|
dataAlignHorizontalAllowUserEdit: boolean;
|
|
19
|
+
/** The vertical alignment of the column content. */
|
|
8
20
|
dataAlignVertical: DataAlignVertical;
|
|
21
|
+
/** Indicates whether the vertical alignment can be modified by the user. */
|
|
9
22
|
dataAlignVerticalAllowUserEdit: boolean;
|
|
23
|
+
/** Determines if the column can be hidden. */
|
|
10
24
|
canBeHidden: boolean;
|
|
25
|
+
/** Determines if the column should initially be hidden. */
|
|
11
26
|
startHidden: boolean;
|
|
27
|
+
/** Determines if the column can be resized by the user. */
|
|
12
28
|
canBeResized: boolean;
|
|
29
|
+
/** Determines if the column can be reordered by the user. */
|
|
13
30
|
canBeReordered: boolean;
|
|
31
|
+
/** Determines if the column can be sorted. */
|
|
14
32
|
canBeSorted: boolean;
|
|
33
|
+
/** Determines if the column can be filtered. */
|
|
15
34
|
canBeFiltered: boolean;
|
|
35
|
+
/** Name of predefined filter values, if any. */
|
|
16
36
|
filterPredefinedValuesName: string;
|
|
37
|
+
/** Determines if the column can be included in global filtering. */
|
|
17
38
|
canBeGlobalFiltered: boolean;
|
|
39
|
+
/** Description or tooltip text for the column. */
|
|
18
40
|
columnDescription: string;
|
|
41
|
+
/** Determines if a tooltip should be shown for the column data. */
|
|
19
42
|
dataTooltipShow: boolean;
|
|
43
|
+
/** Custom source for the tooltip content, if applicable. */
|
|
20
44
|
dataTooltipCustomColumnSource: string;
|
|
45
|
+
/** Alignment for frozen columns (left or right). */
|
|
21
46
|
frozenColumnAlign: FrozenColumnAlign;
|
|
47
|
+
/** Specifies how overflowing content is handled within the cell. */
|
|
22
48
|
cellOverflowBehaviour: CellOverflowBehaviour;
|
|
49
|
+
/** Indicates whether the cell overflow behavior can be modified by the user. */
|
|
23
50
|
cellOverflowBehaviourAllowUserEdit: boolean;
|
|
51
|
+
/** Initial width of the column in pixels. */
|
|
24
52
|
initialWidth: number;
|
|
25
53
|
}
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import { ITableQueryRequest } from "./table-query-request.interface";
|
|
2
|
+
/**
|
|
3
|
+
* Represents the request parameters for exporting table data to Excel.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Extends `ITableQueryRequest` to include Excel-specific options such as filename,
|
|
7
|
+
* column selection, and whether to apply current filters and sorts.
|
|
8
|
+
*/
|
|
2
9
|
export interface IExcelExportRequest extends ITableQueryRequest {
|
|
10
|
+
/** The desired name of the exported Excel file. */
|
|
3
11
|
filename: string;
|
|
12
|
+
/** Determines whether all columns should be included in the export. */
|
|
4
13
|
allColumns: boolean;
|
|
14
|
+
/** Determines whether the current table filters should be applied in the export. */
|
|
5
15
|
applyFilters: boolean;
|
|
16
|
+
/** Determines whether the current table sorting should be applied in the export. */
|
|
6
17
|
applySorts: boolean;
|
|
7
18
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Represents a predefined filter value for a column in **ECS PrimeNG
|
|
2
|
+
* Represents a predefined filter value for a column in **ECS PrimeNG table**.
|
|
3
3
|
*
|
|
4
4
|
* Allows displaying a value as text, tag, icon or image (from URL or blob) with optional styles and colors.
|
|
5
5
|
*/
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import { IColumnMetadata } from "../interfaces";
|
|
2
|
+
/**
|
|
3
|
+
* Represents the configuration settings for a table.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Contains column definitions, pagination options, date formatting, and other table-related settings.
|
|
7
|
+
*/
|
|
2
8
|
export interface ITableConfiguration {
|
|
9
|
+
/** Array of metadata objects defining each column in the table. */
|
|
3
10
|
columnsInfo: IColumnMetadata[];
|
|
11
|
+
/** Allowed options for the number of items displayed per page. */
|
|
4
12
|
allowedItemsPerPage: number[];
|
|
13
|
+
/** The format used for displaying dates in the table. */
|
|
5
14
|
dateFormat: string;
|
|
15
|
+
/** The timezone applied when formatting date values. */
|
|
6
16
|
dateTimezone: string;
|
|
17
|
+
/** The culture/locale used for date and number formatting. */
|
|
7
18
|
dateCulture: string;
|
|
19
|
+
/** Maximum number of table views that can be saved or tracked. */
|
|
8
20
|
maxViews: number;
|
|
9
21
|
}
|
|
@@ -44,6 +44,66 @@ export interface ITableOptions {
|
|
|
44
44
|
* @default []
|
|
45
45
|
*/
|
|
46
46
|
data?: any[];
|
|
47
|
+
/**
|
|
48
|
+
* Configuration options for the table description section.
|
|
49
|
+
*/
|
|
50
|
+
description?: {
|
|
51
|
+
/**
|
|
52
|
+
* Icon displayed alongside the table description.
|
|
53
|
+
* You can use any PrimeIcons class or icons from third-party libraries
|
|
54
|
+
* such as Material Icons or Font Awesome.
|
|
55
|
+
*
|
|
56
|
+
* @default "pi pi-info-circle"
|
|
57
|
+
*/
|
|
58
|
+
icon?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Determines how the description text is displayed.
|
|
61
|
+
* - `true`, the `text` content is shown as a tooltip when hovering
|
|
62
|
+
* over the description icon.
|
|
63
|
+
* - `false`, the `text` is displayed inline to the right of the icon.
|
|
64
|
+
*
|
|
65
|
+
* @default true
|
|
66
|
+
*/
|
|
67
|
+
tooltip?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* The description content to display.
|
|
70
|
+
* If left undefined or string empty, the table description will not be rendered.
|
|
71
|
+
* Supports basic HTML for rich text formatting.
|
|
72
|
+
*
|
|
73
|
+
* @default undefined
|
|
74
|
+
*/
|
|
75
|
+
text?: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Configuration options for the table legend.
|
|
79
|
+
*/
|
|
80
|
+
legend?: {
|
|
81
|
+
/**
|
|
82
|
+
* The content to be displayed in the popover of the legend. Can be HTML rich.
|
|
83
|
+
*
|
|
84
|
+
* @default undefined
|
|
85
|
+
*/
|
|
86
|
+
content?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Configuration options for the button that displays the popover of the table legend.
|
|
89
|
+
*/
|
|
90
|
+
button?: {
|
|
91
|
+
/**
|
|
92
|
+
* Icon displayed alongside the button of the table legend.
|
|
93
|
+
* You can use any PrimeIcons class or icons from third-party libraries
|
|
94
|
+
* such as Material Icons or Font Awesome.
|
|
95
|
+
*
|
|
96
|
+
* @default "pi pi-bars"
|
|
97
|
+
*/
|
|
98
|
+
icon?: string;
|
|
99
|
+
/**
|
|
100
|
+
* The text shown in the legend button.
|
|
101
|
+
*
|
|
102
|
+
* @default "Legend"
|
|
103
|
+
*/
|
|
104
|
+
text?: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
47
107
|
/**
|
|
48
108
|
* Configurations related to options that are at the header of the table.
|
|
49
109
|
*/
|
|
@@ -430,4 +490,5 @@ export interface ITableOptions {
|
|
|
430
490
|
*/
|
|
431
491
|
copyToClipboardTime?: number;
|
|
432
492
|
}
|
|
493
|
+
/** Default configuration options for ECS Primeng table */
|
|
433
494
|
export declare const DEFAULT_TABLE_OPTIONS: ITableOptions;
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a paged response from a table query.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* Provides information about the current page, total records, and the data for the page.
|
|
6
|
+
*/
|
|
1
7
|
export interface ITablePagedResponse {
|
|
8
|
+
/** The current page number. */
|
|
2
9
|
page: number;
|
|
10
|
+
/** Total number of records after applying any filters. */
|
|
3
11
|
totalRecords: number;
|
|
12
|
+
/** Total number of records without applying any filters. */
|
|
4
13
|
totalRecordsNotFiltered: number;
|
|
14
|
+
/** The data items for the current page. */
|
|
5
15
|
data: any;
|
|
6
16
|
}
|
|
@@ -1,11 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a request for querying table data with pagination, sorting, and filtering.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* Includes information about page, page size, sorting, filters, and date formatting options.
|
|
6
|
+
*/
|
|
1
7
|
export interface ITableQueryRequest {
|
|
8
|
+
/** The current page number. */
|
|
2
9
|
page: number;
|
|
10
|
+
/** The number of items per page. */
|
|
3
11
|
pageSize: number;
|
|
12
|
+
/** Optional sorting configuration. */
|
|
4
13
|
sort?: any;
|
|
14
|
+
/** Filter criteria for the query. */
|
|
5
15
|
filter: any;
|
|
16
|
+
/** Optional global filter applied across all columns. */
|
|
6
17
|
globalFilter?: string | null;
|
|
18
|
+
/** Optional array of column names to include in the query. */
|
|
7
19
|
columns?: string[];
|
|
20
|
+
/** The date format used for query parameters. */
|
|
8
21
|
dateFormat: string;
|
|
22
|
+
/** The timezone used for formatting date values. */
|
|
9
23
|
dateTimezone: string;
|
|
24
|
+
/** The culture/locale used for formatting dates and numbers. */
|
|
10
25
|
dateCulture: string;
|
|
11
26
|
}
|
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
import { SortMeta } from "primeng/api";
|
|
2
2
|
import { IColumnMetadata } from "./columns-metadata.interface";
|
|
3
|
+
/**
|
|
4
|
+
* Represents the current state and configuration of a table view.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Includes information about displayed columns, widths, sorting, filtering, and pagination.
|
|
8
|
+
*/
|
|
3
9
|
export interface ITableViewData {
|
|
10
|
+
/** Array of columns currently visible in the table. */
|
|
4
11
|
columnsShown: IColumnMetadata[];
|
|
12
|
+
/** The total width of the table in pixels. */
|
|
5
13
|
tableWidth: any;
|
|
14
|
+
/** Widths of individual columns as a formatted string (in pixels). */
|
|
6
15
|
columnsWidth: string;
|
|
16
|
+
/** Sorting metadata for multiple columns, if applicable. */
|
|
7
17
|
multiSortMeta: SortMeta[] | null | undefined;
|
|
18
|
+
/** Current filter settings applied to the table. */
|
|
8
19
|
filters: any;
|
|
20
|
+
/** Text used for global search across all columns, if any. */
|
|
9
21
|
globalSearchText: string | null;
|
|
22
|
+
/** The current page number. */
|
|
10
23
|
currentPage: number;
|
|
24
|
+
/** The number of rows displayed per page. */
|
|
11
25
|
currentRowsPerPage: number;
|
|
12
26
|
}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { ITableViewData } from "./table-view-data.interface";
|
|
2
|
+
/**
|
|
3
|
+
* Represents a saved or active view of a table.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Contains information about whether the view is currently active, its alias, and the view data.
|
|
7
|
+
*/
|
|
2
8
|
export interface ITableView {
|
|
9
|
+
/** Indicates if this view is the last active one. */
|
|
3
10
|
lastActive: boolean;
|
|
11
|
+
/** Alias or name of the view. */
|
|
4
12
|
viewAlias: string;
|
|
13
|
+
/** The detailed data and configuration for this view. */
|
|
5
14
|
viewData: ITableViewData;
|
|
6
15
|
}
|
|
@@ -1,2 +1,11 @@
|
|
|
1
1
|
import { DataAlignHorizontal } from "../enums";
|
|
2
|
+
/**
|
|
3
|
+
* Converts a `DataAlignHorizontal` enum value to its corresponding CSS text alignment string.
|
|
4
|
+
*
|
|
5
|
+
* @param dataAlignHorizontal - The horizontal alignment enum value.
|
|
6
|
+
* @returns The CSS text alignment string ('left', 'center', or 'right').
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* If an unknown value is provided, the function defaults to 'center'.
|
|
10
|
+
*/
|
|
2
11
|
export declare function dataAlignHorizontalAsText(dataAlignHorizontal: DataAlignHorizontal): string;
|
|
@@ -1,2 +1,11 @@
|
|
|
1
1
|
import { DataAlignVertical } from "../enums";
|
|
2
|
+
/**
|
|
3
|
+
* Converts a `DataAlignVertical` enum value to its corresponding CSS vertical alignment string.
|
|
4
|
+
*
|
|
5
|
+
* @param dataAlignVertical - The vertical alignment enum value.
|
|
6
|
+
* @returns The CSS vertical alignment string ('top', 'middle', or 'bottom').
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* If an unknown value is provided, the function defaults to 'middle'.
|
|
10
|
+
*/
|
|
2
11
|
export declare function dataAlignVerticalAsText(dataAlignVertical: DataAlignVertical): string;
|
|
@@ -1,2 +1,11 @@
|
|
|
1
1
|
import { DataType } from "../enums";
|
|
2
|
+
/**
|
|
3
|
+
* Converts a `DataType` enum value to its corresponding string representation.
|
|
4
|
+
*
|
|
5
|
+
* @param dataType - The data type enum value.
|
|
6
|
+
* @returns The string representation of the data type ('text', 'numeric', 'boolean', or 'date').
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* If an unknown value is provided, the function defaults to 'text'.
|
|
10
|
+
*/
|
|
2
11
|
export declare function dataTypeAsText(dataType: DataType): string;
|
|
@@ -1,2 +1,11 @@
|
|
|
1
1
|
import { FrozenColumnAlign } from "../enums";
|
|
2
|
+
/**
|
|
3
|
+
* Converts a `FrozenColumnAlign` enum value to its corresponding CSS alignment string.
|
|
4
|
+
*
|
|
5
|
+
* @param frozenColumnAlign - The frozen column alignment enum value.
|
|
6
|
+
* @returns The CSS alignment string ('left' or 'right').
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* If an unknown value is provided, the function defaults to 'left'.
|
|
10
|
+
*/
|
|
2
11
|
export declare function frozenColumnAlignAsText(frozenColumnAlign: FrozenColumnAlign): string;
|
|
@@ -1,24 +1,17 @@
|
|
|
1
|
-
import { SafeHtml } from
|
|
1
|
+
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
2
2
|
import { IColumnMetadata } from "../interfaces";
|
|
3
3
|
/**
|
|
4
|
-
* Generates SafeHtml with highlighted text based on global search
|
|
4
|
+
* Generates sanitized HTML (`SafeHtml`) with highlighted text based on a global search term.
|
|
5
5
|
*
|
|
6
|
-
* @
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* This utility safely creates HTML content where occurrences of the provided global search text
|
|
8
|
+
* within the cell value are wrapped in a `<span class="highlighted-text">` tag for visual emphasis.
|
|
9
|
+
* If the cell does not match the search text or is of type `Boolean`, the original value is returned as safe HTML.
|
|
10
10
|
*
|
|
11
|
-
* @
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* const cellValue: string = 'Example text';
|
|
17
|
-
*
|
|
18
|
-
* // Global search text
|
|
19
|
-
* const globalSearchText: string = 'text';
|
|
20
|
-
*
|
|
21
|
-
* // Use highlightText to get SafeHtml with highlighted text
|
|
22
|
-
* const highlightedHtml: SafeHtml = highlightText(cellValue, colMetadata, globalSearchText);
|
|
11
|
+
* @param {any} cellValue - The cell's value that may contain the text to highlight.
|
|
12
|
+
* @param {IColumnMetadata} colMetadata - Metadata configuration of the column that defines its data type and filtering behavior.
|
|
13
|
+
* @param {string | null} globalSearchText - The search text to highlight if found within the cell's content.
|
|
14
|
+
* @param {DomSanitizer} sanitizer - Angular's sanitizer used to safely produce trusted HTML content.
|
|
15
|
+
* @returns {SafeHtml} A `SafeHtml` instance containing highlighted HTML when a match is found, or the original sanitized text otherwise.
|
|
23
16
|
*/
|
|
24
|
-
export declare function highlightText(cellValue: any, colMetadata: IColumnMetadata, globalSearchText: string | null): SafeHtml;
|
|
17
|
+
export declare function highlightText(cellValue: any, colMetadata: IColumnMetadata, globalSearchText: string | null, sanitizer: DomSanitizer): SafeHtml;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eternalcodestudio/primeng-table",
|
|
3
|
-
"version": "19.0.
|
|
3
|
+
"version": "19.0.3",
|
|
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",
|
package/public-api.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
export * from './lib/components/ecs-primeng-table/ecs-primeng-table';
|
|
2
|
-
export * from './lib/components/ecs-primeng-table/ecs-primeng-table.service';
|
|
3
1
|
export * from './lib/enums';
|
|
4
|
-
export * from './lib/interfaces';
|
|
5
|
-
export * from './lib/
|
|
2
|
+
export * from './lib/interfaces/columns-metadata.interface';
|
|
3
|
+
export * from './lib/interfaces/predefined-filter.interface';
|
|
4
|
+
export * from './lib/interfaces/table-button.interface';
|
|
5
|
+
export * from './lib/interfaces/table-options.interface';
|
|
6
6
|
export * from "./lib/utils/create-table-options";
|
|
7
|
+
export * from './lib/services';
|
|
8
|
+
export * from './lib/components/ecs-primeng-table/ecs-primeng-table';
|
|
9
|
+
export * from './lib/components/ecs-primeng-table/ecs-primeng-table.service';
|