ngx-st-tables 17.0.16 → 17.0.17
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/esm2022/lib/components/material-table/material-table-caption/material-table-caption.component.mjs +3 -3
- package/esm2022/lib/components/material-table/material-table-caption/material-table-filter-dialog/material-table-filter-dialog.component.mjs +3 -3
- package/esm2022/lib/components/material-table/material-table-caption/material-table-order-column-dialog/material-table-order-column-dialog.component.mjs +3 -3
- package/esm2022/lib/components/material-table/material-table-row-cell/material-table-row-cell.component.mjs +39 -9
- package/esm2022/lib/components/material-table/material-table.component.mjs +66 -25
- package/esm2022/lib/models/st-material-table-column.model.mjs +1 -1
- package/esm2022/lib/models/view/view-st-material-table-column.model.mjs +1 -1
- package/esm2022/lib/ngx-st-tables.module.mjs +7 -3
- package/fesm2022/ngx-st-tables.mjs +112 -41
- 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 +14 -7
- package/lib/components/material-table/material-table.component.d.ts +13 -2
- package/lib/models/st-material-table-column.model.d.ts +6 -1
- package/lib/models/view/view-st-material-table-column.model.d.ts +1 -0
- package/lib/ngx-st-tables.module.d.ts +2 -1
- package/package.json +3 -2
package/lib/components/material-table/material-table-row-cell/material-table-row-cell.component.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeDetectorRef, OnInit } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
import { StMaterialTableColumnModel } from '../../../models/st-material-table-column.model';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class MaterialTableRowCellComponent implements OnInit {
|
|
@@ -7,18 +7,25 @@ export declare class MaterialTableRowCellComponent implements OnInit {
|
|
|
7
7
|
rowData: {
|
|
8
8
|
[prop: string]: any;
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
rowDataCopy: {
|
|
11
|
+
[prop: string]: any;
|
|
12
|
+
};
|
|
13
|
+
set rowEditing(data: boolean);
|
|
14
|
+
get rowEditing(): boolean;
|
|
15
|
+
private _rowEditing;
|
|
16
|
+
saveEditRowEmitter: EventEmitter<void>;
|
|
17
|
+
cancelEditRowEmitter: EventEmitter<void>;
|
|
18
|
+
editRowEmitter: EventEmitter<void>;
|
|
11
19
|
mobileView: boolean;
|
|
12
20
|
actionIconColorDef: {
|
|
13
21
|
[key: string]: 'primary' | 'warn';
|
|
14
22
|
};
|
|
15
23
|
constructor(changeDetectorRef: ChangeDetectorRef);
|
|
16
24
|
ngOnInit(): void;
|
|
25
|
+
saveRow(): void;
|
|
26
|
+
cancelRow(): void;
|
|
27
|
+
editRow(): void;
|
|
17
28
|
private checkWidthSize;
|
|
18
|
-
protected readonly PluginArray: {
|
|
19
|
-
new (): PluginArray;
|
|
20
|
-
prototype: PluginArray;
|
|
21
|
-
};
|
|
22
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<MaterialTableRowCellComponent, never>;
|
|
23
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MaterialTableRowCellComponent, "st-material-table-row-cell", never, { "column": { "alias": "column"; "required": false; }; "rowData": { "alias": "rowData"; "required": false; }; "rowEditing": { "alias": "rowEditing"; "required": false; }; }, {}, never, never, false, never>;
|
|
30
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MaterialTableRowCellComponent, "st-material-table-row-cell", never, { "column": { "alias": "column"; "required": false; }; "rowData": { "alias": "rowData"; "required": false; }; "rowDataCopy": { "alias": "rowDataCopy"; "required": false; }; "rowEditing": { "alias": "rowEditing"; "required": false; }; }, { "saveEditRowEmitter": "saveEditRowEmitter"; "cancelEditRowEmitter": "cancelEditRowEmitter"; "editRowEmitter": "editRowEmitter"; }, never, never, false, never>;
|
|
24
31
|
}
|
|
@@ -7,9 +7,11 @@ import { StMaterialTableColumnModel } from '../../models/st-material-table-colum
|
|
|
7
7
|
import { ViewStMaterialTableColumnModel } from '../../models/view/view-st-material-table-column.model';
|
|
8
8
|
import { ICaptionDataChanged } from './material-table-caption/material-table-caption.component';
|
|
9
9
|
import { StSubscribeDestroyComponent } from 'ngx-st-base-functions';
|
|
10
|
+
import { StSnackBarService } from 'ngx-st-snack-bar';
|
|
10
11
|
import * as i0 from "@angular/core";
|
|
11
12
|
export declare class MaterialTableComponent extends StSubscribeDestroyComponent implements OnInit, AfterViewInit {
|
|
12
13
|
private changeDetectorRef;
|
|
14
|
+
private snackbar;
|
|
13
15
|
paginator: MatPaginator;
|
|
14
16
|
sort: MatSort;
|
|
15
17
|
globalSearchSettings: StGlobalSearchSettingsModel;
|
|
@@ -26,6 +28,7 @@ export declare class MaterialTableComponent extends StSubscribeDestroyComponent
|
|
|
26
28
|
get data(): any[];
|
|
27
29
|
rowEditing: boolean;
|
|
28
30
|
loadData: EventEmitter<StMaterialTableLoadData>;
|
|
31
|
+
saveNewRow: EventEmitter<any>;
|
|
29
32
|
private _data;
|
|
30
33
|
columns: ViewStMaterialTableColumnModel[];
|
|
31
34
|
selectedColumns: ViewStMaterialTableColumnModel[];
|
|
@@ -36,12 +39,20 @@ export declare class MaterialTableComponent extends StSubscribeDestroyComponent
|
|
|
36
39
|
};
|
|
37
40
|
initGlobalSearch: string;
|
|
38
41
|
showTable: boolean;
|
|
42
|
+
activeRowsEditing: {
|
|
43
|
+
[rowId: string]: {
|
|
44
|
+
[prop: string]: any;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
39
47
|
private localStorageData;
|
|
40
|
-
constructor(changeDetectorRef: ChangeDetectorRef);
|
|
48
|
+
constructor(changeDetectorRef: ChangeDetectorRef, snackbar: StSnackBarService);
|
|
41
49
|
ngOnInit(): void;
|
|
42
50
|
ngAfterViewInit(): void;
|
|
43
51
|
captionDataChanged(event: ICaptionDataChanged): void;
|
|
44
52
|
resetTableSettings(): void;
|
|
53
|
+
editRow(row: any, column: ViewStMaterialTableColumnModel): void;
|
|
54
|
+
saveEditRow(row: any, column: ViewStMaterialTableColumnModel): void;
|
|
55
|
+
cancelEditRow(row: any, column: ViewStMaterialTableColumnModel): void;
|
|
45
56
|
private createCustomFilterForLocalTable;
|
|
46
57
|
private emitLazyLoading;
|
|
47
58
|
private updateDataToLocalStorage;
|
|
@@ -54,7 +65,7 @@ export declare class MaterialTableComponent extends StSubscribeDestroyComponent
|
|
|
54
65
|
private loadLocalStorageData;
|
|
55
66
|
private setNewEmptyLocalStorageData;
|
|
56
67
|
static ɵfac: i0.ɵɵFactoryDeclaration<MaterialTableComponent, never>;
|
|
57
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MaterialTableComponent, "ngx-st-material-table", never, { "globalSearchSettings": { "alias": "globalSearchSettings"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "dataLength": { "alias": "dataLength"; "required": false; }; "allowPickColumns": { "alias": "allowPickColumns"; "required": false; }; "allowReorderColumns": { "alias": "allowReorderColumns"; "required": false; }; "localStorageName": { "alias": "localStorageName"; "required": false; }; "lazyLoading": { "alias": "lazyLoading"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; "initColumns": { "alias": "initColumns"; "required": false; }; "rowClickAction": { "alias": "rowClickAction"; "required": false; }; "data": { "alias": "data"; "required": false; }; "rowEditing": { "alias": "rowEditing"; "required": false; }; }, { "loadData": "loadData"; }, never, never, false, never>;
|
|
68
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MaterialTableComponent, "ngx-st-material-table", never, { "globalSearchSettings": { "alias": "globalSearchSettings"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "dataLength": { "alias": "dataLength"; "required": false; }; "allowPickColumns": { "alias": "allowPickColumns"; "required": false; }; "allowReorderColumns": { "alias": "allowReorderColumns"; "required": false; }; "localStorageName": { "alias": "localStorageName"; "required": false; }; "lazyLoading": { "alias": "lazyLoading"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; "initColumns": { "alias": "initColumns"; "required": false; }; "rowClickAction": { "alias": "rowClickAction"; "required": false; }; "data": { "alias": "data"; "required": false; }; "rowEditing": { "alias": "rowEditing"; "required": false; }; }, { "loadData": "loadData"; "saveNewRow": "saveNewRow"; }, never, never, false, never>;
|
|
58
69
|
}
|
|
59
70
|
export interface StMaterialTableLoadData {
|
|
60
71
|
first: number;
|
|
@@ -3,7 +3,7 @@ export type StMaterialColumnType = 'string' | 'number' | 'boolean' | 'date' | 'c
|
|
|
3
3
|
export type StMaterialColumnFilterType = 'string' | 'number' | 'boolean' | 'date' | 'custom';
|
|
4
4
|
export interface StMaterialTableColumnModel {
|
|
5
5
|
field: string;
|
|
6
|
-
|
|
6
|
+
header: string;
|
|
7
7
|
selectColumnLabel?: string;
|
|
8
8
|
type?: StMaterialColumnType;
|
|
9
9
|
filterType?: StMaterialColumnFilterType;
|
|
@@ -23,6 +23,11 @@ export interface StMaterialTableColumnModel {
|
|
|
23
23
|
value: string;
|
|
24
24
|
label: string;
|
|
25
25
|
}[];
|
|
26
|
+
allowEditColumn?: boolean;
|
|
27
|
+
customEditRowValidator?: (oldValue: any, newValue: any) => {
|
|
28
|
+
isValid: boolean;
|
|
29
|
+
errorMessage: string;
|
|
30
|
+
};
|
|
26
31
|
}
|
|
27
32
|
export interface StMaterialTableActionColumnModel {
|
|
28
33
|
iconName: string;
|
|
@@ -36,10 +36,11 @@ import * as i33 from "primeng/table";
|
|
|
36
36
|
import * as i34 from "@angular/material/datepicker";
|
|
37
37
|
import * as i35 from "@angular/material/slide-toggle";
|
|
38
38
|
import * as i36 from "@angular/material/core";
|
|
39
|
+
import * as i37 from "ngx-st-snack-bar";
|
|
39
40
|
export declare class StTablesModule {
|
|
40
41
|
private matIconRegistry;
|
|
41
42
|
constructor(matIconRegistry: MatIconRegistry);
|
|
42
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<StTablesModule, never>;
|
|
43
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<StTablesModule, [typeof i1.LocalTableComponent, typeof i2.SelectTableComponent, typeof i3.ConfigurationsComponent, typeof i4.MaterialTableCaptionComponent, typeof i5.MaterialTableComponent, typeof i6.MaterialTableOrderColumnDialogComponent, typeof i7.MaterialTableFilterDialogComponent, typeof i8.MaterialTableRowCellComponent], [typeof i9.CommonModule, typeof i10.MatButtonModule, typeof i11.MatIconModule, typeof i12.MatTableModule, typeof i13.MatPaginatorModule, typeof i14.MatFormFieldModule, typeof i15.MatInputModule, typeof i16.MatTooltipModule, typeof i17.FormsModule, typeof i17.ReactiveFormsModule, typeof i18.RouterModule, typeof i19.StDateFormatModule, typeof i20.MatSortModule, typeof i21.MatMenuModule, typeof i22.MatSelectModule, typeof i23.MatCheckboxModule, typeof i24.MatBadge, typeof i25.MatProgressSpinner, typeof i26.StBaseFunctionsModule, typeof i27.MatDialogModule, typeof i28.MatExpansionModule, typeof i29.CdkDropList, typeof i29.CdkDrag, typeof i30.InputTextModule, typeof i31.PrimeTemplate, typeof i32.StQtyInputModule, typeof i33.TableModule, typeof i34.MatDatepickerModule, typeof i35.MatSlideToggleModule, typeof i36.MatNativeDateModule], [typeof i1.LocalTableComponent, typeof i2.SelectTableComponent, typeof i5.MaterialTableComponent]>;
|
|
44
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<StTablesModule, [typeof i1.LocalTableComponent, typeof i2.SelectTableComponent, typeof i3.ConfigurationsComponent, typeof i4.MaterialTableCaptionComponent, typeof i5.MaterialTableComponent, typeof i6.MaterialTableOrderColumnDialogComponent, typeof i7.MaterialTableFilterDialogComponent, typeof i8.MaterialTableRowCellComponent], [typeof i9.CommonModule, typeof i10.MatButtonModule, typeof i11.MatIconModule, typeof i12.MatTableModule, typeof i13.MatPaginatorModule, typeof i14.MatFormFieldModule, typeof i15.MatInputModule, typeof i16.MatTooltipModule, typeof i17.FormsModule, typeof i17.ReactiveFormsModule, typeof i18.RouterModule, typeof i19.StDateFormatModule, typeof i20.MatSortModule, typeof i21.MatMenuModule, typeof i22.MatSelectModule, typeof i23.MatCheckboxModule, typeof i24.MatBadge, typeof i25.MatProgressSpinner, typeof i26.StBaseFunctionsModule, typeof i27.MatDialogModule, typeof i28.MatExpansionModule, typeof i29.CdkDropList, typeof i29.CdkDrag, typeof i30.InputTextModule, typeof i31.PrimeTemplate, typeof i32.StQtyInputModule, typeof i33.TableModule, typeof i34.MatDatepickerModule, typeof i35.MatSlideToggleModule, typeof i36.MatNativeDateModule, typeof i37.StSnackBarModule], [typeof i1.LocalTableComponent, typeof i2.SelectTableComponent, typeof i5.MaterialTableComponent]>;
|
|
44
45
|
static ɵinj: i0.ɵɵInjectorDeclaration<StTablesModule>;
|
|
45
46
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-st-tables",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.0.17",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^17.3.12",
|
|
6
6
|
"@angular/core": "^17.3.12",
|
|
7
7
|
"ngx-st-date-format": "^17.0.1",
|
|
8
|
-
"ngx-st-base-functions": "^17.0.1"
|
|
8
|
+
"ngx-st-base-functions": "^17.0.1",
|
|
9
|
+
"ngx-st-snack-bar": "^17.0.1"
|
|
9
10
|
},
|
|
10
11
|
"dependencies": {
|
|
11
12
|
"tslib": "^2.3.0"
|