@ng-matero/extensions 16.1.3 → 16.3.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/_index.scss +0 -3
- package/_theming.scss +0 -3
- package/alert/_alert-theme.scss +12 -28
- package/alert/alert.scss +28 -0
- package/colorpicker/_colorpicker-theme.scss +20 -8
- package/colorpicker/colorpicker-toggle.scss +23 -17
- package/column-resize/column-resize-notifier.d.ts +1 -1
- package/column-resize/polyfill.d.ts +1 -3
- package/column-resize/resizable.d.ts +1 -0
- package/column-resize/resize-strategy.d.ts +4 -3
- package/core/style/_sass-utils.scss +49 -0
- package/core/theming/_all-theme.scss +0 -2
- package/core/tokens/_token-utils.scss +127 -0
- package/core/tokens/m2/_index.scss +49 -0
- package/core/tokens/m2/mdc/_plain-tooltip.scss +72 -0
- package/core/tokens/m2/mtx/_alert.scss +55 -0
- package/core/tokens/m2/mtx/_colorpicker.scss +55 -0
- package/core/tokens/m2/mtx/_datetimepicker.scss +155 -0
- package/core/tokens/m2/mtx/_drawer.scss +45 -0
- package/core/tokens/m2/mtx/_grid.scss +57 -0
- package/core/tokens/m2/mtx/_loader.scss +45 -0
- package/core/tokens/m2/mtx/_popover.scss +46 -0
- package/core/tokens/m2/mtx/_progress.scss +56 -0
- package/core/tokens/m2/mtx/_select.scss +83 -0
- package/core/tokens/m2/mtx/_split.scss +54 -0
- package/core/typography/_typography.scss +203 -36
- package/datetimepicker/_datetimepicker-theme.scss +31 -183
- package/datetimepicker/calendar-body.scss +81 -1
- package/datetimepicker/calendar.scss +33 -3
- package/datetimepicker/clock.scss +50 -10
- package/datetimepicker/datetimepicker-content.scss +12 -0
- package/datetimepicker/datetimepicker-toggle.scss +23 -17
- package/datetimepicker/time.scss +41 -1
- package/drawer/_drawer-theme.scss +6 -10
- package/drawer/drawer-container.scss +11 -0
- package/esm2022/alert/alert.mjs +4 -4
- package/esm2022/colorpicker/colorpicker-toggle.mjs +2 -2
- package/esm2022/column-resize/column-resize-directives/column-resize-flex.mjs +3 -9
- package/esm2022/column-resize/column-resize-directives/column-resize.mjs +3 -9
- package/esm2022/column-resize/column-resize-directives/constants.mjs +1 -1
- package/esm2022/column-resize/column-resize-notifier.mjs +7 -2
- package/esm2022/column-resize/column-resize.mjs +3 -3
- package/esm2022/column-resize/event-dispatcher.mjs +5 -2
- package/esm2022/column-resize/polyfill.mjs +3 -19
- package/esm2022/column-resize/resizable.mjs +7 -7
- package/esm2022/column-resize/resize-ref.mjs +1 -1
- package/esm2022/column-resize/resize-strategy.mjs +16 -10
- package/esm2022/datetimepicker/calendar-body.mjs +2 -2
- package/esm2022/datetimepicker/calendar.mjs +3 -3
- package/esm2022/datetimepicker/clock.mjs +2 -2
- package/esm2022/datetimepicker/datetimepicker-toggle.mjs +2 -2
- package/esm2022/datetimepicker/datetimepicker.mjs +3 -3
- package/esm2022/datetimepicker/time.mjs +3 -3
- package/esm2022/drawer/drawer-container.mjs +3 -3
- package/esm2022/grid/cell.mjs +3 -19
- package/esm2022/grid/column-resize/column-resize-directives/common.mjs +1 -8
- package/esm2022/grid/column-resize/overlay-handle.mjs +11 -6
- package/esm2022/grid/column-resize/resizable-directives/common.mjs +1 -1
- package/esm2022/grid/column-resize/resizable-directives/resizable.mjs +3 -2
- package/esm2022/grid/column-resize/resize-strategy.mjs +10 -5
- package/esm2022/grid/grid-module.mjs +13 -9
- package/esm2022/grid/grid-utils.mjs +1 -9
- package/esm2022/grid/grid.mjs +28 -21
- package/esm2022/loader/loader.mjs +2 -2
- package/esm2022/photoviewer/mtxPhotoviewer.mjs +5 -0
- package/esm2022/photoviewer/photoviewer-module.mjs +17 -0
- package/esm2022/photoviewer/photoviewer.mjs +63 -0
- package/esm2022/photoviewer/public-api.mjs +3 -0
- package/esm2022/popover/popover-interfaces.mjs +1 -1
- package/esm2022/popover/popover.mjs +13 -3
- package/esm2022/progress/progress.mjs +4 -4
- package/esm2022/select/select.mjs +11 -3
- package/esm2022/split/split.mjs +2 -2
- package/esm2022/tooltip/tooltip.mjs +2 -2
- package/fesm2022/mtxAlert.mjs +3 -3
- package/fesm2022/mtxAlert.mjs.map +1 -1
- package/fesm2022/mtxColorpicker.mjs +2 -2
- package/fesm2022/mtxColorpicker.mjs.map +1 -1
- package/fesm2022/mtxColumnResize.mjs +38 -52
- package/fesm2022/mtxColumnResize.mjs.map +1 -1
- package/fesm2022/mtxDatetimepicker.mjs +12 -12
- package/fesm2022/mtxDatetimepicker.mjs.map +1 -1
- package/fesm2022/mtxDrawer.mjs +2 -2
- package/fesm2022/mtxDrawer.mjs.map +1 -1
- package/fesm2022/mtxGrid.mjs +188 -197
- package/fesm2022/mtxGrid.mjs.map +1 -1
- package/fesm2022/mtxLoader.mjs +2 -2
- package/fesm2022/mtxLoader.mjs.map +1 -1
- package/fesm2022/mtxPhotoviewer.mjs +84 -0
- package/fesm2022/mtxPhotoviewer.mjs.map +1 -0
- package/fesm2022/mtxPopover.mjs +12 -2
- package/fesm2022/mtxPopover.mjs.map +1 -1
- package/fesm2022/mtxProgress.mjs +3 -3
- package/fesm2022/mtxProgress.mjs.map +1 -1
- package/fesm2022/mtxSelect.mjs +10 -2
- package/fesm2022/mtxSelect.mjs.map +1 -1
- package/fesm2022/mtxSplit.mjs +2 -2
- package/fesm2022/mtxSplit.mjs.map +1 -1
- package/fesm2022/mtxTooltip.mjs +2 -2
- package/fesm2022/mtxTooltip.mjs.map +1 -1
- package/grid/_grid-theme.scss +14 -86
- package/grid/cell.d.ts +0 -2
- package/grid/cell.scss +0 -1
- package/grid/column-resize/_column-resize.scss +88 -94
- package/grid/column-resize/column-resize-directives/common.d.ts +0 -7
- package/grid/column-resize/overlay-handle.d.ts +1 -0
- package/grid/column-resize/resize-strategy.d.ts +2 -2
- package/grid/grid-module.d.ts +4 -4
- package/grid/grid-utils.d.ts +0 -6
- package/grid/grid.d.ts +10 -7
- package/grid/grid.scss +103 -15
- package/loader/_loader-theme.scss +6 -6
- package/loader/loader.scss +7 -0
- package/package.json +25 -25
- package/{slider → photoviewer}/index.d.ts +1 -1
- package/photoviewer/photoviewer-module.d.ts +7 -0
- package/photoviewer/photoviewer.d.ts +17 -0
- package/photoviewer/public-api.d.ts +2 -0
- package/popover/_popover-theme.scss +6 -40
- package/popover/popover-interfaces.d.ts +1 -0
- package/popover/popover.d.ts +6 -1
- package/popover/popover.scss +36 -2
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/progress/_progress-theme.scss +6 -25
- package/progress/progress.scss +42 -0
- package/select/_select-theme.scss +19 -133
- package/select/select.d.ts +1 -0
- package/select/select.scss +147 -36
- package/split/_split-theme.scss +21 -18
- package/split/split.scss +13 -0
- package/tooltip/_tooltip-theme.scss +19 -24
- package/tooltip/tooltip.scss +18 -17
- package/esm2022/slider/mtxSlider.mjs +0 -5
- package/esm2022/slider/public-api.mjs +0 -3
- package/esm2022/slider/slider-module.mjs +0 -19
- package/esm2022/slider/slider.mjs +0 -1115
- package/fesm2022/mtxSlider.mjs +0 -1137
- package/fesm2022/mtxSlider.mjs.map +0 -1
- package/slider/_slider-theme.import.scss +0 -2
- package/slider/_slider-theme.scss +0 -232
- package/slider/public-api.d.ts +0 -2
- package/slider/slider-module.d.ts +0 -9
- package/slider/slider.d.ts +0 -277
- package/slider/slider.scss +0 -514
package/fesm2022/mtxGrid.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Inject, Directive, Component, ChangeDetectionStrategy, ViewEncapsulation, HostBinding, Input, Pipe, EventEmitter, Output,
|
|
2
|
+
import { CSP_NONCE, Injectable, Inject, Optional, Directive, Component, ChangeDetectionStrategy, ViewEncapsulation, ViewChild, HostBinding, Input, NgModule, Pipe, EventEmitter, Output, HostListener, InjectionToken, ContentChildren } from '@angular/core';
|
|
3
3
|
import * as i3$1 from '@angular/common';
|
|
4
4
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
5
5
|
import * as i2$1 from '@angular/forms';
|
|
@@ -30,84 +30,22 @@ import * as i7 from '@angular/material/badge';
|
|
|
30
30
|
import { MatBadgeModule } from '@angular/material/badge';
|
|
31
31
|
import * as i7$1 from '@angular/cdk/drag-drop';
|
|
32
32
|
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
33
|
-
import * as
|
|
34
|
-
import {
|
|
35
|
-
import * as i1$1 from '@ng-matero/extensions/dialog';
|
|
36
|
-
import { MtxDialogModule } from '@ng-matero/extensions/dialog';
|
|
37
|
-
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
38
|
-
import { SelectionModel } from '@angular/cdk/collections';
|
|
33
|
+
import * as i4 from '@angular/cdk/overlay';
|
|
34
|
+
import { OverlayModule } from '@angular/cdk/overlay';
|
|
39
35
|
import * as i2 from '@ng-matero/extensions/column-resize';
|
|
40
36
|
import { CdkFlexTableResizeStrategy, ResizeStrategy, ColumnResizeNotifier, HeaderRowEventDispatcher, ColumnResizeNotifierSource, TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER, ColumnResize, ResizeOverlayHandle, Resizable } from '@ng-matero/extensions/column-resize';
|
|
41
37
|
export { TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER as MAT_TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER } from '@ng-matero/extensions/column-resize';
|
|
42
38
|
import * as i1 from '@angular/cdk/table';
|
|
43
39
|
import { _COALESCED_STYLE_SCHEDULER } from '@angular/cdk/table';
|
|
44
40
|
import * as i3 from '@angular/cdk/bidi';
|
|
45
|
-
import * as
|
|
46
|
-
import {
|
|
47
|
-
import
|
|
41
|
+
import * as i14 from '@ng-matero/extensions/core';
|
|
42
|
+
import { MtxPipesModule } from '@ng-matero/extensions/core';
|
|
43
|
+
import * as i1$1 from '@ng-matero/extensions/dialog';
|
|
44
|
+
import { MtxDialogModule } from '@ng-matero/extensions/dialog';
|
|
45
|
+
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
46
|
+
import { SelectionModel } from '@angular/cdk/collections';
|
|
48
47
|
import { isObservable } from 'rxjs';
|
|
49
48
|
|
|
50
|
-
class MtxGridUtils {
|
|
51
|
-
constructor() { }
|
|
52
|
-
/**
|
|
53
|
-
* Get cell's value based on the data and column's field (e.g. `a.b.c`)
|
|
54
|
-
* @param rowData Row data
|
|
55
|
-
* @param colDef Column definition
|
|
56
|
-
* @returns
|
|
57
|
-
*/
|
|
58
|
-
getCellValue(rowData, colDef) {
|
|
59
|
-
const keyArr = colDef.field ? colDef.field.split('.') : [];
|
|
60
|
-
let tmp = '';
|
|
61
|
-
keyArr.forEach((key, i) => {
|
|
62
|
-
if (i === 0) {
|
|
63
|
-
tmp = rowData[key];
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
tmp = tmp && tmp[key];
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
return tmp;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Get all data of a col
|
|
73
|
-
* @param data All data
|
|
74
|
-
* @param colDef Column definition
|
|
75
|
-
* @returns
|
|
76
|
-
*/
|
|
77
|
-
getColData(data, colDef) {
|
|
78
|
-
return data.map(rowData => this.getCellValue(rowData, colDef));
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Remove white spaces in a string and convert string to array
|
|
82
|
-
* @param str
|
|
83
|
-
* @returns
|
|
84
|
-
*/
|
|
85
|
-
str2arr(str) {
|
|
86
|
-
return str.replace(/[\r\n\s]/g, '').split(',');
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Whether the value is empty (`null`, `undefined`, `''`, `[]`)
|
|
90
|
-
* @param value
|
|
91
|
-
* @returns
|
|
92
|
-
*/
|
|
93
|
-
isEmpty(value) {
|
|
94
|
-
return value == null || value.toString() === '';
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Whether the value contain HTML
|
|
98
|
-
* @param value
|
|
99
|
-
* @returns
|
|
100
|
-
*/
|
|
101
|
-
isContainHTML(value) {
|
|
102
|
-
return /<\/?[a-z][\s\S]*>/i.test(value);
|
|
103
|
-
}
|
|
104
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MtxGridUtils, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
105
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MtxGridUtils }); }
|
|
106
|
-
}
|
|
107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MtxGridUtils, decorators: [{
|
|
108
|
-
type: Injectable
|
|
109
|
-
}], ctorParameters: function () { return []; } });
|
|
110
|
-
|
|
111
49
|
/**
|
|
112
50
|
* @license
|
|
113
51
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -119,13 +57,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImpor
|
|
|
119
57
|
* Overrides CdkFlexTableResizeStrategy to match mat-column elements.
|
|
120
58
|
*/
|
|
121
59
|
class MatFlexTableResizeStrategy extends CdkFlexTableResizeStrategy {
|
|
122
|
-
constructor(columnResize, styleScheduler, table, document) {
|
|
123
|
-
super(columnResize, styleScheduler, table, document);
|
|
60
|
+
constructor(columnResize, styleScheduler, table, document, nonce) {
|
|
61
|
+
super(columnResize, styleScheduler, table, document, nonce);
|
|
124
62
|
}
|
|
125
63
|
getColumnCssClass(cssFriendlyColumnName) {
|
|
126
64
|
return `mat-column-${cssFriendlyColumnName}`;
|
|
127
65
|
}
|
|
128
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MatFlexTableResizeStrategy, deps: [{ token: i2.ColumnResize }, { token: _COALESCED_STYLE_SCHEDULER }, { token: i1.CdkTable }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
66
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MatFlexTableResizeStrategy, deps: [{ token: i2.ColumnResize }, { token: _COALESCED_STYLE_SCHEDULER }, { token: i1.CdkTable }, { token: DOCUMENT }, { token: CSP_NONCE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
129
67
|
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MatFlexTableResizeStrategy }); }
|
|
130
68
|
}
|
|
131
69
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MatFlexTableResizeStrategy, decorators: [{
|
|
@@ -136,19 +74,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImpor
|
|
|
136
74
|
}] }, { type: i1.CdkTable }, { type: undefined, decorators: [{
|
|
137
75
|
type: Inject,
|
|
138
76
|
args: [DOCUMENT]
|
|
77
|
+
}] }, { type: undefined, decorators: [{
|
|
78
|
+
type: Inject,
|
|
79
|
+
args: [CSP_NONCE]
|
|
80
|
+
}, {
|
|
81
|
+
type: Optional
|
|
139
82
|
}] }]; } });
|
|
140
83
|
const FLEX_RESIZE_STRATEGY_PROVIDER = {
|
|
141
84
|
provide: ResizeStrategy,
|
|
142
85
|
useClass: MatFlexTableResizeStrategy,
|
|
143
86
|
};
|
|
144
87
|
|
|
145
|
-
/**
|
|
146
|
-
* @license
|
|
147
|
-
* Copyright Google LLC All Rights Reserved.
|
|
148
|
-
*
|
|
149
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
150
|
-
* found in the LICENSE file at https://angular.io/license
|
|
151
|
-
*/
|
|
152
88
|
const PROVIDERS = [
|
|
153
89
|
ColumnResizeNotifier,
|
|
154
90
|
HeaderRowEventDispatcher,
|
|
@@ -206,6 +142,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImpor
|
|
|
206
142
|
}]
|
|
207
143
|
}], ctorParameters: function () { return [{ type: i2.ColumnResizeNotifier }, { type: i0.ElementRef }, { type: i2.HeaderRowEventDispatcher }, { type: i0.NgZone }, { type: i2.ColumnResizeNotifierSource }]; } });
|
|
208
144
|
|
|
145
|
+
/**
|
|
146
|
+
* @license
|
|
147
|
+
* Copyright Google LLC All Rights Reserved.
|
|
148
|
+
*
|
|
149
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
150
|
+
* found in the LICENSE file at https://angular.io/license
|
|
151
|
+
*/
|
|
152
|
+
/**
|
|
153
|
+
* Explicitly enables column resizing for a flexbox-based mat-table.
|
|
154
|
+
* Individual columns must be annotated specifically.
|
|
155
|
+
*/
|
|
156
|
+
class MatColumnResizeFlex extends AbstractMatColumnResize {
|
|
157
|
+
constructor(columnResizeNotifier, elementRef, eventDispatcher, ngZone, notifier) {
|
|
158
|
+
super();
|
|
159
|
+
this.columnResizeNotifier = columnResizeNotifier;
|
|
160
|
+
this.elementRef = elementRef;
|
|
161
|
+
this.eventDispatcher = eventDispatcher;
|
|
162
|
+
this.ngZone = ngZone;
|
|
163
|
+
this.notifier = notifier;
|
|
164
|
+
}
|
|
165
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MatColumnResizeFlex, deps: [{ token: i2.ColumnResizeNotifier }, { token: i0.ElementRef }, { token: i2.HeaderRowEventDispatcher }, { token: i0.NgZone }, { token: i2.ColumnResizeNotifierSource }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
166
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.7", type: MatColumnResizeFlex, selector: "mat-table[columnResize]", host: { classAttribute: "mat-column-resize-flex" }, providers: [...FLEX_PROVIDERS, { provide: ColumnResize, useExisting: MatColumnResizeFlex }], usesInheritance: true, ngImport: i0 }); }
|
|
167
|
+
}
|
|
168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MatColumnResizeFlex, decorators: [{
|
|
169
|
+
type: Directive,
|
|
170
|
+
args: [{
|
|
171
|
+
selector: 'mat-table[columnResize]',
|
|
172
|
+
host: FLEX_HOST_BINDINGS,
|
|
173
|
+
providers: [...FLEX_PROVIDERS, { provide: ColumnResize, useExisting: MatColumnResizeFlex }],
|
|
174
|
+
}]
|
|
175
|
+
}], ctorParameters: function () { return [{ type: i2.ColumnResizeNotifier }, { type: i0.ElementRef }, { type: i2.HeaderRowEventDispatcher }, { type: i0.NgZone }, { type: i2.ColumnResizeNotifierSource }]; } });
|
|
176
|
+
|
|
209
177
|
/**
|
|
210
178
|
* @license
|
|
211
179
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -233,14 +201,16 @@ class MatColumnResizeOverlayHandle extends ResizeOverlayHandle {
|
|
|
233
201
|
}
|
|
234
202
|
updateResizeActive(active) {
|
|
235
203
|
super.updateResizeActive(active);
|
|
204
|
+
const originHeight = this.resizeRef.origin.nativeElement.offsetHeight;
|
|
205
|
+
this.topElement.nativeElement.style.height = `${originHeight}px`;
|
|
236
206
|
this.resizeRef.overlayRef.updateSize({
|
|
237
207
|
height: active
|
|
238
208
|
? this.columnResize.getTableHeight()
|
|
239
|
-
:
|
|
209
|
+
: originHeight,
|
|
240
210
|
});
|
|
241
211
|
}
|
|
242
212
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MatColumnResizeOverlayHandle, deps: [{ token: i1.CdkColumnDef }, { token: i2.ColumnResize }, { token: i3.Directionality }, { token: i0.ElementRef }, { token: i2.HeaderRowEventDispatcher }, { token: i0.NgZone }, { token: i2.ColumnResizeNotifierSource }, { token: i2.ResizeRef }, { token: _COALESCED_STYLE_SCHEDULER }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
243
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.7", type: MatColumnResizeOverlayHandle, selector: "ng-component", host: { classAttribute: "mat-column-resize-overlay-thumb" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
213
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.7", type: MatColumnResizeOverlayHandle, selector: "ng-component", host: { classAttribute: "mat-column-resize-overlay-thumb" }, viewQueries: [{ propertyName: "topElement", first: true, predicate: ["top"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: '<div #top class="mat-column-resize-overlay-thumb-top"></div>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
244
214
|
}
|
|
245
215
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MatColumnResizeOverlayHandle, decorators: [{
|
|
246
216
|
type: Component,
|
|
@@ -248,7 +218,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImpor
|
|
|
248
218
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
249
219
|
encapsulation: ViewEncapsulation.None,
|
|
250
220
|
host: { class: 'mat-column-resize-overlay-thumb' },
|
|
251
|
-
template: '',
|
|
221
|
+
template: '<div #top class="mat-column-resize-overlay-thumb-top"></div>',
|
|
252
222
|
}]
|
|
253
223
|
}], ctorParameters: function () { return [{ type: i1.CdkColumnDef }, { type: i2.ColumnResize }, { type: i3.Directionality }, { type: i0.ElementRef }, { type: i2.HeaderRowEventDispatcher }, { type: i0.NgZone }, { type: i2.ColumnResizeNotifierSource }, { type: i2.ResizeRef }, { type: i1._CoalescedStyleScheduler, decorators: [{
|
|
254
224
|
type: Inject,
|
|
@@ -256,7 +226,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImpor
|
|
|
256
226
|
}] }, { type: undefined, decorators: [{
|
|
257
227
|
type: Inject,
|
|
258
228
|
args: [DOCUMENT]
|
|
259
|
-
}] }]; }
|
|
229
|
+
}] }]; }, propDecorators: { topElement: [{
|
|
230
|
+
type: ViewChild,
|
|
231
|
+
args: ['top', { static: true }]
|
|
232
|
+
}] } });
|
|
260
233
|
|
|
261
234
|
/**
|
|
262
235
|
* @license
|
|
@@ -317,12 +290,13 @@ class MatResizable extends AbstractMatResizable {
|
|
|
317
290
|
this.document = document;
|
|
318
291
|
}
|
|
319
292
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MatResizable, deps: [{ token: i1.CdkColumnDef }, { token: i2.ColumnResize }, { token: i3.Directionality }, { token: DOCUMENT }, { token: i0.ElementRef }, { token: i2.HeaderRowEventDispatcher }, { token: i0.Injector }, { token: i0.NgZone }, { token: i4.Overlay }, { token: i2.ColumnResizeNotifierSource }, { token: i2.ResizeStrategy }, { token: _COALESCED_STYLE_SCHEDULER }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
320
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.7", type: MatResizable, selector: "mat-header-cell[resizable], th[mat-header-cell][resizable]", inputs: { minWidthPx: ["matResizableMinWidthPx", "minWidthPx"], maxWidthPx: ["matResizableMaxWidthPx", "maxWidthPx"], resizable: "resizable" }, host: { properties: { "class": "this.hasResizableClass" } }, usesInheritance: true, ngImport: i0 }); }
|
|
293
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.7", type: MatResizable, selector: "mat-header-cell[resizable], th[mat-header-cell][resizable]", inputs: { minWidthPx: ["matResizableMinWidthPx", "minWidthPx"], maxWidthPx: ["matResizableMaxWidthPx", "maxWidthPx"], resizable: "resizable" }, host: { properties: { "class": "this.hasResizableClass" }, classAttribute: "mat-resizable" }, usesInheritance: true, ngImport: i0 }); }
|
|
321
294
|
}
|
|
322
295
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MatResizable, decorators: [{
|
|
323
296
|
type: Directive,
|
|
324
297
|
args: [{
|
|
325
298
|
selector: 'mat-header-cell[resizable], th[mat-header-cell][resizable]',
|
|
299
|
+
host: RESIZABLE_HOST_BINDINGS,
|
|
326
300
|
inputs: RESIZABLE_INPUTS,
|
|
327
301
|
}]
|
|
328
302
|
}], ctorParameters: function () { return [{ type: i1.CdkColumnDef }, { type: i2.ColumnResize }, { type: i3.Directionality }, { type: undefined, decorators: [{
|
|
@@ -338,6 +312,94 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImpor
|
|
|
338
312
|
type: Input
|
|
339
313
|
}] } });
|
|
340
314
|
|
|
315
|
+
/**
|
|
316
|
+
* @license
|
|
317
|
+
* Copyright Google LLC All Rights Reserved.
|
|
318
|
+
*
|
|
319
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
320
|
+
* found in the LICENSE file at https://angular.io/license
|
|
321
|
+
*/
|
|
322
|
+
const ENTRY_COMMON_COMPONENTS = [MatColumnResizeOverlayHandle];
|
|
323
|
+
class MatColumnResizeCommonModule {
|
|
324
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MatColumnResizeCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
325
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.7", ngImport: i0, type: MatColumnResizeCommonModule, declarations: [MatColumnResizeOverlayHandle], exports: [MatColumnResizeOverlayHandle] }); }
|
|
326
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MatColumnResizeCommonModule }); }
|
|
327
|
+
}
|
|
328
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MatColumnResizeCommonModule, decorators: [{
|
|
329
|
+
type: NgModule,
|
|
330
|
+
args: [{
|
|
331
|
+
declarations: ENTRY_COMMON_COMPONENTS,
|
|
332
|
+
exports: ENTRY_COMMON_COMPONENTS,
|
|
333
|
+
}]
|
|
334
|
+
}] });
|
|
335
|
+
const IMPORTS = [OverlayModule, MatColumnResizeCommonModule];
|
|
336
|
+
class MatColumnResizeModule {
|
|
337
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MatColumnResizeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
338
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.7", ngImport: i0, type: MatColumnResizeModule, declarations: [MatColumnResize, MatColumnResizeFlex, MatResizable], imports: [OverlayModule, MatColumnResizeCommonModule], exports: [MatColumnResize, MatColumnResizeFlex, MatResizable] }); }
|
|
339
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MatColumnResizeModule, imports: [IMPORTS] }); }
|
|
340
|
+
}
|
|
341
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MatColumnResizeModule, decorators: [{
|
|
342
|
+
type: NgModule,
|
|
343
|
+
args: [{
|
|
344
|
+
imports: IMPORTS,
|
|
345
|
+
declarations: [MatColumnResize, MatColumnResizeFlex, MatResizable],
|
|
346
|
+
exports: [MatColumnResize, MatColumnResizeFlex, MatResizable],
|
|
347
|
+
}]
|
|
348
|
+
}] });
|
|
349
|
+
|
|
350
|
+
class MtxGridUtils {
|
|
351
|
+
constructor() { }
|
|
352
|
+
/**
|
|
353
|
+
* Get cell's value based on the data and column's field (e.g. `a.b.c`)
|
|
354
|
+
* @param rowData Row data
|
|
355
|
+
* @param colDef Column definition
|
|
356
|
+
* @returns
|
|
357
|
+
*/
|
|
358
|
+
getCellValue(rowData, colDef) {
|
|
359
|
+
const keyArr = colDef.field ? colDef.field.split('.') : [];
|
|
360
|
+
let tmp = '';
|
|
361
|
+
keyArr.forEach((key, i) => {
|
|
362
|
+
if (i === 0) {
|
|
363
|
+
tmp = rowData[key];
|
|
364
|
+
}
|
|
365
|
+
else {
|
|
366
|
+
tmp = tmp && tmp[key];
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
return tmp;
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* Get all data of a col
|
|
373
|
+
* @param data All data
|
|
374
|
+
* @param colDef Column definition
|
|
375
|
+
* @returns
|
|
376
|
+
*/
|
|
377
|
+
getColData(data, colDef) {
|
|
378
|
+
return data.map(rowData => this.getCellValue(rowData, colDef));
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Whether the value is empty (`null`, `undefined`, `''`, `[]`)
|
|
382
|
+
* @param value
|
|
383
|
+
* @returns
|
|
384
|
+
*/
|
|
385
|
+
isEmpty(value) {
|
|
386
|
+
return value == null || value.toString() === '';
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Whether the value contain HTML
|
|
390
|
+
* @param value
|
|
391
|
+
* @returns
|
|
392
|
+
*/
|
|
393
|
+
isContainHTML(value) {
|
|
394
|
+
return /<\/?[a-z][\s\S]*>/i.test(value);
|
|
395
|
+
}
|
|
396
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MtxGridUtils, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
397
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MtxGridUtils }); }
|
|
398
|
+
}
|
|
399
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MtxGridUtils, decorators: [{
|
|
400
|
+
type: Injectable
|
|
401
|
+
}], ctorParameters: function () { return []; } });
|
|
402
|
+
|
|
341
403
|
class MtxGridColClassPipe {
|
|
342
404
|
transform(colDef, rowData, rowChangeRecord, currentValue) {
|
|
343
405
|
if (typeof colDef.class === 'string') {
|
|
@@ -540,27 +602,12 @@ class MtxGridCell {
|
|
|
540
602
|
btn.click?.(rowData);
|
|
541
603
|
}
|
|
542
604
|
}
|
|
543
|
-
/** Preview enlarged image */
|
|
544
|
-
_onImagePreview(urlStr) {
|
|
545
|
-
const imgs = [];
|
|
546
|
-
this._utils.str2arr(urlStr).forEach((url, index) => {
|
|
547
|
-
imgs.push({ title: index + 1 + '', src: url });
|
|
548
|
-
});
|
|
549
|
-
const footerToolbar = imgs.length > 1
|
|
550
|
-
? ['zoomIn', 'zoomOut', 'prev', 'next', 'rotateRight', 'rotateLeft', 'actualSize']
|
|
551
|
-
: ['zoomIn', 'zoomOut', 'rotateRight', 'rotateLeft', 'actualSize'];
|
|
552
|
-
const options = {
|
|
553
|
-
title: imgs.length > 1,
|
|
554
|
-
footerToolbar,
|
|
555
|
-
};
|
|
556
|
-
const photoviewer = new PhotoViewer(imgs, options);
|
|
557
|
-
}
|
|
558
605
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MtxGridCell, deps: [{ token: i1$1.MtxDialog }, { token: MtxGridUtils }, { token: i0.KeyValueDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
559
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.7", type: MtxGridCell, selector: "mtx-grid-cell", inputs: { rowData: "rowData", colDef: "colDef", data: "data", summary: "summary", placeholder: "placeholder" }, outputs: { rowDataChange: "rowDataChange" }, exportAs: ["mtxGridCell"], ngImport: i0, template: "<span *ngIf=\"summary; else customCellFormattingTpl\"\r\n [title]=\"_getFormatterTooltip((data | cellSummary: colDef))\"\r\n [innerHTML]=\"_getText((data | cellSummary: colDef))\">\r\n</span>\r\n\r\n<!-- Custom formatting -->\r\n<ng-template #customCellFormattingTpl>\r\n <span *ngIf=\"colDef.formatter; else defaultCellFormattingTpl\"\r\n [title]=\"_getFormatterTooltip(colDef.formatter(rowData, colDef))\"\r\n [innerHTML]=\"_getText(colDef.formatter(rowData, colDef))\">\r\n </span>\r\n</ng-template>\r\n\r\n<!-- Default formatting -->\r\n<ng-template #defaultCellFormattingTpl>\r\n <ng-container [ngSwitch]=\"colDef.type\">\r\n <!-- Buttons -->\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <ng-container\r\n *ngFor=\"let btn of colDef.buttons | cellActions: rowData: rowChangeRecord: rowChangeRecord?.currentValue\">\r\n <ng-container *ngIf=\"!btn.iif || btn.iif(rowData)\">\r\n <ng-container [ngSwitch]=\"btn.type\">\r\n <ng-container *ngSwitchCase=\"'raised'\">\r\n <button mat-raised-button [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\" *ngIf=\"btn.icon\">{{btn.icon}}</mat-icon>\r\n <span>{{btn.text | toObservable | async}}</span>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'stroked'\">\r\n <button mat-stroked-button [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\" *ngIf=\"btn.icon\">{{btn.icon}}</mat-icon>\r\n <span>{{btn.text | toObservable | async}}</span>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'flat'\">\r\n <button mat-flat-button [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\" *ngIf=\"btn.icon\">{{btn.icon}}</mat-icon>\r\n <span>{{btn.text | toObservable | async}}</span>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'icon'\">\r\n <button mat-icon-button [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\">{{btn.icon}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'fab'\">\r\n <button mat-fab [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\">{{btn.icon}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'mini-fab'\">\r\n <button mat-mini-fab [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\">{{btn.icon}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <button mat-button [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\" *ngIf=\"btn.icon\">{{btn.icon}}</mat-icon>\r\n <span>{{btn.text | toObservable | async}}</span>\r\n </button>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <!-- Tag -->\r\n <ng-container *ngSwitchCase=\"'tag'\">\r\n <mat-chip-listbox *ngIf=\"colDef.tag && colDef.tag[_value]; else tagEmptyTpl\">\r\n <mat-chip color=\"primary\" [ngClass]=\"['bg-' + colDef.tag[_value].color]\">\r\n {{colDef.tag[_value].text}}\r\n </mat-chip>\r\n </mat-chip-listbox>\r\n <ng-template #tagEmptyTpl>{{_value}}</ng-template>\r\n </ng-container>\r\n <!-- Link -->\r\n <ng-container *ngSwitchCase=\"'link'\">\r\n <a [href]=\"_value\" target=\"_blank\">{{_value}}</a>\r\n </ng-container>\r\n <!-- Image -->\r\n <ng-container *ngSwitchCase=\"'image'\">\r\n <img class=\"mtx-grid-img\" [src]=\"_value\" (click)=\"_onImagePreview(_value)\">\r\n </ng-container>\r\n <!-- Boolean -->\r\n <ng-container *ngSwitchCase=\"'boolean'\">\r\n <span [title]=\"_getTooltip(_value)\">{{_getText(_value)}}</span>\r\n </ng-container>\r\n <!-- Number -->\r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <span [title]=\"_getTooltip(_value | number: colDef.typeParameter?.digitsInfo:\r\n colDef.typeParameter?.locale)\">\r\n {{_getText(_value | number: colDef.typeParameter?.digitsInfo:\r\n colDef.typeParameter?.locale)}}\r\n </span>\r\n </ng-container>\r\n <!-- Currency -->\r\n <ng-container *ngSwitchCase=\"'currency'\">\r\n <span [title]=\"_getTooltip(_value | currency: colDef.typeParameter?.currencyCode:\r\n colDef.typeParameter?.display:\r\n colDef.typeParameter?.digitsInfo:\r\n colDef.typeParameter?.locale)\">\r\n {{_getText(_value | currency: colDef.typeParameter?.currencyCode:\r\n colDef.typeParameter?.display:\r\n colDef.typeParameter?.digitsInfo:\r\n colDef.typeParameter?.locale)}}\r\n </span>\r\n </ng-container>\r\n <!-- Percent -->\r\n <ng-container *ngSwitchCase=\"'percent'\">\r\n <span [title]=\"_getTooltip(_value | percent: colDef.typeParameter?.digitsInfo:\r\n colDef.typeParameter?.locale)\">\r\n {{_getText(_value | percent: colDef.typeParameter?.digitsInfo:\r\n colDef.typeParameter?.locale)}}\r\n </span>\r\n </ng-container>\r\n <!-- Date -->\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <span [title]=\"_getTooltip(_value | date: colDef.typeParameter?.format:\r\n colDef.typeParameter?.timezone:\r\n colDef.typeParameter?.locale)\">\r\n {{_getText(_value | date: colDef.typeParameter?.format:\r\n colDef.typeParameter?.timezone:\r\n colDef.typeParameter?.locale)}}\r\n </span>\r\n </ng-container>\r\n <!-- Default -->\r\n <ng-container *ngSwitchDefault>\r\n <span [title]=\"_getTooltip(_value)\">{{_getText(_value)}}</span>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n", styles: [".mtx-grid-img{display:inline-block;width:32px;border-radius:4px;vertical-align:middle;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i3$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i3$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i4$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatMiniFabButton, selector: "button[mat-mini-fab]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatFabButton, selector: "button[mat-fab]", inputs: ["disabled", "disableRipple", "color", "tabIndex", "extended"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disabled", "disableRipple", "tabIndex", "role", "id", "aria-label", "aria-description", "value", "removable", "highlighted"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "component", type: i5.MatChipListbox, selector: "mat-chip-listbox", inputs: ["tabIndex", "multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i7.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgeColor", "matBadgeOverlap", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.DecimalPipe, name: "number" }, { kind: "pipe", type: i3$1.PercentPipe, name: "percent" }, { kind: "pipe", type: i3$1.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i3$1.DatePipe, name: "date" }, { kind: "pipe", type: i14.MtxToObservablePipe, name: "toObservable" }, { kind: "pipe", type: MtxGridCellActionsPipe, name: "cellActions" }, { kind: "pipe", type: MtxGridCellActionTooltipPipe, name: "cellActionTooltip" }, { kind: "pipe", type: MtxGridCellActionBadgePipe, name: "cellActionBadge" }, { kind: "pipe", type: MtxGridCellActionDisablePipe, name: "cellActionDisable" }, { kind: "pipe", type: MtxGridCellSummaryPipe, name: "cellSummary" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
606
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.7", type: MtxGridCell, selector: "mtx-grid-cell", inputs: { rowData: "rowData", colDef: "colDef", data: "data", summary: "summary", placeholder: "placeholder" }, outputs: { rowDataChange: "rowDataChange" }, exportAs: ["mtxGridCell"], ngImport: i0, template: "<span *ngIf=\"summary; else customCellFormattingTpl\"\r\n [title]=\"_getFormatterTooltip((data | cellSummary: colDef))\"\r\n [innerHTML]=\"_getText((data | cellSummary: colDef))\">\r\n</span>\r\n\r\n<!-- Custom formatting -->\r\n<ng-template #customCellFormattingTpl>\r\n <span *ngIf=\"colDef.formatter; else defaultCellFormattingTpl\"\r\n [title]=\"_getFormatterTooltip(colDef.formatter(rowData, colDef))\"\r\n [innerHTML]=\"_getText(colDef.formatter(rowData, colDef))\">\r\n </span>\r\n</ng-template>\r\n\r\n<!-- Default formatting -->\r\n<ng-template #defaultCellFormattingTpl>\r\n <ng-container [ngSwitch]=\"colDef.type\">\r\n <!-- Buttons -->\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <ng-container\r\n *ngFor=\"let btn of colDef.buttons | cellActions: rowData: rowChangeRecord: rowChangeRecord?.currentValue\">\r\n <ng-container *ngIf=\"!btn.iif || btn.iif(rowData)\">\r\n <ng-container [ngSwitch]=\"btn.type\">\r\n <ng-container *ngSwitchCase=\"'raised'\">\r\n <button mat-raised-button [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\" *ngIf=\"btn.icon\">{{btn.icon}}</mat-icon>\r\n <span>{{btn.text | toObservable | async}}</span>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'stroked'\">\r\n <button mat-stroked-button [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\" *ngIf=\"btn.icon\">{{btn.icon}}</mat-icon>\r\n <span>{{btn.text | toObservable | async}}</span>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'flat'\">\r\n <button mat-flat-button [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\" *ngIf=\"btn.icon\">{{btn.icon}}</mat-icon>\r\n <span>{{btn.text | toObservable | async}}</span>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'icon'\">\r\n <button mat-icon-button [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\">{{btn.icon}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'fab'\">\r\n <button mat-fab [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\">{{btn.icon}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'mini-fab'\">\r\n <button mat-mini-fab [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\">{{btn.icon}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <button mat-button [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\" *ngIf=\"btn.icon\">{{btn.icon}}</mat-icon>\r\n <span>{{btn.text | toObservable | async}}</span>\r\n </button>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <!-- Tag -->\r\n <ng-container *ngSwitchCase=\"'tag'\">\r\n <mat-chip-listbox *ngIf=\"colDef.tag && colDef.tag[_value]; else tagEmptyTpl\">\r\n <mat-chip color=\"primary\" [ngClass]=\"['bg-' + colDef.tag[_value].color]\">\r\n {{colDef.tag[_value].text}}\r\n </mat-chip>\r\n </mat-chip-listbox>\r\n <ng-template #tagEmptyTpl>{{_value}}</ng-template>\r\n </ng-container>\r\n <!-- Link -->\r\n <ng-container *ngSwitchCase=\"'link'\">\r\n <a [href]=\"_value\" target=\"_blank\">{{_value}}</a>\r\n </ng-container>\r\n <!-- Image -->\r\n <ng-container *ngSwitchCase=\"'image'\">\r\n <img class=\"mtx-grid-img\" [src]=\"_value\">\r\n </ng-container>\r\n <!-- Boolean -->\r\n <ng-container *ngSwitchCase=\"'boolean'\">\r\n <span [title]=\"_getTooltip(_value)\">{{_getText(_value)}}</span>\r\n </ng-container>\r\n <!-- Number -->\r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <span [title]=\"_getTooltip(_value | number: colDef.typeParameter?.digitsInfo:\r\n colDef.typeParameter?.locale)\">\r\n {{_getText(_value | number: colDef.typeParameter?.digitsInfo:\r\n colDef.typeParameter?.locale)}}\r\n </span>\r\n </ng-container>\r\n <!-- Currency -->\r\n <ng-container *ngSwitchCase=\"'currency'\">\r\n <span [title]=\"_getTooltip(_value | currency: colDef.typeParameter?.currencyCode:\r\n colDef.typeParameter?.display:\r\n colDef.typeParameter?.digitsInfo:\r\n colDef.typeParameter?.locale)\">\r\n {{_getText(_value | currency: colDef.typeParameter?.currencyCode:\r\n colDef.typeParameter?.display:\r\n colDef.typeParameter?.digitsInfo:\r\n colDef.typeParameter?.locale)}}\r\n </span>\r\n </ng-container>\r\n <!-- Percent -->\r\n <ng-container *ngSwitchCase=\"'percent'\">\r\n <span [title]=\"_getTooltip(_value | percent: colDef.typeParameter?.digitsInfo:\r\n colDef.typeParameter?.locale)\">\r\n {{_getText(_value | percent: colDef.typeParameter?.digitsInfo:\r\n colDef.typeParameter?.locale)}}\r\n </span>\r\n </ng-container>\r\n <!-- Date -->\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <span [title]=\"_getTooltip(_value | date: colDef.typeParameter?.format:\r\n colDef.typeParameter?.timezone:\r\n colDef.typeParameter?.locale)\">\r\n {{_getText(_value | date: colDef.typeParameter?.format:\r\n colDef.typeParameter?.timezone:\r\n colDef.typeParameter?.locale)}}\r\n </span>\r\n </ng-container>\r\n <!-- Default -->\r\n <ng-container *ngSwitchDefault>\r\n <span [title]=\"_getTooltip(_value)\">{{_getText(_value)}}</span>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n", styles: [".mtx-grid-img{display:inline-block;width:32px;border-radius:4px;vertical-align:middle}\n"], dependencies: [{ kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i3$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i3$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i4$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatMiniFabButton, selector: "button[mat-mini-fab]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatFabButton, selector: "button[mat-fab]", inputs: ["disabled", "disableRipple", "color", "tabIndex", "extended"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disabled", "disableRipple", "tabIndex", "role", "id", "aria-label", "aria-description", "value", "removable", "highlighted"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "component", type: i5.MatChipListbox, selector: "mat-chip-listbox", inputs: ["tabIndex", "multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i7.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgeColor", "matBadgeOverlap", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.DecimalPipe, name: "number" }, { kind: "pipe", type: i3$1.PercentPipe, name: "percent" }, { kind: "pipe", type: i3$1.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i3$1.DatePipe, name: "date" }, { kind: "pipe", type: i14.MtxToObservablePipe, name: "toObservable" }, { kind: "pipe", type: MtxGridCellActionsPipe, name: "cellActions" }, { kind: "pipe", type: MtxGridCellActionTooltipPipe, name: "cellActionTooltip" }, { kind: "pipe", type: MtxGridCellActionBadgePipe, name: "cellActionBadge" }, { kind: "pipe", type: MtxGridCellActionDisablePipe, name: "cellActionDisable" }, { kind: "pipe", type: MtxGridCellSummaryPipe, name: "cellSummary" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
560
607
|
}
|
|
561
608
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MtxGridCell, decorators: [{
|
|
562
609
|
type: Component,
|
|
563
|
-
args: [{ selector: 'mtx-grid-cell', exportAs: 'mtxGridCell', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<span *ngIf=\"summary; else customCellFormattingTpl\"\r\n [title]=\"_getFormatterTooltip((data | cellSummary: colDef))\"\r\n [innerHTML]=\"_getText((data | cellSummary: colDef))\">\r\n</span>\r\n\r\n<!-- Custom formatting -->\r\n<ng-template #customCellFormattingTpl>\r\n <span *ngIf=\"colDef.formatter; else defaultCellFormattingTpl\"\r\n [title]=\"_getFormatterTooltip(colDef.formatter(rowData, colDef))\"\r\n [innerHTML]=\"_getText(colDef.formatter(rowData, colDef))\">\r\n </span>\r\n</ng-template>\r\n\r\n<!-- Default formatting -->\r\n<ng-template #defaultCellFormattingTpl>\r\n <ng-container [ngSwitch]=\"colDef.type\">\r\n <!-- Buttons -->\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <ng-container\r\n *ngFor=\"let btn of colDef.buttons | cellActions: rowData: rowChangeRecord: rowChangeRecord?.currentValue\">\r\n <ng-container *ngIf=\"!btn.iif || btn.iif(rowData)\">\r\n <ng-container [ngSwitch]=\"btn.type\">\r\n <ng-container *ngSwitchCase=\"'raised'\">\r\n <button mat-raised-button [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\" *ngIf=\"btn.icon\">{{btn.icon}}</mat-icon>\r\n <span>{{btn.text | toObservable | async}}</span>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'stroked'\">\r\n <button mat-stroked-button [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\" *ngIf=\"btn.icon\">{{btn.icon}}</mat-icon>\r\n <span>{{btn.text | toObservable | async}}</span>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'flat'\">\r\n <button mat-flat-button [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\" *ngIf=\"btn.icon\">{{btn.icon}}</mat-icon>\r\n <span>{{btn.text | toObservable | async}}</span>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'icon'\">\r\n <button mat-icon-button [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\">{{btn.icon}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'fab'\">\r\n <button mat-fab [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\">{{btn.icon}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'mini-fab'\">\r\n <button mat-mini-fab [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\">{{btn.icon}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <button mat-button [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\" *ngIf=\"btn.icon\">{{btn.icon}}</mat-icon>\r\n <span>{{btn.text | toObservable | async}}</span>\r\n </button>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <!-- Tag -->\r\n <ng-container *ngSwitchCase=\"'tag'\">\r\n <mat-chip-listbox *ngIf=\"colDef.tag && colDef.tag[_value]; else tagEmptyTpl\">\r\n <mat-chip color=\"primary\" [ngClass]=\"['bg-' + colDef.tag[_value].color]\">\r\n {{colDef.tag[_value].text}}\r\n </mat-chip>\r\n </mat-chip-listbox>\r\n <ng-template #tagEmptyTpl>{{_value}}</ng-template>\r\n </ng-container>\r\n <!-- Link -->\r\n <ng-container *ngSwitchCase=\"'link'\">\r\n <a [href]=\"_value\" target=\"_blank\">{{_value}}</a>\r\n </ng-container>\r\n <!-- Image -->\r\n <ng-container *ngSwitchCase=\"'image'\">\r\n <img class=\"mtx-grid-img\" [src]=\"_value\" (click)=\"_onImagePreview(_value)\">\r\n </ng-container>\r\n <!-- Boolean -->\r\n <ng-container *ngSwitchCase=\"'boolean'\">\r\n <span [title]=\"_getTooltip(_value)\">{{_getText(_value)}}</span>\r\n </ng-container>\r\n <!-- Number -->\r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <span [title]=\"_getTooltip(_value | number: colDef.typeParameter?.digitsInfo:\r\n colDef.typeParameter?.locale)\">\r\n {{_getText(_value | number: colDef.typeParameter?.digitsInfo:\r\n colDef.typeParameter?.locale)}}\r\n </span>\r\n </ng-container>\r\n <!-- Currency -->\r\n <ng-container *ngSwitchCase=\"'currency'\">\r\n <span [title]=\"_getTooltip(_value | currency: colDef.typeParameter?.currencyCode:\r\n colDef.typeParameter?.display:\r\n colDef.typeParameter?.digitsInfo:\r\n colDef.typeParameter?.locale)\">\r\n {{_getText(_value | currency: colDef.typeParameter?.currencyCode:\r\n colDef.typeParameter?.display:\r\n colDef.typeParameter?.digitsInfo:\r\n colDef.typeParameter?.locale)}}\r\n </span>\r\n </ng-container>\r\n <!-- Percent -->\r\n <ng-container *ngSwitchCase=\"'percent'\">\r\n <span [title]=\"_getTooltip(_value | percent: colDef.typeParameter?.digitsInfo:\r\n colDef.typeParameter?.locale)\">\r\n {{_getText(_value | percent: colDef.typeParameter?.digitsInfo:\r\n colDef.typeParameter?.locale)}}\r\n </span>\r\n </ng-container>\r\n <!-- Date -->\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <span [title]=\"_getTooltip(_value | date: colDef.typeParameter?.format:\r\n colDef.typeParameter?.timezone:\r\n colDef.typeParameter?.locale)\">\r\n {{_getText(_value | date: colDef.typeParameter?.format:\r\n colDef.typeParameter?.timezone:\r\n colDef.typeParameter?.locale)}}\r\n </span>\r\n </ng-container>\r\n <!-- Default -->\r\n <ng-container *ngSwitchDefault>\r\n <span [title]=\"_getTooltip(_value)\">{{_getText(_value)}}</span>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n", styles: [".mtx-grid-img{display:inline-block;width:32px;border-radius:4px;vertical-align:middle;cursor:pointer}\n"] }]
|
|
610
|
+
args: [{ selector: 'mtx-grid-cell', exportAs: 'mtxGridCell', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<span *ngIf=\"summary; else customCellFormattingTpl\"\r\n [title]=\"_getFormatterTooltip((data | cellSummary: colDef))\"\r\n [innerHTML]=\"_getText((data | cellSummary: colDef))\">\r\n</span>\r\n\r\n<!-- Custom formatting -->\r\n<ng-template #customCellFormattingTpl>\r\n <span *ngIf=\"colDef.formatter; else defaultCellFormattingTpl\"\r\n [title]=\"_getFormatterTooltip(colDef.formatter(rowData, colDef))\"\r\n [innerHTML]=\"_getText(colDef.formatter(rowData, colDef))\">\r\n </span>\r\n</ng-template>\r\n\r\n<!-- Default formatting -->\r\n<ng-template #defaultCellFormattingTpl>\r\n <ng-container [ngSwitch]=\"colDef.type\">\r\n <!-- Buttons -->\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <ng-container\r\n *ngFor=\"let btn of colDef.buttons | cellActions: rowData: rowChangeRecord: rowChangeRecord?.currentValue\">\r\n <ng-container *ngIf=\"!btn.iif || btn.iif(rowData)\">\r\n <ng-container [ngSwitch]=\"btn.type\">\r\n <ng-container *ngSwitchCase=\"'raised'\">\r\n <button mat-raised-button [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\" *ngIf=\"btn.icon\">{{btn.icon}}</mat-icon>\r\n <span>{{btn.text | toObservable | async}}</span>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'stroked'\">\r\n <button mat-stroked-button [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\" *ngIf=\"btn.icon\">{{btn.icon}}</mat-icon>\r\n <span>{{btn.text | toObservable | async}}</span>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'flat'\">\r\n <button mat-flat-button [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\" *ngIf=\"btn.icon\">{{btn.icon}}</mat-icon>\r\n <span>{{btn.text | toObservable | async}}</span>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'icon'\">\r\n <button mat-icon-button [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\">{{btn.icon}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'fab'\">\r\n <button mat-fab [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\">{{btn.icon}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'mini-fab'\">\r\n <button mat-mini-fab [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\">{{btn.icon}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <button mat-button [color]=\"btn.color || 'primary'\" type=\"button\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class || '']\"\r\n [disabled]=\"btn | cellActionDisable: rowData: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [matTooltip]=\"(btn | cellActionTooltip).message | toObservable | async\"\r\n [matTooltipClass]=\"(btn | cellActionTooltip).class\"\r\n [matTooltipHideDelay]=\"(btn | cellActionTooltip).hideDelay\"\r\n [matTooltipShowDelay]=\"(btn | cellActionTooltip).showDelay\"\r\n [matTooltipPosition]=\"(btn | cellActionTooltip).position || 'below'\"\r\n [matTooltipPositionAtOrigin]=\"(btn | cellActionTooltip).positionAtOrigin\"\r\n [matTooltipTouchGestures]=\"(btn | cellActionTooltip).touchGestures || 'auto'\"\r\n [matTooltipDisabled]=\"(btn | cellActionTooltip).disabled\"\r\n [matBadge]=\"(btn | cellActionBadge).content | toObservable | async\"\r\n [matBadgeDescription]=\"(btn | cellActionBadge).description | toObservable | async\"\r\n [matBadgeColor]=\"(btn | cellActionBadge).color\"\r\n [matBadgePosition]=\"(btn | cellActionBadge).position || 'above after'\"\r\n [matBadgeSize]=\"(btn | cellActionBadge).size || 'medium'\"\r\n [matBadgeOverlap]=\"(btn | cellActionBadge).overlap\"\r\n [matBadgeDisabled]=\"(btn | cellActionBadge).disabled\"\r\n [matBadgeHidden]=\"(btn | cellActionBadge).hidden\"\r\n (click)=\"_onActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\" *ngIf=\"btn.icon\">{{btn.icon}}</mat-icon>\r\n <span>{{btn.text | toObservable | async}}</span>\r\n </button>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <!-- Tag -->\r\n <ng-container *ngSwitchCase=\"'tag'\">\r\n <mat-chip-listbox *ngIf=\"colDef.tag && colDef.tag[_value]; else tagEmptyTpl\">\r\n <mat-chip color=\"primary\" [ngClass]=\"['bg-' + colDef.tag[_value].color]\">\r\n {{colDef.tag[_value].text}}\r\n </mat-chip>\r\n </mat-chip-listbox>\r\n <ng-template #tagEmptyTpl>{{_value}}</ng-template>\r\n </ng-container>\r\n <!-- Link -->\r\n <ng-container *ngSwitchCase=\"'link'\">\r\n <a [href]=\"_value\" target=\"_blank\">{{_value}}</a>\r\n </ng-container>\r\n <!-- Image -->\r\n <ng-container *ngSwitchCase=\"'image'\">\r\n <img class=\"mtx-grid-img\" [src]=\"_value\">\r\n </ng-container>\r\n <!-- Boolean -->\r\n <ng-container *ngSwitchCase=\"'boolean'\">\r\n <span [title]=\"_getTooltip(_value)\">{{_getText(_value)}}</span>\r\n </ng-container>\r\n <!-- Number -->\r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <span [title]=\"_getTooltip(_value | number: colDef.typeParameter?.digitsInfo:\r\n colDef.typeParameter?.locale)\">\r\n {{_getText(_value | number: colDef.typeParameter?.digitsInfo:\r\n colDef.typeParameter?.locale)}}\r\n </span>\r\n </ng-container>\r\n <!-- Currency -->\r\n <ng-container *ngSwitchCase=\"'currency'\">\r\n <span [title]=\"_getTooltip(_value | currency: colDef.typeParameter?.currencyCode:\r\n colDef.typeParameter?.display:\r\n colDef.typeParameter?.digitsInfo:\r\n colDef.typeParameter?.locale)\">\r\n {{_getText(_value | currency: colDef.typeParameter?.currencyCode:\r\n colDef.typeParameter?.display:\r\n colDef.typeParameter?.digitsInfo:\r\n colDef.typeParameter?.locale)}}\r\n </span>\r\n </ng-container>\r\n <!-- Percent -->\r\n <ng-container *ngSwitchCase=\"'percent'\">\r\n <span [title]=\"_getTooltip(_value | percent: colDef.typeParameter?.digitsInfo:\r\n colDef.typeParameter?.locale)\">\r\n {{_getText(_value | percent: colDef.typeParameter?.digitsInfo:\r\n colDef.typeParameter?.locale)}}\r\n </span>\r\n </ng-container>\r\n <!-- Date -->\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <span [title]=\"_getTooltip(_value | date: colDef.typeParameter?.format:\r\n colDef.typeParameter?.timezone:\r\n colDef.typeParameter?.locale)\">\r\n {{_getText(_value | date: colDef.typeParameter?.format:\r\n colDef.typeParameter?.timezone:\r\n colDef.typeParameter?.locale)}}\r\n </span>\r\n </ng-container>\r\n <!-- Default -->\r\n <ng-container *ngSwitchDefault>\r\n <span [title]=\"_getTooltip(_value)\">{{_getText(_value)}}</span>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n", styles: [".mtx-grid-img{display:inline-block;width:32px;border-radius:4px;vertical-align:middle}\n"] }]
|
|
564
611
|
}], ctorParameters: function () { return [{ type: i1$1.MtxDialog }, { type: MtxGridUtils }, { type: i0.KeyValueDiffers }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { rowData: [{
|
|
565
612
|
type: Input
|
|
566
613
|
}], colDef: [{
|
|
@@ -813,6 +860,8 @@ class MtxGrid {
|
|
|
813
860
|
this.rowStriped = this._defaultOptions?.rowStriped ?? false;
|
|
814
861
|
/** Event emitted when the user clicks the row. */
|
|
815
862
|
this.rowClick = new EventEmitter();
|
|
863
|
+
/** Event emitted when the user attempts to open a context menu. */
|
|
864
|
+
this.rowContextMenu = new EventEmitter();
|
|
816
865
|
// ===== Expandable Row =====
|
|
817
866
|
this.expansionRowStates = [];
|
|
818
867
|
/** Whether the row is expandable. */
|
|
@@ -825,8 +874,6 @@ class MtxGrid {
|
|
|
825
874
|
this.multiSelectable = this._defaultOptions?.multiSelectable ?? true;
|
|
826
875
|
/** Whether the user can select multiple rows with click. */
|
|
827
876
|
this.multiSelectionWithClick = this._defaultOptions?.multiSelectionWithClick ?? false;
|
|
828
|
-
/** The selected row items. */
|
|
829
|
-
this.rowSelected = [];
|
|
830
877
|
/** Whether the row is selectable. */
|
|
831
878
|
this.rowSelectable = this._defaultOptions?.rowSelectable ?? false;
|
|
832
879
|
/** Whether to hide the row selection checkbox. */
|
|
@@ -835,14 +882,16 @@ class MtxGrid {
|
|
|
835
882
|
this.disableRowClickSelection = this._defaultOptions?.disableRowClickSelection ?? false;
|
|
836
883
|
/** The formatter to disable the row selection or hide the row's checkbox. */
|
|
837
884
|
this.rowSelectionFormatter = {};
|
|
885
|
+
/** The selected row items. */
|
|
886
|
+
this.rowSelected = [];
|
|
838
887
|
/** Event emitted when the row is selected. */
|
|
839
|
-
this.
|
|
888
|
+
this.rowSelectedChange = new EventEmitter();
|
|
840
889
|
// ===== Cell Selection =====
|
|
841
890
|
this.cellSelection = [];
|
|
842
891
|
/** Whether the cell is selectable. */
|
|
843
892
|
this.cellSelectable = this._defaultOptions?.cellSelectable ?? true;
|
|
844
893
|
/** Event emitted when the cell is selected. */
|
|
845
|
-
this.
|
|
894
|
+
this.cellSelectedChange = new EventEmitter();
|
|
846
895
|
// ===== Toolbar =====
|
|
847
896
|
/** Whether to show the toolbar. */
|
|
848
897
|
this.showToolbar = this._defaultOptions?.showToolbar ?? false;
|
|
@@ -994,7 +1043,7 @@ class MtxGrid {
|
|
|
994
1043
|
const colValue = this._utils.getCellValue(rowData, colDef);
|
|
995
1044
|
this.cellSelection = []; // reset
|
|
996
1045
|
this.cellSelection.push({ cellData: colValue, rowData, colDef });
|
|
997
|
-
this.
|
|
1046
|
+
this.cellSelectedChange.emit(this.cellSelection);
|
|
998
1047
|
if (this._selectedCell) {
|
|
999
1048
|
this._selectedCell.deselect(); // the selectedCell will be undefined
|
|
1000
1049
|
}
|
|
@@ -1013,7 +1062,7 @@ class MtxGrid {
|
|
|
1013
1062
|
}
|
|
1014
1063
|
this._toggleNormalCheckbox(rowData);
|
|
1015
1064
|
}
|
|
1016
|
-
this.rowClick.emit({ rowData, index });
|
|
1065
|
+
this.rowClick.emit({ event, rowData, index });
|
|
1017
1066
|
}
|
|
1018
1067
|
/** Whether the number of selected elements matches the total number of rows. */
|
|
1019
1068
|
_isAllSelected() {
|
|
@@ -1030,12 +1079,12 @@ class MtxGrid {
|
|
|
1030
1079
|
this.rowSelection.select(row);
|
|
1031
1080
|
}
|
|
1032
1081
|
});
|
|
1033
|
-
this.
|
|
1082
|
+
this.rowSelectedChange.emit(this.rowSelection.selected);
|
|
1034
1083
|
}
|
|
1035
1084
|
/** Select normal row */
|
|
1036
1085
|
_toggleNormalCheckbox(row) {
|
|
1037
1086
|
this.rowSelection.toggle(row);
|
|
1038
|
-
this.
|
|
1087
|
+
this.rowSelectedChange.emit(this.rowSelection.selected);
|
|
1039
1088
|
}
|
|
1040
1089
|
/** Column change event */
|
|
1041
1090
|
_onColumnChange(columns) {
|
|
@@ -1082,8 +1131,11 @@ class MtxGrid {
|
|
|
1082
1131
|
this.tableContainer.nativeElement.scrollLeft = value;
|
|
1083
1132
|
}
|
|
1084
1133
|
}
|
|
1134
|
+
_contextmenu(event, rowData, index) {
|
|
1135
|
+
this.rowContextMenu.emit({ event, rowData, index });
|
|
1136
|
+
}
|
|
1085
1137
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MtxGrid, deps: [{ token: MtxGridUtils }, { token: i0.ChangeDetectorRef }, { token: MTX_GRID_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1086
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.7", type: MtxGrid, selector: "mtx-grid", inputs: { displayedColumns: "displayedColumns", columns: "columns", data: "data", length: "length", loading: "loading", trackBy: "trackBy", columnResizable: "columnResizable", emptyValuePlaceholder: "emptyValuePlaceholder", pageOnFront: "pageOnFront", showPaginator: "showPaginator", pageDisabled: "pageDisabled", showFirstLastButtons: "showFirstLastButtons", pageIndex: "pageIndex", pageSize: "pageSize", pageSizeOptions: "pageSizeOptions", hidePageSize: "hidePageSize", paginationTemplate: "paginationTemplate", sortOnFront: "sortOnFront", sortActive: "sortActive", sortDirection: "sortDirection", sortDisableClear: "sortDisableClear", sortDisabled: "sortDisabled", sortStart: "sortStart", rowHover: "rowHover", rowStriped: "rowStriped", expandable: "expandable", expansionTemplate: "expansionTemplate", multiSelectable: "multiSelectable", multiSelectionWithClick: "multiSelectionWithClick", rowSelected: "rowSelected", rowSelectable: "rowSelectable", hideRowSelectionCheckbox: "hideRowSelectionCheckbox", disableRowClickSelection: "disableRowClickSelection", rowSelectionFormatter: "rowSelectionFormatter", rowClassFormatter: "rowClassFormatter", cellSelectable: "cellSelectable", showToolbar: "showToolbar", toolbarTitle: "toolbarTitle", toolbarTemplate: "toolbarTemplate", columnHideable: "columnHideable", columnHideableChecked: "columnHideableChecked", columnSortable: "columnSortable", columnPinnable: "columnPinnable", columnPinOptions: "columnPinOptions", showColumnMenuButton: "showColumnMenuButton", columnMenuButtonText: "columnMenuButtonText", columnMenuButtonType: "columnMenuButtonType", columnMenuButtonColor: "columnMenuButtonColor", columnMenuButtonClass: "columnMenuButtonClass", columnMenuButtonIcon: "columnMenuButtonIcon", showColumnMenuHeader: "showColumnMenuHeader", columnMenuHeaderText: "columnMenuHeaderText", columnMenuHeaderTemplate: "columnMenuHeaderTemplate", showColumnMenuFooter: "showColumnMenuFooter", columnMenuFooterText: "columnMenuFooterText", columnMenuFooterTemplate: "columnMenuFooterTemplate", noResultText: "noResultText", noResultTemplate: "noResultTemplate", headerTemplate: "headerTemplate", headerExtraTemplate: "headerExtraTemplate", cellTemplate: "cellTemplate", useContentRowTemplate: "useContentRowTemplate", useContentHeaderRowTemplate: "useContentHeaderRowTemplate", useContentFooterRowTemplate: "useContentFooterRowTemplate", showSummary: "showSummary", summaryTemplate: "summaryTemplate", showSidebar: "showSidebar", sidebarTemplate: "sidebarTemplate", showStatusbar: "showStatusbar", statusbarTemplate: "statusbarTemplate" }, outputs: { page: "page", sortChange: "sortChange", rowClick: "rowClick", expansionChange: "expansionChange", rowSelectionChange: "rowSelectionChange", cellSelectionChange: "cellSelectionChange", columnChange: "columnChange" }, host: { classAttribute: "mtx-grid" }, queries: [{ propertyName: "rowDefs", predicate: MatRowDef }, { propertyName: "headerRowDefs", predicate: MatHeaderRowDef }, { propertyName: "footerRowDefs", predicate: MatFooterRow }], viewQueries: [{ propertyName: "table", first: true, predicate: MatTable, descendants: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }, { propertyName: "columnMenu", first: true, predicate: ["columnMenu"], descendants: true }, { propertyName: "tableContainer", first: true, predicate: ["tableContainer"], descendants: true }], exportAs: ["mtxGrid"], usesOnChanges: true, ngImport: i0, template: "<!-- Progress bar-->\r\n<div class=\"mtx-grid-progress\" *ngIf=\"loading\">\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n</div>\r\n\r\n<!-- Toolbar -->\r\n<div class=\"mtx-grid-toolbar\" *ngIf=\"showToolbar\">\r\n <div class=\"mtx-grid-toolbar-content\">\r\n <ng-template [ngIf]=\"toolbarTemplate\" [ngIfElse]=\"defaultToolbarTemplate\">\r\n <ng-template [ngTemplateOutlet]=\"toolbarTemplate\"></ng-template>\r\n </ng-template>\r\n <ng-template #defaultToolbarTemplate>\r\n <div class=\"mtx-grid-toolbar-title\" *ngIf=\"toolbarTitle\">{{toolbarTitle}}</div>\r\n </ng-template>\r\n </div>\r\n <div class=\"mtx-grid-toolbar-actions\">\r\n <mtx-grid-column-menu *ngIf=\"showColumnMenuButton\" #columnMenu\r\n [columns]=\"columns\"\r\n [buttonText]=\"columnMenuButtonText\"\r\n [buttonType]=\"columnMenuButtonType\"\r\n [buttonColor]=\"columnMenuButtonColor\"\r\n [buttonClass]=\"columnMenuButtonClass\"\r\n [buttonIcon]=\"columnMenuButtonIcon\"\r\n [selectable]=\"columnHideable\"\r\n [selectableChecked]=\"columnHideableChecked\"\r\n [sortable]=\"columnSortable\"\r\n [pinnable]=\"columnPinnable\"\r\n [showHeader]=\"showColumnMenuHeader\"\r\n [headerText]=\"columnMenuHeaderText\"\r\n [headerTemplate]=\"columnMenuHeaderTemplate\"\r\n [showFooter]=\"showColumnMenuFooter\"\r\n [footerText]=\"columnMenuFooterText\"\r\n [footerTemplate]=\"columnMenuFooterTemplate\"\r\n [pinOptions]=\"columnPinOptions\"\r\n (columnChange)=\"_onColumnChange($event)\">\r\n </mtx-grid-column-menu>\r\n </div>\r\n</div>\r\n\r\n<div class=\"mtx-grid-main mtx-grid-layout\">\r\n <!-- Table content -->\r\n <div class=\"mtx-grid-content mtx-grid-layout\">\r\n <div #tableContainer class=\"mat-table-container\"\r\n [ngClass]=\"{'mat-table-with-data': !_hasNoResult}\">\r\n <table mat-table *ngIf=\"!columnResizable\"\r\n [ngClass]=\"{'mat-table-hover': rowHover, 'mat-table-striped': rowStriped, 'mat-table-expandable': expandable}\"\r\n [dataSource]=\"dataSource\" [multiTemplateDataRows]=\"expandable\"\r\n matSort\r\n [matSortActive]=\"sortActive\"\r\n [matSortDirection]=\"sortDirection\"\r\n [matSortDisableClear]=\"sortDisableClear\"\r\n [matSortDisabled]=\"sortDisabled\"\r\n [matSortStart]=\"sortStart\"\r\n (matSortChange)=\"_onSortChange($event)\"\r\n [trackBy]=\"trackBy\">\r\n\r\n <ng-container *ngIf=\"rowSelectable && !hideRowSelectionCheckbox\"\r\n matColumnDef=\"MtxGridCheckboxColumnDef\">\r\n <th mat-header-cell *matHeaderCellDef class=\"mtx-grid-checkbox-cell\">\r\n <mat-checkbox *ngIf=\"multiSelectable\"\r\n [checked]=\"rowSelection.hasValue() && _isAllSelected()\"\r\n [indeterminate]=\"rowSelection.hasValue() && !_isAllSelected()\"\r\n (change)=\"$event ? _toggleMasterCheckbox() : null\">\r\n </mat-checkbox>\r\n </th>\r\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\"\r\n class=\"mtx-grid-checkbox-cell\">\r\n <mat-checkbox *ngIf=\"!(rowSelectionFormatter.hideCheckbox && rowSelectionFormatter.hideCheckbox(row, _getIndex(index, dataIndex)))\"\r\n [disabled]=\"rowSelectionFormatter.disabled && rowSelectionFormatter.disabled(row, _getIndex(index, dataIndex))\"\r\n [checked]=\"rowSelection.isSelected(row)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? _toggleNormalCheckbox(row) : null\">\r\n </mat-checkbox>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef class=\"mtx-grid-checkbox-cell\"></td>\r\n </ng-container>\r\n\r\n <ng-container *ngFor=\"let col of columns;\">\r\n <ng-container [matColumnDef]=\"col.field\"\r\n [sticky]=\"col.pinned==='left'\" [stickyEnd]=\"col.pinned==='right'\">\r\n <th mat-header-cell *matHeaderCellDef\r\n [class]=\"col | colClass\"\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'min-width': col.width, 'left': col.left, 'right': col.right}\">\r\n <div class=\"mat-header-cell-inner\">\r\n <ng-template [ngIf]=\"headerTemplate | isTemplateRef\" [ngIfElse]=\"headerTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(headerTemplate)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #headerTpl>\r\n <ng-template [ngIf]=\"$any(headerTemplate)?.[col.field] | isTemplateRef\"\r\n [ngIfElse]=\"defaultHeaderTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(headerTemplate)[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultHeaderTpl>\r\n <div [mat-sort-header]=\"col.sortProp?.id || col.field\"\r\n [disabled]=\"!col.sortable\"\r\n [disableClear]=\"col.sortProp?.disableClear ?? sortDisableClear\"\r\n [arrowPosition]=\"col.sortProp?.arrowPosition!\"\r\n [start]=\"col.sortProp?.start!\">\r\n <span class=\"mtx-grid-expansion-placeholder\" *ngIf=\"col.showExpand\"></span>\r\n <span>{{col.header | toObservable | async}}</span>\r\n <svg class=\"mtx-grid-icon mat-sort-header-icon\" *ngIf=\"col.sortable\"\r\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\"\r\n focusable=\"false\">\r\n <path d=\"M3,13H15V11H3M3,6V8H21V6M3,18H9V16H3V18Z\"></path>\r\n </svg>\r\n </div>\r\n <ng-template [ngTemplateOutlet]=\"headerExtraTplBase\"\r\n [ngTemplateOutletContext]=\"{ $implicit: headerExtraTemplate, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </div>\r\n </th>\r\n\r\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\"\r\n [class]=\"col | colClass: row: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'min-width': col.width, 'left': col.left, 'right': col.right}\"\r\n mtx-grid-selectable-cell (cellSelectionChange)=\"_selectCell($event, row, col)\">\r\n <ng-template [ngIf]=\"cellTemplate | isTemplateRef\" [ngIfElse]=\"cellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(cellTemplate)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #cellTpl>\r\n <ng-template [ngIf]=\"$any(cellTemplate)?.[col.field] | isTemplateRef\"\r\n [ngIfElse]=\"colDefCellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(cellTemplate)[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #colDefCellTpl>\r\n <ng-template [ngIf]=\"col.cellTemplate\" [ngIfElse]=\"defaultCellTpl\"\r\n [ngTemplateOutlet]=\"col.cellTemplate!\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultCellTpl>\r\n <button class=\"mtx-grid-row-expand-button\" *ngIf=\"col.showExpand\"\r\n mat-icon-button mtx-grid-expansion-toggle type=\"button\"\r\n [(opened)]=\"expansionRowStates[dataIndex].expanded\"\r\n (toggleChange)=\"_onExpansionChange($event, row, col, dataIndex);\">\r\n <svg class=\"mtx-grid-icon mtx-grid-row-expand-icon\" viewBox=\"0 0 24 24\"\r\n width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"></path>\r\n </svg>\r\n </button>\r\n\r\n <mtx-grid-cell [rowData]=\"row\" [colDef]=\"col\" [placeholder]=\"emptyValuePlaceholder\"\r\n (rowDataChange)=\"_onRowDataChange($event)\">\r\n </mtx-grid-cell>\r\n </ng-template>\r\n </td>\r\n\r\n <td mat-footer-cell *matFooterCellDef\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'min-width': col.width, 'left': col.left, 'right': col.right}\">\r\n <span class=\"mtx-grid-expansion-placeholder\" *ngIf=\"col.showExpand\"></span>\r\n\r\n <ng-template [ngIf]=\"summaryTemplate | isTemplateRef\" [ngIfElse]=\"summaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(summaryTemplate)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col, data: data }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #summaryTpl>\r\n <ng-template [ngIf]=\"$any(summaryTemplate)?.[col.field] | isTemplateRef\"\r\n [ngIfElse]=\"defaultSummaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(summaryTemplate)[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: _getColData(data, col), colData: _getColData(data, col), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultSummaryTpl>\r\n <mtx-grid-cell [summary]=\"true\" [data]=\"data\" [colDef]=\"col\"\r\n [placeholder]=\"emptyValuePlaceholder\">\r\n </mtx-grid-cell>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-template [ngIf]=\"useContentHeaderRowTemplate\" [ngIfElse]=\"defaultHeaderRowTpl\">\r\n </ng-template>\r\n <ng-template #defaultHeaderRowTpl>\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"useContentRowTemplate\" [ngIfElse]=\"defaultRowTpl\"></ng-template>\r\n <ng-template #defaultRowTpl>\r\n <tr mat-row\r\n *matRowDef=\"let row; let index = index; let dataIndex = dataIndex; columns: displayedColumns;\"\r\n [class]=\"row | rowClass: index: dataIndex: rowClassFormatter\"\r\n [ngClass]=\"{'selected': rowSelection.isSelected(row)}\"\r\n (click)=\"_selectRow($event, row, _getIndex(index, dataIndex))\">\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"_whetherShowSummary\">\r\n <tr mat-footer-row *matFooterRowDef=\"displayedColumns; sticky: true\"></tr>\r\n </ng-template>\r\n <ng-template [ngIf]=\"useContentFooterRowTemplate\"></ng-template>\r\n\r\n <ng-container *ngIf=\"expandable\">\r\n <!-- Expanded Content Column - The expandable row is made up of this one column that spans across all columns -->\r\n <ng-container matColumnDef=\"MtxGridExpansionColumnDef\">\r\n <td mat-cell *matCellDef=\"let row; let dataIndex = dataIndex\"\r\n [attr.colspan]=\"displayedColumns.length\">\r\n <div class=\"mtx-grid-expansion-detail\"\r\n [@expansion]=\"expansionRowStates[dataIndex].expanded ? 'expanded' : 'collapsed'\">\r\n <ng-template [ngTemplateOutlet]=\"expansionTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: dataIndex, expanded: expansionRowStates[dataIndex].expanded }\">\r\n </ng-template>\r\n </div>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-row\r\n *matRowDef=\"let row; columns: ['MtxGridExpansionColumnDef']; let dataIndex = dataIndex\"\r\n [ngClass]=\"['mtx-grid-expansion', expansionRowStates[dataIndex].expanded ? 'expanded' : 'collapsed']\">\r\n </tr>\r\n </ng-container>\r\n </table>\r\n\r\n <!-- TODO: Use flexbox-based mat-table -->\r\n <table mat-table *ngIf=\"columnResizable\"\r\n columnResize\r\n [ngClass]=\"{'mat-table-hover': rowHover, 'mat-table-striped': rowStriped, 'mat-table-expandable': expandable}\"\r\n [dataSource]=\"dataSource\" [multiTemplateDataRows]=\"expandable\"\r\n matSort\r\n [matSortActive]=\"sortActive\"\r\n [matSortDirection]=\"sortDirection\"\r\n [matSortDisableClear]=\"sortDisableClear\"\r\n [matSortDisabled]=\"sortDisabled\"\r\n [matSortStart]=\"sortStart\"\r\n (matSortChange)=\"_onSortChange($event)\"\r\n [trackBy]=\"trackBy\">\r\n\r\n <ng-container *ngIf=\"rowSelectable && !hideRowSelectionCheckbox\"\r\n matColumnDef=\"MtxGridCheckboxColumnDef\">\r\n <th mat-header-cell *matHeaderCellDef class=\"mtx-grid-checkbox-cell\">\r\n <mat-checkbox *ngIf=\"multiSelectable\"\r\n [checked]=\"rowSelection.hasValue() && _isAllSelected()\"\r\n [indeterminate]=\"rowSelection.hasValue() && !_isAllSelected()\"\r\n (change)=\"$event ? _toggleMasterCheckbox() : null\">\r\n </mat-checkbox>\r\n </th>\r\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\"\r\n class=\"mtx-grid-checkbox-cell\">\r\n <mat-checkbox *ngIf=\"!(rowSelectionFormatter.hideCheckbox && rowSelectionFormatter.hideCheckbox(row, _getIndex(index, dataIndex)))\"\r\n [disabled]=\"rowSelectionFormatter.disabled && rowSelectionFormatter.disabled(row, _getIndex(index, dataIndex))\"\r\n [checked]=\"rowSelection.isSelected(row)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? _toggleNormalCheckbox(row) : null\">\r\n </mat-checkbox>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef class=\"mtx-grid-checkbox-cell\"></td>\r\n </ng-container>\r\n\r\n <ng-container *ngFor=\"let col of columns;\">\r\n <ng-container [matColumnDef]=\"col.field\"\r\n [sticky]=\"col.pinned==='left'\" [stickyEnd]=\"col.pinned==='right'\">\r\n <th mat-header-cell *matHeaderCellDef\r\n [class]=\"col | colClass\"\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'left': col.left, 'right': col.right}\"\r\n [resizable]=\"col.resizable\"\r\n [matResizableMinWidthPx]=\"col.minWidth\" [matResizableMaxWidthPx]=\"col.maxWidth\">\r\n <div class=\"mat-header-cell-inner\">\r\n <ng-template [ngIf]=\"headerTemplate | isTemplateRef\" [ngIfElse]=\"headerTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(headerTemplate)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #headerTpl>\r\n <ng-template [ngIf]=\"$any(headerTemplate)?.[col.field] | isTemplateRef\"\r\n [ngIfElse]=\"defaultHeaderTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(headerTemplate)[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultHeaderTpl>\r\n <div [mat-sort-header]=\"col.sortProp?.id || col.field\"\r\n [disabled]=\"!col.sortable\"\r\n [disableClear]=\"col.sortProp?.disableClear ?? sortDisableClear\"\r\n [arrowPosition]=\"col.sortProp?.arrowPosition!\"\r\n [start]=\"col.sortProp?.start!\">\r\n <span class=\"mtx-grid-expansion-placeholder\" *ngIf=\"col.showExpand\"></span>\r\n <span>{{col.header | toObservable | async}}</span>\r\n <svg class=\"mtx-grid-icon mat-sort-header-icon\" *ngIf=\"col.sortable\"\r\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\"\r\n focusable=\"false\">\r\n <path d=\"M3,13H15V11H3M3,6V8H21V6M3,18H9V16H3V18Z\"></path>\r\n </svg>\r\n </div>\r\n <ng-template [ngTemplateOutlet]=\"headerExtraTplBase\"\r\n [ngTemplateOutletContext]=\"{ $implicit: headerExtraTemplate, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </div>\r\n </th>\r\n\r\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\"\r\n [class]=\"col | colClass: row: rowChangeRecord :rowChangeRecord?.currentValue\"\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'left': col.left, 'right': col.right}\"\r\n mtx-grid-selectable-cell (cellSelectionChange)=\"_selectCell($event, row, col)\">\r\n <ng-template [ngIf]=\"cellTemplate | isTemplateRef\" [ngIfElse]=\"cellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(cellTemplate)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #cellTpl>\r\n <ng-template [ngIf]=\"$any(cellTemplate)?.[col.field] | isTemplateRef\"\r\n [ngIfElse]=\"colDefCellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(cellTemplate)[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #colDefCellTpl>\r\n <ng-template [ngIf]=\"col.cellTemplate\" [ngIfElse]=\"defaultCellTpl\"\r\n [ngTemplateOutlet]=\"col.cellTemplate!\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultCellTpl>\r\n <button class=\"mtx-grid-row-expand-button\" *ngIf=\"col.showExpand\"\r\n mat-icon-button mtx-grid-expansion-toggle type=\"button\"\r\n [(opened)]=\"expansionRowStates[dataIndex].expanded\"\r\n (toggleChange)=\"_onExpansionChange($event, row, col, dataIndex);\">\r\n <svg class=\"mtx-grid-icon mtx-grid-row-expand-icon\" viewBox=\"0 0 24 24\"\r\n width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"></path>\r\n </svg>\r\n </button>\r\n\r\n <mtx-grid-cell [rowData]=\"row\" [colDef]=\"col\" [placeholder]=\"emptyValuePlaceholder\"\r\n (rowDataChange)=\"_onRowDataChange($event)\">\r\n </mtx-grid-cell>\r\n </ng-template>\r\n </td>\r\n\r\n <td mat-footer-cell *matFooterCellDef\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'left': col.left, 'right': col.right}\">\r\n <span class=\"mtx-grid-expansion-placeholder\" *ngIf=\"col.showExpand\"></span>\r\n\r\n <ng-template [ngIf]=\"summaryTemplate | isTemplateRef\" [ngIfElse]=\"summaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(summaryTemplate)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col, data: data }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #summaryTpl>\r\n <ng-template [ngIf]=\"$any(summaryTemplate)?.[col.field] | isTemplateRef\"\r\n [ngIfElse]=\"defaultSummaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(summaryTemplate)[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: _getColData(data, col), colData: _getColData(data, col), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultSummaryTpl>\r\n <mtx-grid-cell [summary]=\"true\" [data]=\"data\" [colDef]=\"col\"\r\n [placeholder]=\"emptyValuePlaceholder\">\r\n </mtx-grid-cell>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-template [ngIf]=\"useContentHeaderRowTemplate\" [ngIfElse]=\"defaultHeaderRowTpl\">\r\n </ng-template>\r\n <ng-template #defaultHeaderRowTpl>\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"useContentRowTemplate\" [ngIfElse]=\"defaultRowTpl\"></ng-template>\r\n <ng-template #defaultRowTpl>\r\n <tr mat-row\r\n *matRowDef=\"let row; let index = index; let dataIndex = dataIndex; columns: displayedColumns;\"\r\n [class]=\"row | rowClass: index: dataIndex: rowClassFormatter\"\r\n [ngClass]=\"{'selected': rowSelection.isSelected(row)}\"\r\n (click)=\"_selectRow($event, row, _getIndex(index, dataIndex))\">\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"_whetherShowSummary\">\r\n <tr mat-footer-row *matFooterRowDef=\"displayedColumns; sticky: true\"></tr>\r\n </ng-template>\r\n <ng-template [ngIf]=\"useContentFooterRowTemplate\"></ng-template>\r\n\r\n <ng-container *ngIf=\"expandable\">\r\n <!-- Expanded Content Column - The expandable row is made up of this one column that spans across all columns -->\r\n <ng-container matColumnDef=\"MtxGridExpansionColumnDef\">\r\n <td mat-cell *matCellDef=\"let row; let dataIndex = dataIndex\"\r\n [attr.colspan]=\"displayedColumns.length\">\r\n <div class=\"mtx-grid-expansion-detail\"\r\n [@expansion]=\"expansionRowStates[dataIndex].expanded ? 'expanded' : 'collapsed'\">\r\n <ng-template [ngTemplateOutlet]=\"expansionTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: dataIndex, expanded: expansionRowStates[dataIndex].expanded }\">\r\n </ng-template>\r\n </div>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-row\r\n *matRowDef=\"let row; columns: ['MtxGridExpansionColumnDef']; let dataIndex = dataIndex\"\r\n [ngClass]=\"['mtx-grid-expansion', expansionRowStates[dataIndex].expanded ? 'expanded' : 'collapsed']\">\r\n </tr>\r\n </ng-container>\r\n </table>\r\n </div>\r\n\r\n <!-- No result -->\r\n <div class=\"mtx-grid-no-result\" *ngIf=\"_hasNoResult\">\r\n <ng-template [ngIf]=\"noResultTemplate\" [ngIfElse]=\"defaultNoResultTpl\">\r\n <ng-template [ngTemplateOutlet]=\"noResultTemplate\"></ng-template>\r\n </ng-template>\r\n <ng-template #defaultNoResultTpl>{{noResultText}}</ng-template>\r\n </div>\r\n </div>\r\n\r\n <!-- Tool sidebar -->\r\n <div class=\"mtx-grid-sidebar\" *ngIf=\"showSidebar\">\r\n <ng-template [ngIf]=\"sidebarTemplate\">\r\n <ng-template [ngTemplateOutlet]=\"sidebarTemplate\"></ng-template>\r\n </ng-template>\r\n </div>\r\n</div>\r\n\r\n<div class=\"mtx-grid-footer\">\r\n <!-- Status Bar -->\r\n <div class=\"mtx-grid-statusbar\" *ngIf=\"showStatusbar\">\r\n <ng-template [ngIf]=\"statusbarTemplate\">\r\n <ng-template [ngTemplateOutlet]=\"statusbarTemplate\"></ng-template>\r\n </ng-template>\r\n </div>\r\n\r\n <!-- Pagination -->\r\n <div class=\"mtx-grid-pagination\">\r\n <ng-template [ngIf]=\"paginationTemplate\" [ngIfElse]=\"defaultPaginationTemplate\">\r\n <ng-template [ngTemplateOutlet]=\"paginationTemplate\"></ng-template>\r\n </ng-template>\r\n <ng-template #defaultPaginationTemplate>\r\n <mat-paginator [class.mat-paginator-hidden]=\"!showPaginator\"\r\n [showFirstLastButtons]=\"showFirstLastButtons\"\r\n [length]=\"length\"\r\n [pageIndex]=\"pageIndex\"\r\n [pageSize]=\"pageSize\"\r\n [pageSizeOptions]=\"pageSizeOptions\"\r\n [hidePageSize]=\"hidePageSize\"\r\n (page)=\"_onPage($event)\"\r\n [disabled]=\"pageDisabled\">\r\n </mat-paginator>\r\n </ng-template>\r\n </div>\r\n</div>\r\n\r\n<!-- Header template for extra content -->\r\n<ng-template #headerExtraTplBase let-headerExtraTemplate let-col=\"colDef\">\r\n <ng-template [ngIf]=\"headerExtraTemplate | isTemplateRef\" [ngIfElse]=\"headerExtraTpl\">\r\n <ng-template [ngTemplateOutlet]=\"headerExtraTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #headerExtraTpl>\r\n <ng-template [ngIf]=\"$any(headerExtraTemplate)?.[col.field] | isTemplateRef\">\r\n <ng-template [ngTemplateOutlet]=\"headerExtraTemplate[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n</ng-template>\r\n", styles: [".mtx-grid{position:relative;display:flex;flex-direction:column;width:100%}.mtx-grid .mat-table-container{overflow:auto}.mtx-grid .mat-table-container.mat-table-with-data{flex:1}.mtx-grid .mat-mdc-table:not(.mat-column-resize-table){min-width:100%;border-collapse:separate}.mtx-grid .mat-mdc-table:not(.mat-column-resize-table) .mat-mdc-header-cell:not(.mtx-grid-checkbox-cell),.mtx-grid .mat-mdc-table:not(.mat-column-resize-table) .mat-mdc-footer-cell:not(.mtx-grid-checkbox-cell),.mtx-grid .mat-mdc-table:not(.mat-column-resize-table) .mat-mdc-cell:not(.mtx-grid-checkbox-cell){min-width:80px}.mtx-grid .mat-table-sticky-left{border-right-width:1px;border-right-style:solid}[dir=rtl] .mtx-grid .mat-table-sticky-left{border-right-width:0;border-left-width:1px;border-left-style:solid}.mtx-grid .mat-table-sticky-right{border-left-width:1px;border-left-style:solid}[dir=rtl] .mtx-grid .mat-table-sticky-right{border-left-width:0;border-right-width:1px;border-right-style:solid}.mtx-grid .mat-mdc-header-cell,.mtx-grid .mat-mdc-footer-cell,.mtx-grid .mat-mdc-cell{padding:4px 10px;box-sizing:border-box}.mtx-grid .mat-mdc-header-cell:first-of-type:not(:only-of-type),.mtx-grid .mat-mdc-footer-cell:first-of-type:not(:only-of-type),.mtx-grid .mat-mdc-cell:first-of-type:not(:only-of-type){padding-left:24px}.mtx-grid .mat-mdc-header-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,.mtx-grid .mat-mdc-footer-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,.mtx-grid .mat-mdc-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell{padding-left:10px;padding-right:10px}[dir=rtl] .mtx-grid .mat-mdc-header-cell:first-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-mdc-footer-cell:first-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-mdc-cell:first-of-type:not(:only-of-type){padding-left:10px;padding-right:24px}[dir=rtl] .mtx-grid .mat-mdc-header-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,[dir=rtl] .mtx-grid .mat-mdc-footer-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,[dir=rtl] .mtx-grid .mat-mdc-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell{padding-left:10px;padding-right:10px}.mtx-grid .mat-mdc-header-cell:last-of-type:not(:only-of-type),.mtx-grid .mat-mdc-footer-cell:last-of-type:not(:only-of-type),.mtx-grid .mat-mdc-cell:last-of-type:not(:only-of-type){padding-right:24px}[dir=rtl] .mtx-grid .mat-mdc-header-cell:last-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-mdc-footer-cell:last-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-mdc-cell:last-of-type:not(:only-of-type){padding-left:24px;padding-right:10px}.mtx-grid .mat-mdc-row.mtx-grid-expansion{height:0;overflow:hidden}.mtx-grid .mat-mdc-row.mtx-grid-expansion .mat-mdc-cell{padding-top:0;padding-bottom:0}.mtx-grid .mat-mdc-row.mtx-grid-expansion.collapsed .mat-mdc-cell{border-bottom-width:0}.mtx-grid .mat-mdc-row:last-of-type .mat-cell{border-bottom-width:0}.mtx-grid .mat-sort-header-icon{margin:0 4px}.mtx-grid .mat-header-cell-inner{display:inline-flex;align-items:center}.mtx-grid .mat-paginator-hidden{display:none}.mtx-grid-progress{position:absolute;top:0;z-index:120;width:100%}.mtx-grid-toolbar{display:flex;justify-content:space-between;align-items:center;min-height:48px;padding:8px;box-sizing:border-box}.mtx-grid-layout{display:flex;flex:1 1 auto;overflow:auto}.mtx-grid-content{flex-direction:column;width:0}.mtx-grid-sidebar{max-width:50%;border-left-width:1px;border-left-style:solid}[dir=rtl] .mtx-grid-sidebar{border-left-width:0;border-right-width:1px;border-right-style:solid}.mtx-grid-footer{position:relative;z-index:1}.mtx-grid-statusbar{display:flex;align-items:center;min-height:56px;padding:8px}.mtx-grid-no-result{display:flex;justify-content:center;align-items:center;flex:1;min-height:150px}.mtx-grid-expansion-placeholder{display:inline-block;width:40px;height:40px;vertical-align:middle}.mtx-grid-expansion-detail{display:flex;align-items:center;min-height:48px;overflow:hidden}.mtx-grid-checkbox-cell{flex:none;justify-content:center;width:60px;min-width:60px}.mtx-grid-checkbox-cell .mat-checkbox{display:flex;margin:0 10px}.mtx-grid-checkbox-cell .mat-checkbox-inner-container{margin-left:0}.mtx-grid-row-expand-button.mat-mdc-icon-button{width:40px;height:40px;padding:8px;vertical-align:middle}.mtx-grid-row-expand-button.mat-mdc-icon-button.expanded .mtx-grid-row-expand-icon{transform:rotate(90deg)}.mtx-grid-row-expand-button.mat-mdc-icon-button+mtx-grid-cell{vertical-align:middle}.mtx-grid-row-expand-button.mat-mdc-icon-button .mat-mdc-button-touch-target{width:100%;height:100%}.mtx-grid-icon{width:20px;height:20px;font-size:20px}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(function () { return i3$1.NgClass; }), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(function () { return i3$1.NgForOf; }), selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i0.forwardRef(function () { return i3$1.NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(function () { return i3$1.NgTemplateOutlet; }), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i0.forwardRef(function () { return i3$1.NgStyle; }), selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i0.forwardRef(function () { return i3$3.MatTable; }), selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i0.forwardRef(function () { return i3$3.MatHeaderCellDef; }), selector: "[matHeaderCellDef]" }, { kind: "directive", type: i0.forwardRef(function () { return i3$3.MatHeaderRowDef; }), selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i0.forwardRef(function () { return i3$3.MatColumnDef; }), selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i0.forwardRef(function () { return i3$3.MatCellDef; }), selector: "[matCellDef]" }, { kind: "directive", type: i0.forwardRef(function () { return i3$3.MatRowDef; }), selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i0.forwardRef(function () { return i3$3.MatFooterCellDef; }), selector: "[matFooterCellDef]" }, { kind: "directive", type: i0.forwardRef(function () { return i3$3.MatFooterRowDef; }), selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i0.forwardRef(function () { return i3$3.MatHeaderCell; }), selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i0.forwardRef(function () { return i3$3.MatCell; }), selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i0.forwardRef(function () { return i3$3.MatFooterCell; }), selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i0.forwardRef(function () { return i3$3.MatHeaderRow; }), selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i0.forwardRef(function () { return i3$3.MatRow; }), selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i0.forwardRef(function () { return i3$3.MatFooterRow; }), selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "directive", type: i0.forwardRef(function () { return i4$2.MatSort; }), selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i0.forwardRef(function () { return i4$2.MatSortHeader; }), selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i0.forwardRef(function () { return i5$1.MatPaginator; }), selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: i0.forwardRef(function () { return i3$2.MatCheckbox; }), selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i0.forwardRef(function () { return i4$1.MatIconButton; }), selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i0.forwardRef(function () { return i8$1.MatProgressBar; }), selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i0.forwardRef(function () { return MatColumnResize; }), selector: "table[mat-table][columnResize]" }, { kind: "directive", type: i0.forwardRef(function () { return MatResizable; }), selector: "mat-header-cell[resizable], th[mat-header-cell][resizable]", inputs: ["matResizableMinWidthPx", "matResizableMaxWidthPx", "resizable"] }, { kind: "component", type: i0.forwardRef(function () { return MtxGridCell; }), selector: "mtx-grid-cell", inputs: ["rowData", "colDef", "data", "summary", "placeholder"], outputs: ["rowDataChange"], exportAs: ["mtxGridCell"] }, { kind: "component", type: i0.forwardRef(function () { return MtxGridColumnMenu; }), selector: "mtx-grid-column-menu", inputs: ["columns", "selectable", "selectableChecked", "sortable", "pinnable", "buttonText", "buttonType", "buttonColor", "buttonClass", "buttonIcon", "showHeader", "headerText", "headerTemplate", "showFooter", "footerText", "footerTemplate", "pinOptions"], outputs: ["columnChange"], exportAs: ["mtxGridColumnMenu"] }, { kind: "directive", type: i0.forwardRef(function () { return MtxGridExpansionToggle; }), selector: "[mtx-grid-expansion-toggle]", inputs: ["opened", "expandableRow", "expansionRowTpl"], outputs: ["openedChange", "toggleChange"] }, { kind: "directive", type: i0.forwardRef(function () { return MtxGridSelectableCell; }), selector: "[mtx-grid-selectable-cell]", inputs: ["mtxSelectableRowData"], outputs: ["cellSelectionChange"] }, { kind: "pipe", type: i0.forwardRef(function () { return i3$1.AsyncPipe; }), name: "async" }, { kind: "pipe", type: i0.forwardRef(function () { return i14.MtxToObservablePipe; }), name: "toObservable" }, { kind: "pipe", type: i0.forwardRef(function () { return i14.MtxIsTemplateRefPipe; }), name: "isTemplateRef" }, { kind: "pipe", type: i0.forwardRef(function () { return MtxGridRowClassPipe; }), name: "rowClass" }, { kind: "pipe", type: i0.forwardRef(function () { return MtxGridColClassPipe; }), name: "colClass" }], animations: [
|
|
1138
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.7", type: MtxGrid, selector: "mtx-grid", inputs: { displayedColumns: "displayedColumns", columns: "columns", data: "data", length: "length", loading: "loading", trackBy: "trackBy", columnResizable: "columnResizable", emptyValuePlaceholder: "emptyValuePlaceholder", pageOnFront: "pageOnFront", showPaginator: "showPaginator", pageDisabled: "pageDisabled", showFirstLastButtons: "showFirstLastButtons", pageIndex: "pageIndex", pageSize: "pageSize", pageSizeOptions: "pageSizeOptions", hidePageSize: "hidePageSize", paginationTemplate: "paginationTemplate", sortOnFront: "sortOnFront", sortActive: "sortActive", sortDirection: "sortDirection", sortDisableClear: "sortDisableClear", sortDisabled: "sortDisabled", sortStart: "sortStart", rowHover: "rowHover", rowStriped: "rowStriped", expandable: "expandable", expansionTemplate: "expansionTemplate", multiSelectable: "multiSelectable", multiSelectionWithClick: "multiSelectionWithClick", rowSelectable: "rowSelectable", hideRowSelectionCheckbox: "hideRowSelectionCheckbox", disableRowClickSelection: "disableRowClickSelection", rowSelectionFormatter: "rowSelectionFormatter", rowClassFormatter: "rowClassFormatter", rowSelected: "rowSelected", cellSelectable: "cellSelectable", showToolbar: "showToolbar", toolbarTitle: "toolbarTitle", toolbarTemplate: "toolbarTemplate", columnHideable: "columnHideable", columnHideableChecked: "columnHideableChecked", columnSortable: "columnSortable", columnPinnable: "columnPinnable", columnPinOptions: "columnPinOptions", showColumnMenuButton: "showColumnMenuButton", columnMenuButtonText: "columnMenuButtonText", columnMenuButtonType: "columnMenuButtonType", columnMenuButtonColor: "columnMenuButtonColor", columnMenuButtonClass: "columnMenuButtonClass", columnMenuButtonIcon: "columnMenuButtonIcon", showColumnMenuHeader: "showColumnMenuHeader", columnMenuHeaderText: "columnMenuHeaderText", columnMenuHeaderTemplate: "columnMenuHeaderTemplate", showColumnMenuFooter: "showColumnMenuFooter", columnMenuFooterText: "columnMenuFooterText", columnMenuFooterTemplate: "columnMenuFooterTemplate", noResultText: "noResultText", noResultTemplate: "noResultTemplate", headerTemplate: "headerTemplate", headerExtraTemplate: "headerExtraTemplate", cellTemplate: "cellTemplate", useContentRowTemplate: "useContentRowTemplate", useContentHeaderRowTemplate: "useContentHeaderRowTemplate", useContentFooterRowTemplate: "useContentFooterRowTemplate", showSummary: "showSummary", summaryTemplate: "summaryTemplate", showSidebar: "showSidebar", sidebarTemplate: "sidebarTemplate", showStatusbar: "showStatusbar", statusbarTemplate: "statusbarTemplate" }, outputs: { page: "page", sortChange: "sortChange", rowClick: "rowClick", rowContextMenu: "rowContextMenu", expansionChange: "expansionChange", rowSelectedChange: "rowSelectedChange", cellSelectedChange: "cellSelectedChange", columnChange: "columnChange" }, host: { classAttribute: "mtx-grid" }, queries: [{ propertyName: "rowDefs", predicate: MatRowDef }, { propertyName: "headerRowDefs", predicate: MatHeaderRowDef }, { propertyName: "footerRowDefs", predicate: MatFooterRow }], viewQueries: [{ propertyName: "table", first: true, predicate: MatTable, descendants: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }, { propertyName: "columnMenu", first: true, predicate: ["columnMenu"], descendants: true }, { propertyName: "tableContainer", first: true, predicate: ["tableContainer"], descendants: true }], exportAs: ["mtxGrid"], usesOnChanges: true, ngImport: i0, template: "<!-- Progress bar-->\r\n<div class=\"mtx-grid-progress\" *ngIf=\"loading\">\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n</div>\r\n\r\n<!-- Toolbar -->\r\n<div class=\"mtx-grid-toolbar\" *ngIf=\"showToolbar\">\r\n <div class=\"mtx-grid-toolbar-content\">\r\n <ng-template [ngIf]=\"toolbarTemplate\" [ngIfElse]=\"defaultToolbarTemplate\">\r\n <ng-template [ngTemplateOutlet]=\"toolbarTemplate\"></ng-template>\r\n </ng-template>\r\n <ng-template #defaultToolbarTemplate>\r\n <div class=\"mtx-grid-toolbar-title\" *ngIf=\"toolbarTitle\">{{toolbarTitle}}</div>\r\n </ng-template>\r\n </div>\r\n <div class=\"mtx-grid-toolbar-actions\">\r\n <mtx-grid-column-menu *ngIf=\"showColumnMenuButton\" #columnMenu\r\n [columns]=\"columns\"\r\n [buttonText]=\"columnMenuButtonText\"\r\n [buttonType]=\"columnMenuButtonType\"\r\n [buttonColor]=\"columnMenuButtonColor\"\r\n [buttonClass]=\"columnMenuButtonClass\"\r\n [buttonIcon]=\"columnMenuButtonIcon\"\r\n [selectable]=\"columnHideable\"\r\n [selectableChecked]=\"columnHideableChecked\"\r\n [sortable]=\"columnSortable\"\r\n [pinnable]=\"columnPinnable\"\r\n [showHeader]=\"showColumnMenuHeader\"\r\n [headerText]=\"columnMenuHeaderText\"\r\n [headerTemplate]=\"columnMenuHeaderTemplate\"\r\n [showFooter]=\"showColumnMenuFooter\"\r\n [footerText]=\"columnMenuFooterText\"\r\n [footerTemplate]=\"columnMenuFooterTemplate\"\r\n [pinOptions]=\"columnPinOptions\"\r\n (columnChange)=\"_onColumnChange($event)\">\r\n </mtx-grid-column-menu>\r\n </div>\r\n</div>\r\n\r\n<div class=\"mtx-grid-main mtx-grid-layout\">\r\n <!-- Table content -->\r\n <div class=\"mtx-grid-content mtx-grid-layout\">\r\n <div #tableContainer class=\"mat-table-container\"\r\n [ngClass]=\"{'mat-table-with-data': !_hasNoResult}\">\r\n <table mat-table *ngIf=\"!columnResizable\"\r\n [ngClass]=\"{'mat-table-hover': rowHover, 'mat-table-striped': rowStriped, 'mat-table-expandable': expandable}\"\r\n [dataSource]=\"dataSource\" [multiTemplateDataRows]=\"expandable\"\r\n matSort\r\n [matSortActive]=\"sortActive\"\r\n [matSortDirection]=\"sortDirection\"\r\n [matSortDisableClear]=\"sortDisableClear\"\r\n [matSortDisabled]=\"sortDisabled\"\r\n [matSortStart]=\"sortStart\"\r\n (matSortChange)=\"_onSortChange($event)\"\r\n [trackBy]=\"trackBy\">\r\n\r\n <ng-container *ngIf=\"rowSelectable && !hideRowSelectionCheckbox\"\r\n matColumnDef=\"MtxGridCheckboxColumnDef\">\r\n <th mat-header-cell *matHeaderCellDef class=\"mtx-grid-checkbox-cell\">\r\n <mat-checkbox *ngIf=\"multiSelectable\"\r\n [checked]=\"rowSelection.hasValue() && _isAllSelected()\"\r\n [indeterminate]=\"rowSelection.hasValue() && !_isAllSelected()\"\r\n (change)=\"$event ? _toggleMasterCheckbox() : null\">\r\n </mat-checkbox>\r\n </th>\r\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\"\r\n class=\"mtx-grid-checkbox-cell\">\r\n <mat-checkbox *ngIf=\"!(rowSelectionFormatter.hideCheckbox && rowSelectionFormatter.hideCheckbox(row, _getIndex(index, dataIndex)))\"\r\n [disabled]=\"rowSelectionFormatter.disabled && rowSelectionFormatter.disabled(row, _getIndex(index, dataIndex))\"\r\n [checked]=\"rowSelection.isSelected(row)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? _toggleNormalCheckbox(row) : null\">\r\n </mat-checkbox>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef class=\"mtx-grid-checkbox-cell\"></td>\r\n </ng-container>\r\n\r\n <ng-container *ngFor=\"let col of columns;\">\r\n <ng-container [matColumnDef]=\"col.field\"\r\n [sticky]=\"col.pinned==='left'\" [stickyEnd]=\"col.pinned==='right'\">\r\n <th mat-header-cell *matHeaderCellDef\r\n [class]=\"col | colClass\"\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'min-width': col.width, 'left': col.left, 'right': col.right}\">\r\n <div class=\"mat-header-cell-inner\">\r\n <ng-template [ngIf]=\"headerTemplate | isTemplateRef\" [ngIfElse]=\"headerTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(headerTemplate)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #headerTpl>\r\n <ng-template [ngIf]=\"$any(headerTemplate)?.[col.field] | isTemplateRef\"\r\n [ngIfElse]=\"defaultHeaderTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(headerTemplate)[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultHeaderTpl>\r\n <div [mat-sort-header]=\"col.sortProp?.id || col.field\"\r\n [disabled]=\"!col.sortable\"\r\n [disableClear]=\"col.sortProp?.disableClear ?? sortDisableClear\"\r\n [arrowPosition]=\"col.sortProp?.arrowPosition!\"\r\n [start]=\"col.sortProp?.start!\">\r\n <span class=\"mtx-grid-expansion-placeholder\" *ngIf=\"col.showExpand\"></span>\r\n <span>{{col.header | toObservable | async}}</span>\r\n <svg class=\"mtx-grid-icon mat-sort-header-icon\" *ngIf=\"col.sortable\"\r\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\"\r\n focusable=\"false\">\r\n <path d=\"M3,13H15V11H3M3,6V8H21V6M3,18H9V16H3V18Z\"></path>\r\n </svg>\r\n </div>\r\n <ng-template [ngTemplateOutlet]=\"headerExtraTplBase\"\r\n [ngTemplateOutletContext]=\"{ $implicit: headerExtraTemplate, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </div>\r\n </th>\r\n\r\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\"\r\n [class]=\"col | colClass: row: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'min-width': col.width, 'left': col.left, 'right': col.right}\"\r\n mtx-grid-selectable-cell (cellSelectedChange)=\"_selectCell($event, row, col)\">\r\n <ng-template [ngIf]=\"cellTemplate | isTemplateRef\" [ngIfElse]=\"cellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(cellTemplate)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #cellTpl>\r\n <ng-template [ngIf]=\"$any(cellTemplate)?.[col.field] | isTemplateRef\"\r\n [ngIfElse]=\"colDefCellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(cellTemplate)[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #colDefCellTpl>\r\n <ng-template [ngIf]=\"col.cellTemplate\" [ngIfElse]=\"defaultCellTpl\"\r\n [ngTemplateOutlet]=\"col.cellTemplate!\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultCellTpl>\r\n <button class=\"mtx-grid-row-expand-button\" *ngIf=\"col.showExpand\"\r\n mat-icon-button mtx-grid-expansion-toggle type=\"button\"\r\n [(opened)]=\"expansionRowStates[dataIndex].expanded\"\r\n (toggleChange)=\"_onExpansionChange($event, row, col, dataIndex);\">\r\n <svg class=\"mtx-grid-icon mtx-grid-row-expand-icon\" viewBox=\"0 0 24 24\"\r\n width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"></path>\r\n </svg>\r\n </button>\r\n\r\n <mtx-grid-cell [rowData]=\"row\" [colDef]=\"col\" [placeholder]=\"emptyValuePlaceholder\"\r\n (rowDataChange)=\"_onRowDataChange($event)\">\r\n </mtx-grid-cell>\r\n </ng-template>\r\n </td>\r\n\r\n <td mat-footer-cell *matFooterCellDef\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'min-width': col.width, 'left': col.left, 'right': col.right}\">\r\n <span class=\"mtx-grid-expansion-placeholder\" *ngIf=\"col.showExpand\"></span>\r\n\r\n <ng-template [ngIf]=\"summaryTemplate | isTemplateRef\" [ngIfElse]=\"summaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(summaryTemplate)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col, data: data }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #summaryTpl>\r\n <ng-template [ngIf]=\"$any(summaryTemplate)?.[col.field] | isTemplateRef\"\r\n [ngIfElse]=\"defaultSummaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(summaryTemplate)[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: _getColData(data, col), colData: _getColData(data, col), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultSummaryTpl>\r\n <mtx-grid-cell [summary]=\"true\" [data]=\"data\" [colDef]=\"col\"\r\n [placeholder]=\"emptyValuePlaceholder\">\r\n </mtx-grid-cell>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-template [ngIf]=\"useContentHeaderRowTemplate\" [ngIfElse]=\"defaultHeaderRowTpl\">\r\n </ng-template>\r\n <ng-template #defaultHeaderRowTpl>\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"useContentRowTemplate\" [ngIfElse]=\"defaultRowTpl\"></ng-template>\r\n <ng-template #defaultRowTpl>\r\n <tr mat-row\r\n *matRowDef=\"let row; let index = index; let dataIndex = dataIndex; columns: displayedColumns;\"\r\n [class]=\"row | rowClass: index: dataIndex: rowClassFormatter\"\r\n [ngClass]=\"{'selected': rowSelection.isSelected(row)}\"\r\n (click)=\"_selectRow($event, row, _getIndex(index, dataIndex))\"\r\n (contextmenu)=\"_contextmenu($event, row, _getIndex(index, dataIndex))\">\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"_whetherShowSummary\">\r\n <tr mat-footer-row *matFooterRowDef=\"displayedColumns; sticky: true\"></tr>\r\n </ng-template>\r\n <ng-template [ngIf]=\"useContentFooterRowTemplate\"></ng-template>\r\n\r\n <ng-container *ngIf=\"expandable\">\r\n <!-- Expanded Content Column - The expandable row is made up of this one column that spans across all columns -->\r\n <ng-container matColumnDef=\"MtxGridExpansionColumnDef\">\r\n <td mat-cell *matCellDef=\"let row; let dataIndex = dataIndex\"\r\n [attr.colspan]=\"displayedColumns.length\">\r\n <div class=\"mtx-grid-expansion-detail\"\r\n [@expansion]=\"expansionRowStates[dataIndex].expanded ? 'expanded' : 'collapsed'\">\r\n <ng-template [ngTemplateOutlet]=\"expansionTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: dataIndex, expanded: expansionRowStates[dataIndex].expanded }\">\r\n </ng-template>\r\n </div>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-row\r\n *matRowDef=\"let row; columns: ['MtxGridExpansionColumnDef']; let dataIndex = dataIndex\"\r\n [ngClass]=\"['mtx-grid-expansion', expansionRowStates[dataIndex].expanded ? 'expanded' : 'collapsed']\">\r\n </tr>\r\n </ng-container>\r\n </table>\r\n\r\n <!-- TODO: Use flexbox-based mat-table -->\r\n <table mat-table *ngIf=\"columnResizable\"\r\n columnResize\r\n [ngClass]=\"{'mat-table-hover': rowHover, 'mat-table-striped': rowStriped, 'mat-table-expandable': expandable}\"\r\n [dataSource]=\"dataSource\" [multiTemplateDataRows]=\"expandable\"\r\n matSort\r\n [matSortActive]=\"sortActive\"\r\n [matSortDirection]=\"sortDirection\"\r\n [matSortDisableClear]=\"sortDisableClear\"\r\n [matSortDisabled]=\"sortDisabled\"\r\n [matSortStart]=\"sortStart\"\r\n (matSortChange)=\"_onSortChange($event)\"\r\n [trackBy]=\"trackBy\">\r\n\r\n <ng-container *ngIf=\"rowSelectable && !hideRowSelectionCheckbox\"\r\n matColumnDef=\"MtxGridCheckboxColumnDef\">\r\n <th mat-header-cell *matHeaderCellDef class=\"mtx-grid-checkbox-cell\">\r\n <mat-checkbox *ngIf=\"multiSelectable\"\r\n [checked]=\"rowSelection.hasValue() && _isAllSelected()\"\r\n [indeterminate]=\"rowSelection.hasValue() && !_isAllSelected()\"\r\n (change)=\"$event ? _toggleMasterCheckbox() : null\">\r\n </mat-checkbox>\r\n </th>\r\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\"\r\n class=\"mtx-grid-checkbox-cell\">\r\n <mat-checkbox *ngIf=\"!(rowSelectionFormatter.hideCheckbox && rowSelectionFormatter.hideCheckbox(row, _getIndex(index, dataIndex)))\"\r\n [disabled]=\"rowSelectionFormatter.disabled && rowSelectionFormatter.disabled(row, _getIndex(index, dataIndex))\"\r\n [checked]=\"rowSelection.isSelected(row)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? _toggleNormalCheckbox(row) : null\">\r\n </mat-checkbox>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef class=\"mtx-grid-checkbox-cell\"></td>\r\n </ng-container>\r\n\r\n <ng-container *ngFor=\"let col of columns;\">\r\n <ng-container [matColumnDef]=\"col.field\"\r\n [sticky]=\"col.pinned==='left'\" [stickyEnd]=\"col.pinned==='right'\">\r\n <th mat-header-cell *matHeaderCellDef\r\n [class]=\"col | colClass\"\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'left': col.left, 'right': col.right}\"\r\n [resizable]=\"col.resizable\"\r\n [matResizableMinWidthPx]=\"col.minWidth\" [matResizableMaxWidthPx]=\"col.maxWidth\">\r\n <div class=\"mat-header-cell-inner\">\r\n <ng-template [ngIf]=\"headerTemplate | isTemplateRef\" [ngIfElse]=\"headerTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(headerTemplate)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #headerTpl>\r\n <ng-template [ngIf]=\"$any(headerTemplate)?.[col.field] | isTemplateRef\"\r\n [ngIfElse]=\"defaultHeaderTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(headerTemplate)[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultHeaderTpl>\r\n <div [mat-sort-header]=\"col.sortProp?.id || col.field\"\r\n [disabled]=\"!col.sortable\"\r\n [disableClear]=\"col.sortProp?.disableClear ?? sortDisableClear\"\r\n [arrowPosition]=\"col.sortProp?.arrowPosition!\"\r\n [start]=\"col.sortProp?.start!\">\r\n <span class=\"mtx-grid-expansion-placeholder\" *ngIf=\"col.showExpand\"></span>\r\n <span>{{col.header | toObservable | async}}</span>\r\n <svg class=\"mtx-grid-icon mat-sort-header-icon\" *ngIf=\"col.sortable\"\r\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\"\r\n focusable=\"false\">\r\n <path d=\"M3,13H15V11H3M3,6V8H21V6M3,18H9V16H3V18Z\"></path>\r\n </svg>\r\n </div>\r\n <ng-template [ngTemplateOutlet]=\"headerExtraTplBase\"\r\n [ngTemplateOutletContext]=\"{ $implicit: headerExtraTemplate, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </div>\r\n </th>\r\n\r\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\"\r\n [class]=\"col | colClass: row: rowChangeRecord :rowChangeRecord?.currentValue\"\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'left': col.left, 'right': col.right}\"\r\n mtx-grid-selectable-cell (cellSelectedChange)=\"_selectCell($event, row, col)\">\r\n <ng-template [ngIf]=\"cellTemplate | isTemplateRef\" [ngIfElse]=\"cellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(cellTemplate)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #cellTpl>\r\n <ng-template [ngIf]=\"$any(cellTemplate)?.[col.field] | isTemplateRef\"\r\n [ngIfElse]=\"colDefCellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(cellTemplate)[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #colDefCellTpl>\r\n <ng-template [ngIf]=\"col.cellTemplate\" [ngIfElse]=\"defaultCellTpl\"\r\n [ngTemplateOutlet]=\"col.cellTemplate!\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultCellTpl>\r\n <button class=\"mtx-grid-row-expand-button\" *ngIf=\"col.showExpand\"\r\n mat-icon-button mtx-grid-expansion-toggle type=\"button\"\r\n [(opened)]=\"expansionRowStates[dataIndex].expanded\"\r\n (toggleChange)=\"_onExpansionChange($event, row, col, dataIndex);\">\r\n <svg class=\"mtx-grid-icon mtx-grid-row-expand-icon\" viewBox=\"0 0 24 24\"\r\n width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"></path>\r\n </svg>\r\n </button>\r\n\r\n <mtx-grid-cell [rowData]=\"row\" [colDef]=\"col\" [placeholder]=\"emptyValuePlaceholder\"\r\n (rowDataChange)=\"_onRowDataChange($event)\">\r\n </mtx-grid-cell>\r\n </ng-template>\r\n </td>\r\n\r\n <td mat-footer-cell *matFooterCellDef\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'left': col.left, 'right': col.right}\">\r\n <span class=\"mtx-grid-expansion-placeholder\" *ngIf=\"col.showExpand\"></span>\r\n\r\n <ng-template [ngIf]=\"summaryTemplate | isTemplateRef\" [ngIfElse]=\"summaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(summaryTemplate)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col, data: data }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #summaryTpl>\r\n <ng-template [ngIf]=\"$any(summaryTemplate)?.[col.field] | isTemplateRef\"\r\n [ngIfElse]=\"defaultSummaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(summaryTemplate)[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: _getColData(data, col), colData: _getColData(data, col), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultSummaryTpl>\r\n <mtx-grid-cell [summary]=\"true\" [data]=\"data\" [colDef]=\"col\"\r\n [placeholder]=\"emptyValuePlaceholder\">\r\n </mtx-grid-cell>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-template [ngIf]=\"useContentHeaderRowTemplate\" [ngIfElse]=\"defaultHeaderRowTpl\">\r\n </ng-template>\r\n <ng-template #defaultHeaderRowTpl>\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"useContentRowTemplate\" [ngIfElse]=\"defaultRowTpl\"></ng-template>\r\n <ng-template #defaultRowTpl>\r\n <tr mat-row\r\n *matRowDef=\"let row; let index = index; let dataIndex = dataIndex; columns: displayedColumns;\"\r\n [class]=\"row | rowClass: index: dataIndex: rowClassFormatter\"\r\n [ngClass]=\"{'selected': rowSelection.isSelected(row)}\"\r\n (click)=\"_selectRow($event, row, _getIndex(index, dataIndex))\"\r\n (contextmenu)=\"_contextmenu($event, row, _getIndex(index, dataIndex))\">\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"_whetherShowSummary\">\r\n <tr mat-footer-row *matFooterRowDef=\"displayedColumns; sticky: true\"></tr>\r\n </ng-template>\r\n <ng-template [ngIf]=\"useContentFooterRowTemplate\"></ng-template>\r\n\r\n <ng-container *ngIf=\"expandable\">\r\n <!-- Expanded Content Column - The expandable row is made up of this one column that spans across all columns -->\r\n <ng-container matColumnDef=\"MtxGridExpansionColumnDef\">\r\n <td mat-cell *matCellDef=\"let row; let dataIndex = dataIndex\"\r\n [attr.colspan]=\"displayedColumns.length\">\r\n <div class=\"mtx-grid-expansion-detail\"\r\n [@expansion]=\"expansionRowStates[dataIndex].expanded ? 'expanded' : 'collapsed'\">\r\n <ng-template [ngTemplateOutlet]=\"expansionTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: dataIndex, expanded: expansionRowStates[dataIndex].expanded }\">\r\n </ng-template>\r\n </div>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-row\r\n *matRowDef=\"let row; columns: ['MtxGridExpansionColumnDef']; let dataIndex = dataIndex\"\r\n [ngClass]=\"['mtx-grid-expansion', expansionRowStates[dataIndex].expanded ? 'expanded' : 'collapsed']\">\r\n </tr>\r\n </ng-container>\r\n </table>\r\n </div>\r\n\r\n <!-- No result -->\r\n <div class=\"mtx-grid-no-result\" *ngIf=\"_hasNoResult\">\r\n <ng-template [ngIf]=\"noResultTemplate\" [ngIfElse]=\"defaultNoResultTpl\">\r\n <ng-template [ngTemplateOutlet]=\"noResultTemplate\"></ng-template>\r\n </ng-template>\r\n <ng-template #defaultNoResultTpl>{{noResultText}}</ng-template>\r\n </div>\r\n </div>\r\n\r\n <!-- Tool sidebar -->\r\n <div class=\"mtx-grid-sidebar\" *ngIf=\"showSidebar\">\r\n <ng-template [ngIf]=\"sidebarTemplate\">\r\n <ng-template [ngTemplateOutlet]=\"sidebarTemplate\"></ng-template>\r\n </ng-template>\r\n </div>\r\n</div>\r\n\r\n<div class=\"mtx-grid-footer\">\r\n <!-- Status Bar -->\r\n <div class=\"mtx-grid-statusbar\" *ngIf=\"showStatusbar\">\r\n <ng-template [ngIf]=\"statusbarTemplate\">\r\n <ng-template [ngTemplateOutlet]=\"statusbarTemplate\"></ng-template>\r\n </ng-template>\r\n </div>\r\n\r\n <!-- Pagination -->\r\n <div class=\"mtx-grid-pagination\">\r\n <ng-template [ngIf]=\"paginationTemplate\" [ngIfElse]=\"defaultPaginationTemplate\">\r\n <ng-template [ngTemplateOutlet]=\"paginationTemplate\"></ng-template>\r\n </ng-template>\r\n <ng-template #defaultPaginationTemplate>\r\n <mat-paginator [class.mat-paginator-hidden]=\"!showPaginator\"\r\n [showFirstLastButtons]=\"showFirstLastButtons\"\r\n [length]=\"length\"\r\n [pageIndex]=\"pageIndex\"\r\n [pageSize]=\"pageSize\"\r\n [pageSizeOptions]=\"pageSizeOptions\"\r\n [hidePageSize]=\"hidePageSize\"\r\n (page)=\"_onPage($event)\"\r\n [disabled]=\"pageDisabled\">\r\n </mat-paginator>\r\n </ng-template>\r\n </div>\r\n</div>\r\n\r\n<!-- Header template for extra content -->\r\n<ng-template #headerExtraTplBase let-headerExtraTemplate let-col=\"colDef\">\r\n <ng-template [ngIf]=\"headerExtraTemplate | isTemplateRef\" [ngIfElse]=\"headerExtraTpl\">\r\n <ng-template [ngTemplateOutlet]=\"headerExtraTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #headerExtraTpl>\r\n <ng-template [ngIf]=\"$any(headerExtraTemplate)?.[col.field] | isTemplateRef\">\r\n <ng-template [ngTemplateOutlet]=\"headerExtraTemplate[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n</ng-template>\r\n", styles: [".mtx-grid{position:relative;display:flex;flex-direction:column;width:100%;border:1px solid var(--mtx-grid-outline-color)}.mtx-grid .mat-mdc-table.mat-table-striped .mat-row-odd{background-color:var(--mtx-grid-table-row-striped-background-color)}.mtx-grid .mat-mdc-table.mat-table-hover .mat-mdc-row:hover{background-color:var(--mtx-grid-table-row-hover-background-color)}.mtx-grid .mat-mdc-table .mat-mdc-row.selected,.mtx-grid .mat-mdc-table .mat-mdc-row.mat-row-odd.selected{background-color:var(--mtx-grid-table-row-selected-background-color)}.mtx-grid .mat-mdc-table .mat-mdc-cell.selected{box-shadow:inset 0 0 0 1px var(--mtx-grid-table-cell-selected-outline-color)}.mtx-grid .mat-table-container{overflow:auto}.mtx-grid .mat-table-container.mat-table-with-data{flex:1}.mtx-grid .mat-mdc-table:not(.mat-column-resize-table){min-width:100%;border-collapse:separate}.mtx-grid .mat-mdc-table:not(.mat-column-resize-table) .mat-mdc-header-cell:not(.mtx-grid-checkbox-cell),.mtx-grid .mat-mdc-table:not(.mat-column-resize-table) .mat-mdc-footer-cell:not(.mtx-grid-checkbox-cell),.mtx-grid .mat-mdc-table:not(.mat-column-resize-table) .mat-mdc-cell:not(.mtx-grid-checkbox-cell){min-width:80px}.mtx-grid .mat-table-sticky-left{border-right:1px solid var(--mat-table-row-item-outline-color)}[dir=rtl] .mtx-grid .mat-table-sticky-left{border-right-width:0;border-left:1px solid var(--mat-table-row-item-outline-color)}.mtx-grid .mat-table-sticky-right{border-left:1px solid var(--mat-table-row-item-outline-color)}[dir=rtl] .mtx-grid .mat-table-sticky-right{border-left-width:0;border-right:1px solid var(--mat-table-row-item-outline-color)}.mtx-grid .mat-mdc-header-cell,.mtx-grid .mat-mdc-footer-cell,.mtx-grid .mat-mdc-cell{padding:4px 10px;box-sizing:border-box}.mtx-grid .mat-mdc-header-cell:first-of-type:not(:only-of-type),.mtx-grid .mat-mdc-footer-cell:first-of-type:not(:only-of-type),.mtx-grid .mat-mdc-cell:first-of-type:not(:only-of-type){padding-left:24px}.mtx-grid .mat-mdc-header-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,.mtx-grid .mat-mdc-footer-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,.mtx-grid .mat-mdc-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell{padding-left:10px;padding-right:10px}[dir=rtl] .mtx-grid .mat-mdc-header-cell:first-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-mdc-footer-cell:first-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-mdc-cell:first-of-type:not(:only-of-type){padding-left:10px;padding-right:24px}[dir=rtl] .mtx-grid .mat-mdc-header-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,[dir=rtl] .mtx-grid .mat-mdc-footer-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,[dir=rtl] .mtx-grid .mat-mdc-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell{padding-left:10px;padding-right:10px}.mtx-grid .mat-mdc-header-cell:last-of-type:not(:only-of-type),.mtx-grid .mat-mdc-footer-cell:last-of-type:not(:only-of-type),.mtx-grid .mat-mdc-cell:last-of-type:not(:only-of-type){padding-right:24px}[dir=rtl] .mtx-grid .mat-mdc-header-cell:last-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-mdc-footer-cell:last-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-mdc-cell:last-of-type:not(:only-of-type){padding-left:24px;padding-right:10px}.mtx-grid .mat-mdc-footer-cell{border-top:1px solid var(--mat-table-row-item-outline-color);background-color:var(--mtx-grid-table-footer-background-color)}.mtx-grid .mat-mdc-row.mtx-grid-expansion{height:0;overflow:hidden}.mtx-grid .mat-mdc-row.mtx-grid-expansion .mat-mdc-cell{padding-top:0;padding-bottom:0}.mtx-grid .mat-mdc-row.mtx-grid-expansion.collapsed .mat-mdc-cell{border-bottom-width:0}.mtx-grid .mat-mdc-row:last-of-type .mat-cell{border-bottom-width:0}.mtx-grid .mat-sort-header-icon{margin:0 4px}.mtx-grid .mat-header-cell-inner{display:inline-flex;align-items:center}.mtx-grid .mat-mdc-paginator{border-top:1px solid var(--mtx-grid-outline-color)}.mtx-grid .mat-paginator-hidden{display:none}.mtx-grid-progress{position:absolute;top:0;z-index:120;width:100%}.mtx-grid-toolbar{display:flex;justify-content:space-between;align-items:center;min-height:48px;padding:8px;box-sizing:border-box;border-bottom:1px solid var(--mtx-grid-outline-color)}.mtx-grid-layout{display:flex;flex:1 1 auto;overflow:auto}.mtx-grid-content{flex-direction:column;width:0}.mtx-grid-sidebar{max-width:50%;border-left:1px solid var(--mtx-grid-outline-color)}[dir=rtl] .mtx-grid-sidebar{border-left-width:0;border-right:1px solid var(--mtx-grid-outline-color)}.mtx-grid-footer{position:relative;z-index:1}.mtx-grid-statusbar{display:flex;align-items:center;min-height:56px;padding:8px;border-top:1px solid var(--mtx-grid-outline-color)}.mtx-grid-no-result{display:flex;justify-content:center;align-items:center;flex:1;min-height:150px}.mtx-grid-expansion-placeholder{display:inline-block;width:40px;height:40px;vertical-align:middle}.mtx-grid-expansion-detail{display:flex;align-items:center;min-height:48px;overflow:hidden}.mtx-grid-checkbox-cell{flex:none;justify-content:center;width:60px;min-width:60px}.mtx-grid-checkbox-cell .mat-checkbox{display:flex;margin:0 10px}.mtx-grid-checkbox-cell .mat-checkbox-inner-container{margin-left:0}.mtx-grid-row-expand-button.mat-mdc-icon-button{width:40px;height:40px;padding:8px;vertical-align:middle}.mtx-grid-row-expand-button.mat-mdc-icon-button.expanded .mtx-grid-row-expand-icon{transform:rotate(90deg)}.mtx-grid-row-expand-button.mat-mdc-icon-button+mtx-grid-cell{vertical-align:middle}.mtx-grid-row-expand-button.mat-mdc-icon-button .mat-mdc-button-touch-target{width:100%;height:100%}.mtx-grid-icon{width:20px;height:20px;font-size:20px}.mtx-grid-column-menu-item,.mtx-grid-column-menu-header,.mtx-grid-column-menu-footer{color:var(--mtx-grid-column-menu-text-color)}.mtx-grid-column-menu-header{border-bottom:1px solid var(--mtx-grid-column-menu-divider-color)}.mtx-grid-column-menu-footer{border-top:1px solid var(--mtx-grid-column-menu-divider-color)}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(function () { return i3$1.NgClass; }), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(function () { return i3$1.NgForOf; }), selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i0.forwardRef(function () { return i3$1.NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(function () { return i3$1.NgTemplateOutlet; }), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i0.forwardRef(function () { return i3$1.NgStyle; }), selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i0.forwardRef(function () { return i3$3.MatTable; }), selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i0.forwardRef(function () { return i3$3.MatHeaderCellDef; }), selector: "[matHeaderCellDef]" }, { kind: "directive", type: i0.forwardRef(function () { return i3$3.MatHeaderRowDef; }), selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i0.forwardRef(function () { return i3$3.MatColumnDef; }), selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i0.forwardRef(function () { return i3$3.MatCellDef; }), selector: "[matCellDef]" }, { kind: "directive", type: i0.forwardRef(function () { return i3$3.MatRowDef; }), selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i0.forwardRef(function () { return i3$3.MatFooterCellDef; }), selector: "[matFooterCellDef]" }, { kind: "directive", type: i0.forwardRef(function () { return i3$3.MatFooterRowDef; }), selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i0.forwardRef(function () { return i3$3.MatHeaderCell; }), selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i0.forwardRef(function () { return i3$3.MatCell; }), selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i0.forwardRef(function () { return i3$3.MatFooterCell; }), selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i0.forwardRef(function () { return i3$3.MatHeaderRow; }), selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i0.forwardRef(function () { return i3$3.MatRow; }), selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i0.forwardRef(function () { return i3$3.MatFooterRow; }), selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "directive", type: i0.forwardRef(function () { return i4$2.MatSort; }), selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i0.forwardRef(function () { return i4$2.MatSortHeader; }), selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i0.forwardRef(function () { return i5$1.MatPaginator; }), selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: i0.forwardRef(function () { return i3$2.MatCheckbox; }), selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i0.forwardRef(function () { return i4$1.MatIconButton; }), selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i0.forwardRef(function () { return i8$1.MatProgressBar; }), selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i0.forwardRef(function () { return MatColumnResize; }), selector: "table[mat-table][columnResize]" }, { kind: "directive", type: i0.forwardRef(function () { return MatResizable; }), selector: "mat-header-cell[resizable], th[mat-header-cell][resizable]", inputs: ["matResizableMinWidthPx", "matResizableMaxWidthPx", "resizable"] }, { kind: "component", type: i0.forwardRef(function () { return MtxGridCell; }), selector: "mtx-grid-cell", inputs: ["rowData", "colDef", "data", "summary", "placeholder"], outputs: ["rowDataChange"], exportAs: ["mtxGridCell"] }, { kind: "component", type: i0.forwardRef(function () { return MtxGridColumnMenu; }), selector: "mtx-grid-column-menu", inputs: ["columns", "selectable", "selectableChecked", "sortable", "pinnable", "buttonText", "buttonType", "buttonColor", "buttonClass", "buttonIcon", "showHeader", "headerText", "headerTemplate", "showFooter", "footerText", "footerTemplate", "pinOptions"], outputs: ["columnChange"], exportAs: ["mtxGridColumnMenu"] }, { kind: "directive", type: i0.forwardRef(function () { return MtxGridExpansionToggle; }), selector: "[mtx-grid-expansion-toggle]", inputs: ["opened", "expandableRow", "expansionRowTpl"], outputs: ["openedChange", "toggleChange"] }, { kind: "directive", type: i0.forwardRef(function () { return MtxGridSelectableCell; }), selector: "[mtx-grid-selectable-cell]", inputs: ["mtxSelectableRowData"], outputs: ["cellSelectedChange"] }, { kind: "pipe", type: i0.forwardRef(function () { return i3$1.AsyncPipe; }), name: "async" }, { kind: "pipe", type: i0.forwardRef(function () { return i14.MtxToObservablePipe; }), name: "toObservable" }, { kind: "pipe", type: i0.forwardRef(function () { return i14.MtxIsTemplateRefPipe; }), name: "isTemplateRef" }, { kind: "pipe", type: i0.forwardRef(function () { return MtxGridRowClassPipe; }), name: "rowClass" }, { kind: "pipe", type: i0.forwardRef(function () { return MtxGridColClassPipe; }), name: "colClass" }], animations: [
|
|
1087
1139
|
trigger('expansion', [
|
|
1088
1140
|
state('collapsed, void', style({ height: '0', minHeight: '0', visibility: 'hidden' })),
|
|
1089
1141
|
state('expanded', style({ height: '*', visibility: 'visible' })),
|
|
@@ -1103,7 +1155,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImpor
|
|
|
1103
1155
|
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
1104
1156
|
transition('expanded <=> void', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
1105
1157
|
]),
|
|
1106
|
-
], template: "<!-- Progress bar-->\r\n<div class=\"mtx-grid-progress\" *ngIf=\"loading\">\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n</div>\r\n\r\n<!-- Toolbar -->\r\n<div class=\"mtx-grid-toolbar\" *ngIf=\"showToolbar\">\r\n <div class=\"mtx-grid-toolbar-content\">\r\n <ng-template [ngIf]=\"toolbarTemplate\" [ngIfElse]=\"defaultToolbarTemplate\">\r\n <ng-template [ngTemplateOutlet]=\"toolbarTemplate\"></ng-template>\r\n </ng-template>\r\n <ng-template #defaultToolbarTemplate>\r\n <div class=\"mtx-grid-toolbar-title\" *ngIf=\"toolbarTitle\">{{toolbarTitle}}</div>\r\n </ng-template>\r\n </div>\r\n <div class=\"mtx-grid-toolbar-actions\">\r\n <mtx-grid-column-menu *ngIf=\"showColumnMenuButton\" #columnMenu\r\n [columns]=\"columns\"\r\n [buttonText]=\"columnMenuButtonText\"\r\n [buttonType]=\"columnMenuButtonType\"\r\n [buttonColor]=\"columnMenuButtonColor\"\r\n [buttonClass]=\"columnMenuButtonClass\"\r\n [buttonIcon]=\"columnMenuButtonIcon\"\r\n [selectable]=\"columnHideable\"\r\n [selectableChecked]=\"columnHideableChecked\"\r\n [sortable]=\"columnSortable\"\r\n [pinnable]=\"columnPinnable\"\r\n [showHeader]=\"showColumnMenuHeader\"\r\n [headerText]=\"columnMenuHeaderText\"\r\n [headerTemplate]=\"columnMenuHeaderTemplate\"\r\n [showFooter]=\"showColumnMenuFooter\"\r\n [footerText]=\"columnMenuFooterText\"\r\n [footerTemplate]=\"columnMenuFooterTemplate\"\r\n [pinOptions]=\"columnPinOptions\"\r\n (columnChange)=\"_onColumnChange($event)\">\r\n </mtx-grid-column-menu>\r\n </div>\r\n</div>\r\n\r\n<div class=\"mtx-grid-main mtx-grid-layout\">\r\n <!-- Table content -->\r\n <div class=\"mtx-grid-content mtx-grid-layout\">\r\n <div #tableContainer class=\"mat-table-container\"\r\n [ngClass]=\"{'mat-table-with-data': !_hasNoResult}\">\r\n <table mat-table *ngIf=\"!columnResizable\"\r\n [ngClass]=\"{'mat-table-hover': rowHover, 'mat-table-striped': rowStriped, 'mat-table-expandable': expandable}\"\r\n [dataSource]=\"dataSource\" [multiTemplateDataRows]=\"expandable\"\r\n matSort\r\n [matSortActive]=\"sortActive\"\r\n [matSortDirection]=\"sortDirection\"\r\n [matSortDisableClear]=\"sortDisableClear\"\r\n [matSortDisabled]=\"sortDisabled\"\r\n [matSortStart]=\"sortStart\"\r\n (matSortChange)=\"_onSortChange($event)\"\r\n [trackBy]=\"trackBy\">\r\n\r\n <ng-container *ngIf=\"rowSelectable && !hideRowSelectionCheckbox\"\r\n matColumnDef=\"MtxGridCheckboxColumnDef\">\r\n <th mat-header-cell *matHeaderCellDef class=\"mtx-grid-checkbox-cell\">\r\n <mat-checkbox *ngIf=\"multiSelectable\"\r\n [checked]=\"rowSelection.hasValue() && _isAllSelected()\"\r\n [indeterminate]=\"rowSelection.hasValue() && !_isAllSelected()\"\r\n (change)=\"$event ? _toggleMasterCheckbox() : null\">\r\n </mat-checkbox>\r\n </th>\r\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\"\r\n class=\"mtx-grid-checkbox-cell\">\r\n <mat-checkbox *ngIf=\"!(rowSelectionFormatter.hideCheckbox && rowSelectionFormatter.hideCheckbox(row, _getIndex(index, dataIndex)))\"\r\n [disabled]=\"rowSelectionFormatter.disabled && rowSelectionFormatter.disabled(row, _getIndex(index, dataIndex))\"\r\n [checked]=\"rowSelection.isSelected(row)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? _toggleNormalCheckbox(row) : null\">\r\n </mat-checkbox>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef class=\"mtx-grid-checkbox-cell\"></td>\r\n </ng-container>\r\n\r\n <ng-container *ngFor=\"let col of columns;\">\r\n <ng-container [matColumnDef]=\"col.field\"\r\n [sticky]=\"col.pinned==='left'\" [stickyEnd]=\"col.pinned==='right'\">\r\n <th mat-header-cell *matHeaderCellDef\r\n [class]=\"col | colClass\"\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'min-width': col.width, 'left': col.left, 'right': col.right}\">\r\n <div class=\"mat-header-cell-inner\">\r\n <ng-template [ngIf]=\"headerTemplate | isTemplateRef\" [ngIfElse]=\"headerTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(headerTemplate)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #headerTpl>\r\n <ng-template [ngIf]=\"$any(headerTemplate)?.[col.field] | isTemplateRef\"\r\n [ngIfElse]=\"defaultHeaderTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(headerTemplate)[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultHeaderTpl>\r\n <div [mat-sort-header]=\"col.sortProp?.id || col.field\"\r\n [disabled]=\"!col.sortable\"\r\n [disableClear]=\"col.sortProp?.disableClear ?? sortDisableClear\"\r\n [arrowPosition]=\"col.sortProp?.arrowPosition!\"\r\n [start]=\"col.sortProp?.start!\">\r\n <span class=\"mtx-grid-expansion-placeholder\" *ngIf=\"col.showExpand\"></span>\r\n <span>{{col.header | toObservable | async}}</span>\r\n <svg class=\"mtx-grid-icon mat-sort-header-icon\" *ngIf=\"col.sortable\"\r\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\"\r\n focusable=\"false\">\r\n <path d=\"M3,13H15V11H3M3,6V8H21V6M3,18H9V16H3V18Z\"></path>\r\n </svg>\r\n </div>\r\n <ng-template [ngTemplateOutlet]=\"headerExtraTplBase\"\r\n [ngTemplateOutletContext]=\"{ $implicit: headerExtraTemplate, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </div>\r\n </th>\r\n\r\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\"\r\n [class]=\"col | colClass: row: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'min-width': col.width, 'left': col.left, 'right': col.right}\"\r\n mtx-grid-selectable-cell (cellSelectionChange)=\"_selectCell($event, row, col)\">\r\n <ng-template [ngIf]=\"cellTemplate | isTemplateRef\" [ngIfElse]=\"cellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(cellTemplate)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #cellTpl>\r\n <ng-template [ngIf]=\"$any(cellTemplate)?.[col.field] | isTemplateRef\"\r\n [ngIfElse]=\"colDefCellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(cellTemplate)[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #colDefCellTpl>\r\n <ng-template [ngIf]=\"col.cellTemplate\" [ngIfElse]=\"defaultCellTpl\"\r\n [ngTemplateOutlet]=\"col.cellTemplate!\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultCellTpl>\r\n <button class=\"mtx-grid-row-expand-button\" *ngIf=\"col.showExpand\"\r\n mat-icon-button mtx-grid-expansion-toggle type=\"button\"\r\n [(opened)]=\"expansionRowStates[dataIndex].expanded\"\r\n (toggleChange)=\"_onExpansionChange($event, row, col, dataIndex);\">\r\n <svg class=\"mtx-grid-icon mtx-grid-row-expand-icon\" viewBox=\"0 0 24 24\"\r\n width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"></path>\r\n </svg>\r\n </button>\r\n\r\n <mtx-grid-cell [rowData]=\"row\" [colDef]=\"col\" [placeholder]=\"emptyValuePlaceholder\"\r\n (rowDataChange)=\"_onRowDataChange($event)\">\r\n </mtx-grid-cell>\r\n </ng-template>\r\n </td>\r\n\r\n <td mat-footer-cell *matFooterCellDef\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'min-width': col.width, 'left': col.left, 'right': col.right}\">\r\n <span class=\"mtx-grid-expansion-placeholder\" *ngIf=\"col.showExpand\"></span>\r\n\r\n <ng-template [ngIf]=\"summaryTemplate | isTemplateRef\" [ngIfElse]=\"summaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(summaryTemplate)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col, data: data }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #summaryTpl>\r\n <ng-template [ngIf]=\"$any(summaryTemplate)?.[col.field] | isTemplateRef\"\r\n [ngIfElse]=\"defaultSummaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(summaryTemplate)[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: _getColData(data, col), colData: _getColData(data, col), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultSummaryTpl>\r\n <mtx-grid-cell [summary]=\"true\" [data]=\"data\" [colDef]=\"col\"\r\n [placeholder]=\"emptyValuePlaceholder\">\r\n </mtx-grid-cell>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-template [ngIf]=\"useContentHeaderRowTemplate\" [ngIfElse]=\"defaultHeaderRowTpl\">\r\n </ng-template>\r\n <ng-template #defaultHeaderRowTpl>\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"useContentRowTemplate\" [ngIfElse]=\"defaultRowTpl\"></ng-template>\r\n <ng-template #defaultRowTpl>\r\n <tr mat-row\r\n *matRowDef=\"let row; let index = index; let dataIndex = dataIndex; columns: displayedColumns;\"\r\n [class]=\"row | rowClass: index: dataIndex: rowClassFormatter\"\r\n [ngClass]=\"{'selected': rowSelection.isSelected(row)}\"\r\n (click)=\"_selectRow($event, row, _getIndex(index, dataIndex))\">\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"_whetherShowSummary\">\r\n <tr mat-footer-row *matFooterRowDef=\"displayedColumns; sticky: true\"></tr>\r\n </ng-template>\r\n <ng-template [ngIf]=\"useContentFooterRowTemplate\"></ng-template>\r\n\r\n <ng-container *ngIf=\"expandable\">\r\n <!-- Expanded Content Column - The expandable row is made up of this one column that spans across all columns -->\r\n <ng-container matColumnDef=\"MtxGridExpansionColumnDef\">\r\n <td mat-cell *matCellDef=\"let row; let dataIndex = dataIndex\"\r\n [attr.colspan]=\"displayedColumns.length\">\r\n <div class=\"mtx-grid-expansion-detail\"\r\n [@expansion]=\"expansionRowStates[dataIndex].expanded ? 'expanded' : 'collapsed'\">\r\n <ng-template [ngTemplateOutlet]=\"expansionTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: dataIndex, expanded: expansionRowStates[dataIndex].expanded }\">\r\n </ng-template>\r\n </div>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-row\r\n *matRowDef=\"let row; columns: ['MtxGridExpansionColumnDef']; let dataIndex = dataIndex\"\r\n [ngClass]=\"['mtx-grid-expansion', expansionRowStates[dataIndex].expanded ? 'expanded' : 'collapsed']\">\r\n </tr>\r\n </ng-container>\r\n </table>\r\n\r\n <!-- TODO: Use flexbox-based mat-table -->\r\n <table mat-table *ngIf=\"columnResizable\"\r\n columnResize\r\n [ngClass]=\"{'mat-table-hover': rowHover, 'mat-table-striped': rowStriped, 'mat-table-expandable': expandable}\"\r\n [dataSource]=\"dataSource\" [multiTemplateDataRows]=\"expandable\"\r\n matSort\r\n [matSortActive]=\"sortActive\"\r\n [matSortDirection]=\"sortDirection\"\r\n [matSortDisableClear]=\"sortDisableClear\"\r\n [matSortDisabled]=\"sortDisabled\"\r\n [matSortStart]=\"sortStart\"\r\n (matSortChange)=\"_onSortChange($event)\"\r\n [trackBy]=\"trackBy\">\r\n\r\n <ng-container *ngIf=\"rowSelectable && !hideRowSelectionCheckbox\"\r\n matColumnDef=\"MtxGridCheckboxColumnDef\">\r\n <th mat-header-cell *matHeaderCellDef class=\"mtx-grid-checkbox-cell\">\r\n <mat-checkbox *ngIf=\"multiSelectable\"\r\n [checked]=\"rowSelection.hasValue() && _isAllSelected()\"\r\n [indeterminate]=\"rowSelection.hasValue() && !_isAllSelected()\"\r\n (change)=\"$event ? _toggleMasterCheckbox() : null\">\r\n </mat-checkbox>\r\n </th>\r\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\"\r\n class=\"mtx-grid-checkbox-cell\">\r\n <mat-checkbox *ngIf=\"!(rowSelectionFormatter.hideCheckbox && rowSelectionFormatter.hideCheckbox(row, _getIndex(index, dataIndex)))\"\r\n [disabled]=\"rowSelectionFormatter.disabled && rowSelectionFormatter.disabled(row, _getIndex(index, dataIndex))\"\r\n [checked]=\"rowSelection.isSelected(row)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? _toggleNormalCheckbox(row) : null\">\r\n </mat-checkbox>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef class=\"mtx-grid-checkbox-cell\"></td>\r\n </ng-container>\r\n\r\n <ng-container *ngFor=\"let col of columns;\">\r\n <ng-container [matColumnDef]=\"col.field\"\r\n [sticky]=\"col.pinned==='left'\" [stickyEnd]=\"col.pinned==='right'\">\r\n <th mat-header-cell *matHeaderCellDef\r\n [class]=\"col | colClass\"\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'left': col.left, 'right': col.right}\"\r\n [resizable]=\"col.resizable\"\r\n [matResizableMinWidthPx]=\"col.minWidth\" [matResizableMaxWidthPx]=\"col.maxWidth\">\r\n <div class=\"mat-header-cell-inner\">\r\n <ng-template [ngIf]=\"headerTemplate | isTemplateRef\" [ngIfElse]=\"headerTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(headerTemplate)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #headerTpl>\r\n <ng-template [ngIf]=\"$any(headerTemplate)?.[col.field] | isTemplateRef\"\r\n [ngIfElse]=\"defaultHeaderTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(headerTemplate)[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultHeaderTpl>\r\n <div [mat-sort-header]=\"col.sortProp?.id || col.field\"\r\n [disabled]=\"!col.sortable\"\r\n [disableClear]=\"col.sortProp?.disableClear ?? sortDisableClear\"\r\n [arrowPosition]=\"col.sortProp?.arrowPosition!\"\r\n [start]=\"col.sortProp?.start!\">\r\n <span class=\"mtx-grid-expansion-placeholder\" *ngIf=\"col.showExpand\"></span>\r\n <span>{{col.header | toObservable | async}}</span>\r\n <svg class=\"mtx-grid-icon mat-sort-header-icon\" *ngIf=\"col.sortable\"\r\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\"\r\n focusable=\"false\">\r\n <path d=\"M3,13H15V11H3M3,6V8H21V6M3,18H9V16H3V18Z\"></path>\r\n </svg>\r\n </div>\r\n <ng-template [ngTemplateOutlet]=\"headerExtraTplBase\"\r\n [ngTemplateOutletContext]=\"{ $implicit: headerExtraTemplate, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </div>\r\n </th>\r\n\r\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\"\r\n [class]=\"col | colClass: row: rowChangeRecord :rowChangeRecord?.currentValue\"\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'left': col.left, 'right': col.right}\"\r\n mtx-grid-selectable-cell (cellSelectionChange)=\"_selectCell($event, row, col)\">\r\n <ng-template [ngIf]=\"cellTemplate | isTemplateRef\" [ngIfElse]=\"cellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(cellTemplate)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #cellTpl>\r\n <ng-template [ngIf]=\"$any(cellTemplate)?.[col.field] | isTemplateRef\"\r\n [ngIfElse]=\"colDefCellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(cellTemplate)[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #colDefCellTpl>\r\n <ng-template [ngIf]=\"col.cellTemplate\" [ngIfElse]=\"defaultCellTpl\"\r\n [ngTemplateOutlet]=\"col.cellTemplate!\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultCellTpl>\r\n <button class=\"mtx-grid-row-expand-button\" *ngIf=\"col.showExpand\"\r\n mat-icon-button mtx-grid-expansion-toggle type=\"button\"\r\n [(opened)]=\"expansionRowStates[dataIndex].expanded\"\r\n (toggleChange)=\"_onExpansionChange($event, row, col, dataIndex);\">\r\n <svg class=\"mtx-grid-icon mtx-grid-row-expand-icon\" viewBox=\"0 0 24 24\"\r\n width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"></path>\r\n </svg>\r\n </button>\r\n\r\n <mtx-grid-cell [rowData]=\"row\" [colDef]=\"col\" [placeholder]=\"emptyValuePlaceholder\"\r\n (rowDataChange)=\"_onRowDataChange($event)\">\r\n </mtx-grid-cell>\r\n </ng-template>\r\n </td>\r\n\r\n <td mat-footer-cell *matFooterCellDef\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'left': col.left, 'right': col.right}\">\r\n <span class=\"mtx-grid-expansion-placeholder\" *ngIf=\"col.showExpand\"></span>\r\n\r\n <ng-template [ngIf]=\"summaryTemplate | isTemplateRef\" [ngIfElse]=\"summaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(summaryTemplate)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col, data: data }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #summaryTpl>\r\n <ng-template [ngIf]=\"$any(summaryTemplate)?.[col.field] | isTemplateRef\"\r\n [ngIfElse]=\"defaultSummaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(summaryTemplate)[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: _getColData(data, col), colData: _getColData(data, col), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultSummaryTpl>\r\n <mtx-grid-cell [summary]=\"true\" [data]=\"data\" [colDef]=\"col\"\r\n [placeholder]=\"emptyValuePlaceholder\">\r\n </mtx-grid-cell>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-template [ngIf]=\"useContentHeaderRowTemplate\" [ngIfElse]=\"defaultHeaderRowTpl\">\r\n </ng-template>\r\n <ng-template #defaultHeaderRowTpl>\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"useContentRowTemplate\" [ngIfElse]=\"defaultRowTpl\"></ng-template>\r\n <ng-template #defaultRowTpl>\r\n <tr mat-row\r\n *matRowDef=\"let row; let index = index; let dataIndex = dataIndex; columns: displayedColumns;\"\r\n [class]=\"row | rowClass: index: dataIndex: rowClassFormatter\"\r\n [ngClass]=\"{'selected': rowSelection.isSelected(row)}\"\r\n (click)=\"_selectRow($event, row, _getIndex(index, dataIndex))\">\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"_whetherShowSummary\">\r\n <tr mat-footer-row *matFooterRowDef=\"displayedColumns; sticky: true\"></tr>\r\n </ng-template>\r\n <ng-template [ngIf]=\"useContentFooterRowTemplate\"></ng-template>\r\n\r\n <ng-container *ngIf=\"expandable\">\r\n <!-- Expanded Content Column - The expandable row is made up of this one column that spans across all columns -->\r\n <ng-container matColumnDef=\"MtxGridExpansionColumnDef\">\r\n <td mat-cell *matCellDef=\"let row; let dataIndex = dataIndex\"\r\n [attr.colspan]=\"displayedColumns.length\">\r\n <div class=\"mtx-grid-expansion-detail\"\r\n [@expansion]=\"expansionRowStates[dataIndex].expanded ? 'expanded' : 'collapsed'\">\r\n <ng-template [ngTemplateOutlet]=\"expansionTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: dataIndex, expanded: expansionRowStates[dataIndex].expanded }\">\r\n </ng-template>\r\n </div>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-row\r\n *matRowDef=\"let row; columns: ['MtxGridExpansionColumnDef']; let dataIndex = dataIndex\"\r\n [ngClass]=\"['mtx-grid-expansion', expansionRowStates[dataIndex].expanded ? 'expanded' : 'collapsed']\">\r\n </tr>\r\n </ng-container>\r\n </table>\r\n </div>\r\n\r\n <!-- No result -->\r\n <div class=\"mtx-grid-no-result\" *ngIf=\"_hasNoResult\">\r\n <ng-template [ngIf]=\"noResultTemplate\" [ngIfElse]=\"defaultNoResultTpl\">\r\n <ng-template [ngTemplateOutlet]=\"noResultTemplate\"></ng-template>\r\n </ng-template>\r\n <ng-template #defaultNoResultTpl>{{noResultText}}</ng-template>\r\n </div>\r\n </div>\r\n\r\n <!-- Tool sidebar -->\r\n <div class=\"mtx-grid-sidebar\" *ngIf=\"showSidebar\">\r\n <ng-template [ngIf]=\"sidebarTemplate\">\r\n <ng-template [ngTemplateOutlet]=\"sidebarTemplate\"></ng-template>\r\n </ng-template>\r\n </div>\r\n</div>\r\n\r\n<div class=\"mtx-grid-footer\">\r\n <!-- Status Bar -->\r\n <div class=\"mtx-grid-statusbar\" *ngIf=\"showStatusbar\">\r\n <ng-template [ngIf]=\"statusbarTemplate\">\r\n <ng-template [ngTemplateOutlet]=\"statusbarTemplate\"></ng-template>\r\n </ng-template>\r\n </div>\r\n\r\n <!-- Pagination -->\r\n <div class=\"mtx-grid-pagination\">\r\n <ng-template [ngIf]=\"paginationTemplate\" [ngIfElse]=\"defaultPaginationTemplate\">\r\n <ng-template [ngTemplateOutlet]=\"paginationTemplate\"></ng-template>\r\n </ng-template>\r\n <ng-template #defaultPaginationTemplate>\r\n <mat-paginator [class.mat-paginator-hidden]=\"!showPaginator\"\r\n [showFirstLastButtons]=\"showFirstLastButtons\"\r\n [length]=\"length\"\r\n [pageIndex]=\"pageIndex\"\r\n [pageSize]=\"pageSize\"\r\n [pageSizeOptions]=\"pageSizeOptions\"\r\n [hidePageSize]=\"hidePageSize\"\r\n (page)=\"_onPage($event)\"\r\n [disabled]=\"pageDisabled\">\r\n </mat-paginator>\r\n </ng-template>\r\n </div>\r\n</div>\r\n\r\n<!-- Header template for extra content -->\r\n<ng-template #headerExtraTplBase let-headerExtraTemplate let-col=\"colDef\">\r\n <ng-template [ngIf]=\"headerExtraTemplate | isTemplateRef\" [ngIfElse]=\"headerExtraTpl\">\r\n <ng-template [ngTemplateOutlet]=\"headerExtraTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #headerExtraTpl>\r\n <ng-template [ngIf]=\"$any(headerExtraTemplate)?.[col.field] | isTemplateRef\">\r\n <ng-template [ngTemplateOutlet]=\"headerExtraTemplate[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n</ng-template>\r\n", styles: [".mtx-grid{position:relative;display:flex;flex-direction:column;width:100%}.mtx-grid .mat-table-container{overflow:auto}.mtx-grid .mat-table-container.mat-table-with-data{flex:1}.mtx-grid .mat-mdc-table:not(.mat-column-resize-table){min-width:100%;border-collapse:separate}.mtx-grid .mat-mdc-table:not(.mat-column-resize-table) .mat-mdc-header-cell:not(.mtx-grid-checkbox-cell),.mtx-grid .mat-mdc-table:not(.mat-column-resize-table) .mat-mdc-footer-cell:not(.mtx-grid-checkbox-cell),.mtx-grid .mat-mdc-table:not(.mat-column-resize-table) .mat-mdc-cell:not(.mtx-grid-checkbox-cell){min-width:80px}.mtx-grid .mat-table-sticky-left{border-right-width:1px;border-right-style:solid}[dir=rtl] .mtx-grid .mat-table-sticky-left{border-right-width:0;border-left-width:1px;border-left-style:solid}.mtx-grid .mat-table-sticky-right{border-left-width:1px;border-left-style:solid}[dir=rtl] .mtx-grid .mat-table-sticky-right{border-left-width:0;border-right-width:1px;border-right-style:solid}.mtx-grid .mat-mdc-header-cell,.mtx-grid .mat-mdc-footer-cell,.mtx-grid .mat-mdc-cell{padding:4px 10px;box-sizing:border-box}.mtx-grid .mat-mdc-header-cell:first-of-type:not(:only-of-type),.mtx-grid .mat-mdc-footer-cell:first-of-type:not(:only-of-type),.mtx-grid .mat-mdc-cell:first-of-type:not(:only-of-type){padding-left:24px}.mtx-grid .mat-mdc-header-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,.mtx-grid .mat-mdc-footer-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,.mtx-grid .mat-mdc-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell{padding-left:10px;padding-right:10px}[dir=rtl] .mtx-grid .mat-mdc-header-cell:first-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-mdc-footer-cell:first-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-mdc-cell:first-of-type:not(:only-of-type){padding-left:10px;padding-right:24px}[dir=rtl] .mtx-grid .mat-mdc-header-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,[dir=rtl] .mtx-grid .mat-mdc-footer-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,[dir=rtl] .mtx-grid .mat-mdc-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell{padding-left:10px;padding-right:10px}.mtx-grid .mat-mdc-header-cell:last-of-type:not(:only-of-type),.mtx-grid .mat-mdc-footer-cell:last-of-type:not(:only-of-type),.mtx-grid .mat-mdc-cell:last-of-type:not(:only-of-type){padding-right:24px}[dir=rtl] .mtx-grid .mat-mdc-header-cell:last-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-mdc-footer-cell:last-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-mdc-cell:last-of-type:not(:only-of-type){padding-left:24px;padding-right:10px}.mtx-grid .mat-mdc-row.mtx-grid-expansion{height:0;overflow:hidden}.mtx-grid .mat-mdc-row.mtx-grid-expansion .mat-mdc-cell{padding-top:0;padding-bottom:0}.mtx-grid .mat-mdc-row.mtx-grid-expansion.collapsed .mat-mdc-cell{border-bottom-width:0}.mtx-grid .mat-mdc-row:last-of-type .mat-cell{border-bottom-width:0}.mtx-grid .mat-sort-header-icon{margin:0 4px}.mtx-grid .mat-header-cell-inner{display:inline-flex;align-items:center}.mtx-grid .mat-paginator-hidden{display:none}.mtx-grid-progress{position:absolute;top:0;z-index:120;width:100%}.mtx-grid-toolbar{display:flex;justify-content:space-between;align-items:center;min-height:48px;padding:8px;box-sizing:border-box}.mtx-grid-layout{display:flex;flex:1 1 auto;overflow:auto}.mtx-grid-content{flex-direction:column;width:0}.mtx-grid-sidebar{max-width:50%;border-left-width:1px;border-left-style:solid}[dir=rtl] .mtx-grid-sidebar{border-left-width:0;border-right-width:1px;border-right-style:solid}.mtx-grid-footer{position:relative;z-index:1}.mtx-grid-statusbar{display:flex;align-items:center;min-height:56px;padding:8px}.mtx-grid-no-result{display:flex;justify-content:center;align-items:center;flex:1;min-height:150px}.mtx-grid-expansion-placeholder{display:inline-block;width:40px;height:40px;vertical-align:middle}.mtx-grid-expansion-detail{display:flex;align-items:center;min-height:48px;overflow:hidden}.mtx-grid-checkbox-cell{flex:none;justify-content:center;width:60px;min-width:60px}.mtx-grid-checkbox-cell .mat-checkbox{display:flex;margin:0 10px}.mtx-grid-checkbox-cell .mat-checkbox-inner-container{margin-left:0}.mtx-grid-row-expand-button.mat-mdc-icon-button{width:40px;height:40px;padding:8px;vertical-align:middle}.mtx-grid-row-expand-button.mat-mdc-icon-button.expanded .mtx-grid-row-expand-icon{transform:rotate(90deg)}.mtx-grid-row-expand-button.mat-mdc-icon-button+mtx-grid-cell{vertical-align:middle}.mtx-grid-row-expand-button.mat-mdc-icon-button .mat-mdc-button-touch-target{width:100%;height:100%}.mtx-grid-icon{width:20px;height:20px;font-size:20px}\n"] }]
|
|
1158
|
+
], template: "<!-- Progress bar-->\r\n<div class=\"mtx-grid-progress\" *ngIf=\"loading\">\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n</div>\r\n\r\n<!-- Toolbar -->\r\n<div class=\"mtx-grid-toolbar\" *ngIf=\"showToolbar\">\r\n <div class=\"mtx-grid-toolbar-content\">\r\n <ng-template [ngIf]=\"toolbarTemplate\" [ngIfElse]=\"defaultToolbarTemplate\">\r\n <ng-template [ngTemplateOutlet]=\"toolbarTemplate\"></ng-template>\r\n </ng-template>\r\n <ng-template #defaultToolbarTemplate>\r\n <div class=\"mtx-grid-toolbar-title\" *ngIf=\"toolbarTitle\">{{toolbarTitle}}</div>\r\n </ng-template>\r\n </div>\r\n <div class=\"mtx-grid-toolbar-actions\">\r\n <mtx-grid-column-menu *ngIf=\"showColumnMenuButton\" #columnMenu\r\n [columns]=\"columns\"\r\n [buttonText]=\"columnMenuButtonText\"\r\n [buttonType]=\"columnMenuButtonType\"\r\n [buttonColor]=\"columnMenuButtonColor\"\r\n [buttonClass]=\"columnMenuButtonClass\"\r\n [buttonIcon]=\"columnMenuButtonIcon\"\r\n [selectable]=\"columnHideable\"\r\n [selectableChecked]=\"columnHideableChecked\"\r\n [sortable]=\"columnSortable\"\r\n [pinnable]=\"columnPinnable\"\r\n [showHeader]=\"showColumnMenuHeader\"\r\n [headerText]=\"columnMenuHeaderText\"\r\n [headerTemplate]=\"columnMenuHeaderTemplate\"\r\n [showFooter]=\"showColumnMenuFooter\"\r\n [footerText]=\"columnMenuFooterText\"\r\n [footerTemplate]=\"columnMenuFooterTemplate\"\r\n [pinOptions]=\"columnPinOptions\"\r\n (columnChange)=\"_onColumnChange($event)\">\r\n </mtx-grid-column-menu>\r\n </div>\r\n</div>\r\n\r\n<div class=\"mtx-grid-main mtx-grid-layout\">\r\n <!-- Table content -->\r\n <div class=\"mtx-grid-content mtx-grid-layout\">\r\n <div #tableContainer class=\"mat-table-container\"\r\n [ngClass]=\"{'mat-table-with-data': !_hasNoResult}\">\r\n <table mat-table *ngIf=\"!columnResizable\"\r\n [ngClass]=\"{'mat-table-hover': rowHover, 'mat-table-striped': rowStriped, 'mat-table-expandable': expandable}\"\r\n [dataSource]=\"dataSource\" [multiTemplateDataRows]=\"expandable\"\r\n matSort\r\n [matSortActive]=\"sortActive\"\r\n [matSortDirection]=\"sortDirection\"\r\n [matSortDisableClear]=\"sortDisableClear\"\r\n [matSortDisabled]=\"sortDisabled\"\r\n [matSortStart]=\"sortStart\"\r\n (matSortChange)=\"_onSortChange($event)\"\r\n [trackBy]=\"trackBy\">\r\n\r\n <ng-container *ngIf=\"rowSelectable && !hideRowSelectionCheckbox\"\r\n matColumnDef=\"MtxGridCheckboxColumnDef\">\r\n <th mat-header-cell *matHeaderCellDef class=\"mtx-grid-checkbox-cell\">\r\n <mat-checkbox *ngIf=\"multiSelectable\"\r\n [checked]=\"rowSelection.hasValue() && _isAllSelected()\"\r\n [indeterminate]=\"rowSelection.hasValue() && !_isAllSelected()\"\r\n (change)=\"$event ? _toggleMasterCheckbox() : null\">\r\n </mat-checkbox>\r\n </th>\r\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\"\r\n class=\"mtx-grid-checkbox-cell\">\r\n <mat-checkbox *ngIf=\"!(rowSelectionFormatter.hideCheckbox && rowSelectionFormatter.hideCheckbox(row, _getIndex(index, dataIndex)))\"\r\n [disabled]=\"rowSelectionFormatter.disabled && rowSelectionFormatter.disabled(row, _getIndex(index, dataIndex))\"\r\n [checked]=\"rowSelection.isSelected(row)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? _toggleNormalCheckbox(row) : null\">\r\n </mat-checkbox>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef class=\"mtx-grid-checkbox-cell\"></td>\r\n </ng-container>\r\n\r\n <ng-container *ngFor=\"let col of columns;\">\r\n <ng-container [matColumnDef]=\"col.field\"\r\n [sticky]=\"col.pinned==='left'\" [stickyEnd]=\"col.pinned==='right'\">\r\n <th mat-header-cell *matHeaderCellDef\r\n [class]=\"col | colClass\"\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'min-width': col.width, 'left': col.left, 'right': col.right}\">\r\n <div class=\"mat-header-cell-inner\">\r\n <ng-template [ngIf]=\"headerTemplate | isTemplateRef\" [ngIfElse]=\"headerTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(headerTemplate)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #headerTpl>\r\n <ng-template [ngIf]=\"$any(headerTemplate)?.[col.field] | isTemplateRef\"\r\n [ngIfElse]=\"defaultHeaderTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(headerTemplate)[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultHeaderTpl>\r\n <div [mat-sort-header]=\"col.sortProp?.id || col.field\"\r\n [disabled]=\"!col.sortable\"\r\n [disableClear]=\"col.sortProp?.disableClear ?? sortDisableClear\"\r\n [arrowPosition]=\"col.sortProp?.arrowPosition!\"\r\n [start]=\"col.sortProp?.start!\">\r\n <span class=\"mtx-grid-expansion-placeholder\" *ngIf=\"col.showExpand\"></span>\r\n <span>{{col.header | toObservable | async}}</span>\r\n <svg class=\"mtx-grid-icon mat-sort-header-icon\" *ngIf=\"col.sortable\"\r\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\"\r\n focusable=\"false\">\r\n <path d=\"M3,13H15V11H3M3,6V8H21V6M3,18H9V16H3V18Z\"></path>\r\n </svg>\r\n </div>\r\n <ng-template [ngTemplateOutlet]=\"headerExtraTplBase\"\r\n [ngTemplateOutletContext]=\"{ $implicit: headerExtraTemplate, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </div>\r\n </th>\r\n\r\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\"\r\n [class]=\"col | colClass: row: rowChangeRecord: rowChangeRecord?.currentValue\"\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'min-width': col.width, 'left': col.left, 'right': col.right}\"\r\n mtx-grid-selectable-cell (cellSelectedChange)=\"_selectCell($event, row, col)\">\r\n <ng-template [ngIf]=\"cellTemplate | isTemplateRef\" [ngIfElse]=\"cellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(cellTemplate)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #cellTpl>\r\n <ng-template [ngIf]=\"$any(cellTemplate)?.[col.field] | isTemplateRef\"\r\n [ngIfElse]=\"colDefCellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(cellTemplate)[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #colDefCellTpl>\r\n <ng-template [ngIf]=\"col.cellTemplate\" [ngIfElse]=\"defaultCellTpl\"\r\n [ngTemplateOutlet]=\"col.cellTemplate!\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultCellTpl>\r\n <button class=\"mtx-grid-row-expand-button\" *ngIf=\"col.showExpand\"\r\n mat-icon-button mtx-grid-expansion-toggle type=\"button\"\r\n [(opened)]=\"expansionRowStates[dataIndex].expanded\"\r\n (toggleChange)=\"_onExpansionChange($event, row, col, dataIndex);\">\r\n <svg class=\"mtx-grid-icon mtx-grid-row-expand-icon\" viewBox=\"0 0 24 24\"\r\n width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"></path>\r\n </svg>\r\n </button>\r\n\r\n <mtx-grid-cell [rowData]=\"row\" [colDef]=\"col\" [placeholder]=\"emptyValuePlaceholder\"\r\n (rowDataChange)=\"_onRowDataChange($event)\">\r\n </mtx-grid-cell>\r\n </ng-template>\r\n </td>\r\n\r\n <td mat-footer-cell *matFooterCellDef\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'min-width': col.width, 'left': col.left, 'right': col.right}\">\r\n <span class=\"mtx-grid-expansion-placeholder\" *ngIf=\"col.showExpand\"></span>\r\n\r\n <ng-template [ngIf]=\"summaryTemplate | isTemplateRef\" [ngIfElse]=\"summaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(summaryTemplate)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col, data: data }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #summaryTpl>\r\n <ng-template [ngIf]=\"$any(summaryTemplate)?.[col.field] | isTemplateRef\"\r\n [ngIfElse]=\"defaultSummaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(summaryTemplate)[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: _getColData(data, col), colData: _getColData(data, col), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultSummaryTpl>\r\n <mtx-grid-cell [summary]=\"true\" [data]=\"data\" [colDef]=\"col\"\r\n [placeholder]=\"emptyValuePlaceholder\">\r\n </mtx-grid-cell>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-template [ngIf]=\"useContentHeaderRowTemplate\" [ngIfElse]=\"defaultHeaderRowTpl\">\r\n </ng-template>\r\n <ng-template #defaultHeaderRowTpl>\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"useContentRowTemplate\" [ngIfElse]=\"defaultRowTpl\"></ng-template>\r\n <ng-template #defaultRowTpl>\r\n <tr mat-row\r\n *matRowDef=\"let row; let index = index; let dataIndex = dataIndex; columns: displayedColumns;\"\r\n [class]=\"row | rowClass: index: dataIndex: rowClassFormatter\"\r\n [ngClass]=\"{'selected': rowSelection.isSelected(row)}\"\r\n (click)=\"_selectRow($event, row, _getIndex(index, dataIndex))\"\r\n (contextmenu)=\"_contextmenu($event, row, _getIndex(index, dataIndex))\">\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"_whetherShowSummary\">\r\n <tr mat-footer-row *matFooterRowDef=\"displayedColumns; sticky: true\"></tr>\r\n </ng-template>\r\n <ng-template [ngIf]=\"useContentFooterRowTemplate\"></ng-template>\r\n\r\n <ng-container *ngIf=\"expandable\">\r\n <!-- Expanded Content Column - The expandable row is made up of this one column that spans across all columns -->\r\n <ng-container matColumnDef=\"MtxGridExpansionColumnDef\">\r\n <td mat-cell *matCellDef=\"let row; let dataIndex = dataIndex\"\r\n [attr.colspan]=\"displayedColumns.length\">\r\n <div class=\"mtx-grid-expansion-detail\"\r\n [@expansion]=\"expansionRowStates[dataIndex].expanded ? 'expanded' : 'collapsed'\">\r\n <ng-template [ngTemplateOutlet]=\"expansionTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: dataIndex, expanded: expansionRowStates[dataIndex].expanded }\">\r\n </ng-template>\r\n </div>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-row\r\n *matRowDef=\"let row; columns: ['MtxGridExpansionColumnDef']; let dataIndex = dataIndex\"\r\n [ngClass]=\"['mtx-grid-expansion', expansionRowStates[dataIndex].expanded ? 'expanded' : 'collapsed']\">\r\n </tr>\r\n </ng-container>\r\n </table>\r\n\r\n <!-- TODO: Use flexbox-based mat-table -->\r\n <table mat-table *ngIf=\"columnResizable\"\r\n columnResize\r\n [ngClass]=\"{'mat-table-hover': rowHover, 'mat-table-striped': rowStriped, 'mat-table-expandable': expandable}\"\r\n [dataSource]=\"dataSource\" [multiTemplateDataRows]=\"expandable\"\r\n matSort\r\n [matSortActive]=\"sortActive\"\r\n [matSortDirection]=\"sortDirection\"\r\n [matSortDisableClear]=\"sortDisableClear\"\r\n [matSortDisabled]=\"sortDisabled\"\r\n [matSortStart]=\"sortStart\"\r\n (matSortChange)=\"_onSortChange($event)\"\r\n [trackBy]=\"trackBy\">\r\n\r\n <ng-container *ngIf=\"rowSelectable && !hideRowSelectionCheckbox\"\r\n matColumnDef=\"MtxGridCheckboxColumnDef\">\r\n <th mat-header-cell *matHeaderCellDef class=\"mtx-grid-checkbox-cell\">\r\n <mat-checkbox *ngIf=\"multiSelectable\"\r\n [checked]=\"rowSelection.hasValue() && _isAllSelected()\"\r\n [indeterminate]=\"rowSelection.hasValue() && !_isAllSelected()\"\r\n (change)=\"$event ? _toggleMasterCheckbox() : null\">\r\n </mat-checkbox>\r\n </th>\r\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\"\r\n class=\"mtx-grid-checkbox-cell\">\r\n <mat-checkbox *ngIf=\"!(rowSelectionFormatter.hideCheckbox && rowSelectionFormatter.hideCheckbox(row, _getIndex(index, dataIndex)))\"\r\n [disabled]=\"rowSelectionFormatter.disabled && rowSelectionFormatter.disabled(row, _getIndex(index, dataIndex))\"\r\n [checked]=\"rowSelection.isSelected(row)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? _toggleNormalCheckbox(row) : null\">\r\n </mat-checkbox>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef class=\"mtx-grid-checkbox-cell\"></td>\r\n </ng-container>\r\n\r\n <ng-container *ngFor=\"let col of columns;\">\r\n <ng-container [matColumnDef]=\"col.field\"\r\n [sticky]=\"col.pinned==='left'\" [stickyEnd]=\"col.pinned==='right'\">\r\n <th mat-header-cell *matHeaderCellDef\r\n [class]=\"col | colClass\"\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'left': col.left, 'right': col.right}\"\r\n [resizable]=\"col.resizable\"\r\n [matResizableMinWidthPx]=\"col.minWidth\" [matResizableMaxWidthPx]=\"col.maxWidth\">\r\n <div class=\"mat-header-cell-inner\">\r\n <ng-template [ngIf]=\"headerTemplate | isTemplateRef\" [ngIfElse]=\"headerTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(headerTemplate)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #headerTpl>\r\n <ng-template [ngIf]=\"$any(headerTemplate)?.[col.field] | isTemplateRef\"\r\n [ngIfElse]=\"defaultHeaderTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(headerTemplate)[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultHeaderTpl>\r\n <div [mat-sort-header]=\"col.sortProp?.id || col.field\"\r\n [disabled]=\"!col.sortable\"\r\n [disableClear]=\"col.sortProp?.disableClear ?? sortDisableClear\"\r\n [arrowPosition]=\"col.sortProp?.arrowPosition!\"\r\n [start]=\"col.sortProp?.start!\">\r\n <span class=\"mtx-grid-expansion-placeholder\" *ngIf=\"col.showExpand\"></span>\r\n <span>{{col.header | toObservable | async}}</span>\r\n <svg class=\"mtx-grid-icon mat-sort-header-icon\" *ngIf=\"col.sortable\"\r\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\"\r\n focusable=\"false\">\r\n <path d=\"M3,13H15V11H3M3,6V8H21V6M3,18H9V16H3V18Z\"></path>\r\n </svg>\r\n </div>\r\n <ng-template [ngTemplateOutlet]=\"headerExtraTplBase\"\r\n [ngTemplateOutletContext]=\"{ $implicit: headerExtraTemplate, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </div>\r\n </th>\r\n\r\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\"\r\n [class]=\"col | colClass: row: rowChangeRecord :rowChangeRecord?.currentValue\"\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'left': col.left, 'right': col.right}\"\r\n mtx-grid-selectable-cell (cellSelectedChange)=\"_selectCell($event, row, col)\">\r\n <ng-template [ngIf]=\"cellTemplate | isTemplateRef\" [ngIfElse]=\"cellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(cellTemplate)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #cellTpl>\r\n <ng-template [ngIf]=\"$any(cellTemplate)?.[col.field] | isTemplateRef\"\r\n [ngIfElse]=\"colDefCellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(cellTemplate)[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #colDefCellTpl>\r\n <ng-template [ngIf]=\"col.cellTemplate\" [ngIfElse]=\"defaultCellTpl\"\r\n [ngTemplateOutlet]=\"col.cellTemplate!\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultCellTpl>\r\n <button class=\"mtx-grid-row-expand-button\" *ngIf=\"col.showExpand\"\r\n mat-icon-button mtx-grid-expansion-toggle type=\"button\"\r\n [(opened)]=\"expansionRowStates[dataIndex].expanded\"\r\n (toggleChange)=\"_onExpansionChange($event, row, col, dataIndex);\">\r\n <svg class=\"mtx-grid-icon mtx-grid-row-expand-icon\" viewBox=\"0 0 24 24\"\r\n width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"></path>\r\n </svg>\r\n </button>\r\n\r\n <mtx-grid-cell [rowData]=\"row\" [colDef]=\"col\" [placeholder]=\"emptyValuePlaceholder\"\r\n (rowDataChange)=\"_onRowDataChange($event)\">\r\n </mtx-grid-cell>\r\n </ng-template>\r\n </td>\r\n\r\n <td mat-footer-cell *matFooterCellDef\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'left': col.left, 'right': col.right}\">\r\n <span class=\"mtx-grid-expansion-placeholder\" *ngIf=\"col.showExpand\"></span>\r\n\r\n <ng-template [ngIf]=\"summaryTemplate | isTemplateRef\" [ngIfElse]=\"summaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(summaryTemplate)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col, data: data }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #summaryTpl>\r\n <ng-template [ngIf]=\"$any(summaryTemplate)?.[col.field] | isTemplateRef\"\r\n [ngIfElse]=\"defaultSummaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"$any(summaryTemplate)[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: _getColData(data, col), colData: _getColData(data, col), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultSummaryTpl>\r\n <mtx-grid-cell [summary]=\"true\" [data]=\"data\" [colDef]=\"col\"\r\n [placeholder]=\"emptyValuePlaceholder\">\r\n </mtx-grid-cell>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-template [ngIf]=\"useContentHeaderRowTemplate\" [ngIfElse]=\"defaultHeaderRowTpl\">\r\n </ng-template>\r\n <ng-template #defaultHeaderRowTpl>\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"useContentRowTemplate\" [ngIfElse]=\"defaultRowTpl\"></ng-template>\r\n <ng-template #defaultRowTpl>\r\n <tr mat-row\r\n *matRowDef=\"let row; let index = index; let dataIndex = dataIndex; columns: displayedColumns;\"\r\n [class]=\"row | rowClass: index: dataIndex: rowClassFormatter\"\r\n [ngClass]=\"{'selected': rowSelection.isSelected(row)}\"\r\n (click)=\"_selectRow($event, row, _getIndex(index, dataIndex))\"\r\n (contextmenu)=\"_contextmenu($event, row, _getIndex(index, dataIndex))\">\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"_whetherShowSummary\">\r\n <tr mat-footer-row *matFooterRowDef=\"displayedColumns; sticky: true\"></tr>\r\n </ng-template>\r\n <ng-template [ngIf]=\"useContentFooterRowTemplate\"></ng-template>\r\n\r\n <ng-container *ngIf=\"expandable\">\r\n <!-- Expanded Content Column - The expandable row is made up of this one column that spans across all columns -->\r\n <ng-container matColumnDef=\"MtxGridExpansionColumnDef\">\r\n <td mat-cell *matCellDef=\"let row; let dataIndex = dataIndex\"\r\n [attr.colspan]=\"displayedColumns.length\">\r\n <div class=\"mtx-grid-expansion-detail\"\r\n [@expansion]=\"expansionRowStates[dataIndex].expanded ? 'expanded' : 'collapsed'\">\r\n <ng-template [ngTemplateOutlet]=\"expansionTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: dataIndex, expanded: expansionRowStates[dataIndex].expanded }\">\r\n </ng-template>\r\n </div>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-row\r\n *matRowDef=\"let row; columns: ['MtxGridExpansionColumnDef']; let dataIndex = dataIndex\"\r\n [ngClass]=\"['mtx-grid-expansion', expansionRowStates[dataIndex].expanded ? 'expanded' : 'collapsed']\">\r\n </tr>\r\n </ng-container>\r\n </table>\r\n </div>\r\n\r\n <!-- No result -->\r\n <div class=\"mtx-grid-no-result\" *ngIf=\"_hasNoResult\">\r\n <ng-template [ngIf]=\"noResultTemplate\" [ngIfElse]=\"defaultNoResultTpl\">\r\n <ng-template [ngTemplateOutlet]=\"noResultTemplate\"></ng-template>\r\n </ng-template>\r\n <ng-template #defaultNoResultTpl>{{noResultText}}</ng-template>\r\n </div>\r\n </div>\r\n\r\n <!-- Tool sidebar -->\r\n <div class=\"mtx-grid-sidebar\" *ngIf=\"showSidebar\">\r\n <ng-template [ngIf]=\"sidebarTemplate\">\r\n <ng-template [ngTemplateOutlet]=\"sidebarTemplate\"></ng-template>\r\n </ng-template>\r\n </div>\r\n</div>\r\n\r\n<div class=\"mtx-grid-footer\">\r\n <!-- Status Bar -->\r\n <div class=\"mtx-grid-statusbar\" *ngIf=\"showStatusbar\">\r\n <ng-template [ngIf]=\"statusbarTemplate\">\r\n <ng-template [ngTemplateOutlet]=\"statusbarTemplate\"></ng-template>\r\n </ng-template>\r\n </div>\r\n\r\n <!-- Pagination -->\r\n <div class=\"mtx-grid-pagination\">\r\n <ng-template [ngIf]=\"paginationTemplate\" [ngIfElse]=\"defaultPaginationTemplate\">\r\n <ng-template [ngTemplateOutlet]=\"paginationTemplate\"></ng-template>\r\n </ng-template>\r\n <ng-template #defaultPaginationTemplate>\r\n <mat-paginator [class.mat-paginator-hidden]=\"!showPaginator\"\r\n [showFirstLastButtons]=\"showFirstLastButtons\"\r\n [length]=\"length\"\r\n [pageIndex]=\"pageIndex\"\r\n [pageSize]=\"pageSize\"\r\n [pageSizeOptions]=\"pageSizeOptions\"\r\n [hidePageSize]=\"hidePageSize\"\r\n (page)=\"_onPage($event)\"\r\n [disabled]=\"pageDisabled\">\r\n </mat-paginator>\r\n </ng-template>\r\n </div>\r\n</div>\r\n\r\n<!-- Header template for extra content -->\r\n<ng-template #headerExtraTplBase let-headerExtraTemplate let-col=\"colDef\">\r\n <ng-template [ngIf]=\"headerExtraTemplate | isTemplateRef\" [ngIfElse]=\"headerExtraTpl\">\r\n <ng-template [ngTemplateOutlet]=\"headerExtraTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #headerExtraTpl>\r\n <ng-template [ngIf]=\"$any(headerExtraTemplate)?.[col.field] | isTemplateRef\">\r\n <ng-template [ngTemplateOutlet]=\"headerExtraTemplate[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n</ng-template>\r\n", styles: [".mtx-grid{position:relative;display:flex;flex-direction:column;width:100%;border:1px solid var(--mtx-grid-outline-color)}.mtx-grid .mat-mdc-table.mat-table-striped .mat-row-odd{background-color:var(--mtx-grid-table-row-striped-background-color)}.mtx-grid .mat-mdc-table.mat-table-hover .mat-mdc-row:hover{background-color:var(--mtx-grid-table-row-hover-background-color)}.mtx-grid .mat-mdc-table .mat-mdc-row.selected,.mtx-grid .mat-mdc-table .mat-mdc-row.mat-row-odd.selected{background-color:var(--mtx-grid-table-row-selected-background-color)}.mtx-grid .mat-mdc-table .mat-mdc-cell.selected{box-shadow:inset 0 0 0 1px var(--mtx-grid-table-cell-selected-outline-color)}.mtx-grid .mat-table-container{overflow:auto}.mtx-grid .mat-table-container.mat-table-with-data{flex:1}.mtx-grid .mat-mdc-table:not(.mat-column-resize-table){min-width:100%;border-collapse:separate}.mtx-grid .mat-mdc-table:not(.mat-column-resize-table) .mat-mdc-header-cell:not(.mtx-grid-checkbox-cell),.mtx-grid .mat-mdc-table:not(.mat-column-resize-table) .mat-mdc-footer-cell:not(.mtx-grid-checkbox-cell),.mtx-grid .mat-mdc-table:not(.mat-column-resize-table) .mat-mdc-cell:not(.mtx-grid-checkbox-cell){min-width:80px}.mtx-grid .mat-table-sticky-left{border-right:1px solid var(--mat-table-row-item-outline-color)}[dir=rtl] .mtx-grid .mat-table-sticky-left{border-right-width:0;border-left:1px solid var(--mat-table-row-item-outline-color)}.mtx-grid .mat-table-sticky-right{border-left:1px solid var(--mat-table-row-item-outline-color)}[dir=rtl] .mtx-grid .mat-table-sticky-right{border-left-width:0;border-right:1px solid var(--mat-table-row-item-outline-color)}.mtx-grid .mat-mdc-header-cell,.mtx-grid .mat-mdc-footer-cell,.mtx-grid .mat-mdc-cell{padding:4px 10px;box-sizing:border-box}.mtx-grid .mat-mdc-header-cell:first-of-type:not(:only-of-type),.mtx-grid .mat-mdc-footer-cell:first-of-type:not(:only-of-type),.mtx-grid .mat-mdc-cell:first-of-type:not(:only-of-type){padding-left:24px}.mtx-grid .mat-mdc-header-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,.mtx-grid .mat-mdc-footer-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,.mtx-grid .mat-mdc-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell{padding-left:10px;padding-right:10px}[dir=rtl] .mtx-grid .mat-mdc-header-cell:first-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-mdc-footer-cell:first-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-mdc-cell:first-of-type:not(:only-of-type){padding-left:10px;padding-right:24px}[dir=rtl] .mtx-grid .mat-mdc-header-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,[dir=rtl] .mtx-grid .mat-mdc-footer-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,[dir=rtl] .mtx-grid .mat-mdc-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell{padding-left:10px;padding-right:10px}.mtx-grid .mat-mdc-header-cell:last-of-type:not(:only-of-type),.mtx-grid .mat-mdc-footer-cell:last-of-type:not(:only-of-type),.mtx-grid .mat-mdc-cell:last-of-type:not(:only-of-type){padding-right:24px}[dir=rtl] .mtx-grid .mat-mdc-header-cell:last-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-mdc-footer-cell:last-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-mdc-cell:last-of-type:not(:only-of-type){padding-left:24px;padding-right:10px}.mtx-grid .mat-mdc-footer-cell{border-top:1px solid var(--mat-table-row-item-outline-color);background-color:var(--mtx-grid-table-footer-background-color)}.mtx-grid .mat-mdc-row.mtx-grid-expansion{height:0;overflow:hidden}.mtx-grid .mat-mdc-row.mtx-grid-expansion .mat-mdc-cell{padding-top:0;padding-bottom:0}.mtx-grid .mat-mdc-row.mtx-grid-expansion.collapsed .mat-mdc-cell{border-bottom-width:0}.mtx-grid .mat-mdc-row:last-of-type .mat-cell{border-bottom-width:0}.mtx-grid .mat-sort-header-icon{margin:0 4px}.mtx-grid .mat-header-cell-inner{display:inline-flex;align-items:center}.mtx-grid .mat-mdc-paginator{border-top:1px solid var(--mtx-grid-outline-color)}.mtx-grid .mat-paginator-hidden{display:none}.mtx-grid-progress{position:absolute;top:0;z-index:120;width:100%}.mtx-grid-toolbar{display:flex;justify-content:space-between;align-items:center;min-height:48px;padding:8px;box-sizing:border-box;border-bottom:1px solid var(--mtx-grid-outline-color)}.mtx-grid-layout{display:flex;flex:1 1 auto;overflow:auto}.mtx-grid-content{flex-direction:column;width:0}.mtx-grid-sidebar{max-width:50%;border-left:1px solid var(--mtx-grid-outline-color)}[dir=rtl] .mtx-grid-sidebar{border-left-width:0;border-right:1px solid var(--mtx-grid-outline-color)}.mtx-grid-footer{position:relative;z-index:1}.mtx-grid-statusbar{display:flex;align-items:center;min-height:56px;padding:8px;border-top:1px solid var(--mtx-grid-outline-color)}.mtx-grid-no-result{display:flex;justify-content:center;align-items:center;flex:1;min-height:150px}.mtx-grid-expansion-placeholder{display:inline-block;width:40px;height:40px;vertical-align:middle}.mtx-grid-expansion-detail{display:flex;align-items:center;min-height:48px;overflow:hidden}.mtx-grid-checkbox-cell{flex:none;justify-content:center;width:60px;min-width:60px}.mtx-grid-checkbox-cell .mat-checkbox{display:flex;margin:0 10px}.mtx-grid-checkbox-cell .mat-checkbox-inner-container{margin-left:0}.mtx-grid-row-expand-button.mat-mdc-icon-button{width:40px;height:40px;padding:8px;vertical-align:middle}.mtx-grid-row-expand-button.mat-mdc-icon-button.expanded .mtx-grid-row-expand-icon{transform:rotate(90deg)}.mtx-grid-row-expand-button.mat-mdc-icon-button+mtx-grid-cell{vertical-align:middle}.mtx-grid-row-expand-button.mat-mdc-icon-button .mat-mdc-button-touch-target{width:100%;height:100%}.mtx-grid-icon{width:20px;height:20px;font-size:20px}.mtx-grid-column-menu-item,.mtx-grid-column-menu-header,.mtx-grid-column-menu-footer{color:var(--mtx-grid-column-menu-text-color)}.mtx-grid-column-menu-header{border-bottom:1px solid var(--mtx-grid-column-menu-divider-color)}.mtx-grid-column-menu-footer{border-top:1px solid var(--mtx-grid-column-menu-divider-color)}\n"] }]
|
|
1107
1159
|
}], ctorParameters: function () { return [{ type: MtxGridUtils }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
|
1108
1160
|
type: Optional
|
|
1109
1161
|
}, {
|
|
@@ -1189,6 +1241,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImpor
|
|
|
1189
1241
|
type: Input
|
|
1190
1242
|
}], rowClick: [{
|
|
1191
1243
|
type: Output
|
|
1244
|
+
}], rowContextMenu: [{
|
|
1245
|
+
type: Output
|
|
1192
1246
|
}], expandable: [{
|
|
1193
1247
|
type: Input
|
|
1194
1248
|
}], expansionTemplate: [{
|
|
@@ -1199,8 +1253,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImpor
|
|
|
1199
1253
|
type: Input
|
|
1200
1254
|
}], multiSelectionWithClick: [{
|
|
1201
1255
|
type: Input
|
|
1202
|
-
}], rowSelected: [{
|
|
1203
|
-
type: Input
|
|
1204
1256
|
}], rowSelectable: [{
|
|
1205
1257
|
type: Input
|
|
1206
1258
|
}], hideRowSelectionCheckbox: [{
|
|
@@ -1211,11 +1263,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImpor
|
|
|
1211
1263
|
type: Input
|
|
1212
1264
|
}], rowClassFormatter: [{
|
|
1213
1265
|
type: Input
|
|
1214
|
-
}],
|
|
1266
|
+
}], rowSelected: [{
|
|
1267
|
+
type: Input
|
|
1268
|
+
}], rowSelectedChange: [{
|
|
1215
1269
|
type: Output
|
|
1216
1270
|
}], cellSelectable: [{
|
|
1217
1271
|
type: Input
|
|
1218
|
-
}],
|
|
1272
|
+
}], cellSelectedChange: [{
|
|
1219
1273
|
type: Output
|
|
1220
1274
|
}], showToolbar: [{
|
|
1221
1275
|
type: Input
|
|
@@ -1302,7 +1356,7 @@ class MtxGridSelectableCell {
|
|
|
1302
1356
|
this._selected = false;
|
|
1303
1357
|
this.ctrlKeyPressed = false;
|
|
1304
1358
|
this.shiftKeyPressed = false;
|
|
1305
|
-
this.
|
|
1359
|
+
this.cellSelectedChange = new EventEmitter();
|
|
1306
1360
|
}
|
|
1307
1361
|
onClick(event) {
|
|
1308
1362
|
this.ctrlKeyPressed = event.ctrlKey;
|
|
@@ -1313,18 +1367,18 @@ class MtxGridSelectableCell {
|
|
|
1313
1367
|
}
|
|
1314
1368
|
select() {
|
|
1315
1369
|
this._selected = true;
|
|
1316
|
-
this.
|
|
1370
|
+
this.cellSelectedChange.emit(this);
|
|
1317
1371
|
}
|
|
1318
1372
|
deselect() {
|
|
1319
1373
|
this._selected = false;
|
|
1320
|
-
this.
|
|
1374
|
+
this.cellSelectedChange.emit(this);
|
|
1321
1375
|
}
|
|
1322
1376
|
toggle() {
|
|
1323
1377
|
this._selected = !this._selected;
|
|
1324
|
-
this.
|
|
1378
|
+
this.cellSelectedChange.emit(this);
|
|
1325
1379
|
}
|
|
1326
1380
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MtxGridSelectableCell, deps: [{ token: MtxGrid }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1327
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.7", type: MtxGridSelectableCell, selector: "[mtx-grid-selectable-cell]", inputs: { mtxSelectableRowData: "mtxSelectableRowData" }, outputs: {
|
|
1381
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.7", type: MtxGridSelectableCell, selector: "[mtx-grid-selectable-cell]", inputs: { mtxSelectableRowData: "mtxSelectableRowData" }, outputs: { cellSelectedChange: "cellSelectedChange" }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.selected": "this.selected" } }, ngImport: i0 }); }
|
|
1328
1382
|
}
|
|
1329
1383
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MtxGridSelectableCell, decorators: [{
|
|
1330
1384
|
type: Directive,
|
|
@@ -1336,80 +1390,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImpor
|
|
|
1336
1390
|
args: ['class.selected']
|
|
1337
1391
|
}], mtxSelectableRowData: [{
|
|
1338
1392
|
type: Input
|
|
1339
|
-
}],
|
|
1393
|
+
}], cellSelectedChange: [{
|
|
1340
1394
|
type: Output
|
|
1341
1395
|
}], onClick: [{
|
|
1342
1396
|
type: HostListener,
|
|
1343
1397
|
args: ['click', ['$event']]
|
|
1344
1398
|
}] } });
|
|
1345
1399
|
|
|
1346
|
-
/**
|
|
1347
|
-
* @license
|
|
1348
|
-
* Copyright Google LLC All Rights Reserved.
|
|
1349
|
-
*
|
|
1350
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
1351
|
-
* found in the LICENSE file at https://angular.io/license
|
|
1352
|
-
*/
|
|
1353
|
-
/**
|
|
1354
|
-
* Explicitly enables column resizing for a flexbox-based mat-table.
|
|
1355
|
-
* Individual columns must be annotated specifically.
|
|
1356
|
-
*/
|
|
1357
|
-
class MatColumnResizeFlex extends AbstractMatColumnResize {
|
|
1358
|
-
constructor(columnResizeNotifier, elementRef, eventDispatcher, ngZone, notifier) {
|
|
1359
|
-
super();
|
|
1360
|
-
this.columnResizeNotifier = columnResizeNotifier;
|
|
1361
|
-
this.elementRef = elementRef;
|
|
1362
|
-
this.eventDispatcher = eventDispatcher;
|
|
1363
|
-
this.ngZone = ngZone;
|
|
1364
|
-
this.notifier = notifier;
|
|
1365
|
-
}
|
|
1366
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MatColumnResizeFlex, deps: [{ token: i2.ColumnResizeNotifier }, { token: i0.ElementRef }, { token: i2.HeaderRowEventDispatcher }, { token: i0.NgZone }, { token: i2.ColumnResizeNotifierSource }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1367
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.7", type: MatColumnResizeFlex, selector: "mat-table[columnResize]", host: { classAttribute: "mat-column-resize-flex" }, providers: [...FLEX_PROVIDERS, { provide: ColumnResize, useExisting: MatColumnResizeFlex }], usesInheritance: true, ngImport: i0 }); }
|
|
1368
|
-
}
|
|
1369
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MatColumnResizeFlex, decorators: [{
|
|
1370
|
-
type: Directive,
|
|
1371
|
-
args: [{
|
|
1372
|
-
selector: 'mat-table[columnResize]',
|
|
1373
|
-
host: FLEX_HOST_BINDINGS,
|
|
1374
|
-
providers: [...FLEX_PROVIDERS, { provide: ColumnResize, useExisting: MatColumnResizeFlex }],
|
|
1375
|
-
}]
|
|
1376
|
-
}], ctorParameters: function () { return [{ type: i2.ColumnResizeNotifier }, { type: i0.ElementRef }, { type: i2.HeaderRowEventDispatcher }, { type: i0.NgZone }, { type: i2.ColumnResizeNotifierSource }]; } });
|
|
1377
|
-
|
|
1378
|
-
/**
|
|
1379
|
-
* @license
|
|
1380
|
-
* Copyright Google LLC All Rights Reserved.
|
|
1381
|
-
*
|
|
1382
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
1383
|
-
* found in the LICENSE file at https://angular.io/license
|
|
1384
|
-
*/
|
|
1385
|
-
const ENTRY_COMMON_COMPONENTS = [MatColumnResizeOverlayHandle];
|
|
1386
|
-
class MatColumnResizeCommonModule {
|
|
1387
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MatColumnResizeCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1388
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.7", ngImport: i0, type: MatColumnResizeCommonModule, declarations: [MatColumnResizeOverlayHandle], exports: [MatColumnResizeOverlayHandle] }); }
|
|
1389
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MatColumnResizeCommonModule }); }
|
|
1390
|
-
}
|
|
1391
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MatColumnResizeCommonModule, decorators: [{
|
|
1392
|
-
type: NgModule,
|
|
1393
|
-
args: [{
|
|
1394
|
-
declarations: ENTRY_COMMON_COMPONENTS,
|
|
1395
|
-
exports: ENTRY_COMMON_COMPONENTS,
|
|
1396
|
-
}]
|
|
1397
|
-
}] });
|
|
1398
|
-
const IMPORTS = [OverlayModule, MatColumnResizeCommonModule];
|
|
1399
|
-
class MatColumnResizeModule {
|
|
1400
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MatColumnResizeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1401
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.7", ngImport: i0, type: MatColumnResizeModule, declarations: [MatColumnResize, MatColumnResizeFlex, MatResizable], imports: [OverlayModule, MatColumnResizeCommonModule], exports: [MatColumnResize, MatColumnResizeFlex, MatResizable] }); }
|
|
1402
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MatColumnResizeModule, imports: [IMPORTS] }); }
|
|
1403
|
-
}
|
|
1404
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MatColumnResizeModule, decorators: [{
|
|
1405
|
-
type: NgModule,
|
|
1406
|
-
args: [{
|
|
1407
|
-
imports: IMPORTS,
|
|
1408
|
-
declarations: [MatColumnResize, MatColumnResizeFlex, MatResizable],
|
|
1409
|
-
exports: [MatColumnResize, MatColumnResizeFlex, MatResizable],
|
|
1410
|
-
}]
|
|
1411
|
-
}] });
|
|
1412
|
-
|
|
1413
1400
|
class MtxGridModule {
|
|
1414
1401
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MtxGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1415
1402
|
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.7", ngImport: i0, type: MtxGridModule, declarations: [MtxGrid,
|
|
@@ -1439,17 +1426,19 @@ class MtxGridModule {
|
|
|
1439
1426
|
MatFormFieldModule,
|
|
1440
1427
|
MatMenuModule,
|
|
1441
1428
|
DragDropModule,
|
|
1429
|
+
MatColumnResizeModule,
|
|
1442
1430
|
MtxDialogModule,
|
|
1443
|
-
MtxPipesModule,
|
|
1444
|
-
|
|
1431
|
+
MtxPipesModule], exports: [MatColumnResizeModule,
|
|
1432
|
+
MtxGrid,
|
|
1445
1433
|
MtxGridCell,
|
|
1446
1434
|
MtxGridColumnMenu,
|
|
1447
1435
|
MtxGridExpansionToggle,
|
|
1448
1436
|
MtxGridSelectableCell,
|
|
1449
|
-
MatColumnResizeModule,
|
|
1450
1437
|
MtxGridRowClassPipe,
|
|
1451
1438
|
MtxGridColClassPipe,
|
|
1439
|
+
MtxGridCellActionsPipe,
|
|
1452
1440
|
MtxGridCellActionTooltipPipe,
|
|
1441
|
+
MtxGridCellActionBadgePipe,
|
|
1453
1442
|
MtxGridCellActionDisablePipe,
|
|
1454
1443
|
MtxGridCellSummaryPipe] }); }
|
|
1455
1444
|
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MtxGridModule, providers: [MtxGridUtils], imports: [CommonModule,
|
|
@@ -1468,9 +1457,9 @@ class MtxGridModule {
|
|
|
1468
1457
|
MatFormFieldModule,
|
|
1469
1458
|
MatMenuModule,
|
|
1470
1459
|
DragDropModule,
|
|
1460
|
+
MatColumnResizeModule,
|
|
1471
1461
|
MtxDialogModule,
|
|
1472
|
-
MtxPipesModule,
|
|
1473
|
-
MatColumnResizeModule, MatColumnResizeModule] }); }
|
|
1462
|
+
MtxPipesModule, MatColumnResizeModule] }); }
|
|
1474
1463
|
}
|
|
1475
1464
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MtxGridModule, decorators: [{
|
|
1476
1465
|
type: NgModule,
|
|
@@ -1492,20 +1481,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImpor
|
|
|
1492
1481
|
MatFormFieldModule,
|
|
1493
1482
|
MatMenuModule,
|
|
1494
1483
|
DragDropModule,
|
|
1484
|
+
MatColumnResizeModule,
|
|
1495
1485
|
MtxDialogModule,
|
|
1496
1486
|
MtxPipesModule,
|
|
1497
|
-
MatColumnResizeModule,
|
|
1498
1487
|
],
|
|
1499
1488
|
exports: [
|
|
1489
|
+
MatColumnResizeModule,
|
|
1500
1490
|
MtxGrid,
|
|
1501
1491
|
MtxGridCell,
|
|
1502
1492
|
MtxGridColumnMenu,
|
|
1503
1493
|
MtxGridExpansionToggle,
|
|
1504
1494
|
MtxGridSelectableCell,
|
|
1505
|
-
MatColumnResizeModule,
|
|
1506
1495
|
MtxGridRowClassPipe,
|
|
1507
1496
|
MtxGridColClassPipe,
|
|
1497
|
+
MtxGridCellActionsPipe,
|
|
1508
1498
|
MtxGridCellActionTooltipPipe,
|
|
1499
|
+
MtxGridCellActionBadgePipe,
|
|
1509
1500
|
MtxGridCellActionDisablePipe,
|
|
1510
1501
|
MtxGridCellSummaryPipe,
|
|
1511
1502
|
],
|