@den4ik92/ng2-smart-table 19.2.2 → 19.2.4
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.
- package/fesm2022/den4ik92-ng2-smart-table.mjs +37 -179
- package/fesm2022/den4ik92-ng2-smart-table.mjs.map +1 -1
- package/lib/components/table-columns-editor/table-columns-editor.component.d.ts +3 -3
- package/lib/components/tbody/cells/custom.component.d.ts +1 -1
- package/lib/components/tbody/cells/edit-delete.component.d.ts +7 -6
- package/lib/lib/interfaces/smart-table.models.d.ts +7 -4
- package/package.json +1 -1
|
@@ -4,10 +4,10 @@ import { ColumnPositionState } from '../../lib/interfaces/smart-table.models';
|
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class TableColumnsEditorComponent {
|
|
6
6
|
protected infoText: string;
|
|
7
|
-
grid: import("@angular/core").InputSignal<Grid | undefined>;
|
|
8
|
-
close: import("@angular/core").InputSignal<() => void>;
|
|
7
|
+
readonly grid: import("@angular/core").InputSignal<Grid | undefined>;
|
|
8
|
+
readonly close: import("@angular/core").InputSignal<() => void>;
|
|
9
9
|
protected currentState: ColumnPositionState[];
|
|
10
|
-
stateHasChanged: import("@angular/core").WritableSignal<boolean>;
|
|
10
|
+
readonly stateHasChanged: import("@angular/core").WritableSignal<boolean>;
|
|
11
11
|
constructor();
|
|
12
12
|
resetChanges(): void;
|
|
13
13
|
drop(event: CdkDragDrop<ColumnPositionState[]>): void;
|
|
@@ -9,7 +9,7 @@ export declare class TbodyCustomComponent {
|
|
|
9
9
|
source: DataSource;
|
|
10
10
|
readonly custom: import("@angular/core").OutputEmitterRef<any>;
|
|
11
11
|
onCustom(action: any): void;
|
|
12
|
-
customActions(): SmartTableCustomAction[] | undefined;
|
|
12
|
+
customActions(): SmartTableCustomAction<any>[] | undefined;
|
|
13
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<TbodyCustomComponent, never>;
|
|
14
14
|
static ɵcmp: i0.ɵɵComponentDeclaration<TbodyCustomComponent, "ng2-st-tbody-custom", never, { "grid": { "alias": "grid"; "required": false; }; "row": { "alias": "row"; "required": false; }; "source": { "alias": "source"; "required": false; }; }, { "custom": "custom"; }, never, never, true, never>;
|
|
15
15
|
}
|
|
@@ -11,12 +11,13 @@ export declare class TbodyEditDeleteComponent {
|
|
|
11
11
|
readonly deleteConfirm: import("@angular/core").InputSignal<EventEmitter<any> | OutputEmitterRef<any>>;
|
|
12
12
|
readonly edit: OutputEmitterRef<any>;
|
|
13
13
|
readonly delete: OutputEmitterRef<any>;
|
|
14
|
-
isActionEdit: boolean
|
|
15
|
-
isActionDelete: boolean
|
|
16
|
-
isExternalMode: boolean
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
readonly isActionEdit: import("@angular/core").Signal<boolean>;
|
|
15
|
+
readonly isActionDelete: import("@angular/core").Signal<boolean>;
|
|
16
|
+
readonly isExternalMode: import("@angular/core").Signal<boolean>;
|
|
17
|
+
readonly canDeleteFunction: import("@angular/core").Signal<(data: any) => boolean>;
|
|
18
|
+
readonly canEditFunction: import("@angular/core").Signal<(data: any) => boolean>;
|
|
19
|
+
readonly editRowButtonContent: import("@angular/core").Signal<string>;
|
|
20
|
+
readonly deleteRowButtonContent: import("@angular/core").Signal<string>;
|
|
20
21
|
onEdit(event: any): void;
|
|
21
22
|
onDelete(event: any): void;
|
|
22
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<TbodyEditDeleteComponent, never>;
|
|
@@ -23,7 +23,7 @@ export interface SmartTableSettings<T extends Record<string, any> = any> {
|
|
|
23
23
|
columnSort?: boolean;
|
|
24
24
|
hideHeader?: boolean;
|
|
25
25
|
hideSubHeader?: boolean;
|
|
26
|
-
actions?: SmartTableAction | false;
|
|
26
|
+
actions?: SmartTableAction<T> | false;
|
|
27
27
|
actionsPosition?: ActionPosition;
|
|
28
28
|
filter?: {
|
|
29
29
|
inputClass: string;
|
|
@@ -34,6 +34,7 @@ export interface SmartTableSettings<T extends Record<string, any> = any> {
|
|
|
34
34
|
saveButtonContent?: string;
|
|
35
35
|
cancelButtonContent?: string;
|
|
36
36
|
confirmSave?: boolean;
|
|
37
|
+
hasPermissionFunction?: (row: T) => boolean;
|
|
37
38
|
} | false;
|
|
38
39
|
add?: {
|
|
39
40
|
inputClass?: string;
|
|
@@ -45,6 +46,7 @@ export interface SmartTableSettings<T extends Record<string, any> = any> {
|
|
|
45
46
|
delete?: {
|
|
46
47
|
deleteButtonContent?: string;
|
|
47
48
|
confirmDelete?: boolean;
|
|
49
|
+
hasPermissionFunction?: (row: T) => boolean;
|
|
48
50
|
} | false;
|
|
49
51
|
attr?: {
|
|
50
52
|
id?: string;
|
|
@@ -57,16 +59,17 @@ export interface SmartTableSettings<T extends Record<string, any> = any> {
|
|
|
57
59
|
data: T;
|
|
58
60
|
}) => string;
|
|
59
61
|
}
|
|
60
|
-
export interface SmartTableAction {
|
|
62
|
+
export interface SmartTableAction<T = any> {
|
|
61
63
|
columnTitle?: string;
|
|
62
64
|
add?: boolean;
|
|
63
65
|
edit?: boolean;
|
|
64
66
|
delete?: boolean;
|
|
65
|
-
custom?: SmartTableCustomAction[];
|
|
67
|
+
custom?: SmartTableCustomAction<T>[];
|
|
66
68
|
}
|
|
67
|
-
export interface SmartTableCustomAction {
|
|
69
|
+
export interface SmartTableCustomAction<T = any> {
|
|
68
70
|
name: string;
|
|
69
71
|
title: string;
|
|
72
|
+
hasPermissionFunction?: (row: T) => boolean;
|
|
70
73
|
}
|
|
71
74
|
export type SmartTableColumnSettingsTypes = 'text' | 'html' | 'custom';
|
|
72
75
|
export type SmartTableColumnSettings<T extends Record<string, any> = any> = SmartTableTextHtmlColumn<T> | SmartTableCustomColumn<T>;
|