ud-components 0.5.28 → 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.
@@ -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[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ud-components",
3
- "version": "0.5.28",
3
+ "version": "0.5.29",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": ">=19",
6
6
  "@angular/common": ">=19",
@@ -21,6 +21,30 @@
21
21
  ".": {
22
22
  "types": "./index.d.ts",
23
23
  "default": "./fesm2022/ud-components.mjs"
24
+ },
25
+ "./enums/role.enum": {
26
+ "types": "./enums/role.enum.d.ts",
27
+ "default": "./enums/role.enum.js"
28
+ },
29
+ "./lib/kpi/kpi.enum": {
30
+ "types": "./lib/kpi/kpi.enum.d.ts",
31
+ "default": "./lib/kpi/kpi.enum.js"
32
+ },
33
+ "./lib/edit-view/edit-view-section.directive": {
34
+ "types": "./lib/edit-view/edit-view-section.directive.d.ts",
35
+ "default": "./lib/edit-view/edit-view-section.directive.js"
36
+ },
37
+ "./interfaces/page-request.interface": {
38
+ "types": "./interfaces/page-request.interface.d.ts",
39
+ "default": "./interfaces/page-request.interface.js"
40
+ },
41
+ "./interfaces/table.interface": {
42
+ "types": "./interfaces/table.interface.d.ts",
43
+ "default": "./interfaces/table.interface.js"
44
+ },
45
+ "./interfaces/table-display-column.interface": {
46
+ "types": "./interfaces/table-display-column.interface.d.ts",
47
+ "default": "./interfaces/table-display-column.interface.js"
24
48
  }
25
49
  }
26
- }
50
+ }