@ng-matero/extensions 13.2.1 → 14.2.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/README.md +1 -0
- package/alert/alert.component.d.ts +2 -2
- package/alert/{mtxAlert.d.ts → index.d.ts} +0 -0
- package/button/button-loading.directive.d.ts +1 -1
- package/button/{mtxButton.d.ts → index.d.ts} +0 -0
- package/checkbox-group/checkbox-group.component.d.ts +1 -1
- package/checkbox-group/{mtxCheckboxGroup.d.ts → index.d.ts} +0 -0
- package/colorpicker/colorpicker-input.d.ts +1 -1
- package/colorpicker/colorpicker-toggle.d.ts +2 -2
- package/colorpicker/colorpicker.d.ts +5 -3
- package/colorpicker/{mtxColorpicker.d.ts → index.d.ts} +0 -0
- package/column-resize/column-resize-directives/column-resize-flex.d.ts +1 -1
- package/column-resize/column-resize-directives/column-resize.d.ts +1 -1
- package/column-resize/column-resize.d.ts +1 -1
- package/column-resize/{mtxColumnResize.d.ts → index.d.ts} +0 -0
- package/column-resize/overlay-handle.d.ts +1 -1
- package/column-resize/resizable.d.ts +1 -1
- package/core/{mtxCore.d.ts → index.d.ts} +0 -0
- package/core/pipes/to-observable.pipe.d.ts +1 -1
- package/core/style/_vendor-prefixes.scss +1 -1
- package/datetimepicker/_datetimepicker-theme.scss +1 -1
- package/datetimepicker/calendar-body.d.ts +1 -1
- package/datetimepicker/calendar.d.ts +6 -2
- package/datetimepicker/clock.d.ts +4 -1
- package/datetimepicker/datetimepicker-input.d.ts +1 -1
- package/datetimepicker/datetimepicker-toggle.d.ts +2 -2
- package/datetimepicker/datetimepicker-types.d.ts +1 -0
- package/datetimepicker/datetimepicker.d.ts +10 -6
- package/datetimepicker/{mtxDatetimepicker.d.ts → index.d.ts} +0 -0
- package/datetimepicker/month-view.d.ts +1 -1
- package/datetimepicker/multi-year-view.d.ts +1 -1
- package/datetimepicker/year-view.d.ts +1 -1
- package/dialog/dialog.component.d.ts +1 -1
- package/dialog/{mtxDialog.d.ts → index.d.ts} +0 -0
- package/drawer/drawer-config.d.ts +12 -4
- package/drawer/drawer-container.d.ts +12 -4
- package/drawer/{mtxDrawer.d.ts → index.d.ts} +0 -0
- package/esm2020/alert/alert.component.mjs +6 -6
- package/esm2020/alert/alert.module.mjs +5 -5
- package/esm2020/button/button-loading.directive.mjs +4 -4
- package/esm2020/button/button.module.mjs +5 -5
- package/esm2020/checkbox-group/checkbox-group.component.mjs +7 -7
- package/esm2020/checkbox-group/checkbox-group.module.mjs +5 -5
- package/esm2020/colorpicker/colorpicker-input.mjs +3 -3
- package/esm2020/colorpicker/colorpicker-module.mjs +10 -12
- package/esm2020/colorpicker/colorpicker-toggle.mjs +8 -8
- package/esm2020/colorpicker/colorpicker.mjs +12 -10
- package/esm2020/column-resize/column-resize-directives/column-resize-flex.mjs +3 -3
- package/esm2020/column-resize/column-resize-directives/column-resize.mjs +3 -3
- package/esm2020/column-resize/column-resize-module.mjs +4 -4
- package/esm2020/column-resize/column-resize-notifier.mjs +6 -6
- package/esm2020/column-resize/column-resize.mjs +3 -3
- package/esm2020/column-resize/column-size-store.mjs +3 -3
- package/esm2020/column-resize/event-dispatcher.mjs +3 -3
- package/esm2020/column-resize/overlay-handle.mjs +3 -3
- package/esm2020/column-resize/resizable.mjs +3 -3
- package/esm2020/column-resize/resize-strategy.mjs +9 -9
- package/esm2020/core/datetime/datetime.module.mjs +10 -10
- package/esm2020/core/datetime/native-datetime-adapter.mjs +3 -3
- package/esm2020/core/pipes/pipes.module.mjs +5 -5
- package/esm2020/core/pipes/to-observable.pipe.mjs +3 -3
- package/esm2020/datetimepicker/calendar-body.mjs +3 -3
- package/esm2020/datetimepicker/calendar.mjs +14 -11
- package/esm2020/datetimepicker/clock.mjs +6 -4
- package/esm2020/datetimepicker/datetimepicker-input.mjs +3 -3
- package/esm2020/datetimepicker/datetimepicker-module.mjs +5 -5
- package/esm2020/datetimepicker/datetimepicker-toggle.mjs +8 -8
- package/esm2020/datetimepicker/datetimepicker-types.mjs +1 -1
- package/esm2020/datetimepicker/datetimepicker.mjs +14 -11
- package/esm2020/datetimepicker/month-view.mjs +6 -6
- package/esm2020/datetimepicker/multi-year-view.mjs +4 -4
- package/esm2020/datetimepicker/year-view.mjs +4 -4
- package/esm2020/dialog/dialog.component.mjs +6 -6
- package/esm2020/dialog/dialog.mjs +3 -3
- package/esm2020/dialog/dialog.module.mjs +5 -5
- package/esm2020/drawer/drawer-config.mjs +1 -5
- package/esm2020/drawer/drawer-container.mjs +22 -12
- package/esm2020/drawer/drawer-module.mjs +5 -5
- package/esm2020/drawer/drawer.mjs +3 -3
- package/esm2020/form-group/form-group.component.mjs +5 -5
- package/esm2020/form-group/form-group.module.mjs +5 -5
- package/esm2020/grid/cell.component.mjs +61 -39
- package/esm2020/grid/column-menu.component.mjs +10 -10
- package/esm2020/grid/column-resize/column-resize-directives/column-resize-flex.mjs +3 -3
- package/esm2020/grid/column-resize/column-resize-directives/column-resize.mjs +3 -3
- package/esm2020/grid/column-resize/column-resize-module.mjs +8 -8
- package/esm2020/grid/column-resize/overlay-handle.mjs +3 -3
- package/esm2020/grid/column-resize/resizable-directives/resizable.mjs +3 -3
- package/esm2020/grid/column-resize/resize-strategy.mjs +3 -3
- package/esm2020/grid/expansion-toggle.directive.mjs +3 -3
- package/esm2020/grid/grid.component.mjs +28 -23
- package/esm2020/grid/grid.interface.mjs +1 -1
- package/esm2020/grid/grid.module.mjs +22 -24
- package/esm2020/grid/grid.service.mjs +3 -3
- package/esm2020/loader/loader.component.mjs +6 -6
- package/esm2020/loader/loader.module.mjs +5 -5
- package/esm2020/popover/popover-module.mjs +5 -5
- package/esm2020/popover/popover-target.mjs +3 -3
- package/esm2020/popover/popover-trigger.mjs +3 -3
- package/esm2020/popover/popover.mjs +4 -4
- package/esm2020/progress/progress.component.mjs +3 -3
- package/esm2020/progress/progress.module.mjs +5 -5
- package/esm2020/select/option.component.mjs +3 -3
- package/esm2020/select/select.component.mjs +5 -5
- package/esm2020/select/select.module.mjs +5 -5
- package/esm2020/select/templates.directive.mjs +33 -33
- package/esm2020/slider/slider-module.mjs +5 -5
- package/esm2020/slider/slider.mjs +4 -4
- package/esm2020/split/split-pane.directive.mjs +3 -3
- package/esm2020/split/split.component.mjs +3 -3
- package/esm2020/split/split.module.mjs +5 -5
- package/esm2020/text3d/text3d.component.mjs +3 -3
- package/esm2020/text3d/text3d.module.mjs +5 -5
- package/esm2020/tooltip/tooltip-module.mjs +5 -5
- package/esm2020/tooltip/tooltip.mjs +7 -7
- package/fesm2015/mtxAlert.mjs +9 -9
- package/fesm2015/mtxAlert.mjs.map +1 -1
- package/fesm2015/mtxButton.mjs +7 -7
- package/fesm2015/mtxButton.mjs.map +1 -1
- package/fesm2015/mtxCheckboxGroup.mjs +11 -11
- package/fesm2015/mtxCheckboxGroup.mjs.map +1 -1
- package/fesm2015/mtxColorpicker.mjs +30 -30
- package/fesm2015/mtxColorpicker.mjs.map +1 -1
- package/fesm2015/mtxColumnResize.mjs +40 -40
- package/fesm2015/mtxColumnResize.mjs.map +1 -1
- package/fesm2015/mtxCore.mjs +19 -19
- package/fesm2015/mtxCore.mjs.map +1 -1
- package/fesm2015/mtxDatetimepicker.mjs +405 -397
- package/fesm2015/mtxDatetimepicker.mjs.map +1 -1
- package/fesm2015/mtxDialog.mjs +13 -13
- package/fesm2015/mtxDialog.mjs.map +1 -1
- package/fesm2015/mtxDrawer.mjs +28 -22
- package/fesm2015/mtxDrawer.mjs.map +1 -1
- package/fesm2015/mtxFormGroup.mjs +8 -8
- package/fesm2015/mtxFormGroup.mjs.map +1 -1
- package/fesm2015/mtxGrid.mjs +377 -351
- package/fesm2015/mtxGrid.mjs.map +1 -1
- package/fesm2015/mtxLoader.mjs +10 -10
- package/fesm2015/mtxLoader.mjs.map +1 -1
- package/fesm2015/mtxPopover.mjs +13 -13
- package/fesm2015/mtxPopover.mjs.map +1 -1
- package/fesm2015/mtxProgress.mjs +7 -7
- package/fesm2015/mtxProgress.mjs.map +1 -1
- package/fesm2015/mtxSelect.mjs +45 -45
- package/fesm2015/mtxSelect.mjs.map +1 -1
- package/fesm2015/mtxSlider.mjs +8 -8
- package/fesm2015/mtxSlider.mjs.map +1 -1
- package/fesm2015/mtxSplit.mjs +10 -10
- package/fesm2015/mtxSplit.mjs.map +1 -1
- package/fesm2015/mtxText3d.mjs +7 -7
- package/fesm2015/mtxText3d.mjs.map +1 -1
- package/fesm2015/mtxTooltip.mjs +10 -10
- package/fesm2015/mtxTooltip.mjs.map +1 -1
- package/fesm2015/ng-matero-extensions.mjs.map +1 -1
- package/fesm2020/mtxAlert.mjs +9 -9
- package/fesm2020/mtxAlert.mjs.map +1 -1
- package/fesm2020/mtxButton.mjs +7 -7
- package/fesm2020/mtxButton.mjs.map +1 -1
- package/fesm2020/mtxCheckboxGroup.mjs +11 -11
- package/fesm2020/mtxCheckboxGroup.mjs.map +1 -1
- package/fesm2020/mtxColorpicker.mjs +30 -30
- package/fesm2020/mtxColorpicker.mjs.map +1 -1
- package/fesm2020/mtxColumnResize.mjs +40 -40
- package/fesm2020/mtxColumnResize.mjs.map +1 -1
- package/fesm2020/mtxCore.mjs +19 -19
- package/fesm2020/mtxCore.mjs.map +1 -1
- package/fesm2020/mtxDatetimepicker.mjs +414 -406
- package/fesm2020/mtxDatetimepicker.mjs.map +1 -1
- package/fesm2020/mtxDialog.mjs +13 -13
- package/fesm2020/mtxDialog.mjs.map +1 -1
- package/fesm2020/mtxDrawer.mjs +28 -22
- package/fesm2020/mtxDrawer.mjs.map +1 -1
- package/fesm2020/mtxFormGroup.mjs +8 -8
- package/fesm2020/mtxFormGroup.mjs.map +1 -1
- package/fesm2020/mtxGrid.mjs +376 -351
- package/fesm2020/mtxGrid.mjs.map +1 -1
- package/fesm2020/mtxLoader.mjs +10 -10
- package/fesm2020/mtxLoader.mjs.map +1 -1
- package/fesm2020/mtxPopover.mjs +13 -13
- package/fesm2020/mtxPopover.mjs.map +1 -1
- package/fesm2020/mtxProgress.mjs +7 -7
- package/fesm2020/mtxProgress.mjs.map +1 -1
- package/fesm2020/mtxSelect.mjs +45 -45
- package/fesm2020/mtxSelect.mjs.map +1 -1
- package/fesm2020/mtxSlider.mjs +8 -8
- package/fesm2020/mtxSlider.mjs.map +1 -1
- package/fesm2020/mtxSplit.mjs +10 -10
- package/fesm2020/mtxSplit.mjs.map +1 -1
- package/fesm2020/mtxText3d.mjs +7 -7
- package/fesm2020/mtxText3d.mjs.map +1 -1
- package/fesm2020/mtxTooltip.mjs +10 -10
- package/fesm2020/mtxTooltip.mjs.map +1 -1
- package/fesm2020/ng-matero-extensions.mjs.map +1 -1
- package/form-group/form-group.component.d.ts +1 -1
- package/form-group/{mtxFormGroup.d.ts → index.d.ts} +0 -0
- package/grid/cell.component.d.ts +10 -11
- package/grid/column-menu.component.d.ts +1 -1
- package/grid/column-resize/column-resize-directives/column-resize-flex.d.ts +1 -1
- package/grid/column-resize/column-resize-directives/column-resize.d.ts +1 -1
- package/grid/column-resize/overlay-handle.d.ts +1 -1
- package/grid/column-resize/resizable-directives/resizable.d.ts +1 -1
- package/grid/expansion-toggle.directive.d.ts +1 -1
- package/grid/grid.component.d.ts +8 -6
- package/grid/grid.interface.d.ts +24 -12
- package/grid/{mtxGrid.d.ts → index.d.ts} +0 -0
- package/{ng-matero-extensions.d.ts → index.d.ts} +0 -0
- package/loader/{mtxLoader.d.ts → index.d.ts} +0 -0
- package/loader/loader.component.d.ts +1 -1
- package/package.json +29 -29
- package/popover/{mtxPopover.d.ts → index.d.ts} +0 -0
- package/popover/popover-target.d.ts +1 -1
- package/popover/popover-trigger.d.ts +1 -1
- package/popover/popover.d.ts +1 -1
- package/progress/{mtxProgress.d.ts → index.d.ts} +0 -0
- package/progress/progress.component.d.ts +1 -1
- package/select/{mtxSelect.d.ts → index.d.ts} +0 -0
- package/select/option.component.d.ts +1 -1
- package/select/select.component.d.ts +1 -1
- package/select/templates.directive.d.ts +11 -11
- package/slider/_slider-theme.scss +1 -1
- package/slider/{mtxSlider.d.ts → index.d.ts} +0 -0
- package/slider/slider.d.ts +1 -1
- package/slider/slider.scss +1 -1
- package/split/{mtxSplit.d.ts → index.d.ts} +0 -0
- package/split/split-pane.directive.d.ts +1 -1
- package/split/split.component.d.ts +1 -1
- package/text3d/{mtxText3d.d.ts → index.d.ts} +0 -0
- package/text3d/text3d.component.d.ts +1 -1
- package/tooltip/{mtxTooltip.d.ts → index.d.ts} +0 -0
- package/tooltip/tooltip.d.ts +2 -2
- package/alert/package.json +0 -10
- package/button/package.json +0 -10
- package/checkbox-group/package.json +0 -10
- package/colorpicker/package.json +0 -10
- package/column-resize/package.json +0 -10
- package/core/package.json +0 -10
- package/datetimepicker/package.json +0 -10
- package/dialog/package.json +0 -10
- package/drawer/package.json +0 -10
- package/form-group/package.json +0 -10
- package/grid/package.json +0 -10
- package/loader/package.json +0 -10
- package/popover/package.json +0 -10
- package/progress/package.json +0 -10
- package/select/package.json +0 -10
- package/slider/package.json +0 -10
- package/split/package.json +0 -10
- package/text3d/package.json +0 -10
- package/tooltip/package.json +0 -10
package/fesm2015/mtxGrid.mjs
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable,
|
|
3
|
-
import * as
|
|
2
|
+
import { Injectable, Inject, Directive, Component, ChangeDetectionStrategy, ViewEncapsulation, HostBinding, Input, EventEmitter, ViewChild, Output, HostListener, TemplateRef, ContentChildren, NgModule } from '@angular/core';
|
|
3
|
+
import * as i3$1 from '@angular/common';
|
|
4
4
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
5
|
-
import * as
|
|
5
|
+
import * as i2$1 from '@angular/forms';
|
|
6
6
|
import { FormsModule } from '@angular/forms';
|
|
7
|
-
import * as
|
|
7
|
+
import * as i3$3 from '@angular/material/table';
|
|
8
8
|
import { MatTableDataSource, MatRowDef, MatHeaderRowDef, MatFooterRow, MatTable, MatTableModule } from '@angular/material/table';
|
|
9
|
-
import * as
|
|
9
|
+
import * as i4$2 from '@angular/material/sort';
|
|
10
10
|
import { MatSort, MatSortModule } from '@angular/material/sort';
|
|
11
|
-
import * as
|
|
11
|
+
import * as i5$1 from '@angular/material/paginator';
|
|
12
12
|
import { MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
|
|
13
|
-
import * as
|
|
13
|
+
import * as i3$2 from '@angular/material/checkbox';
|
|
14
14
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
15
|
-
import * as
|
|
15
|
+
import * as i4$1 from '@angular/material/button';
|
|
16
16
|
import { MatButtonModule } from '@angular/material/button';
|
|
17
|
-
import * as
|
|
17
|
+
import * as i8$1 from '@angular/material/progress-bar';
|
|
18
18
|
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
19
|
-
import * as
|
|
19
|
+
import * as i5 from '@angular/material/chips';
|
|
20
20
|
import { MatChipsModule } from '@angular/material/chips';
|
|
21
|
-
import * as
|
|
21
|
+
import * as i6 from '@angular/material/tooltip';
|
|
22
22
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
23
|
-
import * as
|
|
23
|
+
import * as i7 from '@angular/material/icon';
|
|
24
24
|
import { MatIconModule } from '@angular/material/icon';
|
|
25
25
|
import { MatSelectModule } from '@angular/material/select';
|
|
26
26
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
27
|
-
import * as
|
|
27
|
+
import * as i6$1 from '@angular/material/menu';
|
|
28
28
|
import { MatMenuTrigger, MatMenuModule } from '@angular/material/menu';
|
|
29
|
-
import * as
|
|
29
|
+
import * as i7$1 from '@angular/cdk/drag-drop';
|
|
30
30
|
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
31
31
|
import * as i8 from '@ng-matero/extensions/core';
|
|
32
32
|
import { MtxPipesModule } from '@ng-matero/extensions/core';
|
|
@@ -34,15 +34,16 @@ import * as i1$1 from '@ng-matero/extensions/dialog';
|
|
|
34
34
|
import { MtxDialogModule } from '@ng-matero/extensions/dialog';
|
|
35
35
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
36
36
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
37
|
-
import
|
|
38
|
-
import * as i2$1 from '@ng-matero/extensions/column-resize';
|
|
37
|
+
import * as i2 from '@ng-matero/extensions/column-resize';
|
|
39
38
|
import { CdkFlexTableResizeStrategy, ResizeStrategy, ColumnResizeNotifier, HeaderRowEventDispatcher, ColumnResizeNotifierSource, TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER, ColumnResize, ResizeOverlayHandle, Resizable } from '@ng-matero/extensions/column-resize';
|
|
40
39
|
export { TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER as MAT_TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER } from '@ng-matero/extensions/column-resize';
|
|
41
|
-
import * as i1
|
|
40
|
+
import * as i1 from '@angular/cdk/table';
|
|
42
41
|
import { _COALESCED_STYLE_SCHEDULER } from '@angular/cdk/table';
|
|
43
|
-
import * as i3
|
|
44
|
-
import * as i4
|
|
42
|
+
import * as i3 from '@angular/cdk/bidi';
|
|
43
|
+
import * as i4 from '@angular/cdk/overlay';
|
|
45
44
|
import { OverlayModule } from '@angular/cdk/overlay';
|
|
45
|
+
import { isObservable } from 'rxjs';
|
|
46
|
+
import PhotoViewer from 'photoviewer';
|
|
46
47
|
|
|
47
48
|
class MtxGridService {
|
|
48
49
|
constructor() { }
|
|
@@ -80,277 +81,12 @@ class MtxGridService {
|
|
|
80
81
|
return str.replace(/[\r\n\s]/g, '').split(',');
|
|
81
82
|
}
|
|
82
83
|
}
|
|
83
|
-
/** @nocollapse */ MtxGridService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
84
|
-
/** @nocollapse */ MtxGridService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
85
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
84
|
+
/** @nocollapse */ MtxGridService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MtxGridService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
85
|
+
/** @nocollapse */ MtxGridService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MtxGridService });
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MtxGridService, decorators: [{
|
|
86
87
|
type: Injectable
|
|
87
88
|
}], ctorParameters: function () { return []; } });
|
|
88
89
|
|
|
89
|
-
class MtxGridColumnMenuComponent {
|
|
90
|
-
constructor() {
|
|
91
|
-
this.columns = [];
|
|
92
|
-
this.selectable = true;
|
|
93
|
-
this.selectableChecked = 'show';
|
|
94
|
-
this.sortable = true;
|
|
95
|
-
this.pinnable = true;
|
|
96
|
-
this._buttonText = '';
|
|
97
|
-
this.buttonType = 'stroked';
|
|
98
|
-
this.buttonClass = '';
|
|
99
|
-
this.buttonIcon = '';
|
|
100
|
-
this.showHeader = false;
|
|
101
|
-
this.headerText = 'Columns Header';
|
|
102
|
-
this.showFooter = false;
|
|
103
|
-
this.footerText = 'Columns Footer';
|
|
104
|
-
this.selectionChange = new EventEmitter();
|
|
105
|
-
this.sortChange = new EventEmitter();
|
|
106
|
-
this.pinChange = new EventEmitter();
|
|
107
|
-
this._pinOptions = [
|
|
108
|
-
{ label: 'Pin Left', value: 'left' },
|
|
109
|
-
{ label: 'Pin Right', value: 'right' },
|
|
110
|
-
{ label: 'No Pin', value: null },
|
|
111
|
-
];
|
|
112
|
-
}
|
|
113
|
-
get buttonText() {
|
|
114
|
-
const defaultText = `Columns ${this.selectableChecked === 'show' ? 'Shown' : 'Hidden'}`;
|
|
115
|
-
return this._buttonText ? this._buttonText : defaultText;
|
|
116
|
-
}
|
|
117
|
-
set buttonText(value) {
|
|
118
|
-
this._buttonText = value;
|
|
119
|
-
}
|
|
120
|
-
get pinOptions() {
|
|
121
|
-
return this._pinOptions;
|
|
122
|
-
}
|
|
123
|
-
set pinOptions(value) {
|
|
124
|
-
if (value.length > 0) {
|
|
125
|
-
this._pinOptions = value;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
_handleDroped(event) {
|
|
129
|
-
moveItemInArray(this.columns, event.previousIndex, event.currentIndex);
|
|
130
|
-
this.sortChange.emit(this.columns);
|
|
131
|
-
}
|
|
132
|
-
_handleSelection(e) {
|
|
133
|
-
this.selectionChange.emit(this.columns);
|
|
134
|
-
}
|
|
135
|
-
_handlePinSelect(col, val) {
|
|
136
|
-
if (col.pinned != val) {
|
|
137
|
-
col.pinned = val;
|
|
138
|
-
this.pinChange.emit(this.columns);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
/** @nocollapse */ MtxGridColumnMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: MtxGridColumnMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
143
|
-
/** @nocollapse */ MtxGridColumnMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.6", type: MtxGridColumnMenuComponent, selector: "mtx-grid-column-menu", inputs: { columns: "columns", selectable: "selectable", selectableChecked: "selectableChecked", sortable: "sortable", pinnable: "pinnable", buttonText: "buttonText", buttonType: "buttonType", buttonColor: "buttonColor", buttonClass: "buttonClass", buttonIcon: "buttonIcon", showHeader: "showHeader", headerText: "headerText", headerTemplate: "headerTemplate", showFooter: "showFooter", footerText: "footerText", footerTemplate: "footerTemplate", pinOptions: "pinOptions" }, outputs: { selectionChange: "selectionChange", sortChange: "sortChange", pinChange: "pinChange" }, viewQueries: [{ propertyName: "menuPanel", first: true, predicate: ["menu"], descendants: true, static: true }, { propertyName: "menuTrigger", first: true, predicate: MatMenuTrigger, descendants: true }], exportAs: ["mtxGridColumnMenu"], ngImport: i0, template: "<ng-container [ngSwitch]=\"buttonType\">\r\n <ng-container *ngSwitchCase=\"'raised'\">\r\n <button [ngClass]=\"buttonClass\" mat-raised-button [color]=\"buttonColor\"\r\n [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'stroked'\">\r\n <button [ngClass]=\"buttonClass\" mat-stroked-button [color]=\"buttonColor\"\r\n [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'flat'\">\r\n <button [ngClass]=\"buttonClass\" mat-flat-button [color]=\"buttonColor\"\r\n [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'icon'\">\r\n <button [ngClass]=\"buttonClass\" mat-icon-button [color]=\"buttonColor\"\r\n [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'fab'\">\r\n <button [ngClass]=\"buttonClass\" mat-fab [color]=\"buttonColor\" [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'mini-fab'\">\r\n <button [ngClass]=\"buttonClass\" mat-mini-fab [color]=\"buttonColor\"\r\n [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <button [ngClass]=\"buttonClass\" mat-button [color]=\"buttonColor\" [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n</ng-container>\r\n\r\n<mat-menu #menu=\"matMenu\" class=\"mtx-grid-column-menu\">\r\n <div class=\"mtx-grid-column-menu-content\"\r\n (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\r\n <div class=\"mtx-grid-column-menu-header\" *ngIf=\"showHeader\">\r\n <ng-template [ngIf]=\"headerTemplate\" [ngIfElse]=\"defaultHeaderTpl\">\r\n <ng-template [ngTemplateOutlet]=\"headerTemplate\"></ng-template>\r\n </ng-template>\r\n <ng-template #defaultHeaderTpl>{{headerText}}</ng-template>\r\n </div>\r\n\r\n <div class=\"mtx-grid-column-menu-body\">\r\n <div class=\"mtx-grid-column-menu-list\" *ngIf=\"sortable\"\r\n cdkDropList (cdkDropListDropped)=\"_handleDroped($event)\">\r\n <div class=\"mtx-grid-column-menu-item\" *ngFor=\"let col of columns\"\r\n cdkDrag [cdkDragDisabled]=\"selectableChecked === 'show'? !col.show : col.hide\">\r\n <svg class=\"mtx-grid-icon mtx-grid-column-drag-handle-icon\" viewBox=\"0 0 24 24\"\r\n width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path\r\n d=\"M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z\">\r\n </path>\r\n </svg>\r\n <ng-template [ngTemplateOutlet]=\"checkboxList\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col }\">\r\n </ng-template>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mtx-grid-column-menu-list\" *ngIf=\"!sortable\">\r\n <div class=\"mtx-grid-column-menu-item\" *ngFor=\"let col of columns\">\r\n <ng-template [ngTemplateOutlet]=\"checkboxList\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col }\">\r\n </ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mtx-grid-column-menu-footer\" *ngIf=\"showFooter\">\r\n <ng-template [ngIf]=\"footerTemplate\" [ngIfElse]=\"defaultFooterTpl\">\r\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\r\n </ng-template>\r\n <ng-template #defaultFooterTpl>{{footerText}}</ng-template>\r\n </div>\r\n </div>\r\n</mat-menu>\r\n\r\n<ng-template #checkboxList let-col>\r\n <ng-container *ngIf=\"pinnable\">\r\n <button class=\"mtx-grid-column-pin-button\" mat-icon-button [matMenuTriggerFor]=\"pinList\">\r\n <svg class=\"mtx-grid-icon mtx-grid-column-pin-icon\" *ngIf=\"col.pinned\"\r\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path d=\"M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12Z\" />\r\n </svg>\r\n <svg class=\"mtx-grid-icon mtx-grid-column-pin-off-icon\" *ngIf=\"!col.pinned\"\r\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path\r\n d=\"M2,5.27L3.28,4L20,20.72L18.73,22L12.8,16.07V22H11.2V16H6V14L8,12V11.27L2,5.27M16,12L18,14V16H17.82L8,6.18V4H7V2H17V4H16V12Z\" />\r\n </svg>\r\n </button>\r\n <mat-menu #pinList=\"matMenu\" class=\"mtx-grid-column-pin-list\">\r\n <button class=\"mtx-grid-column-pin-option\" *ngFor=\"let item of pinOptions\" mat-menu-item\r\n (click)=\"_handlePinSelect(col, item.value)\">\r\n <span class=\"mtx-grid-column-pin-option-placeholder\">\r\n <!-- eslint-disable-next-line @angular-eslint/template/eqeqeq -->\r\n <svg class=\"mtx-grid-icon mtx-grid-column-pin-check-icon\" *ngIf=\"col.pinned==item.value\"\r\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path d=\"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\" />\r\n </svg>\r\n </span>\r\n <span class=\"mtx-grid-column-pin-option-text\">{{item.label | toObservable | async}}</span>\r\n </button>\r\n </mat-menu>\r\n </ng-container>\r\n\r\n <mat-checkbox class=\"mtx-grid-column-menu-item-label\" *ngIf=\"selectable\"\r\n [(ngModel)]=\"col[selectableChecked]\" [disabled]=\"col.disabled\"\r\n (change)=\"_handleSelection($event)\">\r\n {{col.header | toObservable | async}}\r\n </mat-checkbox>\r\n <span class=\"mtx-grid-column-menu-item-label\" *ngIf=\"!selectable\">\r\n {{col.header | toObservable | async}}\r\n </span>\r\n</ng-template>\r\n", styles: [".mtx-grid-column-menu .mat-menu-content{padding:0}.mtx-grid-column-menu-body{padding:8px 16px}.mtx-grid-column-menu-header,.mtx-grid-column-menu-footer{position:sticky;z-index:1;padding:8px 16px}.mtx-grid-column-menu-header{top:0}.mtx-grid-column-menu-footer{bottom:0}.mtx-grid-column-menu-list{display:block;max-width:100%}.mtx-grid-column-menu-list.cdk-drop-list-dragging .mtx-grid-column-menu-item:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.mtx-grid-column-menu-list.cdk-drop-list .mtx-grid-column-menu-item-label{padding:0 4px}.mtx-grid-column-menu-item{display:flex;flex-direction:row;align-items:center}.mtx-grid-column-menu-item.cdk-drag-disabled .cdk-drag-handle{opacity:.35;cursor:no-drop}.mtx-grid-column-menu-item .cdk-drag-handle{cursor:move}.mtx-grid-column-menu-item.cdk-drag-preview{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.mtx-grid-column-menu-item.cdk-drag-placeholder{opacity:0}.mtx-grid-column-menu-item.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.mtx-grid-column-pin-button.mat-icon-button{width:32px;height:32px;line-height:32px}.mtx-grid-column-pin-option.mat-menu-item{display:flex;align-items:center;height:32px}.mtx-grid-column-pin-option-placeholder{display:inline-block;width:20px;height:20px;line-height:20px}.mtx-grid-column-pin-option-text{padding:0 8px}.mtx-grid-column-drag-handle-icon:hover{cursor:move}\n"], components: [{ type: i1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i3.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { type: i4.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i6$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i6.AsyncPipe, "toObservable": i8.MtxToObservablePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
144
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: MtxGridColumnMenuComponent, decorators: [{
|
|
145
|
-
type: Component,
|
|
146
|
-
args: [{ selector: 'mtx-grid-column-menu', exportAs: 'mtxGridColumnMenu', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"buttonType\">\r\n <ng-container *ngSwitchCase=\"'raised'\">\r\n <button [ngClass]=\"buttonClass\" mat-raised-button [color]=\"buttonColor\"\r\n [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'stroked'\">\r\n <button [ngClass]=\"buttonClass\" mat-stroked-button [color]=\"buttonColor\"\r\n [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'flat'\">\r\n <button [ngClass]=\"buttonClass\" mat-flat-button [color]=\"buttonColor\"\r\n [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'icon'\">\r\n <button [ngClass]=\"buttonClass\" mat-icon-button [color]=\"buttonColor\"\r\n [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'fab'\">\r\n <button [ngClass]=\"buttonClass\" mat-fab [color]=\"buttonColor\" [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'mini-fab'\">\r\n <button [ngClass]=\"buttonClass\" mat-mini-fab [color]=\"buttonColor\"\r\n [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <button [ngClass]=\"buttonClass\" mat-button [color]=\"buttonColor\" [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n</ng-container>\r\n\r\n<mat-menu #menu=\"matMenu\" class=\"mtx-grid-column-menu\">\r\n <div class=\"mtx-grid-column-menu-content\"\r\n (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\r\n <div class=\"mtx-grid-column-menu-header\" *ngIf=\"showHeader\">\r\n <ng-template [ngIf]=\"headerTemplate\" [ngIfElse]=\"defaultHeaderTpl\">\r\n <ng-template [ngTemplateOutlet]=\"headerTemplate\"></ng-template>\r\n </ng-template>\r\n <ng-template #defaultHeaderTpl>{{headerText}}</ng-template>\r\n </div>\r\n\r\n <div class=\"mtx-grid-column-menu-body\">\r\n <div class=\"mtx-grid-column-menu-list\" *ngIf=\"sortable\"\r\n cdkDropList (cdkDropListDropped)=\"_handleDroped($event)\">\r\n <div class=\"mtx-grid-column-menu-item\" *ngFor=\"let col of columns\"\r\n cdkDrag [cdkDragDisabled]=\"selectableChecked === 'show'? !col.show : col.hide\">\r\n <svg class=\"mtx-grid-icon mtx-grid-column-drag-handle-icon\" viewBox=\"0 0 24 24\"\r\n width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path\r\n d=\"M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z\">\r\n </path>\r\n </svg>\r\n <ng-template [ngTemplateOutlet]=\"checkboxList\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col }\">\r\n </ng-template>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mtx-grid-column-menu-list\" *ngIf=\"!sortable\">\r\n <div class=\"mtx-grid-column-menu-item\" *ngFor=\"let col of columns\">\r\n <ng-template [ngTemplateOutlet]=\"checkboxList\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col }\">\r\n </ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mtx-grid-column-menu-footer\" *ngIf=\"showFooter\">\r\n <ng-template [ngIf]=\"footerTemplate\" [ngIfElse]=\"defaultFooterTpl\">\r\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\r\n </ng-template>\r\n <ng-template #defaultFooterTpl>{{footerText}}</ng-template>\r\n </div>\r\n </div>\r\n</mat-menu>\r\n\r\n<ng-template #checkboxList let-col>\r\n <ng-container *ngIf=\"pinnable\">\r\n <button class=\"mtx-grid-column-pin-button\" mat-icon-button [matMenuTriggerFor]=\"pinList\">\r\n <svg class=\"mtx-grid-icon mtx-grid-column-pin-icon\" *ngIf=\"col.pinned\"\r\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path d=\"M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12Z\" />\r\n </svg>\r\n <svg class=\"mtx-grid-icon mtx-grid-column-pin-off-icon\" *ngIf=\"!col.pinned\"\r\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path\r\n d=\"M2,5.27L3.28,4L20,20.72L18.73,22L12.8,16.07V22H11.2V16H6V14L8,12V11.27L2,5.27M16,12L18,14V16H17.82L8,6.18V4H7V2H17V4H16V12Z\" />\r\n </svg>\r\n </button>\r\n <mat-menu #pinList=\"matMenu\" class=\"mtx-grid-column-pin-list\">\r\n <button class=\"mtx-grid-column-pin-option\" *ngFor=\"let item of pinOptions\" mat-menu-item\r\n (click)=\"_handlePinSelect(col, item.value)\">\r\n <span class=\"mtx-grid-column-pin-option-placeholder\">\r\n <!-- eslint-disable-next-line @angular-eslint/template/eqeqeq -->\r\n <svg class=\"mtx-grid-icon mtx-grid-column-pin-check-icon\" *ngIf=\"col.pinned==item.value\"\r\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path d=\"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\" />\r\n </svg>\r\n </span>\r\n <span class=\"mtx-grid-column-pin-option-text\">{{item.label | toObservable | async}}</span>\r\n </button>\r\n </mat-menu>\r\n </ng-container>\r\n\r\n <mat-checkbox class=\"mtx-grid-column-menu-item-label\" *ngIf=\"selectable\"\r\n [(ngModel)]=\"col[selectableChecked]\" [disabled]=\"col.disabled\"\r\n (change)=\"_handleSelection($event)\">\r\n {{col.header | toObservable | async}}\r\n </mat-checkbox>\r\n <span class=\"mtx-grid-column-menu-item-label\" *ngIf=\"!selectable\">\r\n {{col.header | toObservable | async}}\r\n </span>\r\n</ng-template>\r\n", styles: [".mtx-grid-column-menu .mat-menu-content{padding:0}.mtx-grid-column-menu-body{padding:8px 16px}.mtx-grid-column-menu-header,.mtx-grid-column-menu-footer{position:sticky;z-index:1;padding:8px 16px}.mtx-grid-column-menu-header{top:0}.mtx-grid-column-menu-footer{bottom:0}.mtx-grid-column-menu-list{display:block;max-width:100%}.mtx-grid-column-menu-list.cdk-drop-list-dragging .mtx-grid-column-menu-item:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.mtx-grid-column-menu-list.cdk-drop-list .mtx-grid-column-menu-item-label{padding:0 4px}.mtx-grid-column-menu-item{display:flex;flex-direction:row;align-items:center}.mtx-grid-column-menu-item.cdk-drag-disabled .cdk-drag-handle{opacity:.35;cursor:no-drop}.mtx-grid-column-menu-item .cdk-drag-handle{cursor:move}.mtx-grid-column-menu-item.cdk-drag-preview{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.mtx-grid-column-menu-item.cdk-drag-placeholder{opacity:0}.mtx-grid-column-menu-item.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.mtx-grid-column-pin-button.mat-icon-button{width:32px;height:32px;line-height:32px}.mtx-grid-column-pin-option.mat-menu-item{display:flex;align-items:center;height:32px}.mtx-grid-column-pin-option-placeholder{display:inline-block;width:20px;height:20px;line-height:20px}.mtx-grid-column-pin-option-text{padding:0 8px}.mtx-grid-column-drag-handle-icon:hover{cursor:move}\n"] }]
|
|
147
|
-
}], propDecorators: { menuPanel: [{
|
|
148
|
-
type: ViewChild,
|
|
149
|
-
args: ['menu', { static: true }]
|
|
150
|
-
}], menuTrigger: [{
|
|
151
|
-
type: ViewChild,
|
|
152
|
-
args: [MatMenuTrigger]
|
|
153
|
-
}], columns: [{
|
|
154
|
-
type: Input
|
|
155
|
-
}], selectable: [{
|
|
156
|
-
type: Input
|
|
157
|
-
}], selectableChecked: [{
|
|
158
|
-
type: Input
|
|
159
|
-
}], sortable: [{
|
|
160
|
-
type: Input
|
|
161
|
-
}], pinnable: [{
|
|
162
|
-
type: Input
|
|
163
|
-
}], buttonText: [{
|
|
164
|
-
type: Input
|
|
165
|
-
}], buttonType: [{
|
|
166
|
-
type: Input
|
|
167
|
-
}], buttonColor: [{
|
|
168
|
-
type: Input
|
|
169
|
-
}], buttonClass: [{
|
|
170
|
-
type: Input
|
|
171
|
-
}], buttonIcon: [{
|
|
172
|
-
type: Input
|
|
173
|
-
}], showHeader: [{
|
|
174
|
-
type: Input
|
|
175
|
-
}], headerText: [{
|
|
176
|
-
type: Input
|
|
177
|
-
}], headerTemplate: [{
|
|
178
|
-
type: Input
|
|
179
|
-
}], showFooter: [{
|
|
180
|
-
type: Input
|
|
181
|
-
}], footerText: [{
|
|
182
|
-
type: Input
|
|
183
|
-
}], footerTemplate: [{
|
|
184
|
-
type: Input
|
|
185
|
-
}], selectionChange: [{
|
|
186
|
-
type: Output
|
|
187
|
-
}], sortChange: [{
|
|
188
|
-
type: Output
|
|
189
|
-
}], pinChange: [{
|
|
190
|
-
type: Output
|
|
191
|
-
}], pinOptions: [{
|
|
192
|
-
type: Input
|
|
193
|
-
}] } });
|
|
194
|
-
|
|
195
|
-
class MtxGridCellComponent {
|
|
196
|
-
constructor(_dialog, _dataGridSrv) {
|
|
197
|
-
this._dialog = _dialog;
|
|
198
|
-
this._dataGridSrv = _dataGridSrv;
|
|
199
|
-
/** Row data */
|
|
200
|
-
this.rowData = {};
|
|
201
|
-
/** All data */
|
|
202
|
-
this.data = [];
|
|
203
|
-
/** Whether show summary */
|
|
204
|
-
this.summary = false;
|
|
205
|
-
}
|
|
206
|
-
get _colValue() {
|
|
207
|
-
return this._dataGridSrv.getCellValue(this.rowData, this.colDef);
|
|
208
|
-
}
|
|
209
|
-
_isString(fn) {
|
|
210
|
-
return Object.prototype.toString.call(fn) === '[object String]';
|
|
211
|
-
}
|
|
212
|
-
_isFunction(fn) {
|
|
213
|
-
return Object.prototype.toString.call(fn) === '[object Function]';
|
|
214
|
-
}
|
|
215
|
-
_isEmptyValue(value) {
|
|
216
|
-
return value == null || value.toString() === '';
|
|
217
|
-
}
|
|
218
|
-
_isContainHTML(value) {
|
|
219
|
-
return /<\/?[a-z][\s\S]*>/i.test(value);
|
|
220
|
-
}
|
|
221
|
-
_getText(value) {
|
|
222
|
-
return this._isEmptyValue(value) ? '--' : value;
|
|
223
|
-
}
|
|
224
|
-
_getTooltip(value) {
|
|
225
|
-
return this._isEmptyValue(value) ? '' : value;
|
|
226
|
-
}
|
|
227
|
-
_getFormatterTooltip(value) {
|
|
228
|
-
return this._isContainHTML(value) || this._isEmptyValue(value) ? '' : value;
|
|
229
|
-
}
|
|
230
|
-
_formatSummary(data, colDef) {
|
|
231
|
-
if (this._isString(colDef.summary)) {
|
|
232
|
-
return colDef.summary;
|
|
233
|
-
}
|
|
234
|
-
else if (this._isFunction(colDef.summary)) {
|
|
235
|
-
return colDef.summary(this._dataGridSrv.getColData(data, colDef), colDef);
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
_handleActionConfirm(event, title, description = '', okColor = 'primary', okText = 'OK', closeColor, closeText = 'CLOSE', fn, data) {
|
|
239
|
-
event.preventDefault();
|
|
240
|
-
event.stopPropagation();
|
|
241
|
-
this._dialog.open({
|
|
242
|
-
title,
|
|
243
|
-
description,
|
|
244
|
-
buttons: [
|
|
245
|
-
{
|
|
246
|
-
color: okColor,
|
|
247
|
-
text: okText,
|
|
248
|
-
onClick: () => (fn ? fn(data) : {}),
|
|
249
|
-
},
|
|
250
|
-
{ color: closeColor, text: closeText, onClick: () => { } },
|
|
251
|
-
],
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
|
-
_handleActionClick(event, btn, rowData) {
|
|
255
|
-
event.preventDefault();
|
|
256
|
-
event.stopPropagation();
|
|
257
|
-
if (btn.click) {
|
|
258
|
-
btn.click(rowData);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
/** Preview enlarged image */
|
|
262
|
-
_handleImagePreview(urlStr) {
|
|
263
|
-
const imgs = [];
|
|
264
|
-
this._dataGridSrv.str2arr(urlStr).forEach((url, index) => {
|
|
265
|
-
imgs.push({ title: index + 1 + '', src: url });
|
|
266
|
-
});
|
|
267
|
-
const footerToolbar = imgs.length > 1
|
|
268
|
-
? ['zoomIn', 'zoomOut', 'prev', 'next', 'rotateRight', 'rotateLeft', 'actualSize']
|
|
269
|
-
: ['zoomIn', 'zoomOut', 'rotateRight', 'rotateLeft', 'actualSize'];
|
|
270
|
-
const options = {
|
|
271
|
-
title: imgs.length > 1,
|
|
272
|
-
footerToolbar,
|
|
273
|
-
};
|
|
274
|
-
const viewer = new PhotoViewer(imgs, options);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
/** @nocollapse */ MtxGridCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: MtxGridCellComponent, deps: [{ token: i1$1.MtxDialog }, { token: MtxGridService }], target: i0.ɵɵFactoryTarget.Component });
|
|
278
|
-
/** @nocollapse */ MtxGridCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.6", type: MtxGridCellComponent, selector: "mtx-grid-cell", inputs: { rowData: "rowData", colDef: "colDef", data: "data", summary: "summary" }, exportAs: ["mtxGridCell"], ngImport: i0, template: "<span *ngIf=\"summary; else customCellFormattingTpl\"\r\n [title]=\"_getFormatterTooltip(_formatSummary(data, colDef))\"\r\n [innerHTML]=\"_getText(_formatSummary(data, 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 <!-- Tag -->\r\n <ng-container *ngSwitchCase=\"'tag'\">\r\n <mat-chip-list *ngIf=\"colDef.tag && colDef.tag[_colValue]; else tagEmptyTpl\">\r\n <mat-chip color=\"primary\" [ngClass]=\"['bg-' + colDef.tag[_colValue].color]\">\r\n {{colDef.tag[_colValue].text}}\r\n </mat-chip>\r\n </mat-chip-list>\r\n <ng-template #tagEmptyTpl>{{_colValue}}</ng-template>\r\n </ng-container>\r\n <!-- Buttons -->\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <ng-container *ngFor=\"let btn of colDef.buttons;\">\r\n <ng-container *ngIf=\"!btn.iif || btn.iif(rowData)\">\r\n <ng-container *ngIf=\"btn.pop; else btnDefaultTpl\">\r\n <button [ngClass]=\"['mtx-grid-action-button', btn.class||'']\"\r\n *ngIf=\"btn.type==='basic'\"\r\n mat-button\r\n [color]=\"btn.color || 'primary'\"\r\n [disabled]=\"btn.disabled\"\r\n [matTooltip]=\"btn.tooltip | toObservable | async\"\r\n (click)=\"_handleActionConfirm($event, btn.popTitle!, btn.popDescription,\r\n btn.popOkColor, btn.popOkText,\r\n btn.popCloseColor, btn.popCloseText,\r\n btn.click, 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 <button [ngClass]=\"['mtx-grid-action-button', btn.class||'']\"\r\n *ngIf=\"!btn.type || btn.type==='icon'\"\r\n mat-icon-button\r\n [color]=\"btn.color || 'primary'\"\r\n [disabled]=\"btn.disabled\"\r\n [matTooltip]=\"btn.tooltip | toObservable | async\"\r\n (click)=\"_handleActionConfirm($event, btn.popTitle!, btn.popDescription,\r\n btn.popOkColor, btn.popOkText,\r\n btn.popCloseColor, btn.popCloseText,\r\n btn.click, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\">{{btn.icon}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n <ng-template #btnDefaultTpl>\r\n <button [ngClass]=\"['mtx-grid-action-button', btn.class||'']\"\r\n *ngIf=\"btn.type==='basic'\"\r\n mat-button\r\n [color]=\"btn.color || 'primary'\"\r\n [disabled]=\"btn.disabled\"\r\n [matTooltip]=\"btn.tooltip | toObservable | async\"\r\n (click)=\"_handleActionClick($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 <button [ngClass]=\"['mtx-grid-action-button', btn.class||'']\"\r\n *ngIf=\"!btn.type || btn.type==='icon'\"\r\n mat-icon-button\r\n [color]=\"btn.color || 'primary'\"\r\n [disabled]=\"btn.disabled\"\r\n [matTooltip]=\"btn.tooltip | toObservable | async\"\r\n (click)=\"_handleActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\">{{btn.icon}}</mat-icon>\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <!-- Link -->\r\n <ng-container *ngSwitchCase=\"'link'\">\r\n <a [href]=\"_colValue\" target=\"_blank\">{{_colValue}}</a>\r\n </ng-container>\r\n <!-- Image -->\r\n <ng-container *ngSwitchCase=\"'image'\">\r\n <img class=\"mtx-grid-img\" [src]=\"_colValue\" (click)=\"_handleImagePreview(_colValue)\">\r\n </ng-container>\r\n <!-- Boolean -->\r\n <ng-container *ngSwitchCase=\"'boolean'\">\r\n <span [title]=\"_getTooltip(_colValue)\">{{_getText(_colValue)}}</span>\r\n </ng-container>\r\n <!-- Number -->\r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <span\r\n [title]=\"_getTooltip(_colValue | number: colDef.typeParameter?.digitsInfo : colDef.typeParameter?.locale)\">\r\n {{_getText(_colValue | 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\r\n [title]=\"_getTooltip(_colValue | currency: colDef.typeParameter?.currencyCode : colDef.typeParameter?.display : colDef.typeParameter?.digitsInfo : colDef.typeParameter?.locale)\">\r\n {{_getText(_colValue | currency: colDef.typeParameter?.currencyCode :\r\n colDef.typeParameter?.display : 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\r\n [title]=\"_getTooltip(_colValue | percent: colDef.typeParameter?.digitsInfo : colDef.typeParameter?.locale)\">\r\n {{_getText(_colValue | 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\r\n [title]=\"_getTooltip(_colValue | date: colDef.typeParameter?.format : colDef.typeParameter?.timezone : colDef.typeParameter?.locale)\">\r\n {{_getText(_colValue | date: colDef.typeParameter?.format : 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(_colValue)\">{{_getText(_colValue)}}</span>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n", styles: [".mtx-grid-img{display:block;width:30px;border-radius:4px;cursor:pointer}\n"], components: [{ type: i3$1.MatChipList, selector: "mat-chip-list", inputs: ["errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3$1.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i6.NgSwitchDefault, selector: "[ngSwitchDefault]" }], pipes: { "async": i6.AsyncPipe, "toObservable": i8.MtxToObservablePipe, "number": i6.DecimalPipe, "currency": i6.CurrencyPipe, "percent": i6.PercentPipe, "date": i6.DatePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
279
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: MtxGridCellComponent, decorators: [{
|
|
280
|
-
type: Component,
|
|
281
|
-
args: [{ selector: 'mtx-grid-cell', exportAs: 'mtxGridCell', encapsulation: ViewEncapsulation.None, template: "<span *ngIf=\"summary; else customCellFormattingTpl\"\r\n [title]=\"_getFormatterTooltip(_formatSummary(data, colDef))\"\r\n [innerHTML]=\"_getText(_formatSummary(data, 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 <!-- Tag -->\r\n <ng-container *ngSwitchCase=\"'tag'\">\r\n <mat-chip-list *ngIf=\"colDef.tag && colDef.tag[_colValue]; else tagEmptyTpl\">\r\n <mat-chip color=\"primary\" [ngClass]=\"['bg-' + colDef.tag[_colValue].color]\">\r\n {{colDef.tag[_colValue].text}}\r\n </mat-chip>\r\n </mat-chip-list>\r\n <ng-template #tagEmptyTpl>{{_colValue}}</ng-template>\r\n </ng-container>\r\n <!-- Buttons -->\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <ng-container *ngFor=\"let btn of colDef.buttons;\">\r\n <ng-container *ngIf=\"!btn.iif || btn.iif(rowData)\">\r\n <ng-container *ngIf=\"btn.pop; else btnDefaultTpl\">\r\n <button [ngClass]=\"['mtx-grid-action-button', btn.class||'']\"\r\n *ngIf=\"btn.type==='basic'\"\r\n mat-button\r\n [color]=\"btn.color || 'primary'\"\r\n [disabled]=\"btn.disabled\"\r\n [matTooltip]=\"btn.tooltip | toObservable | async\"\r\n (click)=\"_handleActionConfirm($event, btn.popTitle!, btn.popDescription,\r\n btn.popOkColor, btn.popOkText,\r\n btn.popCloseColor, btn.popCloseText,\r\n btn.click, 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 <button [ngClass]=\"['mtx-grid-action-button', btn.class||'']\"\r\n *ngIf=\"!btn.type || btn.type==='icon'\"\r\n mat-icon-button\r\n [color]=\"btn.color || 'primary'\"\r\n [disabled]=\"btn.disabled\"\r\n [matTooltip]=\"btn.tooltip | toObservable | async\"\r\n (click)=\"_handleActionConfirm($event, btn.popTitle!, btn.popDescription,\r\n btn.popOkColor, btn.popOkText,\r\n btn.popCloseColor, btn.popCloseText,\r\n btn.click, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\">{{btn.icon}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n <ng-template #btnDefaultTpl>\r\n <button [ngClass]=\"['mtx-grid-action-button', btn.class||'']\"\r\n *ngIf=\"btn.type==='basic'\"\r\n mat-button\r\n [color]=\"btn.color || 'primary'\"\r\n [disabled]=\"btn.disabled\"\r\n [matTooltip]=\"btn.tooltip | toObservable | async\"\r\n (click)=\"_handleActionClick($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 <button [ngClass]=\"['mtx-grid-action-button', btn.class||'']\"\r\n *ngIf=\"!btn.type || btn.type==='icon'\"\r\n mat-icon-button\r\n [color]=\"btn.color || 'primary'\"\r\n [disabled]=\"btn.disabled\"\r\n [matTooltip]=\"btn.tooltip | toObservable | async\"\r\n (click)=\"_handleActionClick($event, btn, rowData)\">\r\n <mat-icon class=\"mtx-grid-icon\">{{btn.icon}}</mat-icon>\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <!-- Link -->\r\n <ng-container *ngSwitchCase=\"'link'\">\r\n <a [href]=\"_colValue\" target=\"_blank\">{{_colValue}}</a>\r\n </ng-container>\r\n <!-- Image -->\r\n <ng-container *ngSwitchCase=\"'image'\">\r\n <img class=\"mtx-grid-img\" [src]=\"_colValue\" (click)=\"_handleImagePreview(_colValue)\">\r\n </ng-container>\r\n <!-- Boolean -->\r\n <ng-container *ngSwitchCase=\"'boolean'\">\r\n <span [title]=\"_getTooltip(_colValue)\">{{_getText(_colValue)}}</span>\r\n </ng-container>\r\n <!-- Number -->\r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <span\r\n [title]=\"_getTooltip(_colValue | number: colDef.typeParameter?.digitsInfo : colDef.typeParameter?.locale)\">\r\n {{_getText(_colValue | 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\r\n [title]=\"_getTooltip(_colValue | currency: colDef.typeParameter?.currencyCode : colDef.typeParameter?.display : colDef.typeParameter?.digitsInfo : colDef.typeParameter?.locale)\">\r\n {{_getText(_colValue | currency: colDef.typeParameter?.currencyCode :\r\n colDef.typeParameter?.display : 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\r\n [title]=\"_getTooltip(_colValue | percent: colDef.typeParameter?.digitsInfo : colDef.typeParameter?.locale)\">\r\n {{_getText(_colValue | 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\r\n [title]=\"_getTooltip(_colValue | date: colDef.typeParameter?.format : colDef.typeParameter?.timezone : colDef.typeParameter?.locale)\">\r\n {{_getText(_colValue | date: colDef.typeParameter?.format : 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(_colValue)\">{{_getText(_colValue)}}</span>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n", styles: [".mtx-grid-img{display:block;width:30px;border-radius:4px;cursor:pointer}\n"] }]
|
|
282
|
-
}], ctorParameters: function () { return [{ type: i1$1.MtxDialog }, { type: MtxGridService }]; }, propDecorators: { rowData: [{
|
|
283
|
-
type: Input
|
|
284
|
-
}], colDef: [{
|
|
285
|
-
type: Input
|
|
286
|
-
}], data: [{
|
|
287
|
-
type: Input
|
|
288
|
-
}], summary: [{
|
|
289
|
-
type: Input
|
|
290
|
-
}] } });
|
|
291
|
-
|
|
292
|
-
class MtxGridExpansionToggleDirective {
|
|
293
|
-
constructor() {
|
|
294
|
-
this._opened = false;
|
|
295
|
-
this.openedChange = new EventEmitter();
|
|
296
|
-
this.toggleChange = new EventEmitter();
|
|
297
|
-
}
|
|
298
|
-
get opened() {
|
|
299
|
-
return this._opened;
|
|
300
|
-
}
|
|
301
|
-
set opened(newValue) {
|
|
302
|
-
this._opened = newValue;
|
|
303
|
-
this.openedChange.emit(newValue);
|
|
304
|
-
}
|
|
305
|
-
get expanded() {
|
|
306
|
-
return this._opened;
|
|
307
|
-
}
|
|
308
|
-
set expandableRow(value) {
|
|
309
|
-
if (value !== this._row) {
|
|
310
|
-
this._row = value;
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
set template(value) {
|
|
314
|
-
if (value !== this._tplRef) {
|
|
315
|
-
this._tplRef = value;
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
onClick(event) {
|
|
319
|
-
event.preventDefault();
|
|
320
|
-
event.stopPropagation();
|
|
321
|
-
this.toggle();
|
|
322
|
-
}
|
|
323
|
-
toggle() {
|
|
324
|
-
this.opened = !this.opened;
|
|
325
|
-
this.toggleChange.emit(this);
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
/** @nocollapse */ MtxGridExpansionToggleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: MtxGridExpansionToggleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
329
|
-
/** @nocollapse */ MtxGridExpansionToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.6", type: MtxGridExpansionToggleDirective, selector: "[mtx-grid-expansion-toggle]", inputs: { opened: "opened", expandableRow: "expandableRow", template: ["expansionRowTpl", "template"] }, outputs: { openedChange: "openedChange", toggleChange: "toggleChange" }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.expanded": "this.expanded" } }, ngImport: i0 });
|
|
330
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: MtxGridExpansionToggleDirective, decorators: [{
|
|
331
|
-
type: Directive,
|
|
332
|
-
args: [{
|
|
333
|
-
selector: '[mtx-grid-expansion-toggle]',
|
|
334
|
-
}]
|
|
335
|
-
}], ctorParameters: function () { return []; }, propDecorators: { opened: [{
|
|
336
|
-
type: Input
|
|
337
|
-
}], openedChange: [{
|
|
338
|
-
type: Output
|
|
339
|
-
}], expanded: [{
|
|
340
|
-
type: HostBinding,
|
|
341
|
-
args: ['class.expanded']
|
|
342
|
-
}], expandableRow: [{
|
|
343
|
-
type: Input
|
|
344
|
-
}], template: [{
|
|
345
|
-
type: Input,
|
|
346
|
-
args: ['expansionRowTpl']
|
|
347
|
-
}], toggleChange: [{
|
|
348
|
-
type: Output
|
|
349
|
-
}], onClick: [{
|
|
350
|
-
type: HostListener,
|
|
351
|
-
args: ['click', ['$event']]
|
|
352
|
-
}] } });
|
|
353
|
-
|
|
354
90
|
/**
|
|
355
91
|
* @license
|
|
356
92
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -369,15 +105,15 @@ class MatFlexTableResizeStrategy extends CdkFlexTableResizeStrategy {
|
|
|
369
105
|
return `mat-column-${cssFriendlyColumnName}`;
|
|
370
106
|
}
|
|
371
107
|
}
|
|
372
|
-
/** @nocollapse */ MatFlexTableResizeStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
373
|
-
/** @nocollapse */ MatFlexTableResizeStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
374
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
108
|
+
/** @nocollapse */ MatFlexTableResizeStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MatFlexTableResizeStrategy, deps: [{ token: i2.ColumnResize }, { token: _COALESCED_STYLE_SCHEDULER }, { token: i1.CdkTable }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
109
|
+
/** @nocollapse */ MatFlexTableResizeStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MatFlexTableResizeStrategy });
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MatFlexTableResizeStrategy, decorators: [{
|
|
375
111
|
type: Injectable
|
|
376
112
|
}], ctorParameters: function () {
|
|
377
|
-
return [{ type: i2
|
|
113
|
+
return [{ type: i2.ColumnResize }, { type: i1._CoalescedStyleScheduler, decorators: [{
|
|
378
114
|
type: Inject,
|
|
379
115
|
args: [_COALESCED_STYLE_SCHEDULER]
|
|
380
|
-
}] }, { type: i1
|
|
116
|
+
}] }, { type: i1.CdkTable }, { type: undefined, decorators: [{
|
|
381
117
|
type: Inject,
|
|
382
118
|
args: [DOCUMENT]
|
|
383
119
|
}] }];
|
|
@@ -440,16 +176,16 @@ class MatColumnResize extends AbstractMatColumnResize {
|
|
|
440
176
|
this.notifier = notifier;
|
|
441
177
|
}
|
|
442
178
|
}
|
|
443
|
-
/** @nocollapse */ MatColumnResize.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
444
|
-
/** @nocollapse */ MatColumnResize.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
445
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
179
|
+
/** @nocollapse */ MatColumnResize.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MatColumnResize, deps: [{ token: i2.ColumnResizeNotifier }, { token: i0.ElementRef }, { token: i2.HeaderRowEventDispatcher }, { token: i0.NgZone }, { token: i2.ColumnResizeNotifierSource }], target: i0.ɵɵFactoryTarget.Directive });
|
|
180
|
+
/** @nocollapse */ MatColumnResize.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.2", type: MatColumnResize, selector: "table[mat-table][columnResize]", host: { classAttribute: "mat-column-resize-table" }, providers: [...TABLE_PROVIDERS, { provide: ColumnResize, useExisting: MatColumnResize }], usesInheritance: true, ngImport: i0 });
|
|
181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MatColumnResize, decorators: [{
|
|
446
182
|
type: Directive,
|
|
447
183
|
args: [{
|
|
448
184
|
selector: 'table[mat-table][columnResize]',
|
|
449
185
|
host: TABLE_HOST_BINDINGS,
|
|
450
186
|
providers: [...TABLE_PROVIDERS, { provide: ColumnResize, useExisting: MatColumnResize }],
|
|
451
187
|
}]
|
|
452
|
-
}], ctorParameters: function () { return [{ type: i2
|
|
188
|
+
}], ctorParameters: function () { return [{ type: i2.ColumnResizeNotifier }, { type: i0.ElementRef }, { type: i2.HeaderRowEventDispatcher }, { type: i0.NgZone }, { type: i2.ColumnResizeNotifierSource }]; } });
|
|
453
189
|
|
|
454
190
|
/**
|
|
455
191
|
* @license
|
|
@@ -485,9 +221,9 @@ class MatColumnResizeOverlayHandle extends ResizeOverlayHandle {
|
|
|
485
221
|
});
|
|
486
222
|
}
|
|
487
223
|
}
|
|
488
|
-
/** @nocollapse */ MatColumnResizeOverlayHandle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
489
|
-
/** @nocollapse */ MatColumnResizeOverlayHandle.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
490
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
224
|
+
/** @nocollapse */ MatColumnResizeOverlayHandle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", 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 });
|
|
225
|
+
/** @nocollapse */ MatColumnResizeOverlayHandle.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", 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 });
|
|
226
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MatColumnResizeOverlayHandle, decorators: [{
|
|
491
227
|
type: Component,
|
|
492
228
|
args: [{
|
|
493
229
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -496,7 +232,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImpor
|
|
|
496
232
|
template: '',
|
|
497
233
|
}]
|
|
498
234
|
}], ctorParameters: function () {
|
|
499
|
-
return [{ type: i1
|
|
235
|
+
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: [{
|
|
500
236
|
type: Inject,
|
|
501
237
|
args: [_COALESCED_STYLE_SCHEDULER]
|
|
502
238
|
}] }, { type: undefined, decorators: [{
|
|
@@ -564,19 +300,19 @@ class MatResizable extends AbstractMatResizable {
|
|
|
564
300
|
this.isResizable = newValue == null || newValue === '' || newValue;
|
|
565
301
|
}
|
|
566
302
|
}
|
|
567
|
-
/** @nocollapse */ MatResizable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
568
|
-
/** @nocollapse */ MatResizable.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
569
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
303
|
+
/** @nocollapse */ MatResizable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", 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 });
|
|
304
|
+
/** @nocollapse */ MatResizable.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.2", 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 });
|
|
305
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MatResizable, decorators: [{
|
|
570
306
|
type: Directive,
|
|
571
307
|
args: [{
|
|
572
308
|
selector: 'mat-header-cell[resizable], th[mat-header-cell][resizable]',
|
|
573
309
|
inputs: RESIZABLE_INPUTS,
|
|
574
310
|
}]
|
|
575
311
|
}], ctorParameters: function () {
|
|
576
|
-
return [{ type: i1
|
|
312
|
+
return [{ type: i1.CdkColumnDef }, { type: i2.ColumnResize }, { type: i3.Directionality }, { type: undefined, decorators: [{
|
|
577
313
|
type: Inject,
|
|
578
314
|
args: [DOCUMENT]
|
|
579
|
-
}] }, { type: i0.ElementRef }, { type: i2
|
|
315
|
+
}] }, { type: i0.ElementRef }, { type: i2.HeaderRowEventDispatcher }, { type: i0.Injector }, { type: i0.NgZone }, { type: i4.Overlay }, { type: i2.ColumnResizeNotifierSource }, { type: i2.ResizeStrategy }, { type: i1._CoalescedStyleScheduler, decorators: [{
|
|
580
316
|
type: Inject,
|
|
581
317
|
args: [_COALESCED_STYLE_SCHEDULER]
|
|
582
318
|
}] }, { type: i0.ViewContainerRef }, { type: i0.ChangeDetectorRef }];
|
|
@@ -587,16 +323,306 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImpor
|
|
|
587
323
|
type: Input
|
|
588
324
|
}] } });
|
|
589
325
|
|
|
326
|
+
class MtxGridCellComponent {
|
|
327
|
+
constructor(_dialog, _dataGridSrv) {
|
|
328
|
+
this._dialog = _dialog;
|
|
329
|
+
this._dataGridSrv = _dataGridSrv;
|
|
330
|
+
/** Row data */
|
|
331
|
+
this.rowData = {};
|
|
332
|
+
/** Table data */
|
|
333
|
+
this.data = [];
|
|
334
|
+
/** Whether show summary */
|
|
335
|
+
this.summary = false;
|
|
336
|
+
/** Placeholder for the empty value (`null`, `''`, `[]`) */
|
|
337
|
+
this.placeholder = '--';
|
|
338
|
+
}
|
|
339
|
+
get _colValue() {
|
|
340
|
+
return this._dataGridSrv.getCellValue(this.rowData, this.colDef);
|
|
341
|
+
}
|
|
342
|
+
_isEmptyValue(value) {
|
|
343
|
+
return value == null || value.toString() === '';
|
|
344
|
+
}
|
|
345
|
+
_isContainHTML(value) {
|
|
346
|
+
return /<\/?[a-z][\s\S]*>/i.test(value);
|
|
347
|
+
}
|
|
348
|
+
_getText(value) {
|
|
349
|
+
return value === undefined ? '' : this._isEmptyValue(value) ? this.placeholder : value;
|
|
350
|
+
}
|
|
351
|
+
_getTooltip(value) {
|
|
352
|
+
return this._isEmptyValue(value) ? '' : value;
|
|
353
|
+
}
|
|
354
|
+
_getFormatterTooltip(value) {
|
|
355
|
+
return this._isContainHTML(value) || this._isEmptyValue(value) ? '' : value;
|
|
356
|
+
}
|
|
357
|
+
_formatSummary(data, colDef) {
|
|
358
|
+
if (typeof colDef.summary === 'string') {
|
|
359
|
+
return colDef.summary;
|
|
360
|
+
}
|
|
361
|
+
else if (typeof colDef.summary === 'function') {
|
|
362
|
+
return colDef.summary(this._dataGridSrv.getColData(data, colDef), colDef);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
_onActionClick(event, btn, rowData) {
|
|
366
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
367
|
+
event.preventDefault();
|
|
368
|
+
event.stopPropagation();
|
|
369
|
+
if (btn.pop) {
|
|
370
|
+
this._dialog.open({
|
|
371
|
+
title: (_a = btn.pop) === null || _a === void 0 ? void 0 : _a.title,
|
|
372
|
+
description: (_b = btn.pop) === null || _b === void 0 ? void 0 : _b.description,
|
|
373
|
+
buttons: [
|
|
374
|
+
{
|
|
375
|
+
color: ((_c = btn.pop) === null || _c === void 0 ? void 0 : _c.okColor) || 'primary',
|
|
376
|
+
text: ((_d = btn.pop) === null || _d === void 0 ? void 0 : _d.okText) || 'OK',
|
|
377
|
+
onClick: () => { var _a; return ((_a = btn.click) === null || _a === void 0 ? void 0 : _a.call(btn, rowData)) || {}; },
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
color: (_e = btn.pop) === null || _e === void 0 ? void 0 : _e.closeColor,
|
|
381
|
+
text: ((_f = btn.pop) === null || _f === void 0 ? void 0 : _f.closeText) || 'CLOSE',
|
|
382
|
+
onClick: () => { },
|
|
383
|
+
},
|
|
384
|
+
],
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
388
|
+
(_g = btn.click) === null || _g === void 0 ? void 0 : _g.call(btn, rowData);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
_getActionTooltip(btn) {
|
|
392
|
+
if (typeof btn.tooltip === 'string' || isObservable(btn.tooltip)) {
|
|
393
|
+
return {
|
|
394
|
+
message: btn.tooltip,
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
else {
|
|
398
|
+
return btn.tooltip;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
_isActionDisabled(btn, rowData) {
|
|
402
|
+
if (typeof btn.disabled === 'boolean') {
|
|
403
|
+
return btn.disabled;
|
|
404
|
+
}
|
|
405
|
+
else if (typeof btn.disabled === 'function') {
|
|
406
|
+
return btn.disabled(rowData);
|
|
407
|
+
}
|
|
408
|
+
else {
|
|
409
|
+
return false;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
/** Preview enlarged image */
|
|
413
|
+
_onImagePreview(urlStr) {
|
|
414
|
+
const imgs = [];
|
|
415
|
+
this._dataGridSrv.str2arr(urlStr).forEach((url, index) => {
|
|
416
|
+
imgs.push({ title: index + 1 + '', src: url });
|
|
417
|
+
});
|
|
418
|
+
const footerToolbar = imgs.length > 1
|
|
419
|
+
? ['zoomIn', 'zoomOut', 'prev', 'next', 'rotateRight', 'rotateLeft', 'actualSize']
|
|
420
|
+
: ['zoomIn', 'zoomOut', 'rotateRight', 'rotateLeft', 'actualSize'];
|
|
421
|
+
const options = {
|
|
422
|
+
title: imgs.length > 1,
|
|
423
|
+
footerToolbar,
|
|
424
|
+
};
|
|
425
|
+
const photoviewer = new PhotoViewer(imgs, options);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
/** @nocollapse */ MtxGridCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MtxGridCellComponent, deps: [{ token: i1$1.MtxDialog }, { token: MtxGridService }], target: i0.ɵɵFactoryTarget.Component });
|
|
429
|
+
/** @nocollapse */ MtxGridCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MtxGridCellComponent, selector: "mtx-grid-cell", inputs: { rowData: "rowData", colDef: "colDef", data: "data", summary: "summary", placeholder: "placeholder" }, exportAs: ["mtxGridCell"], ngImport: i0, template: "<span *ngIf=\"summary; else customCellFormattingTpl\"\r\n [title]=\"_getFormatterTooltip(_formatSummary(data, colDef))\"\r\n [innerHTML]=\"_getText(_formatSummary(data, 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 <!-- Tag -->\r\n <ng-container *ngSwitchCase=\"'tag'\">\r\n <mat-chip-list *ngIf=\"colDef.tag && colDef.tag[_colValue]; else tagEmptyTpl\">\r\n <mat-chip color=\"primary\" [ngClass]=\"['bg-' + colDef.tag[_colValue].color]\">\r\n {{colDef.tag[_colValue].text}}\r\n </mat-chip>\r\n </mat-chip-list>\r\n <ng-template #tagEmptyTpl>{{_colValue}}</ng-template>\r\n </ng-container>\r\n <!-- Buttons -->\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <ng-container *ngFor=\"let btn of colDef.buttons;\">\r\n <ng-container *ngIf=\"!btn.iif || btn.iif(rowData)\">\r\n <button *ngIf=\"btn.type==='basic'\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class||'']\"\r\n mat-button [color]=\"btn.color || 'primary'\"\r\n [disabled]=\"_isActionDisabled(btn, rowData)\"\r\n [matTooltip]=\"_getActionTooltip(btn)?.message | toObservable | async\"\r\n [matTooltipClass]=\"_getActionTooltip(btn)?.class\"\r\n [matTooltipHideDelay]=\"_getActionTooltip(btn)?.hideDelay\"\r\n [matTooltipShowDelay]=\"_getActionTooltip(btn)?.showDelay\"\r\n [matTooltipPosition]=\"_getActionTooltip(btn)?.position || 'below'\"\r\n [matTooltipTouchGestures]=\"_getActionTooltip(btn)?.touchGestures || 'auto'\"\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 <button *ngIf=\"!btn.type || btn.type==='icon'\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class||'']\"\r\n mat-icon-button [color]=\"btn.color || 'primary'\"\r\n [disabled]=\"_isActionDisabled(btn, rowData)\"\r\n [matTooltip]=\"_getActionTooltip(btn)?.message | toObservable | async\"\r\n [matTooltipClass]=\"_getActionTooltip(btn)?.class\"\r\n [matTooltipHideDelay]=\"_getActionTooltip(btn)?.hideDelay\"\r\n [matTooltipShowDelay]=\"_getActionTooltip(btn)?.showDelay\"\r\n [matTooltipPosition]=\"_getActionTooltip(btn)?.position || 'below'\"\r\n [matTooltipTouchGestures]=\"_getActionTooltip(btn)?.touchGestures || 'auto'\"\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>\r\n </ng-container>\r\n <!-- Link -->\r\n <ng-container *ngSwitchCase=\"'link'\">\r\n <a [href]=\"_colValue\" target=\"_blank\">{{_colValue}}</a>\r\n </ng-container>\r\n <!-- Image -->\r\n <ng-container *ngSwitchCase=\"'image'\">\r\n <img class=\"mtx-grid-img\" [src]=\"_colValue\" (click)=\"_onImagePreview(_colValue)\">\r\n </ng-container>\r\n <!-- Boolean -->\r\n <ng-container *ngSwitchCase=\"'boolean'\">\r\n <span [title]=\"_getTooltip(_colValue)\">{{_getText(_colValue)}}</span>\r\n </ng-container>\r\n <!-- Number -->\r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <span [title]=\"_getTooltip(_colValue | number: colDef.typeParameter?.digitsInfo :\r\n colDef.typeParameter?.locale)\">\r\n {{_getText(_colValue | 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(_colValue | currency: colDef.typeParameter?.currencyCode :\r\n colDef.typeParameter?.display :\r\n colDef.typeParameter?.digitsInfo :\r\n colDef.typeParameter?.locale)\">\r\n {{_getText(_colValue | 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(_colValue | percent: colDef.typeParameter?.digitsInfo :\r\n colDef.typeParameter?.locale)\">\r\n {{_getText(_colValue | 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(_colValue | date: colDef.typeParameter?.format :\r\n colDef.typeParameter?.timezone :\r\n colDef.typeParameter?.locale)\">\r\n {{_getText(_colValue | 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(_colValue)\">{{_getText(_colValue)}}</span>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n", styles: [".mtx-grid-img{display:block;width:30px;border-radius:4px;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-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatChipList, selector: "mat-chip-list", inputs: ["role", "aria-describedby", "errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { kind: "directive", type: i5.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "role", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i7.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: i8.MtxToObservablePipe, name: "toObservable" }], encapsulation: i0.ViewEncapsulation.None });
|
|
430
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MtxGridCellComponent, decorators: [{
|
|
431
|
+
type: Component,
|
|
432
|
+
args: [{ selector: 'mtx-grid-cell', exportAs: 'mtxGridCell', encapsulation: ViewEncapsulation.None, template: "<span *ngIf=\"summary; else customCellFormattingTpl\"\r\n [title]=\"_getFormatterTooltip(_formatSummary(data, colDef))\"\r\n [innerHTML]=\"_getText(_formatSummary(data, 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 <!-- Tag -->\r\n <ng-container *ngSwitchCase=\"'tag'\">\r\n <mat-chip-list *ngIf=\"colDef.tag && colDef.tag[_colValue]; else tagEmptyTpl\">\r\n <mat-chip color=\"primary\" [ngClass]=\"['bg-' + colDef.tag[_colValue].color]\">\r\n {{colDef.tag[_colValue].text}}\r\n </mat-chip>\r\n </mat-chip-list>\r\n <ng-template #tagEmptyTpl>{{_colValue}}</ng-template>\r\n </ng-container>\r\n <!-- Buttons -->\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <ng-container *ngFor=\"let btn of colDef.buttons;\">\r\n <ng-container *ngIf=\"!btn.iif || btn.iif(rowData)\">\r\n <button *ngIf=\"btn.type==='basic'\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class||'']\"\r\n mat-button [color]=\"btn.color || 'primary'\"\r\n [disabled]=\"_isActionDisabled(btn, rowData)\"\r\n [matTooltip]=\"_getActionTooltip(btn)?.message | toObservable | async\"\r\n [matTooltipClass]=\"_getActionTooltip(btn)?.class\"\r\n [matTooltipHideDelay]=\"_getActionTooltip(btn)?.hideDelay\"\r\n [matTooltipShowDelay]=\"_getActionTooltip(btn)?.showDelay\"\r\n [matTooltipPosition]=\"_getActionTooltip(btn)?.position || 'below'\"\r\n [matTooltipTouchGestures]=\"_getActionTooltip(btn)?.touchGestures || 'auto'\"\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 <button *ngIf=\"!btn.type || btn.type==='icon'\"\r\n [ngClass]=\"['mtx-grid-action-button', btn.class||'']\"\r\n mat-icon-button [color]=\"btn.color || 'primary'\"\r\n [disabled]=\"_isActionDisabled(btn, rowData)\"\r\n [matTooltip]=\"_getActionTooltip(btn)?.message | toObservable | async\"\r\n [matTooltipClass]=\"_getActionTooltip(btn)?.class\"\r\n [matTooltipHideDelay]=\"_getActionTooltip(btn)?.hideDelay\"\r\n [matTooltipShowDelay]=\"_getActionTooltip(btn)?.showDelay\"\r\n [matTooltipPosition]=\"_getActionTooltip(btn)?.position || 'below'\"\r\n [matTooltipTouchGestures]=\"_getActionTooltip(btn)?.touchGestures || 'auto'\"\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>\r\n </ng-container>\r\n <!-- Link -->\r\n <ng-container *ngSwitchCase=\"'link'\">\r\n <a [href]=\"_colValue\" target=\"_blank\">{{_colValue}}</a>\r\n </ng-container>\r\n <!-- Image -->\r\n <ng-container *ngSwitchCase=\"'image'\">\r\n <img class=\"mtx-grid-img\" [src]=\"_colValue\" (click)=\"_onImagePreview(_colValue)\">\r\n </ng-container>\r\n <!-- Boolean -->\r\n <ng-container *ngSwitchCase=\"'boolean'\">\r\n <span [title]=\"_getTooltip(_colValue)\">{{_getText(_colValue)}}</span>\r\n </ng-container>\r\n <!-- Number -->\r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <span [title]=\"_getTooltip(_colValue | number: colDef.typeParameter?.digitsInfo :\r\n colDef.typeParameter?.locale)\">\r\n {{_getText(_colValue | 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(_colValue | currency: colDef.typeParameter?.currencyCode :\r\n colDef.typeParameter?.display :\r\n colDef.typeParameter?.digitsInfo :\r\n colDef.typeParameter?.locale)\">\r\n {{_getText(_colValue | 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(_colValue | percent: colDef.typeParameter?.digitsInfo :\r\n colDef.typeParameter?.locale)\">\r\n {{_getText(_colValue | 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(_colValue | date: colDef.typeParameter?.format :\r\n colDef.typeParameter?.timezone :\r\n colDef.typeParameter?.locale)\">\r\n {{_getText(_colValue | 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(_colValue)\">{{_getText(_colValue)}}</span>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n", styles: [".mtx-grid-img{display:block;width:30px;border-radius:4px;cursor:pointer}\n"] }]
|
|
433
|
+
}], ctorParameters: function () { return [{ type: i1$1.MtxDialog }, { type: MtxGridService }]; }, propDecorators: { rowData: [{
|
|
434
|
+
type: Input
|
|
435
|
+
}], colDef: [{
|
|
436
|
+
type: Input
|
|
437
|
+
}], data: [{
|
|
438
|
+
type: Input
|
|
439
|
+
}], summary: [{
|
|
440
|
+
type: Input
|
|
441
|
+
}], placeholder: [{
|
|
442
|
+
type: Input
|
|
443
|
+
}] } });
|
|
444
|
+
|
|
445
|
+
class MtxGridColumnMenuComponent {
|
|
446
|
+
constructor() {
|
|
447
|
+
this.columns = [];
|
|
448
|
+
this.selectable = true;
|
|
449
|
+
this.selectableChecked = 'show';
|
|
450
|
+
this.sortable = true;
|
|
451
|
+
this.pinnable = true;
|
|
452
|
+
this._buttonText = '';
|
|
453
|
+
this.buttonType = 'stroked';
|
|
454
|
+
this.buttonClass = '';
|
|
455
|
+
this.buttonIcon = '';
|
|
456
|
+
this.showHeader = false;
|
|
457
|
+
this.headerText = 'Columns Header';
|
|
458
|
+
this.showFooter = false;
|
|
459
|
+
this.footerText = 'Columns Footer';
|
|
460
|
+
this.selectionChange = new EventEmitter();
|
|
461
|
+
this.sortChange = new EventEmitter();
|
|
462
|
+
this.pinChange = new EventEmitter();
|
|
463
|
+
this._pinOptions = [
|
|
464
|
+
{ label: 'Pin Left', value: 'left' },
|
|
465
|
+
{ label: 'Pin Right', value: 'right' },
|
|
466
|
+
{ label: 'No Pin', value: null },
|
|
467
|
+
];
|
|
468
|
+
}
|
|
469
|
+
get buttonText() {
|
|
470
|
+
const defaultText = `Columns ${this.selectableChecked === 'show' ? 'Shown' : 'Hidden'}`;
|
|
471
|
+
return this._buttonText ? this._buttonText : defaultText;
|
|
472
|
+
}
|
|
473
|
+
set buttonText(value) {
|
|
474
|
+
this._buttonText = value;
|
|
475
|
+
}
|
|
476
|
+
get pinOptions() {
|
|
477
|
+
return this._pinOptions;
|
|
478
|
+
}
|
|
479
|
+
set pinOptions(value) {
|
|
480
|
+
if (value.length > 0) {
|
|
481
|
+
this._pinOptions = value;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
_handleDroped(event) {
|
|
485
|
+
moveItemInArray(this.columns, event.previousIndex, event.currentIndex);
|
|
486
|
+
this.sortChange.emit(this.columns);
|
|
487
|
+
}
|
|
488
|
+
_handleSelection(e) {
|
|
489
|
+
this.selectionChange.emit(this.columns);
|
|
490
|
+
}
|
|
491
|
+
_handlePinSelect(col, val) {
|
|
492
|
+
if (col.pinned != val) {
|
|
493
|
+
col.pinned = val;
|
|
494
|
+
this.pinChange.emit(this.columns);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
/** @nocollapse */ MtxGridColumnMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MtxGridColumnMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
499
|
+
/** @nocollapse */ MtxGridColumnMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MtxGridColumnMenuComponent, selector: "mtx-grid-column-menu", inputs: { columns: "columns", selectable: "selectable", selectableChecked: "selectableChecked", sortable: "sortable", pinnable: "pinnable", buttonText: "buttonText", buttonType: "buttonType", buttonColor: "buttonColor", buttonClass: "buttonClass", buttonIcon: "buttonIcon", showHeader: "showHeader", headerText: "headerText", headerTemplate: "headerTemplate", showFooter: "showFooter", footerText: "footerText", footerTemplate: "footerTemplate", pinOptions: "pinOptions" }, outputs: { selectionChange: "selectionChange", sortChange: "sortChange", pinChange: "pinChange" }, viewQueries: [{ propertyName: "menuPanel", first: true, predicate: ["menu"], descendants: true, static: true }, { propertyName: "menuTrigger", first: true, predicate: MatMenuTrigger, descendants: true }], exportAs: ["mtxGridColumnMenu"], ngImport: i0, template: "<ng-container [ngSwitch]=\"buttonType\">\r\n <ng-container *ngSwitchCase=\"'raised'\">\r\n <button [ngClass]=\"buttonClass\" mat-raised-button [color]=\"buttonColor\"\r\n [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'stroked'\">\r\n <button [ngClass]=\"buttonClass\" mat-stroked-button [color]=\"buttonColor\"\r\n [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'flat'\">\r\n <button [ngClass]=\"buttonClass\" mat-flat-button [color]=\"buttonColor\"\r\n [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'icon'\">\r\n <button [ngClass]=\"buttonClass\" mat-icon-button [color]=\"buttonColor\"\r\n [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'fab'\">\r\n <button [ngClass]=\"buttonClass\" mat-fab [color]=\"buttonColor\" [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'mini-fab'\">\r\n <button [ngClass]=\"buttonClass\" mat-mini-fab [color]=\"buttonColor\"\r\n [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <button [ngClass]=\"buttonClass\" mat-button [color]=\"buttonColor\" [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n</ng-container>\r\n\r\n<mat-menu #menu=\"matMenu\" class=\"mtx-grid-column-menu\">\r\n <div class=\"mtx-grid-column-menu-content\"\r\n (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\r\n <div class=\"mtx-grid-column-menu-header\" *ngIf=\"showHeader\">\r\n <ng-template [ngIf]=\"headerTemplate\" [ngIfElse]=\"defaultHeaderTpl\">\r\n <ng-template [ngTemplateOutlet]=\"headerTemplate\"></ng-template>\r\n </ng-template>\r\n <ng-template #defaultHeaderTpl>{{headerText}}</ng-template>\r\n </div>\r\n\r\n <div class=\"mtx-grid-column-menu-body\">\r\n <div class=\"mtx-grid-column-menu-list\" *ngIf=\"sortable\"\r\n cdkDropList (cdkDropListDropped)=\"_handleDroped($event)\">\r\n <div class=\"mtx-grid-column-menu-item\" *ngFor=\"let col of columns\"\r\n cdkDrag [cdkDragDisabled]=\"selectableChecked === 'show'? !col.show : col.hide\">\r\n <svg class=\"mtx-grid-icon mtx-grid-column-drag-handle-icon\" viewBox=\"0 0 24 24\"\r\n width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path\r\n d=\"M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z\">\r\n </path>\r\n </svg>\r\n <ng-template [ngTemplateOutlet]=\"checkboxList\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col }\">\r\n </ng-template>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mtx-grid-column-menu-list\" *ngIf=\"!sortable\">\r\n <div class=\"mtx-grid-column-menu-item\" *ngFor=\"let col of columns\">\r\n <ng-template [ngTemplateOutlet]=\"checkboxList\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col }\">\r\n </ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mtx-grid-column-menu-footer\" *ngIf=\"showFooter\">\r\n <ng-template [ngIf]=\"footerTemplate\" [ngIfElse]=\"defaultFooterTpl\">\r\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\r\n </ng-template>\r\n <ng-template #defaultFooterTpl>{{footerText}}</ng-template>\r\n </div>\r\n </div>\r\n</mat-menu>\r\n\r\n<ng-template #checkboxList let-col>\r\n <ng-container *ngIf=\"pinnable\">\r\n <button class=\"mtx-grid-column-pin-button\" mat-icon-button [matMenuTriggerFor]=\"pinList\">\r\n <svg class=\"mtx-grid-icon mtx-grid-column-pin-icon\" *ngIf=\"col.pinned\"\r\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path d=\"M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12Z\" />\r\n </svg>\r\n <svg class=\"mtx-grid-icon mtx-grid-column-pin-off-icon\" *ngIf=\"!col.pinned\"\r\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path\r\n d=\"M2,5.27L3.28,4L20,20.72L18.73,22L12.8,16.07V22H11.2V16H6V14L8,12V11.27L2,5.27M16,12L18,14V16H17.82L8,6.18V4H7V2H17V4H16V12Z\" />\r\n </svg>\r\n </button>\r\n <mat-menu #pinList=\"matMenu\" class=\"mtx-grid-column-pin-list\">\r\n <button class=\"mtx-grid-column-pin-option\" *ngFor=\"let item of pinOptions\" mat-menu-item\r\n (click)=\"_handlePinSelect(col, item.value)\">\r\n <span class=\"mtx-grid-column-pin-option-placeholder\">\r\n <!-- eslint-disable-next-line @angular-eslint/template/eqeqeq -->\r\n <svg class=\"mtx-grid-icon mtx-grid-column-pin-check-icon\" *ngIf=\"col.pinned==item.value\"\r\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path d=\"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\" />\r\n </svg>\r\n </span>\r\n <span class=\"mtx-grid-column-pin-option-text\">{{item.label | toObservable | async}}</span>\r\n </button>\r\n </mat-menu>\r\n </ng-container>\r\n\r\n <mat-checkbox class=\"mtx-grid-column-menu-item-label\" *ngIf=\"selectable\"\r\n [(ngModel)]=\"col[selectableChecked]\" [disabled]=\"col.disabled\"\r\n (change)=\"_handleSelection($event)\">\r\n {{col.header | toObservable | async}}\r\n </mat-checkbox>\r\n <span class=\"mtx-grid-column-menu-item-label\" *ngIf=\"!selectable\">\r\n {{col.header | toObservable | async}}\r\n </span>\r\n</ng-template>\r\n", styles: [".mtx-grid-column-menu .mat-menu-content{padding:0}.mtx-grid-column-menu-body{padding:8px 16px}.mtx-grid-column-menu-header,.mtx-grid-column-menu-footer{position:sticky;z-index:1;padding:8px 16px}.mtx-grid-column-menu-header{top:0}.mtx-grid-column-menu-footer{bottom:0}.mtx-grid-column-menu-list{display:block;max-width:100%}.mtx-grid-column-menu-list.cdk-drop-list-dragging .mtx-grid-column-menu-item:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.mtx-grid-column-menu-list.cdk-drop-list .mtx-grid-column-menu-item-label{padding:0 4px}.mtx-grid-column-menu-item{display:flex;flex-direction:row;align-items:center}.mtx-grid-column-menu-item.cdk-drag-disabled .cdk-drag-handle{opacity:.35;cursor:no-drop}.mtx-grid-column-menu-item .cdk-drag-handle{cursor:move}.mtx-grid-column-menu-item.cdk-drag-preview{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.mtx-grid-column-menu-item.cdk-drag-placeholder{opacity:0}.mtx-grid-column-menu-item.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.mtx-grid-column-pin-button.mat-icon-button{width:32px;height:32px;line-height:32px}.mtx-grid-column-pin-option.mat-menu-item{display:flex;align-items:center;height:32px}.mtx-grid-column-pin-option-placeholder{display:inline-block;width:20px;height:20px;line-height:20px}.mtx-grid-column-pin-option-text{padding:0 8px}.mtx-grid-column-drag-handle-icon:hover{cursor:move}\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.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i4$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i6$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i6$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "directive", type: i7$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i7$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i8.MtxToObservablePipe, name: "toObservable" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
500
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MtxGridColumnMenuComponent, decorators: [{
|
|
501
|
+
type: Component,
|
|
502
|
+
args: [{ selector: 'mtx-grid-column-menu', exportAs: 'mtxGridColumnMenu', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"buttonType\">\r\n <ng-container *ngSwitchCase=\"'raised'\">\r\n <button [ngClass]=\"buttonClass\" mat-raised-button [color]=\"buttonColor\"\r\n [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'stroked'\">\r\n <button [ngClass]=\"buttonClass\" mat-stroked-button [color]=\"buttonColor\"\r\n [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'flat'\">\r\n <button [ngClass]=\"buttonClass\" mat-flat-button [color]=\"buttonColor\"\r\n [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'icon'\">\r\n <button [ngClass]=\"buttonClass\" mat-icon-button [color]=\"buttonColor\"\r\n [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'fab'\">\r\n <button [ngClass]=\"buttonClass\" mat-fab [color]=\"buttonColor\" [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'mini-fab'\">\r\n <button [ngClass]=\"buttonClass\" mat-mini-fab [color]=\"buttonColor\"\r\n [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <button [ngClass]=\"buttonClass\" mat-button [color]=\"buttonColor\" [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n</ng-container>\r\n\r\n<mat-menu #menu=\"matMenu\" class=\"mtx-grid-column-menu\">\r\n <div class=\"mtx-grid-column-menu-content\"\r\n (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\r\n <div class=\"mtx-grid-column-menu-header\" *ngIf=\"showHeader\">\r\n <ng-template [ngIf]=\"headerTemplate\" [ngIfElse]=\"defaultHeaderTpl\">\r\n <ng-template [ngTemplateOutlet]=\"headerTemplate\"></ng-template>\r\n </ng-template>\r\n <ng-template #defaultHeaderTpl>{{headerText}}</ng-template>\r\n </div>\r\n\r\n <div class=\"mtx-grid-column-menu-body\">\r\n <div class=\"mtx-grid-column-menu-list\" *ngIf=\"sortable\"\r\n cdkDropList (cdkDropListDropped)=\"_handleDroped($event)\">\r\n <div class=\"mtx-grid-column-menu-item\" *ngFor=\"let col of columns\"\r\n cdkDrag [cdkDragDisabled]=\"selectableChecked === 'show'? !col.show : col.hide\">\r\n <svg class=\"mtx-grid-icon mtx-grid-column-drag-handle-icon\" viewBox=\"0 0 24 24\"\r\n width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path\r\n d=\"M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z\">\r\n </path>\r\n </svg>\r\n <ng-template [ngTemplateOutlet]=\"checkboxList\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col }\">\r\n </ng-template>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mtx-grid-column-menu-list\" *ngIf=\"!sortable\">\r\n <div class=\"mtx-grid-column-menu-item\" *ngFor=\"let col of columns\">\r\n <ng-template [ngTemplateOutlet]=\"checkboxList\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col }\">\r\n </ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mtx-grid-column-menu-footer\" *ngIf=\"showFooter\">\r\n <ng-template [ngIf]=\"footerTemplate\" [ngIfElse]=\"defaultFooterTpl\">\r\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\r\n </ng-template>\r\n <ng-template #defaultFooterTpl>{{footerText}}</ng-template>\r\n </div>\r\n </div>\r\n</mat-menu>\r\n\r\n<ng-template #checkboxList let-col>\r\n <ng-container *ngIf=\"pinnable\">\r\n <button class=\"mtx-grid-column-pin-button\" mat-icon-button [matMenuTriggerFor]=\"pinList\">\r\n <svg class=\"mtx-grid-icon mtx-grid-column-pin-icon\" *ngIf=\"col.pinned\"\r\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path d=\"M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12Z\" />\r\n </svg>\r\n <svg class=\"mtx-grid-icon mtx-grid-column-pin-off-icon\" *ngIf=\"!col.pinned\"\r\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path\r\n d=\"M2,5.27L3.28,4L20,20.72L18.73,22L12.8,16.07V22H11.2V16H6V14L8,12V11.27L2,5.27M16,12L18,14V16H17.82L8,6.18V4H7V2H17V4H16V12Z\" />\r\n </svg>\r\n </button>\r\n <mat-menu #pinList=\"matMenu\" class=\"mtx-grid-column-pin-list\">\r\n <button class=\"mtx-grid-column-pin-option\" *ngFor=\"let item of pinOptions\" mat-menu-item\r\n (click)=\"_handlePinSelect(col, item.value)\">\r\n <span class=\"mtx-grid-column-pin-option-placeholder\">\r\n <!-- eslint-disable-next-line @angular-eslint/template/eqeqeq -->\r\n <svg class=\"mtx-grid-icon mtx-grid-column-pin-check-icon\" *ngIf=\"col.pinned==item.value\"\r\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path d=\"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\" />\r\n </svg>\r\n </span>\r\n <span class=\"mtx-grid-column-pin-option-text\">{{item.label | toObservable | async}}</span>\r\n </button>\r\n </mat-menu>\r\n </ng-container>\r\n\r\n <mat-checkbox class=\"mtx-grid-column-menu-item-label\" *ngIf=\"selectable\"\r\n [(ngModel)]=\"col[selectableChecked]\" [disabled]=\"col.disabled\"\r\n (change)=\"_handleSelection($event)\">\r\n {{col.header | toObservable | async}}\r\n </mat-checkbox>\r\n <span class=\"mtx-grid-column-menu-item-label\" *ngIf=\"!selectable\">\r\n {{col.header | toObservable | async}}\r\n </span>\r\n</ng-template>\r\n", styles: [".mtx-grid-column-menu .mat-menu-content{padding:0}.mtx-grid-column-menu-body{padding:8px 16px}.mtx-grid-column-menu-header,.mtx-grid-column-menu-footer{position:sticky;z-index:1;padding:8px 16px}.mtx-grid-column-menu-header{top:0}.mtx-grid-column-menu-footer{bottom:0}.mtx-grid-column-menu-list{display:block;max-width:100%}.mtx-grid-column-menu-list.cdk-drop-list-dragging .mtx-grid-column-menu-item:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.mtx-grid-column-menu-list.cdk-drop-list .mtx-grid-column-menu-item-label{padding:0 4px}.mtx-grid-column-menu-item{display:flex;flex-direction:row;align-items:center}.mtx-grid-column-menu-item.cdk-drag-disabled .cdk-drag-handle{opacity:.35;cursor:no-drop}.mtx-grid-column-menu-item .cdk-drag-handle{cursor:move}.mtx-grid-column-menu-item.cdk-drag-preview{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.mtx-grid-column-menu-item.cdk-drag-placeholder{opacity:0}.mtx-grid-column-menu-item.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.mtx-grid-column-pin-button.mat-icon-button{width:32px;height:32px;line-height:32px}.mtx-grid-column-pin-option.mat-menu-item{display:flex;align-items:center;height:32px}.mtx-grid-column-pin-option-placeholder{display:inline-block;width:20px;height:20px;line-height:20px}.mtx-grid-column-pin-option-text{padding:0 8px}.mtx-grid-column-drag-handle-icon:hover{cursor:move}\n"] }]
|
|
503
|
+
}], propDecorators: { menuPanel: [{
|
|
504
|
+
type: ViewChild,
|
|
505
|
+
args: ['menu', { static: true }]
|
|
506
|
+
}], menuTrigger: [{
|
|
507
|
+
type: ViewChild,
|
|
508
|
+
args: [MatMenuTrigger]
|
|
509
|
+
}], columns: [{
|
|
510
|
+
type: Input
|
|
511
|
+
}], selectable: [{
|
|
512
|
+
type: Input
|
|
513
|
+
}], selectableChecked: [{
|
|
514
|
+
type: Input
|
|
515
|
+
}], sortable: [{
|
|
516
|
+
type: Input
|
|
517
|
+
}], pinnable: [{
|
|
518
|
+
type: Input
|
|
519
|
+
}], buttonText: [{
|
|
520
|
+
type: Input
|
|
521
|
+
}], buttonType: [{
|
|
522
|
+
type: Input
|
|
523
|
+
}], buttonColor: [{
|
|
524
|
+
type: Input
|
|
525
|
+
}], buttonClass: [{
|
|
526
|
+
type: Input
|
|
527
|
+
}], buttonIcon: [{
|
|
528
|
+
type: Input
|
|
529
|
+
}], showHeader: [{
|
|
530
|
+
type: Input
|
|
531
|
+
}], headerText: [{
|
|
532
|
+
type: Input
|
|
533
|
+
}], headerTemplate: [{
|
|
534
|
+
type: Input
|
|
535
|
+
}], showFooter: [{
|
|
536
|
+
type: Input
|
|
537
|
+
}], footerText: [{
|
|
538
|
+
type: Input
|
|
539
|
+
}], footerTemplate: [{
|
|
540
|
+
type: Input
|
|
541
|
+
}], selectionChange: [{
|
|
542
|
+
type: Output
|
|
543
|
+
}], sortChange: [{
|
|
544
|
+
type: Output
|
|
545
|
+
}], pinChange: [{
|
|
546
|
+
type: Output
|
|
547
|
+
}], pinOptions: [{
|
|
548
|
+
type: Input
|
|
549
|
+
}] } });
|
|
550
|
+
|
|
551
|
+
class MtxGridExpansionToggleDirective {
|
|
552
|
+
constructor() {
|
|
553
|
+
this._opened = false;
|
|
554
|
+
this.openedChange = new EventEmitter();
|
|
555
|
+
this.toggleChange = new EventEmitter();
|
|
556
|
+
}
|
|
557
|
+
get opened() {
|
|
558
|
+
return this._opened;
|
|
559
|
+
}
|
|
560
|
+
set opened(newValue) {
|
|
561
|
+
this._opened = newValue;
|
|
562
|
+
this.openedChange.emit(newValue);
|
|
563
|
+
}
|
|
564
|
+
get expanded() {
|
|
565
|
+
return this._opened;
|
|
566
|
+
}
|
|
567
|
+
set expandableRow(value) {
|
|
568
|
+
if (value !== this._row) {
|
|
569
|
+
this._row = value;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
set template(value) {
|
|
573
|
+
if (value !== this._tplRef) {
|
|
574
|
+
this._tplRef = value;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
onClick(event) {
|
|
578
|
+
event.preventDefault();
|
|
579
|
+
event.stopPropagation();
|
|
580
|
+
this.toggle();
|
|
581
|
+
}
|
|
582
|
+
toggle() {
|
|
583
|
+
this.opened = !this.opened;
|
|
584
|
+
this.toggleChange.emit(this);
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
/** @nocollapse */ MtxGridExpansionToggleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MtxGridExpansionToggleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
588
|
+
/** @nocollapse */ MtxGridExpansionToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.2", type: MtxGridExpansionToggleDirective, selector: "[mtx-grid-expansion-toggle]", inputs: { opened: "opened", expandableRow: "expandableRow", template: ["expansionRowTpl", "template"] }, outputs: { openedChange: "openedChange", toggleChange: "toggleChange" }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.expanded": "this.expanded" } }, ngImport: i0 });
|
|
589
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MtxGridExpansionToggleDirective, decorators: [{
|
|
590
|
+
type: Directive,
|
|
591
|
+
args: [{
|
|
592
|
+
selector: '[mtx-grid-expansion-toggle]',
|
|
593
|
+
}]
|
|
594
|
+
}], ctorParameters: function () { return []; }, propDecorators: { opened: [{
|
|
595
|
+
type: Input
|
|
596
|
+
}], openedChange: [{
|
|
597
|
+
type: Output
|
|
598
|
+
}], expanded: [{
|
|
599
|
+
type: HostBinding,
|
|
600
|
+
args: ['class.expanded']
|
|
601
|
+
}], expandableRow: [{
|
|
602
|
+
type: Input
|
|
603
|
+
}], template: [{
|
|
604
|
+
type: Input,
|
|
605
|
+
args: ['expansionRowTpl']
|
|
606
|
+
}], toggleChange: [{
|
|
607
|
+
type: Output
|
|
608
|
+
}], onClick: [{
|
|
609
|
+
type: HostListener,
|
|
610
|
+
args: ['click', ['$event']]
|
|
611
|
+
}] } });
|
|
612
|
+
|
|
590
613
|
class MtxGridComponent {
|
|
591
614
|
constructor(_dataGridSrv, _changeDetectorRef) {
|
|
592
615
|
this._dataGridSrv = _dataGridSrv;
|
|
593
616
|
this._changeDetectorRef = _changeDetectorRef;
|
|
594
617
|
this.dataSource = new MatTableDataSource();
|
|
618
|
+
this.displayedColumns = [];
|
|
595
619
|
this.columns = [];
|
|
596
620
|
this.data = [];
|
|
597
621
|
this.length = 0;
|
|
598
622
|
this.loading = false;
|
|
599
623
|
this.columnResizable = false;
|
|
624
|
+
/** Placeholder for the empty value (`null`, `''`, `[]`) */
|
|
625
|
+
this.emptyValuePlaceholder = '--';
|
|
600
626
|
// ===== Page =====
|
|
601
627
|
this.pageOnFront = true;
|
|
602
628
|
this.showPaginator = true;
|
|
@@ -768,11 +794,11 @@ class MtxGridComponent {
|
|
|
768
794
|
_getIndex(index, dataIndex) {
|
|
769
795
|
return typeof index === 'undefined' ? dataIndex : index;
|
|
770
796
|
}
|
|
771
|
-
|
|
797
|
+
_onSortChange(sort) {
|
|
772
798
|
this.sortChange.emit(sort);
|
|
773
799
|
}
|
|
774
800
|
/** Expansion change event */
|
|
775
|
-
|
|
801
|
+
_onExpansionChange(expansionRef, rowData, column, index) {
|
|
776
802
|
this.expansionChange.emit({ expanded: expansionRef.expanded, data: rowData, index, column });
|
|
777
803
|
}
|
|
778
804
|
/** Cell select event */
|
|
@@ -827,7 +853,7 @@ class MtxGridComponent {
|
|
|
827
853
|
this.rowSelectionChange.emit(this.rowSelection.selected);
|
|
828
854
|
}
|
|
829
855
|
/** Column change event */
|
|
830
|
-
|
|
856
|
+
_onColumnChange(columns) {
|
|
831
857
|
this.columnChange.emit(columns);
|
|
832
858
|
this.displayedColumns = Object.assign([], this.getDisplayedColumnFields(columns));
|
|
833
859
|
if (this.rowSelectable && !this.hideRowSelectionCheckbox) {
|
|
@@ -849,7 +875,7 @@ class MtxGridComponent {
|
|
|
849
875
|
return this.expansionRowStates[index].expanded;
|
|
850
876
|
}
|
|
851
877
|
/** Scroll to top when turn to the next page. */
|
|
852
|
-
|
|
878
|
+
_onPage(e) {
|
|
853
879
|
if (this.pageOnFront) {
|
|
854
880
|
this.scrollTop(0);
|
|
855
881
|
}
|
|
@@ -874,15 +900,15 @@ class MtxGridComponent {
|
|
|
874
900
|
}
|
|
875
901
|
}
|
|
876
902
|
}
|
|
877
|
-
/** @nocollapse */ MtxGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
878
|
-
/** @nocollapse */ MtxGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.6", type: MtxGridComponent, selector: "mtx-grid", inputs: { displayedColumns: "displayedColumns", columns: "columns", data: "data", length: "length", loading: "loading", trackBy: "trackBy", columnResizable: "columnResizable", 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", rowSelectionFormatter: "rowSelectionFormatter", rowClassFormatter: "rowClassFormatter", cellSelectable: "cellSelectable", showToolbar: "showToolbar", toolbarTitle: "toolbarTitle", toolbarTemplate: "toolbarTemplate", showColumnMenuButton: "showColumnMenuButton", columnMenuButtonText: "columnMenuButtonText", columnMenuButtonType: "columnMenuButtonType", columnMenuButtonColor: "columnMenuButtonColor", columnMenuButtonClass: "columnMenuButtonClass", columnMenuButtonIcon: "columnMenuButtonIcon", columnHideable: "columnHideable", columnHideableChecked: "columnHideableChecked", columnSortable: "columnSortable", columnPinnable: "columnPinnable", showColumnMenuHeader: "showColumnMenuHeader", columnMenuHeaderText: "columnMenuHeaderText", columnMenuHeaderTemplate: "columnMenuHeaderTemplate", showColumnMenuFooter: "showColumnMenuFooter", columnMenuFooterText: "columnMenuFooterText", columnMenuFooterTemplate: "columnMenuFooterTemplate", columnPinOptions: "columnPinOptions", 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]=\"_isTemplateRef(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 (selectionChange)=\"_handleColumnChange($event)\"\r\n [sortable]=\"columnSortable\"\r\n (sortChange)=\"_handleColumnChange($event)\"\r\n [pinnable]=\"columnPinnable\"\r\n (pinChange)=\"_handleColumnChange($event)\"\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 </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)=\"_handleSortChange($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.class!\"\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]=\"_isTemplateRef(headerTemplate)\" [ngIfElse]=\"headerTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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]=\"headerTemplate && _isTemplateRef(headerTemplate[col.field])\"\r\n [ngIfElse]=\"defaultHeaderTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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 [arrowPosition]=\"col.sortProp?.arrowPosition!\"\r\n [disableClear]=\"col.sortProp?.disableClear\"\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.class!\"\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]=\"_isTemplateRef(cellTemplate)\" [ngIfElse]=\"cellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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]=\"cellTemplate && _isTemplateRef(cellTemplate[col.field])\"\r\n [ngIfElse]=\"colDefCellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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\r\n [(opened)]=\"expansionRowStates[dataIndex].expanded\"\r\n (toggleChange)=\"_handleExpansionChange($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\"></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]=\"_isTemplateRef(summaryTemplate)\" [ngIfElse]=\"summaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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]=\"summaryTemplate && _isTemplateRef(summaryTemplate[col.field])\"\r\n [ngIfElse]=\"defaultSummaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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 </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 [ngClass]=\"_getRowClassList(row, _getIndex(index, dataIndex))\"\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)=\"_handleSortChange($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.class!\"\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]=\"_isTemplateRef(headerTemplate)\" [ngIfElse]=\"headerTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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]=\"headerTemplate && _isTemplateRef(headerTemplate[col.field])\"\r\n [ngIfElse]=\"defaultHeaderTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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 [arrowPosition]=\"col.sortProp?.arrowPosition!\"\r\n [disableClear]=\"col.sortProp?.disableClear\"\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.class!\"\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]=\"_isTemplateRef(cellTemplate)\" [ngIfElse]=\"cellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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]=\"cellTemplate && _isTemplateRef(cellTemplate[col.field])\"\r\n [ngIfElse]=\"colDefCellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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\r\n [(opened)]=\"expansionRowStates[dataIndex].expanded\"\r\n (toggleChange)=\"_handleExpansionChange($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\"></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]=\"_isTemplateRef(summaryTemplate)\" [ngIfElse]=\"summaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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]=\"summaryTemplate && _isTemplateRef(summaryTemplate[col.field])\"\r\n [ngIfElse]=\"defaultSummaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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 </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 [ngClass]=\"_getRowClassList(row, _getIndex(index, dataIndex))\"\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]=\"_isTemplateRef(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]=\"_isTemplateRef(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]=\"_isTemplateRef(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]=\"_isTemplateRef(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 || _hasNoResult\"\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)=\"_handlePage($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]=\"_isTemplateRef(headerExtraTemplate)\" [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]=\"headerExtraTemplate && _isTemplateRef(headerExtraTemplate[col.field])\">\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-table:not(.mat-column-resize-table){min-width:100%;border-collapse:separate}.mtx-grid .mat-table:not(.mat-column-resize-table) .mat-header-cell:not(.mtx-grid-checkbox-cell),.mtx-grid .mat-table:not(.mat-column-resize-table) .mat-footer-cell:not(.mtx-grid-checkbox-cell),.mtx-grid .mat-table:not(.mat-column-resize-table) .mat-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-header-cell,.mtx-grid .mat-footer-cell,.mtx-grid .mat-cell{padding:4px 10px;box-sizing:border-box}.mtx-grid .mat-header-cell:first-of-type:not(:only-of-type),.mtx-grid .mat-footer-cell:first-of-type:not(:only-of-type),.mtx-grid .mat-cell:first-of-type:not(:only-of-type){padding-left:24px}.mtx-grid .mat-header-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,.mtx-grid .mat-footer-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,.mtx-grid .mat-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell{padding-left:10px;padding-right:10px}[dir=rtl] .mtx-grid .mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-footer-cell:first-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-cell:first-of-type:not(:only-of-type){padding-left:10px;padding-right:24px}[dir=rtl] .mtx-grid .mat-header-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,[dir=rtl] .mtx-grid .mat-footer-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,[dir=rtl] .mtx-grid .mat-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell{padding-left:10px;padding-right:10px}.mtx-grid .mat-header-cell:last-of-type:not(:only-of-type),.mtx-grid .mat-footer-cell:last-of-type:not(:only-of-type),.mtx-grid .mat-cell:last-of-type:not(:only-of-type){padding-right:24px}[dir=rtl] .mtx-grid .mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-footer-cell:last-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-cell:last-of-type:not(:only-of-type){padding-left:24px;padding-right:10px}.mtx-grid .mat-row.mtx-grid-expansion{height:0;overflow:hidden}.mtx-grid .mat-row.mtx-grid-expansion .mat-cell{padding-top:0;padding-bottom:0}.mtx-grid .mat-row.mtx-grid-expansion.collapsed .mat-cell{border-bottom-width:0}.mtx-grid .mat-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:flex;align-items:center}.mtx-grid .mat-paginator-hidden{display:none}.mtx-grid .mat-icon-button i,.mtx-grid .mat-icon-button .mat-icon{line-height:20px}.mtx-grid .mat-icon{width:20px;height:20px;font-size:20px}.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:56px;min-width:56px}.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{width:32px;height:32px;line-height:32px}.mtx-grid-row-expand-button.expanded .mtx-grid-row-expand-icon{transform:rotate(90deg)}.mtx-grid-icon{width:20px;height:20px;font-size:20px}\n"], components: [{ type: i0.forwardRef(function () { return i2$2.MatProgressBar; }), selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { type: i0.forwardRef(function () { return MtxGridColumnMenuComponent; }), selector: "mtx-grid-column-menu", inputs: ["columns", "selectable", "selectableChecked", "sortable", "pinnable", "buttonText", "buttonType", "buttonColor", "buttonClass", "buttonIcon", "showHeader", "headerText", "headerTemplate", "showFooter", "footerText", "footerTemplate", "pinOptions"], outputs: ["selectionChange", "sortChange", "pinChange"], exportAs: ["mtxGridColumnMenu"] }, { type: i0.forwardRef(function () { return i4$2.MatTable; }), selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { type: i0.forwardRef(function () { return i4.MatCheckbox; }), selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i0.forwardRef(function () { return i6$2.MatSortHeader; }), selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { type: i0.forwardRef(function () { return i1.MatButton; }), selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i0.forwardRef(function () { return MtxGridCellComponent; }), selector: "mtx-grid-cell", inputs: ["rowData", "colDef", "data", "summary"], exportAs: ["mtxGridCell"] }, { type: i0.forwardRef(function () { return i4$2.MatHeaderRow; }), selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { type: i0.forwardRef(function () { return i4$2.MatRow; }), selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { type: i0.forwardRef(function () { return i4$2.MatFooterRow; }), selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { type: i0.forwardRef(function () { return i9.MatPaginator; }), selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }], directives: [{ type: i0.forwardRef(function () { return i6.NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i0.forwardRef(function () { return i6.NgTemplateOutlet; }), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i0.forwardRef(function () { return i6.NgClass; }), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i0.forwardRef(function () { return i6$2.MatSort; }), selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { type: i0.forwardRef(function () { return i4$2.MatColumnDef; }), selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { type: i0.forwardRef(function () { return i4$2.MatHeaderCellDef; }), selector: "[matHeaderCellDef]" }, { type: i0.forwardRef(function () { return i4$2.MatHeaderCell; }), selector: "mat-header-cell, th[mat-header-cell]" }, { type: i0.forwardRef(function () { return i4$2.MatCellDef; }), selector: "[matCellDef]" }, { type: i0.forwardRef(function () { return i4$2.MatCell; }), selector: "mat-cell, td[mat-cell]" }, { type: i0.forwardRef(function () { return i4$2.MatFooterCellDef; }), selector: "[matFooterCellDef]" }, { type: i0.forwardRef(function () { return i4$2.MatFooterCell; }), selector: "mat-footer-cell, td[mat-footer-cell]" }, { type: i0.forwardRef(function () { return i6.NgForOf; }), selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i0.forwardRef(function () { return i6.NgStyle; }), selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i0.forwardRef(function () { return MtxGridCellSelectionDirective; }), selector: "[mtx-grid-selectable-cell]", inputs: ["mtxSelectableRowData"], outputs: ["cellSelectionChange"] }, { type: i0.forwardRef(function () { return MtxGridExpansionToggleDirective; }), selector: "[mtx-grid-expansion-toggle]", inputs: ["opened", "expandableRow", "expansionRowTpl"], outputs: ["openedChange", "toggleChange"] }, { type: i0.forwardRef(function () { return i4$2.MatHeaderRowDef; }), selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { type: i0.forwardRef(function () { return i4$2.MatRowDef; }), selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { type: i0.forwardRef(function () { return i4$2.MatFooterRowDef; }), selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { type: i0.forwardRef(function () { return MatColumnResize; }), selector: "table[mat-table][columnResize]" }, { type: i0.forwardRef(function () { return MatResizable; }), selector: "mat-header-cell[resizable], th[mat-header-cell][resizable]", inputs: ["matResizableMinWidthPx", "matResizableMaxWidthPx", "resizable"] }], pipes: { "async": i0.forwardRef(function () { return i6.AsyncPipe; }), "toObservable": i0.forwardRef(function () { return i8.MtxToObservablePipe; }) }, animations: [
|
|
903
|
+
/** @nocollapse */ MtxGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MtxGridComponent, deps: [{ token: MtxGridService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
904
|
+
/** @nocollapse */ MtxGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MtxGridComponent, 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", rowSelectionFormatter: "rowSelectionFormatter", rowClassFormatter: "rowClassFormatter", cellSelectable: "cellSelectable", showToolbar: "showToolbar", toolbarTitle: "toolbarTitle", toolbarTemplate: "toolbarTemplate", showColumnMenuButton: "showColumnMenuButton", columnMenuButtonText: "columnMenuButtonText", columnMenuButtonType: "columnMenuButtonType", columnMenuButtonColor: "columnMenuButtonColor", columnMenuButtonClass: "columnMenuButtonClass", columnMenuButtonIcon: "columnMenuButtonIcon", columnHideable: "columnHideable", columnHideableChecked: "columnHideableChecked", columnSortable: "columnSortable", columnPinnable: "columnPinnable", showColumnMenuHeader: "showColumnMenuHeader", columnMenuHeaderText: "columnMenuHeaderText", columnMenuHeaderTemplate: "columnMenuHeaderTemplate", showColumnMenuFooter: "showColumnMenuFooter", columnMenuFooterText: "columnMenuFooterText", columnMenuFooterTemplate: "columnMenuFooterTemplate", columnPinOptions: "columnPinOptions", 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]=\"_isTemplateRef(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 (selectionChange)=\"_onColumnChange($event)\"\r\n [sortable]=\"columnSortable\"\r\n (sortChange)=\"_onColumnChange($event)\"\r\n [pinnable]=\"columnPinnable\"\r\n (pinChange)=\"_onColumnChange($event)\"\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 </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.class!\"\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]=\"_isTemplateRef(headerTemplate)\" [ngIfElse]=\"headerTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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]=\"headerTemplate && _isTemplateRef(headerTemplate[col.field])\"\r\n [ngIfElse]=\"defaultHeaderTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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 [arrowPosition]=\"col.sortProp?.arrowPosition!\"\r\n [disableClear]=\"col.sortProp?.disableClear\"\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.class!\"\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]=\"_isTemplateRef(cellTemplate)\" [ngIfElse]=\"cellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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]=\"cellTemplate && _isTemplateRef(cellTemplate[col.field])\"\r\n [ngIfElse]=\"colDefCellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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\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 </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]=\"_isTemplateRef(summaryTemplate)\" [ngIfElse]=\"summaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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]=\"summaryTemplate && _isTemplateRef(summaryTemplate[col.field])\"\r\n [ngIfElse]=\"defaultSummaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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 [ngClass]=\"_getRowClassList(row, _getIndex(index, dataIndex))\"\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.class!\"\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]=\"_isTemplateRef(headerTemplate)\" [ngIfElse]=\"headerTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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]=\"headerTemplate && _isTemplateRef(headerTemplate[col.field])\"\r\n [ngIfElse]=\"defaultHeaderTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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 [arrowPosition]=\"col.sortProp?.arrowPosition!\"\r\n [disableClear]=\"col.sortProp?.disableClear\"\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.class!\"\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]=\"_isTemplateRef(cellTemplate)\" [ngIfElse]=\"cellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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]=\"cellTemplate && _isTemplateRef(cellTemplate[col.field])\"\r\n [ngIfElse]=\"colDefCellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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\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 </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]=\"_isTemplateRef(summaryTemplate)\" [ngIfElse]=\"summaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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]=\"summaryTemplate && _isTemplateRef(summaryTemplate[col.field])\"\r\n [ngIfElse]=\"defaultSummaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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 [ngClass]=\"_getRowClassList(row, _getIndex(index, dataIndex))\"\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]=\"_isTemplateRef(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]=\"_isTemplateRef(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]=\"_isTemplateRef(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]=\"_isTemplateRef(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 || _hasNoResult\"\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]=\"_isTemplateRef(headerExtraTemplate)\" [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]=\"headerExtraTemplate && _isTemplateRef(headerExtraTemplate[col.field])\">\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-table:not(.mat-column-resize-table){min-width:100%;border-collapse:separate}.mtx-grid .mat-table:not(.mat-column-resize-table) .mat-header-cell:not(.mtx-grid-checkbox-cell),.mtx-grid .mat-table:not(.mat-column-resize-table) .mat-footer-cell:not(.mtx-grid-checkbox-cell),.mtx-grid .mat-table:not(.mat-column-resize-table) .mat-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-header-cell,.mtx-grid .mat-footer-cell,.mtx-grid .mat-cell{padding:4px 10px;box-sizing:border-box}.mtx-grid .mat-header-cell:first-of-type:not(:only-of-type),.mtx-grid .mat-footer-cell:first-of-type:not(:only-of-type),.mtx-grid .mat-cell:first-of-type:not(:only-of-type){padding-left:24px}.mtx-grid .mat-header-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,.mtx-grid .mat-footer-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,.mtx-grid .mat-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell{padding-left:10px;padding-right:10px}[dir=rtl] .mtx-grid .mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-footer-cell:first-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-cell:first-of-type:not(:only-of-type){padding-left:10px;padding-right:24px}[dir=rtl] .mtx-grid .mat-header-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,[dir=rtl] .mtx-grid .mat-footer-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,[dir=rtl] .mtx-grid .mat-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell{padding-left:10px;padding-right:10px}.mtx-grid .mat-header-cell:last-of-type:not(:only-of-type),.mtx-grid .mat-footer-cell:last-of-type:not(:only-of-type),.mtx-grid .mat-cell:last-of-type:not(:only-of-type){padding-right:24px}[dir=rtl] .mtx-grid .mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-footer-cell:last-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-cell:last-of-type:not(:only-of-type){padding-left:24px;padding-right:10px}.mtx-grid .mat-row.mtx-grid-expansion{height:0;overflow:hidden}.mtx-grid .mat-row.mtx-grid-expansion .mat-cell{padding-top:0;padding-bottom:0}.mtx-grid .mat-row.mtx-grid-expansion.collapsed .mat-cell{border-bottom-width:0}.mtx-grid .mat-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:flex;align-items:center}.mtx-grid .mat-paginator-hidden{display:none}.mtx-grid .mat-icon-button i,.mtx-grid .mat-icon-button .mat-icon{line-height:20px}.mtx-grid .mat-icon{width:20px;height:20px;font-size:20px}.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:56px;min-width:56px}.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{width:32px;height:32px;line-height:32px}.mtx-grid-row-expand-button.expanded .mtx-grid-row-expand-icon{transform:rotate(90deg)}.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.MatButton; }), selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-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 MtxGridCellComponent; }), selector: "mtx-grid-cell", inputs: ["rowData", "colDef", "data", "summary", "placeholder"], exportAs: ["mtxGridCell"] }, { kind: "component", type: i0.forwardRef(function () { return MtxGridColumnMenuComponent; }), selector: "mtx-grid-column-menu", inputs: ["columns", "selectable", "selectableChecked", "sortable", "pinnable", "buttonText", "buttonType", "buttonColor", "buttonClass", "buttonIcon", "showHeader", "headerText", "headerTemplate", "showFooter", "footerText", "footerTemplate", "pinOptions"], outputs: ["selectionChange", "sortChange", "pinChange"], exportAs: ["mtxGridColumnMenu"] }, { kind: "directive", type: i0.forwardRef(function () { return MtxGridExpansionToggleDirective; }), selector: "[mtx-grid-expansion-toggle]", inputs: ["opened", "expandableRow", "expansionRowTpl"], outputs: ["openedChange", "toggleChange"] }, { kind: "directive", type: i0.forwardRef(function () { return MtxGridCellSelectionDirective; }), 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 i8.MtxToObservablePipe; }), name: "toObservable" }], animations: [
|
|
879
905
|
trigger('expansion', [
|
|
880
906
|
state('collapsed', style({ height: '0', minHeight: '0', visibility: 'hidden' })),
|
|
881
907
|
state('expanded', style({ height: '*', visibility: 'visible' })),
|
|
882
908
|
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
883
909
|
]),
|
|
884
910
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
885
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
911
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MtxGridComponent, decorators: [{
|
|
886
912
|
type: Component,
|
|
887
913
|
args: [{ selector: 'mtx-grid', exportAs: 'mtxGrid', host: {
|
|
888
914
|
class: 'mtx-grid',
|
|
@@ -892,7 +918,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImpor
|
|
|
892
918
|
state('expanded', style({ height: '*', visibility: 'visible' })),
|
|
893
919
|
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
894
920
|
]),
|
|
895
|
-
], 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]=\"_isTemplateRef(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 (selectionChange)=\"_handleColumnChange($event)\"\r\n [sortable]=\"columnSortable\"\r\n (sortChange)=\"_handleColumnChange($event)\"\r\n [pinnable]=\"columnPinnable\"\r\n (pinChange)=\"_handleColumnChange($event)\"\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 </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)=\"_handleSortChange($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.class!\"\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]=\"_isTemplateRef(headerTemplate)\" [ngIfElse]=\"headerTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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]=\"headerTemplate && _isTemplateRef(headerTemplate[col.field])\"\r\n [ngIfElse]=\"defaultHeaderTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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 [arrowPosition]=\"col.sortProp?.arrowPosition!\"\r\n [disableClear]=\"col.sortProp?.disableClear\"\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.class!\"\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]=\"_isTemplateRef(cellTemplate)\" [ngIfElse]=\"cellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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]=\"cellTemplate && _isTemplateRef(cellTemplate[col.field])\"\r\n [ngIfElse]=\"colDefCellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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\r\n [(opened)]=\"expansionRowStates[dataIndex].expanded\"\r\n (toggleChange)=\"_handleExpansionChange($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\"></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]=\"_isTemplateRef(summaryTemplate)\" [ngIfElse]=\"summaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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]=\"summaryTemplate && _isTemplateRef(summaryTemplate[col.field])\"\r\n [ngIfElse]=\"defaultSummaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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 </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 [ngClass]=\"_getRowClassList(row, _getIndex(index, dataIndex))\"\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)=\"_handleSortChange($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.class!\"\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]=\"_isTemplateRef(headerTemplate)\" [ngIfElse]=\"headerTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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]=\"headerTemplate && _isTemplateRef(headerTemplate[col.field])\"\r\n [ngIfElse]=\"defaultHeaderTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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 [arrowPosition]=\"col.sortProp?.arrowPosition!\"\r\n [disableClear]=\"col.sortProp?.disableClear\"\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.class!\"\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]=\"_isTemplateRef(cellTemplate)\" [ngIfElse]=\"cellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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]=\"cellTemplate && _isTemplateRef(cellTemplate[col.field])\"\r\n [ngIfElse]=\"colDefCellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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\r\n [(opened)]=\"expansionRowStates[dataIndex].expanded\"\r\n (toggleChange)=\"_handleExpansionChange($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\"></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]=\"_isTemplateRef(summaryTemplate)\" [ngIfElse]=\"summaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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]=\"summaryTemplate && _isTemplateRef(summaryTemplate[col.field])\"\r\n [ngIfElse]=\"defaultSummaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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 </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 [ngClass]=\"_getRowClassList(row, _getIndex(index, dataIndex))\"\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]=\"_isTemplateRef(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]=\"_isTemplateRef(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]=\"_isTemplateRef(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]=\"_isTemplateRef(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 || _hasNoResult\"\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)=\"_handlePage($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]=\"_isTemplateRef(headerExtraTemplate)\" [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]=\"headerExtraTemplate && _isTemplateRef(headerExtraTemplate[col.field])\">\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-table:not(.mat-column-resize-table){min-width:100%;border-collapse:separate}.mtx-grid .mat-table:not(.mat-column-resize-table) .mat-header-cell:not(.mtx-grid-checkbox-cell),.mtx-grid .mat-table:not(.mat-column-resize-table) .mat-footer-cell:not(.mtx-grid-checkbox-cell),.mtx-grid .mat-table:not(.mat-column-resize-table) .mat-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-header-cell,.mtx-grid .mat-footer-cell,.mtx-grid .mat-cell{padding:4px 10px;box-sizing:border-box}.mtx-grid .mat-header-cell:first-of-type:not(:only-of-type),.mtx-grid .mat-footer-cell:first-of-type:not(:only-of-type),.mtx-grid .mat-cell:first-of-type:not(:only-of-type){padding-left:24px}.mtx-grid .mat-header-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,.mtx-grid .mat-footer-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,.mtx-grid .mat-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell{padding-left:10px;padding-right:10px}[dir=rtl] .mtx-grid .mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-footer-cell:first-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-cell:first-of-type:not(:only-of-type){padding-left:10px;padding-right:24px}[dir=rtl] .mtx-grid .mat-header-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,[dir=rtl] .mtx-grid .mat-footer-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,[dir=rtl] .mtx-grid .mat-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell{padding-left:10px;padding-right:10px}.mtx-grid .mat-header-cell:last-of-type:not(:only-of-type),.mtx-grid .mat-footer-cell:last-of-type:not(:only-of-type),.mtx-grid .mat-cell:last-of-type:not(:only-of-type){padding-right:24px}[dir=rtl] .mtx-grid .mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-footer-cell:last-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-cell:last-of-type:not(:only-of-type){padding-left:24px;padding-right:10px}.mtx-grid .mat-row.mtx-grid-expansion{height:0;overflow:hidden}.mtx-grid .mat-row.mtx-grid-expansion .mat-cell{padding-top:0;padding-bottom:0}.mtx-grid .mat-row.mtx-grid-expansion.collapsed .mat-cell{border-bottom-width:0}.mtx-grid .mat-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:flex;align-items:center}.mtx-grid .mat-paginator-hidden{display:none}.mtx-grid .mat-icon-button i,.mtx-grid .mat-icon-button .mat-icon{line-height:20px}.mtx-grid .mat-icon{width:20px;height:20px;font-size:20px}.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:56px;min-width:56px}.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{width:32px;height:32px;line-height:32px}.mtx-grid-row-expand-button.expanded .mtx-grid-row-expand-icon{transform:rotate(90deg)}.mtx-grid-icon{width:20px;height:20px;font-size:20px}\n"] }]
|
|
921
|
+
], 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]=\"_isTemplateRef(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 (selectionChange)=\"_onColumnChange($event)\"\r\n [sortable]=\"columnSortable\"\r\n (sortChange)=\"_onColumnChange($event)\"\r\n [pinnable]=\"columnPinnable\"\r\n (pinChange)=\"_onColumnChange($event)\"\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 </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.class!\"\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]=\"_isTemplateRef(headerTemplate)\" [ngIfElse]=\"headerTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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]=\"headerTemplate && _isTemplateRef(headerTemplate[col.field])\"\r\n [ngIfElse]=\"defaultHeaderTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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 [arrowPosition]=\"col.sortProp?.arrowPosition!\"\r\n [disableClear]=\"col.sortProp?.disableClear\"\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.class!\"\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]=\"_isTemplateRef(cellTemplate)\" [ngIfElse]=\"cellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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]=\"cellTemplate && _isTemplateRef(cellTemplate[col.field])\"\r\n [ngIfElse]=\"colDefCellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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\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 </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]=\"_isTemplateRef(summaryTemplate)\" [ngIfElse]=\"summaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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]=\"summaryTemplate && _isTemplateRef(summaryTemplate[col.field])\"\r\n [ngIfElse]=\"defaultSummaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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 [ngClass]=\"_getRowClassList(row, _getIndex(index, dataIndex))\"\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.class!\"\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]=\"_isTemplateRef(headerTemplate)\" [ngIfElse]=\"headerTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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]=\"headerTemplate && _isTemplateRef(headerTemplate[col.field])\"\r\n [ngIfElse]=\"defaultHeaderTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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 [arrowPosition]=\"col.sortProp?.arrowPosition!\"\r\n [disableClear]=\"col.sortProp?.disableClear\"\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.class!\"\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]=\"_isTemplateRef(cellTemplate)\" [ngIfElse]=\"cellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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]=\"cellTemplate && _isTemplateRef(cellTemplate[col.field])\"\r\n [ngIfElse]=\"colDefCellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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\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 </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]=\"_isTemplateRef(summaryTemplate)\" [ngIfElse]=\"summaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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]=\"summaryTemplate && _isTemplateRef(summaryTemplate[col.field])\"\r\n [ngIfElse]=\"defaultSummaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"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 [ngClass]=\"_getRowClassList(row, _getIndex(index, dataIndex))\"\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]=\"_isTemplateRef(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]=\"_isTemplateRef(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]=\"_isTemplateRef(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]=\"_isTemplateRef(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 || _hasNoResult\"\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]=\"_isTemplateRef(headerExtraTemplate)\" [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]=\"headerExtraTemplate && _isTemplateRef(headerExtraTemplate[col.field])\">\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-table:not(.mat-column-resize-table){min-width:100%;border-collapse:separate}.mtx-grid .mat-table:not(.mat-column-resize-table) .mat-header-cell:not(.mtx-grid-checkbox-cell),.mtx-grid .mat-table:not(.mat-column-resize-table) .mat-footer-cell:not(.mtx-grid-checkbox-cell),.mtx-grid .mat-table:not(.mat-column-resize-table) .mat-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-header-cell,.mtx-grid .mat-footer-cell,.mtx-grid .mat-cell{padding:4px 10px;box-sizing:border-box}.mtx-grid .mat-header-cell:first-of-type:not(:only-of-type),.mtx-grid .mat-footer-cell:first-of-type:not(:only-of-type),.mtx-grid .mat-cell:first-of-type:not(:only-of-type){padding-left:24px}.mtx-grid .mat-header-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,.mtx-grid .mat-footer-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,.mtx-grid .mat-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell{padding-left:10px;padding-right:10px}[dir=rtl] .mtx-grid .mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-footer-cell:first-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-cell:first-of-type:not(:only-of-type){padding-left:10px;padding-right:24px}[dir=rtl] .mtx-grid .mat-header-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,[dir=rtl] .mtx-grid .mat-footer-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,[dir=rtl] .mtx-grid .mat-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell{padding-left:10px;padding-right:10px}.mtx-grid .mat-header-cell:last-of-type:not(:only-of-type),.mtx-grid .mat-footer-cell:last-of-type:not(:only-of-type),.mtx-grid .mat-cell:last-of-type:not(:only-of-type){padding-right:24px}[dir=rtl] .mtx-grid .mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-footer-cell:last-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-cell:last-of-type:not(:only-of-type){padding-left:24px;padding-right:10px}.mtx-grid .mat-row.mtx-grid-expansion{height:0;overflow:hidden}.mtx-grid .mat-row.mtx-grid-expansion .mat-cell{padding-top:0;padding-bottom:0}.mtx-grid .mat-row.mtx-grid-expansion.collapsed .mat-cell{border-bottom-width:0}.mtx-grid .mat-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:flex;align-items:center}.mtx-grid .mat-paginator-hidden{display:none}.mtx-grid .mat-icon-button i,.mtx-grid .mat-icon-button .mat-icon{line-height:20px}.mtx-grid .mat-icon{width:20px;height:20px;font-size:20px}.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:56px;min-width:56px}.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{width:32px;height:32px;line-height:32px}.mtx-grid-row-expand-button.expanded .mtx-grid-row-expand-icon{transform:rotate(90deg)}.mtx-grid-icon{width:20px;height:20px;font-size:20px}\n"] }]
|
|
896
922
|
}], ctorParameters: function () { return [{ type: MtxGridService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { table: [{
|
|
897
923
|
type: ViewChild,
|
|
898
924
|
args: [MatTable]
|
|
@@ -931,6 +957,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImpor
|
|
|
931
957
|
type: Input
|
|
932
958
|
}], columnResizable: [{
|
|
933
959
|
type: Input
|
|
960
|
+
}], emptyValuePlaceholder: [{
|
|
961
|
+
type: Input
|
|
934
962
|
}], pageOnFront: [{
|
|
935
963
|
type: Input
|
|
936
964
|
}], showPaginator: [{
|
|
@@ -1104,9 +1132,9 @@ class MtxGridCellSelectionDirective {
|
|
|
1104
1132
|
this.cellSelectionChange.emit(this);
|
|
1105
1133
|
}
|
|
1106
1134
|
}
|
|
1107
|
-
/** @nocollapse */ MtxGridCellSelectionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1108
|
-
/** @nocollapse */ MtxGridCellSelectionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1109
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1135
|
+
/** @nocollapse */ MtxGridCellSelectionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MtxGridCellSelectionDirective, deps: [{ token: MtxGridComponent }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1136
|
+
/** @nocollapse */ MtxGridCellSelectionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.2", type: MtxGridCellSelectionDirective, selector: "[mtx-grid-selectable-cell]", inputs: { mtxSelectableRowData: "mtxSelectableRowData" }, outputs: { cellSelectionChange: "cellSelectionChange" }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.selected": "this.selected" } }, ngImport: i0 });
|
|
1137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MtxGridCellSelectionDirective, decorators: [{
|
|
1110
1138
|
type: Directive,
|
|
1111
1139
|
args: [{
|
|
1112
1140
|
selector: '[mtx-grid-selectable-cell]',
|
|
@@ -1144,16 +1172,16 @@ class MatColumnResizeFlex extends AbstractMatColumnResize {
|
|
|
1144
1172
|
this.notifier = notifier;
|
|
1145
1173
|
}
|
|
1146
1174
|
}
|
|
1147
|
-
/** @nocollapse */ MatColumnResizeFlex.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1148
|
-
/** @nocollapse */ MatColumnResizeFlex.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1175
|
+
/** @nocollapse */ MatColumnResizeFlex.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MatColumnResizeFlex, deps: [{ token: i2.ColumnResizeNotifier }, { token: i0.ElementRef }, { token: i2.HeaderRowEventDispatcher }, { token: i0.NgZone }, { token: i2.ColumnResizeNotifierSource }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1176
|
+
/** @nocollapse */ MatColumnResizeFlex.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.2", type: MatColumnResizeFlex, selector: "mat-table[columnResize]", host: { classAttribute: "mat-column-resize-flex" }, providers: [...FLEX_PROVIDERS, { provide: ColumnResize, useExisting: MatColumnResizeFlex }], usesInheritance: true, ngImport: i0 });
|
|
1177
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MatColumnResizeFlex, decorators: [{
|
|
1150
1178
|
type: Directive,
|
|
1151
1179
|
args: [{
|
|
1152
1180
|
selector: 'mat-table[columnResize]',
|
|
1153
1181
|
host: FLEX_HOST_BINDINGS,
|
|
1154
1182
|
providers: [...FLEX_PROVIDERS, { provide: ColumnResize, useExisting: MatColumnResizeFlex }],
|
|
1155
1183
|
}]
|
|
1156
|
-
}], ctorParameters: function () { return [{ type: i2
|
|
1184
|
+
}], ctorParameters: function () { return [{ type: i2.ColumnResizeNotifier }, { type: i0.ElementRef }, { type: i2.HeaderRowEventDispatcher }, { type: i0.NgZone }, { type: i2.ColumnResizeNotifierSource }]; } });
|
|
1157
1185
|
|
|
1158
1186
|
/**
|
|
1159
1187
|
* @license
|
|
@@ -1165,10 +1193,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImpor
|
|
|
1165
1193
|
const ENTRY_COMMON_COMPONENTS = [MatColumnResizeOverlayHandle];
|
|
1166
1194
|
class MatColumnResizeCommonModule {
|
|
1167
1195
|
}
|
|
1168
|
-
/** @nocollapse */ MatColumnResizeCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1169
|
-
/** @nocollapse */ MatColumnResizeCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
1170
|
-
/** @nocollapse */ MatColumnResizeCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1171
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1196
|
+
/** @nocollapse */ MatColumnResizeCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MatColumnResizeCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1197
|
+
/** @nocollapse */ MatColumnResizeCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: MatColumnResizeCommonModule, declarations: [MatColumnResizeOverlayHandle], exports: [MatColumnResizeOverlayHandle] });
|
|
1198
|
+
/** @nocollapse */ MatColumnResizeCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MatColumnResizeCommonModule });
|
|
1199
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MatColumnResizeCommonModule, decorators: [{
|
|
1172
1200
|
type: NgModule,
|
|
1173
1201
|
args: [{
|
|
1174
1202
|
declarations: ENTRY_COMMON_COMPONENTS,
|
|
@@ -1178,10 +1206,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImpor
|
|
|
1178
1206
|
const IMPORTS = [OverlayModule, MatColumnResizeCommonModule];
|
|
1179
1207
|
class MatColumnResizeModule {
|
|
1180
1208
|
}
|
|
1181
|
-
/** @nocollapse */ MatColumnResizeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1182
|
-
/** @nocollapse */ MatColumnResizeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
1183
|
-
/** @nocollapse */ MatColumnResizeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1184
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1209
|
+
/** @nocollapse */ MatColumnResizeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MatColumnResizeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1210
|
+
/** @nocollapse */ MatColumnResizeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: MatColumnResizeModule, declarations: [MatColumnResize, MatColumnResizeFlex, MatResizable], imports: [OverlayModule, MatColumnResizeCommonModule], exports: [MatColumnResize, MatColumnResizeFlex, MatResizable] });
|
|
1211
|
+
/** @nocollapse */ MatColumnResizeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MatColumnResizeModule, imports: [IMPORTS] });
|
|
1212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MatColumnResizeModule, decorators: [{
|
|
1185
1213
|
type: NgModule,
|
|
1186
1214
|
args: [{
|
|
1187
1215
|
imports: IMPORTS,
|
|
@@ -1192,8 +1220,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImpor
|
|
|
1192
1220
|
|
|
1193
1221
|
class MtxGridModule {
|
|
1194
1222
|
}
|
|
1195
|
-
/** @nocollapse */ MtxGridModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1196
|
-
/** @nocollapse */ MtxGridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
1223
|
+
/** @nocollapse */ MtxGridModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MtxGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1224
|
+
/** @nocollapse */ MtxGridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: MtxGridModule, declarations: [MtxGridComponent,
|
|
1197
1225
|
MtxGridCellComponent,
|
|
1198
1226
|
MtxGridColumnMenuComponent,
|
|
1199
1227
|
MtxGridExpansionToggleDirective,
|
|
@@ -1220,27 +1248,25 @@ class MtxGridModule {
|
|
|
1220
1248
|
MtxGridExpansionToggleDirective,
|
|
1221
1249
|
MtxGridCellSelectionDirective,
|
|
1222
1250
|
MatColumnResizeModule] });
|
|
1223
|
-
/** @nocollapse */ MtxGridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
], MatColumnResizeModule] });
|
|
1243
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: MtxGridModule, decorators: [{
|
|
1251
|
+
/** @nocollapse */ MtxGridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MtxGridModule, providers: [MtxGridService], imports: [CommonModule,
|
|
1252
|
+
FormsModule,
|
|
1253
|
+
MatTableModule,
|
|
1254
|
+
MatSortModule,
|
|
1255
|
+
MatPaginatorModule,
|
|
1256
|
+
MatCheckboxModule,
|
|
1257
|
+
MatButtonModule,
|
|
1258
|
+
MatProgressBarModule,
|
|
1259
|
+
MatChipsModule,
|
|
1260
|
+
MatTooltipModule,
|
|
1261
|
+
MatIconModule,
|
|
1262
|
+
MatSelectModule,
|
|
1263
|
+
MatFormFieldModule,
|
|
1264
|
+
MatMenuModule,
|
|
1265
|
+
DragDropModule,
|
|
1266
|
+
MtxDialogModule,
|
|
1267
|
+
MtxPipesModule,
|
|
1268
|
+
MatColumnResizeModule, MatColumnResizeModule] });
|
|
1269
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MtxGridModule, decorators: [{
|
|
1244
1270
|
type: NgModule,
|
|
1245
1271
|
args: [{
|
|
1246
1272
|
imports: [
|