ud-components 0.5.28 → 0.5.30
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,10 +1,10 @@
|
|
|
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';
|
|
5
5
|
import { TranslateWrapperService } from '../../services/translate-wrapper/translate-wrapper.service';
|
|
6
6
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
7
|
-
import { ElementRef, EventEmitter, OnInit, TemplateRef } from '@angular/core';
|
|
7
|
+
import { ElementRef, EventEmitter, OnChanges, OnInit, SimpleChanges, TemplateRef } from '@angular/core';
|
|
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';
|
|
@@ -12,7 +12,7 @@ import { MatSort } from '@angular/material/sort';
|
|
|
12
12
|
import { MatTableDataSource } from '@angular/material/table';
|
|
13
13
|
import { Observable } from 'rxjs';
|
|
14
14
|
import * as i0 from "@angular/core";
|
|
15
|
-
export declare class CustomTableComponent implements OnInit {
|
|
15
|
+
export declare class CustomTableComponent implements OnInit, OnChanges {
|
|
16
16
|
private translateService;
|
|
17
17
|
private readonly destroyRef;
|
|
18
18
|
/**
|
|
@@ -184,6 +184,7 @@ export declare class CustomTableComponent implements OnInit {
|
|
|
184
184
|
checkboxLabel(row?: any): string;
|
|
185
185
|
selectRow(row?: any): void;
|
|
186
186
|
setInitSort(): void;
|
|
187
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
187
188
|
setInitFilter(): void;
|
|
188
189
|
private restoreTableQuery;
|
|
189
190
|
private restoreFiltersFromCriteria;
|
|
@@ -205,6 +206,7 @@ export declare class CustomTableComponent implements OnInit {
|
|
|
205
206
|
startEditing(row: any, rowIndex: number, column: TableDisplayColumn): void;
|
|
206
207
|
confirmEdit(row: any, column: TableDisplayColumn): void;
|
|
207
208
|
cancelEdit(): void;
|
|
209
|
+
resolveDisabled(disabled: TableDisabledFn | undefined, selection: SelectionModel<any>): boolean;
|
|
208
210
|
protected readonly capitalize: (word: string) => string;
|
|
209
211
|
protected readonly TableDisplayColumnType: typeof TableDisplayColumnType;
|
|
210
212
|
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?:
|
|
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?:
|
|
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.
|
|
3
|
+
"version": "0.5.30",
|
|
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
|
+
}
|