ngx-st-tables 17.0.68 → 17.0.69
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/assets/base-table.scss +23 -0
- package/esm2022/lib/components/material-table/material-table-row-cell/material-table-row-cell.component.mjs +9 -5
- package/esm2022/lib/components/material-table/material-table.component.mjs +102 -34
- package/esm2022/lib/components/select-table/select-table.component.mjs +2 -2
- package/esm2022/lib/constants/default-translations.mjs +2 -1
- package/esm2022/lib/models/st-material-table-column.model.mjs +1 -1
- package/esm2022/lib/models/st-tables-translations.model.mjs +1 -1
- package/fesm2022/ngx-st-tables.mjs +127 -57
- package/fesm2022/ngx-st-tables.mjs.map +1 -1
- package/lib/components/material-table/material-table-row-cell/material-table-row-cell.component.d.ts +2 -1
- package/lib/components/material-table/material-table.component.d.ts +11 -4
- package/lib/models/st-material-table-column.model.d.ts +7 -1
- package/lib/models/st-tables-translations.model.d.ts +1 -0
- package/package.json +1 -1
package/lib/components/material-table/material-table-row-cell/material-table-row-cell.component.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export declare class MaterialTableRowCellComponent implements OnInit {
|
|
|
14
14
|
get rowEditing(): boolean;
|
|
15
15
|
private _rowEditing;
|
|
16
16
|
rowIsSelected: import("@angular/core").InputSignal<boolean>;
|
|
17
|
+
rowIsExpanded: import("@angular/core").InputSignal<boolean>;
|
|
17
18
|
saveEditRowEmitter: import("@angular/core").OutputEmitterRef<void>;
|
|
18
19
|
cancelEditRowEmitter: import("@angular/core").OutputEmitterRef<void>;
|
|
19
20
|
editRowEmitter: import("@angular/core").OutputEmitterRef<void>;
|
|
@@ -32,5 +33,5 @@ export declare class MaterialTableRowCellComponent implements OnInit {
|
|
|
32
33
|
}): void;
|
|
33
34
|
private checkWidthSize;
|
|
34
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<MaterialTableRowCellComponent, never>;
|
|
35
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MaterialTableRowCellComponent, "st-material-table-row-cell", never, { "column": { "alias": "column"; "required": true; "isSignal": true; }; "rowData": { "alias": "rowData"; "required": true; "isSignal": true; }; "rowDataCopy": { "alias": "rowDataCopy"; "required": false; "isSignal": true; }; "rowEditing": { "alias": "rowEditing"; "required": false; }; "rowIsSelected": { "alias": "rowIsSelected"; "required": false; "isSignal": true; }; }, { "saveEditRowEmitter": "saveEditRowEmitter"; "cancelEditRowEmitter": "cancelEditRowEmitter"; "editRowEmitter": "editRowEmitter"; "selectRowChange": "selectRowChange"; }, never, never, false, never>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MaterialTableRowCellComponent, "st-material-table-row-cell", never, { "column": { "alias": "column"; "required": true; "isSignal": true; }; "rowData": { "alias": "rowData"; "required": true; "isSignal": true; }; "rowDataCopy": { "alias": "rowDataCopy"; "required": false; "isSignal": true; }; "rowEditing": { "alias": "rowEditing"; "required": false; }; "rowIsSelected": { "alias": "rowIsSelected"; "required": false; "isSignal": true; }; "rowIsExpanded": { "alias": "rowIsExpanded"; "required": false; "isSignal": true; }; }, { "saveEditRowEmitter": "saveEditRowEmitter"; "cancelEditRowEmitter": "cancelEditRowEmitter"; "editRowEmitter": "editRowEmitter"; "selectRowChange": "selectRowChange"; }, never, never, false, never>;
|
|
36
37
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AfterViewInit, ChangeDetectorRef, OnInit } from '@angular/core';
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, OnInit, TemplateRef } from '@angular/core';
|
|
2
2
|
import { MatPaginator } from '@angular/material/paginator';
|
|
3
3
|
import { MatSort, SortDirection } from '@angular/material/sort';
|
|
4
4
|
import { MatTableDataSource } from '@angular/material/table';
|
|
@@ -29,16 +29,21 @@ export declare class MaterialTableComponent extends StSubscribeDestroyComponent
|
|
|
29
29
|
rowClickAction: import("@angular/core").InputSignal<((row: any) => void) | undefined>;
|
|
30
30
|
set data(data: any[]);
|
|
31
31
|
get data(): any[];
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
allowEditRow: import("@angular/core").InputSignal<boolean>;
|
|
33
|
+
allowSelectRow: import("@angular/core").InputSignal<boolean>;
|
|
34
34
|
selectionFieldLabel: import("@angular/core").InputSignal<string>;
|
|
35
35
|
showCreateButton: import("@angular/core").InputSignal<boolean>;
|
|
36
36
|
createButtonLabel: import("@angular/core").InputSignal<string>;
|
|
37
37
|
createButtonAction: import("@angular/core").InputSignal<() => void>;
|
|
38
|
+
allowExtendRow: import("@angular/core").InputSignal<boolean>;
|
|
39
|
+
extendedRowTemplate: import("@angular/core").InputSignal<TemplateRef<{
|
|
40
|
+
data: any;
|
|
41
|
+
}> | undefined>;
|
|
38
42
|
loadData: import("@angular/core").OutputEmitterRef<StMaterialTableLoadData>;
|
|
39
43
|
saveNewRow: import("@angular/core").OutputEmitterRef<any>;
|
|
40
44
|
selectRowChange: import("@angular/core").OutputEmitterRef<any[]>;
|
|
41
45
|
private _data;
|
|
46
|
+
expandedRow: import("@angular/core").WritableSignal<any>;
|
|
42
47
|
columns: ViewStMaterialTableColumnModel[];
|
|
43
48
|
selectedColumns: ViewStMaterialTableColumnModel[];
|
|
44
49
|
selectedColumnsString: string[];
|
|
@@ -67,6 +72,8 @@ export declare class MaterialTableComponent extends StSubscribeDestroyComponent
|
|
|
67
72
|
toggleAllRows(): void;
|
|
68
73
|
removeSelectedRow(row: any): void;
|
|
69
74
|
selectRowChanged(value: boolean, row: any): void;
|
|
75
|
+
clickRowAction(row: any): void;
|
|
76
|
+
private setColumnsFilterRowEditTypes;
|
|
70
77
|
private createCustomFilterForLocalTable;
|
|
71
78
|
private emitLazyLoading;
|
|
72
79
|
private updateDataToLocalStorage;
|
|
@@ -80,7 +87,7 @@ export declare class MaterialTableComponent extends StSubscribeDestroyComponent
|
|
|
80
87
|
private validOldFiltersToNewFormat;
|
|
81
88
|
private setNewEmptyLocalStorageData;
|
|
82
89
|
static ɵfac: i0.ɵɵFactoryDeclaration<MaterialTableComponent, never>;
|
|
83
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MaterialTableComponent, "ngx-st-material-table", never, { "showGlobalSearch": { "alias": "showGlobalSearch"; "required": false; "isSignal": true; }; "tableTitle": { "alias": "tableTitle"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "dataLength": { "alias": "dataLength"; "required": false; "isSignal": true; }; "allowPickColumns": { "alias": "allowPickColumns"; "required": false; "isSignal": true; }; "allowReorderColumns": { "alias": "allowReorderColumns"; "required": false; "isSignal": true; }; "localStorageName": { "alias": "localStorageName"; "required": false; "isSignal": true; }; "lazyLoading": { "alias": "lazyLoading"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "initColumns": { "alias": "initColumns"; "required": false; "isSignal": true; }; "rowClickAction": { "alias": "rowClickAction"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; }; "
|
|
90
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MaterialTableComponent, "ngx-st-material-table", never, { "showGlobalSearch": { "alias": "showGlobalSearch"; "required": false; "isSignal": true; }; "tableTitle": { "alias": "tableTitle"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "dataLength": { "alias": "dataLength"; "required": false; "isSignal": true; }; "allowPickColumns": { "alias": "allowPickColumns"; "required": false; "isSignal": true; }; "allowReorderColumns": { "alias": "allowReorderColumns"; "required": false; "isSignal": true; }; "localStorageName": { "alias": "localStorageName"; "required": false; "isSignal": true; }; "lazyLoading": { "alias": "lazyLoading"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "initColumns": { "alias": "initColumns"; "required": false; "isSignal": true; }; "rowClickAction": { "alias": "rowClickAction"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; }; "allowEditRow": { "alias": "allowEditRow"; "required": false; "isSignal": true; }; "allowSelectRow": { "alias": "allowSelectRow"; "required": false; "isSignal": true; }; "selectionFieldLabel": { "alias": "selectionFieldLabel"; "required": false; "isSignal": true; }; "showCreateButton": { "alias": "showCreateButton"; "required": false; "isSignal": true; }; "createButtonLabel": { "alias": "createButtonLabel"; "required": false; "isSignal": true; }; "createButtonAction": { "alias": "createButtonAction"; "required": false; "isSignal": true; }; "allowExtendRow": { "alias": "allowExtendRow"; "required": false; "isSignal": true; }; "extendedRowTemplate": { "alias": "extendedRowTemplate"; "required": false; "isSignal": true; }; }, { "initColumns": "initColumnsChange"; "loadData": "loadData"; "saveNewRow": "saveNewRow"; "selectRowChange": "selectRowChange"; }, never, never, false, never>;
|
|
84
91
|
}
|
|
85
92
|
export interface StMaterialTableLoadData {
|
|
86
93
|
first: number;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { TemplateRef } from '@angular/core';
|
|
2
|
-
export type StMaterialColumnType = 'string' | 'number' | 'boolean' | 'date' | 'custom-template' | 'actions-row-editing' | 'actions' | 'actions-row-selecting';
|
|
2
|
+
export type StMaterialColumnType = 'string' | 'number' | 'boolean' | 'date' | 'custom-template' | 'actions-row-editing' | 'actions' | 'actions-row-selecting' | 'actions-row-extending';
|
|
3
3
|
export type StMaterialColumnFilterType = 'string' | 'number' | 'boolean' | 'date' | 'custom';
|
|
4
|
+
export type StMaterialRowEditType = 'string' | 'number' | 'boolean' | 'date' | 'custom';
|
|
4
5
|
export interface StMaterialTableColumnModel {
|
|
5
6
|
field: string;
|
|
6
7
|
header: string;
|
|
7
8
|
selectColumnLabel?: string;
|
|
8
9
|
type?: StMaterialColumnType;
|
|
9
10
|
filterType?: StMaterialColumnFilterType;
|
|
11
|
+
rowEditType?: StMaterialRowEditType;
|
|
10
12
|
sort?: boolean;
|
|
11
13
|
filter?: boolean;
|
|
12
14
|
flexRight?: boolean;
|
|
@@ -23,6 +25,10 @@ export interface StMaterialTableColumnModel {
|
|
|
23
25
|
value: string;
|
|
24
26
|
label: string;
|
|
25
27
|
}[];
|
|
28
|
+
customRowEditOptions?: {
|
|
29
|
+
value: string;
|
|
30
|
+
label: string;
|
|
31
|
+
}[];
|
|
26
32
|
allowEditColumn?: boolean;
|
|
27
33
|
customEditRowValidator?: (oldValue: any, newValue: any, row: any) => {
|
|
28
34
|
isValid: boolean;
|