@ng-matero/extensions 16.0.3 → 16.1.0
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/grid/cell.mjs +18 -8
- package/esm2022/grid/column-menu.mjs +2 -2
- package/esm2022/grid/grid-module.mjs +10 -2
- package/esm2022/grid/grid-pipes.mjs +42 -19
- package/esm2022/grid/interfaces.mjs +1 -1
- package/fesm2022/mtxGrid.mjs +65 -27
- package/fesm2022/mtxGrid.mjs.map +1 -1
- package/grid/column-menu.d.ts +2 -2
- package/grid/grid-module.d.ts +10 -9
- package/grid/grid-pipes.d.ts +10 -0
- package/grid/interfaces.d.ts +20 -5
- package/package.json +7 -7
package/grid/column-menu.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
2
1
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
2
|
+
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
3
3
|
import { MatCheckboxChange } from '@angular/material/checkbox';
|
|
4
|
-
import { MatMenu, MatMenuTrigger } from '@angular/material/menu';
|
|
5
4
|
import { ThemePalette } from '@angular/material/core';
|
|
5
|
+
import { MatMenu, MatMenuTrigger } from '@angular/material/menu';
|
|
6
6
|
import { MtxGridButtonType, MtxGridColumn, MtxGridColumnPinOption, MtxGridColumnPinValue } from './interfaces';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export declare class MtxGridColumnMenu {
|
package/grid/grid-module.d.ts
CHANGED
|
@@ -14,16 +14,17 @@ import * as i12 from "@angular/material/button";
|
|
|
14
14
|
import * as i13 from "@angular/material/progress-bar";
|
|
15
15
|
import * as i14 from "@angular/material/chips";
|
|
16
16
|
import * as i15 from "@angular/material/tooltip";
|
|
17
|
-
import * as i16 from "@angular/material/
|
|
18
|
-
import * as i17 from "@angular/material/
|
|
19
|
-
import * as i18 from "@angular/material/
|
|
20
|
-
import * as i19 from "@angular/material/
|
|
21
|
-
import * as i20 from "@angular/
|
|
22
|
-
import * as i21 from "@
|
|
23
|
-
import * as i22 from "@ng-matero/extensions/
|
|
24
|
-
import * as i23 from "
|
|
17
|
+
import * as i16 from "@angular/material/badge";
|
|
18
|
+
import * as i17 from "@angular/material/icon";
|
|
19
|
+
import * as i18 from "@angular/material/select";
|
|
20
|
+
import * as i19 from "@angular/material/form-field";
|
|
21
|
+
import * as i20 from "@angular/material/menu";
|
|
22
|
+
import * as i21 from "@angular/cdk/drag-drop";
|
|
23
|
+
import * as i22 from "@ng-matero/extensions/dialog";
|
|
24
|
+
import * as i23 from "@ng-matero/extensions/core";
|
|
25
|
+
import * as i24 from "./column-resize/column-resize-module";
|
|
25
26
|
export declare class MtxGridModule {
|
|
26
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<MtxGridModule, never>;
|
|
27
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MtxGridModule, [typeof i1.MtxGrid, typeof i2.MtxGridCell, typeof i3.MtxGridColumnMenu, typeof i4.MtxGridExpansionToggle, typeof i1.MtxGridSelectableCell, typeof i5.MtxGridRowClassPipe, typeof i5.MtxGridColClassPipe, typeof i5.MtxGridCellActionTooltipPipe, typeof i5.MtxGridCellActionDisablePipe, typeof i5.MtxGridCellSummaryPipe], [typeof i6.CommonModule, typeof i7.FormsModule, typeof i8.MatTableModule, typeof i9.MatSortModule, typeof i10.MatPaginatorModule, typeof i11.MatCheckboxModule, typeof i12.MatButtonModule, typeof i13.MatProgressBarModule, typeof i14.MatChipsModule, typeof i15.MatTooltipModule, typeof i16.
|
|
28
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MtxGridModule, [typeof i1.MtxGrid, typeof i2.MtxGridCell, typeof i3.MtxGridColumnMenu, typeof i4.MtxGridExpansionToggle, typeof i1.MtxGridSelectableCell, typeof i5.MtxGridRowClassPipe, typeof i5.MtxGridColClassPipe, typeof i5.MtxGridCellActionsPipe, typeof i5.MtxGridCellActionTooltipPipe, typeof i5.MtxGridCellActionBadgePipe, typeof i5.MtxGridCellActionDisablePipe, typeof i5.MtxGridCellSummaryPipe], [typeof i6.CommonModule, typeof i7.FormsModule, typeof i8.MatTableModule, typeof i9.MatSortModule, typeof i10.MatPaginatorModule, typeof i11.MatCheckboxModule, typeof i12.MatButtonModule, typeof i13.MatProgressBarModule, typeof i14.MatChipsModule, typeof i15.MatTooltipModule, typeof i16.MatBadgeModule, typeof i17.MatIconModule, typeof i18.MatSelectModule, typeof i19.MatFormFieldModule, typeof i20.MatMenuModule, typeof i21.DragDropModule, typeof i22.MtxDialogModule, typeof i23.MtxPipesModule, typeof i24.MatColumnResizeModule], [typeof i1.MtxGrid, typeof i2.MtxGridCell, typeof i3.MtxGridColumnMenu, typeof i4.MtxGridExpansionToggle, typeof i1.MtxGridSelectableCell, typeof i24.MatColumnResizeModule, typeof i5.MtxGridRowClassPipe, typeof i5.MtxGridColClassPipe, typeof i5.MtxGridCellActionTooltipPipe, typeof i5.MtxGridCellActionDisablePipe, typeof i5.MtxGridCellSummaryPipe]>;
|
|
28
29
|
static ɵinj: i0.ɵɵInjectorDeclaration<MtxGridModule>;
|
|
29
30
|
}
|
package/grid/grid-pipes.d.ts
CHANGED
|
@@ -12,11 +12,21 @@ export declare class MtxGridRowClassPipe implements PipeTransform {
|
|
|
12
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<MtxGridRowClassPipe, never>;
|
|
13
13
|
static ɵpipe: i0.ɵɵPipeDeclaration<MtxGridRowClassPipe, "rowClass", false>;
|
|
14
14
|
}
|
|
15
|
+
export declare class MtxGridCellActionsPipe implements PipeTransform {
|
|
16
|
+
transform(btns?: MtxGridColumnButton[] | ((rowData: any) => MtxGridColumnButton[]), rowData?: Record<string, any>, rowChangeRecord?: KeyValueChangeRecord<string, any>, currentValue?: any): MtxGridColumnButton<any>[];
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MtxGridCellActionsPipe, never>;
|
|
18
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<MtxGridCellActionsPipe, "cellActions", false>;
|
|
19
|
+
}
|
|
15
20
|
export declare class MtxGridCellActionTooltipPipe implements PipeTransform {
|
|
16
21
|
transform(btn: MtxGridColumnButton): import("./interfaces").MtxGridColumnButtonTooltip;
|
|
17
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<MtxGridCellActionTooltipPipe, never>;
|
|
18
23
|
static ɵpipe: i0.ɵɵPipeDeclaration<MtxGridCellActionTooltipPipe, "cellActionTooltip", false>;
|
|
19
24
|
}
|
|
25
|
+
export declare class MtxGridCellActionBadgePipe implements PipeTransform {
|
|
26
|
+
transform(btn: MtxGridColumnButton): import("./interfaces").MtxGridColumnButtonBadge;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MtxGridCellActionBadgePipe, never>;
|
|
28
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<MtxGridCellActionBadgePipe, "cellActionBadge", false>;
|
|
29
|
+
}
|
|
20
30
|
export declare class MtxGridCellActionDisablePipe implements PipeTransform {
|
|
21
31
|
transform(btn: MtxGridColumnButton, rowData: Record<string, any>, rowChangeRecord?: KeyValueChangeRecord<string, any>, currentValue?: any): boolean;
|
|
22
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<MtxGridCellActionDisablePipe, never>;
|
package/grid/interfaces.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import { MatBadgePosition, MatBadgeSize } from '@angular/material/badge';
|
|
2
3
|
import { ThemePalette } from '@angular/material/core';
|
|
3
4
|
import { SortDirection } from '@angular/material/sort';
|
|
4
5
|
import { TooltipPosition, TooltipTouchGestures } from '@angular/material/tooltip';
|
|
@@ -22,7 +23,7 @@ export interface MtxGridColumn<T = any> {
|
|
|
22
23
|
type?: MtxGridColumnType;
|
|
23
24
|
typeParameter?: MtxGridColumnTypeParameter;
|
|
24
25
|
tag?: MtxGridColumnTag;
|
|
25
|
-
buttons?: MtxGridColumnButton<T>[];
|
|
26
|
+
buttons?: MtxGridColumnButton<T>[] | ((rowData: T) => MtxGridColumnButton<T>[]);
|
|
26
27
|
formatter?: (rowData: T, colDef?: MtxGridColumn) => any;
|
|
27
28
|
cellTemplate?: TemplateRef<any> | null;
|
|
28
29
|
showExpand?: boolean;
|
|
@@ -38,7 +39,7 @@ export interface MtxGridColumnPinOption {
|
|
|
38
39
|
value: MtxGridColumnPinValue;
|
|
39
40
|
}
|
|
40
41
|
/** Possible column type values. */
|
|
41
|
-
export declare type MtxGridColumnType = '
|
|
42
|
+
export declare type MtxGridColumnType = 'button' | 'tag' | 'link' | 'image' | 'boolean' | 'number' | 'currency' | 'percent' | 'date';
|
|
42
43
|
/** Column type parameter. */
|
|
43
44
|
export interface MtxGridColumnTypeParameter {
|
|
44
45
|
currencyCode?: string;
|
|
@@ -67,7 +68,7 @@ export interface MtxGridColumnTagValue {
|
|
|
67
68
|
}
|
|
68
69
|
/** The properties of column button. */
|
|
69
70
|
export interface MtxGridColumnButton<T = any> {
|
|
70
|
-
type?:
|
|
71
|
+
type?: MtxGridButtonType;
|
|
71
72
|
text?: string | Observable<string>;
|
|
72
73
|
icon?: string;
|
|
73
74
|
color?: ThemePalette;
|
|
@@ -75,8 +76,9 @@ export interface MtxGridColumnButton<T = any> {
|
|
|
75
76
|
disabled?: boolean | ((rowData: T) => boolean);
|
|
76
77
|
click?: (rowData: T) => void;
|
|
77
78
|
iif?: (rowData: T) => boolean;
|
|
78
|
-
pop?: MtxGridColumnButtonPop;
|
|
79
|
+
pop?: string | Observable<string> | MtxGridColumnButtonPop;
|
|
79
80
|
tooltip?: string | Observable<string> | MtxGridColumnButtonTooltip;
|
|
81
|
+
badge?: number | string | Observable<string> | MtxGridColumnButtonBadge;
|
|
80
82
|
}
|
|
81
83
|
/** The properties of column button pop. */
|
|
82
84
|
export interface MtxGridColumnButtonPop {
|
|
@@ -91,10 +93,23 @@ export interface MtxGridColumnButtonPop {
|
|
|
91
93
|
export interface MtxGridColumnButtonTooltip {
|
|
92
94
|
message: string | Observable<string>;
|
|
93
95
|
position?: TooltipPosition;
|
|
96
|
+
positionAtOrigin?: boolean;
|
|
94
97
|
class?: any;
|
|
95
98
|
hideDelay?: number;
|
|
96
99
|
showDelay?: number;
|
|
97
100
|
touchGestures?: TooltipTouchGestures;
|
|
101
|
+
disabled?: boolean;
|
|
102
|
+
}
|
|
103
|
+
/** The properties of column button badge. */
|
|
104
|
+
export interface MtxGridColumnButtonBadge {
|
|
105
|
+
content: number | string | Observable<string>;
|
|
106
|
+
description?: string | Observable<string>;
|
|
107
|
+
color?: ThemePalette;
|
|
108
|
+
position?: MatBadgePosition;
|
|
109
|
+
size?: MatBadgeSize;
|
|
110
|
+
overlap?: boolean;
|
|
111
|
+
disabled?: boolean;
|
|
112
|
+
hidden?: boolean;
|
|
98
113
|
}
|
|
99
114
|
/** Cell template. */
|
|
100
115
|
export interface MtxGridCellTemplate {
|
|
@@ -110,7 +125,7 @@ export interface MtxGridRowClassFormatter<T = any> {
|
|
|
110
125
|
[className: string]: (rowData: T, index: number) => boolean;
|
|
111
126
|
}
|
|
112
127
|
/** Possible button type values. */
|
|
113
|
-
export type MtxGridButtonType = 'raised' | 'stroked' | 'flat' | 'icon' | 'fab' | 'mini-fab';
|
|
128
|
+
export type MtxGridButtonType = 'basic' | 'raised' | 'stroked' | 'flat' | 'icon' | 'fab' | 'mini-fab';
|
|
114
129
|
/**
|
|
115
130
|
* Represents the default options for the grid that can be configured
|
|
116
131
|
* using the `MTX_GRID_DEFAULT_OPTIONS` injection token.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ng-matero/extensions",
|
|
3
|
-
"version": "16.0
|
|
3
|
+
"version": "16.1.0",
|
|
4
4
|
"description": "Angular Material Extensions",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -72,18 +72,18 @@
|
|
|
72
72
|
"esm": "./esm2022/alert/mtxAlert.mjs",
|
|
73
73
|
"default": "./fesm2022/mtxAlert.mjs"
|
|
74
74
|
},
|
|
75
|
-
"./button": {
|
|
76
|
-
"types": "./button/index.d.ts",
|
|
77
|
-
"esm2022": "./esm2022/button/mtxButton.mjs",
|
|
78
|
-
"esm": "./esm2022/button/mtxButton.mjs",
|
|
79
|
-
"default": "./fesm2022/mtxButton.mjs"
|
|
80
|
-
},
|
|
81
75
|
"./checkbox-group": {
|
|
82
76
|
"types": "./checkbox-group/index.d.ts",
|
|
83
77
|
"esm2022": "./esm2022/checkbox-group/mtxCheckboxGroup.mjs",
|
|
84
78
|
"esm": "./esm2022/checkbox-group/mtxCheckboxGroup.mjs",
|
|
85
79
|
"default": "./fesm2022/mtxCheckboxGroup.mjs"
|
|
86
80
|
},
|
|
81
|
+
"./button": {
|
|
82
|
+
"types": "./button/index.d.ts",
|
|
83
|
+
"esm2022": "./esm2022/button/mtxButton.mjs",
|
|
84
|
+
"esm": "./esm2022/button/mtxButton.mjs",
|
|
85
|
+
"default": "./fesm2022/mtxButton.mjs"
|
|
86
|
+
},
|
|
87
87
|
"./colorpicker": {
|
|
88
88
|
"types": "./colorpicker/index.d.ts",
|
|
89
89
|
"esm2022": "./esm2022/colorpicker/mtxColorpicker.mjs",
|