ud-components 0.5.30 → 0.5.31

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.
@@ -1,4 +1,4 @@
1
- import { TableAction, TableDisabledFn, TableMenuItem, TableQueryChange } from './custom-table.interface';
1
+ import { TableAction, TableBooleanInput, 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';
@@ -206,7 +206,7 @@ export declare class CustomTableComponent implements OnInit, OnChanges {
206
206
  startEditing(row: any, rowIndex: number, column: TableDisplayColumn): void;
207
207
  confirmEdit(row: any, column: TableDisplayColumn): void;
208
208
  cancelEdit(): void;
209
- resolveDisabled(disabled: TableDisabledFn | undefined, selection: SelectionModel<any>): boolean;
209
+ resolveBooleanInput(value: TableBooleanInput | undefined, selection: SelectionModel<any>): boolean;
210
210
  protected readonly capitalize: (word: string) => string;
211
211
  protected readonly TableDisplayColumnType: typeof TableDisplayColumnType;
212
212
  protected readonly NumberOperator: typeof NumberOperator;
@@ -3,20 +3,24 @@ import { Signal } from '@angular/core';
3
3
  import { Observable } from 'rxjs';
4
4
  import { UdButtonColor, UdButtonVariant } from '../button/button.component';
5
5
  import { FilterCriteria } from '../../interfaces/table.interface';
6
- export type TableDisabledFn = boolean | Signal<boolean> | ((selection: SelectionModel<any>) => boolean);
6
+ export type TableBooleanInput = boolean | Signal<boolean> | ((selection: SelectionModel<any>) => boolean);
7
+ /** @deprecated Use TableBooleanInput */
8
+ export type TableDisabledFn = TableBooleanInput;
7
9
  export interface TableAction {
8
10
  id: string;
9
11
  icon: string;
10
12
  label?: string | Observable<string>;
11
13
  color?: UdButtonColor;
12
14
  variant?: UdButtonVariant;
13
- disabled?: TableDisabledFn;
15
+ disabled?: TableBooleanInput;
16
+ loading?: TableBooleanInput;
14
17
  }
15
18
  export interface TableMenuItem {
16
19
  label: string;
17
20
  icon: string;
18
21
  clickFn: (selection: SelectionModel<any>) => void;
19
- disabled?: TableDisabledFn;
22
+ disabled?: TableBooleanInput;
23
+ loading?: TableBooleanInput;
20
24
  }
21
25
  export interface TableQuery {
22
26
  filters?: FilterCriteria[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ud-components",
3
- "version": "0.5.30",
3
+ "version": "0.5.31",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": ">=19",
6
6
  "@angular/common": ">=19",