@acorex/data-grid 6.5.29 → 6.5.32
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +2 -2
- package/acorex-data-grid.d.ts +5 -5
- package/esm2020/acorex-data-grid.mjs +4 -4
- package/esm2020/lib/data-grid/columns/check-column.component.mjs +117 -117
- package/esm2020/lib/data-grid/columns/column.component.mjs +164 -164
- package/esm2020/lib/data-grid/columns/command-column.component.mjs +115 -115
- package/esm2020/lib/data-grid/columns/date-column.component.mjs +111 -111
- package/esm2020/lib/data-grid/columns/row-number-column.component.mjs +37 -37
- package/esm2020/lib/data-grid/columns/selection-column.component.mjs +42 -42
- package/esm2020/lib/data-grid/columns/text-column.component.mjs +89 -89
- package/esm2020/lib/data-grid/datagrid.component.mjs +667 -667
- package/esm2020/lib/data-grid/datagrid.events.mjs +2 -2
- package/esm2020/lib/data-grid/datagrid.module.mjs +145 -145
- package/esm2020/lib/data-grid/filters/filter.component.mjs +39 -39
- package/esm2020/lib/data-grid/templates/cell-template.component.mjs +53 -53
- package/esm2020/lib/data-grid/templates/detail-template.component.mjs +46 -46
- package/esm2020/lib/data-grid/templates/row-template.component.mjs +43 -43
- package/esm2020/lib/data-lov/data-lov-popup/data-lov-popup.component.mjs +114 -114
- package/esm2020/lib/data-lov/data-lov.component.mjs +165 -165
- package/esm2020/lib/data-lov/data-lov.module.mjs +23 -23
- package/esm2020/public-api.mjs +18 -18
- package/fesm2015/acorex-data-grid.mjs +1833 -1833
- package/fesm2015/acorex-data-grid.mjs.map +1 -1
- package/fesm2020/acorex-data-grid.mjs +1833 -1833
- package/fesm2020/acorex-data-grid.mjs.map +1 -1
- package/lib/data-grid/columns/check-column.component.d.ts +37 -37
- package/lib/data-grid/columns/column.component.d.ts +32 -32
- package/lib/data-grid/columns/command-column.component.d.ts +27 -27
- package/lib/data-grid/columns/date-column.component.d.ts +32 -32
- package/lib/data-grid/columns/row-number-column.component.d.ts +10 -10
- package/lib/data-grid/columns/selection-column.component.d.ts +12 -12
- package/lib/data-grid/columns/text-column.component.d.ts +25 -25
- package/lib/data-grid/datagrid.component.d.ts +142 -142
- package/lib/data-grid/datagrid.events.d.ts +20 -20
- package/lib/data-grid/datagrid.module.d.ts +23 -23
- package/lib/data-grid/filters/filter.component.d.ts +5 -5
- package/lib/data-grid/templates/cell-template.component.d.ts +22 -22
- package/lib/data-grid/templates/detail-template.component.d.ts +21 -21
- package/lib/data-grid/templates/row-template.component.d.ts +20 -20
- package/lib/data-lov/data-lov-popup/data-lov-popup.component.d.ts +33 -33
- package/lib/data-lov/data-lov.component.d.ts +43 -43
- package/lib/data-lov/data-lov.module.d.ts +12 -12
- package/package.json +1 -1
- package/public-api.d.ts +17 -17
@@ -1,164 +1,164 @@
|
|
1
|
-
import { AXConfig } from '@acorex/core';
|
2
|
-
import { Input, ContentChild, Directive } from '@angular/core';
|
3
|
-
import { AXDataGridCellTemplateComponent } from '../templates/cell-template.component';
|
4
|
-
import * as i0 from "@angular/core";
|
5
|
-
export class AXGridDataColumn {
|
6
|
-
constructor() {
|
7
|
-
this.width = 100;
|
8
|
-
this.pinned = null;
|
9
|
-
this.allowSorting = true;
|
10
|
-
this.allowFiltering = AXConfig.get('datagrid.allowFiltering') || false;
|
11
|
-
this.sort = null;
|
12
|
-
this.field = '';
|
13
|
-
this.caption = '';
|
14
|
-
this.checkbox = false;
|
15
|
-
this.headerCheckbox = false;
|
16
|
-
this.groupIndex = -1;
|
17
|
-
this.treeIndex = -1;
|
18
|
-
this.enableRowGroup = false;
|
19
|
-
this.hide = false;
|
20
|
-
this.floatingFilter = AXConfig.get('datagrid.floatingFilter') || false;
|
21
|
-
this.disableMenu = false;
|
22
|
-
this.resizable = true;
|
23
|
-
this.menuColumnDisable = false;
|
24
|
-
this.menuItemDisable = false;
|
25
|
-
}
|
26
|
-
;
|
27
|
-
render() {
|
28
|
-
const col = {
|
29
|
-
field: this.field,
|
30
|
-
width: this.width,
|
31
|
-
};
|
32
|
-
col.resizable = this.resizable;
|
33
|
-
col.suppressMenu = this.disableMenu;
|
34
|
-
col.menuTabs = ['filterMenuTab', 'columnsMenuTab', 'generalMenuTab'];
|
35
|
-
col.floatingFilter = this.floatingFilter;
|
36
|
-
if (!this.allowFiltering) {
|
37
|
-
col.filter = false;
|
38
|
-
col.menuTabs = col.menuTabs.filter(c => c != 'filterMenuTab');
|
39
|
-
col.floatingFilter = false;
|
40
|
-
}
|
41
|
-
if (this.menuColumnDisable == true) {
|
42
|
-
col.menuTabs = col.menuTabs.filter(c => c != 'columnsMenuTab');
|
43
|
-
}
|
44
|
-
if (this.menuItemDisable == true) {
|
45
|
-
col.menuTabs = col.menuTabs.filter(c => c != 'generalMenuTab');
|
46
|
-
}
|
47
|
-
if (this.caption) {
|
48
|
-
col.headerName = this.caption;
|
49
|
-
}
|
50
|
-
if (this.minWidth) {
|
51
|
-
col.minWidth = this.minWidth;
|
52
|
-
}
|
53
|
-
if (this.maxWidth) {
|
54
|
-
col.maxWidth = this.maxWidth;
|
55
|
-
}
|
56
|
-
if (this.pinned) {
|
57
|
-
col.pinned = this.pinned === 'start' ? 'right' : 'left';
|
58
|
-
// TODO: Change based on layout
|
59
|
-
}
|
60
|
-
if (this.allowSorting) {
|
61
|
-
col.sortable = this.allowSorting;
|
62
|
-
}
|
63
|
-
if (this.sort) {
|
64
|
-
col.sort = this.sort;
|
65
|
-
}
|
66
|
-
if (this.groupIndex >= 0) {
|
67
|
-
col.rowGroupIndex = this.groupIndex;
|
68
|
-
col.rowGroup = true;
|
69
|
-
this.enableRowGroup = true;
|
70
|
-
}
|
71
|
-
if (this.treeIndex >= 0) {
|
72
|
-
col.rowGroupIndex = this.treeIndex;
|
73
|
-
col.rowGroup = false;
|
74
|
-
}
|
75
|
-
if (this.hide) {
|
76
|
-
col.hide = true;
|
77
|
-
}
|
78
|
-
if (this.enableRowGroup) {
|
79
|
-
col.enableRowGroup = this.enableRowGroup;
|
80
|
-
}
|
81
|
-
if (this.cellClass) {
|
82
|
-
const THAT = this;
|
83
|
-
if (this.cellClass instanceof Function) {
|
84
|
-
col.cellClass = (p) => {
|
85
|
-
return THAT.cellClass({
|
86
|
-
column: THAT,
|
87
|
-
rowIndex: p.node.rowIndex,
|
88
|
-
rowLevel: p.node.level,
|
89
|
-
data: p.data,
|
90
|
-
value: p.value
|
91
|
-
});
|
92
|
-
};
|
93
|
-
}
|
94
|
-
else {
|
95
|
-
col.cellClass = this.cellClass;
|
96
|
-
}
|
97
|
-
}
|
98
|
-
//
|
99
|
-
if (this.cellTemplate != null) {
|
100
|
-
col.cellRendererFramework = this.cellTemplate.renderer;
|
101
|
-
col.cellRendererParams = this.cellTemplate.params;
|
102
|
-
}
|
103
|
-
if (this.checkbox) {
|
104
|
-
col.checkboxSelection = (params) => {
|
105
|
-
return true;
|
106
|
-
};
|
107
|
-
// col.headerCheckboxSelection = this.headerCheckbox;
|
108
|
-
}
|
109
|
-
return col;
|
110
|
-
}
|
111
|
-
}
|
112
|
-
AXGridDataColumn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridDataColumn, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
113
|
-
AXGridDataColumn.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: AXGridDataColumn, inputs: { width: "width", maxWidth: "maxWidth", minWidth: "minWidth", pinned: "pinned", allowSorting: "allowSorting", allowFiltering: "allowFiltering", cellClass: "cellClass", sort: "sort", field: "field", caption: "caption", cellRendererParams: "cellRendererParams", checkbox: "checkbox", headerCheckbox: "headerCheckbox", groupIndex: "groupIndex", treeIndex: "treeIndex", enableRowGroup: "enableRowGroup", hide: "hide", floatingFilter: "floatingFilter", disableMenu: "disableMenu", resizable: "resizable", menuColumnDisable: "menuColumnDisable", menuItemDisable: "menuItemDisable" }, queries: [{ propertyName: "cellTemplate", first: true, predicate: AXDataGridCellTemplateComponent, descendants: true }], ngImport: i0 });
|
114
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridDataColumn, decorators: [{
|
115
|
-
type: Directive
|
116
|
-
}], ctorParameters: function () { return []; }, propDecorators: { cellTemplate: [{
|
117
|
-
type: ContentChild,
|
118
|
-
args: [AXDataGridCellTemplateComponent]
|
119
|
-
}], width: [{
|
120
|
-
type: Input
|
121
|
-
}], maxWidth: [{
|
122
|
-
type: Input
|
123
|
-
}], minWidth: [{
|
124
|
-
type: Input
|
125
|
-
}], pinned: [{
|
126
|
-
type: Input
|
127
|
-
}], allowSorting: [{
|
128
|
-
type: Input
|
129
|
-
}], allowFiltering: [{
|
130
|
-
type: Input
|
131
|
-
}], cellClass: [{
|
132
|
-
type: Input
|
133
|
-
}], sort: [{
|
134
|
-
type: Input
|
135
|
-
}], field: [{
|
136
|
-
type: Input
|
137
|
-
}], caption: [{
|
138
|
-
type: Input
|
139
|
-
}], cellRendererParams: [{
|
140
|
-
type: Input
|
141
|
-
}], checkbox: [{
|
142
|
-
type: Input
|
143
|
-
}], headerCheckbox: [{
|
144
|
-
type: Input
|
145
|
-
}], groupIndex: [{
|
146
|
-
type: Input
|
147
|
-
}], treeIndex: [{
|
148
|
-
type: Input
|
149
|
-
}], enableRowGroup: [{
|
150
|
-
type: Input
|
151
|
-
}], hide: [{
|
152
|
-
type: Input
|
153
|
-
}], floatingFilter: [{
|
154
|
-
type: Input
|
155
|
-
}], disableMenu: [{
|
156
|
-
type: Input
|
157
|
-
}], resizable: [{
|
158
|
-
type: Input
|
159
|
-
}], menuColumnDisable: [{
|
160
|
-
type: Input
|
161
|
-
}], menuItemDisable: [{
|
162
|
-
type: Input
|
163
|
-
}] } });
|
164
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sdW1uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Fjb3JleC9kYXRhLWdyaWQvc3JjL2xpY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29sLm1lbnVUYWJzLmZpbHRlcihjID0+IGMgIT0gJ2ZpbHRlck1lbnVUYWInKTtcclxuICAgICAgICAgICAgY29sLmZsb2F0aW5nRmlsdGVyID0gZmFsc2U7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmICh0aGlzLm1lbnVDb2x1bW5EaXNhYmxlID09IHRydWUpIHtcclxuICAgICAgICAgICAgY29sLm1lbnVUYWJzID0gY29sLm1lbnVUYWJzLmZpbHRlcihjID0+IGMgIT0gJ2NvbHVtbnNNZW51VGFiJyk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmICh0aGlzLm1lbnVJdGVtRGlzYWJsZSA9PSB0cnVlKSB7XHJcbiAgICAgICAgICAgIGNvbC5tZW51VGFicyA9IGNvbC5tZW51VGFicy5maWx0ZXIoYyA9PiBjICE9ICdnZW5lcmFsTWVudVRhYicpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAodGhpcy5jYXB0aW9uKSB7XHJcbiAgICAgICAgICAgIGNvbC5oZWFkZXJOYW1lID0gdGhpcy5jYXB0aW9uO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAodGhpcy5taW5XaWR0aCkge1xyXG4gICAgICAgICAgICBjb2wubWluV2lkdGggPSB0aGlzLm1pbldpZHRoO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAodGhpcy5tYXhXaWR0aCkge1xyXG4gICAgICAgICAgICBjb2wubWF4V2lkdGggPSB0aGlzLm1heFdpZHRoO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAodGhpcy5waW5uZWQpIHtcclxuICAgICAgICAgICAgY29sLnBpbm5lZCA9IHRoaXMucGlubmVkID09PSAnc3RhcnQnID8gJ3JpZ2h0JyA6ICdsZWZ0JztcclxuICAgICAgICAgICAgLy8gVE9ETzogQ2hhbmdlIGJhc2VkIG9uIGxheW91dFxyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAodGhpcy5hbGxvd1NvcnRpbmcpIHtcclxuICAgICAgICAgICAgY29sLnNvcnRhYmxlID0gdGhpcy5hbGxvd1NvcnRpbmc7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmICh0aGlzLnNvcnQpIHtcclxuICAgICAgICAgICAgY29sLnNvcnQgPSB0aGlzLnNvcnQ7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpZiAodGhpcy5ncm91cEluZGV4ID49IDApIHtcclxuICAgICAgICAgICAgY29sLnJvd0dyb3VwSW5kZXggPSB0aGlzLmdyb3VwSW5kZXg7XHJcbiAgICAgICAgICAgIGNvbC5yb3dHcm91cCA9IHRydWU7XHJcbiAgICAgICAgICAgIHRoaXMuZW5hYmxlUm93R3JvdXAgPSB0cnVlO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKHRoaXMudHJlZUluZGV4ID49IDApIHtcclxuICAgICAgICAgICAgY29sLnJvd0dyb3VwSW5kZXggPSB0aGlzLnRyZWVJbmRleDtcclxuICAgICAgICAgICAgY29sLnJvd0dyb3VwID0gZmFsc2U7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmICh0aGlzLmhpZGUpIHtcclxuICAgICAgICAgICAgY29sLmhpZGUgPSB0cnVlO1xyXG5cclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKHRoaXMuZW5hYmxlUm93R3JvdXApIHtcclxuICAgICAgICAgICAgY29sLmVuYWJsZVJvd0dyb3VwID0gdGhpcy5lbmFibGVSb3dHcm91cDtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmICh0aGlzLmNlbGxDbGFzcykge1xyXG4gICAgICAgICAgICBjb25zdCBUSEFUID0gdGhpcztcclxuICAgICAgICAgICAgaWYgKHRoaXMuY2VsbENsYXNzIGluc3RhbmNlb2YgRnVuY3Rpb24pIHtcclxuICAgICAgICAgICAgICAgIGNvbC5jZWxsQ2xhc3MgPSAocCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBUSEFULmNlbGxDbGFzcyh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbHVtbjogVEhBVCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgcm93SW5kZXg6IHAubm9kZS5yb3dJbmRleCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgcm93TGV2ZWw6IHAubm9kZS5sZXZlbCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogcC5kYXRhLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogcC52YWx1ZVxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGNvbC5jZWxsQ2xhc3MgPSB0aGlzLmNlbGxDbGFzcztcclxuXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgLy9cclxuICAgICAgICBpZiAodGhpcy5jZWxsVGVtcGxhdGUgIT0gbnVsbCkge1xyXG4gICAgICAgICAgICBjb2wuY2VsbFJlbmRlcmVyRnJhbWV3b3JrID0gdGhpcy5jZWxsVGVtcGxhdGUucmVuZGVyZXI7XHJcbiAgICAgICAgICAgIGNvbC5jZWxsUmVuZGVyZXJQYXJhbXMgPSB0aGlzLmNlbGxUZW1wbGF0ZS5wYXJhbXM7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpZiAodGhpcy5jaGVja2JveCkge1xyXG4gICAgICAgICAgICBjb2wuY2hlY2tib3hTZWxlY3Rpb24gPSAocGFyYW1zKSA9PiB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgLy8gIGNvbC5oZWFkZXJDaGVja2JveFNlbGVjdGlvbiA9IHRoaXMuaGVhZGVyQ2hlY2tib3g7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiBjb2w7XHJcbiAgICB9XHJcbn1cclxuXHJcblxyXG5cclxuXHJcblxyXG5cclxuXHJcblxyXG4iXX0=
|
1
|
+
import { AXConfig } from '@acorex/core';
|
2
|
+
import { Input, ContentChild, Directive } from '@angular/core';
|
3
|
+
import { AXDataGridCellTemplateComponent } from '../templates/cell-template.component';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export class AXGridDataColumn {
|
6
|
+
constructor() {
|
7
|
+
this.width = 100;
|
8
|
+
this.pinned = null;
|
9
|
+
this.allowSorting = true;
|
10
|
+
this.allowFiltering = AXConfig.get('datagrid.allowFiltering') || false;
|
11
|
+
this.sort = null;
|
12
|
+
this.field = '';
|
13
|
+
this.caption = '';
|
14
|
+
this.checkbox = false;
|
15
|
+
this.headerCheckbox = false;
|
16
|
+
this.groupIndex = -1;
|
17
|
+
this.treeIndex = -1;
|
18
|
+
this.enableRowGroup = false;
|
19
|
+
this.hide = false;
|
20
|
+
this.floatingFilter = AXConfig.get('datagrid.floatingFilter') || false;
|
21
|
+
this.disableMenu = false;
|
22
|
+
this.resizable = true;
|
23
|
+
this.menuColumnDisable = false;
|
24
|
+
this.menuItemDisable = false;
|
25
|
+
}
|
26
|
+
;
|
27
|
+
render() {
|
28
|
+
const col = {
|
29
|
+
field: this.field,
|
30
|
+
width: this.width,
|
31
|
+
};
|
32
|
+
col.resizable = this.resizable;
|
33
|
+
col.suppressMenu = this.disableMenu;
|
34
|
+
col.menuTabs = ['filterMenuTab', 'columnsMenuTab', 'generalMenuTab'];
|
35
|
+
col.floatingFilter = this.floatingFilter;
|
36
|
+
if (!this.allowFiltering) {
|
37
|
+
col.filter = false;
|
38
|
+
col.menuTabs = col.menuTabs.filter(c => c != 'filterMenuTab');
|
39
|
+
col.floatingFilter = false;
|
40
|
+
}
|
41
|
+
if (this.menuColumnDisable == true) {
|
42
|
+
col.menuTabs = col.menuTabs.filter(c => c != 'columnsMenuTab');
|
43
|
+
}
|
44
|
+
if (this.menuItemDisable == true) {
|
45
|
+
col.menuTabs = col.menuTabs.filter(c => c != 'generalMenuTab');
|
46
|
+
}
|
47
|
+
if (this.caption) {
|
48
|
+
col.headerName = this.caption;
|
49
|
+
}
|
50
|
+
if (this.minWidth) {
|
51
|
+
col.minWidth = this.minWidth;
|
52
|
+
}
|
53
|
+
if (this.maxWidth) {
|
54
|
+
col.maxWidth = this.maxWidth;
|
55
|
+
}
|
56
|
+
if (this.pinned) {
|
57
|
+
col.pinned = this.pinned === 'start' ? 'right' : 'left';
|
58
|
+
// TODO: Change based on layout
|
59
|
+
}
|
60
|
+
if (this.allowSorting) {
|
61
|
+
col.sortable = this.allowSorting;
|
62
|
+
}
|
63
|
+
if (this.sort) {
|
64
|
+
col.sort = this.sort;
|
65
|
+
}
|
66
|
+
if (this.groupIndex >= 0) {
|
67
|
+
col.rowGroupIndex = this.groupIndex;
|
68
|
+
col.rowGroup = true;
|
69
|
+
this.enableRowGroup = true;
|
70
|
+
}
|
71
|
+
if (this.treeIndex >= 0) {
|
72
|
+
col.rowGroupIndex = this.treeIndex;
|
73
|
+
col.rowGroup = false;
|
74
|
+
}
|
75
|
+
if (this.hide) {
|
76
|
+
col.hide = true;
|
77
|
+
}
|
78
|
+
if (this.enableRowGroup) {
|
79
|
+
col.enableRowGroup = this.enableRowGroup;
|
80
|
+
}
|
81
|
+
if (this.cellClass) {
|
82
|
+
const THAT = this;
|
83
|
+
if (this.cellClass instanceof Function) {
|
84
|
+
col.cellClass = (p) => {
|
85
|
+
return THAT.cellClass({
|
86
|
+
column: THAT,
|
87
|
+
rowIndex: p.node.rowIndex,
|
88
|
+
rowLevel: p.node.level,
|
89
|
+
data: p.data,
|
90
|
+
value: p.value
|
91
|
+
});
|
92
|
+
};
|
93
|
+
}
|
94
|
+
else {
|
95
|
+
col.cellClass = this.cellClass;
|
96
|
+
}
|
97
|
+
}
|
98
|
+
//
|
99
|
+
if (this.cellTemplate != null) {
|
100
|
+
col.cellRendererFramework = this.cellTemplate.renderer;
|
101
|
+
col.cellRendererParams = this.cellTemplate.params;
|
102
|
+
}
|
103
|
+
if (this.checkbox) {
|
104
|
+
col.checkboxSelection = (params) => {
|
105
|
+
return true;
|
106
|
+
};
|
107
|
+
// col.headerCheckboxSelection = this.headerCheckbox;
|
108
|
+
}
|
109
|
+
return col;
|
110
|
+
}
|
111
|
+
}
|
112
|
+
AXGridDataColumn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridDataColumn, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
113
|
+
AXGridDataColumn.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: AXGridDataColumn, inputs: { width: "width", maxWidth: "maxWidth", minWidth: "minWidth", pinned: "pinned", allowSorting: "allowSorting", allowFiltering: "allowFiltering", cellClass: "cellClass", sort: "sort", field: "field", caption: "caption", cellRendererParams: "cellRendererParams", checkbox: "checkbox", headerCheckbox: "headerCheckbox", groupIndex: "groupIndex", treeIndex: "treeIndex", enableRowGroup: "enableRowGroup", hide: "hide", floatingFilter: "floatingFilter", disableMenu: "disableMenu", resizable: "resizable", menuColumnDisable: "menuColumnDisable", menuItemDisable: "menuItemDisable" }, queries: [{ propertyName: "cellTemplate", first: true, predicate: AXDataGridCellTemplateComponent, descendants: true }], ngImport: i0 });
|
114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridDataColumn, decorators: [{
|
115
|
+
type: Directive
|
116
|
+
}], ctorParameters: function () { return []; }, propDecorators: { cellTemplate: [{
|
117
|
+
type: ContentChild,
|
118
|
+
args: [AXDataGridCellTemplateComponent]
|
119
|
+
}], width: [{
|
120
|
+
type: Input
|
121
|
+
}], maxWidth: [{
|
122
|
+
type: Input
|
123
|
+
}], minWidth: [{
|
124
|
+
type: Input
|
125
|
+
}], pinned: [{
|
126
|
+
type: Input
|
127
|
+
}], allowSorting: [{
|
128
|
+
type: Input
|
129
|
+
}], allowFiltering: [{
|
130
|
+
type: Input
|
131
|
+
}], cellClass: [{
|
132
|
+
type: Input
|
133
|
+
}], sort: [{
|
134
|
+
type: Input
|
135
|
+
}], field: [{
|
136
|
+
type: Input
|
137
|
+
}], caption: [{
|
138
|
+
type: Input
|
139
|
+
}], cellRendererParams: [{
|
140
|
+
type: Input
|
141
|
+
}], checkbox: [{
|
142
|
+
type: Input
|
143
|
+
}], headerCheckbox: [{
|
144
|
+
type: Input
|
145
|
+
}], groupIndex: [{
|
146
|
+
type: Input
|
147
|
+
}], treeIndex: [{
|
148
|
+
type: Input
|
149
|
+
}], enableRowGroup: [{
|
150
|
+
type: Input
|
151
|
+
}], hide: [{
|
152
|
+
type: Input
|
153
|
+
}], floatingFilter: [{
|
154
|
+
type: Input
|
155
|
+
}], disableMenu: [{
|
156
|
+
type: Input
|
157
|
+
}], resizable: [{
|
158
|
+
type: Input
|
159
|
+
}], menuColumnDisable: [{
|
160
|
+
type: Input
|
161
|
+
}], menuItemDisable: [{
|
162
|
+
type: Input
|
163
|
+
}] } });
|
164
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sdW1uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Fjb3JleC9kYXRhLWdyaWQvc3JjL2xpYi9kYXRhLWdyaWQvY29sdW1ucy9jb2x1bW4uY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxjQUFjLENBQUM7QUFDeEMsT0FBTyxFQUFFLEtBQUssRUFBRSxZQUFZLEVBQWUsU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRTVFLE9BQU8sRUFBRSwrQkFBK0IsRUFBRSxNQUFNLHNDQUFzQyxDQUFDOztBQUt2RixNQUFNLE9BQWdCLGdCQUFnQjtJQXdFb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ICAgICAgIH1cbiAgICAgICAgaWYgKHRoaXMubWluV2lkdGgpIHtcbiAgICAgICAgICAgIGNvbC5taW5XaWR0aCA9IHRoaXMubWluV2lkdGg7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHRoaXMubWF4V2lkdGgpIHtcbiAgICAgICAgICAgIGNvbC5tYXhXaWR0aCA9IHRoaXMubWF4V2lkdGg7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHRoaXMucGlubmVkKSB7XG4gICAgICAgICAgICBjb2wucGlubmVkID0gdGhpcy5waW5uZWQgPT09ICdzdGFydCcgPyAncmlnaHQnIDogJ2xlZnQnO1xuICAgICAgICAgICAgLy8gVE9ETzogQ2hhbmdlIGJhc2VkIG9uIGxheW91dFxuICAgICAgICB9XG4gICAgICAgIGlmICh0aGlzLmFsbG93U29ydGluZykge1xuICAgICAgICAgICAgY29sLnNvcnRhYmxlID0gdGhpcy5hbGxvd1NvcnRpbmc7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHRoaXMuc29ydCkge1xuICAgICAgICAgICAgY29sLnNvcnQgPSB0aGlzLnNvcnQ7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodGhpcy5ncm91cEluZGV4ID49IDApIHtcbiAgICAgICAgICAgIGNvbC5yb3dHcm91cEluZGV4ID0gdGhpcy5ncm91cEluZGV4O1xuICAgICAgICAgICAgY29sLnJvd0dyb3VwID0gdHJ1ZTtcbiAgICAgICAgICAgIHRoaXMuZW5hYmxlUm93R3JvdXAgPSB0cnVlO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHRoaXMudHJlZUluZGV4ID49IDApIHtcbiAgICAgICAgICAgIGNvbC5yb3dHcm91cEluZGV4ID0gdGhpcy50cmVlSW5kZXg7XG4gICAgICAgICAgICBjb2wucm93R3JvdXAgPSBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICBpZiAodGhpcy5oaWRlKSB7XG4gICAgICAgICAgICBjb2wuaGlkZSA9IHRydWU7XG5cbiAgICAgICAgfVxuICAgICAgICBpZiAodGhpcy5lbmFibGVSb3dHcm91cCkge1xuICAgICAgICAgICAgY29sLmVuYWJsZVJvd0dyb3VwID0gdGhpcy5lbmFibGVSb3dHcm91cDtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0aGlzLmNlbGxDbGFzcykge1xuICAgICAgICAgICAgY29uc3QgVEhBVCA9IHRoaXM7XG4gICAgICAgICAgICBpZiAodGhpcy5jZWxsQ2xhc3MgaW5zdGFuY2VvZiBGdW5jdGlvbikge1xuICAgICAgICAgICAgICAgIGNvbC5jZWxsQ2xhc3MgPSAocCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gVEhBVC5jZWxsQ2xhc3Moe1xuICAgICAgICAgICAgICAgICAgICAgICAgY29sdW1uOiBUSEFULFxuICAgICAgICAgICAgICAgICAgICAgICAgcm93SW5kZXg6IHAubm9kZS5yb3dJbmRleCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJvd0xldmVsOiBwLm5vZGUubGV2ZWwsXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhOiBwLmRhdGEsXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogcC52YWx1ZVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgY29sLmNlbGxDbGFzcyA9IHRoaXMuY2VsbENsYXNzO1xuXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgLy9cbiAgICAgICAgaWYgKHRoaXMuY2VsbFRlbXBsYXRlICE9IG51bGwpIHtcbiAgICAgICAgICAgIGNvbC5jZWxsUmVuZGVyZXJGcmFtZXdvcmsgPSB0aGlzLmNlbGxUZW1wbGF0ZS5yZW5kZXJlcjtcbiAgICAgICAgICAgIGNvbC5jZWxsUmVuZGVyZXJQYXJhbXMgPSB0aGlzLmNlbGxUZW1wbGF0ZS5wYXJhbXM7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodGhpcy5jaGVja2JveCkge1xuICAgICAgICAgICAgY29sLmNoZWNrYm94U2VsZWN0aW9uID0gKHBhcmFtcykgPT4ge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIC8vICBjb2wuaGVhZGVyQ2hlY2tib3hTZWxlY3Rpb24gPSB0aGlzLmhlYWRlckNoZWNrYm94O1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBjb2w7XG4gICAgfVxufVxuXG5cblxuXG5cblxuXG5cbiJdfQ==
|
@@ -1,115 +1,115 @@
|
|
1
|
-
import { AXGridDataColumn } from './column.component';
|
2
|
-
import { ChangeDetectionStrategy, Component, Input, EventEmitter, ViewEncapsulation, Output } from '@angular/core';
|
3
|
-
import * as i0 from "@angular/core";
|
4
|
-
import * as i1 from "@angular/common";
|
5
|
-
export class AXGridCommandColumn extends AXGridDataColumn {
|
6
|
-
constructor() {
|
7
|
-
super(...arguments);
|
8
|
-
this.items = [];
|
9
|
-
this.onItemClick = new EventEmitter();
|
10
|
-
}
|
11
|
-
render() {
|
12
|
-
const col = super.render();
|
13
|
-
if (!col.cellRendererFramework) {
|
14
|
-
col.cellRendererFramework = CommandRenderer;
|
15
|
-
}
|
16
|
-
col.cellRendererParams = {
|
17
|
-
items: this.items,
|
18
|
-
onClick: (e) => {
|
19
|
-
this.onItemClick.emit({
|
20
|
-
command: e.name,
|
21
|
-
data: e.data,
|
22
|
-
rowIndex: e.rowIndex,
|
23
|
-
rowLevel: e.rowLevel,
|
24
|
-
htmlEvent: e.htmlEvent
|
25
|
-
});
|
26
|
-
}
|
27
|
-
};
|
28
|
-
col.sortable = false;
|
29
|
-
col.filter = false;
|
30
|
-
col.valueGetter = (params) => {
|
31
|
-
return this.items;
|
32
|
-
};
|
33
|
-
return col;
|
34
|
-
}
|
35
|
-
}
|
36
|
-
AXGridCommandColumn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridCommandColumn, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
37
|
-
AXGridCommandColumn.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXGridCommandColumn, selector: "ax-command-column", inputs: { items: "items" }, outputs: { onItemClick: "onItemClick" }, providers: [{ provide: AXGridDataColumn, useExisting: AXGridCommandColumn }], usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridCommandColumn, decorators: [{
|
39
|
-
type: Component,
|
40
|
-
args: [{
|
41
|
-
selector: 'ax-command-column',
|
42
|
-
template: '',
|
43
|
-
providers: [{ provide: AXGridDataColumn, useExisting: AXGridCommandColumn }],
|
44
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
45
|
-
encapsulation: ViewEncapsulation.None
|
46
|
-
}]
|
47
|
-
}], propDecorators: { items: [{
|
48
|
-
type: Input
|
49
|
-
}], onItemClick: [{
|
50
|
-
type: Output
|
51
|
-
}] } });
|
52
|
-
export class CommandRenderer {
|
53
|
-
constructor() {
|
54
|
-
this.items = [];
|
55
|
-
}
|
56
|
-
agInit(params) {
|
57
|
-
this.mapParams(params);
|
58
|
-
}
|
59
|
-
refresh(params) {
|
60
|
-
this.mapParams(params);
|
61
|
-
return true;
|
62
|
-
}
|
63
|
-
mapParams(params) {
|
64
|
-
this.node = params.node;
|
65
|
-
this.items = typeof params.items == 'function' ? params.items({ data: this.node.data }) : Array.isArray(params.items) ? params.items : [];
|
66
|
-
this.clickCallback = params.onClick;
|
67
|
-
}
|
68
|
-
onClick(item, e) {
|
69
|
-
if (this.clickCallback && !item.disable) {
|
70
|
-
this.clickCallback({
|
71
|
-
name: item.name,
|
72
|
-
rowLevel: this.node.level,
|
73
|
-
rowIndex: this.node.rowIndex,
|
74
|
-
data: this.node.data,
|
75
|
-
htmlEvent: e
|
76
|
-
});
|
77
|
-
}
|
78
|
-
}
|
79
|
-
}
|
80
|
-
CommandRenderer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CommandRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
81
|
-
CommandRenderer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CommandRenderer, selector: "ax-command-cell", ngImport: i0, template: `
|
82
|
-
<button
|
83
|
-
*ngFor="let item of items; let i = index"
|
84
|
-
class="ax button md ax-grid-command-button {{ item.style || 'ax primary blank' }}"
|
85
|
-
[class.disabled]="item.disable"
|
86
|
-
type="button"
|
87
|
-
[title]="item.tooltip"
|
88
|
-
[attr.tabindex]="i"
|
89
|
-
(click)="onClick(item, $event)"
|
90
|
-
>
|
91
|
-
<i [ngClass]="item.icon"></i>{{ item.text }}
|
92
|
-
</button>
|
93
|
-
`, isInline: true, directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
94
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CommandRenderer, decorators: [{
|
95
|
-
type: Component,
|
96
|
-
args: [{
|
97
|
-
selector: 'ax-command-cell',
|
98
|
-
template: `
|
99
|
-
<button
|
100
|
-
*ngFor="let item of items; let i = index"
|
101
|
-
class="ax button md ax-grid-command-button {{ item.style || 'ax primary blank' }}"
|
102
|
-
[class.disabled]="item.disable"
|
103
|
-
type="button"
|
104
|
-
[title]="item.tooltip"
|
105
|
-
[attr.tabindex]="i"
|
106
|
-
(click)="onClick(item, $event)"
|
107
|
-
>
|
108
|
-
<i [ngClass]="item.icon"></i>{{ item.text }}
|
109
|
-
</button>
|
110
|
-
`,
|
111
|
-
encapsulation: ViewEncapsulation.None,
|
112
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
113
|
-
}]
|
114
|
-
}], ctorParameters: function () { return []; } });
|
115
|
-
//# sourceMappingURL=data:application/json;base64,
|
1
|
+
import { AXGridDataColumn } from './column.component';
|
2
|
+
import { ChangeDetectionStrategy, Component, Input, EventEmitter, ViewEncapsulation, Output } from '@angular/core';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
import * as i1 from "@angular/common";
|
5
|
+
export class AXGridCommandColumn extends AXGridDataColumn {
|
6
|
+
constructor() {
|
7
|
+
super(...arguments);
|
8
|
+
this.items = [];
|
9
|
+
this.onItemClick = new EventEmitter();
|
10
|
+
}
|
11
|
+
render() {
|
12
|
+
const col = super.render();
|
13
|
+
if (!col.cellRendererFramework) {
|
14
|
+
col.cellRendererFramework = CommandRenderer;
|
15
|
+
}
|
16
|
+
col.cellRendererParams = {
|
17
|
+
items: this.items,
|
18
|
+
onClick: (e) => {
|
19
|
+
this.onItemClick.emit({
|
20
|
+
command: e.name,
|
21
|
+
data: e.data,
|
22
|
+
rowIndex: e.rowIndex,
|
23
|
+
rowLevel: e.rowLevel,
|
24
|
+
htmlEvent: e.htmlEvent
|
25
|
+
});
|
26
|
+
}
|
27
|
+
};
|
28
|
+
col.sortable = false;
|
29
|
+
col.filter = false;
|
30
|
+
col.valueGetter = (params) => {
|
31
|
+
return this.items;
|
32
|
+
};
|
33
|
+
return col;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
AXGridCommandColumn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridCommandColumn, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
37
|
+
AXGridCommandColumn.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXGridCommandColumn, selector: "ax-command-column", inputs: { items: "items" }, outputs: { onItemClick: "onItemClick" }, providers: [{ provide: AXGridDataColumn, useExisting: AXGridCommandColumn }], usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXGridCommandColumn, decorators: [{
|
39
|
+
type: Component,
|
40
|
+
args: [{
|
41
|
+
selector: 'ax-command-column',
|
42
|
+
template: '',
|
43
|
+
providers: [{ provide: AXGridDataColumn, useExisting: AXGridCommandColumn }],
|
44
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
45
|
+
encapsulation: ViewEncapsulation.None
|
46
|
+
}]
|
47
|
+
}], propDecorators: { items: [{
|
48
|
+
type: Input
|
49
|
+
}], onItemClick: [{
|
50
|
+
type: Output
|
51
|
+
}] } });
|
52
|
+
export class CommandRenderer {
|
53
|
+
constructor() {
|
54
|
+
this.items = [];
|
55
|
+
}
|
56
|
+
agInit(params) {
|
57
|
+
this.mapParams(params);
|
58
|
+
}
|
59
|
+
refresh(params) {
|
60
|
+
this.mapParams(params);
|
61
|
+
return true;
|
62
|
+
}
|
63
|
+
mapParams(params) {
|
64
|
+
this.node = params.node;
|
65
|
+
this.items = typeof params.items == 'function' ? params.items({ data: this.node.data }) : Array.isArray(params.items) ? params.items : [];
|
66
|
+
this.clickCallback = params.onClick;
|
67
|
+
}
|
68
|
+
onClick(item, e) {
|
69
|
+
if (this.clickCallback && !item.disable) {
|
70
|
+
this.clickCallback({
|
71
|
+
name: item.name,
|
72
|
+
rowLevel: this.node.level,
|
73
|
+
rowIndex: this.node.rowIndex,
|
74
|
+
data: this.node.data,
|
75
|
+
htmlEvent: e
|
76
|
+
});
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
80
|
+
CommandRenderer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CommandRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
81
|
+
CommandRenderer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CommandRenderer, selector: "ax-command-cell", ngImport: i0, template: `
|
82
|
+
<button
|
83
|
+
*ngFor="let item of items; let i = index"
|
84
|
+
class="ax button md ax-grid-command-button {{ item.style || 'ax primary blank' }}"
|
85
|
+
[class.disabled]="item.disable"
|
86
|
+
type="button"
|
87
|
+
[title]="item.tooltip"
|
88
|
+
[attr.tabindex]="i"
|
89
|
+
(click)="onClick(item, $event)"
|
90
|
+
>
|
91
|
+
<i [ngClass]="item.icon"></i>{{ item.text }}
|
92
|
+
</button>
|
93
|
+
`, isInline: true, directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
94
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CommandRenderer, decorators: [{
|
95
|
+
type: Component,
|
96
|
+
args: [{
|
97
|
+
selector: 'ax-command-cell',
|
98
|
+
template: `
|
99
|
+
<button
|
100
|
+
*ngFor="let item of items; let i = index"
|
101
|
+
class="ax button md ax-grid-command-button {{ item.style || 'ax primary blank' }}"
|
102
|
+
[class.disabled]="item.disable"
|
103
|
+
type="button"
|
104
|
+
[title]="item.tooltip"
|
105
|
+
[attr.tabindex]="i"
|
106
|
+
(click)="onClick(item, $event)"
|
107
|
+
>
|
108
|
+
<i [ngClass]="item.icon"></i>{{ item.text }}
|
109
|
+
</button>
|
110
|
+
`,
|
111
|
+
encapsulation: ViewEncapsulation.None,
|
112
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
113
|
+
}]
|
114
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