ud-components 0.5.37 → 0.5.39
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.
|
@@ -8,6 +8,7 @@ import { ElementRef, EventEmitter, OnChanges, OnInit, SimpleChanges, TemplateRef
|
|
|
8
8
|
import { FormControl, FormGroup } from '@angular/forms';
|
|
9
9
|
import { MatPaginator, PageEvent } from '@angular/material/paginator';
|
|
10
10
|
import { UdSelectOption } from '../form-fields/multi-select/multi-select.component';
|
|
11
|
+
import { ButtonToggleOption } from '../button-toggle/button-toggle.component';
|
|
11
12
|
import { MatSort } from '@angular/material/sort';
|
|
12
13
|
import { MatTableDataSource } from '@angular/material/table';
|
|
13
14
|
import { Observable } from 'rxjs';
|
|
@@ -67,7 +68,6 @@ export declare class CustomTableComponent implements OnInit, OnChanges {
|
|
|
67
68
|
type: string;
|
|
68
69
|
property: string;
|
|
69
70
|
};
|
|
70
|
-
emptyMessage?: Observable<string>;
|
|
71
71
|
/**
|
|
72
72
|
* Table loading status
|
|
73
73
|
*/
|
|
@@ -163,6 +163,11 @@ export declare class CustomTableComponent implements OnInit, OnChanges {
|
|
|
163
163
|
value: NumberOperator;
|
|
164
164
|
}[];
|
|
165
165
|
numberOperationOptions: UdSelectOption[];
|
|
166
|
+
/**
|
|
167
|
+
* Match-mode options for multi-select (filterOptions + allowMultiSelectOnFilter)
|
|
168
|
+
* columns. Lets the user choose between "any of", "all of" and "exact" matching.
|
|
169
|
+
*/
|
|
170
|
+
matchModeOptions: ButtonToggleOption[];
|
|
166
171
|
paginatorRef: MatPaginator;
|
|
167
172
|
set paginator(val: MatPaginator);
|
|
168
173
|
set sort(val: MatSort);
|
|
@@ -171,6 +176,22 @@ export declare class CustomTableComponent implements OnInit, OnChanges {
|
|
|
171
176
|
ngOnInit(): void;
|
|
172
177
|
applyFilterToAllColumns(event: Event): void;
|
|
173
178
|
applyFilterByColumn(): void;
|
|
179
|
+
/**
|
|
180
|
+
* Normalizes a filterOptions control value into the selected values + match mode.
|
|
181
|
+
* - Multi-select (allowMultiSelectOnFilter): value is `{ values, mode }`.
|
|
182
|
+
* - Single-select: value is a scalar (mode defaults to ANY).
|
|
183
|
+
*/
|
|
184
|
+
private normalizeFilterOptionsValue;
|
|
185
|
+
/**
|
|
186
|
+
* Client-side predicate for filterOptions columns. Handles both scalar data
|
|
187
|
+
* (e.g. a single role string) and array data (e.g. `roles: string[]`) with
|
|
188
|
+
* ANY / ALL / EXACT match modes.
|
|
189
|
+
*/
|
|
190
|
+
private matchesFilterOptions;
|
|
191
|
+
/** FormGroup backing a multi-select filterOptions column: selected values + match mode. */
|
|
192
|
+
private buildMultiSelectFilterGroup;
|
|
193
|
+
/** Whether a (possibly multi-select) filter control currently holds a value. */
|
|
194
|
+
private isEmptyFilterValue;
|
|
174
195
|
private buildFilterCriteria;
|
|
175
196
|
filterSelectionChanged(selectedFilters: string[]): void;
|
|
176
197
|
onActionClicked(action: TableAction): void;
|
|
@@ -190,7 +211,6 @@ export declare class CustomTableComponent implements OnInit, OnChanges {
|
|
|
190
211
|
private restoreFiltersFromCriteria;
|
|
191
212
|
private setTableQuery;
|
|
192
213
|
buildColumnFilterControls(): void;
|
|
193
|
-
setEmptyMessage(): void;
|
|
194
214
|
formatPhoneNumber(value: string): string;
|
|
195
215
|
getRowBackgroundColor(index: number): "bg-accent" | "bg-white";
|
|
196
216
|
getHyperlinkRoute(row: any, column: TableDisplayColumn): string;
|
|
@@ -215,5 +235,5 @@ export declare class CustomTableComponent implements OnInit, OnChanges {
|
|
|
215
235
|
protected readonly TableDisplayColumnType: typeof TableDisplayColumnType;
|
|
216
236
|
protected readonly NumberOperator: typeof NumberOperator;
|
|
217
237
|
static ɵfac: i0.ɵɵFactoryDeclaration<CustomTableComponent, never>;
|
|
218
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CustomTableComponent, "ud-table", never, { "id": { "alias": "id"; "required": false; }; "title": { "alias": "title"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "haveCheckbox": { "alias": "haveCheckbox"; "required": false; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "paginationSizeOptions": { "alias": "paginationSizeOptions"; "required": false; }; "initialPageSize": { "alias": "initialPageSize"; "required": false; }; "specificSelectRow": { "alias": "specificSelectRow"; "required": false; }; "hasFilter": { "alias": "hasFilter"; "required": false; }; "expandableRows": { "alias": "expandableRows"; "required": false; }; "expandedItem": { "alias": "expandedItem"; "required": false; }; "
|
|
238
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CustomTableComponent, "ud-table", never, { "id": { "alias": "id"; "required": false; }; "title": { "alias": "title"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "haveCheckbox": { "alias": "haveCheckbox"; "required": false; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "paginationSizeOptions": { "alias": "paginationSizeOptions"; "required": false; }; "initialPageSize": { "alias": "initialPageSize"; "required": false; }; "specificSelectRow": { "alias": "specificSelectRow"; "required": false; }; "hasFilter": { "alias": "hasFilter"; "required": false; }; "expandableRows": { "alias": "expandableRows"; "required": false; }; "expandedItem": { "alias": "expandedItem"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; "separateFilters": { "alias": "separateFilters"; "required": false; }; "showPaginator": { "alias": "showPaginator"; "required": false; }; "noTableDataMessage": { "alias": "noTableDataMessage"; "required": false; }; "actionsMenuEnabled": { "alias": "actionsMenuEnabled"; "required": false; }; "menuItems": { "alias": "menuItems"; "required": false; }; "totalElements": { "alias": "totalElements"; "required": false; }; "serverSideFiltering": { "alias": "serverSideFiltering"; "required": false; }; "disableHeader": { "alias": "disableHeader"; "required": false; }; }, { "actionClicked": "actionClicked"; "clicked": "clicked"; "queryChange": "queryChange"; "cellEdited": "cellEdited"; }, ["actionsTemplate"], never, true, never>;
|
|
219
239
|
}
|