@ng-matero/extensions 10.16.1 → 10.16.5
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/alert/_alert-theme.scss +20 -20
- package/alert/alert.component.d.ts +4 -3
- package/alert/mtxAlert.metadata.json +1 -1
- package/bundles/mtxAlert.umd.js +3 -3
- package/bundles/mtxAlert.umd.js.map +1 -1
- package/bundles/mtxAlert.umd.min.js.map +1 -1
- package/bundles/{ng-matero-extensions-button.umd.js → mtxButton.umd.js} +2 -2
- package/bundles/mtxButton.umd.js.map +1 -0
- package/bundles/{ng-matero-extensions-button.umd.min.js → mtxButton.umd.min.js} +1 -1
- package/bundles/{ng-matero-extensions-button.umd.min.js.map → mtxButton.umd.min.js.map} +0 -0
- package/bundles/mtxCheckboxGroup.umd.js +87 -22
- package/bundles/mtxCheckboxGroup.umd.js.map +1 -1
- package/bundles/mtxCheckboxGroup.umd.min.js +1 -1
- package/bundles/mtxCheckboxGroup.umd.min.js.map +1 -1
- package/bundles/mtxColorPicker.umd.js +32 -5
- package/bundles/mtxColorPicker.umd.js.map +1 -1
- package/bundles/mtxColorPicker.umd.min.js +1 -1
- package/bundles/mtxColorPicker.umd.min.js.map +1 -1
- package/bundles/mtxDialog.umd.js +0 -2
- package/bundles/mtxDialog.umd.js.map +1 -1
- package/bundles/mtxDialog.umd.min.js +1 -1
- package/bundles/mtxDialog.umd.min.js.map +1 -1
- package/bundles/mtxFormGroup.umd.js +2 -0
- package/bundles/mtxFormGroup.umd.js.map +1 -1
- package/bundles/mtxFormGroup.umd.min.js +1 -1
- package/bundles/mtxFormGroup.umd.min.js.map +1 -1
- package/bundles/mtxGrid.umd.js +31 -101
- package/bundles/mtxGrid.umd.js.map +1 -1
- package/bundles/mtxGrid.umd.min.js +2 -2
- package/bundles/mtxGrid.umd.min.js.map +1 -1
- package/bundles/mtxLoader.umd.js +1 -1
- package/bundles/mtxLoader.umd.js.map +1 -1
- package/bundles/mtxLoader.umd.min.js +1 -1
- package/bundles/mtxLoader.umd.min.js.map +1 -1
- package/bundles/mtxProgress.umd.js +2 -2
- package/bundles/mtxProgress.umd.js.map +1 -1
- package/bundles/mtxProgress.umd.min.js.map +1 -1
- package/bundles/mtxSelect.umd.js +5 -1
- package/bundles/mtxSelect.umd.js.map +1 -1
- package/bundles/mtxSelect.umd.min.js +1 -1
- package/bundles/mtxSelect.umd.min.js.map +1 -1
- package/bundles/mtxTooltip.umd.js +1 -1
- package/bundles/mtxTooltip.umd.js.map +1 -1
- package/bundles/mtxTooltip.umd.min.js +1 -1
- package/bundles/mtxTooltip.umd.min.js.map +1 -1
- package/bundles/mtxUtils.umd.js.map +1 -1
- package/bundles/mtxUtils.umd.min.js.map +1 -1
- package/button/{ng-matero-extensions-button.d.ts → mtxButton.d.ts} +0 -0
- package/button/{ng-matero-extensions-button.metadata.json → mtxButton.metadata.json} +0 -0
- package/button/package.json +7 -7
- package/checkbox-group/checkbox-group.component.d.ts +15 -11
- package/checkbox-group/mtxCheckboxGroup.metadata.json +1 -1
- package/color-picker/color-picker.component.d.ts +10 -9
- package/color-picker/mtxColorPicker.metadata.json +1 -1
- package/data-grid/_grid-theme.scss +14 -32
- package/data-grid/cell.component.d.ts +2 -1
- package/data-grid/column-menu.component.d.ts +4 -3
- package/data-grid/grid.component.d.ts +7 -20
- package/data-grid/grid.component.scss +51 -5
- package/data-grid/grid.interface.d.ts +18 -36
- package/data-grid/mtxGrid.metadata.json +1 -1
- package/dialog/dialog.config.d.ts +3 -2
- package/dialog/mtxDialog.metadata.json +1 -1
- package/esm2015/alert/alert.component.js +4 -4
- package/esm2015/button/mtxButton.js +10 -0
- package/esm2015/checkbox-group/checkbox-group.component.js +77 -20
- package/esm2015/color-picker/color-picker.component.js +29 -6
- package/esm2015/data-grid/cell.component.js +2 -2
- package/esm2015/data-grid/column-menu.component.js +1 -2
- package/esm2015/data-grid/grid.component.js +32 -100
- package/esm2015/data-grid/grid.interface.js +12 -11
- package/esm2015/dialog/dialog.config.js +1 -1
- package/esm2015/dialog/dialog.js +1 -3
- package/esm2015/form-group/form-group.component.js +4 -2
- package/esm2015/loader/loader.component.js +2 -2
- package/esm2015/progress/progress.component.js +3 -3
- package/esm2015/select/select.component.js +6 -2
- package/esm2015/tooltip/tooltip.js +2 -2
- package/esm2015/utils/to-observable.pipe.js +1 -1
- package/fesm2015/mtxAlert.js +3 -3
- package/fesm2015/mtxAlert.js.map +1 -1
- package/fesm2015/{ng-matero-extensions-button.js → mtxButton.js} +2 -2
- package/fesm2015/mtxButton.js.map +1 -0
- package/fesm2015/mtxCheckboxGroup.js +76 -19
- package/fesm2015/mtxCheckboxGroup.js.map +1 -1
- package/fesm2015/mtxColorPicker.js +28 -5
- package/fesm2015/mtxColorPicker.js.map +1 -1
- package/fesm2015/mtxDialog.js +0 -2
- package/fesm2015/mtxDialog.js.map +1 -1
- package/fesm2015/mtxFormGroup.js +3 -1
- package/fesm2015/mtxFormGroup.js.map +1 -1
- package/fesm2015/mtxGrid.js +43 -111
- package/fesm2015/mtxGrid.js.map +1 -1
- package/fesm2015/mtxLoader.js +1 -1
- package/fesm2015/mtxLoader.js.map +1 -1
- package/fesm2015/mtxProgress.js +2 -2
- package/fesm2015/mtxProgress.js.map +1 -1
- package/fesm2015/mtxSelect.js +5 -1
- package/fesm2015/mtxSelect.js.map +1 -1
- package/fesm2015/mtxTooltip.js +1 -1
- package/fesm2015/mtxTooltip.js.map +1 -1
- package/fesm2015/mtxUtils.js.map +1 -1
- package/form-group/mtxFormGroup.metadata.json +1 -1
- package/loader/loader.component.d.ts +2 -1
- package/loader/mtxLoader.metadata.json +1 -1
- package/package.json +1 -1
- package/progress/mtxProgress.metadata.json +1 -1
- package/progress/progress.component.d.ts +3 -2
- package/select/_select-theme.scss +18 -18
- package/select/mtxSelect.metadata.json +1 -1
- package/select/select.component.d.ts +4 -1
- package/tooltip/mtxTooltip.metadata.json +1 -1
- package/utils/to-observable.pipe.d.ts +1 -1
- package/bundles/ng-matero-extensions-button.umd.js.map +0 -1
- package/esm2015/button/ng-matero-extensions-button.js +0 -10
- package/fesm2015/ng-matero-extensions-button.js.map +0 -1
|
@@ -10,35 +10,9 @@
|
|
|
10
10
|
.mtx-grid {
|
|
11
11
|
border: 1px solid rgba(mat-color($foreground, secondary-text), .2);
|
|
12
12
|
|
|
13
|
-
.
|
|
14
|
-
border-bottom: 1px solid rgba(mat-color($foreground, secondary-text), .2);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.mtx-grid-sidebar {
|
|
18
|
-
border-left: 1px solid rgba(mat-color($foreground, secondary-text), .2);
|
|
19
|
-
|
|
20
|
-
[dir='rtl'] & {
|
|
21
|
-
border-left-width: 0;
|
|
22
|
-
border-right: 1px solid rgba(mat-color($foreground, secondary-text), .2);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.mat-table-sticky-left {
|
|
27
|
-
border-right: 1px solid mat-color($foreground, divider);
|
|
28
|
-
|
|
29
|
-
[dir='rtl'] & {
|
|
30
|
-
border-right-width: 0;
|
|
31
|
-
border-left: 1px solid mat-color($foreground, divider);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
13
|
+
.mat-table-sticky-left,
|
|
35
14
|
.mat-table-sticky-right {
|
|
36
|
-
border-
|
|
37
|
-
|
|
38
|
-
[dir='rtl'] & {
|
|
39
|
-
border-left-width: 0;
|
|
40
|
-
border-right: 1px solid mat-color($foreground, divider);
|
|
41
|
-
}
|
|
15
|
+
border-color: mat-color($foreground, divider);
|
|
42
16
|
}
|
|
43
17
|
|
|
44
18
|
.mat-table {
|
|
@@ -68,10 +42,6 @@
|
|
|
68
42
|
}
|
|
69
43
|
}
|
|
70
44
|
|
|
71
|
-
.mat-paginator {
|
|
72
|
-
border-top: 1px solid mat-color($foreground, divider);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
45
|
.mat-footer-row {
|
|
76
46
|
.mat-footer-cell {
|
|
77
47
|
border-top: 1px solid mat-color($foreground, divider);
|
|
@@ -79,6 +49,18 @@
|
|
|
79
49
|
background-color: mat-color($background, app-bar);
|
|
80
50
|
}
|
|
81
51
|
}
|
|
52
|
+
|
|
53
|
+
.mat-paginator {
|
|
54
|
+
border-top: 1px solid rgba(mat-color($foreground, secondary-text), .2);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.mtx-grid-toolbar {
|
|
59
|
+
border-bottom: 1px solid rgba(mat-color($foreground, secondary-text), .2);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.mtx-grid-sidebar {
|
|
63
|
+
border-color: rgba(mat-color($foreground, secondary-text), .2);
|
|
82
64
|
}
|
|
83
65
|
|
|
84
66
|
.mtx-grid-column-menu-item {
|
|
@@ -2,6 +2,7 @@ import { MtxDialog } from '@ng-matero/extensions/dialog';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { MtxGridColumn, MtxGridColumnButton } from './grid.interface';
|
|
4
4
|
import { MtxGridService } from './grid.service';
|
|
5
|
+
import { ThemePalette } from '@angular/material/core';
|
|
5
6
|
export declare class MtxGridCellComponent {
|
|
6
7
|
private _dialog;
|
|
7
8
|
private _dataGridSrv;
|
|
@@ -23,7 +24,7 @@ export declare class MtxGridCellComponent {
|
|
|
23
24
|
_getFormatterTooltip(value: any): any;
|
|
24
25
|
_formatSummary(data: any[], colDef: MtxGridColumn): string | void | ((data: any[], colDef?: MtxGridColumn | undefined) => void);
|
|
25
26
|
constructor(_dialog: MtxDialog, _dataGridSrv: MtxGridService);
|
|
26
|
-
_handleActionConfirm(event: MouseEvent, title: string | Observable<string>, description
|
|
27
|
+
_handleActionConfirm(event: MouseEvent, title: string | Observable<string>, description: string | Observable<string> | undefined, okColor: ThemePalette, okText: string | Observable<string> | undefined, closeColor: ThemePalette, closeText?: string | Observable<string>, fn?: (p: any) => void, data?: any): void;
|
|
27
28
|
_handleActionClick(event: MouseEvent, btn: MtxGridColumnButton, rowData: any): void;
|
|
28
29
|
/** Preview enlarged image */
|
|
29
30
|
_onPreview(urlStr: string): void;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
2
2
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
3
3
|
import { MatCheckboxChange } from '@angular/material/checkbox';
|
|
4
|
-
import { MtxGridColumnSelectionItem } from './grid.interface';
|
|
5
4
|
import { MatMenu, MatMenuTrigger } from '@angular/material/menu';
|
|
5
|
+
import { ThemePalette } from '@angular/material/core';
|
|
6
|
+
import { MtxGridButtonType, MtxGridColumnSelectionItem } from './grid.interface';
|
|
6
7
|
export declare class MtxGridColumnMenuComponent {
|
|
7
8
|
menuPanel: MatMenu;
|
|
8
9
|
menuTrigger: MatMenuTrigger;
|
|
@@ -14,8 +15,8 @@ export declare class MtxGridColumnMenuComponent {
|
|
|
14
15
|
get buttonText(): string;
|
|
15
16
|
set buttonText(value: string);
|
|
16
17
|
private _buttonText;
|
|
17
|
-
buttonType:
|
|
18
|
-
buttonColor:
|
|
18
|
+
buttonType: MtxGridButtonType;
|
|
19
|
+
buttonColor: ThemePalette;
|
|
19
20
|
buttonClass: string;
|
|
20
21
|
buttonIcon: string;
|
|
21
22
|
showHeader: boolean;
|
|
@@ -3,10 +3,11 @@ import { SelectionModel } from '@angular/cdk/collections';
|
|
|
3
3
|
import { MatTableDataSource } from '@angular/material/table';
|
|
4
4
|
import { MatPaginator, PageEvent } from '@angular/material/paginator';
|
|
5
5
|
import { Sort, MatSort, SortDirection } from '@angular/material/sort';
|
|
6
|
-
import { MtxGridColumn, MtxGridColumnSelectionItem, MtxGridCellTemplate, MtxGridRowSelectionFormatter, MtxGridRowClassFormatter, MtxGridColumnMenu } from './grid.interface';
|
|
6
|
+
import { MtxGridColumn, MtxGridColumnSelectionItem, MtxGridCellTemplate, MtxGridRowSelectionFormatter, MtxGridRowClassFormatter, MtxGridColumnMenu, MtxGridButtonType } from './grid.interface';
|
|
7
7
|
import { MtxGridCellSelectionDirective } from './cell-selection.directive';
|
|
8
8
|
import { MtxGridExpansionToggleDirective } from './expansion-toggle.directive';
|
|
9
9
|
import { MtxGridService } from './grid.service';
|
|
10
|
+
import { ThemePalette } from '@angular/material/core';
|
|
10
11
|
export declare class MtxGridComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {
|
|
11
12
|
private _dataGridSrv;
|
|
12
13
|
private _changeDetectorRef;
|
|
@@ -14,14 +15,14 @@ export declare class MtxGridComponent implements OnInit, OnChanges, AfterViewIni
|
|
|
14
15
|
sort: MatSort;
|
|
15
16
|
columnMenu: MtxGridColumnMenu;
|
|
16
17
|
tableContainer: ElementRef<HTMLDivElement>;
|
|
17
|
-
dataSource: MatTableDataSource<
|
|
18
|
+
dataSource: MatTableDataSource<unknown>;
|
|
18
19
|
displayedColumns: string[];
|
|
19
20
|
columns: MtxGridColumn[];
|
|
20
|
-
data:
|
|
21
|
+
data: any[];
|
|
21
22
|
length: number;
|
|
22
23
|
loading: boolean;
|
|
23
24
|
trackBy: TrackByFunction<any>;
|
|
24
|
-
|
|
25
|
+
columnResizable: boolean;
|
|
25
26
|
pageOnFront: boolean;
|
|
26
27
|
showPaginator: boolean;
|
|
27
28
|
pageDisabled: boolean;
|
|
@@ -31,7 +32,6 @@ export declare class MtxGridComponent implements OnInit, OnChanges, AfterViewIni
|
|
|
31
32
|
pageSizeOptions: number[];
|
|
32
33
|
hidePageSize: boolean;
|
|
33
34
|
page: EventEmitter<PageEvent>;
|
|
34
|
-
/** Sort */
|
|
35
35
|
sortOnFront: boolean;
|
|
36
36
|
sortActive: string;
|
|
37
37
|
sortDirection: SortDirection;
|
|
@@ -39,18 +39,15 @@ export declare class MtxGridComponent implements OnInit, OnChanges, AfterViewIni
|
|
|
39
39
|
sortDisabled: boolean;
|
|
40
40
|
sortStart: 'asc' | 'desc';
|
|
41
41
|
sortChange: EventEmitter<Sort>;
|
|
42
|
-
/** Row */
|
|
43
42
|
rowHover: boolean;
|
|
44
43
|
rowStriped: boolean;
|
|
45
44
|
rowClick: EventEmitter<any>;
|
|
46
|
-
/** Expandable row */
|
|
47
45
|
expansionRowStates: any[];
|
|
48
46
|
expandable: boolean;
|
|
49
47
|
expansionTemplate: TemplateRef<any>;
|
|
50
48
|
expansionChange: EventEmitter<any>;
|
|
51
49
|
/** Whether support multiple row/cell selection */
|
|
52
50
|
multiSelectable: boolean;
|
|
53
|
-
/** Row selection */
|
|
54
51
|
rowSelection: SelectionModel<any>;
|
|
55
52
|
rowSelected: never[];
|
|
56
53
|
rowSelectable: boolean;
|
|
@@ -58,21 +55,18 @@ export declare class MtxGridComponent implements OnInit, OnChanges, AfterViewIni
|
|
|
58
55
|
rowSelectionFormatter: MtxGridRowSelectionFormatter;
|
|
59
56
|
rowClassFormatter: MtxGridRowClassFormatter;
|
|
60
57
|
rowSelectionChange: EventEmitter<any[]>;
|
|
61
|
-
/** Cell selection */
|
|
62
58
|
cellSelection: any[];
|
|
63
59
|
cellSelectable: boolean;
|
|
64
60
|
cellSelectionChange: EventEmitter<any[]>;
|
|
65
61
|
private _selectedCell;
|
|
66
|
-
/** Toolbar */
|
|
67
62
|
showToolbar: boolean;
|
|
68
63
|
toolbarTitle: string;
|
|
69
64
|
toolbarTemplate: TemplateRef<any>;
|
|
70
|
-
/** Column menu */
|
|
71
65
|
columnMenuData: MtxGridColumnSelectionItem[];
|
|
72
66
|
showColumnMenuButton: boolean;
|
|
73
67
|
columnMenuButtonText: string;
|
|
74
|
-
columnMenuButtonType:
|
|
75
|
-
columnMenuButtonColor:
|
|
68
|
+
columnMenuButtonType: MtxGridButtonType;
|
|
69
|
+
columnMenuButtonColor: ThemePalette;
|
|
76
70
|
columnMenuButtonClass: string;
|
|
77
71
|
columnMenuButtonIcon: string;
|
|
78
72
|
columnHideable: boolean;
|
|
@@ -86,24 +80,17 @@ export declare class MtxGridComponent implements OnInit, OnChanges, AfterViewIni
|
|
|
86
80
|
showColumnMenuFooter: boolean;
|
|
87
81
|
columnMenuFooterText: string;
|
|
88
82
|
columnMenuFooterTemplate: TemplateRef<any>;
|
|
89
|
-
/** No Result */
|
|
90
83
|
noResultText: string;
|
|
91
84
|
noResultTemplate: TemplateRef<any>;
|
|
92
85
|
get _hasNoResult(): boolean;
|
|
93
|
-
/** thead */
|
|
94
86
|
headerTemplate: TemplateRef<any> | MtxGridCellTemplate | any;
|
|
95
87
|
headerExtraTemplate: TemplateRef<any> | MtxGridCellTemplate | any;
|
|
96
|
-
/** tbody */
|
|
97
88
|
cellTemplate: TemplateRef<any> | MtxGridCellTemplate | any;
|
|
98
|
-
/** tfoot */
|
|
99
89
|
showSummary: boolean;
|
|
100
90
|
summaryTemplate: TemplateRef<any> | MtxGridCellTemplate | any;
|
|
101
91
|
get _whetherShowSummary(): boolean;
|
|
102
|
-
/** Sidebar */
|
|
103
92
|
showSidebar: boolean;
|
|
104
93
|
sidebarTemplate: TemplateRef<any>;
|
|
105
|
-
/** Column resizable */
|
|
106
|
-
columnResizable: boolean;
|
|
107
94
|
constructor(_dataGridSrv: MtxGridService, _changeDetectorRef: ChangeDetectorRef);
|
|
108
95
|
detectChanges(): void;
|
|
109
96
|
_isTemplateRef(obj: any): boolean;
|
|
@@ -27,22 +27,60 @@
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
.mat-table-sticky-left {
|
|
31
|
+
border-right-width: 1px;
|
|
32
|
+
border-right-style: solid;
|
|
33
|
+
|
|
34
|
+
[dir='rtl'] & {
|
|
35
|
+
border-right-width: 0;
|
|
36
|
+
border-left-width: 1px;
|
|
37
|
+
border-left-style: solid;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.mat-table-sticky-right {
|
|
42
|
+
border-left-width: 1px;
|
|
43
|
+
border-left-style: solid;
|
|
44
|
+
|
|
45
|
+
[dir='rtl'] & {
|
|
46
|
+
border-left-width: 0;
|
|
47
|
+
border-right-width: 1px;
|
|
48
|
+
border-right-style: solid;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
30
52
|
.mat-header-cell,
|
|
31
53
|
.mat-footer-cell,
|
|
32
54
|
.mat-cell {
|
|
33
55
|
padding: 4px 10px;
|
|
34
56
|
box-sizing: border-box;
|
|
35
57
|
|
|
36
|
-
|
|
37
|
-
padding-left:
|
|
38
|
-
padding-right: 10px;
|
|
39
|
-
}
|
|
58
|
+
&:first-of-type:not(:only-of-type) {
|
|
59
|
+
padding-left: 24px;
|
|
40
60
|
|
|
41
|
-
[dir='rtl'] & {
|
|
42
61
|
&.mtx-grid-checkbox-cell {
|
|
43
62
|
padding-left: 10px;
|
|
44
63
|
padding-right: 10px;
|
|
45
64
|
}
|
|
65
|
+
|
|
66
|
+
[dir='rtl'] & {
|
|
67
|
+
padding-left: 10px;
|
|
68
|
+
padding-right: 24px;
|
|
69
|
+
|
|
70
|
+
&.mtx-grid-checkbox-cell {
|
|
71
|
+
padding-left: 10px;
|
|
72
|
+
padding-right: 10px;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&:last-of-type:not(:only-of-type) {
|
|
78
|
+
padding-right: 24px;
|
|
79
|
+
|
|
80
|
+
[dir='rtl'] & {
|
|
81
|
+
padding-left: 24px;
|
|
82
|
+
padding-right: 10px;
|
|
83
|
+
}
|
|
46
84
|
}
|
|
47
85
|
}
|
|
48
86
|
|
|
@@ -118,6 +156,14 @@
|
|
|
118
156
|
|
|
119
157
|
.mtx-grid-sidebar {
|
|
120
158
|
max-width: 50%;
|
|
159
|
+
border-left-width: 1px;
|
|
160
|
+
border-left-style: solid;
|
|
161
|
+
|
|
162
|
+
[dir='rtl'] & {
|
|
163
|
+
border-left-width: 0;
|
|
164
|
+
border-right-width: 1px;
|
|
165
|
+
border-right-style: solid;
|
|
166
|
+
}
|
|
121
167
|
}
|
|
122
168
|
|
|
123
169
|
.mtx-grid-no-result {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import { ThemePalette } from '@angular/material/core';
|
|
2
3
|
import { MatMenu, MatMenuTrigger } from '@angular/material/menu';
|
|
3
4
|
import { Observable } from 'rxjs';
|
|
4
|
-
/**
|
|
5
|
-
* Grid
|
|
6
|
-
*/
|
|
5
|
+
/** Column definition of grid. */
|
|
7
6
|
export interface MtxGridColumn {
|
|
8
7
|
field: string;
|
|
9
8
|
header?: string | Observable<string>;
|
|
@@ -29,13 +28,9 @@ export interface MtxGridColumn {
|
|
|
29
28
|
summary?: ((data: any[], colDef?: MtxGridColumn) => void) | string;
|
|
30
29
|
class?: string;
|
|
31
30
|
}
|
|
32
|
-
/**
|
|
33
|
-
* Column type
|
|
34
|
-
*/
|
|
31
|
+
/** Possible column type values. */
|
|
35
32
|
export declare type MtxGridColumnType = 'tag' | 'button' | 'link' | 'image' | 'boolean' | 'number' | 'currency' | 'percent' | 'date';
|
|
36
|
-
/**
|
|
37
|
-
* Column type parameter
|
|
38
|
-
*/
|
|
33
|
+
/** Column type parameter. */
|
|
39
34
|
export interface MtxGridColumnTypeParameter {
|
|
40
35
|
currencyCode?: string;
|
|
41
36
|
display?: string | boolean;
|
|
@@ -44,51 +39,44 @@ export interface MtxGridColumnTypeParameter {
|
|
|
44
39
|
locale?: string;
|
|
45
40
|
timezone?: string;
|
|
46
41
|
}
|
|
47
|
-
/**
|
|
48
|
-
* Column sort properties
|
|
49
|
-
*/
|
|
42
|
+
/** The properties of column sort. */
|
|
50
43
|
export interface MtxGridColumnSortProp {
|
|
51
44
|
arrowPosition?: 'before' | 'after';
|
|
52
45
|
disableClear?: boolean;
|
|
53
46
|
id?: string;
|
|
54
47
|
start?: 'asc' | 'desc';
|
|
55
48
|
}
|
|
56
|
-
/**
|
|
57
|
-
* Tag
|
|
58
|
-
*/
|
|
49
|
+
/** Column tag of grid. */
|
|
59
50
|
export interface MtxGridColumnTag {
|
|
60
51
|
[key: number]: MtxGridColumnTagValue;
|
|
61
52
|
[key: string]: MtxGridColumnTagValue;
|
|
62
53
|
}
|
|
54
|
+
/** The properties of column tag. */
|
|
63
55
|
export interface MtxGridColumnTagValue {
|
|
64
56
|
text?: string;
|
|
65
57
|
color?: string;
|
|
66
58
|
}
|
|
67
|
-
/**
|
|
68
|
-
* Button
|
|
69
|
-
*/
|
|
59
|
+
/** The properties of column button. */
|
|
70
60
|
export interface MtxGridColumnButton {
|
|
71
61
|
type?: 'basic' | 'icon';
|
|
72
62
|
text?: string | Observable<string>;
|
|
73
63
|
icon?: string;
|
|
74
|
-
color?:
|
|
64
|
+
color?: ThemePalette;
|
|
75
65
|
class?: string;
|
|
76
66
|
click?: (record: any) => void;
|
|
77
67
|
pop?: boolean;
|
|
78
68
|
popTitle?: string | Observable<string>;
|
|
79
69
|
popDescription?: string | Observable<string>;
|
|
80
|
-
popOkColor?:
|
|
70
|
+
popOkColor?: ThemePalette;
|
|
81
71
|
popOkText?: string | Observable<string>;
|
|
82
|
-
popCloseColor?:
|
|
72
|
+
popCloseColor?: ThemePalette;
|
|
83
73
|
popCloseText?: string | Observable<string>;
|
|
84
74
|
children?: MtxGridColumnButton[];
|
|
85
75
|
iif?: (record: any) => boolean;
|
|
86
76
|
tooltip?: string | Observable<string>;
|
|
87
77
|
disabled?: boolean;
|
|
88
78
|
}
|
|
89
|
-
/**
|
|
90
|
-
* Column selection
|
|
91
|
-
*/
|
|
79
|
+
/** The properties of column selection item. */
|
|
92
80
|
export interface MtxGridColumnSelectionItem {
|
|
93
81
|
label: string | Observable<string>;
|
|
94
82
|
field: string;
|
|
@@ -96,29 +84,23 @@ export interface MtxGridColumnSelectionItem {
|
|
|
96
84
|
hide?: boolean;
|
|
97
85
|
disabled?: boolean;
|
|
98
86
|
}
|
|
99
|
-
/**
|
|
100
|
-
* Cell template
|
|
101
|
-
*/
|
|
87
|
+
/** Cell template. */
|
|
102
88
|
export interface MtxGridCellTemplate {
|
|
103
89
|
[key: string]: TemplateRef<any>;
|
|
104
90
|
}
|
|
105
|
-
/**
|
|
106
|
-
* Row selection formatter
|
|
107
|
-
*/
|
|
91
|
+
/** Row selection formatter. */
|
|
108
92
|
export interface MtxGridRowSelectionFormatter {
|
|
109
93
|
disabled?: (rowData: any, index?: number) => boolean;
|
|
110
94
|
hideCheckbox?: (rowData: any, index?: number) => boolean;
|
|
111
95
|
}
|
|
112
|
-
/**
|
|
113
|
-
* Row class formatter
|
|
114
|
-
*/
|
|
96
|
+
/** Row class formatter. */
|
|
115
97
|
export interface MtxGridRowClassFormatter {
|
|
116
98
|
[className: string]: (rowData: any, index?: number) => boolean;
|
|
117
99
|
}
|
|
118
|
-
/**
|
|
119
|
-
* Column menu component
|
|
120
|
-
*/
|
|
100
|
+
/** Column menu. */
|
|
121
101
|
export interface MtxGridColumnMenu {
|
|
122
102
|
menuPanel: MatMenu;
|
|
123
103
|
menuTrigger: MatMenuTrigger;
|
|
124
104
|
}
|
|
105
|
+
/** Possible button type values. */
|
|
106
|
+
export declare type MtxGridButtonType = 'raised' | 'stroked' | 'flat' | 'icon' | 'fab' | 'mini-fab';
|