ud-components 0.5.36 → 0.5.38
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.
|
@@ -80,6 +80,10 @@ export interface TableDisplayColumn {
|
|
|
80
80
|
* When true, the edit dropdown allows selecting multiple values.
|
|
81
81
|
*/
|
|
82
82
|
allowMultiSelectOnEdit?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* When true, the filter dropdown allows selecting multiple values.
|
|
85
|
+
*/
|
|
86
|
+
allowMultiSelectOnFilter?: boolean;
|
|
83
87
|
/**
|
|
84
88
|
* For PILL type columns. Receives the row and returns the KpiPillType to apply.
|
|
85
89
|
*/
|
|
@@ -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';
|
|
@@ -163,6 +164,11 @@ export declare class CustomTableComponent implements OnInit, OnChanges {
|
|
|
163
164
|
value: NumberOperator;
|
|
164
165
|
}[];
|
|
165
166
|
numberOperationOptions: UdSelectOption[];
|
|
167
|
+
/**
|
|
168
|
+
* Match-mode options for multi-select (filterOptions + allowMultiSelectOnFilter)
|
|
169
|
+
* columns. Lets the user choose between "any of", "all of" and "exact" matching.
|
|
170
|
+
*/
|
|
171
|
+
matchModeOptions: ButtonToggleOption[];
|
|
166
172
|
paginatorRef: MatPaginator;
|
|
167
173
|
set paginator(val: MatPaginator);
|
|
168
174
|
set sort(val: MatSort);
|
|
@@ -171,6 +177,22 @@ export declare class CustomTableComponent implements OnInit, OnChanges {
|
|
|
171
177
|
ngOnInit(): void;
|
|
172
178
|
applyFilterToAllColumns(event: Event): void;
|
|
173
179
|
applyFilterByColumn(): void;
|
|
180
|
+
/**
|
|
181
|
+
* Normalizes a filterOptions control value into the selected values + match mode.
|
|
182
|
+
* - Multi-select (allowMultiSelectOnFilter): value is `{ values, mode }`.
|
|
183
|
+
* - Single-select: value is a scalar (mode defaults to ANY).
|
|
184
|
+
*/
|
|
185
|
+
private normalizeFilterOptionsValue;
|
|
186
|
+
/**
|
|
187
|
+
* Client-side predicate for filterOptions columns. Handles both scalar data
|
|
188
|
+
* (e.g. a single role string) and array data (e.g. `roles: string[]`) with
|
|
189
|
+
* ANY / ALL / EXACT match modes.
|
|
190
|
+
*/
|
|
191
|
+
private matchesFilterOptions;
|
|
192
|
+
/** FormGroup backing a multi-select filterOptions column: selected values + match mode. */
|
|
193
|
+
private buildMultiSelectFilterGroup;
|
|
194
|
+
/** Whether a (possibly multi-select) filter control currently holds a value. */
|
|
195
|
+
private isEmptyFilterValue;
|
|
174
196
|
private buildFilterCriteria;
|
|
175
197
|
filterSelectionChanged(selectedFilters: string[]): void;
|
|
176
198
|
onActionClicked(action: TableAction): void;
|