ud-components 0.5.27 → 0.5.29

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.
@@ -72,6 +72,10 @@ export interface TableDisplayColumn {
72
72
  * Options for editable columns that use a dropdown (the enum values to pick from).
73
73
  */
74
74
  editOptions?: UdSelectOption[];
75
+ /**
76
+ * When provided, the column filter renders a dropdown instead of a text input.
77
+ */
78
+ filterOptions?: UdSelectOption[];
75
79
  /**
76
80
  * When true, the edit dropdown allows selecting multiple values.
77
81
  */
@@ -1,4 +1,4 @@
1
- import { TableAction, TableMenuItem, TableQueryChange } from './custom-table.interface';
1
+ import { TableAction, TableDisabledFn, TableMenuItem, TableQueryChange } from './custom-table.interface';
2
2
  import { NumberOperator } from '../../enums/custom-table.enum';
3
3
  import { TableDisplayColumnType } from '../../enums/table-display-column-type';
4
4
  import { TableDisplayColumn } from '../../interfaces/table-display-column.interface';
@@ -205,6 +205,7 @@ export declare class CustomTableComponent implements OnInit {
205
205
  startEditing(row: any, rowIndex: number, column: TableDisplayColumn): void;
206
206
  confirmEdit(row: any, column: TableDisplayColumn): void;
207
207
  cancelEdit(): void;
208
+ resolveDisabled(disabled: TableDisabledFn | undefined, selection: SelectionModel<any>): boolean;
208
209
  protected readonly capitalize: (word: string) => string;
209
210
  protected readonly TableDisplayColumnType: typeof TableDisplayColumnType;
210
211
  protected readonly NumberOperator: typeof NumberOperator;
@@ -1,20 +1,22 @@
1
1
  import { SelectionModel } from '@angular/cdk/collections';
2
+ import { Signal } from '@angular/core';
2
3
  import { Observable } from 'rxjs';
3
4
  import { UdButtonColor, UdButtonVariant } from '../button/button.component';
4
5
  import { FilterCriteria } from '../../interfaces/table.interface';
6
+ export type TableDisabledFn = boolean | Signal<boolean> | ((selection: SelectionModel<any>) => boolean);
5
7
  export interface TableAction {
6
8
  id: string;
7
9
  icon: string;
8
10
  label?: string | Observable<string>;
9
11
  color?: UdButtonColor;
10
12
  variant?: UdButtonVariant;
11
- disabled?: (selection: SelectionModel<any>) => boolean;
13
+ disabled?: TableDisabledFn;
12
14
  }
13
15
  export interface TableMenuItem {
14
16
  label: string;
15
17
  icon: string;
16
18
  clickFn: (selection: SelectionModel<any>) => void;
17
- disabled?: (selection: SelectionModel<any>) => boolean;
19
+ disabled?: TableDisabledFn;
18
20
  }
19
21
  export interface TableQuery {
20
22
  filters?: FilterCriteria[];
@@ -1,4 +1,5 @@
1
1
  import { OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
2
+ import { UdInputSize } from '../text-input/text-input.component';
2
3
  import { FormControl } from '@angular/forms';
3
4
  import * as i0 from "@angular/core";
4
5
  export interface UdSelectOption {
@@ -37,6 +38,7 @@ export declare class MultiSelectComponent implements OnInit, OnChanges, OnDestro
37
38
  * Default: "+{n} more"
38
39
  */
39
40
  moreText: string;
41
+ size: UdInputSize;
40
42
  loading: boolean;
41
43
  disabled: boolean;
42
44
  hint: string;
@@ -52,5 +54,5 @@ export declare class MultiSelectComponent implements OnInit, OnChanges, OnDestro
52
54
  getMoreText(count: number): string;
53
55
  private buildLabelMap;
54
56
  static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectComponent, never>;
55
- static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectComponent, "ud-multi-select", never, { "controlName": { "alias": "controlName"; "required": true; }; "label": { "alias": "label"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconFontSet": { "alias": "iconFontSet"; "required": false; }; "options": { "alias": "options"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "maxChipsVisible": { "alias": "maxChipsVisible"; "required": false; }; "moreText": { "alias": "moreText"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; }, {}, never, never, true, never>;
57
+ static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectComponent, "ud-multi-select", never, { "controlName": { "alias": "controlName"; "required": true; }; "label": { "alias": "label"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconFontSet": { "alias": "iconFontSet"; "required": false; }; "options": { "alias": "options"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "maxChipsVisible": { "alias": "maxChipsVisible"; "required": false; }; "moreText": { "alias": "moreText"; "required": false; }; "size": { "alias": "size"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; }, {}, never, never, true, never>;
56
58
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ud-components",
3
- "version": "0.5.27",
3
+ "version": "0.5.29",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": ">=19",
6
6
  "@angular/common": ">=19",